<< 17-04-2015 >>

00:01:59polkmhow to do "addr array[0]" but for seq instead?
00:02:12*TEttinger joined #nim
00:02:34polkmcan I get the internal array of a seq?
00:02:48flaviu.eval echo(repr(addr((@[])[0])))
00:02:57*brson quit (Quit: leaving)
00:02:57polkmlike .c_ptr
00:03:18*brson joined #nim
00:03:32polkmwhat does repr do?
00:04:47*Mimbus joined #nim
00:05:03flaviuIt prints things in a form where they are useful for debugging.
00:05:24flaviu.eval echo(repr(addr((@[])[0])))
00:05:25Mimbusflaviu: eval.nim(3, 10) Error: expression has no address
00:05:41flaviu.eval var a: seq[int] = @[]; echo(repr(addr(a[0])))
00:05:44Mimbusflaviu: Error: unhandled exception: index out of bounds [IndexError]
00:06:13*gsingh93 quit (Ping timeout: 248 seconds)
00:06:16polkmhmm, opengl doesn't like that
00:06:59flaviu.eval var a: seq[int] = @[1]; echo(repr(addr(a[0])))
00:07:00Mimbusflaviu: ref 0x7f9463383060 --> 1
00:07:01flaviuthere we go.
00:07:28flaviuThat's an address to an int, and 0x7f9463383060++ is the next element in the seq.
00:07:45polkmshit that should work
00:07:51polkmbut it doesn't
00:07:53polkmone sec
00:07:58flaviuwell, I suppose that ++ is only valid in C, and only for char*
00:09:28polkmdoes anythign in this look wrong? http://pastebin.com/AixiLhN9
00:10:33polkmdisregard, sizeof(seq) is borked or something
00:11:14polkmdisregard, sizeof(seq) is borked or something, got it to work by replacing it with "sizeof(uint32).int32 * indices.len.int32"
00:11:45polkmoops
00:13:06*askatasuna joined #nim
00:15:18polkmis repr the same as $?
00:17:34flaviuNo, totally different.
00:17:35fowlmouthpolkm, i fixed it last night
00:17:45fowlmouthcheck my fork of nim-assimp
00:18:04flaviu.eval var a: seq[int] = @[1]; echo(a, ", ", repr(a[0]))
00:18:06Mimbusflaviu: @[1], 1
00:18:22flaviuerr, that was a bad example.
00:19:05flaviu.eval echo("asd", ", ", repr("asd"))
00:19:06Mimbusflaviu: asd, 0x43c970"asd"
00:25:03*brson quit (Quit: leaving)
00:38:48*gokr_ quit (Quit: IRC for Sailfish 0.9)
00:41:04*TEttinger quit (Ping timeout: 245 seconds)
00:48:26*BitPuffin quit (Ping timeout: 246 seconds)
00:50:42*HakanD quit (Quit: Be back later ...)
01:11:36*milosn quit (Ping timeout: 240 seconds)
01:21:27*endragor joined #nim
01:43:45polkmfowlmouth, thanks man thats super helpful!
01:44:02polkmflaviu, thanks too
02:02:21*drs- quit (Quit: leaving)
02:19:10*endragor quit (Remote host closed the connection)
02:20:41*darkf joined #nim
02:25:29*ChrisMAN quit (Ping timeout: 264 seconds)
02:26:27*EXetoC quit (Ping timeout: 246 seconds)
02:29:05*endragor joined #nim
02:33:24*endragor quit (Remote host closed the connection)
02:33:59*johnsoft quit (Ping timeout: 245 seconds)
02:34:35*johnsoft joined #nim
02:45:03*Senketsu joined #nim
02:49:41*endragor joined #nim
02:52:47*elbow_jason quit (Remote host closed the connection)
02:53:09*endragor quit (Remote host closed the connection)
02:55:06*elbow_jason joined #nim
02:55:21*TEttinger joined #nim
02:56:32*transfuturist joined #nim
02:59:58*saml_ quit (Remote host closed the connection)
03:22:04*endragor joined #nim
03:29:29*elbow_jason quit (Remote host closed the connection)
03:37:05transfuturisthttps://github.com/transfuturist/outlet
03:38:14polkmwow thats fucking dank
03:40:54transfuturistforetwennyblazblue
03:51:02dtscodeomfg i love this
03:53:45dtscodei wonder how hard it would be to make this a compiler option...
03:54:16transfuturistthat was my first tack, but it turned out swapping was already supported
03:54:39dtscodehotswapping is already supported in nim?
03:54:44dtscodelike with -i?
03:54:56transfuturistno, with the dynlib package
03:55:03transfuturistthis is a wrapper over that
03:55:06transfuturisthttp://forum.nim-lang.org/t/627/1#7038
03:55:21transfuturister, look at reactormonk's comment
03:55:33dtscodeah
03:56:57dtscodeso its essentially dlopen for nim
03:57:29transfuturistyeah
03:57:49transfuturistconcise definitions of apis that you statically link, and can unload and reload at will
03:58:02transfuturistlike handmade hero
03:58:05dtscodehmmmm
04:13:12reactormonktransfuturist, you still need a parameter to exportc to denote the name you wanna export it as
04:14:43transfuturistit works without that, though...
04:15:06transfuturistwould that maybe be part of the symbol conflict problem?
04:17:00*transfuturist crosses fingers
04:17:54transfuturistno, if the parameter to exportc is missing the exact identifier is what is exported
04:20:05transfuturisti need to make a test that breaks on the symbol conflict.
04:56:18*gsingh93 joined #nim
05:12:27*johnsoft quit (Ping timeout: 250 seconds)
05:19:45*dtscode is now known as squirtle
05:22:08*BlaXpirit joined #nim
05:22:49*squirtle is now known as dtsologist
05:24:05*dtsologist is now known as PaulMaudib
05:29:11*PaulMaudib is now known as EdwardElric
05:34:13*milosn joined #nim
05:37:38*Flaise quit (Quit: Leaving.)
05:39:33*askatasuna quit (Ping timeout: 248 seconds)
05:40:10*johnsoft joined #nim
05:53:17*a5i quit (Quit: Connection closed for inactivity)
05:55:27*Senketsu quit (Ping timeout: 276 seconds)
06:04:04*gokr_ joined #nim
06:17:02*TEttinger quit (Quit: Leaving)
06:27:25*gsingh93 quit (Ping timeout: 264 seconds)
06:28:13*zahary joined #nim
06:39:44*transfuturist quit (Quit: Zzzzz...)
06:55:41*Ven joined #nim
07:05:20*endragor_ joined #nim
07:08:31*endragor quit (Ping timeout: 255 seconds)
07:15:09*endragor_ quit (Remote host closed the connection)
07:19:51*Matthias247 joined #nim
07:20:34*TEttinger joined #nim
07:33:03*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:36:13*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
07:36:54*Ven joined #nim
07:36:54*Ven quit (Client Quit)
07:46:33*Matthias247 quit (Read error: Connection reset by peer)
07:50:52*Ven joined #nim
08:08:00*coffeepot joined #nim
08:11:32*HakanD joined #nim
08:15:13*endragor joined #nim
08:24:23*HakanD quit (Quit: Be back later ...)
08:28:06*zahary quit (Read error: Connection reset by peer)
08:38:16*Ven quit (Read error: Connection reset by peer)
08:38:33*Ven joined #nim
08:39:42*bjz joined #nim
08:41:23*bjz quit (Client Quit)
08:43:23*bjz joined #nim
08:44:27*HakanD joined #nim
08:46:04*OnO joined #nim
08:47:09*akiradeveloper joined #nim
08:48:13coffeepotGood morning everyone :)
08:48:22BlaXpirithi
08:51:13*HakanD quit (Quit: Be back later ...)
08:52:50*bjz quit (Ping timeout: 246 seconds)
08:58:52coffeepotwhen using var s:cstring do I need to call new(s) on it?
09:00:03coffeepotalso, not sure how I allocate a fixed length cstring if anyone knows?
09:00:31BlaXpiritcoffeepot, why not use var s: string
09:00:50*milosn quit (Ping timeout: 272 seconds)
09:01:28coffeepotI'm not sure I can, trying to call a c func that takes PSQLCHAR, which is a cstring
09:01:42coffeepotthe function writes to the string as a buffer
09:02:17BlaXpiritcoffeepot, i dunno, maybe it should be array of char
09:03:15coffeepotI thought the same, but not sure if I can just cast a char array to a cstring safely
09:03:23fowlmouthcoffeepot, you can use string
09:03:45coffeepotI can? That's great :D
09:05:48coffeepotahhh I know where I was going wrong! Declaring a string (or a cstring) doesn't initialise it, so it starts off as nil until I put = "" :)
09:05:59coffeepotlesson learned :)
09:06:34*pafmaf joined #nim
09:06:42fowlmouthcoffeepot, you want newStringOfCap()
09:07:00coffeepotfowlmouth: brilliant, just what I need, cheers :)
09:11:54*HakanD joined #nim
09:18:17*bjz joined #nim
09:20:49*Ven quit (Ping timeout: 264 seconds)
09:23:49*pafmaf quit (Ping timeout: 264 seconds)
09:30:06*TEttinger quit (Ping timeout: 250 seconds)
09:43:32*TEttinger joined #nim
09:50:49*EXetoC joined #nim
09:51:57*pafmaf joined #nim
09:56:16*EdwardElric is now known as dtscode
09:56:49*milosn joined #nim
09:57:50*milosn quit (Read error: Connection reset by peer)
10:01:54*milosn joined #nim
10:02:53*akiradeveloper quit (Remote host closed the connection)
10:02:58*Tennis joined #nim
10:07:44*gokr_ quit (Ping timeout: 245 seconds)
10:08:35*milosn quit (Read error: Connection reset by peer)
10:09:08*milosn joined #nim
10:11:46*polkm quit (Ping timeout: 246 seconds)
10:14:08*milosn quit (Ping timeout: 245 seconds)
10:17:02*BitPuffin joined #nim
10:25:57*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:28:33*coffeepot joined #nim
10:29:09*milosn joined #nim
10:32:56*milosn quit (Read error: Connection reset by peer)
10:34:08*milosn joined #nim
10:49:01*milosn quit (Read error: Connection reset by peer)
10:49:33*milosn joined #nim
10:51:16*pafmaf quit (Quit: This computer has gone to sleep)
10:57:13*akiradeveloper joined #nim
10:57:22*milosn quit (Ping timeout: 272 seconds)
10:58:31*akiradeveloper quit (Remote host closed the connection)
11:01:40*akiradeveloper joined #nim
11:10:30*Kingsquee quit (Quit: Konversation terminated!)
11:11:17*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
11:15:07*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
11:15:20*BitPuffin quit (Ping timeout: 265 seconds)
11:15:44*milosn joined #nim
11:19:04*OnO joined #nim
11:25:32*Ven joined #nim
11:27:35*milosn quit (Read error: Connection reset by peer)
11:28:33*milosn joined #nim
11:31:17*TEttinger quit (Ping timeout: 265 seconds)
11:34:57*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
11:35:31*pafmaf joined #nim
11:36:45*a5i joined #nim
11:40:50*milosn quit (Ping timeout: 246 seconds)
11:58:24*akiradeveloper quit (Remote host closed the connection)
12:01:46*akiradeveloper joined #nim
12:06:52*akiradev_ joined #nim
12:06:56*HakanD quit (Quit: Be back later ...)
12:10:11*akiradeveloper quit (Ping timeout: 250 seconds)
12:10:39*milosn joined #nim
12:11:52*HakanD joined #nim
12:22:05*akiradev_ quit (Ping timeout: 244 seconds)
12:25:29endragoris it possible to get size (length) of a Slice?
12:25:41endragorin generic way
12:27:29endragor`ord(s.b) - ord(s.a) + 1` I guess
12:28:04*BitPuffin joined #nim
12:29:09*itPuffinB joined #nim
12:30:17*tPuffinBi joined #nim
12:32:03*PuffinBit joined #nim
12:32:28*BitPuffin quit (Ping timeout: 245 seconds)
12:32:57*uffinBitP joined #nim
12:33:18*itPuffinB quit (Ping timeout: 245 seconds)
12:33:43*ffinBitPu joined #nim
12:34:33*tPuffinBi quit (Ping timeout: 245 seconds)
12:34:45*finBitPuf joined #nim
12:36:38*PuffinBit quit (Ping timeout: 245 seconds)
12:37:19*uffinBitP quit (Ping timeout: 245 seconds)
12:37:44*ffinBitPu quit (Ping timeout: 245 seconds)
12:38:28*milosn quit (Read error: Connection reset by peer)
12:39:35*milosn joined #nim
12:43:34*inBitPuff joined #nim
12:44:16*nBitPuffi joined #nim
12:45:19*BitPuffin joined #nim
12:45:28*milosn quit (Read error: Connection reset by peer)
12:46:00*itPuffinB joined #nim
12:46:29*finBitPuf quit (Ping timeout: 245 seconds)
12:47:39*uffinBitP joined #nim
12:47:44*inBitPuff quit (Ping timeout: 245 seconds)
12:48:34*nBitPuffi quit (Ping timeout: 245 seconds)
12:49:49*BitPuffin quit (Ping timeout: 245 seconds)
12:50:14*itPuffinB quit (Ping timeout: 245 seconds)
12:51:54*uffinBitP quit (Ping timeout: 245 seconds)
12:53:30*HakanD quit (Quit: Be back later ...)
12:54:02*milosn joined #nim
12:56:12*mpthrapp joined #nim
13:03:57*OnO joined #nim
13:05:28*milosn quit (Ping timeout: 250 seconds)
13:05:57*coffeepot joined #nim
13:07:31*OnO quit (Client Quit)
13:14:02*milosn joined #nim
13:26:19*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:28:43*BitPuffin joined #nim
13:35:14*Ven joined #nim
13:36:58*milosn quit (Ping timeout: 272 seconds)
13:45:30*milosn joined #nim
13:51:20*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:58:24*pregressive joined #nim
13:58:53*Ven joined #nim
14:03:29*gallicrooster joined #nim
14:04:31*flaviu quit (Read error: Connection reset by peer)
14:07:53*gallicrooster quit (Ping timeout: 245 seconds)
14:15:23*milosn quit (Ping timeout: 245 seconds)
14:28:42*Flaise joined #nim
14:31:06Araqhi Flaise welcome
14:31:11*darkf quit (Quit: Leaving)
14:35:51*flaviu joined #nim
14:37:49FlaiseHi
14:42:06*flaviu quit (Remote host closed the connection)
14:51:04*OnO joined #nim
14:51:49*bcinman joined #nim
14:54:57*OnO quit (Client Quit)
15:05:27*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:06:12*dewdrop joined #nim
15:11:09coffeepotI have a weird problem, I wonder if anyone can enlighten me. I have a string defined thus: sqlState = newStringOfCap(6) and I'm calling a C function that's passed this sqlState str directly. The function populates it with a string, and if I echo sqlState I get what I expect. What I can't work out though, is if I do: echo "test " & sqlState it disp
15:11:09coffeepotlays "test " but only the first letter of sqlState! Doing echo sqlState displays it normally. I can't give a short example of this unfortunately :-/
15:12:16coffeepotjust wondering if anyone's encountered this before.
15:12:17fowlmouthwhat c function
15:12:24Araqcoffeepot: it's simple
15:12:38AraqnewStringOfCap() gives you effectively a buffer to work with
15:12:38coffeepotthe c fun is SQLGetDiagRec
15:12:55Araqhowever, C stores something in there and then a \0
15:12:59fowlmouththe character after the ' ' is '\0' but the strings length is off
15:12:59Araqnow
15:13:20Araqecho prints up to the \0 due to a hard to fix bug
15:13:35Araqbut & reads the string's length
15:13:37fowlmouth SQLSMALLINT * TextLengthPtr
15:13:43Araqwhich you didn't set at all
15:14:00coffeepotahhhhhhh!!! Thanks Araq that makes sense :)
15:14:06Araqyou need to call mybuffer.setLen(whatever)
15:14:07fowlmouthuse that to set the str len after the call
15:15:01coffeepotalso cheers fowlmouth :)
15:18:17*pafmaf quit (Quit: This computer has gone to sleep)
15:19:55*endragor_ joined #nim
15:21:26*pregress_ joined #nim
15:22:57*pidg joined #nim
15:24:02*milosn joined #nim
15:24:02pidghello. In https://github.com/Araq/Nim/issues/2361, Araq says 'You cannot capture openArray/varargs or 'var T' as that would violate memory safety.' What does he mean by 'capture' there? I struck out when googling.
15:24:12*endragor quit (Ping timeout: 276 seconds)
15:24:18*pregressive quit (Ping timeout: 264 seconds)
15:24:25*endragor_ quit (Ping timeout: 264 seconds)
15:24:38Araqpidg:
15:24:56Araqproc outer(toCapture: var int): auto =
15:25:09Araq return proc (): int = toCapture
15:25:20*gmpreussner quit (Quit: Konversation terminated!)
15:25:41Araqif an inner proc accesses stuff in an outer scope that process is called "capturing"
15:25:59pidgah. As in a closure?
15:26:04Araqexactly
15:26:12pidggonna stare at that for a sec, pretty sure that clears it up.
15:26:13pidgthanks
15:27:09*brson joined #nim
15:27:53Araqpidg: maybe the literature uses a different verb, I cannot remember ;-)
15:30:43pidgI'm new to nim, so it wasn't obvious to me that 'xs' was being accessed in a block that was closed over. I'm not sure about terminology of closures either, just know the word 'closure' :) Thanks for the response
15:32:14*untitaker quit (Ping timeout: 272 seconds)
15:32:31*ChrisMAN joined #nim
15:32:41*untitaker joined #nim
15:33:59Araqpidg: the workaround is trivial of course, copy it into a local variable and capture that instead
15:34:08fowlmouthlet xs = @xs
15:34:28Araqor use 'ptr' if you need to write to it (but ensure it lives long enough!)
15:35:17*elbow_jason joined #nim
15:37:30pidgaraq, fowlmouth: got it.
15:38:08*jefus joined #nim
15:39:42*HakanD joined #nim
15:43:09*HakanD_ joined #nim
15:47:00*Ven joined #nim
15:47:36*HakanD quit (Ping timeout: 276 seconds)
15:52:08*pregress_ quit (Remote host closed the connection)
15:54:33*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:56:27*pidg quit (Quit: Page closed)
16:01:28renesachas someone wrote something using non-copying slices in nim yet?
16:01:41*pafmaf joined #nim
16:01:55EXetoChttps://github.com/AdrianV/nimrod-tools/blob/master/seqslices.nim
16:02:08renesacI'm needing that now (started using an extra "offset" parameter, but then caugth myself using seq.len)
16:02:22renesacthanks
16:02:38EXetoCoh yeah that's really old
16:04:36*johnsoft quit (Ping timeout: 240 seconds)
16:04:43*brson quit (Quit: leaving)
16:07:01*brson joined #nim
16:22:41*coffeepot left #nim (#nim)
16:30:44*Matthias247 joined #nim
16:36:10renesacnimfix gives this error when I try to compile it:
16:36:14renesaccompiler/commands.nim(58, 15) Error: cannot open 'doc/basicopt.txt'
16:48:20fowlmouththis is cool https://github.com/transfuturist/outlet im going to try using it in a project
16:54:46*pafmaf quit (Quit: This computer has gone to sleep)
16:56:29*pregressive joined #nim
17:05:39*BlaXpirit_ joined #nim
17:08:20*BlaXpirit quit (Ping timeout: 252 seconds)
17:16:24*irrequietus joined #nim
17:18:43*TEttinger joined #nim
17:20:51*dtscode is now known as csaw_
17:21:14*csaw_ is now known as dtscode
17:21:48*dtscode is now known as csaw
17:21:55*csaw is now known as cSaw
17:22:31*cSaw is now known as dtscode
17:30:04*Arrrrr joined #nim
17:32:04ArrrrrHello Nimrod.
17:33:18*a5i quit (Quit: Connection closed for inactivity)
17:34:24ArrrrrIs there a friendlier way to handle ptr creation than 'cast[ptr ObType](alloc(sizeOf(ObType)))' ?
17:35:21BlaXpirit_stop with the rods :|
17:35:48BlaXpirit_Arrrrr, what are you doing?
17:35:49*dewdrop quit (Read error: Connection reset by peer)
17:36:15ArrrrrNothing, just playing with pointers. I have nothing i nmind.
17:36:29BlaXpirit_well u dont need pointers, unless you really do
17:36:50ArrrrrSo, when i do, i have no alternative than 'castlongsentence' ?
17:36:58BlaXpirit_let me check one more thing
17:37:17ArrrrrI var you check that thing.
17:38:12BlaXpirit_Arrrrr, so... the friendlier way is to use `addr`
17:38:56BlaXpirit_create whatever you want normally, then take its address
17:39:12BlaXpirit_unless you're absolutely sure you need to allocate like this. i never needed it.
17:39:31AraqArrrrr: there is also system.create and stuff
17:40:10Araqand even if not, a nice syntax is usually a template away in Nim
17:41:00*gallicrooster joined #nim
17:42:05ArrrrrOh god, that create makes a difference, thanks Araq. So, create is the 'new' for ptr.
17:42:44ArrrrrOne day i'll learn templating, but not yet.
17:44:01*a5i joined #nim
17:45:16*gallicrooster quit (Ping timeout: 240 seconds)
17:48:32*dewdrop joined #nim
18:02:40renesacand if I try to run nimfix with --styleCheck:auto it gives:
18:02:42renesacError: system module needs 'shared'
18:02:53renesac(after I disabled that line complaining above
18:03:59Araqrenesac: don't install nim, compile like it like we tell you to do it
18:04:11Araqand then nimfix builds and should work
18:04:26renesac?
18:04:33*Trustable joined #nim
18:04:41renesacI recompiled nim from the last git devel
18:04:58renesacthe Nim/bin directory is on path
18:05:04renesacand I dropped nimfix there too
18:05:21renesacas the nimfix user guide says to
18:08:23Araqwell but the error makes no sense
18:08:38Araqsystem module doesn't need 'shared' anymore
18:10:51renesacnimfix -v
18:10:51renesacNim Compiler Version 0.10.3 (2015-04-17) [Linux: amd64]
18:11:11renesacI don't know what is happening
18:12:13BlaXpirit_in any uncertain situation: start from scratch
18:12:23*BlaXpirit_ quit (Quit: Quit Konversation)
18:12:39Araqwhat does nimfix say about its search path?
18:12:41*BlaXpirit joined #nim
18:23:08*filwit joined #nim
18:24:05*gsingh93 joined #nim
18:25:21*HakanD_ quit (Quit: Be back later ...)
18:25:54filwitdom96: any chance you can review and merge my Aporia PR soon? It's been ready for awhile and improves/fixes quite a few things.
18:26:09*OnO_ joined #nim
18:30:48*zama quit (Ping timeout: 245 seconds)
18:39:12ArrrrrI think every type by default should overload toString ('$'), maybe behave as repr.
18:39:49*smelod joined #nim
18:40:11EXetoCArrrrr: it is available for all values types
18:40:29Arrrrr$ ?
18:40:35EXetoCyep
18:41:27EXetoC.eval type T = object; x: int; y: int; echo T()
18:41:30MimbusEXetoC: (x: 0, y: 0)
18:42:08ArrrrrYou are right, i dont know how i missed that. Maybe i tried with a ref
18:42:28Arrrrryes, it was that.
18:43:25ArrrrrWhy doesn't work in this case?
18:43:31*zama joined #nim
18:44:54Arrrrr(unless you deference it, which most of the times is what you want anyway)
18:47:26EXetoCbecause the tuple|object doesn't take pointer/refs of tuples/objects
18:48:22Arrrrrwut
18:49:57EXetoC"proc `$`*[T: tuple|object]..." and then some other overloads, none of which accepts refs
18:51:17ArrrrrAh, ok. Thanks for your explanations EXetoC. Would not be possible to add one overload for refs/ptr ? In case is null, just echo type+[null], in other case deference it and call return $
18:52:09Arrrrr(by echo i mean return)
18:52:49EXetoCit's possible
18:53:22*HakanD_ joined #nim
18:54:33ArrrrrAnd desirable, in my opinion.
18:55:02*OnO_ quit (Quit: My iMac has gone to sleep. ZZZzzz…)
19:01:04*OnO joined #nim
19:09:52AraqOnO: tests/parser has a couple of tests including tests that should fail with a particular error message
19:12:15OnOthis with discard """ ?
19:13:55OnOtester checks this discard header or #ERROR_MSG comment?
19:14:06*HakanD_ quit (Quit: Be back later ...)
19:14:10Araqthe discard header
19:14:23Araqthe #ERROR_MSG comment is obsolete
19:14:34Araq(it used to be parsed)
19:15:35*HakanD_ joined #nim
19:16:01*irrequietus_ joined #nim
19:17:04*irrequietus quit (Ping timeout: 272 seconds)
19:17:11*irrequietus_ is now known as irrequietus
19:17:16*irrequietus quit (Client Quit)
19:17:28*irrequietus joined #nim
19:20:13*HakanD_ quit (Ping timeout: 264 seconds)
19:20:51*alex99 joined #nim
19:21:50alex99I see bug reports about nim traits and concepts and there were some forum posts about type classes
19:22:02alex99where I can read more about traits/concepts/typeclasses?
19:22:12alex99there doesn't seem to be anything in official docs
19:23:06Araqthere are some docs in devel, but yes, very sparse
19:24:46alex99oh i see, in doc/manual/generics.txt
19:24:58*KimSchmitz joined #nim
19:25:48KimSchmitzhow would I go about debugging my nim proggie with linux?
19:27:31Araquse one of the various GDB frontends and compile with --debugger:native
19:28:17Araq(--debugger:native is new in devel, for 0.10.2 use --linedir:on --debuginfo)
19:28:45*HakanD_ joined #nim
19:34:13*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
19:34:57KimSchmitzthanks araq, I am still on arch linux included 10.2 ..
19:35:16KimSchmitz0.10.2
19:36:05*filcuc joined #nim
19:37:32ArrrrrI have to go, see you nimroders.
19:37:36*Arrrrr quit (Quit: Page closed)
19:39:14*Matthias247 quit (Read error: Connection reset by peer)
19:42:56samldoes context aware macro make sense?
19:43:18samlmacro expands different depending on context
19:43:21Araqsaml: depends on what you mean by "context"
19:43:46Araqin general: yes it does. see overloading resolution. ;-)
19:44:19samllet's say i want to implement malloc() as macro so that it knows about copying of ownership.. frees automatically when it goes out of scope and no copy of ownership has been there
19:45:00samlhttp://nim-lang.org/manual.html#overloading-resolution To be written
19:47:26Araqpfff documented in devel :P
19:48:07Araqsaml: I doubt you can implement that as a macro
19:48:44Araq"no copy of ownership has been there" ... so you want an escape analysis. not possible as a macro.
19:49:03samlyah. just wondering instead of baking those stuff into language, what would it look like if language provided a programmable way
19:49:41samlso the core of language is simple.. but stdlib can include all niffy malloc ...e tc
19:54:10*KimSchmitz quit (Ping timeout: 246 seconds)
19:56:24*OnO joined #nim
19:56:48Araqsaml: it's not feasible to make complex analyses like that "programmable", Nim actually goes a long way to this goal via its TR macros
19:57:43Araqbut there is a point where it breaks down
19:57:57samlwhat's tr macro?
19:58:10Araqa term rewriting macro
19:58:40samlmaybe better approach is to have programmer write some sort of proof. and compiler checks program against the proof
19:58:54Araqer ... that's even worse ;-)
19:59:09samlor just use garbaeg collector :P
19:59:47Araqwell thinking about it ... TR macros with builtin "escapes/doesntEscape" constraints could be cool
20:00:32Araqtemplate optMalloc{malloc(a, b, c)](a, b, c: expr{doesntEscape}) = ...
20:01:06EXetoCare there any TR examples that focus on functionality rather than optimizations?
20:02:39Araqno, their design actively tries to prevent this
20:02:53Araqa TR macro should not affect semantics
20:06:43*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
20:16:02*jefus quit (Remote host closed the connection)
20:20:15*Senketsu joined #nim
20:20:29Senketsuou shit beer stream already started
20:20:59Senketsuoh wrong channel hue
20:21:10Araqno
20:21:20Araqtell us about the beer ;-)
20:27:14*johnsoft joined #nim
20:27:23Senketsuumm, like what ? its a music stream..with a drunk dj and beer opening intermissions
20:37:37*smelod quit (Remote host closed the connection)
20:49:33*gsingh93 quit (Ping timeout: 245 seconds)
20:58:07*JStoker quit (Killed (holmes.freenode.net (Nickname regained by services)))
20:58:29*JStoker joined #nim
21:00:03*Kingsquee joined #nim
21:02:21*mpthrapp quit (Remote host closed the connection)
21:07:32*filcuc quit (Ping timeout: 244 seconds)
21:07:48*filcuc joined #nim
21:10:01*MightyJoe quit (Ping timeout: 264 seconds)
21:10:33*MightyJoe joined #nim
21:16:20*filwit quit (Quit: Leaving)
21:18:20*johnsoft quit (Ping timeout: 246 seconds)
21:18:40*gallicrooster joined #nim
21:19:18*johnsoft joined #nim
21:22:53*gallicrooster quit (Ping timeout: 245 seconds)
21:23:48*gsingh93 joined #nim
21:27:16*HakanD_ quit (Quit: Be back later ...)
21:57:29*irrequietus_ joined #nim
21:58:34*irrequietus quit (Ping timeout: 272 seconds)
22:10:20*saml quit (Quit: Leaving)
22:10:36*Trustable quit (Remote host closed the connection)
22:22:03*ChrisMAN quit (Ping timeout: 245 seconds)
22:23:15*pregressive quit ()
22:32:18*ChrisMAN joined #nim
22:35:44*irrequietus_ quit ()
22:50:56*jefus joined #nim
23:08:04*gallicrooster joined #nim
23:12:05*gallicrooster quit (Ping timeout: 246 seconds)
23:44:43*brson quit (Quit: leaving)