develop nim in SpaceVim

2018-08-11 Thread SpaceVim
hello, I am author of SpaceVim, and SpaceVim is a community-driven vim distribution. SpaceVim is a project which is just like spacemacs, use layer to manager plugins and config. we just add new layer lang#nim which provides nim support in SpaceVim. <[https://spacevim.org/layers/lang/nim/](https

Re: develop nim in SpaceVim

2018-08-11 Thread mashingan
The webpage is loading very slow in my end, any idea? I'm using vim currently but will try SpaceVim. Thank you

Re: Is this valid Nim code or a typo?

2018-08-11 Thread dom96
https://nim-lang.org/docs/manual.html#procedures-anonymous-procs

Re: Is this valid Nim code or a typo?

2018-08-11 Thread jyapayne
@Stefan_Salewski, to further clarify, you could replace that code with the equivalent: proc onDestroy(p: pointer) = let x = cast[var T](p) `=destroy`(x.le) `=destroy`(x.ri) dealloc(p) proc `=destroy`(x: var T) = lazyDestroy(cast[pointer](x), onD

Re: Is this valid Nim code or a typo?

2018-08-11 Thread Stefan_Salewski
Ah yes, I see. Thanks!

Re: Is this valid Nim code or a typo?

2018-08-11 Thread mashingan
I bet he only forgot about that. I usually limit myself of not using parenthesis when the proc only need one argument, while when writing anonymous proc in parenthesis entirely e.g. (proc), thankfully it didn't parsed as a single element tuple, (or did it? :/ )

Re: develop nim in SpaceVim

2018-08-11 Thread shashlick
Which Nim plugins are being installed as part of this layer? Does auto completion and linting work?

Nim with H2O?

2018-08-11 Thread BerkayOzturk
Hello, > Is it possible to develop full web applications (e-commerce, cms etc) with > Nim and h2o ([https://h2o.examp1e.net/](https://h2o.examp1e.net/)) ? My aim > is to build a tech stack mainly focused on speed. I would be really glad if > someone points me in the right direction. You can ch

nimvm echos do not appear

2018-08-11 Thread sflennik
The "compiling..." string does not appear when compiling this program: when nimvm: echo "compiling..." else: echo "running..." Run

Re: nimvm echos do not appear

2018-08-11 Thread emekoi
you need to put the echo in a static block so it's run at compile time: when nimvm: static: echo "compiling..." else: echo "running..." Run

Re: nimvm echos do not appear

2018-08-11 Thread sflennik
So this is expected nimvm behavior? I thought it would operate like static. This works as I expect: static: echo "compiling" echo "running" Run

Re: Uninstall Nim and Tools

2018-08-11 Thread jrb
Not a network hiccup by the look of it. I can reproduce the problem. choosenim works fine as root, but not as a non-root user. Something funky going on with installed on Ubuntu...?

How do you gracefully stop the compiler?

2018-08-11 Thread sflennik
How do you gracefully stop the compiler? You can specify garbage to stop it, but is there a better way? static: echo "compiling..." proc display[T](message: T) = when not (T is string): compile error: "T is not a string" echo message displa

Re: How do you gracefully stop the compiler?

2018-08-11 Thread sflennik
The answer to my question in another thread lead to the answer to this one. Replace the "compile error" line with: static: doAssert(false, "T is not a string") Run The the doAssert will run at compile time.

Re: nimvm echos do not appear

2018-08-11 Thread emekoi
i would think that nimvm being true means that the vm is running that section of code. static blocks don't tell you anything about your code except that it run at compile time instead of normal run time.

Re: How do you gracefully stop the compiler?

2018-08-11 Thread emekoi
`static: echo "compiling..." proc display[T](message: T) = when not (T is string): {.fatal: "T is not a string".} echo message # works display[string]("hello") # fatal error, compilation aborted # display[int](5) ` Run