<< 11-08-2014 >>

00:19:06*Fr4n joined #nimrod
00:47:39*xenagi quit (Quit: Leaving)
01:35:03*q66 quit (Quit: Leaving)
01:47:18*EXetoC quit (Quit: WeeChat 0.4.3)
01:54:02*ARCADIVS joined #nimrod
02:48:11*Joe_knock quit (Quit: Leaving)
02:49:13*flaviu quit (Ping timeout: 260 seconds)
03:43:33*kshlm joined #nimrod
03:59:12VarriountAnybody know where zahary is/if he'll be coming back?
04:22:00*kshlm quit (Remote host closed the connection)
04:23:07*kshlm joined #nimrod
04:33:09*Demos_ quit (Quit: Leaving)
04:38:48*jpoirier quit (Quit: Bye!)
05:13:33*vendethiel quit (Quit: q+)
05:17:05*gkoller joined #nimrod
06:06:46*kshlm quit (Remote host closed the connection)
06:06:59*gkoller quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:12:29*reloc0 quit (Quit: WeeChat 0.3.8)
06:14:27*superfunc joined #nimrod
06:16:10*reloc0 joined #nimrod
06:32:09*kshlm joined #nimrod
06:46:32*OrionPK quit (Ping timeout: 250 seconds)
06:51:23*kunev joined #nimrod
07:18:14*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:22:37*ghost_universal joined #nimrod
07:22:42ghost_universalalo
07:25:42*ghost_universal left #nimrod (#nimrod)
08:40:29*untitaker joined #nimrod
08:45:37*gs joined #nimrod
08:50:31gsHi there!
08:52:53gsI was wondering which iterator there is, that allows modifying the yielded values. In the manual there's some talk of versions with "m" prefixed, but I can't seem to find "mitems" and the likes.
08:57:56*def- joined #nimrod
09:05:10*io2 joined #nimrod
09:07:06*Araq_ joined #nimrod
09:07:52Araq_gs: the mitems iterator is trivial to write, I dunno if it ever made it into system.nim though
09:10:39gsAraq_: Sure, but don't people regularly need it anyway? Or do they usually access the item via the current index instead?!
09:11:03Araq_that's what I do for write access, yes
09:12:32gsalright
09:12:56Araq_often I even use a while loop and 'del' to get modification during traversal
09:13:40Araq_but please make a PR
09:26:52*superfunc quit (Ping timeout: 245 seconds)
09:38:51*zahary joined #nimrod
09:50:46*zahary quit (Quit: Leaving.)
10:11:24*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140421221237])
10:17:45*superfunc joined #nimrod
10:28:26*ARCADIVS quit (Quit: WeeChat 0.4.3)
10:30:22*gs quit (Ping timeout: 246 seconds)
10:39:03*Fr4n quit (Remote host closed the connection)
10:43:56*io2 quit (Ping timeout: 255 seconds)
10:54:15*Fr4n joined #nimrod
11:01:17*io2 joined #nimrod
11:23:18*saml_ joined #nimrod
12:07:08*EXetoC joined #nimrod
12:15:45*kshlm quit (Ping timeout: 260 seconds)
12:20:43*ics joined #nimrod
12:29:52*OrionPK joined #nimrod
12:42:35*darkf quit (Quit: Leaving)
12:43:12*saml_ quit (Ping timeout: 260 seconds)
12:53:42*superfunc quit (Ping timeout: 260 seconds)
13:06:29*lyro joined #nimrod
13:08:14*bogen left #nimrod (#nimrod)
13:12:09lyroHi there, I have a question: the function `parseExpr` can be used to "convert" a string to an AST. In the case of an invalid expression string an error is raised. Is it possible to handle this error during compilation (i.e. macro expansion) phase? (i.e., the compilation should not just fail but I want to handle the problem myself)
13:16:20*lyro_ joined #nimrod
13:19:46*Araq_ joined #nimrod
13:21:08Araq_lyro, lyro_ I don't think this is possible. what's your use case?
13:23:36lyroI would like to implement some kind of string interpolation, i.e. something like `interpolate "expression: ${x+5}"` should be converted to `"expression " & $(x+5)` ... (actually I'm using `strfmt` for the formatting, but this is not important)
13:24:49lyrodoing so with `parseExpr` works quite well, but in the case of some error in the expression it's hard to deal with the problem (e.g. provide a useful error message)
13:26:11Araq_ah ok
13:26:45*lyro_ quit (Ping timeout: 246 seconds)
13:27:18Araq_we have some patch to improve line information for code generated by macros; this might help too
13:28:48Araq_it should be easy to make parseExpr raise EInvalidValue or something
13:32:42lyroyes, this is what I thought of
13:33:07lyrohowever, do exceptions during macro expansion work?
13:35:06Araq_yes, the VM supports try..except
13:35:26Araq_though it has not been tested extensively
13:35:30*saml joined #nimrod
13:38:32lyrohm, I've tried the following example:
13:38:59lyro
13:38:59lyroimport macros
13:38:59lyro
13:39:02lyromacro foo*(s: string{lit}) : expr =
13:39:06lyro try:
13:39:09lyro result = newLit(($s) & ": 42")
13:39:12lyro except:
13:39:15lyro result = newLit("ERROR")
13:39:18lyro
13:39:22lyroecho foo("answer")
13:39:24lyrorunning this program shows "ERROR"
13:39:36lyroalthough no exception should be raised
13:40:24*lyro_ joined #nimrod
13:43:03Araq_report it properly please
13:49:50lyrook
13:52:19Araq_you can try to add a dummy empty 'finally' and see if that changes anything
13:56:14lyrono, the error still occurs
13:56:52Araq_damn
14:00:47Araq_add a 'return' in the 'try' block please
14:02:47lyrothis works
14:03:34lyrobut this can only be used if the macro should actually return after the try block :)
14:05:29Araq_actually you can always use a block+break, but yes, it's a kludge
14:07:49*EXetoC quit (Quit: WeeChat 0.4.3)
14:10:35lyroshould 'return' or 'break' within 'try' still cause the 'finally' block to be run?
14:11:23*ome joined #nimrod
14:14:38Araq_it should indeed iirc
14:18:37lyroit does in regular code but not within a macro
14:19:15lyroI could extend the bug report, but it's probably related ;)
14:19:35Araq_yup
14:40:13lyroso, concerning the 'parseExpr' thing ... should I file a 'feature request' or something?
14:42:47*Fr4n quit (Ping timeout: 245 seconds)
14:42:48*rektide_ is now known as rektide
14:49:38Araq_yeah, that would be nice
14:55:03*Fr4n joined #nimrod
15:02:33*bjz quit (Quit: Textual IRC Client: www.textualapp.com)
15:02:53*bjz joined #nimrod
15:16:01*Jehan_ joined #nimrod
16:01:11*kunev quit (Quit: leaving)
16:08:12*lyro_ quit (Remote host closed the connection)
16:08:19*lyro_ joined #nimrod
16:12:34*lyro_ quit (Ping timeout: 255 seconds)
16:32:36*bjz quit (Read error: Connection reset by peer)
16:32:40*bjz_ joined #nimrod
16:34:10*Demos joined #nimrod
16:40:46*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140421221237])
17:13:52*q66 joined #nimrod
17:16:29*Matthias247 joined #nimrod
17:20:11*bogen joined #nimrod
17:27:23*brson joined #nimrod
17:37:22*kunev joined #nimrod
17:38:23*EXetoC joined #nimrod
17:46:51*Jehan_ quit (Quit: Leaving)
17:54:10dom96hi
17:54:33Demoshi
17:55:13NimBotnimrod-code/packages master 15f729f Charlie Barto [+0 ±1 -0]: added Phosphor
17:55:13NimBotnimrod-code/packages master 76bf05f Dominik Picheta [+0 ±1 -0]: Merge pull request #80 from barcharcraz/master... 2 more lines
17:56:38Demoswow that was quick
17:58:16dom96:)
18:24:37*zahary joined #nimrod
18:28:55*Jehan_ joined #nimrod
18:43:30NimBotAraq/Nimrod devel b1c8461 Araq [+0 ±1 -0]: fixes tinavlid_array_bounds test
18:43:30NimBotAraq/Nimrod devel dd806ca Araq [+0 ±36 -0]: distinguish between 'defined' and 'declared'
18:43:30NimBotAraq/Nimrod devel aaf4b04 Araq [+0 ±6 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
19:05:42Araqyay I didn't break the build
19:05:50dom96hey Araq
19:06:03Araqhey dom96
19:16:13*zahary quit (Quit: Leaving.)
19:38:30*superfunc joined #nimrod
19:44:29*zahary joined #nimrod
19:46:21*flaviu joined #nimrod
19:46:54AraqVarriount: people really want fsmonitor
19:47:11dom96Yes, please commit it even if it's not finished so that others can work on it
19:47:21*lyro_ joined #nimrod
19:48:00NimBotAraq/Nimrod devel 25610a2 Dominik Picheta [+0 ±2 -0]: Fixes incorrect macro stack traces.
19:48:15Araqlol "fixes"
19:48:33dom96Shhhhh
19:48:43Araqit's some revolutionary heuristic we should blog about
19:48:53Araqit's hardly a "fix"
19:48:57*untitaker quit (Ping timeout: 246 seconds)
19:50:27Jehan_Hmm. `swap` is not optimized for the case where both arguments are on the heap, do I see that correctly?
19:51:34Araqshould be optimized
19:51:51Araqaka should not perform RC updates
19:53:05Araqthinking about it ... can a swap be used to create a cycle? surely it can, right?
19:53:33Araqthen we can't get rid of the write barrier completely
19:53:44*zahary quit (Quit: Leaving.)
19:55:48*untitaker joined #nimrod
19:56:48*zahary joined #nimrod
20:07:32*ome quit (Quit: Connection closed for inactivity)
20:12:09SkrylarEXetoC: do you still use that opengl wrapper you built?
20:14:08Jehan_Araq: Depends on the types involved, but yes, it can create a cycle if the types allow for it.
20:22:11*kunev quit (Ping timeout: 264 seconds)
20:25:17*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:26:08EXetoCSkrylar: no
20:41:09*ARCADIVS joined #nimrod
20:44:18*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
20:47:51*Demos_ joined #nimrod
20:51:34*Demos quit (Ping timeout: 260 seconds)
21:09:41*io2 joined #nimrod
21:14:57*Demos__ joined #nimrod
21:18:26*Demos_ quit (Ping timeout: 255 seconds)
21:31:56*Jesin quit (Quit: Leaving)
21:34:08*Jesin joined #nimrod
21:38:56*willwillson joined #nimrod
21:43:17willwillsonI'm trying to use varargs with procedural types but keep getting an error, see : http://pastie.org/9463132 . Should this work?
21:45:00Araqthe compiler hints you to the proper way to do it
21:45:31Araqeither delcare afunc and bfunc as .closure or use varargs[proc () {.nimcall.}]
21:45:53Araqthe latter is more efficient but less flexible
22:00:06willwillsonAraq: Thanks, using varargs[proc () {.nimcall.}] seemed to work, but when trying the closure method, the generated c code didn't compile : vargs.c:77:1: error: ‘HEX3Aenv_86158’ undeclared here (not in a function)
22:01:20Araqare you on devel?
22:02:23willwillsonAraq: Yeah, I just compiled from git HEAD an hour ago or so.
22:03:45Araqreport it please then
22:04:38willwillsonAraq: ok, will do
22:13:08Araqbug #1431 makes me wonder if we have any tests at all
22:15:45Araqoh I bet it's yet another "do" rewrite bug
22:16:23*Joe_knock joined #nimrod
22:20:16Araqnope
22:20:25Araqit looks like an ancient bug
22:20:39Araqah I see
22:20:48Araqnobody uses tuples with a single field
22:45:36*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
22:46:34*lyro_ quit (Ping timeout: 240 seconds)
22:47:02*lyro_ joined #nimrod
22:47:41SkrylarEXetoC: why not? you didn't become a direct-x junkie did you :o
22:49:00EXetoCSkrylar: no. still don't have windows
22:49:46Skrylarhrm. i'll have to poke around with GL some time later
22:50:14SkrylarI think we have active SDL2 bindings in babel still
22:50:38EXetoCI prefer glfw
22:52:28SkrylarI tried that in the past
22:52:31SkrylarIt gave me bij.
22:58:25EXetoC?
23:00:21*darkf joined #nimrod
23:10:32*Matthias247 quit (Read error: Connection reset by peer)
23:13:13*Jesin quit (Quit: Leaving)
23:16:07*flaviu quit (Ping timeout: 245 seconds)
23:16:23*Jesin joined #nimrod
23:18:07Araqgood night
23:22:54*Jehan_ quit (Quit: Leaving)
23:26:07OrionPKRIP robin williams
23:26:44*flaviu joined #nimrod
23:26:55*saml_ joined #nimrod