<<06-04-2013>>

00:53:25*Trix[a]r_za is now known as Trixar_za
01:07:43*q66 quit (Remote host closed the connection)
01:57:22*Trixar_za is now known as Trix[a]r_za
02:02:29*dom96 joined #nimrod
02:02:29*Araq joined #nimrod
02:37:50*fowl_ quit (Ping timeout: 256 seconds)
04:54:31*fowl joined #nimrod
09:50:12*zahary1 joined #nimrod
10:09:21*zahary1 quit (Quit: Leaving.)
10:10:20*Trix[a]r_za is now known as Trixar_za
10:21:19*q66 joined #nimrod
10:43:15*zahary1 joined #nimrod
10:54:05*zahary1 quit (Quit: Leaving.)
10:59:00*zahary1 joined #nimrod
11:09:48*zahary1 quit (Quit: Leaving.)
11:26:18*Trixar_za is now known as Trix[a]r_za
12:36:53*fowl quit (Ping timeout: 248 seconds)
12:50:17*fowl joined #nimrod
13:57:43*ack006 joined #nimrod
14:36:28*Mathnerd626 quit (Read error: Connection reset by peer)
15:00:19*zahary1 joined #nimrod
15:00:45*zahary1 quit (Client Quit)
15:01:06*zahary1 joined #nimrod
15:01:11*zahary1 quit (Client Quit)
15:01:31*zahary1 joined #nimrod
15:06:32*zahary1 quit (Quit: Leaving.)
15:06:43*zahary1 joined #nimrod
15:14:23*Mathnerd626 joined #nimrod
16:17:58*fowl quit (Ping timeout: 258 seconds)
16:19:45*fowl joined #nimrod
16:51:32*fowl quit (Ping timeout: 256 seconds)
17:10:28dom96So, currently some modules which are "async" are not in fact fully async.
17:11:12dom96The request closures get a TSocket client when they should get a PAsyncSocket.
17:12:20dom96This however poses a problem because any operation on an async socket will not block, so data which is required in the next line of code is not there yet.
17:13:25dom96We can either use extra callbacks to get around this, or use iterator closures and yield out of the iterator when there is not yet any data available.
17:14:41dom96The dispatcher can then go back into the iterator once some specified event occurs (the yield can specify what event it wants to wait for, in most cases this will be a "data is available" event).
17:16:29dom96What do you guys think is the best way to handle this? I'm leaning towards iterators.
17:18:02Araqiterators ftw
17:18:47Araqthat's exactly what first class iterators have been designed for :-)
17:19:23*fowl joined #nimrod
17:21:42dom96Araq: cool. Should this mechanism be simply contained to asyncio then?
17:21:57Araqsure thing
17:22:01dom96or are you willing to provide language support for this?
17:23:23dom96It would be pretty sexy if we could do: proc (..) {.async.} or something :P
17:23:42dom96but I suppose I can implement it and we can always make it nicer.
17:24:20Araqdude, async is a simple macro
17:25:32dom96can I transform a proc (..) {.async.} into some sort of iterator automagically?
17:25:41Araqyes
17:25:51dom96Would need to be in a block though wouldn't it...?
17:25:58Araqhell no
17:26:11dom96can macros be executed based on a pragma that is used?
17:26:25Araqproc p {.m.}
17:26:29Araqis rewritten to:
17:26:31Araqm:
17:26:33Araq proc p
17:26:44Araqthat's been implemented since forever
17:26:56Araqnothing needed on your part for that to work
17:27:25AraqI think it's even in the manual :P
17:27:54dom96cool
17:28:07dom96it is indeed.
17:28:33dom96Well, this looks like fun :P
17:28:56dom96And as always I don't have enough time.
17:47:22fowl i decide to write a macro for parseopt today
17:49:56dom96Have you seen gradha's module?
17:49:57dom96https://github.com/gradha/argument_parser
17:51:08fowlyea it looks clunky
17:54:33fowlthe examples are huge, way too many lines for argument parsing
17:55:03Araqhey, gradha wanted it to be compatible to some C library iirc
17:55:53AraqI told him he couldn't match the stdlib's parseopt anyway and so he didn't try :P
17:56:23fowlmy goal is to plug this parseOptions: on "-f", "--file": file = value into the standard parseopt example thats in the docs
17:57:54dom96Well alternatives are always good. I must agree with fowl, gradha's module feels a bit heavy.
17:58:43Araqfowl: I can't follow
17:59:42dom96perhaps we should consider including a nicer module on top of parseopt in the stdlib, maybe even fowl's module.
18:00:21Araqthe only problem with the current parseopt is that it doesn't support --key val as opposed to --key:val easily
18:01:15Araqwe can add some macro for "nicer" usage too of course but then it's only nicer if you're on some religious war against string case statements
18:01:51dom96yeah. Many people are strong believers in writing as little code as possible :P
18:07:31Araqthe macro can't save more then 1-2 lines of code though
18:17:10fowlhrm im getting an error i dont understant
18:17:12fowld
18:19:16Araqwell?
18:20:01fowlgoing to post the code hwne i can
18:20:14fowlim on my cell phone internet, terrible service
18:20:24*gradha joined #nimrod
18:26:03*fowl quit (Read error: Connection reset by peer)
18:28:40*fowl joined #nimrod
18:28:47fowlhttps://gist.github.com/fowlmouth/5327093
18:32:25Araqfowl: maybe that's because you do !!"key" instead of !"key"
18:33:00AraqI'm not sure what your !! does though ;-)
18:33:32fowl!!(a:string) = newIdentNode(a)
18:34:00Araqoh
18:34:09AraqI thought it may be using bindSym
18:34:19Araqtry bindSym then
18:34:27fowlcould it be a problem that kind,key,value are syms and not idents
18:34:37Araqyeah that's the problem
18:34:54Araq'quote' perhaps does not the proper thing
18:36:45Araqyeah ... it seems to perform some semantic checking :-/
18:37:32Araqyou have to use parseStmt""" code here """ I think :-/
18:37:39Araqbbl
18:37:44fowlok
18:37:45fowlthanks
19:11:13dom96oh guys, I wrote a nimrod article for wikipedia and would love some feedback: http://en.wikipedia.org/wiki/User:Dom96/sandbox
19:11:26dom96Also ideas for more examples.
19:14:32gradhais there any difference in that wrt the one you saw and inspired you to try nimrod?
19:15:47dom96hrm, lets see.
19:17:41*dom96 should steal some things from the old article
19:21:52*dom96 is adding refs like crazy
19:38:04gradhado you remember why it was removed in first place?
19:38:44dom96lack of references
19:38:54dom96It wasn't "notable enough"
19:38:57dom96as well
19:39:41gradhacould you use nimrod's language visibility on github as an argument there? meaning that maybe other "worse" or less used languages have wikipedia entries
19:39:57dom96yeah.
19:40:07dom96We can argue with them if they try to delete it again
19:40:22dom96the old article really had very few references
19:40:23gradhain fact, why not mention that it's notabilityless was due to a linguist bug?
19:40:24dom96if any at all...
19:40:40gradhapeople love drama
19:40:40fowli dont think this is necessary The following code examples are valid as of Nimrod 0.9.0. Syntax and semantics may change in subsequent versions.
19:40:49fowlat least until theres an example that actually could change
19:41:06dom96fowl: That's what the rust wiki page says about its examples
19:41:16gradhabut rust is far from 1.0
19:41:30fowlyea but its not likely that nimrod's syntax or semantics will change that much before 1.0
19:42:10dom96well 'echo' will most certainly not change
19:42:17dom96but I was hoping for a cooler example which might change
19:42:21dom96something which uses macros perhaps
19:42:58gradhamaybe you can show a benchmark of some code compared to rust/ruby on the wikipedia page
19:43:36fowland link to rosettacode
19:43:48dom96we could mention that nimrod shows comparable performance to pure C code, as there are some benchmarks which show that.
19:44:16dom96although it seems quite obvious that it would show comparable performance since it does compile to C
19:44:19fowldom96: i was thinking about writing a partial c-preprocessor for c2nim
19:44:46gradhaas example for the wikipedia page?
19:45:09fowlthe idea being to expand macros that alter syntax like #define BEGIN { but leave constant macros as they are for c2nim
19:45:15fowlgradha: no, just in general
19:45:53dom96not entirely sure how that would be useful
19:46:11dom96oh, I think I get what you mean.
19:46:24dom96c2nim already does most of that does it not?
19:47:28fowlno it doesnt expand macros but it handles #define SOMECONST 42
19:48:12fowlDLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);
19:48:17fowlguh
19:49:53dom96http://build.nimrod-code.org/docs/c2nim.html#preprocessor-support
19:50:32gradhadom96: it would be useful to add to the wikipedia page the idetools/doc support already provided by the compiler
19:51:32dom96Yeah, I was thinking about mentioning Aporia and the fact that the compiler cooperates with it to provide suggest functionality.
19:51:38dom96Also other tools like c2nim.
19:53:04gradhaif you want I can add that to your sandbox, if that's possible?
19:53:36dom96I think it is yeah.
19:53:40dom96Just let me save what I have here.
19:55:31dom96hah, I just realised that i have been logged out on wikipedia
19:55:42dom96So yeah, you can definitely edit it
19:56:05gradhaI would change "group of volunteers" to "closely knit together core developers", it gives the idea of people being bound to threads, with all of us being puppets of destiny, lacking any freewill
19:56:30fowllol
19:57:28dom9613 references :D
19:57:40dom96I bet they will complain that they are all primary sources though
19:57:49gradhadom96: the "private" folder of babel can have any name or "private" is good enough for it?
19:58:39dom96gradha: Currently this is not enforced in any way, just something that users will not import accidentally. It may be enforced in the future so sticking to 'private' may be a good idea.
19:58:55dom96Babel may still change majorly though.
19:59:16gradhait's tempting to name the folder "toomanysecrets"
20:00:07dom96lol
20:00:10dom96what is this for?
20:00:23gradhathat recycle proc for macosx
20:00:30dom96Araq: Is it still possible to use {} thanks to filters?
20:00:46dom96ahh, better go with 'private' be professional :P
20:01:01fowlbetter yet .private
20:01:04fowl(:
20:01:07gradhaoh, don't worry, this module is going to be as unprofessional as possible
20:01:22gradhaI'm actually aiming for the worst module ever
20:04:19gradhadon't wikipedia language pages have a "mortal enemy of:" section in their sidebar?
20:04:57gradhayou could add D there as a reference
20:05:55dom96lol
20:06:07dom96Every language is our mortal enemy though.
20:06:17gradharuby is?
20:06:22dom96of course
20:06:36gradharight, we should add a "this language mocks: xxx" section
20:08:28dom96definitely
20:09:07gradhahyperlink Araq's facebook page too
20:09:50dom96We should just make an article titled "The one and only programmer God" with Araq's picture there.
20:11:06gradhasurely Araq would like a sense of profesionality, show a photo of him in a suit http://www.lenpascoe.com/Portals/0/icons/person-icon-contact.jpg
20:14:18gradhain order to check for the availability of a proc do I write "when not defined(procname):"?
20:14:43dom96yeah, I think so.
20:14:46dom96Test it to be sure :P
20:15:19dom96Maybe Araq would be willing to take a photo of himself with a Guy Fawkes mask.
20:15:33dom96Maybe we would get some support from Anonymous.
20:15:49gradhais the module path prefix required? I'm looking at your previous aporia code "when not defined(os.findExe):"
20:17:00dom96if you want to target a function which is specifically in some module, then yeah.
20:17:38dom96defined(findExe) will return true if findExe is defined in the current module, but defined(os.findExe) will not (as long as it's not defined in os)
20:17:43dom96As far as I know.
20:26:49gradhalooks like the "private" folder doesn't work with the compile pragma, so I'll leave the objc code lingering around at the root
20:28:54dom96well I added some extra things to the wiki article
20:28:59dom9615 references now
20:32:09gradhaugh, the compile pragma not only breaks paths for babel, it doesn't work for nimrod code either, looks like I'll have to embed the source as a big emit
20:33:04dom96bug report
20:33:34gradhaoh, and I can't use emit directly, since that would not work with C code generation...
20:34:10gradhaok, let's add extra layers of indirection, that always works
20:34:24dom96you simply need more macros
20:36:10gradhawait a sec, if I import a module, does nimrod read it's nimrod.cfg for additional paths?
20:36:39dom96My gut feeling says: no
20:36:52*ack006 quit (Quit: Leaving)
20:36:54gradhain that case it won't work anyway
20:37:42gradhaso how is a module suposed to use the private folder then? does import private/name?
20:38:29dom96yeah: import "private/name"
20:38:52dom96actually without quotes works too
20:41:10dom96This is pretty awesome: http://www.firstmenonthemoon.com/
20:45:54Araqfowl: wtf? you do know about c2nim's #def directive ...
20:49:10gradhaah, the compile pragma works, there was something wrong with the nimcache folders, started to work again when purged
20:53:48gradhayay, so relative works with compile pragma too, again the bad nimcache was the culprit
20:54:08gradhafor some reason the .crc file was being generated but the .o file wasn't appearing
20:59:13gradhathis is a real blunder http://species.wikimedia.org/w/index.php?search=zerg
21:00:02dom96Araq: Is it still possible to use {} thanks to filters?
21:00:25Araqyou mean within a .tmpl file? ... I don't think so ...
21:02:01dom96Wasn't there a time when you implemented something which allowed {} to be used to delimit blocks?
21:02:09dom96did you remove that feature?
21:02:33Araqno, it's been a planned feature since forever
21:03:05Araqbut if anything I'd rather use () instead now
21:03:25dom96i see.
21:03:47*q66 quit (Ping timeout: 256 seconds)
21:04:22*q66 joined #nimrod
21:04:35dom96Araq: What do you think of the wiki article now?
21:05:19Araqhave to reread it
21:09:23dom96brb
21:24:36dom96back
21:25:54dom96Araq: reread it yet?
21:26:05Araqno
21:37:50gradhaawesome, nimrod is at least 10 times faster than ruby and I have the numbers http://pastebin.com/svuy8Dgk
21:39:14Araqtried with -d:release?
21:39:35gradhathat's with -d:release, will see without
21:40:34gradhabummer, takes 2 milliseconds longer
21:41:09reactormonkgradha, is that macruby?
21:41:09Araqmost of the time is spent in the kernel I guess
21:41:34gradhareactormonk: yes, the osx-trash gem
21:42:42reactormonkgradha, which ruby do you run it on?
21:43:04gradhadefault? $ ruby --version
21:43:04gradharuby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
21:43:18reactormonkgradha, and the gem?
21:43:35gradhadon't know much about ruby, how do you know about a gem's version?
21:43:46reactormonkhm, ok
21:43:55gradhaI think it's http://www.dribin.org/dave/osx-trash/
21:44:01reactormonktry with ruby 2.0.0 for starters, maybe macruby too
21:44:16gradhawhy would I want to do that?
21:45:31reactormonkbecause they're faster and up-to-date?
21:45:42reactormonkso it's actually a fair comparison :-P
21:46:30gradhaI don't want to tinker with my ruby installation, I could break it and at the moment I depend on redmine working
21:46:52dom96reactormonk: sshhhh, ruby is slower, just accept it. :P
21:47:04gradhabtw, ports and macruby both use 1.9, shouldn't they be 2.0?
21:47:31reactormonkgradha, maybe, 2.0.0 is kinda new
21:47:32Araqmost performance improvements came with 1.9, so it doesn't matter
21:48:01reactormonkyeah, but gradha uses 1.8.7
21:48:46gradhafor the record, this "trash" program is just a call to the objc recycle operation, so we are measuring ruby startup time vs nimrod startup time, not that much ruby/nimrod code is being run at all
21:51:12gradhareactormonk: do you know if a user can install ruby on his path locally without admin priviledges?
21:52:52reactormonkgradha, use homebrew
21:53:11gradhaI'm installing 2.0 manually now
21:53:35gradhaah, ./configure, how much did I not miss you at all
21:55:09reactormonk^^
21:56:47gradhachecking for broken memmem... yes
21:57:34Araqa generated 40K configure script is the security aware user's dream
21:57:55gradhahuh? "CFLAGS = -O3 -fno-fast-math" no wonder ruby is so slow if they use slow math on purpose
22:00:13gradhadoes ruby come with gems or do I have to install that also?
22:01:07reactormonkshould come with rubygems
22:01:53gradhaI hope you don't mind Araq, since you said you won't be using my machine I'm satanizing your user account
22:03:04gradhaaw, ruby can't compile due to some readline wrong api mismatch, and there ends my ruby trip
22:03:10Araqmeh, fair enough
22:03:23gradhaI believed configure should have taken care of that readline mismatch
22:03:33gradhaguess not enough 40k lines were produced
22:04:10reactormonkgradha, use homebrew on mac, since they have no usable pkgmanager
22:05:39Araqgradha: the configure script checks that you have a CPU ... ;-)
22:07:12gradhareactormonk: homebrew doesn't guarantee software to work unless you install with admin priviledges on /usr/local, that sucks
22:07:36gradhawill see how it goes for ruby
22:25:07*gradha quit (Quit: bbl, have youtube videos to watch)
23:42:07*zahary1 quit (Ping timeout: 245 seconds)
23:57:43apotheonAraq: From what I've heard (though I haven't used 2.0 myself, let alone benchmarked it), Ruby 2.0 is supposed to be faster than 1.9.
23:58:33apotheonAraq: I think the 1.9 speedups were to some extent based on the approach to implementation, though, while those for 2.0 were mostly improvements to specific types of operations.
23:59:18Araqquite possible, it's pretty easy to speedup ruby as it's so slow :P