/),
into Nim.
The code is posted here,
[https://github.com/chrisheller/experiments/tree/master/swift-python-performance](https://github.com/chrisheller/experiments/tree/master/swift-python-performance),
and just walks through doing the same changes that the original author makes
to convert
You can try using this Docker image. It supports cross compiling directly, but
you can also look at how the Docker image is setup to get more info about how
you might do it yourself.
[https://forum.nim-lang.org/t/5569](https://forum.nim-lang.org/t/5569)
We have a bunch of Nim types/procs that get generated based on some external
data. That all works well, including pulling in the doc comments when running
nimdoc.
The main issue with the generated doc is that it is all in the same file as
whatever module that runs the macro to load the external
Isn't that just building Nim itself on different platforms?
I didn't see anything in the official Docker images that are posted,
[https://hub.docker.com/r/nimlang/nim](https://hub.docker.com/r/nimlang/nim),
about being able to cross-compile your own Nim code.
This is now bumped to Nim version 1.0.4
https://hub.docker.com/r/chrishellerappsian/docker-nim-cross](https://hub.docker.com/r/chrishellerappsian/docker-nim-cross)
[https://github.com/chrisheller/docker-nim-cross](https://github.com/chrisheller/docker-nim-cross)
I'd probably be up for that.
I've been testing this with a similar setup to yours, but maybe we have
different options for the SQLite library we're testing against. The default
SQLite install on my Mac didn't have loadable extension support compiled in, so
I tested with a separate SQLite amalgamation. Its the same version o
I did just post a more cleaned up version of this on
Github as nim-sqliteext,
[https://github.com/chrisheller/nim-sqliteext](https://github.com/chrisheller/nim-sqliteext).
That uses some macro code to inspect a Nim proc and setup the glue code so
that your function can be more Nim focused. It is
I was playing around with making a SQLite extension in Nim the other day.
Here's a simple example of how to do this. This example defines a _hello_
function in SQL that takes one parameter and returns "Hello ". With a
bit more effort you can do things like create virtual tables, etc.
By the way, this is now working properly on devel builds.
# test of initializing inherited types in VM
type
SomeBaseObj {.inheritable.} = object of RootObj
txt : string
InheritedFromBase = object of SomeBaseObj
other : string
proc initB
This is a boiled down test from another thread about using the pegs module at
compile time. I thought I would throw this out there since there seems to be
some general CTFE interest going on right now. I poked around in the VM code to
see if I could figure out why the inherited type initializati
By the way, here is a little more detail on one of the issues that I
encountered. In pegs.nim (0.19.2 and devel), in the parsePeg proc, the
PegParser var that is created seems to get re-initialized after the init call
returns when running in the VM at compile time.
The existing code looks like
I was just playing around with this recently. I was experimenting with walking
the parsed grammar in a macro and checking for 'handlers' for the rules defined
in the grammar. The macro would then map any found handlers into the existing
event loop code.
Part of the reason for doing it that way
Keep in mind that you can write some of your own compile time methods if (for
example) you're regularly checking for something in the AST.
You can run something like
nim check --cpu:i386 mynimfile.nim
and target different architectures, etc without actually having nim run the C
compiler. I have done that before to catch Windows bugs when I was on a Mac
that was not setup for cross-compiling. See
[https://nim-lang.o
Yes, the --run (or -r) will run after compiling helloworld.nim. nim --run
helloworld.nim won't just run your script.
Yes, there are several posts about how to set things up for using Nim with ARM
(either on the device or cross-compiling). Search the forum for ARM and take a
look at some of those posts.
I just tried the libui examples with the cross-compiling setup. Seemed to work
just fine.
et "Hello from Nim" printed to your console.
chrisheller@Chriss-MBP:~$ uname
Darwin
chrisheller@Chriss-MBP:~$ ./ntest
Hello from Nim
chrisheller@Chriss-MBP:~$
Haven't gone beyond just the Hello World example yet, but wanted to share.
20 matches
Mail list logo