Re: Unicode support for Windows 10 console

2020-02-02 Thread demotomohiro
> On Windows console applications the code-page is set at program startup to > UTF-8. Use the new switch -d:nimDontSetUtf8CodePage to disable this feature. > [https://github.com/nim-lang/Nim/blob/devel/changelogs/changelog_1_0_0.md](https://github.com/nim-lang/Nim/blob/devel/changelogs/changelog_

Re: Nim calling Lemon parser and SIGSEGV

2020-02-02 Thread jdn
Yes, nothing jumped out at me as unusual. Reading the generated C code isn't so clear so I could have missed something. On linux when calc_parser is executing state->tree is 0x0 which shouldn't happen (gdb). When it exits it is no longer null but points to invalid memory and hence the segfault.

Re: Unicode support for Windows 10 console

2020-02-02 Thread ktamp
Any chance of having working UTF-8 support? If it is enabled by default, at least it should be working.

Re: Nim calling Lemon parser and SIGSEGV

2020-02-02 Thread jdn
ledigbick reported that it works under Windows with a few .cdecl. additions. The current version of the repo should run if you use Windows. Doesn't fix the segfault on Linux. I have a Windows instance in boxes and I'll set up Nim in it a play around but I'm not certain this will help me figure t

Is "danger" define supposed to also define "release"?

2020-02-02 Thread Yardanico
Nim code (even stdlib) contains some code which has some debugging options enabled with check like when defined(release) or when not defined(release). I think that "danger" define should also imply "release", is that correct? Because for example [https://github.com/nim-lang/Nim/blob/devel/lib/p

Re: Is "danger" define supposed to also define "release"?

2020-02-02 Thread Yardanico
Or maybe we're just supposed to do both -d:release -d:danger when we want a release build with all checks disabled?

Re: Is "danger" define supposed to also define "release"?

2020-02-02 Thread Yardanico
Also, docs in [https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files](https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files) say that you should just use "-d:danger" for release builds without "-d:release"

Re: Hot code reloading

2020-02-02 Thread demotomohiro
I tested this with Nim v1.0.6 on Windows 8.1. Build nimhcr.dll and nimrtl.dll: cd c:\my\path\to\nim nim c -d:release lib/nimrtl.nim nim c -d:release lib/nimhcr.nim Run Put them in the parent directory of mymain.nim or an directory PATH env var contain. As sam

Re: Is "danger" define supposed to also define "release"?

2020-02-02 Thread ktamp
The only thing is "-d:danger" does not define "-d:release"...

Loki: A small library for writing cli programs in Nim

2020-02-02 Thread beshr
Hi folks, New-ish nimion here. I wrote a small helper library for writing line-oriented command interpreters (for another project I'm working on), somewhat inspired by Python's Cmd. Thought I'd share it! [https://github.com/beshrkayali/loki](https://github.com/beshrkayali/loki)

Re: Is "danger" define supposed to also define "release"?

2020-02-02 Thread Yardanico
That's the point of this thread - figure out if this is expected or a bug and -d:danger should also define -d:release

Re: Hot code reloading

2020-02-02 Thread sekao
Thanks, i was able to reproduce your results. It looks like the problem with my project is that it is using GLFW and opengl. It seems to be choking on one or both of them with `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` in various places. If i strip out the opengl stuff comple

Re: Game unlock gui written with gintro

2020-02-02 Thread Dankrad
I'll keep that in mind. Currently I've never used valgrind, but I'll use it when I'm continuing with this (and other) projects (currently I'm on another project). Thank you for those informations.

Re: Is "danger" define supposed to also define "release"?

2020-02-02 Thread juancarlospaco
Expected. (?)

Template with dirty pragma within an async context

2020-02-02 Thread Dankrad
Hi, I've got a problem when using the dirty pragma within an async context. I want to "inject" a templates body into a procedure for less typing. If there's an error, the template should handle this error and return within the handleJoin proc. Could this be an unsolveable issue, when using asy

Re: Is "danger" define supposed to also define "release"?

2020-02-02 Thread Araq
This is a serious bug, `-d:danger` should imply `-d:release` to the point that `defined(release)` is true. We will fix it and backport the fix.

Re: Template with dirty pragma within an async context

2020-02-02 Thread juancarlospaco
Change template to proc with async and inline ?.

Re: Template with dirty pragma within an async context

2020-02-02 Thread Dankrad
I've tried that too (and retried it now). But when I change the templat to a proc with inline and async pragma, the code after handleError will be executed. I think the return keyword will only affect handleError and not handleJoin.

Re: Introducing Norm: a Nim ORM

2020-02-02 Thread Dankrad
I've always searched for ORM's in Nim they are likely sequelize in nodejs (used sequelize years ago). Your project comes closest to sequelize, I like your approach. Nice work!

Compile time FFI

2020-02-02 Thread jyapayne
Compile time FFI has been a wish of mine for some time now. I noticed that it's mostly developed, but has been disabled: [https://github.com/nim-lang/Nim/commit/c5dbb0379fc431a01220224097f00323df6c9ced](https://github.com/nim-lang/Nim/commit/c5dbb0379fc431a01220224097f00323df6c9ced) Is there any

Re: Compile time FFI

2020-02-02 Thread schmidh
That would be awesome! We could say hello to F# type providers. `staticRead` and `staticExec` are good workarounds though.

Re: FOSDEM Call for Participation

2020-02-02 Thread me7
Hi All, Anyone have link of slide/video of fosdem conference please help post here. here's one of the talk that have slide [https://fosdem.org/2020/schedule/event/nimultralowoverheadruntime](https://fosdem.org/2020/schedule/event/nimultralowoverheadruntime)/