<< 23-02-2014 >>

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:32EXetoCwhat up
00:31:30*nande joined #nimrod
00:31:56renesacfirst time in a long time I miss "for: .. else: ..." from python
00:33:11renesac(the only language that has this construct AFAIK)
00:33:26EXetoCwhat are you doing instead? A block might be of help
00:34:07dom96renesac: When does the else: branch get executed?
00:34:25renesacstill thinking, actually that for-else may not be the right solution
00:34:47renesacdom96, if the for ends normally, w/o breaking
00:34:51EXetoCor maybe that would be reversed then
00:35:27EXetoCoh. ok I guess not
00:36:03renesacwhile-else also exists
00:43:17renesacwhile-else is more intuitive
00:48:53renesachum, del() and delete() are different things...
00:49:14renesacshould i use one of those or pop() to remove the last item of a seq?
00:49:33renesacI guess pop(), even if I'm not interested at the return value...
00:49:52dom96That depends if you care about the order of the sequence.
00:50:02renesacI care
00:50:09dom96Then don't use del()
00:50:29renesacright
00:52:21fowlyou can use del on the last member
00:54:17renesacwell, the behaviour isn't precisely defined for that case, but I guess it does the right thing
00:54:27renesacie: dont leave a gap
00:55:06renesacactually, it is defined wrong for this edge case: deletes the item at index i by putting x[high(x)] into position i.
00:55:06renesacXD
00:55:26renesacassuming it don't do what it says
00:57:21renesacI thought I would have trouble with bnum multiplication, but subtraction was the real killer (haven't started division yet :P)
00:58:20renesacmultiplication is done in 9 elegant SLOC (using infrastructure shared with other operations)
01:02:56dom96nice
01:05:56renesachttps://gist.github.com/ReneSac/cc7b4281eb2b277db80e <-- just wanted to share :)
01:06:23renesacsignals are treated separately
01:17:14*brson joined #nimrod
01:17:36renesacpop should be {.discardable.}
01:18:25renesacbah, not really important
01:18:51renesacactually error prevention might be more important
01:23:11*ddl_smurf quit (Quit: ddl_smurf)
01:26:58dom96'night
01:35:29*Clinteger\c joined #nimrod
01:35:29*JStoker joined #nimrod
01:37:09renesacvar a = "a string"
01:37:13renesaclet b = a
01:37:23*psquid quit (Ping timeout: 252 seconds)
01:37:25renesacdoes the second statement imply a deep copy?
01:37:45renesacor 'let' imply a shallow copy?
01:38:08renesac(I guess it is a deep copy)
01:38:31*psquid joined #nimrod
01:38:52renesac:o
01:39:08renesacops, wrong channel
01:39:30fowlrenesac, yesl, string has value semantics, seq is the same way
01:40:05renesacand any type that has them also deep copies them, right?
01:40:49fowlyea
01:40:57renesacok
01:41:51*DAddYE joined #nimrod
01:43:04renesacshalowCopy() 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:40renesacshallowCopy could work better as a template
01:55:51renesacor macro
01:56:01*darkf quit (Ping timeout: 272 seconds)
01:56:43renesacI have to declare things first, needing a extra line and repetition, and not being able to benefit from type inference
01:57:04renesacalso, 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:11EXetoCrenesac: 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:16EXetoCand it's probably an uncommon operation
02:04:47renesacI'm using for this:
02:04:51renesacshallowCopy longer, if x.len >= y.len: x else: y
02:05:43*zielmicha joined #nimrod
02:05:45renesaconly 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:33renesacif I return a shallow copy it makes a copy, right?
03:37:45fowli dunno, try it
03:41:03renesacthere is no mention about copy semantics on the tutorials, and barely any mention on the manual
03:41:04renesac:P
03:41:14renesacthose things are aways tricky
03:47:08*ics joined #nimrod
03:50:04renesacyeah, it seems that it makes a copy
03:51:00renesacbut when I shallow copy something, it let me modify it even if the original was constant (a non-var parameter)
03:51:02renesacprobably a bug
03:52:04renesacnot sure how to fix it w/o language support....
03:56:59*eigenlicht joined #nimrod
03:59:34fowli 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:11VarriountAnyone 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:55Araqhi skyfex
09:42:05skyfexHi Araq
09:42:06Araqso how did you solve the issue?
09:53:26skyfexWell, 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:47skyfexSo 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:39skyfexSo, basically just some bugs in the code.. the basic thinking had been correct, just took me a while to realize that
09:57:40skyfexExcept.. 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:57skyfexI have no idea why that min(...) was there to begin with..
10:00:17Araqwell I guess it was some hacky fix
10:00:45Araqit's great that exception handling finally is correct and I can remove it from my todo :-)
10:01:13Araqso ... next things you could do: fix the remaining lambda lifting bugs
10:01:30Araqor you could work on the "stack less" GC
10:02:51Araqor ... if you want something simple for a break: implement 'union' and 'bits' pragmas
10:03:16Araqtype Foo = object {.union.} ... # generates a 'union' instead of a struct
10:03:57Araq 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:30skyfexAraq: Hmm.. I'll think about it, poke around a bit and see which ones I feel like approaching
10:24:56skyfexbtw, I looked at this, but I think you probably have an opinion in how it should be solved: Araq: Btw,
10:24:59skyfexhttps://github.com/Araq/Nimrod/issues/930
10:25:05skyfex(lol, wrong copy-paste)
10:25:08*brson joined #nimrod
10:26:30Araqskyfex: well how top level statements are processed needs to change eventually
10:26:43Araqbut I consider this a minor issue for now
10:26:51*Clinteger\c quit (Quit: Connection closed for inactivity)
10:27:40Araqthere are lots of other things you could work on, of course
10:29:47NimBotAraq/Nimrod devel 64a44de Grzegorz Adam Hankiewicz [+0 ±1 -0]: Documents system.readAll() limitations. Refs #298.
10:29:47NimBotAraq/Nimrod devel a04362b Andreas Rumpf [+0 ±1 -0]: Merge pull request #946 from gradha/pr_documents_readall... 2 more lines
10:30:47Araqskyfex: btw you can use output: ''' # 3 '
10:31:11Araqto get mutli line string literals
10:34:09NimBotAraq/Nimrod devel 5b6a0ee Audun Wilhelmsen [+1 ±0 -0]: Added tougher test case for return within finally statement.
10:34:09NimBotAraq/Nimrod devel f42a7e1 Audun Wilhelmsen [+2 ±0 -0]: Added test cases for return in except statements.
10:34:09NimBotAraq/Nimrod devel 50ca74a Audun Wilhelmsen [+0 ±2 -0]: Fixed #688 : return in except statments. Also fixed return in finally statements.
10:34:09NimBotAraq/Nimrod devel 3c88933 Audun Wilhelmsen [+8 ±63 -3]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
10:34:09NimBot1 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:11dom96hello
12:44:04*brson quit (Ping timeout: 264 seconds)
12:47:51EXetoCdom96: lo
12:48:11dom96EXetoC: 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:47EXetoCdom96: code and that. u?
13:51:54EXetoCtoo 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:59dom96EXetoC: Sadly no. Busy getting annoyed by Word.
14:09:10profmakxword?
14:09:17dom96Microsoft Word.
14:09:29profmakxwhy would anyone still use _that_?
14:09:54dom96Sadly it's not my choice to make.
14:10:25*profmakx routinely annoys the uni's admin staff
14:10:33profmakxwith saying "i cannot open that document you sent me"
14:13:55dom96It's a bit late for me to argue with my exam board about their ICT spec.
14:14:52profmakxadmittedly i am in a slight better situation
14:15:04profmakxi've been there too though
14:15:07profmakxwith applications mainly
14:15:13profmakxjob 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:02fowlError: internal error: value expected, but got a type
15:27:02fowlNo stack traceback available
15:27:03fowl>:(
16:03:06*aftersha_ quit (Quit: Computer has gone to sleep.)
16:18:16VarriountHm.
16:18:59Araqfowl: you know, you could report bugs ...
16:23:09fowli cant find whats causing it
16:24:31VarriountAraq, dom96: Is it still ok to add ideas to the GSoC list?
16:24:58AraqVarriount: I don't think so
16:25:24Araqthey will tell us by the end of the week, right?
16:25:30VarriountAraq: Is it ok to add feature requests to the issue tracker then?
16:25:44Araqyes
16:25:47dom96Araq: They will tell us tomorrow.
16:25:53Araq:O
16:25:54dom96Varriount: So better wait until then.
16:26:09*Varriount finds himself missing python's 'else' statement for 'for' and 'while' statements
16:26:19AraqVarriount: oh come on
16:26:32Varriount:3
16:26:35Araqnamed block + break achieves the same and is not nearly as weird
16:26:49Araqand is a well known replacement :P
16:27:38Araqfowl: I told you I don't need reduced test examples for these things
16:29:57VarriountAraq: What repositories/packages is babel supposed to test? All of them?
16:30:34VarriountEr, I mean, what packages/repos is testament supposed to test through babel
16:30:43fowlis babel going to be shipped with 0.9.4
16:30:57AraqVarriount: we always need the stuff in nimrod-code, and the others should be optional
16:31:15Varriountfowl: I don't think so.
16:31:21Araqwith the default being "disabled" of course
16:31:37fowlwhy not :/
16:31:37Araqfowl: but it's a good idea ... hm
16:32:01fowlafter compiling you can babel install babel to get the latest version
16:33:08VarriountYeah, 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:15dom96Babel is already pretty minimal.
16:42:42Varriount(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:41VarriountAraq, 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:24AraqVarriount: 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:11VarriountHm. 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:00AraqI think babel should go besides nimrod.exe
17:10:25Araqand be included from now with the compiler
17:10:55Araqwe 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:44dom96Varriount: config
17:52:07dom96Araq: Sure, do that. But only for the windows installer.
17:52:08Varriountdom96: Where's the config?
17:52:13dom96Varriount: There is none yet.
17:53:45Araqdom96: aww. why?
17:54:04dom96Araq: Because those are the only binaries we distribute anyway?
17:55:15Araqc2nim (and pas2nim) should become babel packages, babel itself should be part of the nimrod distribution
17:55:20Araqimho
17:55:52*zielmicha1 is now known as zielmicha
17:56:13Araqzielmicha: I fear merging your PR with all that linux specific stuff :P
17:56:35Araqyou did test it well, right?
17:57:09zielmichaI understand.
17:57:36zielmichaSafer alternative may be to disable useClone by default
17:58:10zielmichawhile leaving throwing errors on failed execv enabled
17:58:32Araqwhy did you choose this approach and not 'vfork' btw?
17:58:40*Demos joined #nimrod
17:59:54zielmichaIt's safer - it uses smaller amount of undefined behaviors in C.
18:00:33fowl:o
18:00:34zielmichaAnd I thought that vfork works reliably (you can modify memory) only on Linux, so why not use Linux specific clone
18:02:46Araqdoes posix_spawn work on BSD reliably?
18:04:13zielmichamanpage says it does
18:04:25zielmicha(at least NetBSD one)
18:04:47Araqso we have 4 implementations for 4 OSes ... yay. what's the point of posix again? :P
18:06:21*skyfex_ joined #nimrod
18:08:58zielmichaAt least fork() and clone() ones share a lot of code.
18:11:27zielmichaIs there function similar to `eval` which could be used in macros?
18:11:55zielmicha(If I understand correctly that VM dynamically typed)
18:12:55Araqthere used to be system.eval but I removed it cause it's too confusing
18:13:10Araq(did a compiletime eval)
18:13:36Araqnot sure what you're asking for
18:13:46zielmichaI'd like to do eval("foo" & name), assuming that `"foo"&name` is compile-time computable
18:14:27zielmichainside macro
18:14:42Araqthere is macros.emit
18:15:38zielmichaah, and I'd like to get result of this `eval` to use during the rest of macro
18:16:19Araqthere is 'parseExpr' and 'parseStmt' for usage in macros
18:18:03zielmichaI know, but I don't want to get parse tree, but value.
18:18:17zielmichaI found the revision with system.eval, maybe it will be what I want.
18:22:56VarriountAraq: 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:55diltsmanwhere do you get the babel program? I'm not seeing that as having been installed with the compiler.
18:27:21Varriountdiltsman: It's in github, search for it under the user 'nimrod-code
18:27:30Varriount'nimrod-code'
18:30:28dom96https://github.com/nimrod-code/babel
18:44:17Araqhi diltsman welcome
18:44:50*zahary joined #nimrod
18:44:58diltsmanHi, Araq.
18:45:15*EXetoC quit (Ping timeout: 254 seconds)
18:45:59AraqVarriount: {slot}+ can't work
18:46:23Araqws <- \white* can be done way more efficiently
18:47:39Araqbut you should parse the json list anyway, not invoke babel for that
18:49:20NimBotAraq/Nimrod devel 24c429f Michał Zieliński [+0 ±1 -0]: osproc: fix naming inconsistiences
18:49:20NimBotAraq/Nimrod devel b39c1b1 Michał Zieliński [+7 ±88 -3]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
18:49:20NimBotAraq/Nimrod devel 5b279ad Michał Zieliński [+6 ±7 -1]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
18:49:20NimBotAraq/Nimrod devel 1b99ade Michał Zieliński [+1 ±1 -0]: osproc: use clone with CLONE_VM on Linux for faster process spawning
18:49:20NimBot3 more commits.
18:50:33Araqzielmicha: if it doesn't work, I will distress you :P
18:52:53dom96^^ 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:49Araqzielmicha: any idea how to exchange a void* pointer via posix condition variables?
19:18:07zielmichaExchange? I don't get what you mean.
19:18:24Araqsignal(myvar, myvalue)
19:18:38*diltsman_ joined #nimrod
19:18:43Araqlet myvalue = await(myvar)
19:19:27zielmichamaybe queue would be appropriate for that?
19:20:04zielmicha(I think it needs to be implemented on top of posix primivites.)
19:20:30zielmicha(there are posix queues, but they are deprecated on desktop systems)
19:20:38*diltsman quit (Ping timeout: 245 seconds)
19:21:38zielmicha(by desktop I mean non-embedded)
19:21:56Araqwell it's hard to emulate it with posix primitives
19:22:20Araq(yes I'm using them to implement queues/channels)
19:23:06Araqbut ok, "channel over channel" would work
19:24:25zielmichaYou may want to look at https://github.com/python-git/python/blob/715a6e5035bb21ac49382772076ec4c630d6e960/Lib/Queue.py
19:24:35zielmichaIt's probably not too effecient, but rather simple
19:25:34Araqwell I know how to implement a queue, I already have
19:25:44Araq(see TQueue for threading)
19:26:23AraqI'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:32Araq(err, I mean TChannel lol)
19:27:34zielmichaI would use pipes and select/epoll for waiting on multiple channels
19:27:42Matthias247let all of them be associated to the same condition variable. And signal that when any packet arries
19:28:15Matthias247alternatively: use (e)poll for signalisation as zielmicha said
19:28:23AraqMatthias247: yes but then you need to tell *which* channel got any data
19:28:29zielmicha(locks is an area where windows kernel API is better than Linux one, ihmo)
19:28:36Araqhence the need to send back a pointer via signal
19:28:58*diltsman_ quit (Ping timeout: 245 seconds)
19:29:31Araqor else you ask each channel whether it got any data
19:29:35Matthias247you could store a structure that contains the select information in the channel structures.
19:30:10Matthias247that 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:40Matthias247hmm, but you probably need an additonal mutex therein which would be shared by all channels. Sounds somehow deadlock prone :(
19:31:28zielmichaor you could just use mutex associated with condition
19:31:30Matthias247Future<T> = mychannel.async_receive() :-)
19:31:47*skrylar cringes.
19:32:41*diltsman joined #nimrod
19:35:14Araqmeh a linear search on the list of channels is just fine
19:35:48Araqit's racy anyway, another consumer could already have taken the value out of the queue
19:36:13*zahary quit (Quit: Leaving.)
19:37:14Araqin fact ... we need a tryRecv ...
19:39:23Demoscan I rely on the fact that system.Open is always going to open in binary mode?
19:39:39Araqyes
19:42:30*carum joined #nimrod
19:42:41DemosOK great. Thanks
19:44:54skrylarsometimes i wonder if i'm derping by writing a GUI instead of just using wx
19:46:18VarriountAraq: So is 'vfork' some sort of cross-platform fork that will work on windows?
19:47:11Araqskrylar: wx's API is not good though plus it's a pita to build
19:47:44AraqVarriount: no 'vfork' is an attempt to fix 'fork' but later they found out it works even worse
19:48:35skrylarAraq: yeah but sometimes its a question of "is my solution better than this one that exists and everyone already uses"
19:49:16skrylarI 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:19skrylari 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:26Araqskrylar: ;-) I think the way to design UIs is to use component programming
19:56:15skrylarAraq: 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:29diltsmanWhen getting Nimrod from Nimbuild, do I just drop the content over the install for 0.9.2?
19:56:59AraqVarriount: 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:08Araqdiltsman: sure why not
19:57:28skrylarAraq: 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:33diltsmanOk, just wanted to make sure that wouldn't break something.
19:57:53VarriountAraq: Can you point me to the discussion?
19:59:04AraqVarriount: no sorry, we discussed it ~10 days ago
19:59:22fowlskrylar, ive given up on oop for gui
19:59:49skrylarfowl: whats wrong with OOP?
20:00:21*EXetoC joined #nimrod
20:01:26fowlthe complexity gets too damn high
20:01:31skrylarI don't see too many complaints with how the DOM is used for making interfaces
20:02:02skrylarfowl: i guess i just haven't gotten far enough to have to deal with that yet
20:02:35skrylari'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:53skrylarthough i guess it depends on the model you're going after
20:04:35*carum quit (Remote host closed the connection)
20:06:20fowlthis my latest attempt https://github.com/fowlmouth/roids/blob/master/private/sfgui2.nim
20:07:29*r0b1 joined #nimrod
20:08:33Araqfowl: ever tried an "immediate mode ui" for games?
20:10:39fowlAraq, yea but sfml lend itself well to that
20:10:51fowldoesnt*
20:13:06skrylaroh gibbus
20:13:11skrylarI hate immediate mode UIs
20:13:24skrylarYou're still making a draw tree, you're just throwing it out every frame x.x
20:13:59skrylarI 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:10Araqmeh, I love immediate mode UIs :P
20:16:34dom96hello r0b1
20:16:36skrylarmeh.
20:17:04Araqyou'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:50skrylaryou just get inefficiency hell instead :(
20:18:09Araqhow so? it can't get more efficient than an immediate mode UI
20:18:24Araqit's a quite low level model
20:18:36Araqmaybe unity does it wrong :P
20:19:16skrylarRocket (and others maybe?) wrap up most of the static elements in a VBO
20:19:36skrylarso a huge swoth of the GUI is just a draw call
20:20:01r0b1hey dom96
20:20:10skrylarchanging 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:43skrylaras 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:18skrylarwould be interesting to see the bench specs for similar immediate and tree-based GUI libs though
20:23:37skrylarAraq: 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:28Araqby creating an "animated button" instead of a button? I don't get your question
20:27:10skrylarso to animate you have to make a special class of existing widgets ot put animation code in every widget...
20:27:43skrylari sense this is just a "data driven vs scripted" conversation that usually ends in a tooling v. scripting debate that goes nowhere
20:29:01Araqwell you can easily do if ticker mod 2 == 1: drawUI_stateA() else: drawUI_state() to get your animation
20:29:23diltsmanAny idea why I am seeing "error: size of array 'assert_numbits' is negative" when compiling babel?
20:29:55Araqdiltsman: 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:39Araqskrylar: you can't get *more* control than with an immediate mode UI ...
20:30:59*Mordecai is now known as Guest2317
20:31:04skrylarAraq: i wasn't questioning the control
20:31:18diltsmanAraq: That makes sense. I installed 0.9.2 from the .exe and then dropped the x86_64 nimbuild on top.
20:31:23skrylarAraq: 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:17Araqskrylar: 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:52skrylarAraq: in that context it is backwards, yeah.
20:35:29skrylarit's not *all* an either-or ordeal though
20:37:58skrylarit kind of reminds me also of the argument they have in template libraries; whether to allow inline code or not
20:38:25skrylarbecause 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:12Varriountdom96: Any idea why babel never exits when I run it via 'waitForExit(startProcess("babel", "", ["install", "babel"]))' ?
20:39:24*eron joined #nimrod
20:39:44Araqthe "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:00Araqhi eron welcome
20:40:09eronoh hi
20:40:32zielmicha1Varriout: do you run really recent devel?
20:41:17zielmicha1Araq: https://github.com/Araq/Nimrod/pull/952 or https://github.com/Araq/Nimrod/pull/953
20:41:41skrylari'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:01NimBotAraq/Nimrod devel 2310f0a Michał Zieliński [+0 ±1 -0]: osproc: increase stack size from 8k to 64k
20:43:01NimBotAraq/Nimrod devel 10f198e Michał Zieliński [+0 ±1 -0]: osproc: use fork by default on Linux, clone if requested by useClone flag
20:43:01NimBotAraq/Nimrod devel 8df13d4 Andreas Rumpf [+0 ±1 -0]: Merge pull request #953 from zielmicha/vfork... 2 more lines
20:43:12skrylari 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:49skrylari 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:33Varriountzielmicha1: Relatively recent, but not the latest
20:46:41diltsmanI 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:47zielmicha1Varriount: if >(today 19:49:19), update to newest, because I have temporarily broken osproc
20:47:51skrylardiltsman: sounds like it can't find the nimrod compiler
20:48:12Araqzielmicha1: Varriount is on windows and thus not affected
20:48:26Araqzielmicha1: I pulled your request, does that fix it?
20:48:30diltsmansrkylar: nimrod.exe is in the PATH variable.
20:48:31*carum joined #nimrod
20:48:38zielmicha1Araq: 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:23dom96Varriount: The stdout pipe gets blocked.
20:53:31dom96Varriount: You need to read from it.
20:53:37Varriountdom96: Nope. I found the problem
20:54:05dom96Varriount: What was it?
20:54:28VarriountApparently, even when passed the reject option, 'babel install' still prompts if the user wants to overwrite an already-installed package
20:54:36Varriount-_
20:54:39Varriount-_-
20:55:19dom96I see.
20:55:35*OrionPK joined #nimrod
21:00:20dom96Varriount: Report it please
21:00:21dom96bbl
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:30VarriountThis 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:45skyfex_ /topic
21:57:57skyfex_ooops, got a space there
21:59:44Demosjust finished my nimrod wrapper for libpng. Now on to making it nimrodic and easy to use
22:02:57AraqDemos: no, put it on babel already
22:03:07DemosI just made a pr
22:03:12Araqgreat
22:05:43AraqI 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:35Araq" 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:51AraqJoel is a genius
22:09:10*profmakx wonders what Araq is talking about
22:09:35Araqprofmakx: http://www.joelonsoftware.com/articles/fog0000000069.html
22:10:11renesacyeah, this is classic
22:24:36Araqso skyfex_ have you decided on a new project? ;-)
22:24:52*Araq is pushing skyfex_ subtly
22:25:25skrylarhah. i was just looking at freeplane to do refactoring and you post a link about refactoring
22:25:28skrylaryay 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:35Araqskyfex_: you know, if you're bored you can always fix exception handling for the JS and C++ targets ...
23:03:06Araqshould be a piece of cake now you're into it
23:03:15*EXetoC quit (Client Quit)
23:03:25skrylaris skyfex even awake
23:04:12Araqwho cares he should have a bouncer by now :P
23:06:08*EXetoC joined #nimrod
23:13:24skrylarrefactoring is about as much fun as eating nails
23:13:50Araqrefactoring is irrelevant
23:13:56Araqby definition :P
23:14:37skrylari'm refactoring at the moment :\
23:14:49skrylarmaking sure all these events have consistent names
23:15:17Araqname them on*
23:15:31AraqonBusterActivated
23:15:51skrylari had been using the Cocoa names for events, but i didn't do that consistently
23:16:25skrylari had a 'didboundschange' and 'wasparented/wasunparented' which are both now XWillChange
23:31:23*darkf joined #nimrod