<<01-05-2013>>

02:09:15*q66 quit (Remote host closed the connection)
04:16:10*OrionPK quit (Quit: Leaving)
05:51:09*fowl joined #nimrod
07:08:17*xcombelle joined #nimrod
08:25:21*avarus joined #nimrod
08:25:23avarushi
08:36:15fowlavarus: hey
09:34:24*fowl quit (Quit: Leaving)
10:05:00*fowl joined #nimrod
10:40:01*q66 joined #nimrod
10:55:19Araqhi avarus
11:01:05avarushi fowl Araq
11:02:33*zahary quit (Ping timeout: 240 seconds)
11:07:50*zahary joined #nimrod
11:11:50Araqping reactormonk
11:12:08AraqTimeInfoToTime calls getTime() for the JS target ...
11:12:34Araqthis is pretty bad ... as TimeInfoToTime shouldn't have any effects
11:18:36Araqoh well I fixed it :P
11:33:06*Amrykid quit (Ping timeout: 264 seconds)
11:37:41*Amrykid joined #nimrod
11:40:47*gradha joined #nimrod
11:49:45*avarus quit (Remote host closed the connection)
11:50:58gradhais there any way to redirect the output of a process started with osproc.startProcess to a memory buffer or a temporary file?
11:51:33Araqyeah the output can wrapped into a stream
11:51:36gradhaexecProcesses removes poParentStreams on posix so I guess rewriting it myself won't help
11:52:03Araqfixing it would help ;-)
11:52:12gradhaoh, is it possible?
11:52:21Araqsure
11:52:28AraqI suck at posix
11:52:34Araqso I disabled it
11:53:16gradhais there any test case which demonstrates the problem on posix?
11:53:37AraqI don't think so
11:53:58Araqhowever execProcesses also hangs when I enable C++ mode for the compiler
11:54:19Araqg++ doesn't like the generated C++ anymore and so fails
11:54:38Araqhowever, since lots of processes fail ... execProcesses hangs and I dunno why
11:55:12Araqunix's process redirection api is absurd crap
11:55:23gradhalet's say I run two commands, then call outputStream on them, does that somehow fail on unix? I just don't know exactly what or where the problem is
11:55:55gradhahah, which reminds me I should find out first the bug about return values on macosx
11:56:21Araqquite funny given how much the unix people gloat about their | shell stuff
11:57:34Araqgradha: I can't remember the details of the problem
11:58:18AraqI wouldn't touch osproc without some heavy drinking
11:58:42gradhaat least I have that covered
12:00:02gradhaif I get outputStream() from a process will atEnd() return true only when the process has finished?
12:00:34gradhaor maybe I should call waitForExit on the process then read from outputStream()
12:02:46gradhawill copy execCmdEx()
12:43:45gradhacrap, on a new mac I can't reproduce https://github.com/Araq/Nimrod/issues/379
12:45:37Araqgood
12:45:39Araqclose it then ;-)
12:46:43Araqwhat about the scoping rules in 'if' btw? do you like them now? ;-)
12:47:50gradhadid something change from yesterday?
12:48:02Araqno
12:48:15Araqbut you had time to sleep over it :P
12:48:57NimBotAraq/Nimrod 52f6271 Araq [+3 ±7 -2]: bugfixes mostly JS related
12:49:28gradhaI don't mind the new rules, I just think they are weird because they don't translate to manual expansion
12:49:37fowli thought re.=~ returned bool
12:49:57fowl(let m = input =~ re"(\w+)=\w+"; m.isMatch): looks like a match object or something?
12:51:39Araqwell yeah ... I guess the example should reflect the real world API :P
12:53:48Araqmy fear is that it's too confusing when you swap branches:
12:54:14Araqif (let m = match(); not m.isMatch):
12:54:26Araq echo m[0] # ugh
12:54:32Araqelse:
12:54:40Araq # match but 'm' not available?
12:55:11fowlthats bad code
12:55:34fowlif not(text =~ re): .. is better
12:57:16*gradha quit (Quit: bbl, have youtube videos to watch)
12:58:12fowlthat would be bad code anyways
12:58:49fowlif not mytext.match(someRe).isMatch: # you'd be forgetting the match data
13:01:25Araqyeah lets just hope it won't bite us ;-)
13:03:13fowlAraq: this for stdlib --> https://github.com/fowlmouth/nimlibs/blob/master/fowltek/tmaybe.nim
13:04:16AraqTMaybe is a classical NIMN though
13:04:52fowlwhats that
13:04:55Araq"not in my Nimrod" ;-)
13:06:46fowlo
13:08:49fowlit makes a nice wrapper for nullable types
13:09:58AraqI prefer the "get with useful default" + "has data" approach
13:10:33AraqgetEnv returns "" when the 'key' doesn't exist for a reason
13:26:10fowlyea because there's no TMaybe
13:26:37Araqlol
13:26:54Araqas if I wouldn't have created TMaybe ...
13:27:18Araqanyway I am aware nobody agrees with me and TMaybe is cool and hip and awesome
13:27:33Araqbbl
14:00:27*Roin joined #nimrod
14:00:28*Roin quit (Changing host)
14:00:28*Roin joined #nimrod
14:05:33*Amrykid quit (Changing host)
14:05:33*Amrykid joined #nimrod
14:58:06*Trix[a]r_za is now known as Trixar_za
15:36:18dom96hi
16:37:47*gradha joined #nimrod
16:38:23gradhahey dom96, http://frictionfreedemocracy.org/ is written in haskell, you should go tell them nimrod is better
16:39:52*dom96 is having a hard time figuring out what this project is
16:40:01*dom96 is of course trying to read as little as possible :P
16:40:24gradhadon't they have a video to avoid reading? ah, yes, the video uses text
16:41:19dom96yeah, I avoided the video.
16:41:30dom96The thumbnail didn't seem very informative
16:42:11dom96ok, this video is kinda terrible
16:42:28dom96And the music sounds retro
16:42:36gradhaI'm more worried about the end of http://frictionfreedemocracy.org/software-libs.html where it says "Security will be a big concern and will be considered an orthogonal problem. Standard encryption and security techniques will be used when possible"
16:42:49gradhayeah, security orthogonal my ass
16:44:45*Trixar_za is now known as Trix[a]r_za
16:49:10Araqsecurity done right: http://xkcd.com/1200/
16:51:44gradhathe sad fact about security is that we are still using the same model of 40 years ago and mostly nobody cares
16:51:58reactormonkgradha, not on mobiles
16:52:30gradhathe xkcd is about laptops though
16:53:00Araqno it's far worse ... "experts" think the unix model is still appropriate and doesn't need to be improved/replaced
16:53:09gradhawow
16:53:31Araqoh well unix zealots always think that
17:01:26gradhathe problem xkcd highlights is that real security is inconvenient: if you put a password for each app you solve the theft problem, at the expense of time wasted typing passwords
17:06:15gradhaAraq: do you use "when defined(noBusyWaiting)"? couldn't find it anywhere else
17:09:55*q66_ joined #nimrod
17:10:53Araqgradha: no that's disabled I think
17:12:07*q66 quit (Ping timeout: 256 seconds)
17:12:29*q66_ is now known as q69
17:14:52dom96hrm, I think the --out param is broken.
17:15:25Araqit works for everything except setting the .exe's name, dom96
17:15:54dom96shouldn't it work for that too?
17:16:58Araqwell it has been created for rst2html or something
17:17:17Araqso yeah it should work because it's confusing otherwise :P
17:17:25dom96indeed
17:17:32Araqbut it's not a bug, I simply never implemented it :P
17:17:42dom96whatever helps you sleep at night :P
17:18:59dom96is it hard to implement?
17:20:10AraqI don't think so
17:29:15gradhahuh, github doesn't seem to allow me to label issues
17:29:25*xcombelle quit (Read error: Connection reset by peer)
17:48:21gradhaAraq: on the if thing, will I be able to do "finally: (dbconn.close(); removeFile(dbfilename))"?
17:49:58gradhaat the moment I'm writing a nested proc just before the finally and calling that
17:50:10dom96I think you can do that already
17:50:16dom96even without the parenthesis
17:51:11*Trixar_zb joined #nimrod
17:51:23gradhathe parenthesis version doesn't compile
17:51:36gradhathe non-parenthesis version doesn't compile the generated C code
17:51:45Araqlol
17:52:37gradhawant a github issue?
17:52:39*Trix[a]r_za quit (*.net *.split)
17:54:19Araqsure
18:08:03gradhaah, interesting, the non parenthesis version works, unless you declare a nested proc before...
18:15:32gradhaAraq: you need to do something about Nimrod, it's more fun to report bugs than to write programs in it
18:16:14*Boscop quit (Read error: Connection reset by peer)
18:17:30*Boscop joined #nimrod
18:38:04Araqgradha: these bugs are all mac-only :P
18:38:23dom96ooh, SFML 2.0 has been released.
18:38:30gradhacan't reproduce the closure one?
18:38:43Araqno, I'm kidding
18:38:49Araqhaven't looked at it
18:42:32gradhadom96: sounds like you or fowl will wrap that, exams permitting
18:43:17dom96yeah, it'll most likely be fowl.
18:43:33dom96I think he already wrapped 2, just needs to update it a bit.
18:57:00*Boscop quit (Read error: Connection reset by peer)
18:57:33*Boscop joined #nimrod
19:19:40Araqgradha: --suggest does include the docstrings now
19:20:54gradhacan you make it do the same for --def?
19:21:18gradhahmm... I guess it already does
19:23:01gradhais this recent? I don't remember it happening some weeks ago
19:26:03Araqwell it's a few weeks old yeah
19:27:14Araqgradha: has the 'finally' really anything to do with that bug?
19:27:54gradhathe nested proc alone is fine, the finally alone is fine, both at the same time generates code which doesn't compile
19:28:06gradhabut now I'm investigating another finally mac-only issue...
19:28:21Araqok ... nice bug ... :-/
19:31:59NimBotAraq/Nimrod ba244a4 Araq [+0 ±1 -0]: --out works for exes
19:34:22dom96Araq: Why didn't you put that in master?
19:35:21Araqmeh ... I guess I should ... but I want to merge newparser asap
19:36:48Araqbut the new scoping for 'if' breaks "keineschweine" ... hmm
19:41:44gradhaI think it's the finally statement which does weird things https://github.com/Araq/Nimrod/issues/412
19:43:08Araqperhaps the removeFile is not part of the finally :P
19:45:15Araqwhy oh why does the tester " .nim invalid module name: '.nim' no"
19:45:29fowlgradha: oh good catch, i was just looking at sfml's site earlier in the week and wondering why they were taking over a year after releasing that RC :P
19:46:11gradhaAraq: AFAIK the code should still work, even if the removeFile() runs first out of the finally block the other sqlite code should work with the open handle on unix (unless sqlite requires the file to be present)
19:46:53Araqwell the parsing of ';' is indeed suspicious
19:46:53gradhaah, no, so that's the problem, sqlite doesn't work if the file is removed from under its feet
19:47:08Araqfowl: speaking of bad style ...
19:47:13gradhaI guess that may happen because sqlite could try to lock the file
19:47:20Araq if not(filename =~ re"\S+_(\d+)x(\d+)\.\S\S\S"):
19:47:22Araq errors.add "Bad file: "&filename&" must be in format name_WxH.png"
19:47:23Araq return
19:47:25Araq result.framew = strutils.parseInt(matches[0])
19:47:26Araq result.frameh = strutils.parseInt(matches[1])
19:47:46Araq--> doesn't work with the new scoping rules :-/
19:48:09fowlwhy? you changed `=~`?
19:48:25Araq=~ injects into the current scope
19:48:37fowloh and the scope changed
19:48:42fowlok
19:48:42Araqyep
19:48:56Araqnot ok
19:49:09AraqI need to revert it
19:49:35fowli could make it keep working by declaring matches first
19:50:03Araqyeah but the website used to contain an example with =~
19:50:13Araqso I think it's commonly used
19:50:18dom96what are you reverting?
19:50:30Araqdom96: the scoping for 'if' statements
19:50:42dom96you're reverting it all completely?
19:51:25dom96I think fowl's code shouldn't work to be honest.
19:51:50Araqyeah but we need a transition path I think
19:52:04dom96and breakage should be expected at the stage nimrod is in
19:52:42Araqhmm ... I promised stability for 0.9.2
19:52:50Araqand code breakage for 0.9.4
19:54:10dom96to who?
19:54:46Araqcan't remember
19:54:53dom96I think it's better to spend time implementing features than to be worrying about transition paths.
19:55:09gradhabesides, nobody uses nimrod anyway, who is going to complain?
19:55:40Araqyeah nobody uses it but the few people who do use it write thousands of lines in it ...
19:56:19dom96so someone does use it!
19:56:27Araqand I hate it if some random github project doesn't compile with the latest nimrod
19:56:33dom96I thought I was a nobody for a second :\
19:56:44Araqbut doesn't compile with a former version either
19:56:51gradharandom github projects, shame on you!
19:57:05Araqbecause it's been programmed against some git master compiler
19:57:05dom96however it is still impressive that my oldest nimrod project still compiles
19:57:57dom96Wouldn't it be better to break code earlier than later?
19:58:13dom96Remember, with 0.9.2 we are going to start advertising like crazy
19:58:18gradhawell, I guess you don't have much simpathy for nimrod not compiling Aporia on mac then
19:58:31gradhamac losers, always third grade citizens
19:58:43dom96So it might be a better idea to break code now than after we gain a million users (I HAVE HOPE).
19:59:06gradhadom96: my calendar says 2013 is the year of nimrod, keep your hope
19:59:08Araqwhy break code now when you can have a smooth transition path instead?
20:01:12gradhaanyway, isn't fowl the only one using the new if scoping? how much code you need to rewrite fowl?
20:01:35fowlgradha: i doubt im the only one who's used `=~`
20:01:42Araqgradha: the new if scoping breaks =~ somewhat
20:02:05dom96Araq: What transition path do you propose?
20:02:06gradhaah, sorry, didn't understand that, I thought this was about the if only
20:04:03Araqdom96: document the new 'if' scoping and say that it will come with 0.9.4 and mark =~ as deprecated so people have a chance to update their code
20:04:15dom96right
20:04:27dom96so you're not merging newparser?
20:04:59AraqI'll merge it but revert the 'if' scoping
20:05:27dom96ok, you should make another branch and keep the new 'if' scoping there.
20:05:41dom96So that it can be easily merged in later perhaps?
20:05:45Araqno need, 'when' ftw
20:08:47Araqbut then who knows what the new parser and JS code generator break ... :D
20:10:03fowlare you putting it in as #!newsyn ?
20:10:24Araqno
20:11:41AraqI'll however implement a #!newprec which makes operator precedence based on surrounding whitespace
20:12:02Araqso i+1 * 3 == (i+1) * 3
20:12:26fowlcool i was just thinking about that last night
20:12:46fowli + 1 * 3 == (i + 1) * 3?
20:13:00Araqsure
20:13:36Araqthe current 10 levels of operator precedence are a bit much and even I can't remember then
20:14:06Araqand recently I wanted a&b | c&d only to find out the precedence is wrong for that
20:14:30dom96how about you let us set our own precedence :P
20:14:59Araqyeah lets make & for strings prec 10 and & for int prec 2
20:15:09Araqthis way we need to rewrite the AST after type checking
20:15:24Araqvery good idea :P
20:15:42dom96haskell allows it :P
20:15:44NimBotAraq/Nimrod 47935a9 Zahary Karadjov [+1 ±9 -1]: nimrod dump can now produce a machine readable json report... 12 more lines
20:17:23Araqdom96: and haskell needs to do exactly that; I don't think Haskell's more restrictive overloading helps with that
20:18:03zaharysetting precedence on the tokens is more easily doable
20:18:39Araqwell it's nice to get the prec via merely reading the code
20:18:47Araqno need to look things up
20:18:55zaharybtw nimrod.vim now has code for integrating the compiler service. I wrote some notes that may help Aporia and emacs here:
20:18:55zaharyhttps://github.com/zah/nimrod.vim/wiki/Integrating-the-Nimrod-compiler-service-in-IDEs
20:19:25dom96Does that mean the issues with caas are fixed?
20:19:38dom96i.e. it failing on multiple commands
20:20:24zaharynope, it's quite broken - starts failing after a couple of commands
20:20:49Araqafter the first command in our experience ;-)
20:20:53gradhaawww
20:20:58dom96^^
20:21:50Araqhowever what do we do here: i+1*3
20:21:58Araq* over + then?
20:22:03zaharysure
20:22:18gradhais + over * now?
20:22:32zaharyI've already implemented the horizontal layout for my alternative syntax btw
20:23:03Araqok what about i + 1 - 3
20:23:19Araqnote that there is 1 space before + but 2 after it
20:23:33gradhaoh man, using whitespace like that's really evil, i like it
20:23:42AraqI suppose it's always the max number of spaces that surround the operator?
20:23:55dom96oh man, I hope this doesn't become common
20:24:18zaharyit won't, but you can cap it to 0 or 1 if you want
20:24:22dom96I don't want to have to count spaces more than I already do :P
20:25:05Araqgradha: currently * is over + like in math
20:25:19gradhayes, I missed the spaces thing
20:26:06Araqwe can also make $ a prefix operator in 'echo $x' then
20:26:14gradhahmm... I wonder if there's an unicode character which looks like space but is not space, that would be even more confusing
20:26:40Araqgradha: sure there is but nimrod doesn't allow it as whitespace
20:26:53Araqheck it doesn't even allow tabs :P
20:28:29gradhayou could use it for dynamic operator level changing magic => hilarity
20:28:39Araqwhat to do with keyword operators: if x and b == 0: # bitwise 'and'?
20:28:43dom96I for one vote to use the Bell Character.
20:29:39gradhayour use of caps makes me think of Graham Bell
20:30:14AraqI think we should touch keyword operator precedence
20:30:17Araq*shouldn't
20:31:37dom96We can compile multiple files on this now! http://www.compileonline.com/compile_nimrod_online.php
20:32:14Araqoh wow they updated to 0.9.0
20:32:39gradhamaybe the author lurks in irc/forums?
20:33:01*exhu joined #nimrod
20:33:06Araqyou know ... we also have a proper website ...
20:33:41gradhait lacks unicorns though
20:33:57gradhamaybe it should feature ponies as a transition path to awesomeness
20:34:02dom96and kpop music in the background.
20:34:06exhuhi guys!
20:34:09Araqwhich reminds me ... we in fact have a new design that we should use for release of 0.9.2
20:34:12dom96hey exhu!
20:34:14exhu"so i+1 * 3 == (i+1) * 3" makes me sick
20:34:17dom96Araq: Yep
20:34:24dom96Araq: That's why I was talking about advertisement.
20:35:02Araqexhu: for math perhaps but what about my example with & and |
20:35:37gradhaAraq: http://nimrod-code.org doesn't have RSS, that's really substandard, want one?
20:35:38exhuAraq, i'm just whining, i always prefer () to make it certain which one to be calculated first...
20:36:03Araqgradha: sure
20:36:43gradhaalso, if you update the design, please make the sunset horizontal, my right side of the monitor keeps filling with water
20:37:44Araqthe new design has no sunset
20:38:10exhunimrod is too early to advertise, it's very frustrating that every time I get time to work on developing a macro I stumble on compiler crash or error or not supported feature and then have to postpone for a week or so.
20:39:56Araqexhu: that's frustrating to hear :-/
20:40:16Araqbut thanks for your honesty
20:40:36Araqdo you still report the compiler bugs?
20:40:53Araqor is it that bad you don't even bother anymore
20:41:09exhuAraq, yes, i've created an issue minutes ago.
20:43:24exhuAraq, i'm almost to give up using macros, because i want to finish the project. Maybe i implement it without macro and a year later come back to refactor, don't know. But not abandoning nimrod.
20:44:38fowlexhu: i can take a look at your macro if you'd like
20:45:17exhuit's not urgent, i'm not back to programming today
20:46:29exhufowl, thanks, i think it's a one-line fix, but it's not urgent
20:46:32gradhadom96: the music can be done, http://crayonpop.tistory.com/344 has an example but it seems to be down for maintenance at the moment
20:47:45exhuAraq, does the newparser address some possible macro issues, improves on this side, or it's not related?
20:47:56gradhamusic in the background is really bad, just like the blink tag, it's a shame blinky is going to get murdered soon http://pragprog.com/magazines/2013-05/shady-illuminations
20:48:00Araqnot related
20:48:59AraqI'm working on a luajit backend to replace the AST evaluator for macros but that's highly experimental and I don't know if that will work out
20:49:42exhuAraq, luajit backend in nimrod compiler? sounds like rocket science :)
20:50:07Araqluajit makes for a decent C JIT too
20:50:23Araqand is easier to get to work on windows than libffi
20:50:39Araqand people expect a proper REPL
20:51:16gradhahow is luajit a C JIT? you mean writing lua code like C for it?
20:51:20exhuAraq, REPL = interactive shell?
20:51:27Araqexhu: yeah
20:51:56Araqgradha: luajit supports all C datatypes and calling conventions etc.
20:52:06dom96I will not be happy until NimBot can have a Nimrod repl built in.
20:52:29dom96So I welcome luajit kindly.
20:52:53exhuluajit is cool, i've played once with it, allows to construct efficient C structs from lua.
20:54:04Araqin a way a nimrod compiler relying on luajit is a confession of failure ... ;-)
20:54:20exhubut i think you put into nimrod too much, it's too ambitious.
20:55:47gradhanext think you know you will be implementing an llvm backend
20:56:08exhupeople go away from c++ for a better statically compiled language in the first place
20:56:22dom96gradha: Already been done :P
20:57:12gradhasorry, I meant jvm/clr as stated in http://nimrod-code.org/question.html
20:57:55exhugradha, oh no, jvm and clr have already a lot of languages
20:58:59Araqexhu: and yet the problems with the old evaluation engine are quite severe IMO
21:08:54Araqmy plan was to integrate the luajit stuff into the JS codegen as these languages are very similar ... but it turns out they are only similar when it comes to control flow for our purposes
21:14:26gradhalet's say I use startProcess and want to read the output, do I have to keep reading lines manually because the output could fill some bufferand "hang" the process preventing it from continuing?
21:14:59Araqgradha: that is correct it's incredibly prone to deadlocks
21:16:33fowldom96: there are 2 PRs on nimrod-code/packages
21:16:41gradhawould it be possible to redirect the stdout to a file so I don't have to care about the buffering issue and later read the file back?
21:18:09Araq"Write programs that do one thing and do it well. Write programs to work together."
21:19:21gradhaso no?
21:19:43dom96fowl: oh yeah, thanks for the reminder.
21:20:02Araqosproc has some convenient proc that captures all output in a string for you but I think that's not what you want, gradha
21:20:33gradhaonly if it can run in the background
21:20:56Araqno ...
21:21:02gradhalet me try... dom96 there are 4 PR on minrod-code/nimforum
21:21:05fowlexhu: are you using defDataset: to wrap a type declaration exclusively
21:21:45gradhaAraq: I guess I'll write a polling on the output streams readling lines every 50 ms like the execProcesses then
21:22:06Araqso you fix my bugs by repeating them?
21:22:57gradhaI'm not fixing anything now, just trying to run idetools in parallel and capture the output
21:23:19*dom96 dies
21:23:22fowlexhu: if so i recommend just passing it the name of the type and a tuple holding the data, it is a lot easier than expecting the first thing in the stmt list to be a type section
21:23:36gradhais there any way to react to output from those processes and automatically "wake up" select-like?
21:23:40dom96Also ugh, I think the compiler handles adding the paths in .babel/ incorrectly.
21:24:18AraqI'm quite sure it handles them the way we agreed on :P
21:24:37gradhadom96: there you go, http://crayonpop.tistory.com/344 is up with awesome background music
21:24:46dom96I wish we documented the agreed way somewhere... :P
21:25:22dom96gradha: omg we need this
21:25:59gradhadom96: TBH I prefer listening to Microsoft's bing soundtrack http://www.youtube.com/watch?v=eo82koP4sDk
21:27:11dom96gradha: you can use osproc.select
21:27:17dom96But it's not supported on Windows
21:27:22dom96and will likely be deprecated.
21:27:38gradhahmmm... deprecated because it's not crossplatform or because it's somehow bad?
21:28:08dom96The former.
21:28:15dom96It works fine on Linux IIRC
21:28:43dom96Some sort of alternative will be provided though.
21:28:49gradhainteresting
21:28:51dom96Once I implement the new async stuff.
21:29:14gradhapolling ftw
21:30:33dom96gradha: It's easy and quick to use for small projects. But in most cases you want what asyncio provides.
21:31:13gradhadoes asyncio work on processes?
21:31:26gradhaI thought that's for sockets and network stuff
21:31:26dom96nope
21:31:45dom96It's meant for anything that supports a select-like proc.
21:33:17gradhaso how do you convert a PProcess to a PAsyncSocket?
21:33:37dom96you don't
21:34:13dom96lol, are you reading "Note: If you want to provide async ability to your module please do not use the TDelegate object, instead use PAsyncSocket. It is possible that in the future this type's fields will not be exported therefore breaking your code." ?
21:34:19dom96That's a tad misleading.
21:34:57*exhu quit (Quit: Ex-Chat)
21:35:13dom96I still have not tackled support for anything other than sockets though.
21:36:05dom96best to use select for now
21:36:36dom96And if you want windows support then use threads.
21:37:09gradhaI'll first try my luck with idetools returning less chars than the pipe buffer
21:39:19Araqgood luck with that idetools produces lots of output
21:39:40gradhaespecially now that docstrings are included
21:48:00dom96Araq: Didn't we discuss that only top-level directories should be added to the path?
21:49:23Araqdid we?
21:49:35Araqwhat about mypackage/src/*.nim ?
21:50:08dom96I dunno, but currently every module is shoved into the path.
21:50:20dom96And I don't like it.
21:50:33dom96mypackage/src/*.nim can be solved with a .babel option
21:51:44Araqoh really? and since when does the compiler process .babel options?
21:52:56dom96What I mean is, if the package structure on the git repo is: mypackage/src/*.nim
21:53:09dom96You can tell babel to install everything in src as if it was in /
21:53:16dom96if that's not your worry then:
21:53:34dom96it can be imported with import src/*.nim
21:54:22Araqhmm I remember making it process 2 levels instead of 1
21:54:31AraqI don't think it adds everything recursively
21:54:40dom96hrm, you're right.
21:54:43dom96But why?
21:54:54Araqfor the package/src/*.nim reason
21:55:18dom96What about my solution?
21:55:34Araqrequires yet another thing to configure for the poor package creator
21:56:13dom96well we could just tell people to create 'package/package/source here'
21:56:26dom96But come on
21:56:54dom96babel is not a magician, it needs some guidance as to how to install things.
21:57:28gradhaawww
21:58:39dom96But like I keep saying, we simply need to figure out precisely how babel should work once and for all, once we are happy with the design we should stick to it.
21:58:57dom96But I bet we will hit problems along the way anyway.
21:59:32Araqwe could also special case 'private' instead so that the compiler wouldn't add that
21:59:42Araqwhich seems to be what you're after anyway
22:00:14dom96huh?
22:00:37Araqa dir named 'private' is not included in search path
22:00:58dom96I want to be able to choose between letting users import my package with "import package" (as in jester's case) or "import package/module"
22:01:09dom96a 'private' dir is a whole other issue
22:01:27*OrionPK joined #nimrod
22:01:40Araqwhat if I don't want to import it as "package/module"?
22:01:56dom96tough luck.
22:06:23dom96Packages with multiple modules simply need this.
22:06:35Araqneed what?
22:06:53dom96A namespace if you can call it that.
22:10:23Araqand you get that by not include package/ in the search path?
22:10:31Araq*including
22:11:54Araqin fact I expect package/src/*.nim to be more common than only package/*.nim
22:12:02Araqbecause people like to include docs etc. as well
22:13:05Araqwe could perhaps standardize on a package directory layout but then I dislike these things
22:13:53Araqnot to mention the guys who use package/package ...
22:14:31dom96Yeah, with the current way it works we will get package/package
22:14:39dom96I don't want that.
22:14:51Araqpackage/package is everywhere anyway
22:15:24Araqmy python source code folder has a "python" subdir
22:16:19gradhadom96: for your pleasure http://gradha.github.io/genieos/, see https://github.com/gradha/genieos/commit/1f7cef04c42b08abffdc26e2c0f0318225b7790a and http://scmplayer.net, looks like raping everybody's ears is simply a javascript away
22:17:33dom96gradha: I love it.
22:17:54Araq(which doesn't contain the actual python implementation o.o )
22:18:04dom96Araq: I want this to be enforced.
22:18:18dom96If you have a package with more than 1 public module
22:18:28dom96You need to enclose it in a 'package' folder.
22:18:58Araqbut then you get packaga/package? hu?
22:19:06dom96yes, and that is the problem.
22:19:17Araq(oh well it contains the compiler part of python)
22:19:35Araqwell what do you want to enforce then?
22:19:58dom96I just said what I want to enforce.
22:19:58Araqand I think it stops if the top level directory contains a .nim file but I could be wrong
22:20:12gradhadom96: it's more than awesome, if you click a link (eg. documentation) the player follows through, like black magic
22:20:29dom96gradha: :O
22:21:14gradhaimagine google doing that for their web page, suddenly millions crying in horror as they silence their speakers...
22:22:05Araqdom96: I don't get what you want to enforce then
22:24:31dom96We need some sort of convention on how a babel package's directory should be structured.
22:24:39dom96The two scenarios that I see is the ones I mentioned.
22:25:23Araqactually reading the code ... I think it's excellent :P
22:25:34dom96More than one module: the modules should be imported using the "import package/module" syntax
22:25:46dom96One module: "import module"
22:25:49Araqwell here is what the code does:
22:26:53Araqif there is a '.nim' file in the current directory this is the directory, no subdirectories are added
22:27:12Araqotherwise it searches the subdirs but not recursively
22:27:32Araqso it will get that jester/ is a subdir since you have a jester.nim
22:27:45Araqand it will add package/src since there is no .nim in package/
22:29:58dom96what do you mean "it will get that jester/ is a subdir"?
22:30:31Araqwell say if you have jester-1.0/jester.nim
22:30:42Araqwell say if you have jester-1.0/jester/moduleA.nim
22:30:51Araqjester-1.0/jester/moduleB.nim
22:31:17Araqthen the jester.nim in the package dir means that this is the "main directory"
22:31:37Araqand you need to import other modules as "jester/moduleA.nim"
22:31:54Araqhowever, if you have the following layout:
22:32:04Araqjester-1.0/docs/readme.txt
22:32:13Araqjester-1.0/src/jester.nim
22:32:21Araqjester-1.0/src/moduleA.nim
22:32:25Araqjester-1.0/src/moduleB.nim
22:32:33Araqthen 'src' is the main directory
22:33:01Araqbecause there is no jester-1.0/*.nim file
22:33:25Araqbut there are *.nim files in src
22:33:50dom96ok, well this doesn't work for the case when you want import "package/module"
22:33:58dom96You have to add a dummy .nim file
22:34:25Araqplease elaborate on the supposed directory structure
22:35:04dom96https://github.com/fowlmouth/nimlibs
22:36:22NimBotAraq/Nimrod 3ac912e Araq [+2 ±6 -0]: revert new scope for 'if'
22:37:27Araqdom96: true but then I don't want to import "fowltek/fann" ... or maybe I do ... hm
22:38:07dom96fowl has a lot of modules
22:38:21Araqwell what's the package name? nimlibs or fowltek ?
22:38:28dom96fowltek.
22:39:17Araqping fowl
22:45:20Araqdom96: well what's the alternative? just use the name from "package.babel" as the main directory?
22:46:26fowlhi
22:47:09fowli namespaced them in fowltek/ so it didnt clash with anyones modules and you have to say my name when importing them
22:47:45Araqso dom96 is right and you do like import fowltek/stuff.nim
22:47:55fowlyes
22:48:05*gradha quit (Quit: bbl, have youtube videos to watch)
22:49:46Araqyou need to add a dummy.nim then to your toplevel dir :P
22:49:53Araqnah, just kidding
22:51:15Araqdom96: very well then, I'll make it simply add the package directory then
22:52:43dom96ok
22:53:43Araqdom96: in fact you should do it
22:54:10Araqedit compiler/babelcmd.nim and replace line 86 with
22:54:29Araq addBabelPath(p, info)
22:58:13dom96ok
23:02:58*q69 quit (Remote host closed the connection)
23:06:58dom96cool, it works.
23:09:59Araqpush it then
23:13:39NimBotAraq/Nimrod 5dd397e Dominik Picheta [+0 ±1 -0]: Changed babel path handling.
23:54:59NimBotAraq/Nimrod aa4699a Araq [+0 ±1 -0]: pegs compiles again