Re: Object Variants and redefinition of labels or reusbility of field names

2019-12-24 Thread sschwarzer
@FernandoTorres Maybe this is the posting you had in mind: [https://forum.nim-lang.org/t/5036](https://forum.nim-lang.org/t/5036) The related RFC is [https://github.com/nim-lang/RFCs/issues/19](https://github.com/nim-lang/RFCs/issues/19) I'd like to see one of these approaches implemented.

Re: Advent of Nim 2019 megathread

2019-12-24 Thread e
Having decided to try learning a bit about Nim using AoC2019, I joined the [private leaderboard](https://adventofcode.com/2018/leaderboard/private), but never expected to be in the top 10 (I'm at 5 now, `dougcurrie`). So, I'll list my repo now in case anyone searching for Nim Advent of Code

Named Argument Bug?

2019-12-24 Thread dataPulverizer
Why is this not legal code? proc printName(;firstName: string = "Jimmy", lastName: string = "Hendrix") = echo "First Name:", firstName, ", Last Name: ", lastName Run

Re: Named Argument Bug?

2019-12-24 Thread Araq
Because of the `(;`, invalid Nim syntax. Named arguments are not separated by other arguments, they simply always exist.

Introducing --gc:arc

2019-12-24 Thread Araq
# ARC So ... this feature has been in development for quite some time now, Nim is getting the "one GC to rule them all". However calling it a GC doesn't do it justice, it's plain old reference counting with optimizations thanks to move semantics. It has numerous advantages over the other more

Re: Named Argument Bug?

2019-12-24 Thread dataPulverizer
I'll not make anymore assumptions and read more carefully.

Re: Nimph is a Nim package handler for the rest of us

2019-12-24 Thread kobi
Extremely awesome :-)

Re: Introducing --gc:arc

2019-12-24 Thread boia01
This is great! Could you elaborate on shared heap and how memory is passed from one thread to another? Does spawn transfer ownership of its arguments and returns ownership of its result? Would love to see official examples.

Re: Introducing --gc:arc

2019-12-24 Thread treeform
Thank you for this Christmas present.

Re: Named Argument Bug?

2019-12-24 Thread dataPulverizer
Ah, many apologies! I saw it in the manual and assumed that it worked in the same thing as Julia.

Re: Introducing --gc:arc

2019-12-24 Thread Araq
> Does spawn transfer ownership of its arguments and returns ownership of its > result? Exactly. The ownership transfer is also done for channels' `send` and `recv`. We are working on a better thread pool and maybe a more light-weight channel implementation. I'll post some examples here when

Re: Introducing --gc:arc

2019-12-24 Thread dom96
This is awesome, and a great overview thanks for writing it up. I am also curious about the shared heap, the implication from your post is that you are still sticking to the "one heap per thread" model and that we will continue to restrict the sharing of memory between threads. Is that the

Re: Error converting json to types

2019-12-24 Thread Araq
Er, JSON doesn't define a standard format for DateTimes so how could the stdlib offer it?

Re: Introducing --gc:arc

2019-12-24 Thread Araq
> I am also curious about the shared heap, the implication from your post is > that you are still sticking to the "one heap per thread" model and that we > will continue to restrict the sharing of memory between threads. Is that the > case? No. The heap is now shared as it's done in C++, C#,