<< 08-02-2014 >>

00:06:42*Clinteger\c quit (Ping timeout: 276 seconds)
00:10:56*Clinteger\c joined #nimrod
00:10:56*Clinteger\c quit (Changing host)
00:10:56*Clinteger\c joined #nimrod
00:12:09*darkf joined #nimrod
00:37:54Araqgood night
00:48:25*icebattle quit (Quit: leaving)
01:10:39*carum quit (Remote host closed the connection)
01:26:53*DAddYE_ quit (Remote host closed the connection)
01:27:39*DAddYE joined #nimrod
01:32:03*DAddYE quit (Remote host closed the connection)
01:32:35*DAddYE joined #nimrod
01:37:43*DAddYE quit (Ping timeout: 272 seconds)
02:21:51*askatasuna joined #nimrod
02:25:49*brson quit (Quit: leaving)
02:39:00*dmac joined #nimrod
03:03:05EXetoCso `==`(string, cstring) results in a pointer comparison? it seems kind of useless then
03:11:32*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:40:35Demoswell sometimes "did this cstring come from this string?" is useful. `==` is probably not a good operator for it though
04:00:28*ics joined #nimrod
04:59:35*DAddYE joined #nimrod
05:44:37filwittrying to update babel, but says: Unsatisfied dependency: nimrod (>= 0.9.3)
05:46:12filwiti have my compilers setup just fine, anyway i can just bypass that check?
06:10:21*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:30:29*xtagon quit (Ping timeout: 248 seconds)
06:36:36*foodoo joined #nimrod
06:52:51*micklat joined #nimrod
07:07:53foodooI really like the quotes that are all over Nimrod's webpage+documentation
07:10:28Araqhi foodoo, welcome
07:12:04foodooAh, the creator!
07:12:50foodooI really like the design choices that you have made with Nimrod
07:13:18Araqthank you :-)
07:13:30foodooEspecially some stuff that I miss in Python like declaration of a new variable
07:14:00foodooAnd also the "magic" result variable. I call my return value result most of the time anyway so that was a real wow-moment when I read about it
07:14:34Araqha, many dislike it
07:14:52Araqcan't be good, only delphi and eiffel use it ... ;-)
07:15:02foodooI think it's a nice convention. You immediately know that this is going to be the value that will be returned
07:15:25Araqyeah plus 'return' conflates 'result' with control flow
07:15:46Araqso it's not like the traditional way is cleaner
07:16:18foodooI don't quite understand
07:16:31foodoowhat do you mean by cleaner?
07:17:36foodoo(I never programmed in Delphi or Eiffel)
07:20:08AraqIMO 'result' is cleaner than 'return' because 'return' also affects control flow
07:20:17foodooah, I see
07:26:15*ics joined #nimrod
07:42:11Araqbbl
07:42:15micklatKudos to the creator! Total newb here. Compiling Aporia fails with "analysis not implemented for: nkFinally". Any suggestions?
07:42:38foodooI just played around with c2nim. I tried it with several header files (ncurses.h, stdio.h, signal.h) and it couldn't parse these files. I know this is a hard problem and you might be interested in a solution that the Terra programming language (terralang.org) uses: They simply use Clang/LLVM as a library to do the parsing so that they actually have a real compiler that does the heavy lifting.
07:45:35foodoomicklat: Let me see if I can reproduce the problem. But I'm also new to the language. Which operating system are you on?
07:46:05foodooOkay, the latest git snapshot compiles flawlessly on my system (ArchLinux 64bit)
07:46:20micklatThanks foodoo. I use linux and the git head of nimrod.
07:47:16foodooWhich distribution?
07:48:21foodooAraq: Wow, interfaces to Lua and Python in the standard library. That's cool :)
07:48:44micklatubuntu 12.04
07:50:51micklatThe full error is: lib/pure/osproc.nim(620, 4) Error: internal error: analysis not implemented for: nkFinally
07:50:59foodooah, thanks
07:54:41foodooquit("execve call failed: " & $strerror(errno))
07:54:52foodoois that also your line 620?
07:54:54micklatI tried uncommenting "threadAnalysis:off" in aporia.nimrod.cfg, following https://github.com/nimrod-code/Aporia/issues/49, now the error is further down the line
07:56:05micklatyes, that's my 620
07:56:25micklatanyway, it seems like the nimrod compiler is missing some case
07:56:41micklatI guess I'll file a bug report
07:57:25foodooBut it's still strange that I don't have the same error
07:58:37micklatyes, I suppose.
07:59:13micklatAre you using the head of both nimrod and Aporia? What's your compilation command? I use "babel build"
07:59:50foodooI use nimrod 0.9.2 from the ArchLinux repository (precompiled by someone else)
08:00:39foodooArchLinux has something like build-scripts for packages. There's a commuinty build script for Aporia and it works fine (It doesn't use babel)
08:03:22*Demos quit (Read error: Connection reset by peer)
08:04:45micklatYes, the problem does not seem to occur with nimrod 0.9.2
08:08:47foodooproc bye() =
08:08:50foodoo echo "bye"
08:09:29foodooThis function doesn't have a return value. But I still have to discard the return value when I call it. Is that correct? (At least the compiler says so)
08:15:42micklatfoodoo: I tried your test and don't get a message about discard. I tried both 0.9.2 and head.
08:16:17micklatHow do you call it? I just write bye() on its own line and it works
08:17:17foodoofunny. Now it works
08:28:09*foodoo quit (Quit: so long and thanks for the fishing rod)
08:28:14*noam quit (Read error: Connection reset by peer)
08:28:38*noam joined #nimrod
08:33:48*[1]Endy joined #nimrod
09:04:31*filwit quit (Ping timeout: 260 seconds)
09:14:21*psquid quit (Ping timeout: 245 seconds)
09:20:51*askatasuna quit (Ping timeout: 260 seconds)
09:28:18*DAddYE quit (Remote host closed the connection)
09:39:18*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:46:37Araqhi micklat welcome
09:46:54micklatHi.
09:47:06AraqI suspect there is a corruption in the compiler itself that causes it to misbehave on macosx
09:47:44micklatAre you referring to the internal error I reported earlier (https://github.com/Araq/Nimrod/issues/882) ?
09:47:45Araqthis bug has been there for a long time, I run a hard stress test on the compiler/GC combination but that didn't find anything
09:47:58Araqyes
09:48:05micklatI'm not using max OS
09:48:14Araqoh
09:48:19Araqthat's new :-)
09:49:02micklatIt's ubuntu, 12.04
09:49:18Araqmaybe it's the same issue though
09:49:34micklatanything you'd like me to try?
09:49:41Araqplease bootstrap with --gc:markAndSweep
09:49:49Araqwith or without -d:release
09:49:58Araqand see if the compiler then eats aporia
09:50:06micklatpass that to Koch right?
09:50:30Araqright
10:00:05micklatsame error
10:00:28micklatwhich is kinda expected, isn't it? the error doesn't seem to be GC-related
10:00:45Araqgood
10:01:02Araqwhat's the error message again?
10:01:12Araq(not the nkFinally stuff please)
10:01:40micklatthe nkFinally stuff is the error message
10:01:50micklatyou mean the error I get if I disable thread analysis?
10:01:53Araqyes
10:05:23micklathttp://pastebin.com/ExFj2YBh
10:06:22micklatgcc version 4.6.3
10:11:58Araqok thanks
10:13:37Araqlooks like yet another lovely regression
10:17:46Araqmicklat: can you please try the 'master' branch?
10:18:21micklatsure.
10:34:47*[2]Endy joined #nimrod
10:36:47micklatwith master, M&S, and threadAnalysis:off, I get "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"
10:37:59*[1]Endy quit (Ping timeout: 245 seconds)
10:38:15micklatI get the same error with threadAnalysis:off commented out.
10:38:29Araqwell that leads to the question: what compiler does dom96 use to test aporia?
10:39:39micklatwould you like me to file another bug report?
10:43:01Araqsure why not
10:43:14Araqhowever git bisect would be most useful to see where the regression comes from
10:44:07micklathow do I do that?
10:44:47micklatok, I'm checking the git manual
10:50:44Araqit looks like my changes to the lambda lifting algorithm broke it
10:57:25micklatdo you still want that bisect?
10:57:57Araqyes please
10:58:30Araqbrb
11:03:07*ddl_smurf quit (Quit: ddl_smurf)
11:11:58*psquid joined #nimrod
11:16:50*aftersha_ joined #nimrod
11:23:00dom96Araq: hah, so my hunch was right.
11:23:10dom96Araq: I don't recompile Aporia often.
11:28:55*io2 joined #nimrod
11:35:00*BillPhilson joined #nimrod
11:35:04*BillPhilson left #nimrod (#nimrod)
12:12:54*aftersha_ quit (Quit: Computer has gone to sleep.)
12:30:21micklatAraq: I'm having a bit of a problem with the bisection. With revisions before 2b4173, the compiler fails to build itself, with: "gc_ms.nim(62, 2) Error: undeclared identifier: 'InstantiateForRegion'"
12:30:42micklatcould it be that the c sources I used are incompatible with these older versions?
12:31:01Araqmicklat: no, it's because things change to quickly
12:37:19Araqmicklat: edit compiler/nimrod.nimrod.cfg and remove the --cs:partial switch and it should work
12:37:44Araqbut you really don't have to use --gc:markAndSweep and then it should work too
12:45:02micklatdoesn't seem to work. I'll try again with a clean clone
12:56:56micklatNo, that didn't fix it
12:57:09Araqmicklat: ok, don't worry
12:57:21AraqI will find and fix it later
12:57:31AraqI need to go now, bbl
12:57:37micklatcheers
12:59:06*dmac quit (Ping timeout: 252 seconds)
13:05:43EXetoCwhat does 'cres' (var cres: PState) in builder.nim stand for?
13:10:19dom96closure result probably
13:10:20dom96why?
13:13:14EXetoCI don't get it
13:13:56dom96closures can't capture the implicit 'result' var
13:15:58EXetoCok. it's just a little cryptic. haven't encountered that name before
13:17:18EXetoCI wanted to add support for packages, but I don't know if it's feasible without a babel API
13:18:34dom96I think the tester should have an option to test all babel packages.
13:19:34EXetoCthat should be done in an isolated VM then
13:20:16dom96perhaps.
13:21:40dom96You could just create a babeltest dir, clone all the babel packages there and run babel build.
13:25:15*aftersha_ joined #nimrod
13:44:45*aftersha_ quit (Quit: Computer has gone to sleep.)
13:55:41*psquid quit (Ping timeout: 245 seconds)
13:56:07*psquid joined #nimrod
13:56:19*foodoo joined #nimrod
14:00:57*epsylon` is now known as epsylon
14:09:04*darkf quit (Quit: Leaving)
14:17:14*aftersha_ joined #nimrod
14:21:10*zahary joined #nimrod
14:21:26*oxful joined #nimrod
14:22:33*aftersha_ quit (Quit: Computer has gone to sleep.)
14:25:11*noam quit (Ping timeout: 265 seconds)
14:26:57*noam joined #nimrod
14:30:01renesacI'm still failing on how to make templates with optional arguments AND be able to use the do notation:
14:30:01renesachttps://gist.github.com/ReneSac/715730359e06c472f683
14:30:17renesacError: expression 'swtest()' has no type (or is ambiguous)
14:31:16renesacprobably falls within the "slightly wrong" thing Araq said about my understanding of templates return values
14:32:34dom96I don't think the 'do' is needed.
14:34:52renesacit is
14:35:02renesacwas my first error trying to make this template work
14:35:10renesacit isn't documented (yet)
14:36:25dom96That's weird.
14:36:25*PortableEXetoC joined #nimrod
14:36:46renesacAraq said something about it being needed to avoid ambiguities
14:37:06dom96I see.
14:37:21renesacfrom what I observed, it is needed when the template is used as expression and not as a statment
14:38:55renesacwell, I would like the "do" filling the last argument to the function, and let me not fill the optional arguments before it
14:39:06renesacI will make a feature request about it
14:39:23dom96well I dunno.
14:39:27renesacbut right now, I would like to understand why that won't work
14:41:16*truff__ quit (Quit: Connection closed for inactivity)
14:42:43*io2 quit ()
14:44:21*foodoo quit (Ping timeout: 245 seconds)
14:54:24PortableEXetoCTest
14:56:56renesactested
14:58:24PortableEXetoCNo i was just testing my internets
14:59:02renesacright
14:59:54*aftersha_ joined #nimrod
15:02:19PortableEXetoC50 ms ping out in the woods. Not bad
15:08:56*renesac is now known as renesac|away
15:24:39*aftersha_ quit (Quit: Computer has gone to sleep.)
15:24:43*foodoo joined #nimrod
15:39:26foodooWhen I try the code on the frontpage of nimrod-lang.org I get the following error:
15:39:29foodoostdin.nim(4, 23) Error: undeclared identifier: 'lines'
15:39:40foodooLooks like stdin.lines is not defined. Do I need to import something?
15:41:25OrionPKthat should work with just system
15:41:54OrionPKstdin is a TFile in the system module, and lines(TFile) is also in the system module
15:42:22OrionPKif your module is named stdin it might be confusing it
15:42:59*aftersha_ joined #nimrod
15:44:08foodoothat's it :D
15:44:47OrionPKcool
15:45:37foodoopoor Nimrod compiler was confused by badly chosen file name
15:47:38foodooNimBot: type( "foo" )
15:48:26foodooNimBot: 1 + 1
15:48:45foodooNimBot: help
15:48:57dom96NimBot doesn't do code eval
15:49:49foodooWhat can it do then?
15:50:17dom96It logs this channel, !seen, and commit announcements.
15:53:01OrionPKoh shit
15:53:04OrionPKthis is exciting
15:53:24reactormonkAraq, GoSC?
15:58:23foodoowhat is exciting?
15:59:12OrionPKAraq the leak.nim looks good w/ devel
15:59:41NimBotAraq/Nimrod newasync d4c53dc Araq [+0 ±5 -0]: 'bind' default for clean templates
15:59:41NimBotAraq/Nimrod newasync 5ef71bb Araq [+0 ±3 -0]: made some tests green
15:59:41NimBotAraq/Nimrod newasync 65d572a Araq [+0 ±1 -0]: fixed definition of culong on win64
15:59:41NimBotAraq/Nimrod newasync 89f9b36 Araq [+0 ±1 -0]: attempt to improve line information for '!=' etc. templates
15:59:41NimBot423 more commits.
16:01:09OrionPKAraq the leak one testing websockets still looks like it's leaking a bit
16:02:03OrionPKaraq https://dl.dropboxusercontent.com/u/417554/leak.zip
16:03:05OrionPKit's stable in the console, but the usage in task manager is still going up
16:04:50*aftersha_ quit (Quit: Computer has gone to sleep.)
16:07:00NimBotAraq/Nimrod newasync 0715001 Dominik Picheta [+3 ±1 -0]: Added new sockets modules: asyncio2, net, and sockets2.
16:09:28OrionPKyay progress on async ;)
16:09:46*psquid quit (Ping timeout: 245 seconds)
16:10:54dom96indeed. :)
16:12:47OrionPKim on hiatus til mid march probably
16:13:07OrionPKbuying a house
16:13:34*ddl_smurf joined #nimrod
16:15:04dom96oh, so you won't be around much?
16:16:02OrionPKcorrect
16:16:44OrionPKexcept weekend mornings and downtime at work :)
16:30:16dom96hehe, good.
16:55:21*PortableEXetoC quit (Quit: cake)
17:21:47dom96Araq: ping
17:23:15*Demos joined #nimrod
17:39:30foodoohttp://pastebin.com/CCQx5tje Project Euler Problem #1 solved :)
17:42:53Araqdom96: pong
17:43:14Araqrenesac|away: I think it's a bug
17:43:31Araqfoodoo: thanks we know about LLVM :P
17:44:44Araqwas more fun to write my own parser and it works really nicely when you use it the way it's meant to be used instead of throwing shit at it and wondering why it can't read your mind
17:46:37foodooWell, was just a suggestion
17:47:02foodooDidn't seem that obvious to me when I first learned about Terra
17:47:05EXetoCAraq: what do you mean?
17:47:13EXetoCeither way, it does a pretty good job
17:47:50foodooEXetoC: There is the programming language Terra (http://terralang.org) that uses LLVM to compile C headers to compatible Terra code
17:49:17EXetoCyeah I saw that
17:50:31EXetoCI guess you get a token stream or something
17:51:28Araqfoodoo: I've looked into LLVM before starting c2nim
17:51:58AraqLLVM compiles slowly, and didn't provide #define in a way that is necessary for header translation
17:52:03*ics joined #nimrod
17:52:07AraqI suspect this changed by now
17:52:50foodoocould be. I'm not too familiar with LLVM
17:59:42dom96Araq: Futures are in the branch. Now tell me how to get 'await'.
18:00:02foodooDoes Nimrod support multiple assignment?
18:00:25Araq'await' is just sugar for 'yield', dom96
18:00:39dom96Yes. I know.
18:01:03dom96That's my attempt: https://gist.github.com/dom96/11ba488a29b1fa2abe64
18:02:36Araqfoodoo: no, but 'swap' is builtin
18:03:47foodooAraq: thanks. Although swap() won't work for fibbonacci numbers
18:04:00dom96Araq: Unfortunately the generic cannot be instantiated
18:04:23*filwit joined #nimrod
18:05:03Araqdom96: how could it?
18:05:43dom96Araq: I'm not saying it should be possible. But I'm not sure how else to do the await thing
18:05:54dom96It's not just a simple case of aliasing 'await' to 'yield'
18:07:20Araqyour test iterator yields what p.recv(sock, 10) yields
18:07:39Araqwhich is likely PFuture[string] so I don't see your problem
18:09:24dom96come on
18:09:34dom96there is another yield right above that
18:09:51dom96and you should know that it's not always a string
18:10:47Araqoh sorry
18:13:54*micklat quit (Remote host closed the connection)
18:14:42Araqwell I'm not sure, but have a look at my tasks example
18:15:50Araqeach task has the return type 'void'
18:16:46*shodan45 sighs
18:16:49*filwit quit (Read error: No route to host)
18:16:59shodan45I wish I had time to play with nimrod more :(
18:17:16*filwit joined #nimrod
18:17:27Araqshodan45: I wish I could fix bugs quicklier :-(
18:17:32EXetoCAraq: was anything not in tmongo.nim tested at some point? `[]` for example
18:18:04EXetoCjust curious, because I'm trying to fix it among other things, and I don't know if you can use bson_find in that way
18:18:36AraqEXetoC: everything in tmongo.nim was tested at one point
18:20:37EXetoCthat's the only way the modules were tested? ok
18:21:08shodan45how's that nimrod VM thing going?
18:21:40Araqshodan45: slowly and painfully
18:24:41Araqdom96: I think PFuture[T] can't work for reasons like this
18:25:46Araqyou yield what you want to wait on
18:26:06dom96That is what I want to wait on :P
18:26:15AraqI know
18:26:31Araqhence all events you wait for need to have the same type
18:26:46dom96I'm glad i'm trying this now instead of porting everything to it and then finding out that it may not work.
18:28:59dom96The future has a callback that I can set.
18:29:11dom96Could I perhaps set a closure which would wake up the iterator?
18:29:27dom96and then just yield void?
18:32:27dom96argh, I think that ends up with the same problem
18:34:40*askatasuna joined #nimrod
18:35:04Araqevery event lib either uses a union or inheritance for a reason, dom96
18:35:08Araqhi askatasuna welcome
18:35:56Araqyou use 'yield' to return control flow to the dispatcher
18:36:21Araqyou can either pass a context to the iterator and set in the context what you're waiting for
18:36:42Araqor you yield it instead
18:36:55Araqyielding it is much cleaner, I think
18:37:41Araqevery iterator that you register for the dispatcher must have the same type
18:38:37*aftersha_ joined #nimrod
18:45:37filwitdom96: any way I can get babel to build with a user-defined version of nimrod?
18:45:56dom96filwit: Change the .babel file
18:46:46filwitso removing the check will still work?
18:46:55dom96yes
18:47:05Araqlol
18:47:06dom96well. The checks are there for a reason.
18:47:13filwitokay, why is the check so high then?
18:47:18Araqexactly what I told you, dom96 :P
18:47:20filwitit's just not tested?
18:47:30dom96Araq: shhhh
18:47:35dom96Actually.
18:47:37dom96It won't work.
18:47:47dom96You need --noBabelPaths
18:47:53dom96Which 0.9.2 does not have
18:49:04filwitdamn, okay. Kinda liked my compiler setup (could test 0.9.2 without having to rebuild) but i'll just get rid of the Arch version and make my git/master the default
18:49:34dom96You can just compile babel manually.
18:49:51filwitokay, i'll take that rout
18:50:00dom96In fact, you have to do that anyway lol
18:50:34filwitBSD license :)
18:51:49shodan45what microcontrollers have people used with nimrod? I think I saw AVR somewhere, any others? MSP430?
18:52:00shodan458051?
18:54:06dom96Araq: So the dispatcher should have a list of all the iterators and what they are waiting for?
18:54:20Araqdom96: I think so
18:54:23dom96hrm
18:55:13filwitshodan45, I've never personally tried to program a microcontroller or heard of any Nimrod projects with them. Guys?
18:55:46dom96Araq: Perhaps I could generate some sort of ID for each iterator and then wake the iterator up in the future's callback
18:56:07dom96Although these iterators will have no way of returning values.
18:56:14shodan45hah! nimrod on the eevblog forum!
18:57:23shodan45eep... not very encouraging: http://www.eevblog.com/forum/microcontrollers/interesting-compilerinterpreter/
18:58:27dom96oh yes, I already read that.
18:59:25EXetoCuntyped lolwut
18:59:55shodan45it's fun when different "parts" of your life intersect... I'm a long time subscriber to EEVBlog on youtube :)
19:00:36filwitdom96: built src/babel directly; certain things run fine (./babel update, --help, ect) but not ./babel install opengl
19:00:51filwitdom96: is there something more i need to do to "install" babel from this point?
19:01:29*aftersha_ quit (Quit: Computer has gone to sleep.)
19:02:21dom96put the binary in ~/.babel/bin
19:02:34dom96but why does installing opengl fail?
19:02:37Araqshodan45: nimrod simply works :P use --os:standalone and read the docs
19:02:37filwitk
19:02:58EXetoCsilly whitespace arguments
19:02:59Araqdom96: the point of iterators and 'yield' is to get rid of callbacks
19:03:00*DAddYE joined #nimrod
19:03:32dom96Araq: Yes, but it would be nice to be able to compose these things
19:04:20Araqdom96: but you easily can
19:04:36Araqjust define some 'OR' and 'AND' events that you can wait on
19:04:39filwitdom96: i believe the soft-link in ~/.babel/bin/babel is pointing to an outdated executable (when i updated, I noticed the folder refactoring)
19:04:56filwitone sec
19:06:33dom96Araq: Say for example I want to create a 'readLine' iterator.
19:06:50dom96It will need to return a string at the end
19:07:06dom96'OR' and 'AND' events won't really help I don't think.
19:07:42filwitwait.. i already have a 'babel' on my machine and it's not Nimrod related...
19:08:04EXetoCopenbabel
19:08:17filwitbleh.. nim-babel
19:09:02filwitor babel-nim, something like that (i have nimrod, nimrod-git, nimrod-fil for my compilers, so it fits)
19:09:24dom96It seems that many people have that openbabel thing. I wonder why?
19:09:37dom96Are you actually actively using it?
19:10:37filwitpretty sure it's a dictionary library used by some help centers. It's on my machine probably because of KDE or an old Gnome install
19:10:39EXetoCI don't know what the binary is for
19:10:50filwitjust look at the dep in arch
19:10:51EXetoCI had it I think, but wasn't aware of it
19:11:18dom96'openbabel' is a "chemical toolbox".
19:11:28dom96not sure about other babel's
19:11:32filwitopenbabel is required by kdeedu-kalzium
19:12:48Araqdom96: a readline iterator is a producer, not a consumer
19:12:57filwitkde has all these games and weird applications that are kinda cool, but I never really use them
19:13:16EXetoC""The compiler generates optimized C code" so why wouldn't you just write it in C anyway?"
19:13:20dom96Araq: And what does that mean?
19:13:22AraqI described how consumers can work, not producers
19:13:45EXetoCbut then, why stop at C?
19:13:48askatasunahello everyone, Araq, it's a pleasure to be here. Still reading the docs, I'm sure I'll have worthy questions soon enough.
19:14:11dom96Araq: Ok, then I am saying that I would like a mix of both.
19:14:34Araqdom96: I made up these terms but 'readline' is not something that you register to the dispatcher is it?
19:14:54Araqit's not a task, it's what a task might want to use
19:15:10shodan45ok, I'm not reading any more of that eevblog thread.... hardware people suck at software (and usually vice versa....)
19:16:24AraqEXetoC: indeed, "The C compiler generates optimized assembler" so why wouldn't you just write in assembler anyway?
19:17:11shodan45assembler just generates binaries, so....
19:17:17shodan45:)
19:17:26dom96Araq: Yes, but consider that readLine may want to use 'recv'.
19:18:25dom96hello askatasuna. Welcome to #nimrod :)
19:19:09filwitdom96: babel's installed now, but when i try to install opengl ($ babel-git install opengl ) i get: Unsatisfied dependency: nimrod (> 0.9.2)
19:19:52dom96filwit: Why don't you just rename the nimrod 0.9.2 binary to 'nimrod92' or something?
19:20:10filwitit's part of Arch
19:20:24filwitbut I guess i'll just get rid of it
19:20:35shodan45Araq: you have anything like "a history of nimrod" somewhere? (how old is it, anyway?)
19:20:52Araqdom96: gah, designing this is a pita, look at how c# does it please
19:20:56filwitit's not that important, i'm mostly working off of devel now anyways, it's just some of my macros stuff required 0.9.2
19:22:05Araqdom96: C# has the same restrictions mostly, Python is dynamically typed so we can't copy it
19:23:17EXetoCshodan45: in other words: use magnetized needles for all your programming needs
19:25:30dom96Araq: I don't think C#'s await has these restrictions.
19:27:59Araqdom96: maybe but I do know they use the same transformation
19:28:37dom96Async methods in C# return a Task<TResult>
19:28:53dom96Which is basically equivalent to our PFuture[T]
19:29:10filwitdamn, after uninstalling nimrod from Arch, babel tells me: Couldn't find Nimrod version.
19:29:52filwitbtw, is nimrod itself part of babel?
19:30:05filwitguess i can just check..
19:30:05dom96Well babel obviously needs the nimrod compiler in the PATH to build things.
19:30:10dom96no.
19:31:44filwitoh, duh. sorry i'm retarded, just renamed the compilers..
19:34:12filwiteverything's working now
19:34:39dom96good
19:35:42filwitbabel's root dir probably shouldn't have a 'babe' executable in it right? that's probably leftover from before I updated it?
19:36:07dom96how did that happen lol
19:36:23filwitwell the source used to be in the root directory
19:36:39filwitand it built the exe directly into the root, idk
19:37:00filwitwhen i did git pull, it changed the file structure, but left the executable
19:37:06filwiti think
19:37:49dom96oh. I thought you meant there was literally an exe named 'babe' without the 'l'.
19:37:57dom96Misspelling I guess
19:40:18filwityeah, misspelled that one
19:45:42filwitbtw, the way modules and packages work now is great, Araq
19:46:00dom96Araq: looks like I found a c gen error: https://gist.github.com/dom96/cec842c2d241c9e14d92
19:46:07Araqfilwit: thank you. you're the only one who thinks that though
19:46:28Araqdom96: this is not supported
19:46:42AraqI think ...
19:46:49filwiti like how i can have a Foo.nim alongside a 'Foo/..' directory, and then 'import Foo, Foo.Bar, Foo.Baz'
19:47:34dom96Araq: Well this was my crazy idea about how to do it.
19:47:51dom96In any case, it still generates incorrect C code so it's a bug.
19:47:56Araqsure
19:48:19dom96There is another problem in that code too: the closure would need to be generic.
19:48:29dom96*callback closure
19:49:08AraqI'm thinking that a void iterator should be able to yield just anything
19:49:31Araqwe need to weaken the typing a bit here
19:49:59dom96I don't think we can.
19:50:11dom96var value = await p.recv(sock, 50)
19:50:24dom96otherwise the compiler won't be able to infer the return type...
19:50:36dom96I'm starting to wonder if this is doable with macros
19:51:26dom96zahary: you there?
19:54:21dom96zahary once told me how to do it. But I now can't remember.
19:54:52Araqme neither, I don't like this async stuff at all tbh
19:55:36Araqit's just one huge workaround for a collaborative tasking system
19:55:52dom96I do like it.
19:56:02dom96But I don't know how it should be implemented under the hood.
19:56:35dom96oh, here we go: https://gist.github.com/zah/4096467
19:57:20dom96It seems that zahary assumes that iterators can return generics.
19:58:32dom96Which according to you cannot happen right?
19:59:47*aftersha_ joined #nimrod
20:02:08Araqwell he uses TPromise[..] and calls it a day
20:02:42Araqthat's the nice thing about pseudo code. it always compiles :P
20:02:50dom96lol
20:05:11dom96In any case that was his expectation.
20:05:34dom96and he even does the exact same thing I tried.
20:05:40dom96The promise has a callback
20:05:46dom96and he continues the iteration in the callback
20:07:27Araqwell yes
20:07:49Araqbut having both callbacks and 'yield' doesn't improve anything IMHO
20:07:59foodooIs it still planned to abolish the Tsomething types?
20:08:08foodoo(with the leading T)
20:08:08Araqfoodoo: yup
20:08:37dom96Araq: It does.
20:08:45Araqdom96: how so?
20:08:51dom96Araq: Otherwise you have a mess like in my asyncmacro branch
20:09:10dom96Callbacks mean that you can always choose the callback style if you really want it.
20:09:14filwitAraq: does {.descructor.} still work? or was that depreciated? I didn't find it in the index last i checkted.
20:09:14AraqI see a mess in any case
20:09:16*micklat joined #nimrod
20:09:28dom96In any case, how else do you want it to work if not via callbacks?
20:09:36Araqfilwit: it kind of works, there are bugs left wrt generics
20:09:47filwitokay
20:10:03Araqwell all I can think of is my tasking style, dom96
20:10:17Araqit's simple and works but doesn't support everything you want to support
20:10:57Araqthough I think I need to weaken the typing for 'yield' somehow
20:11:52Araqbut I really think in threads/processes/tasks
20:12:17micklatAraq & dom96: I'm following your conversation with the help of the log, but I don't manage to grasp the question you're grappling with. Can you provide any pointer, perhaps? I'm curious
20:12:50Araqmicklat: how to implement C#'s async/await in detail on top of a classic event loop
20:12:58Araqbrb
20:13:10dom96Araq: Think a little wider then heh
20:13:12*brson joined #nimrod
20:14:16micklatI gather that there will be some compiler support for coroutines, right?
20:14:58dom96There already kind of is. Although apparently they're not proper coroutines.
20:15:23micklatthe question seems to be about typing?
20:16:24dom96Yes. I want to yield a PFuture which contains a generic value field.
20:16:59dom96And yielding that is not possible right now.
20:17:07dom96I'm not sure how else it should be done though
20:17:23micklatI'm very new, so please bear with me. Does the compiler instantiate all generics into monomorphic types before code generation?
20:18:02dom96oh, Araq will have to answer that. I'm not familiar with such details.
20:19:11micklatare you using closure iterators for the coroutines, and an event loop that calls these iterators?
20:19:53dom96Well currently the event loop works on the Futures which contain a callback which gets called upon their completion.
20:20:06dom96My plan was to advance the closure iterators in that callback.
20:20:26micklatand where did you get stuck?
20:21:19micklatif you'd rather not be interrogated like this, please say so and I'll stop. You didn't invite this
20:21:28dom96hehe. I don't mind.
20:21:44dom96Well, I got stuck when I found out that I can't just yield a generic.
20:28:31Araqmicklat: yes about the monomorphization
20:29:15Araqand yes our coroutine support is the "closure iterators" which are more like python's generators as they cannot capture the full stack
20:30:58Araqdom96: I think you should have PEvent which is not generic, but an inheritance hierarchy and then iterator (): PEvent for the major control flow
20:32:17Araqand then you register these iterators to the dispatcher
20:32:18*DAddYE quit (Remote host closed the connection)
20:32:40Araqthis covers 80% of all use cases already
20:32:52*DAddYE joined #nimrod
20:33:10Araqand more elaborate stuff hits a wall quickly because iterators cannot capture the full stack anyway
20:33:50Araq(plus I think more complex control flow is unmaintainable anyway and needs to be rewritten :P )
20:33:57*brihat quit (Quit: Leaving.)
20:34:13dom96I dunno, it sounds very convoluted.
20:34:27Araqit's crystal clear, man
20:34:42Araqjust think about how an http server works
20:34:58filwitit's so crystal clear it's got a hint of blue in it
20:35:01dom96It's also less efficient.
20:35:09filwitsorry, had to do the breaking bad reference
20:35:10dom96The dispatcher will need to handle callbacks and the iterators
20:35:29dom96filwit: Crystal blue persuasionnnnn
20:35:38filwit:D
20:35:45Araqrequest comes in, you do some database queries in asyncronous fashion and then you produce the html and send it over the wire
20:35:51dom96filwit: Breaking Bad, Lost and GoT references are always welcome here.
20:36:07Araqno, I don't get GoT references
20:36:12*brihat joined #nimrod
20:36:49filwitwell i haven't watched Lost in awhile, and never finished it, so i guess that balances it out
20:36:53filwit:P
20:37:03dom96I wish we had some way to summon zahary
20:37:11Araqdom96: it's not less efficient
20:37:12filwitthen again, i don't really know any GoT quotes anyways..
20:37:17dom96Like a bat signal or something
20:37:31*DAddYE quit (Ping timeout: 260 seconds)
20:37:42dom96What do we say to death? Not today.
20:39:10filwitah, of course
20:40:54AraqI'm the mother of dragons
20:42:13dom96"I am Daenerys Stormborn of House Targaryen, of the blood of old Valyria. I am the dragon’s daughter..."
20:42:57dom96Anyway.
20:43:25Araqdom96: you need basic io events and then 'AND' and 'OR'
20:43:41dom96Araq: I will wait for zahary and ask him.
20:44:09Araqwhy? we did that already and neither of us really understands his proposals
20:44:23dom96Because I am sick of wasting time.
20:44:45dom96I don't want to rewrite it again if he tells me it's wrong.
20:45:02Araqbut that is the plan anyway
20:45:18Araqwe won't get the first version right anyway
20:45:28Araqso make it simple instead
21:01:56micklatdom96: why is having a non-generic PEvent is less efficient?
21:02:34dom96"The dispatcher will need to handle callbacks and the iterators"
21:02:40dom96But according to Araq I am wrong anyway.
21:04:17micklatlet me see if I get this straight. The dispatcher sees an IO event. It calls a callback associated with the socket. The callback gets the socket, reads or writes to it.
21:04:52micklatthen the callback signals to the dispatcher to advance one of the iterators
21:05:15micklatthe dispatcher doesn't need to see the value received via the socket
21:05:54micklatis that what you and Araq are talking about?
21:06:43dom96yes
21:07:02micklatand what was the supposedly faster alternative?
21:07:53dom96The callbacks themselves advancing the iterators.
21:08:22micklatand this is a problem because you want the callback to be generic?
21:10:59dom96no, it's a problem because I want the iterator to be generic
21:11:49Araqdom96: the iterator cannot be generic as you showed
21:12:05dom96yes, I am aware.
21:12:19Araqso make it not generic for now please
21:12:55micklatcan't he write a generic iterator and instantiate it to get a monomorphic iterator?
21:13:10*io2 joined #nimrod
21:13:15Araqultimately you're designing a heterogeneous container. Generics do not work for that.
21:14:00micklatyou mean the socket interface provides a heterogenous stream of values?
21:14:31AraqI mean the dispatcher has a heterogeneous list of things that are waiting for something
21:14:52micklatwhy does the dispatcher need to know what these things are waiting for?
21:15:13AraqI thought that is his job
21:15:33*aftersha_ quit (Quit: Computer has gone to sleep.)
21:15:33Araqto dispatch back to the task when the event occurred
21:16:30micklatthe dispatcher sees an IO event, calls a non-generic callback that handles the event. The callback knows the type of the thing it's waiting for, but the dispatcher only knows about the socket and the callback, not what's coming in via the socket. What am I missing?
21:17:34Araqit's callback based, that's what you're missing
21:17:46micklatI don't follow.
21:17:56Araqwe want to avoid callbacks
21:19:17Araqping ddl_smurf
21:20:22ddl_smurf?
21:20:37Araqmicklat: even with your way "IO event" can be heterogeneous, so it still needs a heterogeneous list of stuff
21:21:14micklator a record of closures
21:21:43Araqmicklat: that's the same, but fair enough
21:23:13Araqddl_smurf: well you know how async really works, right? so please help us
21:24:40micklatdom96: is your idea implemented anywhere? when I look at asyncio2 I see something that looks like callbacks, so that can't be it.
21:24:56ddl_smurftrying to catch up, one thing isn't clear though: what is the iterator interating over ?
21:25:27dom96Araq: The dispatcher is not aware of what the futures are waiting on.
21:25:43dom96Well, for IOCP at least.
21:25:57dom96Because in IOCP you get a completion event when a requested operation finishes.
21:26:18dom96micklat: That's where the futures are implemented, yes.
21:26:46Araqddl_smurf: nothing, think of it as primitive coroutine
21:27:11ddl_smurfthis is to write pseudo-sync code that can run async ?
21:27:17micklatdom96: any hint at how anyone intends to avoid callbacks then?
21:27:37ddl_smurfas in, yield control out and return with data ?
21:27:50Araqddl_smurf: exactly
21:29:48ddl_smurfwhy is the tight coupling with sockets/io/dispatch needed ?
21:31:04ddl_smurfah, you're arguing callbacks are more desirable to avoid than the coupling ?
21:31:54AraqI argue callbacks suck for anything
21:32:21ddl_smurfbut they are compatible with generics if im following correctly
21:34:39ddl_smurfif you don't like callbacks, what is the method you're recommending to "dynamic dispatch" ?
21:34:48EXetoCevent loops?
21:37:01micklatIMHO, if you reject runtime indirection (closures/callbacks) you're only left with compile-time indirection (macros)
21:39:24Araqwell obvioulsy I'm aware callbacks are necessary for this
21:40:11ddl_smurfi don't know of a good way to do this, windows has waitforobjects() but to emulate that efficiently on other platforms is difficult
21:40:12EXetoCso the only available alternative is one that sucks? oh well :>
21:40:33Araqbut I want the high level API design to not expose them as much as possible
21:40:39ddl_smurfwhich means that whatever is forwarding the iteration would be hard to get generic
21:41:26Araqbut I already said how I think it should be done
21:42:26micklatSorry if I bothered you with my questions. Good night.
21:42:55ddl_smurfmicklat: you did not, as far as my experience goes with this channel, any input is welcome
21:43:29Araqyup
21:43:36micklatoh, good.
21:43:48ddl_smurfaraq: in your suggestion, how do you matchup the event with the iterator ?
21:43:53Araqthe only thinng that is forbidden here is to criticize c2nim :P
21:45:03Araqddl_smurf: the iterator tells the dispatcher what it is waiting on, the dispatcher invokes the iterator again, when that event occurred
21:45:43micklatwhat exactly is the problem with callbacks? having to write them? you accept the performance hit but want to hide the callback behind a nice interface?
21:46:07ddl_smurfso the future object (which i assume is some kind .net optional, or super basic promise) is what you yield and gets filled in
21:46:08ddl_smurf?
21:46:12Araqmicklat: the convoluted control flow that happens when you need to nest them
21:46:15dom96micklat: People fear "callback hell"
21:46:29Araqddl_smurf: yes
21:46:43dom96ddl_smurf: The problem is we can't yield it. Because it's a generic, and we can't yield generics :\
21:47:11Araqmy proposal is to not make it generic and voila, everythings works
21:47:13ddl_smurfwhy does it need to be typed ?
21:47:25Araqit doesn't
21:47:28micklatwhy can't future inherit event?
21:47:28ddl_smurfsocket isn't spitting types
21:47:46Araqmicklat: that's what I propose, I think
21:48:11micklatand what is the objection to that?
21:48:24ddl_smurfyou are building this on top of some kind of event loop lib that makes different event types homogenous right ?
21:49:19ddl_smurfso there is one common dispatcher, to whom you ask to iterate you ?
21:50:20Araqddl_smurf: in my proposal, yes
21:50:35ddl_smurfwhat is still unclear to me is how, when the dispatcher gets the event, how it find the appropriate iterator
21:50:57Araqwell it keeps a table[event, iter]
21:51:10dom96There are no events here.
21:51:12Araqand so knows what to invoke for each event
21:51:12dom96Only futures.
21:51:29dom96These futures promise to contain either an error or any type T.
21:51:49dom96A callback is associated with a future and it becomes invoked when that future completes.
21:51:51Araqdom96: that might be our misunderstanding then
21:51:54ddl_smurfso basically you have an event loop sending events, all caught by a dispatcher that does a lookup and then forwards that to the iterator
21:52:27dom96That is all that is implemented. There are no iterators yet, we are in the process of discussing how they should be made to work.
21:52:29ddl_smurfwhat is surprising with this approach is that the whole point of most event libraries really pretty much boils down to already doing exactly that, albeit via callbacks yes
21:53:01dom96The goal here is to have C#'s await-like functionality on top of the futures
21:53:44Araqno, the goal here is to be able to write async code almost as if it were sync code
21:54:00ddl_smurffor windows its relatively easy, your future is pretty much a WaitHandle derivate
21:54:02Araqfutures are not essential for me
21:54:35ddl_smurfhow would you get the return value without futures after the yield ?
21:55:06dom96The futures are already implemented on top of IOCP
21:55:18AraqI'd simply return them in the 'event' that is yielded, ddl_smurf
21:55:32Araqmight be better to call it 'request' then
21:55:38Araqbut whatever
21:56:15Araqlet foo = await readLineAsync(f) -->
21:56:39Araqlet tmp = readLineAsync(f); yield tmp; let foo = tmp.line
21:57:40ddl_smurfdom96: i don't get your criticism of this approach ? sorry
21:57:52dom96huh?
21:58:15ddl_smurfwhy would this need generics ?
21:58:52dom96I'm not criticising it. But I also don't understand what Araq has in mind.
21:59:16dom96ddl_smurf: Because the Future may contain any type of data.
21:59:49micklatdom96: that's true, but it gets downcast to a base type that is non-generic upon yielding
21:59:51ddl_smurfyes but it doesn't need to, whatever readlineasync returns can specify the type of the data no ?
22:00:10micklatI meant upcast, I think
22:00:12EXetoCvariants + RTTI + checks?
22:00:12ddl_smurfthere might even be no data
22:00:56dom96Yes, and how should readLineAsync do that?
22:01:12dom96There is no way to store types in an object AFAIK
22:01:31ddl_smurftstringeventfuture = object ?
22:01:56Araqtype Request = ref object
22:02:26Araq Req[T] = ref object of Request
22:02:32Araq data: T
22:02:39ddl_smurf(don't forget about error handling btw, seems like PIA with this)
22:03:02*DAddYE joined #nimrod
22:03:09Araqproc readLineAsync(f: File): Req[string]
22:03:16Araqiterator worker(): Request =
22:03:48Araq let r = Req[string]()
22:03:54Araq yield r
22:04:01Araq echo r.data
22:04:40ddl_smurf/ throw r.error if r.error
22:04:47dom96Araq: Are you expecting 'await readLineAsync' to be translated into that?
22:04:56Araqdom96: indeed
22:05:17dom96And how will the macro know what readLineAsync's return type is?
22:05:29Araqddl_smurf: exception propagation is no problem with my approach
22:05:32OrionPKaraq did you see my message?
22:05:42AraqOrionPK: got the zip, thanks
22:05:57*askatasuna quit (Ping timeout: 248 seconds)
22:05:59OrionPKcool. were you able to repro?
22:06:11Araqdom96: 'await' can be a simple template
22:06:28dom96Furthermore, how does the request know that you want readLineAsync?
22:06:38dom96You don't mention it at all in the iterator
22:06:38ddl_smurfso the Request object knows how to read/parse ?
22:07:03Araqtemplate await(x: expr): expr = (let tmp = x; yield tmp; tmp.data)
22:07:23dom96oh right
22:07:54dom96That may work.
22:07:59Araqddl_smurf: not sure what you mean
22:08:21ddl_smurfcan you pseudo code readLineAsync please ?
22:09:27Araqproc readLineAsync(f: File): Req[string] =
22:10:10Araq let dispatcher = getGlobalDispatcher() # bah, I guess this means the dispatcher should be passed around
22:10:28Araq return dispatcher.waitForReadline()
22:10:44dom96yes.
22:10:46Araqok ok, I don't know how the OS's event stuff works :P
22:11:04dom96Asyncio2 requires the dispatcher to be passed around
22:11:07ddl_smurfthe os's event stuff pretty much does use callbacks
22:11:23ddl_smurfbut your method puts all reading/parsing logic into the dispatcher
22:11:48ddl_smurfvery difficult to provide custom things you can wait on
22:12:06Araqand yet that's exactly what we want, ddl_smurf
22:12:30ddl_smurfso the real async event is going to be basic
22:12:39Araqwell not so much custom, but basic IO, timers and then to OR and AND them
22:12:47ddl_smurfsomething like read and later on get a buffer
22:13:09ddl_smurfwho is buffering the file to find the first line end ?
22:13:32Araqis that important?
22:13:35ddl_smurf(also i'm no so conviced about propagating errors but i don't remember enough nimrod to say for sure)
22:14:13ddl_smurfits important because you want the buffer to be common between calls on the same file, and cleaned up rather aggressively (you also want a maxlinelength)
22:14:51*foodoo quit (Ping timeout: 245 seconds)
22:15:20ddl_smurfsome protocols are also interesting, switching between text and binary
22:15:36ddl_smurfso the buffer really needs to live near the lowest level
22:15:56AraqI can't see how this is relevant at this point
22:16:46ddl_smurfsince it's hard to add methods like dispatcher.waitForReadline(f)
22:17:03ddl_smurfsay i want a dispatcher.waitForXMLStanza(f)
22:18:05micklatwouldn't it be better to bind each socket/file/connection to a single dispatcher, rather than pass the dispatcher around?
22:18:42ddl_smurfmaybe have a sub-dispatcher for that file sounds good yeah
22:18:48dom96Sure, but we can always worry about that later.
22:19:05ddl_smurfbut you do want some mecanism to wait for more than one thing simultaneously
22:19:05filwitwoah, what there's a kwin binding in babel? That's cool..
22:19:29Araqmicklat: you mean the AsyncFile object has a pointer to the dispatcher? sounds reasonable
22:19:35micklatyes
22:20:09dom96I think a global dispatcher would suffice, no?
22:20:32Araqimo yes, definitely and it keeps things simple
22:20:35ddl_smurfwell one per thread then
22:20:42Araqwell make it thread-local, yup
22:20:43micklatwhat's the benefit of a single dispatcher?
22:20:59micklatif you have a single dispatcher, then only one thread does IO
22:21:07micklatcan be a bottleneck, no?
22:21:24micklator maybe I'm being a bit silly because the os handles that behind the scenes
22:21:28Araqnah, why? the actual IO is done by the OS
22:21:32micklatright
22:21:46ddl_smurfthread local means one per thread, but looks like a global, ie picks the one from the same thread
22:21:58micklatbut the dispatcher's thread still does some work, no?
22:22:00Araqddl_smurf: exactly the way I want it
22:22:15*aftersha_ joined #nimrod
22:22:33Araqddl_smurf: we have no global GC, so you can't mix refs easily
22:22:34ddl_smurfsure
22:23:00ddl_smurfbut i still think a further indirection between the dispatcher and the user is useful
22:23:01dom96IIRC you can only have one IO completion port per thread anyway.
22:23:07ddl_smurfie request the dispatcher for the file
22:24:05micklatit depends on whether the OS lets you wait on everything you want to wait on with a single completion port
22:24:26ddl_smurfaraq say you have read(file, callback), which is pretty much what the os gives you
22:24:45micklatnah, ignore what I wrote
22:24:49ddl_smurfcan you show me how dispatcher.waitForReadline uses that then "translates" to iterations ?
22:25:13ddl_smurfie what the call to read and callback look like ?
22:26:21ddl_smurfwhat i have difficulty with is understanding the lifecycle of the file, which you want to be able to follow
22:27:42*askatasuna joined #nimrod
22:30:42Araqwell there 2 ways, ddl_smurf
22:31:05Araq(1) make the callback call directly into the iterator that requested the line
22:31:52Araq(2) provide a callback that sets something in a data structure that is periodically polled by the dispatcher
22:32:57Araqor do you still think about the buffer handling?
22:34:39*askatasuna quit (Ping timeout: 245 seconds)
22:36:35ddl_smurfi mean there will be some logic before returning to the yield call
22:36:45ddl_smurfand i don't like polling at all
22:37:26ddl_smurf(at very least decoding to a string, then looking for a line separator, and keeping the extra data for the next call)
22:38:07Araqwell it's not real polling but something like it to support AND and OR
22:39:34ddl_smurfthe dispatcher is already "OR", no ? i don't get what you mean by it
22:40:04Araqwell maybe I'm wrong and that's not necessary
22:40:55AraqI'm still not sure where do you think a problem is
22:41:26Araqbuffer handling is something the aync file object does
22:42:06ddl_smurfunless you can reinject data to the buffer, you need a separate buffer for things like reading line by line
22:43:20dom96Araq: https://gist.github.com/dom96/61bb0b210ec7497565d5
22:43:33dom96Araq: It compiles but crashes on line 13
22:43:40dom96Am I being too ambitious again? :P
22:44:26dom96Although it is what you suggested. It doesn't get to my ambitious code even.
22:45:21Araqnot too ambitious
22:45:26Araqand bah
22:45:27*isaacdownlow joined #nimrod
22:45:28dom96oh, just realised I forgot to return retFuture
22:45:32dom96But that's unrelated to the crash
22:45:33*isaacdownlow left #nimrod ("Leaving")
22:45:45dom96I guess your approach simply doesn't work?
22:45:55Araqhey, it works
22:46:12Araqonce I fix that compiler bug ...
22:46:13dom96well, it segfaults.
22:46:17dom96hehe
22:46:19dom96ok
22:46:27dom96well if that code works i'll be happy
22:46:38dom96Because it is pretty much what I had in mind.
22:46:49Araqyay
22:47:03*psquid joined #nimrod
22:48:21Araqwhat's this 'cbVoid' stuff?
22:48:25Araqlooks frightening
22:48:31dom96lol
22:48:47dom96I added another callback to the future
22:49:03dom96One which avoids the generics
22:49:12dom96i.e. I put it in the PFutureVoid
22:49:51*[2]Endy quit (Ping timeout: 245 seconds)
22:50:05dom96btw does the name 'void' work in this context?
22:50:56Araqdunno what it means here
22:51:10Araqit's not PFuture[void], is it?
22:51:17dom96no
22:51:24dom96Well it means that the value is missing
22:51:28dom96or rather
22:51:31dom96it's "hidden"
22:51:43dom96because it is technically there
22:53:23dom96it's exactly how you defined your 'Request'
22:53:36dom96But I don't want to name it PFuture and PFut[T]
22:54:10AraqI noticed, yes
22:54:20dom96Araq: Do you want me to push this cbVoid stuff so that you can run this gist and fix the bug?
22:55:36Araqdom96: of course
22:56:17*aftersha_ quit (Quit: Computer has gone to sleep.)
22:58:54NimBotAraq/Nimrod newasync 55fbb17 Dominik Picheta [+0 ±1 -0]: Added a generic-lacking version of PFuture.
22:58:57dom96there you go
23:09:55*micklat quit (Remote host closed the connection)
23:28:36Demosthere is an example in the manual of a "name" proc that accepts a typedesc, does that actually exist?
23:29:59AraqDemos: in the typetraits module
23:30:05Demosthank you
23:31:10Demosaaaaand it is returning "typedesc"
23:31:21*askatasuna joined #nimrod
23:35:21Araqyeah, nothing works in nimrod wonderland these days
23:35:31filwitwonderland?
23:45:57dom96Interesting: http://www.reddit.com/r/gaming/comments/1xdggv/flappy_bird_dev_dong_nguyen_just_tweeted_this/
23:46:52dom96$50K per week doesn't buy happiness it seems.
23:48:02dom96*per day
23:48:28Araqinteresting aporia already uses a closure iterator
23:48:50dom96of course
23:48:58dom96For the text highlighting
23:49:35*darkf joined #nimrod
23:57:30Araqdom96: aporia and the async issue might be the same bug
23:57:36Araqso I'm fixing aporia first
23:57:38dom96ok good
23:58:37NimBotAraq/Nimrod devel 4e0759b Araq [+0 ±5 -0]: fixes 'newSeq[T]' instantiation bug
23:58:37NimBotAraq/Nimrod devel d449117 Araq [+0 ±1 -0]: fixes #882; fixes #853
23:58:37NimBotAraq/Nimrod devel 3e8f8d1 Araq [+0 ±1 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel