Re: GSoC 2019

2019-01-04 Thread Libman
Have you ever wondered why Google (a for-profit mega-corp that makes money by manipulating people, and was pretty much a member of the government during the prior US administration) is giving things away for "free"?

Re: Best practices of meta-programming

2019-01-04 Thread Libman
Meta-programming has trade-offs, which is why languages like Go chose to avoid it. The main ones are: * **Added Compile Time.** Nim is already implicitly taking a stand that you shouldn't do your compiling on a low-end machine, and I believe that we are on the right side of history. (This

A new concurrency system

2019-01-04 Thread Libman
I noticed that this blog article was [just resubmitted to Hacker News](https://news.ycombinator.com/item?id=18825102) by someone named mindB. It's currently in 8th place / 24 points / no comments so far.

Re: Could not load libwren.so

2019-01-04 Thread shashlick
Nice work @geotre. Please share your experience with using nimgen when you get a chance.

Nim Advocacy & Promotion Strategies

2019-01-04 Thread Libman
Python has had considerable growth over the past few years, and it was just named the **TIOBE Programming Language Of The Year** again for 2018. I wonder if that makes my above point of "Appeal to Python Fans" worthy of a second look. My points about appealing to freedom zealots ("license

inserting one template inside another

2019-01-04 Thread novikov
I generate two AST's using two different templates. Replacing one node of the fist tree with the whole second tree woks fine. How can I define a variable in the first template and use it in the second? template first(): untiped = var n = 1 echo "this very line gets

Re: "Nim needs better documentation" - share your thoughts

2019-01-04 Thread jlp765
> 10\. Are you willing to help making Nim documentation better? :) This is half the crux of the matter. Documentation developed by a committee won't work. It needs **leadership** , but with all of us contributing. (Existing standard Nim doco already has leadership by @Dom and @Araq)

Re: Could not load libwren.so

2019-01-04 Thread geotre
Hey @lqdev I've switched the wren package to use nimgen and compile in the code, so there's no longer any requirement for libwren.so or the dynlib pragmas. It's also going on nimble - [https://github.com/nim-lang/packages/pull/977](https://github.com/nim-lang/packages/pull/977) Let me know if

Re: Example use of enum with set - doesn't work - yet

2019-01-04 Thread bobg
Yes, I'm using parseEnum proc findBrokerEnum(txt: string): MyBrokerTypes = try: result = parseEnum[MyBrokerTypes](txt) except: printf("MyBrokerType not found %s\n",txt) quit(QuitFailure) Run

Re: Example use of enum with set - doesn't work - yet

2019-01-04 Thread lux
Looks like you want to convert a string into an enum, look here:[https://stackoverflow.com/questions/42977509/nim-standard-way-to-convert-integer-string-to-enum](https://stackoverflow.com/questions/42977509/nim-standard-way-to-convert-integer-string-to-enum) there is a parseEnum proc in strutils

Re: Example use of enum with set - doesn't work - yet

2019-01-04 Thread bobg
Thanks for your reply. In my example, all the enum items also have an underlying int value as well as the text field. I am parsing csv files containing the text parts of the enums, so I need those text parts. To 'see', the $ operator shows the text field and the .ord operator shows the int

Re: Example use of enum with set - doesn't work - yet

2019-01-04 Thread lux
Hi, just learning Nim as well, so I might be wrong but this is maybe what you want: type MyBrokerTypes {.pure.} = enum valSvcFee , valWirFnd , valSell , valBuy , valCasDiv var BrokerBankLike : set[MyBrokerTypes]

Example use of enum with set - doesn't work - yet

2019-01-04 Thread bobg
I’m fiddling around with enum and set. The attempt is to get a type checked expression of what I mean… The enum items come from fields in a CSV file. I have an enum defined as below. I will have more questions, but my first question is how to write a set using my enum types as the basetype of

Re: wNim - Nim's Windows GUI Framework

2019-01-04 Thread Prohyon
Awsome !!!

Re: wNim - Nim's Windows GUI Framework

2019-01-04 Thread zolern
@Ward, thanks to your absolutely amazing libraries (wNim and winim) I was able to create my wAppbar component (pretty important part of UI for my current project). It was interesting trip - deep in Windows GUI, in Nim and in wNim. Actually it was much more difficult to deal with that specific

Re: import statement suggestion

2019-01-04 Thread Araq
Ok, I guess. Alternatively use fewer directories. :P

Re: "Nim needs better documentation" - share your thoughts

2019-01-04 Thread Araq
In devel we have "tut 3" about Nim's macros. There should be dedicated tutorials about the GC, memory management and async and the modules should link to the tutorials. I'm not sure that long walls of text in

Re: "Nim needs better documentation" - share your thoughts

2019-01-04 Thread mratsim
By the way, I like the following approach as it methodically covers the reasons why someone would look into documentation: [https://www.divio.com/blog/documentation](https://www.divio.com/blog/documentation) The main takeaway is that people looking into documentation have different needs and

Re: Segmentation fault instantiating a Nim array help my

2019-01-04 Thread mratsim
Can you add your myArray type and fillArray() proc declaration? Also make sure to triple-quote your code samples.

Segmentation fault instantiating a Nim array help my

2019-01-04 Thread mrlee123
proc main() = echo "Calling fillArray procedure..." let a : myArray = fillArray() when isMainModule: main() According to the Nim documentation (I don't remember if it was on Nim by Example, or in the Nim manual), but var a: myArray instanciates by itself the nested array. This code

Re: "Nim needs better documentation" - share your thoughts

2019-01-04 Thread andrea
I generally find Nim's documentation ok, so it is not my top priority. That said, the areas that are not well-documented are: * the various modes of GC: which one are available? how do they differ? which external requirements do they have - bohem, go libs etc. Especially, it is not clear how

Re: trouble during wrapping a windows DLL

2019-01-04 Thread genuinejedi
I dont have QQ and dont understand chinese. Can you get in touch on QQ with the author of XCGUI and ask about an english docu and nim bindings ? Should be fairly trivial to copy Go's or with nimgen.

Re: Best practices of meta-programming

2019-01-04 Thread gemath
These practices helped me, don't know whether they are "best" :-) **Keep it obvious** : inner templates are probably more readable than constructing and assembling AST nodes "by hand": macro m(...): untyped = template tpl(...) = # people see what is built here