Calling the generics parent function

2023-11-23 Thread blackmius
But i found more preferably to just rename base update to `updateBase` and call it so

Calling the generics parent function

2023-11-23 Thread blackmius
`type Enemy = ref object EntGroup[T] = ref object of RootObj items: seq[T] EnemyEntGroup = ref object of EntGroup[Enemy] method update[T](self: EntGroup[T]) = echo "general update loop" method update(self: EnemyEntGroup) = procCall update(EntGroup[Enemy](self)) ## << What to put here to call the

Nim Community Survey 2023

2023-11-23 Thread blackmius
i saw that every forum thread is answered or what do you mean by "ignored"?

Nim Community Survey 2023

2023-11-23 Thread blackmius
Also id like to see the raw results of poll, will you post it somewhere?

Calling the generics parent function

2023-11-23 Thread thedistantforest
Hi I'm trying to run a proc that uses generics. There will be a general update[T] proc for normal use, and a specific proc for any custom code I would want to add. eg update[Enemy] for any enemy specific code. Here is a code example of what I mean: type EntGroup[T] = ref object

What would I lose if I turn of garbage collection?

2023-11-23 Thread Araq
As opposed to what? Sorry but you've no clue about these things. If it's "manual" it cannot be "safe", by definition "manual" must allow for `var x = alloc(10); dealloc(x); use x[]` which is the classic "use after free" bug.

What would I lose if I turn of garbage collection?

2023-11-23 Thread bsljth
So, essentially, I go into manual memory management in Nim, it's a free fall and totally unsafe. That's nice to know (but also nice to know that one can code in Nim without any restrictions).

What would I lose if I turn of garbage collection?

2023-11-23 Thread termer
Using `--mm:none` would be an unpleasant experience because you wouldn't be able to use managed reference types (such as anything that is or is based on a `ref` object) without leaking them. Just use `--mm:arc` if you don't want a GC at all. Objects with reference cycles will leak, but as long a

What would I lose if I turn of garbage collection?

2023-11-23 Thread Araq
Use `ptr` and use it "just like in C", no need to mess with the `mm/gc` switch.

What would I lose if I turn of garbage collection?

2023-11-23 Thread bsljth
What would I lose if I turn off the garbage collection and use manual memory management in Nim. I read somewhere that I would lose the goodness of the std library. Is that true? Is the manual memory management feature in Nim same as in C? I'm just asking out of curiosity.

What would I lose if I turn of garbage collection?

2023-11-23 Thread ElegantBeef
Anything in the stdlib that operates using automatic memory management `seq`, `std/[sets, intsets, packedsets, tables, deques,]`. There is really no reason to disable automatic memory management in Nim since with Arc you can just write hooks and it'd be indistinguishable from the C without m

What would I lose if I turn of garbage collection?

2023-11-23 Thread alireza
also note that you cannot use arc with default asyncdispatch since it needs a cycle collector to free memory, there are other async implenetations that can be used with arc but not the default one as far as i know, you may also need that cycle collector for your own code as well if your code pro

nimlsp does not see packages installed with nimble

2023-11-23 Thread mszs
Thanks for the additional background. I now only have `nimlsp` installed and I no longer see this issue.

https://www.facebook.com/VitaminDeeGummiesAustralia/

2023-11-23 Thread monicaetickle
Vitamin Dee Gummies Australia:- Indulge in Vitamin Dee Gummies Australia for a delicious, nutritious snack! Not only do they have essential nutrients, but also probiotics which can help you maintain your digestive health and support the beneficial bacteria in your gut. Facebook Page:-

nimlsp does not see packages installed with nimble

2023-11-23 Thread giaco
Your editor/IDE act as an LSP client. It usually runs the selected LSP server as a child process. If you select `nimlsp`, you should see a process named `nimlsp` in your task manager. Same stands for `nimlangserver`. If you are on linux you can `pgrep -a nimlsp` or `pgrep -a nimlangserver`. Th

nimlsp does not see packages installed with nimble

2023-11-23 Thread mszs
It seems to have been some kind of interaction between nimlsp and nimlangserver. They were both installed and after deinstalling nimlangserver I no longer see this behavior.

What's stopping Nim from going mainstream? (And how to fix it?)

2023-11-23 Thread Isofruit
Its fun, interesting, teaches you a ton of concepts and ideas you can make use of in most other languages or are generally useful to know and the ecosystem feels much more friendly to contributions than I got the feeling anywhere else (which is in part caused by the lack of libs in places). It'

What's stopping Nim from going mainstream? (And how to fix it?)

2023-11-23 Thread giaco
To me, Nim is a comfort zone. I get a system programming language, a web programming language, a kinda scripting language, all in one package. It's not the best in any of these fields, but it can FFI like no others. @isofruit sorry for drifting away the conversation into scripting

What's stopping Nim from going mainstream? (And how to fix it?)

2023-11-23 Thread bsljth
I wonder... if Nim isn't mainstream yet, what motivates @Araq and the other core developer? And this community?

[] operator and converter are not compatible.

2023-11-23 Thread Clonk
I wouldn't recommend using converter as it makes your code less readable and can often create ambiguity when compiling, especially for something as trivial as an assignment. You could rewrite your code as this : type SEQ*[T] = object data*: seq[T] proc asSEQ*[T](x: s

NIR

2023-11-23 Thread rel
Could you share some ideas you have in mind? Is there a native WebAssembly compilation target too?

[] operator and converter are not compatible.

2023-11-23 Thread chaemon
I made an object SEQ[T] which member has data of type seq[T]. Also, I want [] operator and converter from SET[T] to seq[T]. Then, it seems that the data cannot rewrite in proc f of result.data[0] += 1. But this operation is not related to converter or [] operator because result.data is seq[T] an