00:02:04 | * | brson quit (Ping timeout: 264 seconds) |
00:03:54 | * | skyfex quit (Quit: Computer has gone to sleep.) |
00:08:20 | * | darkf_ joined #nimrod |
00:09:28 | * | darkf_ is now known as darkf |
00:13:05 | * | carum joined #nimrod |
00:22:21 | * | ddl_smurf joined #nimrod |
00:29:32 | EXetoC | what up |
00:31:30 | * | nande joined #nimrod |
00:31:56 | renesac | first time in a long time I miss "for: .. else: ..." from python |
00:33:11 | renesac | (the only language that has this construct AFAIK) |
00:33:26 | EXetoC | what are you doing instead? A block might be of help |
00:34:07 | dom96 | renesac: When does the else: branch get executed? |
00:34:25 | renesac | still thinking, actually that for-else may not be the right solution |
00:34:47 | renesac | dom96, if the for ends normally, w/o breaking |
00:34:51 | EXetoC | or maybe that would be reversed then |
00:35:27 | EXetoC | oh. ok I guess not |
00:36:03 | renesac | while-else also exists |
00:43:17 | renesac | while-else is more intuitive |
00:48:53 | renesac | hum, del() and delete() are different things... |
00:49:14 | renesac | should i use one of those or pop() to remove the last item of a seq? |
00:49:33 | renesac | I guess pop(), even if I'm not interested at the return value... |
00:49:52 | dom96 | That depends if you care about the order of the sequence. |
00:50:02 | renesac | I care |
00:50:09 | dom96 | Then don't use del() |
00:50:29 | renesac | right |
00:52:21 | fowl | you can use del on the last member |
00:54:17 | renesac | well, the behaviour isn't precisely defined for that case, but I guess it does the right thing |
00:54:27 | renesac | ie: dont leave a gap |
00:55:06 | renesac | actually, it is defined wrong for this edge case: deletes the item at index i by putting x[high(x)] into position i. |
00:55:06 | renesac | XD |
00:55:26 | renesac | assuming it don't do what it says |
00:57:21 | renesac | I thought I would have trouble with bnum multiplication, but subtraction was the real killer (haven't started division yet :P) |
00:58:20 | renesac | multiplication is done in 9 elegant SLOC (using infrastructure shared with other operations) |
01:02:56 | dom96 | nice |
01:05:56 | renesac | https://gist.github.com/ReneSac/cc7b4281eb2b277db80e <-- just wanted to share :) |
01:06:23 | renesac | signals are treated separately |
01:17:14 | * | brson joined #nimrod |
01:17:36 | renesac | pop should be {.discardable.} |
01:18:25 | renesac | bah, not really important |
01:18:51 | renesac | actually error prevention might be more important |
01:23:11 | * | ddl_smurf quit (Quit: ddl_smurf) |
01:26:58 | dom96 | 'night |
01:35:29 | * | Clinteger\c joined #nimrod |
01:35:29 | * | JStoker joined #nimrod |
01:37:09 | renesac | var a = "a string" |
01:37:13 | renesac | let b = a |
01:37:23 | * | psquid quit (Ping timeout: 252 seconds) |
01:37:25 | renesac | does the second statement imply a deep copy? |
01:37:45 | renesac | or 'let' imply a shallow copy? |
01:38:08 | renesac | (I guess it is a deep copy) |
01:38:31 | * | psquid joined #nimrod |
01:38:52 | renesac | :o |
01:39:08 | renesac | ops, wrong channel |
01:39:30 | fowl | renesac, yesl, string has value semantics, seq is the same way |
01:40:05 | renesac | and any type that has them also deep copies them, right? |
01:40:49 | fowl | yea |
01:40:57 | renesac | ok |
01:41:51 | * | DAddYE joined #nimrod |
01:43:04 | renesac | shalowCopy() should have an usage example |
01:45:59 | * | DAddYE quit (Ping timeout: 240 seconds) |
01:49:50 | * | tinAndi quit (Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424]) |
01:52:12 | * | darkf_ joined #nimrod |
01:55:40 | renesac | shallowCopy could work better as a template |
01:55:51 | renesac | or macro |
01:56:01 | * | darkf quit (Ping timeout: 272 seconds) |
01:56:43 | renesac | I have to declare things first, needing a extra line and repetition, and not being able to benefit from type inference |
01:57:04 | renesac | also, I must declare the new aliases as 'var' |
01:59:03 | * | darkf__ joined #nimrod |
02:01:05 | * | eigenlicht quit (Ping timeout: 272 seconds) |
02:01:11 | EXetoC | renesac: yep, can't do much about that |
02:02:13 | * | Kooda quit (Quit: leaving) |
02:03:45 | * | darkf_ quit (Ping timeout: 272 seconds) |
02:04:16 | EXetoC | and it's probably an uncommon operation |
02:04:47 | renesac | I'm using for this: |
02:04:51 | renesac | shallowCopy longer, if x.len >= y.len: x else: y |
02:05:43 | * | zielmicha joined #nimrod |
02:05:45 | renesac | only creating an alias/ swapping elements |
02:08:48 | * | EXetoC quit (Quit: WeeChat 0.4.2) |
02:15:25 | * | carum quit (Remote host closed the connection) |
02:17:21 | * | DAddYE joined #nimrod |
02:19:27 | * | darkf__ quit (Ping timeout: 272 seconds) |
02:23:31 | * | carum joined #nimrod |
02:24:49 | * | carum quit (Remote host closed the connection) |
02:36:37 | * | zielmicha quit (Quit: Connection closed for inactivity) |
02:53:54 | * | nande quit (Remote host closed the connection) |
03:27:18 | * | DAddYE quit (Remote host closed the connection) |
03:36:33 | renesac | if I return a shallow copy it makes a copy, right? |
03:37:45 | fowl | i dunno, try it |
03:41:03 | renesac | there is no mention about copy semantics on the tutorials, and barely any mention on the manual |
03:41:04 | renesac | :P |
03:41:14 | renesac | those things are aways tricky |
03:47:08 | * | ics joined #nimrod |
03:50:04 | renesac | yeah, it seems that it makes a copy |
03:51:00 | renesac | but when I shallow copy something, it let me modify it even if the original was constant (a non-var parameter) |
03:51:02 | renesac | probably a bug |
03:52:04 | renesac | not sure how to fix it w/o language support.... |
03:56:59 | * | eigenlicht joined #nimrod |
03:59:34 | fowl | i dont think its intended to be used that way |
04:10:59 | * | darkf joined #nimrod |
04:12:57 | * | DAddYE joined #nimrod |
04:15:54 | * | r0b1 joined #nimrod |
04:56:02 | * | Clinteger\c quit (*.net *.split) |
04:56:02 | * | JStoker quit (*.net *.split) |
05:07:24 | * | Clinteger\c joined #nimrod |
05:07:24 | * | JStoker joined #nimrod |
05:11:50 | * | ics quit (*.net *.split) |
05:11:52 | * | cark quit (*.net *.split) |
05:11:53 | * | Varriount quit (*.net *.split) |
05:11:54 | * | betawaffle quit (*.net *.split) |
05:11:54 | * | iNode001 quit (*.net *.split) |
05:11:56 | * | DAddYE quit (*.net *.split) |
05:11:56 | * | darkf quit (*.net *.split) |
05:11:56 | * | eigenlicht quit (*.net *.split) |
05:11:59 | * | r0b1 quit (*.net *.split) |
05:12:03 | * | Zuchto quit (*.net *.split) |
05:12:08 | * | zahary quit (*.net *.split) |
05:12:10 | * | carum joined #nimrod |
05:15:01 | * | carum quit (Remote host closed the connection) |
05:26:29 | * | r0b1 joined #nimrod |
05:26:29 | * | DAddYE joined #nimrod |
05:26:29 | * | darkf joined #nimrod |
05:26:29 | * | eigenlicht joined #nimrod |
05:26:29 | * | Zuchto joined #nimrod |
05:26:29 | * | zahary joined #nimrod |
05:52:26 | * | cark joined #nimrod |
05:52:26 | * | ics joined #nimrod |
05:52:26 | * | Varriount joined #nimrod |
05:52:26 | * | betawaffle joined #nimrod |
05:52:26 | * | iNode001 joined #nimrod |
06:15:17 | * | carum joined #nimrod |
06:35:11 | Varriount | Anyone awake? |
06:41:51 | * | carum quit (Remote host closed the connection) |
06:42:52 | * | carum joined #nimrod |
06:44:52 | * | carum quit (Remote host closed the connection) |
06:46:23 | * | carum joined #nimrod |
06:48:04 | * | carum quit (Remote host closed the connection) |
06:49:57 | * | carum joined #nimrod |
06:54:53 | * | carum quit (Remote host closed the connection) |
07:02:02 | * | carum joined #nimrod |
07:06:29 | * | DAddYE quit (Remote host closed the connection) |
07:16:05 | * | DAddYE joined #nimrod |
07:16:12 | * | aftersha_ joined #nimrod |
07:29:04 | * | renesac quit (Ping timeout: 264 seconds) |
07:31:28 | * | oxful quit (Ping timeout: 264 seconds) |
07:36:59 | * | Demos quit (Read error: Connection reset by peer) |
07:43:00 | * | oxful joined #nimrod |
08:04:29 | * | Varriount quit (Ping timeout: 240 seconds) |
08:21:20 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
08:28:53 | * | brson quit (Changing host) |
08:28:53 | * | brson joined #nimrod |
08:29:23 | * | carum quit (Remote host closed the connection) |
08:29:55 | * | q66 joined #nimrod |
08:32:55 | * | Varriount joined #nimrod |
08:45:57 | * | DAddYE quit (Remote host closed the connection) |
08:47:43 | * | carum joined #nimrod |
08:56:03 | * | DAddYE joined #nimrod |
08:57:15 | * | rixx is now known as rixx_ |
08:57:25 | * | DAddYE quit (Client Quit) |
08:59:10 | * | rixx joined #nimrod |
09:33:33 | * | rixx quit (Quit: WeeChat 0.4.2) |
09:36:09 | * | carum quit (Remote host closed the connection) |
09:36:37 | * | carum joined #nimrod |
09:37:39 | * | rixx_ quit (Quit: leaving) |
09:37:56 | * | rixx joined #nimrod |
09:38:22 | * | skyfex joined #nimrod |
09:41:55 | Araq | hi skyfex |
09:42:05 | skyfex | Hi Araq |
09:42:06 | Araq | so how did you solve the issue? |
09:53:26 | skyfex | Well, like java and javascript, return in finally drops raised exceptions... As for the implementation, there wasn't the contradiction I thought.. if the result variable was assigned first, then the code for the nested finals, and then the jump to return after.. which was the way it actually was implemented.. |
09:55:47 | skyfex | So the only issue was that when it was processing a return, it took every nested try-finally block off the list (to avoid infinite recursion), and then generate the duplicate finally code for those.. but what it actually should have done was take each nested try off the list just before it was to generate its duplicate, add it to the temporary stack, and then add them all back when it finished looping |
09:56:39 | skyfex | So, basically just some bugs in the code.. the basic thinking had been correct, just took me a while to realize that |
09:57:40 | skyfex | Except.. there was this part in genReturnStmt where it called blockLeaveActions with howManyTrys=min(1, nestedTryStmts.len), which I changed to just howManyTrys=nesteedTryStmts.len |
09:57:57 | skyfex | I have no idea why that min(...) was there to begin with.. |
10:00:17 | Araq | well I guess it was some hacky fix |
10:00:45 | Araq | it's great that exception handling finally is correct and I can remove it from my todo :-) |
10:01:13 | Araq | so ... next things you could do: fix the remaining lambda lifting bugs |
10:01:30 | Araq | or you could work on the "stack less" GC |
10:02:51 | Araq | or ... if you want something simple for a break: implement 'union' and 'bits' pragmas |
10:03:16 | Araq | type Foo = object {.union.} ... # generates a 'union' instead of a struct |
10:03:57 | Araq | myField {.bits: 3}: cint # generates int myField : 3 |
10:05:32 | * | brson quit (Quit: leaving) |
10:20:26 | * | zielmicha joined #nimrod |
10:20:49 | * | zielmicha is now known as Guest22908 |
10:21:54 | * | Guest22908 is now known as zielmicha1 |
10:24:30 | skyfex | Araq: Hmm.. I'll think about it, poke around a bit and see which ones I feel like approaching |
10:24:56 | skyfex | btw, I looked at this, but I think you probably have an opinion in how it should be solved: Araq: Btw, |
10:24:59 | skyfex | https://github.com/Araq/Nimrod/issues/930 |
10:25:05 | skyfex | (lol, wrong copy-paste) |
10:25:08 | * | brson joined #nimrod |
10:26:30 | Araq | skyfex: well how top level statements are processed needs to change eventually |
10:26:43 | Araq | but I consider this a minor issue for now |
10:26:51 | * | Clinteger\c quit (Quit: Connection closed for inactivity) |
10:27:40 | Araq | there are lots of other things you could work on, of course |
10:29:47 | NimBot | Araq/Nimrod devel 64a44de Grzegorz Adam Hankiewicz [+0 ±1 -0]: Documents system.readAll() limitations. Refs #298. |
10:29:47 | NimBot | Araq/Nimrod devel a04362b Andreas Rumpf [+0 ±1 -0]: Merge pull request #946 from gradha/pr_documents_readall... 2 more lines |
10:30:47 | Araq | skyfex: btw you can use output: ''' # 3 ' |
10:31:11 | Araq | to get mutli line string literals |
10:34:09 | NimBot | Araq/Nimrod devel 5b6a0ee Audun Wilhelmsen [+1 ±0 -0]: Added tougher test case for return within finally statement. |
10:34:09 | NimBot | Araq/Nimrod devel f42a7e1 Audun Wilhelmsen [+2 ±0 -0]: Added test cases for return in except statements. |
10:34:09 | NimBot | Araq/Nimrod devel 50ca74a Audun Wilhelmsen [+0 ±2 -0]: Fixed #688 : return in except statments. Also fixed return in finally statements. |
10:34:09 | NimBot | Araq/Nimrod devel 3c88933 Audun Wilhelmsen [+8 ±63 -3]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
10:34:09 | NimBot | 1 more commits. |
10:36:44 | * | Kooda joined #nimrod |
10:44:40 | * | BitPuffi1 quit (Ping timeout: 264 seconds) |
10:51:43 | * | EXetoC joined #nimrod |
10:58:15 | * | carum quit (Remote host closed the connection) |
10:58:41 | * | Clinteger\c joined #nimrod |
10:58:41 | * | Clinteger\c quit (Changing host) |
10:58:41 | * | Clinteger\c joined #nimrod |
11:04:35 | * | ddl_smurf joined #nimrod |
11:04:59 | * | ddl_smurf quit (Client Quit) |
11:33:37 | * | zahary1 joined #nimrod |
11:42:15 | * | Kooda quit (*.net *.split) |
11:42:16 | * | skyfex quit (*.net *.split) |
11:42:18 | * | Varriount quit (*.net *.split) |
11:42:19 | * | oxful quit (*.net *.split) |
11:42:23 | * | darkf quit (*.net *.split) |
11:42:23 | * | eigenlicht quit (*.net *.split) |
11:42:25 | * | r0b1 quit (*.net *.split) |
11:42:28 | * | Zuchto quit (*.net *.split) |
11:42:34 | * | zahary quit (*.net *.split) |
11:42:36 | * | cark quit (*.net *.split) |
11:42:36 | * | ics quit (*.net *.split) |
11:42:38 | * | betawaffle quit (*.net *.split) |
11:42:38 | * | iNode001 quit (*.net *.split) |
11:42:39 | * | Clinteger\c quit (*.net *.split) |
11:44:17 | * | aftersha_ joined #nimrod |
11:45:52 | * | ddl_smurf joined #nimrod |
11:47:30 | * | aftersha_ quit (Client Quit) |
11:49:34 | * | oxful joined #nimrod |
11:50:57 | * | rixx quit (Quit: WeeChat 0.4.2) |
11:51:27 | * | rixx joined #nimrod |
12:03:44 | * | carum joined #nimrod |
12:03:44 | * | Clinteger\c joined #nimrod |
12:03:44 | * | skyfex_ joined #nimrod |
12:03:44 | * | eigenlicht joined #nimrod |
12:03:44 | * | Zuchto_ joined #nimrod |
12:03:44 | * | r0b2 joined #nimrod |
12:03:44 | * | cark joined #nimrod |
12:03:44 | * | ics joined #nimrod |
12:03:44 | * | betawaffle joined #nimrod |
12:03:44 | * | iNode001 joined #nimrod |
12:03:50 | * | carum quit (Ping timeout: 240 seconds) |
12:06:47 | * | Varriount joined #nimrod |
12:09:13 | * | vendethiel joined #nimrod |
12:22:03 | * | Arcanum_za is now known as Trixar_za |
12:39:11 | dom96 | hello |
12:44:04 | * | brson quit (Ping timeout: 264 seconds) |
12:47:51 | EXetoC | dom96: lo |
12:48:11 | dom96 | EXetoC: yo sup |
12:51:06 | * | aftersha_ joined #nimrod |
13:05:51 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
13:06:51 | * | Clinteger\c quit (Quit: Connection closed for inactivity) |
13:10:48 | * | ddl_smurf quit (Quit: ddl_smurf) |
13:12:24 | * | ddl_smurf joined #nimrod |
13:32:36 | * | aftersha_ joined #nimrod |
13:33:47 | EXetoC | dom96: code and that. u? |
13:51:54 | EXetoC | too busy working on asyncio2 to respond, surely :> |
13:55:59 | * | BitPuffi1 joined #nimrod |
13:58:15 | * | carum joined #nimrod |
14:03:04 | * | carum quit (Ping timeout: 265 seconds) |
14:05:57 | * | jph98 joined #nimrod |
14:06:11 | * | jph98 left #nimrod (#nimrod) |
14:07:50 | * | ddl_smurf quit (Quit: ddl_smurf) |
14:08:59 | dom96 | EXetoC: Sadly no. Busy getting annoyed by Word. |
14:09:10 | profmakx | word? |
14:09:17 | dom96 | Microsoft Word. |
14:09:29 | profmakx | why would anyone still use _that_? |
14:09:54 | dom96 | Sadly it's not my choice to make. |
14:10:25 | * | profmakx routinely annoys the uni's admin staff |
14:10:33 | profmakx | with saying "i cannot open that document you sent me" |
14:13:55 | dom96 | It's a bit late for me to argue with my exam board about their ICT spec. |
14:14:52 | profmakx | admittedly i am in a slight better situation |
14:15:04 | profmakx | i've been there too though |
14:15:07 | profmakx | with applications mainly |
14:15:13 | profmakx | job applications that is |
14:16:28 | * | io2 joined #nimrod |
14:17:18 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
14:17:23 | * | io2 quit (Client Quit) |
14:18:25 | * | io2 joined #nimrod |
14:19:12 | * | io2 quit (Client Quit) |
14:22:24 | * | io2 joined #nimrod |
14:25:04 | * | JStoker quit (Excess Flood) |
14:26:30 | * | JStoker joined #nimrod |
14:39:15 | * | Endy joined #nimrod |
14:42:22 | * | q66 quit (Quit: Leaving) |
14:43:41 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:16:12 | * | aftersha_ joined #nimrod |
15:27:02 | fowl | Error: internal error: value expected, but got a type |
15:27:02 | fowl | No stack traceback available |
15:27:03 | fowl | >:( |
16:03:06 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
16:18:16 | Varriount | Hm. |
16:18:59 | Araq | fowl: you know, you could report bugs ... |
16:23:09 | fowl | i cant find whats causing it |
16:24:31 | Varriount | Araq, dom96: Is it still ok to add ideas to the GSoC list? |
16:24:58 | Araq | Varriount: I don't think so |
16:25:24 | Araq | they will tell us by the end of the week, right? |
16:25:30 | Varriount | Araq: Is it ok to add feature requests to the issue tracker then? |
16:25:44 | Araq | yes |
16:25:47 | dom96 | Araq: They will tell us tomorrow. |
16:25:53 | Araq | :O |
16:25:54 | dom96 | Varriount: So better wait until then. |
16:26:09 | * | Varriount finds himself missing python's 'else' statement for 'for' and 'while' statements |
16:26:19 | Araq | Varriount: oh come on |
16:26:32 | Varriount | :3 |
16:26:35 | Araq | named block + break achieves the same and is not nearly as weird |
16:26:49 | Araq | and is a well known replacement :P |
16:27:38 | Araq | fowl: I told you I don't need reduced test examples for these things |
16:29:57 | Varriount | Araq: What repositories/packages is babel supposed to test? All of them? |
16:30:34 | Varriount | Er, I mean, what packages/repos is testament supposed to test through babel |
16:30:43 | fowl | is babel going to be shipped with 0.9.4 |
16:30:57 | Araq | Varriount: we always need the stuff in nimrod-code, and the others should be optional |
16:31:15 | Varriount | fowl: I don't think so. |
16:31:21 | Araq | with the default being "disabled" of course |
16:31:37 | fowl | why not :/ |
16:31:37 | Araq | fowl: but it's a good idea ... hm |
16:32:01 | fowl | after compiling you can babel install babel to get the latest version |
16:33:08 | Varriount | Yeah, do what python plans to do. Have a minimal version of babel packaged with nimrod, and allow users to have a complete installation of babel if needed. |
16:35:15 | dom96 | Babel is already pretty minimal. |
16:42:42 | Varriount | (Un)fortunately |
16:44:43 | * | skyfex_ quit (Quit: Computer has gone to sleep.) |
16:47:12 | * | ics joined #nimrod |
16:52:09 | * | ddl_smurf joined #nimrod |
16:52:28 | * | oxful quit (Ping timeout: 264 seconds) |
16:52:41 | Varriount | Araq, dom96 : Which would you prefer, babel reading from an environment variable to get an alternate location for it's installation directory, or from a config file? |
16:56:00 | * | renesac joined #nimrod |
16:56:24 | Araq | Varriount: env vars suck, I avoid them when I can |
16:56:35 | * | Kooda joined #nimrod |
17:00:19 | * | carum joined #nimrod |
17:05:04 | * | carum quit (Ping timeout: 264 seconds) |
17:06:08 | * | oxful joined #nimrod |
17:09:11 | Varriount | Hm. In this case, I don't think I can avoid them, since babel's installation directory is in with the installation dir of all the other packages. |
17:10:00 | Araq | I think babel should go besides nimrod.exe |
17:10:25 | Araq | and be included from now with the compiler |
17:10:55 | Araq | we already moved some essential packages to babel |
17:11:15 | * | Varriount looks at dom96 |
17:17:31 | * | ddl_smurf quit (Quit: ddl_smurf) |
17:51:44 | dom96 | Varriount: config |
17:52:07 | dom96 | Araq: Sure, do that. But only for the windows installer. |
17:52:08 | Varriount | dom96: Where's the config? |
17:52:13 | dom96 | Varriount: There is none yet. |
17:53:45 | Araq | dom96: aww. why? |
17:54:04 | dom96 | Araq: Because those are the only binaries we distribute anyway? |
17:55:15 | Araq | c2nim (and pas2nim) should become babel packages, babel itself should be part of the nimrod distribution |
17:55:20 | Araq | imho |
17:55:52 | * | zielmicha1 is now known as zielmicha |
17:56:13 | Araq | zielmicha: I fear merging your PR with all that linux specific stuff :P |
17:56:35 | Araq | you did test it well, right? |
17:57:09 | zielmicha | I understand. |
17:57:36 | zielmicha | Safer alternative may be to disable useClone by default |
17:58:10 | zielmicha | while leaving throwing errors on failed execv enabled |
17:58:32 | Araq | why did you choose this approach and not 'vfork' btw? |
17:58:40 | * | Demos joined #nimrod |
17:59:54 | zielmicha | It's safer - it uses smaller amount of undefined behaviors in C. |
18:00:33 | fowl | :o |
18:00:34 | zielmicha | And I thought that vfork works reliably (you can modify memory) only on Linux, so why not use Linux specific clone |
18:02:46 | Araq | does posix_spawn work on BSD reliably? |
18:04:13 | zielmicha | manpage says it does |
18:04:25 | zielmicha | (at least NetBSD one) |
18:04:47 | Araq | so we have 4 implementations for 4 OSes ... yay. what's the point of posix again? :P |
18:06:21 | * | skyfex_ joined #nimrod |
18:08:58 | zielmicha | At least fork() and clone() ones share a lot of code. |
18:11:27 | zielmicha | Is there function similar to `eval` which could be used in macros? |
18:11:55 | zielmicha | (If I understand correctly that VM dynamically typed) |
18:12:55 | Araq | there used to be system.eval but I removed it cause it's too confusing |
18:13:10 | Araq | (did a compiletime eval) |
18:13:36 | Araq | not sure what you're asking for |
18:13:46 | zielmicha | I'd like to do eval("foo" & name), assuming that `"foo"&name` is compile-time computable |
18:14:27 | zielmicha | inside macro |
18:14:42 | Araq | there is macros.emit |
18:15:38 | zielmicha | ah, and I'd like to get result of this `eval` to use during the rest of macro |
18:16:19 | Araq | there is 'parseExpr' and 'parseStmt' for usage in macros |
18:18:03 | zielmicha | I know, but I don't want to get parse tree, but value. |
18:18:17 | zielmicha | I found the revision with system.eval, maybe it will be what I want. |
18:22:56 | Varriount | Araq: I need some help with PEGS, I'm doing something wrong - https://gist.github.com/Varriount/9175147 |
18:24:29 | * | ics quit (Ping timeout: 240 seconds) |
18:25:23 | * | diltsman joined #nimrod |
18:25:40 | * | ics joined #nimrod |
18:25:55 | diltsman | where do you get the babel program? I'm not seeing that as having been installed with the compiler. |
18:27:21 | Varriount | diltsman: It's in github, search for it under the user 'nimrod-code |
18:27:30 | Varriount | 'nimrod-code' |
18:30:28 | dom96 | https://github.com/nimrod-code/babel |
18:44:17 | Araq | hi diltsman welcome |
18:44:50 | * | zahary joined #nimrod |
18:44:58 | diltsman | Hi, Araq. |
18:45:15 | * | EXetoC quit (Ping timeout: 254 seconds) |
18:45:59 | Araq | Varriount: {slot}+ can't work |
18:46:23 | Araq | ws <- \white* can be done way more efficiently |
18:47:39 | Araq | but you should parse the json list anyway, not invoke babel for that |
18:49:20 | NimBot | Araq/Nimrod devel 24c429f Michał Zieliński [+0 ±1 -0]: osproc: fix naming inconsistiences |
18:49:20 | NimBot | Araq/Nimrod devel b39c1b1 Michał Zieliński [+7 ±88 -3]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
18:49:20 | NimBot | Araq/Nimrod devel 5b279ad Michał Zieliński [+6 ±7 -1]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
18:49:20 | NimBot | Araq/Nimrod devel 1b99ade Michał Zieliński [+1 ±1 -0]: osproc: use clone with CLONE_VM on Linux for faster process spawning |
18:49:20 | NimBot | 3 more commits. |
18:50:33 | Araq | zielmicha: if it doesn't work, I will distress you :P |
18:52:53 | dom96 | ^^ that's what I said. |
19:11:05 | * | Matthias247 joined #nimrod |
19:14:10 | * | oxful_ joined #nimrod |
19:15:59 | * | oxful quit (Ping timeout: 240 seconds) |
19:16:49 | Araq | zielmicha: any idea how to exchange a void* pointer via posix condition variables? |
19:18:07 | zielmicha | Exchange? I don't get what you mean. |
19:18:24 | Araq | signal(myvar, myvalue) |
19:18:38 | * | diltsman_ joined #nimrod |
19:18:43 | Araq | let myvalue = await(myvar) |
19:19:27 | zielmicha | maybe queue would be appropriate for that? |
19:20:04 | zielmicha | (I think it needs to be implemented on top of posix primivites.) |
19:20:30 | zielmicha | (there are posix queues, but they are deprecated on desktop systems) |
19:20:38 | * | diltsman quit (Ping timeout: 245 seconds) |
19:21:38 | zielmicha | (by desktop I mean non-embedded) |
19:21:56 | Araq | well it's hard to emulate it with posix primitives |
19:22:20 | Araq | (yes I'm using them to implement queues/channels) |
19:23:06 | Araq | but ok, "channel over channel" would work |
19:24:25 | zielmicha | You may want to look at https://github.com/python-git/python/blob/715a6e5035bb21ac49382772076ec4c630d6e960/Lib/Queue.py |
19:24:35 | zielmicha | It's probably not too effecient, but rather simple |
19:25:34 | Araq | well I know how to implement a queue, I already have |
19:25:44 | Araq | (see TQueue for threading) |
19:26:23 | Araq | I'm thinking about a go-like 'select' statement that can wait on multiple channels |
19:26:31 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
19:26:32 | Araq | (err, I mean TChannel lol) |
19:27:34 | zielmicha | I would use pipes and select/epoll for waiting on multiple channels |
19:27:42 | Matthias247 | let all of them be associated to the same condition variable. And signal that when any packet arries |
19:28:15 | Matthias247 | alternatively: use (e)poll for signalisation as zielmicha said |
19:28:23 | Araq | Matthias247: yes but then you need to tell *which* channel got any data |
19:28:29 | zielmicha | (locks is an area where windows kernel API is better than Linux one, ihmo) |
19:28:36 | Araq | hence the need to send back a pointer via signal |
19:28:58 | * | diltsman_ quit (Ping timeout: 245 seconds) |
19:29:31 | Araq | or else you ask each channel whether it got any data |
19:29:35 | Matthias247 | you could store a structure that contains the select information in the channel structures. |
19:30:10 | Matthias247 | that would contain a condition variable (that is signaled when anybody puts a packet in) and a pointer that tells which channel got data |
19:30:40 | Matthias247 | hmm, but you probably need an additonal mutex therein which would be shared by all channels. Sounds somehow deadlock prone :( |
19:31:28 | zielmicha | or you could just use mutex associated with condition |
19:31:30 | Matthias247 | Future<T> = mychannel.async_receive() :-) |
19:31:47 | * | skrylar cringes. |
19:32:41 | * | diltsman joined #nimrod |
19:35:14 | Araq | meh a linear search on the list of channels is just fine |
19:35:48 | Araq | it's racy anyway, another consumer could already have taken the value out of the queue |
19:36:13 | * | zahary quit (Quit: Leaving.) |
19:37:14 | Araq | in fact ... we need a tryRecv ... |
19:39:23 | Demos | can I rely on the fact that system.Open is always going to open in binary mode? |
19:39:39 | Araq | yes |
19:42:30 | * | carum joined #nimrod |
19:42:41 | Demos | OK great. Thanks |
19:44:54 | skrylar | sometimes i wonder if i'm derping by writing a GUI instead of just using wx |
19:46:18 | Varriount | Araq: So is 'vfork' some sort of cross-platform fork that will work on windows? |
19:47:11 | Araq | skrylar: wx's API is not good though plus it's a pita to build |
19:47:44 | Araq | Varriount: no 'vfork' is an attempt to fix 'fork' but later they found out it works even worse |
19:48:35 | skrylar | Araq: yeah but sometimes its a question of "is my solution better than this one that exists and everyone already uses" |
19:49:16 | skrylar | I know wx can use a few megabytes in overhead which is really weird considering a library that primarily wraps native APIs should be small |
19:49:36 | * | Varriount thinks that futures need to be separate from asyncio |
19:49:52 | * | JStoker quit (Excess Flood) |
19:50:09 | * | vendethiel quit (Write error: Broken pipe) |
19:50:31 | * | zielmicha quit (Ping timeout: 330 seconds) |
19:51:03 | * | vendethiel joined #nimrod |
19:52:04 | * | zielmicha1 joined #nimrod |
19:52:19 | skrylar | i think i failed the idea of composition for GUIs, because i've ended up with classes (albeit shallow classes) |
19:52:59 | * | JStoker joined #nimrod |
19:55:26 | Araq | skrylar: ;-) I think the way to design UIs is to use component programming |
19:56:15 | skrylar | Araq: what i do here is basically have the minimal set, text and images (no images right now because this is the ncurses backend), and the other widgets are those |
19:56:29 | diltsman | When getting Nimrod from Nimbuild, do I just drop the content over the install for 0.9.2? |
19:56:59 | Araq | Varriount: we'll get futures for async and other futures for inter thread communication. This has already been discussed as the right way to do it. :P |
19:57:08 | Araq | diltsman: sure why not |
19:57:28 | skrylar | Araq: so a checkbox is a subclass of morph who instantiate "button" and "text" together; still a subclass, but not a very large one |
19:57:33 | diltsman | Ok, just wanted to make sure that wouldn't break something. |
19:57:53 | Varriount | Araq: Can you point me to the discussion? |
19:59:04 | Araq | Varriount: no sorry, we discussed it ~10 days ago |
19:59:22 | fowl | skrylar, ive given up on oop for gui |
19:59:49 | skrylar | fowl: whats wrong with OOP? |
20:00:21 | * | EXetoC joined #nimrod |
20:01:26 | fowl | the complexity gets too damn high |
20:01:31 | skrylar | I don't see too many complaints with how the DOM is used for making interfaces |
20:02:02 | skrylar | fowl: i guess i just haven't gotten far enough to have to deal with that yet |
20:02:35 | skrylar | i've been moderately okay at minimizing ine interface lately, but its due for some legitimate planned refactoring :/ |
20:03:12 | * | r0b2 quit (Quit: WeeChat 0.4.2) |
20:03:53 | skrylar | though i guess it depends on the model you're going after |
20:04:35 | * | carum quit (Remote host closed the connection) |
20:06:20 | fowl | this my latest attempt https://github.com/fowlmouth/roids/blob/master/private/sfgui2.nim |
20:07:29 | * | r0b1 joined #nimrod |
20:08:33 | Araq | fowl: ever tried an "immediate mode ui" for games? |
20:10:39 | fowl | Araq, yea but sfml lend itself well to that |
20:10:51 | fowl | doesnt* |
20:13:06 | skrylar | oh gibbus |
20:13:11 | skrylar | I hate immediate mode UIs |
20:13:24 | skrylar | You're still making a draw tree, you're just throwing it out every frame x.x |
20:13:59 | skrylar | I think Unity has popularized the immediate GUI with that being how they do things, and yet there is a healthy submarket for GUI replacers ;o |
20:16:10 | Araq | meh, I love immediate mode UIs :P |
20:16:34 | dom96 | hello r0b1 |
20:16:36 | skrylar | meh. |
20:17:04 | Araq | you're in full control, no listeners no callback hell, no "can this run in the main thread, what is the GUI thread" hell |
20:17:50 | skrylar | you just get inefficiency hell instead :( |
20:18:09 | Araq | how so? it can't get more efficient than an immediate mode UI |
20:18:24 | Araq | it's a quite low level model |
20:18:36 | Araq | maybe unity does it wrong :P |
20:19:16 | skrylar | Rocket (and others maybe?) wrap up most of the static elements in a VBO |
20:19:36 | skrylar | so a huge swoth of the GUI is just a draw call |
20:20:01 | r0b1 | hey dom96 |
20:20:10 | skrylar | changing a font field trips the whole Unicode hell train through doing the font layouts once, cache it in to a VBO/texture and carry on |
20:20:43 | skrylar | as opposed to an immediate UI which gets to go through and rebuild the vertices every frame, in addition to alloc/gc'ing its objects |
20:22:18 | skrylar | would be interesting to see the bench specs for similar immediate and tree-based GUI libs though |
20:23:37 | skrylar | Araq: for instance, data-driven (which a tree GUI arguably is) gets to benefit from throwing a tweening lib or an animation engine over; like Godot's where you can tell it to animate the GUI and walk away, how do you deal with 'tween and forget' in immediate mode? |
20:26:28 | Araq | by creating an "animated button" instead of a button? I don't get your question |
20:27:10 | skrylar | so to animate you have to make a special class of existing widgets ot put animation code in every widget... |
20:27:43 | skrylar | i sense this is just a "data driven vs scripted" conversation that usually ends in a tooling v. scripting debate that goes nowhere |
20:29:01 | Araq | well you can easily do if ticker mod 2 == 1: drawUI_stateA() else: drawUI_state() to get your animation |
20:29:23 | diltsman | Any idea why I am seeing "error: size of array 'assert_numbits' is negative" when compiling babel? |
20:29:55 | Araq | diltsman: your installation is screwed, gcc and nimrod don't agree on the bit size of a pointer |
20:30:37 | * | Mordecai joined #nimrod |
20:30:39 | Araq | skrylar: you can't get *more* control than with an immediate mode UI ... |
20:30:59 | * | Mordecai is now known as Guest2317 |
20:31:04 | skrylar | Araq: i wasn't questioning the control |
20:31:18 | diltsman | Araq: That makes sense. I installed 0.9.2 from the .exe and then dropped the x86_64 nimbuild on top. |
20:31:23 | skrylar | Araq: i was pointing out that in a data-model, you can let the engine do a lot of boring things |
20:32:04 | * | psquid quit (Ping timeout: 264 seconds) |
20:33:54 | * | Matthias247 quit (Read error: Connection reset by peer) |
20:34:17 | Araq | skrylar: back in the delphi day, people used a timer event to get the 'tick' that makes a game main loop work. This is horribly backwards. |
20:34:52 | skrylar | Araq: in that context it is backwards, yeah. |
20:35:29 | skrylar | it's not *all* an either-or ordeal though |
20:37:58 | skrylar | it kind of reminds me also of the argument they have in template libraries; whether to allow inline code or not |
20:38:25 | skrylar | because if a template doesn't allow inline code then you know its safe, but its slightly more of a pain to prepare data in advance; where a template that allows inline code is easier in the short-term, but now you have to debug it too. *shrug* |
20:39:12 | Varriount | dom96: Any idea why babel never exits when I run it via 'waitForExit(startProcess("babel", "", ["install", "babel"]))' ? |
20:39:24 | * | eron joined #nimrod |
20:39:44 | Araq | the "data driven" approach has the inherent problem that it is not data driven at all, it keeps it's own *copy* of the state and then you have to update that state explicitly. The immediate mode UI just reads from the global state which represents the truth |
20:40:00 | Araq | hi eron welcome |
20:40:09 | eron | oh hi |
20:40:32 | zielmicha1 | Varriout: do you run really recent devel? |
20:41:17 | zielmicha1 | Araq: https://github.com/Araq/Nimrod/pull/952 or https://github.com/Araq/Nimrod/pull/953 |
20:41:41 | skrylar | i've seen some attempts to deal fix that (e.g. actions in Qt which let you update menu/toolbar enabled state through an object separate from those controls) but yeah, most people derp it a bit |
20:41:51 | * | Trixar_za quit (Ping timeout: 245 seconds) |
20:42:42 | * | eron quit (Client Quit) |
20:43:01 | NimBot | Araq/Nimrod devel 2310f0a Michał Zieliński [+0 ±1 -0]: osproc: increase stack size from 8k to 64k |
20:43:01 | NimBot | Araq/Nimrod devel 10f198e Michał Zieliński [+0 ±1 -0]: osproc: use fork by default on Linux, clone if requested by useClone flag |
20:43:01 | NimBot | Araq/Nimrod devel 8df13d4 Andreas Rumpf [+0 ±1 -0]: Merge pull request #953 from zielmicha/vfork... 2 more lines |
20:43:12 | skrylar | i would actually like my GUI engine to be data-driven; its just not to the stage where i can prototype doing that yet |
20:43:49 | skrylar | i was looking at Blender thinking about "what is a good abstraction to break /all/ of the events so it could show up in the press-space-to-search menu?" because right now they end up repeating themselves a lot |
20:45:23 | * | Trixar_za joined #nimrod |
20:45:33 | Varriount | zielmicha1: Relatively recent, but not the latest |
20:46:41 | diltsman | I just opened a file with aporia. When I tried to build it I get "Error: unhandled exception: The system cannot find the file specified." Any ideas? |
20:47:47 | zielmicha1 | Varriount: if >(today 19:49:19), update to newest, because I have temporarily broken osproc |
20:47:51 | skrylar | diltsman: sounds like it can't find the nimrod compiler |
20:48:12 | Araq | zielmicha1: Varriount is on windows and thus not affected |
20:48:26 | Araq | zielmicha1: I pulled your request, does that fix it? |
20:48:30 | diltsman | srkylar: nimrod.exe is in the PATH variable. |
20:48:31 | * | carum joined #nimrod |
20:48:38 | zielmicha1 | Araq: yes |
20:48:59 | * | carum quit (Read error: Connection reset by peer) |
20:49:20 | * | carum joined #nimrod |
20:50:02 | * | carum quit (Client Quit) |
20:53:23 | dom96 | Varriount: The stdout pipe gets blocked. |
20:53:31 | dom96 | Varriount: You need to read from it. |
20:53:37 | Varriount | dom96: Nope. I found the problem |
20:54:05 | dom96 | Varriount: What was it? |
20:54:28 | Varriount | Apparently, even when passed the reject option, 'babel install' still prompts if the user wants to overwrite an already-installed package |
20:54:36 | Varriount | -_ |
20:54:39 | Varriount | -_- |
20:55:19 | dom96 | I see. |
20:55:35 | * | OrionPK joined #nimrod |
21:00:20 | dom96 | Varriount: Report it please |
21:00:21 | dom96 | bbl |
21:01:01 | * | brson joined #nimrod |
21:20:29 | * | Endy quit (Ping timeout: 241 seconds) |
21:25:24 | * | diltsman quit (Quit: Page closed) |
21:29:30 | Varriount | This is odd. When I use osProc.outputStream on a process, nimrod complains that its returning a string.. |
21:50:39 | * | r0b2 joined #nimrod |
21:50:45 | * | r0b1 quit (Quit: WeeChat 0.4.2) |
21:57:45 | skyfex_ | /topic |
21:57:57 | skyfex_ | ooops, got a space there |
21:59:44 | Demos | just finished my nimrod wrapper for libpng. Now on to making it nimrodic and easy to use |
22:02:57 | Araq | Demos: no, put it on babel already |
22:03:07 | Demos | I just made a pr |
22:03:12 | Araq | great |
22:05:43 | Araq | I love it when I come up with a "greater much better less bug prone design" that ends up being as problematic as the old design |
22:08:03 | * | carum joined #nimrod |
22:08:35 | Araq | " Yes, I know, it's just a simple function to display a window, but it has grown little hairs and stuff on it and nobody knows why. Well, I'll tell you why: those are bug fixes. " |
22:08:51 | Araq | Joel is a genius |
22:09:10 | * | profmakx wonders what Araq is talking about |
22:09:35 | Araq | profmakx: http://www.joelonsoftware.com/articles/fog0000000069.html |
22:10:11 | renesac | yeah, this is classic |
22:24:36 | Araq | so skyfex_ have you decided on a new project? ;-) |
22:24:52 | * | Araq is pushing skyfex_ subtly |
22:25:25 | skrylar | hah. i was just looking at freeplane to do refactoring and you post a link about refactoring |
22:25:28 | skrylar | yay synchronicities |
22:27:06 | * | ddl_smurf joined #nimrod |
22:48:11 | * | EXetoC quit (Read error: No route to host) |
23:01:19 | * | EXetoC joined #nimrod |
23:02:35 | Araq | skyfex_: you know, if you're bored you can always fix exception handling for the JS and C++ targets ... |
23:03:06 | Araq | should be a piece of cake now you're into it |
23:03:15 | * | EXetoC quit (Client Quit) |
23:03:25 | skrylar | is skyfex even awake |
23:04:12 | Araq | who cares he should have a bouncer by now :P |
23:06:08 | * | EXetoC joined #nimrod |
23:13:24 | skrylar | refactoring is about as much fun as eating nails |
23:13:50 | Araq | refactoring is irrelevant |
23:13:56 | Araq | by definition :P |
23:14:37 | skrylar | i'm refactoring at the moment :\ |
23:14:49 | skrylar | making sure all these events have consistent names |
23:15:17 | Araq | name them on* |
23:15:31 | Araq | onBusterActivated |
23:15:51 | skrylar | i had been using the Cocoa names for events, but i didn't do that consistently |
23:16:25 | skrylar | i had a 'didboundschange' and 'wasparented/wasunparented' which are both now XWillChange |
23:31:23 | * | darkf joined #nimrod |