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:12 | Varriount | Anybody 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:42 | ghost_universal | alo |
07:25:42 | * | ghost_universal left #nimrod (#nimrod) |
08:40:29 | * | untitaker joined #nimrod |
08:45:37 | * | gs joined #nimrod |
08:50:31 | gs | Hi there! |
08:52:53 | gs | I 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:52 | Araq_ | gs: the mitems iterator is trivial to write, I dunno if it ever made it into system.nim though |
09:10:39 | gs | Araq_: Sure, but don't people regularly need it anyway? Or do they usually access the item via the current index instead?! |
09:11:03 | Araq_ | that's what I do for write access, yes |
09:12:32 | gs | alright |
09:12:56 | Araq_ | often I even use a while loop and 'del' to get modification during traversal |
09:13:40 | Araq_ | 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:09 | lyro | Hi 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:08 | Araq_ | lyro, lyro_ I don't think this is possible. what's your use case? |
13:23:36 | lyro | I 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:49 | lyro | doing 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:11 | Araq_ | ah ok |
13:26:45 | * | lyro_ quit (Ping timeout: 246 seconds) |
13:27:18 | Araq_ | we have some patch to improve line information for code generated by macros; this might help too |
13:28:48 | Araq_ | it should be easy to make parseExpr raise EInvalidValue or something |
13:32:42 | lyro | yes, this is what I thought of |
13:33:07 | lyro | however, do exceptions during macro expansion work? |
13:35:06 | Araq_ | yes, the VM supports try..except |
13:35:26 | Araq_ | though it has not been tested extensively |
13:35:30 | * | saml joined #nimrod |
13:38:32 | lyro | hm, I've tried the following example: |
13:38:59 | lyro | |
13:38:59 | lyro | import macros |
13:38:59 | lyro | |
13:39:02 | lyro | macro foo*(s: string{lit}) : expr = |
13:39:06 | lyro | try: |
13:39:09 | lyro | result = newLit(($s) & ": 42") |
13:39:12 | lyro | except: |
13:39:15 | lyro | result = newLit("ERROR") |
13:39:18 | lyro | |
13:39:22 | lyro | echo foo("answer") |
13:39:24 | lyro | running this program shows "ERROR" |
13:39:36 | lyro | although no exception should be raised |
13:40:24 | * | lyro_ joined #nimrod |
13:43:03 | Araq_ | report it properly please |
13:49:50 | lyro | ok |
13:52:19 | Araq_ | you can try to add a dummy empty 'finally' and see if that changes anything |
13:56:14 | lyro | no, the error still occurs |
13:56:52 | Araq_ | damn |
14:00:47 | Araq_ | add a 'return' in the 'try' block please |
14:02:47 | lyro | this works |
14:03:34 | lyro | but this can only be used if the macro should actually return after the try block :) |
14:05:29 | Araq_ | 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:35 | lyro | should 'return' or 'break' within 'try' still cause the 'finally' block to be run? |
14:11:23 | * | ome joined #nimrod |
14:14:38 | Araq_ | it should indeed iirc |
14:18:37 | lyro | it does in regular code but not within a macro |
14:19:15 | lyro | I could extend the bug report, but it's probably related ;) |
14:19:35 | Araq_ | yup |
14:40:13 | lyro | so, 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:38 | Araq_ | 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:10 | dom96 | hi |
17:54:33 | Demos | hi |
17:55:13 | NimBot | nimrod-code/packages master 15f729f Charlie Barto [+0 ±1 -0]: added Phosphor |
17:55:13 | NimBot | nimrod-code/packages master 76bf05f Dominik Picheta [+0 ±1 -0]: Merge pull request #80 from barcharcraz/master... 2 more lines |
17:56:38 | Demos | wow that was quick |
17:58:16 | dom96 | :) |
18:24:37 | * | zahary joined #nimrod |
18:28:55 | * | Jehan_ joined #nimrod |
18:43:30 | NimBot | Araq/Nimrod devel b1c8461 Araq [+0 ±1 -0]: fixes tinavlid_array_bounds test |
18:43:30 | NimBot | Araq/Nimrod devel dd806ca Araq [+0 ±36 -0]: distinguish between 'defined' and 'declared' |
18:43:30 | NimBot | Araq/Nimrod devel aaf4b04 Araq [+0 ±6 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
19:05:42 | Araq | yay I didn't break the build |
19:05:50 | dom96 | hey Araq |
19:06:03 | Araq | hey 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:54 | Araq | Varriount: people really want fsmonitor |
19:47:11 | dom96 | Yes, please commit it even if it's not finished so that others can work on it |
19:47:21 | * | lyro_ joined #nimrod |
19:48:00 | NimBot | Araq/Nimrod devel 25610a2 Dominik Picheta [+0 ±2 -0]: Fixes incorrect macro stack traces. |
19:48:15 | Araq | lol "fixes" |
19:48:33 | dom96 | Shhhhh |
19:48:43 | Araq | it's some revolutionary heuristic we should blog about |
19:48:53 | Araq | it's hardly a "fix" |
19:48:57 | * | untitaker quit (Ping timeout: 246 seconds) |
19:50:27 | Jehan_ | Hmm. `swap` is not optimized for the case where both arguments are on the heap, do I see that correctly? |
19:51:34 | Araq | should be optimized |
19:51:51 | Araq | aka should not perform RC updates |
19:53:05 | Araq | thinking about it ... can a swap be used to create a cycle? surely it can, right? |
19:53:33 | Araq | then 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:09 | Skrylar | EXetoC: do you still use that opengl wrapper you built? |
20:14:08 | Jehan_ | 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:08 | EXetoC | Skrylar: 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:17 | willwillson | I'm trying to use varargs with procedural types but keep getting an error, see : http://pastie.org/9463132 . Should this work? |
21:45:00 | Araq | the compiler hints you to the proper way to do it |
21:45:31 | Araq | either delcare afunc and bfunc as .closure or use varargs[proc () {.nimcall.}] |
21:45:53 | Araq | the latter is more efficient but less flexible |
22:00:06 | willwillson | Araq: 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:20 | Araq | are you on devel? |
22:02:23 | willwillson | Araq: Yeah, I just compiled from git HEAD an hour ago or so. |
22:03:45 | Araq | report it please then |
22:04:38 | willwillson | Araq: ok, will do |
22:13:08 | Araq | bug #1431 makes me wonder if we have any tests at all |
22:15:45 | Araq | oh I bet it's yet another "do" rewrite bug |
22:16:23 | * | Joe_knock joined #nimrod |
22:20:16 | Araq | nope |
22:20:25 | Araq | it looks like an ancient bug |
22:20:39 | Araq | ah I see |
22:20:48 | Araq | nobody 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:41 | Skrylar | EXetoC: why not? you didn't become a direct-x junkie did you :o |
22:49:00 | EXetoC | Skrylar: no. still don't have windows |
22:49:46 | Skrylar | hrm. i'll have to poke around with GL some time later |
22:50:14 | Skrylar | I think we have active SDL2 bindings in babel still |
22:50:38 | EXetoC | I prefer glfw |
22:52:28 | Skrylar | I tried that in the past |
22:52:31 | Skrylar | It gave me bij. |
22:58:25 | EXetoC | ? |
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:07 | Araq | good night |
23:22:54 | * | Jehan_ quit (Quit: Leaving) |
23:26:07 | OrionPK | RIP robin williams |
23:26:44 | * | flaviu joined #nimrod |
23:26:55 | * | saml_ joined #nimrod |