Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 04 2021 12:26
    @dom96 banned @acroobat
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
Kaushal Modi
@kaushalmodi
now working on translating some C code to Nim in that wrapper
Timothee Cour
@timotheecour
@kaushalmodi please report all issues u encounter in the bug tracker (after checking they’re not dups :)
Kaushal Modi
@kaushalmodi
will send a PR for this to an appropriate place in the manual
(that "doesn't work" in the comment is old, doesn't apply any more)
Timothee Cour
@timotheecour
ya that example (prettified a bit and with doAssert instead of echo) would be fine in doc (not runnableExamples but as code block)
From IRC (bridge bot)
@FromIRC
<yunfan> hi i was on alpinelinux v3.8.1, and i met a problem while installing nim using choosenim script
<yunfan> the downloaded file exsts at /tmp directory and i had gave it executing permission, but still gave me file not exist while i execute it by manual
<leorize> yunfan: maybe you should try building it manually?
<leorize> oh, and choosenim might have been compiled with glibc, so it wouldn't work on your device
<yunfan> leorize: got it, alpine were upon on musl
From IRC (bridge bot)
@FromIRC
<leorize> I can compile you an alpine version of choosenim, if you trust binaries from strangers :⁠)
<leorize> or you could build the compiler yourself, then use it to compile choosenim :⁠P
<yunfan> leorize: that would saved lots of my time :⁠D
From IRC (bridge bot)
@FromIRC
<leorize> yunfan: http://ix.io/1zod
<leorize> that's an .xz archive
<leorize> extract it and you'll get choosenim :⁠)
<yunfan> thanks
<leorize> oops, you can't dlopen using a static musl binary
<leorize> wait, I'll compile a shared one
<leorize> http://ix.io/1zof
<leorize> ^ that's the shared version of the binary (xz compressed)
From IRC (bridge bot)
@FromIRC
<yunfan> ok, the latter version works
Kaushal Modi
@kaushalmodi
what does this in C extern void eggx_gsetinitialparsegeometry( const char *, ... ) ; map to in Nim?
not sure how to google "..." syntax for C
From IRC (bridge bot)
@FromIRC
<leorize> that's vararg
Kaushal Modi
@kaushalmodi
but the type of vararg is not conveyed in that sig
From IRC (bridge bot)
@FromIRC
<leorize> proc eggx_...(a: cstring) {.varargs, ....}
Kaushal Modi
@kaushalmodi
oh
what should I actually put in place of .... after the varargs pragma?
From IRC (bridge bot)
@FromIRC
<leorize> it's just a placeholder :⁠P
Kaushal Modi
@kaushalmodi
heh, let me try
From IRC (bridge bot)
@FromIRC
<yunfan> also are there any curated list about awesome nim libararies?
<leorize> ^ there you go
<leorize> and also check out nimble.directory
<yunfan> thanks a lot
<yunfan> i am very satisfied of the asynced http server :⁠D
Kaushal Modi
@kaushalmodi
leorize: that worked! thank you
proc gsetinitialparsegeometry*(a: cstring) {.varargs,
                                             importc: "eggx_gsetinitialparsegeometry",
                                             header: headereggx_base.}
From IRC (bridge bot)
@FromIRC
<leorize> ideally you should stay away from the {.header.} pragma :⁠)
Kaushal Modi
@kaushalmodi
no, that is just fixing the nimterop generated code
I left everything as is except for the varargs bit
though .. why shouldn't header pragma be used?
what's the alternative?
From IRC (bridge bot)
@FromIRC
<leorize> mainly because it's not compatible with nlvm
<leorize> there's no alternative :⁠P
<leorize> well, but if nlvm compatibility is not of your concern then just use that pragma :⁠)
Kaushal Modi
@kaushalmodi
yeah .. especially when I don't know what nlvm is :P
just trying to get the SV<>C FFI work
From IRC (bridge bot)
@FromIRC
<yunfan> leorize: so after choosenim's intallation, where is it installed nim to?