get a type via a string?

2019-07-19 Thread JohnAD
I'm writing a macro that parses over object types and generates various functions on it's fields. For the most part it works. However, I'm will likely encountering folks trying to do this: type ssnType = Option[int] type Person = object age: Option[int]

How to return a seq[string] from proc

2019-07-19 Thread ravigupta001
Hi All, I'm trying to create a function to split a string by a tag - . However, when trying return a seq[String], I'm getting an empty seq. I'm new to Nim, having primarily worked with PHP. A couple of questions: 1\. When trying to compile without {.Discardable.} I get an error -

Re: wNim - Nim's Windows GUI Framework

2019-07-19 Thread Neil_H
A little app to display wNim commonly used colors…. forgive any bad code, I only started learning Nim a month back so feel free to change it, make it better etc :-) # Displays a window with all the commonly used wColor constants # Its only been designed for full screen (1920 x 1080) use, it

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-19 Thread cblake
Saying you would recommend against use without saying why you would and then saying that alone is a good enough reason is not much of an argument, actually. So, why would you recommend against its usage? Kebab-case is quite popular for program names in the Unix world. Fully 20% of my `/usr/bin`

Re: Wrap C library that needs CMake

2019-07-19 Thread shashlick
Awesome work! Note that nimterop just added cmake support, makes it a little bit easier.

Re: Bind not working in Generic Procs.

2019-07-19 Thread mratsim
You should probably open a regression issue in the tracker with a minimal example

Bind not working in Generic Procs.

2019-07-19 Thread solo989
I noticed bind no longer works in generic procs. I came up with a macro that can be used as a pragma workaround. macro genProcWithBind*(a : untyped) : untyped = let templateSym = genSym(nskTemplate) let body = a[6].copy() let newProc = a.copy() newProc[6] =

Re: Astro module for calculation of sun and moon position, set and rise time, dawn and dusk

2019-07-19 Thread mratsim
It only needs some nice images [orbits](https://github.com/treeform/orbits) ;). Congrats and welcome onboard :)

Astro module for calculation of sun and moon position, set and rise time, dawn and dusk

2019-07-19 Thread dschaadt
Hi, for those that need to calculate the sun or moon's position, their rise and set time as well as dawn and dusk times (civil, nautical or astronomical), I implemented a small MIT-licensed module: [https://github.com/dschaadt/astro](https://github.com/dschaadt/astro). It's my first nim

Re: Vim 8 code completion plugin?

2019-07-19 Thread zahary
I've wanted to update my vim plugin for a while, but can't quite get to it. PMunch's language server implementation works well with the generic Vim LSP plugins AFAIK: [https://github.com/PMunch/nimlsp](https://github.com/PMunch/nimlsp)

Vim 8 code completion plugin?

2019-07-19 Thread akavel
Hi! Does anyone of you have some working code completion setup for Nim with Vim 8 (...on Windows, ideally...)? I tried searching around, but was surprised to find out the situation seems quite unclear, AFAICS. There appear to be a variety of competing approaches (nimsuggest vs. nim idetools

Re: Version 0.20.2 released

2019-07-19 Thread miran
> What's the reasoning behind this again? Before we used to have one devel and one stable. So devel was always `stable+0.0.1`. That worked fine. But we switched to this "backport mode" where minor version numbers (e.g. 0.20.2, 0.20.4, etc.) have only bugfixes compared to their major release

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-19 Thread dom96
Even if this feature existed I would recommend against its usage, and for that reason alone I think it's simply a waste of time to support it (both from Araq or someone else implementing it, but also the loss of time that we will have to suffer telling people not to use this or dealing with

Re: Version 0.20.2 released

2019-07-19 Thread dom96
> but the devel version (one between 0.20.x and 0.21/1.1) has 0.20.99 version > number What's the reasoning behind this again?

Re: Version 0.20.2 released

2019-07-19 Thread rayman22201
By far the best wording of a release notes so far! Congratulations 

Re: Version 0.20.2 released

2019-07-19 Thread miran
> Note that since only bug fixes made it to 0.20.2 there are a lot of commits > done in 0.20.1 that will only be merged in 0.21.0 Minor nitpick: 0.20.1 was indeed a version between 0.20.0 and 0.20.2, but the devel version (one between 0.20.x and 0.21/1.1) has 0.20.99 version number.