<< 19-07-2015 >>

00:04:00*Matthias247 quit (Read error: Connection reset by peer)
00:25:28*Demos joined #nim
00:34:14*jaco60 quit (Ping timeout: 244 seconds)
00:35:24*Demos quit (Remote host closed the connection)
01:12:58*Demos joined #nim
01:20:42*brson quit (Ping timeout: 246 seconds)
01:22:31*brson joined #nim
01:31:04*askatasuna joined #nim
01:37:53*Demos quit (Remote host closed the connection)
01:38:52*Demos joined #nim
01:49:03*Demos quit (Remote host closed the connection)
01:52:39*Demos joined #nim
01:56:01*pregressive quit (Remote host closed the connection)
02:02:35*Demos quit (Remote host closed the connection)
02:03:22*Demos joined #nim
02:09:23*zaquest quit (Ping timeout: 256 seconds)
02:09:56*zaquest joined #nim
02:12:37*xificurC quit (Remote host closed the connection)
02:13:18*Demos quit (Remote host closed the connection)
02:13:18*xificurC joined #nim
02:26:10*brson quit (Quit: leaving)
02:30:19*strcmp1 joined #nim
02:44:12*vendethiel quit (Ping timeout: 264 seconds)
02:57:52*Demos joined #nim
03:01:00*EXetoC quit (Ping timeout: 264 seconds)
03:07:54*Demos quit (Remote host closed the connection)
03:54:44*darkf joined #nim
04:30:59*Demos joined #nim
04:35:26*Demos quit (Ping timeout: 248 seconds)
05:15:48*punctuated joined #nim
05:15:58*punctuated left #nim ("Leaving")
05:38:21*Kingsquee joined #nim
06:30:39*pregressive joined #nim
06:40:54*pregressive quit (Remote host closed the connection)
06:46:33*vendethiel joined #nim
06:48:06*filcuc joined #nim
07:08:52*unclechu joined #nim
07:09:02*vendethiel quit (Ping timeout: 256 seconds)
07:10:11reactormonkAraq, so how wold you code https://gist.github.com/7d98634df14d663d331f without Option?
07:36:58*vendethiel joined #nim
08:01:57*gmpreussner|work quit (Read error: Connection reset by peer)
08:14:41*Kingsquee quit (Quit: Konversation terminated!)
08:14:50*Kingsquee joined #nim
08:19:14*vendethiel quit (Ping timeout: 244 seconds)
08:29:04*vendethiel joined #nim
08:55:36*xcombelle joined #nim
09:37:18*xcombelle quit (Ping timeout: 264 seconds)
09:40:31*Varriount|Mobile joined #nim
09:43:17*BitPuffin|osx quit (Ping timeout: 256 seconds)
09:46:15*boopisaway is now known as boop
09:46:37*Matthias247 joined #nim
09:50:04*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:50:26*bjz joined #nim
09:57:22*xcombelle joined #nim
10:07:33*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
10:32:51*filcuc quit (Quit: Konversation terminated!)
10:46:36*jaco60 joined #nim
10:52:51*EXetoC joined #nim
11:01:03*Gertm joined #nim
11:02:58*Gertm left #nim (#nim)
11:10:17*drewsrem joined #nim
11:10:35drewsremSomehow I got the impression that sequences are always allocated on the heap, can someone quickly tell me I'm wrong?
11:17:09*b_ joined #nim
11:45:18*xcombelle quit (Remote host closed the connection)
12:14:21federico3we can't send direct messages between forum users - can we?
12:14:45reactormonkdrewsrem, nope, you are correct. For the stack, go with arrays
12:15:02reactormonkdrewsrem, there's probably a way to have sequences on the stack too, but not sure if that will work
12:15:13reactormonkfederico3, nah, that's what IRC is for
12:15:37federico3reactormonk: many users are not here
12:17:03reactormonkfederico3, hm, true. Well, poke dom96 for forum features.
12:19:45drewsremreactormonk, I'm essentially trying to have an object which has a buffer which can start at arbitrary length in the type-system, the length is never changed once initialized and is determined at compile-time via macros, any pointers?
12:20:04drewsremAnd ofc. I'd like to do this on the stack
12:20:06reactormonkdrewsrem, via generic?
12:20:30drewsremreactormonk, wouldn't that create multiple incompatible object-types, one for every buffer-length?
12:20:40reactormonkdrewsrem, pretty much... oops
12:21:00reactormonkdrewsrem, you'd have to write everything via [T, S] for combining two
12:21:22drewsremreactormonk, I'm not following you, is this viable?
12:21:47reactormonkdrewsrem, should be, just remember that you'll have to write every proc that takes two objects to also have two generics
12:22:16reactormonktwo arrays of a different size are a different type, no fucking around with that - you could also use unbounded arrays, but I don't like that. Just go with generics.
12:23:43drewsremunbounded arrays? - how'd I allocate those on the stack?
12:24:06reactormonkerr, don't go that route. It's perfectly possible to do this with generics.
12:24:53drewsremJust curious because I tried to do it, I think, but didn't figured out how I'd actually do it
12:25:17drewsremi've seen UncheckedArray in lib/pure/collections/rtarrays - if that's along those lines
12:26:30arnetheduckhello.. how much memory does a seq[char] use? ie if I do newSeq[char](1024*1024), how much memory will nim consume for that?
12:27:53reactormonkarnetheduck, shouldn't be any significant overhead, just try it
12:27:56drewsremarnetheduck, var foo = newSeq[char](1024*1024); echo sizeof(foo)
12:28:19drewsremor maybe I'm wrong
12:31:23arnetheduckI'm looking at the generated code, and it goes something like "mulInt(len, (*(*typ).base).size)", and then "newObj(typ, size);".. looking at the size member for the type passed to newSeq, it says "NTI92006.size = sizeof(TY92006*);", so 8 on a 64-bit machine..
12:32:18arnetheduckthat would mean that it takes 8 bytes for every character which seems fishy, so I'm wondering if I'm reading it wrong
12:32:37*EXetoC quit (Quit: WeeChat 1.2)
12:34:11drewsremreactormonk, you mean like this: http://ix.io/jPk ?
12:34:22reactormonkdrewsrem, pretty much
12:34:35reactormonkdrewsrem, you might even use T in the array size
12:34:47drewsremI tried that, probably did something wrong
12:34:49drewsremsec
12:34:57reactormonkor create a macro which creates you the type where you only have to pass the macro size
12:36:51drewsremreactormonk, http://ix.io/jPn ?
12:37:10reactormonkdrewsrem, yeah, figured. just go with the above and a template
12:37:24drewsremreactormonk, kk, thanks
12:37:54drewsremThe overhead of generics is code-generation right?
12:38:08drewsremSize that is
12:38:10reactormonkbasically template makeFoo(size: int): Foo = Foo[array[size, int]]()
12:38:40*Trustable joined #nim
12:41:27drewsremSo if I then makeFoo 1000 different object with different sizes, there'd be no significant overhead?
12:41:42drewsrem"significant overhead"
12:41:52drewsremJust wondering how well this might scale
12:45:02*vendethiel quit (Quit: q+)
12:46:44arnetheduckah no.. got it.. it looks at the size of base, not of the sequence pointer, so 1.. sorry for the noise
12:47:02arnetheduckeverything as expected, just a little overhead for the gc
12:53:03drewsremreactormonk, can you nontheless point me to something I can read that'd help me how to implement unbounded arrays allocated on the stack?
12:53:40reactormonkdrewsrem, I have no idea, because I'd never use them. I've just read about it here on the channel. Maybe find the logger bot and go search the history.
12:53:47drewsremreactormonk, thanks
12:54:04reactormonkdrewsrem, might even be something in the documentation.
12:57:39*wirbi joined #nim
12:57:49wirbiHello!
12:59:20wirbiIs in the nim a way to pop first value of a sequence? Like python foo.pop(0)
13:01:55wirbiAnd some slice method like python foo[1:] (from 1 to end), foo[2:-2] (frome 2 to 2 before end)
13:02:40wirbiAnd python enumerate analog?
13:15:26reactormonkenumerate <-> iterable maybe?
13:15:49reactormonkanf slicing foo[1.. ^1] etc. ^1 is evaluated at compiletime.
13:17:31reactormonkwirbi, and yes, there's pop.
13:22:57wirbiFor "pop" question:
13:23:04wirbivar a: seq[int] = @[1, 2, 3]
13:23:09wirbivar b = a.pop()
13:23:16wirbiecho b, " ", a
13:23:35wirbiResult: 3 @[1, 2]
13:24:06wirbiHow can I get result like: 1 @[2, 3]
13:24:53wirbi(b=1 and a=@[2, 3])
13:26:00reactormonkbtw, no need for the seq[int] part, the compile should be able to figure that out
13:26:27reactormonkah, you wanna shift
13:26:35*vendethiel joined #nim
13:28:23reactormonkwirbi, proc shift[T](x: var seq[T], where: Natural = 0): T =\n result = x[where]\n x.delete(where)
13:30:13wirbiCool! ) Thank you!
13:37:11*BitPuffin|osx joined #nim
13:51:02drewsremIs there something to declare an "order" in which macros are executed? - e.g. foo is a macro takes a strLit and saves it in a compileTime variable, bar is a macro that runs through this variable and echoes their content at compileTime - now the behavior I want is that the expansion/execution of foo macros are "immediate", but the expansion/execution of bar macros only happen after all code has been read and all the found foo-macros have been executed. -
13:51:02drewsremDoes this make any sense?
14:05:14reactormonkit should move along data dependencies - and that sounds kinda like global vars
14:06:37drewsremreactormonk, yeah it would store the stringLits in a global compileTime var
14:06:52drewsremreactormonk, or just in an unexported macro-scope
14:07:12drewsrembut any idea how I'd postpone bar-macro-calls until all foo-macro-calls have been executed?
14:07:13reactormonkdrewsrem, I dislike global vars, and so should you :-P Gimme code
14:07:26drewsremreactormonk, sec
14:11:44drewsremhttp://ix.io/jPv
14:12:28drewsremSo it's like, two-pass, one pass, expand all foos, second pass, expand all bars
14:12:30reactormonkwhat do you need the global collection of strings for?
14:12:53reactormonkI'm not totally sure the compiler can do that... But Araq might expand on that
14:13:07renesacwirbi: by enumerate analog you mean getting the index and the element in an iteration?
14:13:55renesacthat is pairs, and is automatically called if you do "for i, e in somethingIterable:"
14:18:49drewsremreactormonk, I'm essentially trying to buffer API-calls, think compiling regex-expressions, but if you use the same regex-expression-string more then once it will use the buffered version, instead of storing those in a CritBitTree or HashSet or something and be indexed by the string itself, they're simply stored in an array and the strings are mapped to compiletime to just int-indexes for that array, the array is then simply initialized in one go, the
14:18:49drewsrembar macro
14:19:30drewsremreactormonk, maybe that's the wrong approach, but was the best idea that come to my mind
14:20:46drewsremSo essentially re"foo.bar" is a macro re that returns the same int, e.g. 0, re"bar" is a new expr and the macro returns 1 etc.
14:26:05wirbirenesac, thank you, it's work
14:26:47renesacalso: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers <-- this needs to be expanded
14:27:33federico3renesac: volunteers are welcome
14:27:47renesacyeah
14:28:20federico3You can put some todos in
14:31:52reactormonkdrewsrem, so you basically want symbols?
14:32:21drewsremreactormonk, hmmm... maybe
14:32:32reactormonkdrewsrem, how about you just use a normal table as symbol table? Should be quick enough.
14:32:42reactormonkwith a get-or-add-and-get
14:34:35drewsremreactormonk, I figured that hashing and dealing with strings at runtime is overkill, the functionality is compileTime only anyway
14:35:17reactormonkdrewsrem, the hashing will be done at compiletime... I think
14:35:34drewsremreactormonk, oh really? - that'd be snazzy
14:36:04reactormonkdrewsrem, otherwise static[T] - which is messy ^^
14:36:15drewsremreactormonk, :|
14:36:24reactormonkmessy as in buggy
14:36:59reactormonkdrewsrem, nope, doesn't do it.
14:37:05drewsremfigured :(
14:37:28reactormonkwould be a cool feature though >:) - maybe with sideeffect free functions
14:38:50drewsremDifferent question on the side: typedescs are compile time only right?
14:39:06reactormonkyup
14:39:12reactormonkIIRC
14:46:46*jszymanski joined #nim
15:12:29*xcombelle joined #nim
15:14:18*wirbi quit (Ping timeout: 246 seconds)
15:23:26*xcombelle quit (Ping timeout: 248 seconds)
15:30:14*Matthias247 quit (Read error: Connection reset by peer)
15:32:10*b_ quit (Ping timeout: 240 seconds)
15:39:02*arnetheduck quit (Ping timeout: 256 seconds)
15:41:14*Ven joined #nim
15:54:59*arnetheduck joined #nim
16:01:00*pafmaf joined #nim
16:02:31*NimBot joined #nim
16:18:17*b_ joined #nim
16:19:34*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:38:13*luke joined #nim
16:38:38*luke is now known as Guest3223
16:41:50federico3is there the opposite of the export pragma? I want to stop exporting gEnv, cmdCount, cmdLine...
16:43:08*drewsrem quit (Quit: Leaving)
16:56:51r-kufederico3 do not add * to those symbols
17:11:42*xcombelle joined #nim
17:11:58federico3r-ku: I want to do that externally, without tweaking nim's libraries
17:14:05ekarlsofederico3: :P what u working on ? :D
17:17:12*xcombelle quit (Ping timeout: 264 seconds)
17:17:57*Guest3223 quit (Ping timeout: 265 seconds)
17:18:00federico3ekarlso: an attempt to make a kernel module in Nim :)
17:24:25ekarlsofederico3: ah
17:26:48*cyraxjoe quit (Ping timeout: 255 seconds)
17:37:50*cyraxjoe joined #nim
17:38:27*darkf quit (Quit: Leaving)
17:49:49*Demos joined #nim
17:55:59r-kuAraq thats how you wanted it? https://github.com/r-ku/Nim/commit/5fa1c38258742b3f059bb48c133d2df6459302f2 and https://github.com/r-ku/Nim/commit/045a8bcb629b549eec945c49931afa612cf6bc0e
18:00:50*Trustable quit (Remote host closed the connection)
18:04:13*b_ quit (Ping timeout: 246 seconds)
18:11:09*Demos quit (Remote host closed the connection)
18:13:15*Demos joined #nim
18:13:40*beatmox quit (Ping timeout: 252 seconds)
18:14:23*b_ joined #nim
18:18:01*Demos quit (Remote host closed the connection)
18:22:06*wirbi joined #nim
18:22:15wirbiHello!
18:23:15wirbiAbout operator 'in' and sequences.
18:23:47wirbiFor exaple I have code like: if i in graph:
18:24:47wirbiI case I need to do inverse operation in python I'll write: if i not in graph:
18:25:14wirbiBut in Nim: if not(i in graph):
18:27:04wirbiOr may is more good solution in Nim? Because 'if i not in graph' would generate compile error.
18:27:55wirbiMay be it's good to include 'not in' in the language?
18:30:11renesacwirbi: it is, see "notin"
18:30:47wirbiOh, sorry. I'm so noob...
18:30:50*unclechu quit (Quit: Leaving.)
18:35:37wirbiAre in the plans to add one line generators like python [x for x in y if x%2==0] ?
18:36:37wirbiI soo miss it.
18:40:11wirbiAnd another question. In lib/js/dom.nim are some js structures. For example:
18:40:18wirbiWindow* = ref WindowObj
18:40:23wirbi WindowObj {.importc.} = object of TEventHandlers
18:40:57wirbivar window* {.importc, nodecl.}: Window
18:42:15renesacwirbi:
18:42:17renesachttps://github.com/nim-lang/Nim/issues/3116
18:43:46renesacthe first syntax is on the future module
18:44:09wirbiCan I extend WindowObj without editing lib/js/dom ? For example, add atob and btoa procs.
18:44:24wirbirenesac, Great!
18:44:49renesacthe second one seems to work for assigining variables
18:45:00renesacbut not for things like echo...
18:45:49renesacand rbehrends didn't report the bug yet, it seems
18:48:35wirbirenesac, For use it need I switch to devel branch or it's already in 0.11.2 ?
18:49:00renesacI think both can be used in the 0.11.2
18:49:11renesacthey are just macros/templates anyway
18:50:49renesacthe problem are bugs in the compiler like the one preventing the rbehrends version from working well
18:51:11*aziz joined #nim
18:51:54renesacbut as it is bugged on devel too, there is no reason to switch to devel at this time
19:00:30*b_ quit (Quit: Leaving)
19:01:34*unclechu joined #nim
19:04:54*mrx1 quit (Ping timeout: 255 seconds)
19:10:15*Matthias247 joined #nim
19:11:29*beatmox joined #nim
19:19:41wirbiHow can I get macros generated code? For macro debug.
19:21:38*unclechu quit (Remote host closed the connection)
19:29:14def-wirbi: at the end of the macro you can "echo result.repr"
19:29:24def-or just echo result maybe
19:37:54wirbidef-, for echo result and echo $result it's generate compile error, for echo result.repr nothing echo on screen.
19:39:15wirbidef-, I add some echo in macro like echo "hello", but no out.
19:39:49def-does your macro generate a result?
19:41:30wirbiI don't know, but I get it from nim lib, and in it code is result assignment.
19:42:27wirbilib/pure/future.nim macro `->` have 'result ='
19:43:03wirbiBut no echo work.
19:43:12def-then after the "result =" "echo result.repr" should work
19:51:33*unclechu joined #nim
19:51:53wirbidef-, you right, it's work! Thank you! I wait echo on execution time, but echo was on compile time.
19:52:37*X67r joined #nim
20:23:08*insomniac joined #nim
20:23:11insomniachello o/
20:24:08renesachow do I make procs taking types as parameters?
20:24:10renesachttps://gist.github.com/ReneSac/492bd9e4a4d8ef7e0f39
20:24:52renesacor templates in this case
20:25:13renesacoh, as a proc it works
20:25:41renesacshould the template work too?
20:30:06insomniacI'll add another question: is that possible to make PIC code with NIM?
20:49:04*jszymanski quit (Quit: computer sleeps...)
20:54:19*unclechu quit (Remote host closed the connection)
21:00:15reactormonkinsomniac, what's PIC code?
21:00:41reactormonkrenesac, that's usually called a "generic"
21:01:47renesacso?
21:02:08renesacwell, I discovered that what I want to do is kinda limited, as I can't convert between types on compile time
21:04:01insomniacreactormonk: position-independent code
21:04:11insomniacwhat you get with -fPIC -shared with GCC
21:04:14reactormonkinsomniac, doesn't tell me anything
21:04:21insomniacreactormonk: I'm sorry for that
21:04:35reactormonkinsomniac, you can pass these compiler flags, is that enough?
21:04:43reactormonk--passC:-fPIC
21:05:06insomniacreactormonk: not that easy - I didn't know NIM until today, and a friend of mine insisted to write an LKM in NIM
21:05:17insomniacI hacked some stuff and actually ran NIM code at kernel space
21:05:26insomniacbut to make it really work I need to generate PIC code
21:05:42reactormonkso where is PIC relevant for your code? How does PIC code look like in C?
21:05:50insomniacreactormonk: in PIC code there are no relocs
21:06:08insomniacit's like old-world userspace code where you don't relocate sections at runtime
21:07:22reactormonkCould you give me some C code? I sadly don't know too much at all about kernel dev, but maybe I can help you if I see some code, and how you can use nim to express similar things
21:08:14reactormonk... or you could wait for someone who does that kinda stuff, we have some IIRC :-)
21:08:25reactormonkOr post it at http://forum.nim-lang.org/
21:08:28insomniacreactormonk: I'll publish the code on github as soon as it's ready -- the code is not really relevant, it's matter of how it's compiled
21:08:39insomniacit makes more sense to post the Makefile
21:08:49reactormonkso what else do you require besides passing the correct compiler flags?
21:09:16insomniacunderstanding how to tell Nim not to require any standard library
21:09:28insomniacno libc nor anything else
21:10:02insomniacso far I passed -static -nostdlib -fno-common and --noMain --noLinking --os:standalone
21:10:12insomniacrespectively to the underlying call to gcc and to Nim itself
21:10:18reactormonksounds good to me, got anything useful?
21:10:22insomniacbasically, I need to create an entirely self-contained object
21:10:25insomniacyeah
21:10:34insomniacI could dereference a null pointer at kspace :)
21:10:39reactormonk>:)
21:11:46reactormonksooo... what's your blocker?
21:12:41insomniacI need to understand what systemInit and systemDatInit are (considering that I never used Nim before today)
21:13:23insomniacand how to avoid Nim code to require it
21:13:45insomniacaccording to objdump, these are mentioned in the relocs
21:14:10insomniac(might also be not possible, depending on the language design)
21:14:19reactormonkthey are inits for the system module... lemme see what's in there. Generated C code is in nimcache/
21:14:53insomniacyeah
21:15:09insomniacdeclared with NIM_EXTERNC
21:15:43*flaviu quit (Ping timeout: 264 seconds)
21:15:49insomniacand used by PreMain
21:17:02insomniacI could get rid of them manually, since they are not really required
21:17:10insomniacbut I'd like to get rid of them at compile time
21:17:48reactormonkYou think you could post your question on the forum? Most people here are EU, and they're about to go to bed I'd say
21:18:06*flaviu joined #nim
21:18:09insomniacI am in EU as well :P BTW I will
21:18:56insomniacbut tomorrow
21:19:27insomniacoh wait
21:19:33insomniacis there a way not to generate NimMain ?
21:19:44insomniacthat seems to be the root cause
21:19:52insomniac--noMain doesn't really help
21:20:52renesachttp://hookrace.net/blog/nim-binary-size/ <-- maybe this can help?
21:21:17insomniacchecking
21:22:09*wirbi quit (Ping timeout: 246 seconds)
21:22:13insomniacrenesac: maybe, yes :) thanks for the link
21:22:21renesache uses "-passL:-nostdlib" and then "proc main {.exportc: "_start".}"
21:22:26*flaviu quit (Ping timeout: 256 seconds)
21:22:31insomniacreminds me of the teensy ELF article :)
21:22:33renesacI'm not sure how functional nim will be with this
21:22:38insomniachere if anyone cares, http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
21:22:57insomniacrenesac: not much, no memory management and so on, just the kernel as framework
21:23:00renesacyes, he liked it at the end
21:23:15insomniacrenesac: also, it's just for fun after talking to a friend
21:23:29renesac*linked
21:23:40insomniaccool
21:24:36*flaviu joined #nim
21:28:44*aziz quit (Remote host closed the connection)
21:29:24*Varriount joined #nim
21:30:52insomniacmh.. I can get rid of the symbol export but not the internal call to it
21:31:48insomniacgot it
21:31:52insomniacthat's because of the gc
21:31:56insomniacremoved, that works
21:32:00insomniac--gc:none
21:32:22renesac"The final trick of this section is to tell GCC to optimize away unused functions. " <-- see that par
21:32:34renesacor maybe you don't need it
21:32:56insomniacyeah, but that's code that runs at userspace
21:33:01insomniacso these options are not enough
21:33:13insomniac--gc:none removed the dependency on systemInit
21:34:05insomniacstill, I get a null ptr dereference, I'll fire up gdb
21:35:07insomniachah, got it, the .o has a nice lea 0x0(%ip), %rdi :)
21:35:39insomniacso, now it tracks back to the nim source
21:35:45insomniacwhere I declared an extern printk
21:35:48insomniacand called it
21:35:49Varriountreactormonk: If my suspicions are right, Araq is currently on a plane
21:42:47insomniacrenesac: I managed to call printk, even if still failing because of the ptr to the string to print
21:42:52insomniacnice one, thanks
21:43:33renesacyou are welcome
21:50:24*drewsrem joined #nim
21:50:50*Kingsquee quit (Remote host closed the connection)
21:51:15*Kingsquee joined #nim
21:53:50insomniacrenesac: is there any way to use C strings instead of NIM_CHAR ?
21:54:12insomniacrenesac: I found that it's trying to do printk(*str) where str is 12, which is the length of the string
21:54:27insomniacwhere the NIM_CHAR is a struct containing two items, the string length and the string itself
21:54:39insomniacI need to jump to the second element of the string
21:54:41renesacyou should take the pointer to the first element of the string
21:54:51insomniacis there a way using Nim's syntax?
21:54:53renesacaddr(str[0])
21:55:03renesacbefore the first element there is the lenght and capacity
21:55:26insomniacok, so imagine that I have a function, call it 'func' that takes a C string as parameter
21:55:30insomniacdeclred as extern
21:55:42insomniacand I want to do func("Hello world\n");
21:55:45renesaccstring may do it automatically for you
21:55:49insomniacfrom Nim
21:55:55insomniaccan you show me the docs?
21:55:57renesacI'm not sure
21:56:14insomniacnevermind, found it
21:56:21insomniacttp://nim-lang.org/docs/manual.html#types-cstring-type
21:56:49renesachttp://nim-lang.org/docs/backends.html#memory-management-strings-and-c-strings <-- also this
22:01:45*ozra joined #nim
22:01:58*pafmaf quit (Quit: Verlassend)
22:11:10*vendethiel quit (Ping timeout: 240 seconds)
22:29:12*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:30:24*Varriount quit (Ping timeout: 246 seconds)
22:53:32*drewsrem quit (Quit: Leaving)
23:04:49*boop is now known as boopisaway
23:23:32*Matthias247 quit (Read error: Connection reset by peer)
23:28:50*X67r quit (Quit: leaving)
23:41:16*Varriount joined #nim