I used to follow a similar path on FreeBSD and derivatives. But, if you're not
needing to monkey with the nim compilers/tools and just want to code in nim,
you can simply
`pkg install nim`
`pkg install nimble`
I have, for a few recent FreeBSD installs, had version 1.2 installed
Is there a way to transfer "\--release-small --strip" of zig to nim?
You are completely correct, I am so sloppy ^_^ ^_^
# nim c -d:danger --opt:size --cpu:mipsel --cc:clang --clang.exe="zigcc"
--clang.linkerexe="zigcc" --passC:"-target mipsel-linux-musl" --passL:"-target
mipsel-linux-musl" gencfg.nim
Hint: used config file
Thanks! Yes I did notice Arraymancer - it looks very exciting. Also I noticed
Neo. I haven't tried them yet - will do that in the next few weeks.
For plotting I am most used to Python's matplotlib and Julia's PyPlot wrapper.
I am also playing with gnuplot since it's supported by almost any
# nim c -d:danger --opt:size --cpu:arm --cc:clang --clang.exe="zigcc"
--clang.linkerexe="zigcc" --passC:"-O2 -target mipsel-linux-musl" --passL:"-O2
-target mipsel-linux-musl" gencfg.nim
Hint: used config file '/root/nim/config/nim.cfg' [Conf]
Hint: used config file
You're welcome to join the SciNim chat:
[https://gitter.im/SciNim/community](https://gitter.im/SciNim/community)
Regarding embedded and metaprogramming example, you might be interested in my
[Synthesis](https://github.com/mratsim/synthesis) repo. It's a state machine
generator implemented as a
So while looking for visual examples to showcase Weave, I went a outside of my
comfort zone and tried my hand at graphics programming, in particular
raytracing.
# Faster
I was pleasantly surprised to see Nim consistently faster than C++ on
single-threaded code:
I wrote `nmi` command.
`nmi` display animations aimed to correct users who accidentally enter `nmi`
instead of `nim`. `nmi` is heavily inspired by `sl`.
[https://github.com/jiro4989/nmi](https://github.com/jiro4989/nmi)
Well I don't think that's a Nim bug, but one thing you might try is to pass -O2
in --passC and --passL (it helped me in the past where by default i was getting
SIGILL)
Mimalloc is a dropped experiment to plug Nim's GC into Mimalloc provided hooks
to amortize GC cleanups by running them as the same time as Mimalloc cleanups.
Arc is different.
Thanks, you are partial OK
# uname -a
Linux archlinux 5.6.4-arch1-1 #1 SMP PREEMPT Mon, 13 Apr 2020 12:21:19
+ x86_64 GNU/Linux
# nim --version
Nim Compiler Version 1.3.5 [Linux: amd64]
Compiled at 2020-05-20
Copyright (c) 2006-2020 by Andreas Rumpf
Dear All,
Is the arc GC a rewrite of mimalloc? araqsgc is based on mimalloc
([https://github.com/Araq/araqsgc](https://github.com/Araq/araqsgc)) but I
don't know whether it's the same as arc...
> I may very well be missing something, ...
Read mratsim's post from the same thread then,
[https://forum.nim-lang.org/t/6352#39200](https://forum.nim-lang.org/t/6352#39200)
Note: One thing I purposefully missed out is assigning more CPUs to the VM. By
default, VirtualBox seems to assign a single CPU on my machine, but my machine
has plenty of resources to share some more, so I tend to ramp it up a bit in
the VM settings to 4 cores.
This post was requested by @timotheecour on
[GitHub](https://github.com/nim-lang/Nim/issues/13166#issuecomment-631905175).
In it, I’ll walk through my process of setting up a
[FreeBSD](https://www.freebsd.org) Virtual Machine for the purposes of working
on the Nim compiler and standard
Biased, yes; but also most qualified to answer this question. :-) Thanks for
the confirmation!
Right now the scientific/numerical computing ecosystem of Nim is still tiny
compared to Matlab/Python/Julia. However, since there is no fundamental limit
to reach from cloud to PC to GPU & embedded
> I have limited experience with nim mobile apps. But knowing what I know don't
> think I would use async on the client. Async is great if you are doing tons
> of http style requests. But really a mobile client? Just regular threads are
> probably better if you are just writing and reading from
> But is this within Nim's capabilities?
Well yes, I think so. But maybe I'm a little biased. ;-)
All this talk of `--gc:arc` makes me a little bit frustrated, I feel like
@andrea has a similar reaction. The fact is that I have so far seen no evidence
that `--gc:arc` makes mixing concurrency and parallelism in Nim easier (I may
very well be missing something, so please educate me with
I compiled nimterop/toast with zigcc and it built fine like above but crashes
at runtime in regex and cligen. We might need some testing on this
configuration before people can start relying on it.
Traceback (most recent call last)
toast.nim(231) toast
I am a newbie in Nim, impressed by its powerful yet easy-to-understand grammar,
high performance, and low resource usage. Compiling to C is also brilliant in
order to target numerous platforms with minimal reinventing-the-wheels effort.
I've been a user of Julia since end of 2013. It has laser
You need to first create a script like "zigcc" and put it somewhere in your
PATH, the contents of the script being:
#!/bin/bash
zig cc $@
Run
That is needed because Nim right now doesn't accept compiler commands if they
have spaces in them (since it quotes the
Thank you! Works great:
import tables
type EventEmitter = ref object
eventsMap: Table[string, seq[proc(event: string)]]
proc subscribe(emitter: EventEmitter, event: string, callback: proc(event:
string)) =
if not emitter.eventsMap.hasKey(event):
I've tried to summarize the state of Nim's concurrency and parallelism in this
blog post:
[https://onlinetechinfo.com/concurrency-and-parallelism-in-nim/](https://onlinetechinfo.com/concurrency-and-parallelism-in-nim/).
Some of it was based on this discussion.
I actually want to compile the program to a static arm version
# nim c -d:release --opt=size --passL:'-s -static -target arm' --cc:clang
--clang.exe=clang --clang.linkerexe=clang hello.nim
Hint: used config file '/root/nim/config/nim.cfg' [Conf]
Hint: used config file '/root/nim/config/config.nims' [Conf]
Hint: system [Processing]
Hint:
Try with Nim devel as zig support was implemented about April 25. It sould work
there (as I'm using it) and for me it works but only with --cpu:arm not arm64.
_shrug_ Not our bug. :-)
# nim c --cpu:arm --cc:clang --clang.exe=zig --clang.linkerexe=zig hello.nim
Hint: used config file '/root/nim/config/nim.cfg' [Conf]
Hint: used config file '/root/nim/config/config.nims' [Conf]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
It's `cc:clang`.
> Inheritance WITHOUT generics: use "method" not "proc" or it will fail.
> Inheritance WITH generics, use "proc" not "method" or it will fail. And no, I
> don't know why.
Not sure whether I understand that correctly: does it mean that the third code
example wouldn't work with `method sayFeet`?
# nim --cpu:arm --cc:zig --zig.options.linker: "-target
arm-linux-musleabihf" --zig.options.always: "-target arm-linux-musleabihf" c
./hello.nim
command line(1, 2) Error: unknown C compiler: 'zig'. Available options are:
gcc, switch_gcc, llvm_gcc, clang, bcc, vcc, tcc, env, icl, icc,
That's a bug in `dom.nim`, fix is in the works.
You should use `--cc:clang --clang.exe=zig`.
You forgot to provide architecture for code generation.
Please add --cpu:arm just after nim command:
nim --cpu:arm --cc:zig --zig.options.linker: "-target arm-linux-musleabihf"
\--zig.options.always: "-target arm-linux-musleabihf" c ./hello.nim
35 matches
Mail list logo