<< 18-02-2015 >>

00:00:33*Matthias247 quit (Read error: Connection reset by peer)
00:01:54*brson quit (Client Quit)
00:05:24*qwr . o O ( clang C compiler is actually also quite good at cross-compiling, but getting suitable libc for linking is a bit of PITA... )
00:06:59kernasigood night :)
00:07:00*kernasi quit (Quit: Leaving)
00:12:56*Jehan_ quit (Quit: Leaving)
00:13:29*pregressive quit (Ping timeout: 256 seconds)
00:14:48*pregressive joined #nim
00:21:29*ololosha joined #nim
00:21:48*ololosha quit (Client Quit)
00:25:17*rapind quit (Remote host closed the connection)
00:29:22*pregressive quit (Ping timeout: 255 seconds)
00:32:01*HakanD______ joined #nim
00:37:20*Sharcho joined #nim
00:39:20*pregressive joined #nim
00:39:56*saml_ joined #nim
00:40:13*pregressive quit (Remote host closed the connection)
00:41:26*nande joined #nim
00:43:47*Sembei joined #nim
00:51:24*rapind joined #nim
00:53:45pipeepIs there a way to turn an iterator into an array or seq?
00:54:40pipeepoh, toSeq.
00:55:18*sillesta joined #nim
01:00:35*TEttinger joined #nim
01:04:41*NimBot joined #nim
01:05:06*pregressive joined #nim
01:08:11*Sharcho left #nim ("Leaving")
01:09:30*filwit quit (Quit: Leaving)
01:11:32*Jentel joined #nim
01:12:00JentelHello guys.I need your help in C# or Java. Have you idea how to finish that phrase: "The kit of methods-members in class is considering as ................. of class" ?
01:12:43flaviuJentel: Sorry, this channel is about Nim, not C# or Java.
01:16:24qwrJentel: try ##java channel
01:17:25flaviuJentel: Also, that sounds like a homework question. You should consider asking one of your classmates instead of random IRC channels.
01:19:05dhasenanWas wondering if Nim had a hint for unused imports, so I checked. Found a bug about it...nearly three years old. Maybe next year, then.
01:20:16Jentelflaviu , i know. Simply this is too specific qestion for me in finding a tutorial at that problem. May be you have any ideas ?
01:21:36def-dhasenan: that sounds like it wouldn't be that hard to implement. and would be useful to have
01:22:05dhasenandef-: I'm a bit too busy to be mucking about in unfamiliar compilers :)
01:22:20dhasenanMaybe next year.
01:24:36*pregressive quit (Remote host closed the connection)
01:24:39*rapind quit (Remote host closed the connection)
01:28:12*rapind joined #nim
01:31:59*HakanD______ quit (Quit: Be back later ...)
01:39:05*pregressive joined #nim
01:39:52wbJentel: maybe "interface" or "signature". But yeah, a C# or java channel would be better.
01:41:33Jentelthank you , wb.
01:48:21*lavender quit (Ping timeout: 264 seconds)
01:58:17*Woflox joined #nim
01:58:56*pregress_ joined #nim
02:00:26whitenoiseis this actually creating two procs, or is it just like the declarations in C?
02:00:31whitenoisehttps://www.irccloud.com/pastebin/P7Sdqkv1
02:01:10whitenoiseim guessing if it was creating two procs it would get onto me for trying to redefine the proc
02:01:37*pregressive quit (Ping timeout: 264 seconds)
02:02:17qwrwhitenoise: declaration. try to comment out the second one :)
02:03:14whitenoiseahh, Error: implementation expected :)
02:03:15*darkf joined #nim
02:03:15whitenoisecool
02:03:35*darkf quit (Changing host)
02:03:35*darkf joined #nim
02:06:29*lavender joined #nim
02:07:54*Jentel quit (Remote host closed the connection)
02:09:55*chemist69_ joined #nim
02:12:49*chemist69 quit (Ping timeout: 250 seconds)
02:13:33*JinShil quit (Quit: Konversation terminated!)
02:16:27*pregress_ quit (Ping timeout: 256 seconds)
02:23:13*pregressive joined #nim
02:26:10*pregressive quit (Remote host closed the connection)
02:26:46*pregressive joined #nim
02:31:11*pregressive quit (Ping timeout: 256 seconds)
02:39:15*ARCADIVS joined #nim
02:39:41*Trustable quit (Remote host closed the connection)
02:42:02*Cykacykacyka quit (Ping timeout: 265 seconds)
02:49:02*pregressive joined #nim
02:51:18*Woflox quit (Ping timeout: 244 seconds)
02:55:21*sillesta quit (Read error: Connection reset by peer)
03:15:14*Woflox joined #nim
03:20:23*saml_ quit (Quit: Leaving)
03:27:40*johnsoft quit (Ping timeout: 252 seconds)
03:28:01*johnsoft joined #nim
03:32:24*pregressive quit (Ping timeout: 250 seconds)
03:39:04*pregressive joined #nim
03:51:35*reem quit (Remote host closed the connection)
03:54:35*Demos quit (Read error: Connection reset by peer)
04:03:57*pregressive quit (Ping timeout: 264 seconds)
04:07:13*rapind quit (Remote host closed the connection)
04:08:57*rapind joined #nim
04:09:11*pregressive joined #nim
04:13:30*rapind quit (Ping timeout: 252 seconds)
04:19:43*gmpreussner|work quit (Read error: Connection reset by peer)
04:20:27*gmpreussner|work joined #nim
04:31:55*TEttinger quit (Ping timeout: 255 seconds)
04:32:33*HakanD______ joined #nim
04:35:38*Demon_Fox joined #nim
04:36:47*HakanD______ quit (Ping timeout: 246 seconds)
04:43:31*banister joined #nim
04:46:24*nimnoob123 joined #nim
04:49:26*pregressive quit (Ping timeout: 252 seconds)
04:49:34nimnoob123Hey, could anyone recommend me a good place/book to learn functional programming
04:51:49*pregressive joined #nim
04:52:07*reem joined #nim
04:56:46*reem quit (Ping timeout: 252 seconds)
04:56:52dhasenannimnoob123: There's Learn You a Haskell for Great Good, though I couldn't follow it myself.
04:57:24dhasenanI learned FP from creating a text adventure thing (like Twine) in Elm.
04:59:20nimnoob123i'll check it out, coming from oo programming, I'm so used to using class methods in other class methods w/out having to worry about order and what not. nim's like this atm (I heard eventually there's a possibility after 1.0 that class methods would work like that, unsure though)
04:59:47nimnoob123i like the way nim looks though so I want to adapt, maybe even become a better programmer
05:00:53*Demon_Fox quit (Quit: Leaving)
05:01:51nimnoob123plus nim's sdl/opengl lib binding syntax looks better in nim than it does in rust. ;p
05:01:52dhasenanWhile Nim supports functional programming, it isn't a functional programming language. Are you trying to learn how to program in a less object oriented way, suitable for Nim?
05:02:13nimnoob123exactly dhasenan
05:02:39dhasenanSo Learn You a Haskell is not the place to go.
05:03:11dhasenanReally, you can just code like you would in Java, except if you notice that a class doesn't have any state, you rewrite it as not-a-class.
05:03:13nimnoob123what would you recommend? or just checking project source out would be a better option that uses nim
05:04:01dhasenanJust start coding.
05:04:29nimnoob123on that thought, does github show nim as nim or nimlang now or is it still listing projects under nimrod?
05:04:32nimnoob123though*
05:09:40*rapind joined #nim
05:13:56*rapind quit (Ping timeout: 246 seconds)
05:20:31*pregressive quit (Ping timeout: 255 seconds)
05:24:06*pregressive joined #nim
05:26:27dtscodeis there something in the stdlib like pythons split, which has a max number of splits?
05:26:34dtscodeor rather, can have
05:51:20*pregressive quit (Ping timeout: 246 seconds)
06:00:04*pregressive joined #nim
06:00:45*Demon_Fox joined #nim
06:01:27*pregressive quit (Remote host closed the connection)
06:02:53*nande quit (Remote host closed the connection)
06:08:40*reem joined #nim
06:10:22*bjz joined #nim
06:13:09*reem quit (Ping timeout: 250 seconds)
06:14:52*bjz quit (Client Quit)
06:30:22*Woflox quit (Ping timeout: 244 seconds)
06:31:16nimnoob123"Later versions of the language may get rid of the need for forward declarations." is that true?
06:32:20dhasenanAraq has said that he wants to make it happen, but there are some non-obvious interactions with metaprogramming that make it difficult.
06:32:52dhasenanEr, I don't actually know whether Araq uses masculine pronouns. Adjust previous sentence accordingly.
06:33:20nimnoob123lol
06:33:35nimnoob123thanks
06:33:35dhasenanI don't see anything funny about that.
06:33:44nimnoob123i was laughing at the 2nd line
06:34:15dhasenanYes. I don't see anything funny about that.
06:34:55nimnoob123and we'll leave it there
06:35:39*johnsoft quit (Ping timeout: 245 seconds)
06:36:27*johnsoft joined #nim
06:37:38*reem joined #nim
06:37:41dhasenanGender is a part of people's identity that they tend to take quite seriously. It's also pervasive in most languages. Making unwarranted assumptions about people's gender can annoy and upset them. I see no reason to laugh about someone attempting not to annoy or upset people.
06:45:21*gsingh93_ joined #nim
06:46:53*bjz joined #nim
06:49:55*reem quit (Remote host closed the connection)
06:50:33*reem joined #nim
06:51:10*ChrisMAN quit (Ping timeout: 252 seconds)
06:53:00*fizzbooze quit (Ping timeout: 252 seconds)
07:07:16ekarlsoso devel doesn't build atm on osx..
07:07:39ekarlsohttps://bpaste.net/show/6a879c2fc7a1
07:11:10*fuddydud112 joined #nim
07:11:21*fuddydud112 quit (Client Quit)
07:13:59*lavender quit (Ping timeout: 250 seconds)
07:25:20*BlaXpirit joined #nim
07:27:25*gsingh93_ quit (Quit: WeeChat 1.1.1)
07:27:39*gsingh93_ joined #nim
07:32:05*gsingh93_ quit (Ping timeout: 256 seconds)
07:34:52*avshalom quit (Ping timeout: 240 seconds)
07:48:43def-ekarlso: are you using the right compiler version (from csources) to build it?
08:17:27nimnoob123is there a place to follow the changes since 0.10.2? (nightly)
08:18:57*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:21:10fowltheres a change log somewhere
08:21:37fowli cant find it
08:21:53ekarlsodef-: I just git clone and bash build.sh
08:23:13ekarlsooh def- nvm
08:24:52*kashyap_ quit (Ping timeout: 246 seconds)
08:25:10ekarlsois there a buffer read thing in nim ?
08:27:01fowlsystem.readbuffer()?
08:27:02gokrGood morning
08:27:16ekarlsofowl: ok
08:27:18ekarlso:P
08:29:12*HakanD______ joined #nim
08:31:03nimnoob123took me an hour to figure out that i had to mark my imported object properties with an asterisk if i wanted to access the value from a method, the tut made it seem like it imported the whole object type (excluding methods)
08:32:16*Demon_Fox quit (Quit: Leaving)
08:33:15gokrdhasenan: Araq is Andreas Rumpf, has wife and two kids. And although those are simply indicators :) he doesn't complain when referred to as "he" :)
08:33:57*HakanD______ quit (Ping timeout: 264 seconds)
08:34:07gokrnimnoob123: Btw, have you seen my articles? And the... nim by example site?
08:34:29nimnoob123not sure if i seen your articles
08:34:38gokrhttp://goran.krampe.se/category/nim
08:34:47fowlnimnoob123, dont feel bad, i still learn new things when i look at the manual and i've been using nim for years
08:35:12*gokr perhaps I should make that Nim article list today that I have started like 7 times... :)
08:35:13nimnoob123http://nim-by-example.github.io/oop/ I did read this, but it doesn't talk about that issue i had
08:35:45gokrnimnoob123: Oh, and you want to do game programming?
08:36:09nimnoob123how'd you know ;o?
08:36:16gokrIf so, then the Urhonimo project we just released should be perfect.
08:36:28gokr(I read the log)
08:36:58nimnoob123on gh?
08:37:10nimnoob123trying to figure out why my webchat stopped autoscrolling
08:37:26gokrhttp://forum.nim-lang.org/t/870
08:38:04gokrAnd for a taste: https://www.youtube.com/watch?v=-T0MrJkLB8Y
08:39:00nimnoob123ah I've never head of this, i've been playing with sdl2/c++ before nim/rust - looked at nim first a while back and tip toed in rust, but there's some things i don't like about the look of the syntax now im back 'home' I guess lol
08:39:45nimnoob123looks coolt hough (that demo)
08:40:09gokrThat demo is 595 lines of code.
08:40:30*johnsoft quit (Ping timeout: 250 seconds)
08:40:45*czr joined #nim
08:41:08czrhi all. was trying to find some information on the history on the language on nim-lang.org, but failed. any ideas where to look for it?
08:41:13*delian66 quit (Ping timeout: 255 seconds)
08:41:14nimnoob123dang
08:41:15*johnsoft joined #nim
08:41:38gokrczr: Hmmm, newly surrected wikipedia page perhaps
08:41:40*delian66 joined #nim
08:42:08czrnigerian institute of management? :--)
08:42:09nimnoob123thanks for the links gokr, but I have to wake up in about 5 hours to work :( lost track of time
08:42:19czrthanks gokr
08:42:20gokrnimnoob123: No prob! :)
08:42:23gokrczr: http://en.wikipedia.org/wiki/Nim_(programming_language)
08:42:40gokrI do know Araq estimates the "start" of Nim to be 2006.
08:42:42*nimnoob123 quit (Quit: Page closed)
08:42:43fowlgokr, why do you need to emit the code in character.nim (the attribute stuff couldnt be a macro?)
08:42:58gokrAsk Araq. He intends to fix that though.
08:43:01gokrI am not sure.
08:43:40gokrfowl: Did you pull btw? I made huge.nim yesterday, and also added stuff in sample.nim (reusable stuff)
08:43:53gokrAlthough huge.nim doesn't compile without a silly hack in cgen.nim
08:45:12fowldo you need a LogicComponent subclass that you can access from nim? or is the plan to make inheritance work with c++ classes?
08:45:21gokrThe plan is to make it work
08:45:36fowlcool
08:45:54gokrYup! In fact, this C++ support may turn into a killer argument for Nim IMHO.
08:46:37gokrfowl: Let me know if you want that silly hack to compile huge.nim, otherwise I guess Araq will fix it as soon as he pops up.
08:46:58fowlwould you mind if i copied some stuff out to onionhammer 's clibpp, id like to take cnew() and offsetof()
08:47:35gokrI don't mind, its MIT
08:47:42gokrAnd well, its Araq's baby
08:48:01gokrBut I mean, its MIT ;)
08:48:20gokrclibpp?
08:48:34fowlhttps://github.com/onionhammer/clibpp
08:48:59*vegai left #nim (#nim)
08:49:46gokrOk, so... it wraps C++ classes?
08:51:40fowlyea
08:52:08*HakanD______ joined #nim
08:53:44Araqmorning guys
08:53:56Araqugh ... I hate it when the bug detection code has a bug ...
08:54:09gokrMorning! Feeling better?
08:54:18Araqall the knowledge I gained is worthless
08:54:30Araqsince I have a bug in my bug detection
08:54:35Araqgokr: a little
08:56:37fowlgm
08:57:52*wb quit (Ping timeout: 240 seconds)
09:05:27*gsingh93 quit (Quit: Connection closed for inactivity)
09:10:20*dumdum joined #nim
09:11:07*teapot1 joined #nim
09:12:17*chemist69_ quit (Quit: WeeChat 1.1.1)
09:12:44*reem quit (Remote host closed the connection)
09:12:50*chemist69 joined #nim
09:21:34*reem joined #nim
09:38:05*ARCADIVS quit (Quit: ARCADIVS)
09:43:45ekarlsois there any smart way if you have a enum of ints to map int > enum ?
09:46:11*pafmaf joined #nim
09:46:40def-ekarlso: what's an enum of ints?
09:47:08ekarlsodef-: like T: enum foo = 1 bar = 2
09:47:37BlaXpiritT(1) ???
09:47:50ekarlsogawd, im so stupid :D
09:48:42ekarlsoso I got a package, src/exceptions.nim and src/foo/bar.nim can I import exceptions somehow in bar.nim ?
09:49:24def-that type conversion to enum is pretty nice. throws a compile time error if it can, otherwise a runtime range error (if range errors enabled)
09:49:56BlaXpiritsrc/exceptions.nim is probably not good
09:50:29ekarlsoBlaXpirit: how else ?
09:50:30def-ekarlso: i guess "import ../bar" doesn't work? you can choose to include another directory into the path like i did here: https://github.com/def-/nim-brainfuck/blob/master/tests/nim.cfg (path = ...)
09:50:37*kuzy000_ joined #nim
09:56:10ekarlsodef-: didnt seem to help :/
10:01:40ekarlsowhat's a pattern for tests atm ?
10:02:50*HakanD______ quit (Quit: Lingo: www.lingoirc.com)
10:06:12def-I hope the one I have there is fine, it's also described in http://howistart.org/posts/nim/1
10:07:58*Cykacykacyka joined #nim
10:15:41*zahary1 joined #nim
10:16:38*zahary quit (Read error: Connection reset by peer)
10:18:12Araqgmpreussner|work: good news, I fixed #2125, but how it ever worked remains a mystery ...
10:25:44*rapind joined #nim
10:30:25*rapind quit (Ping timeout: 264 seconds)
10:31:17ekarlsowhat exception is raised if you Enum(1) and it's out of range ?
10:31:56BlaXpirittry
10:32:13ekarlsoI tried using ValueError but :'
10:34:51BlaXpiritwell if you can't be bothered to try
10:34:54BlaXpiritthere you go: RangeError
10:36:52Araqekarlso: you shouldn't catch that, it's gone in release mode, you should write a range check on your own like so:
10:37:31Araqif x < low(Enum).int or x > high(Enum).int: fatal "int value out of range"
10:47:30*BlaXpirit quit (Quit: Quit Konversation)
10:48:41ekarlsoAraq: and if you want to raise a custom exc instead of rangeerror ?
10:48:54*banister joined #nim
10:49:00*banister quit (Max SendQ exceeded)
10:49:17Araqa custom exc for a programming bug?
10:55:01*avshalom joined #nim
10:56:19*gokr quit (Quit: Leaving.)
10:58:10*gokr joined #nim
10:58:37*antrix joined #nim
11:14:08*davidhq joined #nim
11:16:03*davidhq quit (Read error: Connection reset by peer)
11:16:38*davidhq joined #nim
11:19:27*antrix quit (Quit: Leaving)
11:22:01*TEttinger joined #nim
11:26:29*rapind joined #nim
11:30:52*rapind quit (Ping timeout: 255 seconds)
11:33:06*reem quit (Remote host closed the connection)
11:42:33*rapind joined #nim
11:55:04*sillesta joined #nim
12:00:38*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:06:12*Cykacykacyka quit (Ping timeout: 244 seconds)
12:21:13*davidhq joined #nim
12:26:24*rapind quit (Remote host closed the connection)
12:45:27*dumdum quit (Ping timeout: 256 seconds)
12:48:06*banister joined #nim
12:49:25*jfchevrette joined #nim
12:52:57*akiradeveloper joined #nim
12:53:52akiradeveloperhello
12:55:03akiradevelopera small example fails https://github.com/akiradeveloper/nim-is-fun/blob/master/tmode.nim  33206'u32 can't be converted to TMode but I believe it can because TMode is cint that's enough wide for that value.
12:55:30akiradevelopervalue out of range?
12:55:32akiradeveloperwhy?
12:58:28*jfchevrette quit (Quit: My Mac has gone to sleep. ZZZzzz…)
13:01:55TEttingerunsigned/signed difference?
13:02:02TEttingerI'm not sure either
13:02:10TEttinger(I just got here)
13:05:55*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:13:22*rapind joined #nim
13:14:49*dumdum joined #nim
13:15:42*wb joined #nim
13:27:49*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:29:08*BlaXpirit joined #nim
13:32:17*untitaker quit (Ping timeout: 250 seconds)
13:33:05*rapind quit (Remote host closed the connection)
13:37:46*untitaker joined #nim
13:40:43*rapind joined #nim
13:43:09*Trustable joined #nim
13:43:30*Trustable quit (Remote host closed the connection)
13:43:41*infinity0 joined #nim
13:44:45*rapind quit (Remote host closed the connection)
13:45:00infinity0federico3: i'm done for now tweaking the debian package, you can review/release when you want to
13:47:02*Trustable joined #nim
13:48:12*rapind joined #nim
13:49:25*dyu joined #nim
13:53:10*rapind quit (Ping timeout: 264 seconds)
13:57:19dyuAnybody here able to successfully compile/run nim on freebsd 9.x?
13:57:50dyuI get this error on `sh build.sh` - http://pastebin.com/1Vj58Qr1
13:58:34Araquse a real OS which has headers that do not depend on #include orders
14:00:07*BlaXpirit quit (Read error: Connection reset by peer)
14:01:22dyuAraq: i use linux, I'm just trying to run nim on my freenas box
14:01:39*BlaXpirit joined #nim
14:09:18*MajorWork quit (Quit: Leaving)
14:09:33Araqdyu: so report it to the BSD guys.
14:11:51AraqI'm tired of the tremendous amount of hacks that are required for Poonix.
14:12:16*Araq just pulled another fix for some missing POSIX_SPAWNV flag
14:21:13*akiradeveloper quit ()
14:27:08*avshalom quit (Remote host closed the connection)
14:27:26*Netfeed left #nim ("WeeChat 0.3.0")
14:29:29*pregressive joined #nim
14:30:07*banister joined #nim
14:31:36*chemist69 quit (Quit: WeeChat 1.1.1)
14:31:55*chemist69 joined #nim
14:32:14*chemist69 quit (Client Quit)
14:32:24*chemist69 joined #nim
14:33:43*reem joined #nim
14:35:43*sillesta quit (Remote host closed the connection)
14:36:33*sillesta joined #nim
14:36:39*jfchevrette joined #nim
14:38:22*reem quit (Ping timeout: 240 seconds)
14:40:58*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:41:06*rapind joined #nim
14:43:44*chemist69 quit (Quit: WeeChat 1.1.1)
14:44:46*chemist69 joined #nim
14:45:17*chemist69 quit (Client Quit)
14:46:08*chemist69 joined #nim
14:46:25*chemist69 quit (Client Quit)
14:47:13*chemist69 joined #nim
14:50:32*chemist69 quit (Client Quit)
14:52:12*JinShil joined #nim
14:53:17*chemist69 joined #nim
14:54:25*chemist69 quit (Client Quit)
14:56:36*chemist69 joined #nim
14:56:47ekarlsoAraq: poonix ?
14:57:20*ChrisMAN joined #nim
14:57:32Araqekarlso: yes, I really don't like Unix. learn to deal with it.
15:00:42TEttingerit's better than only supporting Unix, like so many other language devs
15:01:29TEttinger"well we couldn't figure out how to do anything on windows so we won't support most PCs that run it, that's ok for you right language user?"
15:03:21ekarlsoAraq: what OS you on then ?
15:10:31*dumdum quit (Ping timeout: 256 seconds)
15:10:55*MyMind joined #nim
15:12:15*Sembei quit (Ping timeout: 252 seconds)
15:15:39*banister joined #nim
15:25:28dom96_Araq: Don't be mean to the BSD users.
15:25:41*darkf quit (Quit: Leaving)
15:27:07Araqdom96_: I'm not mean to any *user*. but in 2015 it has to be possible to not be a fan of a design stemming from the 70ies, no matter how successful it has been.
15:27:49dom96_Araq: Telling somebody to use a "real OS" is a bit mean.
15:28:07*davidhq joined #nim
15:39:57*pregressive quit (Ping timeout: 250 seconds)
15:40:17*pregressive joined #nim
15:40:56*nimthusiast joined #nim
15:41:02Araqso how do you call an OS where "INADDR_ANY" doesn't work out of the box? it certainly is not "operating".
15:43:26*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:46:57*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:48:47shevyhah!
15:48:50shevyBSD guys
15:48:56shevyuse linux guys
16:02:55novistlinux people say "systemd! time to migrate to BSD!"
16:10:40infinity0there's good and bad things about systemd
16:10:46infinity0hopefully the bad things will go away in 4-5 years
16:12:41gokrdyu: Don't mind Araq, he's just a bit grumpy and ranting sometimes. ;)
16:13:15dyugokr: heh, never did :-)
16:14:37*alexanderkyte quit (Ping timeout: 272 seconds)
16:15:06*pregress_ joined #nim
16:15:18infinity0does nim code compile into shared libraries?
16:15:41*pregressive quit (Ping timeout: 256 seconds)
16:16:28gokrYep
16:16:57dyushevy: I do use linux, I only use freebsd for zfs
16:17:22dyumainly for backups
16:20:00*JinShil quit (Quit: Konversation terminated!)
16:20:56*pregress_ quit (Remote host closed the connection)
16:21:41*pregressive joined #nim
16:27:06*pregressive quit (Remote host closed the connection)
16:28:04*pregressive joined #nim
16:39:15ekarlsohow do you do sockets with nim ?
16:40:22*davidhq joined #nim
16:40:36ldleworkekarlso: http://nim-lang.org/net.html ?
16:41:09*kniteli quit (Quit: Leaving)
16:41:31ekarlsowhat's the equiv of http://doc.rust-lang.org/0.12.0/std/io/struct.BufferedReader.html in nim ?
16:43:02wtwdyu: that's a problem stemming from some obsolete definition/use in freebsd's netinet/in.h, I believe someone solved it by adding an equivalent of #define uint32_t u_int32_t
16:43:25wtwdyu: to the csources or so, I don't remember
16:45:22ldleworkekarlso: I'm pretty sure the socket in the net module already supports buffering
16:47:03*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
16:49:29*Matthias247 joined #nim
16:52:46reactormonkdom96_, what's the correct behaviour of split then?
16:53:13dom96_reactormonk: the one you saw
16:53:22reactormonkok
16:53:45dom96_but i dunno, check if it's the same in other languages
16:56:39ekarlsoanyone done any dns stuff yet in nim ?
16:58:02*gokr_ joined #nim
16:58:47*pregressive quit (Remote host closed the connection)
17:06:52*zahary1 quit (Read error: Connection reset by peer)
17:07:53*gsingh93 joined #nim
17:09:18*zahary joined #nim
17:10:53*panzone joined #nim
17:12:08*pregressive joined #nim
17:13:42reactormonkuhm, why isn't result var?
17:13:57ldleworkwhat?
17:14:18reactormonkldlework, tried to pass result to another function as var seq
17:14:29*stonecolddevin left #nim (#nim)
17:14:32ldleworkI see
17:15:26reactormonkldlework, should that be possible?
17:16:13ldleworkWell, I at least agree that its reasonable to try to pass result to some other function.
17:16:24ldleworkShould it work right now, no idea.
17:17:33reactormonkhm.
17:17:34*nimthusiast quit (Ping timeout: 246 seconds)
17:17:42reactormonkoh, wrong type. IT does work.
17:18:40*Boscop_ joined #nim
17:20:33*Boscop joined #nim
17:20:33*Boscop quit (Changing host)
17:20:33*Boscop joined #nim
17:21:24ldleworkhehe
17:21:47*Boscop__ quit (Ping timeout: 250 seconds)
17:23:15*Boscop_ quit (Ping timeout: 250 seconds)
17:23:33*nimthusiast joined #nim
17:24:51*nande joined #nim
17:26:32*Boscop quit (Ping timeout: 265 seconds)
17:28:25*teapot1 quit (Ping timeout: 246 seconds)
17:30:03reactormonkhow do I get the pointer of a cstring? cast[uint](ptr cstring) or cast[uint](cstring)
17:30:32BlaXpiritreactormonk, are you sure you want the number
17:30:41reactormonkBlaXpirit, yes
17:30:54BlaXpiritit should be cast[uint](cstring)
17:31:03BlaXpiritor maybe [int] who knows
17:31:34BlaXpiritthat's probably wrong, but i've seen it somewhere
17:31:41reactormonkBlaXpirit, nah, pointers are uint
17:36:52*filwit joined #nim
17:45:49reactormonkAny way I can pass strings generated by a template to {.emit.}?
17:45:58*gsingh93 quit (Quit: WeeChat 1.1.1)
17:46:49*gsingh93 joined #nim
17:46:55reactormonk{.emit: "action `$tokentype & "_e"` { `$tokentype & "_e"`(p)}"} <- any way I can run this in a template?
17:47:09*gsingh93 quit (Client Quit)
17:47:35*banister joined #nim
17:47:47*gsingh93 joined #nim
17:48:23filwitreactormonk: idk, but have you tried making a macro which ouputs an emit pragma?
17:48:39*gsingh93 quit (Client Quit)
17:48:50reactormonkfilwit, nope. Any way I can ask the compiler how a macro would look like?
17:48:59*gsingh93 joined #nim
17:49:25*gsingh93 quit (Client Quit)
17:49:33filwitreactormonk: import macros; dumptree: {.emit: "...".}
17:49:39reactormonkAnd can I call a macro inside a template?
17:49:41filwitreactormonk: ^ untested
17:49:48reactormonklet' see
17:50:11filwityes you should be able too. I'm not sure of the limitations here, it's just a suggestion
17:50:39reactormonkworks
17:50:46reactormonklet's see if it works inside the template too
17:51:13reactormonkpretty sure Araq's going to facepalm at my code at least once ;-)
17:52:06reactormonkfilwit, http://sprunge.us/gWjI <- any documentation what I do with that?
17:54:02filwitreactormonk: first time working with macros?
17:54:13reactormonkfilwit, yup. been using templates so far.
17:54:32filwitreactormonk: this is basically the pragma as the compiler sees it (the AST structure)
17:54:52filwitso basically you need to reverse engineer it to emit your own
17:54:57filwitone sec, let me make you a gist
17:55:21reactormonkhm.
17:56:40*gsingh93 joined #nim
17:58:19*rkj-b joined #nim
18:00:04reactormonkfilwit, I think I got a simpler solution, let's see if it compiles... let ename = $tokentype & "_e" {.emit: "foo $ename".}
18:00:24reactormonkwait, string stuff doesn't really work that way in nim :-/
18:01:01*gokr_ quit (Ping timeout: 264 seconds)
18:02:30*gokr_ joined #nim
18:02:55reactormonkhm, with a bit of tinkering, it does.
18:04:01filwitreactomonk: https://gist.github.com/PhilipWitte/f094f8894df2d0003b98
18:04:09filwitreactormonk: ^
18:04:15*gmpreussner|work quit (Ping timeout: 244 seconds)
18:04:26reactormonkfilwit, nice
18:04:35filwit:)
18:04:47filwityes they are very powerful
18:05:18reactormonkmail.nim(40, 26) Error: cannot evaluate at compile time: token
18:05:21reactormonk:-(
18:05:47reactormonkhttp://sprunge.us/DCfS
18:06:01filwitgive me a sec
18:06:38reactormonksure
18:06:48filwiti don't see a macro in this code
18:06:59filwitand it's hard to see what line you're talking about in that
18:08:10reactormonkjust curl -O mail.nim http://sprunge.us/DCfS && nim --compileOnly c mail.nim
18:08:19dyuwtw: thanks, I'll shall try that
18:08:21*dyu quit (Quit: later!)
18:08:53*fizzbooze joined #nim
18:10:45filwitreactormonk: the problem is you're looping over a enum at runtime. The template just lowers to runtime code, it does not evaluate at compile-time like a macro does
18:11:20*panzone quit (Ping timeout: 252 seconds)
18:11:44filwitreactormonk: a macro executes on Nim's virtual machine at compile time... a template only sort-of does that (it will inject things at compile-time, but the then it just injects the result as runtime code)
18:11:57*panzone joined #nim
18:12:09reactormonkfilwit, so I need a macro instead of a template here?
18:12:13filwityes
18:12:27filwitbut things need to change a bit for that to work
18:12:31reactormonk:-/
18:12:36filwitlet me see if I can't fix it up to show you
18:12:51reactormonk
18:13:00reactormonk... gotta fix that unicode
18:13:13filwitthe heart comes through on my end
18:14:02reactormonknot here. :-(
18:14:12filwitmaybe it's just a font issue
18:14:27reactormonkmayb,e gotta check
18:23:26TEttingerI see a heart
18:24:31*gsingh93 quit (Quit: WeeChat 1.1.1)
18:25:57*gsingh93 joined #nim
18:26:13reactormonkperfect
18:34:00*gsingh93 quit (Quit: WeeChat 1.1.1)
18:34:22*gsingh93 joined #nim
18:35:10*panzone quit (Ping timeout: 252 seconds)
18:38:36*gsingh93 quit (Client Quit)
18:38:53*gsingh93 joined #nim
18:40:12*gsingh93 quit (Client Quit)
18:40:29*gsingh93 joined #nim
18:44:34filwitreactormonk: almost have it working, but I'm not sure what's going on with the line: "Event(tokentype: TokenType, ..."
18:44:49reactormonkfilwit, object construction
18:45:08filwitreactormonk: you cannot pass type `TokenType` to Event's tokenType field
18:45:24reactormonkfilwit, oops
18:45:51reactormonk container.add(Event(tokentype, position, enter))
18:45:54filwitif i make that 'comment' or something it compiles but fails on my system (to be expected)
18:45:59reactormonkor
18:46:01reactormonk container.add(Event(tokentype: tokenType, position: position, eventtype: enter))
18:46:22filwitk, one sec
18:46:30*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:46:33reactormonkfilwit, it's supposed to be the tokentype that's passed in via iteration
18:48:27*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
18:51:34filwitreactormonk: okay, this code gets past all the macro stuff, but doesn't fully compile on my system (expected): https://gist.github.com/PhilipWitte/fb32e7c63a47fb26506b
18:52:17reactormonkfilwit, cool, thanks
18:52:20filwitreactormonk: let me know if you can adapt that to your real code. The only part that's failing is with line 33
18:52:39reactormonkfilwit, not unexpected, it's supposed to be passed through ragel
18:53:07filwitreactormonk: yeah I wasn't expecting it to fully work on my machine
18:53:33filwitreactormonk: which is why i want to know if it works for you :) (so i know i got it right)
18:54:14*Woflox joined #nim
18:55:48reactormonkfilwit, kinda works, how do I get rid of the nimln ... code?
18:56:07reactormonkand btw, it's not replacing `token`
18:57:07filwitreactormonk: i updated the gist a tad (cleaner code with the emit `token`_s thing)... not sure what you mean by "nimln ... code"
18:57:42*nande quit (Read error: Connection reset by peer)
18:57:49filwitreactormonk: about it not replacing token... i just realized that.. it will be dropping the identifier "token" for each loop... one sec
18:57:53reactormonkfilwit, take a look at the generated c code
18:58:17reactormonkyou'll need to add a echo(parse("foobar"))
18:58:42ekarlsois the nim website auto deployed or ?–––
18:58:47ekarlsoa'la puppet or so managed ?
18:59:42filwitekarlso: i don't know for sure, but I doubt it. It's probably just uploaded via ftp. You'll have to ask Araq or dom96 to be sure.
19:00:14def-ekarlso: manually. dom96 should update it again, please
19:00:58*gsingh93 quit (Quit: WeeChat 1.1.1)
19:01:06ekarlsowhaaa
19:01:12ekarlsold: symbol(s) not found for architecture x86_64
19:01:16ekarlsoon osx :/
19:01:56filwitreactormonk: i'm going to have to call it quits on this I think. I need to do other things now. But the problem with it generating `token` is due to the lines 19-21... the `$token` is literally turning "token" into a string a making a identifier out of that
19:02:04*gsingh93 joined #nim
19:02:25reactormonkfilwit, hm.
19:02:28filwitreactormonk: if you're still having problems later I can try to help (or another person here can help you resolve that)
19:02:29reactormonkI'll take a look then
19:02:35filwitsorry, good luck
19:03:17ekarlsodunno why it fails :/
19:03:36filwitreactormonk: try using `token.repr` instead of `$token`... might do the same thing but i'm not sure.
19:04:51reactormonkfilwit, no, the iToken is fine. it's the string replacement in emit.
19:08:35*davidhq joined #nim
19:10:37*nimthusiast quit (Ping timeout: 246 seconds)
19:16:53*mahlon joined #nim
19:18:16*gsingh93 quit (Quit: WeeChat 1.1.1)
19:19:47*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
19:28:23*Hakaslak joined #nim
19:32:02*filwit quit (Quit: Leaving)
19:34:36*UberLambda joined #nim
19:37:06*jholland quit (Quit: Connection closed for inactivity)
19:41:45*pregressive quit (Remote host closed the connection)
19:42:59*kniteli joined #nim
19:43:35*rapind quit (Remote host closed the connection)
19:46:11*brson joined #nim
19:52:56*Hakaslak quit (Quit: TODO: Generate 'Computer Sleep Quit Message')
19:54:03*gsingh93 joined #nim
19:54:11*gsingh93 quit (Client Quit)
19:54:49*nimthusiast joined #nim
20:14:17*kjo1 joined #nim
20:15:49kjo1Can I use map to convert an array of things from one type to another? bytearray.map(chr) and bytearray.map(char) are both giving me some trouble.
20:16:11kjo1(it works if I create an explicit lambda proc)
20:17:52def-kjo1: the problem is that these procs are not defined as closures, so you can't use them in map directly
20:18:24kjo1ah ok, thanks def-
20:18:46def-inside of a module it works without specifying a proc as {.closure.}, but not when importing another module
20:22:03*banister joined #nim
20:22:38*reem joined #nim
20:28:41kjo1I need to read up more on the calling conventions
20:30:50kjo1just started learning nim, and I am coming to realize the pragma's are quite important. Got bit by a missing .bycall. pragma in some code that called out to a C library. ouch.
20:34:00*Cykacykacyka joined #nim
20:40:27kjo1Does anyone know if there is a nim module similar to python's struct string unpacking module? Kind of the opposite of strfmt?
20:41:34*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:42:23*Cykacykacyka quit (Remote host closed the connection)
20:42:38def-kjo1: i don't think I've seen something like that,but would be nice to have
20:44:30*infinity0 quit (Remote host closed the connection)
20:44:43*infinity0 joined #nim
20:51:20kjo1def- question about the closure/module business
20:51:26kjo1I noticed this example
20:51:30kjo1https://github.com/Araq/Nim/blob/master/examples/maximum.nim
20:51:43kjo1does that work b/c parseInt does have a {.closure.}
20:51:45kjo1?
20:53:00*rkj-b quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805])
20:54:48def-ehm, it's {.procvar.}, not closure, my bad. but yes
20:56:43*infinity0 quit (Ping timeout: 250 seconds)
20:57:35*jfchevrette quit (Quit: Textual IRC Client: www.textualapp.com)
20:58:23*UberLambda quit (Quit: Leaving the Matrix)
21:00:23*Jesin quit (Quit: Leaving)
21:01:32*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:01:43*infinity0 joined #nim
21:01:45def-closure was for iterators
21:02:14kjo1I see
21:02:18kjo1what's the magic pragma about?
21:02:34kjo1comparing chr with parseInt
21:02:36kjo1proc chr(u: range[0 .. 255]): char {.magic: "Chr", noSideEffect.}
21:02:47kjo1proc parseInt(s: string; number: var int; start = 0): int {.gcsafe,
21:02:47kjo1 extern: "npuParseInt", noSideEffect, raises: [OverflowError], tags: [].}
21:03:26def-kjo1: "magic" just means the compiler will do something magical to make it work and no implementation is given there
21:04:52kjo1apt name then :)
21:05:49*Jesin joined #nim
21:09:58*kjo1 quit (Quit: Leaving.)
21:22:42*sampwing joined #nim
21:29:22*dv- quit (Ping timeout: 255 seconds)
21:34:51*dv- joined #nim
21:38:39*nande joined #nim
21:39:42*davidhq joined #nim
21:44:29*reem quit (Remote host closed the connection)
21:45:28*kuzy000_ quit (Ping timeout: 252 seconds)
21:48:27*fizzbooze quit (Ping timeout: 250 seconds)
21:48:30*reem joined #nim
21:50:13*reem quit (Remote host closed the connection)
21:52:56*Mat4 joined #nim
21:52:59Mat4hi all
21:54:38*reem joined #nim
22:02:08*nimthusiast quit (Quit: Page closed)
22:02:35*kuzy000_ joined #nim
22:03:23*RayoGundead joined #nim
22:07:18*Matthias247 quit (Read error: Connection reset by peer)
22:11:07*rapind joined #nim
22:14:20*gmpreussner|work joined #nim
22:26:36*reem quit (Remote host closed the connection)
22:35:18*pregressive joined #nim
22:35:39*reem joined #nim
22:37:21*BlaXpirit quit (Quit: Quit Konversation)
22:40:26*gokr quit (Ping timeout: 246 seconds)
22:40:31*gsingh93 joined #nim
22:40:31ekarlsohow in unittests can u check that exceptions are raised ? is there any special tool or just try /exc ?
22:40:38*gsingh93 quit (Client Quit)
22:41:31def-ekarlso: expect(IndexError) according to the documentation
22:41:44Mat4ciao
22:41:47*gokr_ quit (Ping timeout: 246 seconds)
22:41:58*Mat4 quit (Quit: Verlassend)
22:43:24*shalabh joined #nim
22:44:08shalabhhello
22:44:19def-welcome, shalabh
22:44:39shalabhso who's managing the gsoc 2015 application this year?
22:44:45shalabhhi def-
22:44:59def-that's me with araq as backup admin
22:46:18shalabhdid you find a voucher yet?
22:46:37def-no, unfortunately not
22:46:44shalabhis it too late?
22:46:54def-no, still have 2 days
22:47:08shalabhI can vouch for you, but what does it mean?
22:47:13*rapind quit (Remote host closed the connection)
22:47:27def-That's nice! Do you work at google?
22:47:32shalabhyes
22:47:39*kuzy000_ quit (Ping timeout: 252 seconds)
22:48:52reactormonkConnected from a google IP, looks legit to me.
22:49:28def-Hm, can't find anything official about what it means
22:50:07shalabhWell lets put me down and we'll see. I think it just means 'I think these guys are a legit org doing good work that deserves gsoc'
22:50:22def-My understanding is that you say that we're an interesting project and worthy of participating in gsoc
22:50:34*gokr joined #nim
22:50:42reactormonkshalabh, so it's basically like someone vouching for you if you wanna get hired?
22:50:50shalabhI still think the ideas page is not as fleshed out. But I"ll vouch for you anyway.
22:51:10*gsingh93 joined #nim
22:51:39def-I had a deadline today, planning to fix it up tomorrow
22:51:43shalabhfeedback from last year: <carols> for next year i'd say take a couple ideas off the page and flesh out the ones you have there
22:52:09shalabhI think they may want to see a bit more technical detail about the work.
22:52:15reactormonkdef-, the ragel stuff isn't that easy, and it's not gonna be in C.
22:52:19reactormonks/not//
22:52:31shalabhthe 'viable gc research platform' sounds too vague a title
22:52:33shalabhanyway
22:52:52reactormonkshalabh, how many ideas would you reduce it to?
22:52:52shalabhwho should I pm to add me to the application? I can also send email from my work.
22:53:09shalabhbtw, I'm not involved in gsoc at all so my advice is as good as anybody elses
22:54:10def-you can pm me
22:54:32shalabhreactormonk: 5-7
22:56:16*Demon_Fox joined #nim
22:58:34*shodan45 joined #nim
23:02:12*Sharcho joined #nim
23:05:25SharchoIs there already an implementation of a database connection pool for use with httpserver?
23:05:42*kjo1 joined #nim
23:07:40*milosn quit (Read error: Connection reset by peer)
23:09:23def-Sharcho: haven't seen anything like that
23:13:12*milosn joined #nim
23:14:12*pafmaf quit (Quit: This computer has gone to sleep)
23:17:16*reem quit (Remote host closed the connection)
23:26:49*sillesta quit (Ping timeout: 264 seconds)
23:29:02*gokr quit (Ping timeout: 246 seconds)
23:29:46*TEttinger quit (Ping timeout: 264 seconds)
23:33:33*gokr joined #nim
23:36:15*brson quit (Remote host closed the connection)
23:38:11*brson joined #nim
23:40:00*gokr_ joined #nim
23:45:57*reem joined #nim
23:47:53*rapind joined #nim
23:52:19*rapind quit (Ping timeout: 245 seconds)
23:53:16*akiradeveloper joined #nim
23:55:49*gokr_ quit (Ping timeout: 256 seconds)