Re: Unhandled exception: key not found [KeyError]

2017-10-18 Thread sky_khan
hmm, couldnt see that coming. I partly blame documentation. I wish It was categorized by purpose. Not stacks of procs, templates, macros but constructors/initializers, destructors, getters, setters, (for json module) parsing etc. More examples would not be bad either.

Re: Unhandled exception: key not found [KeyError]

2017-10-18 Thread Araq
field1 = jz{"node1"}.getStr

Re: What's happening with destructors?

2017-10-18 Thread mratsim
It's not a presentation, it's Araq live coding the feature, probably destructors given the number of votes. It's also him who'll do whatever he wants with the video so pick his mind :p.

Re: What's happening with destructors?

2017-10-18 Thread bpr
Looking forward to the blog, and I hope whatever you come up with will not be wrong. Destructors have been a topic for a while. I'm also very interested in seeing where memory regions in Nim go, as per the "Future directions" part of the manual. @mratsim, will this Twitch stream presentation

What should my next Araq's stream be about?

2017-10-18 Thread Tiberium
[http://www.strawpoll.me/14163114](http://www.strawpoll.me/14163114) Vote for your favourite topic! Araq will be streaming on Thursday, 19:00 UTC!

Re: Unhandled exception: key not found [KeyError]

2017-10-18 Thread sky_khan
I'm learning Nim myself by trying to write this, seems working import json var field1, field2, field3 : string var jz : JsonNode = %* {"node1": "Node1Value","node3":nil} template nodeAsStr(n:JsonNode,key:string,default:string="*NoValue*"): string = if

Re: Recovering Nim source code

2017-10-18 Thread jzakiya
>From looking at the xxx.c file in the `nimcache` directory I ultimately >figured out which source code version the executable was created from.

Re: What's happening with destructors?

2017-10-18 Thread mratsim
Or vote and watch the Twitch stream [http://www.strawpoll.me/14163114](http://www.strawpoll.me/14163114)

Unhandled exception: key not found [KeyError]

2017-10-18 Thread alfrednewman
Hi, please consider the code below. import json var field1, field2, field3 : str var jz : JsonNode field1 = jz["node1"].getStr field2 = jz["node2"].getStr field3 = jz["node3"].getStr Sometimes the nodes node1, node2 and/or node3 are available at my

Re: What's happening with destructors?

2017-10-18 Thread Araq
The implementation and the spec are developed together and I don't want to say more until I'm sure it's not embarrassingly wrong. But things are starting to look really good, expect a blog post about this in a couple of days.

What's happening with destructors?

2017-10-18 Thread bpr
I just noticed a burst of GitHub commits on "destructors", but I found nothing in the docs. Is there some change coming? How Nim handles destructors (and GC and memory regions, and ...) could be an interesting selling point. C++ and Rust shows that people are interested in no-GC approaches

Re: what does macros.quote() do exactly?

2017-10-18 Thread Araq
`expandMacros` with its conversion to `typed` is really fragile with today's compiler. Instead use this to see what's going on: import future import macros macro decDumbType(): untyped = result = macros.quote do: type Dumb = ref object of RootObj

Re: Pragma for temporarily making strict identifier names?

2017-10-18 Thread wizzardx
Thanks for the replies! What I've also done in the past to bypass Nim's naming rules - eg, where and how you can use underscores, is to look for a utf8 unicode symbol that looks almost exactly like what I want to use. eg in a direct transliteration of some python code:

Brendan Shinnimin restored your Swede's direct

2017-10-18 Thread ChristinaMoretti
Brendan Shinnimin restored your Swede's direct, even though Challenges threatened once again whenever Matthew Pope struck back again.Challenges concluded bottom in the class and definitely will happen to be motivated just how his or her 1st marketing campaign within The european union

commissioner Roger Goodell has said

2017-10-18 Thread ChristinaMoretti
NFL commissioner Roger Goodell has said "everyone should mean the National Anthem" inside a memo provided for all crew masters.Goodell published to all or any 32 National football league groups following months regarding controversy surrounding the large number of participants that have

Necessities such as kind of packages we want

2017-10-18 Thread ChristinaMoretti
Necessities such as kind of packages we want to participate in because they find involving plans which will make us far better and obtain us set to the postseason [https://www.shopsenatorsgear.com/26-daniel-alfredsson](https://www.shopsenatorsgear.com/26-daniel-alfredsson), mentioned

They proceeded to go amazing

2017-10-18 Thread ChristinaMoretti
"They proceeded to go amazing,Inch Hazzard explained. "The function is growing every single year."Hazzard spent my childhood years throughout Cooperstown, yet ended up being surviving in Co during the Chamber's prior slide function, Pumpkinfest. Once the price of delivering massive pumpkins for

Re: Pragma for temporarily making strict identifier names?

2017-10-18 Thread jlp765
If the `enum` that defines SDL_QUIT is marked `{.pure.}`, then you have to refer to SDL_QUIT as [fully qualified](https://nim-lang.org/docs/manual.html#pragmas-pure-pragma) type sdlEv {.pure.} = enum ... SDL_QUIT, ... if e.`type` ==