This layer includes a nim plugin for vim, the link is:
[https://github.com/wsdjeg/vim-nim](https://github.com/wsdjeg/vim-nim)
this is just a fork of some other plugins, but I will make some changes.
@mashingan, can you use chrome debug tool to see which source is slow?
link works well for me, as in SpaceVim we enable neomake by default. you can
also have a try with neomake without SpaceVim.
[https://github.com/neomake/neomake](https://github.com/neomake/neomake)
This is my best shot at generating your C code without codegendecl or emit.
type
Data {.importc: "DATA".} = object
...
Int {.importc: "INT".} = int
String {.importc: "STRING".} = string
proc test1(arg: Data): Data {.exportc: "func_test1", importc:
Hi there, I'm wondering if you had managed to resolve this issue, as I'm
running into the same problem.
that may be true, but the question is where you get that BTC.
Haven't you considered macros? You could have something like this:
import
my_awesome_DSL_macros
func_declare:
test1(arg: DATA): DATA
func_create:
test2(arg: int): string = do_something(arg)
Run
The `func_declare:` and `func_create:` are
Howdy - is there a good resource for benefitting from others experiences of
writing nim?
A set of best practices or idioms?
Nim is awesome, but the choice to “how do I do X” is usually “this, that or the
other”, and as a green newbie I can feel a bit adrift.
I highly recommend Nim in Action,
`--embedsrc` is not really needed, and can make fat binaries IMHO, but looks
good.
You can still use BTC at 15...
Assuming I have a string
var x = ""
Run
of length 16. I want to read the chars "" as int32, the chars "" as
int64 and the chars "" as int32.
What would be the most performant way to read these 3 slices into the int types
if I know
Thank you @Hlaaftana, not only for the snippet but also for mentioning
codegenDecl which I was totally unaware of. I just looked it up on the docs and
I think this may be what I'm looking for so I'm going to investigate this
further, cheers.
Looking at this line
[(1)](https://github.com/cdunn2001/compile-times/blob/91c41d81a1ccb46406bf64eb9f923ee6eacdd679/driver.py#L22),
which I assume to be the actual command that runs the Nim compiler, it seems
that you're not using [tcc](https://en.wikipedia.org/wiki/Tiny_C_Compiler),
which
thanks for replying @amalek, yes I did consider macros - but was just wondering
if a compile-time approach might be feasible or even better somehow.
Times in seconds for compiling 10,000 functions:
> [https://github.com/cdunn2001/compile-times/blob/master/results/MacAir2015-10k.csv](https://github.com/cdunn2001/compile-times/blob/master/results/MacAir2015-10k.csv)
That is copied from a reddit thread nearly 2 years ago, and I've added Nim.
hi there, I found
[https://scripter.co/notes/nim](https://scripter.co/notes/nim)/ to be very
useful.
Hi all,
I'd like to be able to compile Nim (or generate from Nim) code in a specialised
C-based DSL. For example I'd like to write something like this in Nim
func_declare test1(arg: DATA): DATA
func_create test2(arg: int): string = do_something(arg)
Run
which
This is curl failing. So you might need to diagnose whether there is something
wrong with it.
@dom96 deserves payment because it is an awesome resource and it requires
untold effort to produce a book.
It is also a shame that someone is denied access because of their situation.
The assumption we should challenge is that the funds must be provided by the
recipient!
What do you think of
I put a docker together to demonstrate my issue with cross compiling and the
awesome community sent a PR
([https://github.com/yatesco/docker-nim-dev-example/pull/1](https://github.com/yatesco/docker-nim-dev-example/pull/1))
19 matches
Mail list logo