<<28-02-2013>>

00:07:31*fowl quit (Ping timeout: 248 seconds)
00:24:20sdwthe type is always on the right
00:24:27sdwwho puts it on the left?
00:24:47Araqsome misguided creators of algol
00:25:09sdwim hapy that c++11 finally has auto, which is what I wanted to get at
00:25:18sdwauto i = 1; // type is on the right!
00:25:50Araqbut 'auto' does not make it 'const&'
00:26:20sdwbaby steps
00:26:59sdwdo you have any idea how hard it's going to be for me to convince others that doing auto i = 1 is ok, and maybe even preferred?
00:27:38Araqnot really ;-)
00:28:03sdwmuch difficulty ahead
00:28:30*q66 quit (Remote host closed the connection)
00:29:05sdwi have trouble convincing people that they should prefer smart pointers
00:29:59Araqsdw: btw I forgot: the subrange bug is actually pretty embarrassing but to my defense: 0.9.0 overhauled large parts of the integral types
00:30:34sdwany plans to generalize subranges?
00:30:40Araqlike?
00:30:56sdware you answering in the negative?
00:30:59Araqthey are/will be supported for floats too
00:31:22Araqno I wonder what generalization you have in mind
00:31:32sdwhmm, this may be possible in nimrod today
00:31:47sdwexcept there are no ctors ><
00:32:04sdwso if I tell people never declare something without initializing it then maybe I could make it work
00:32:35AraqI live happily without ctors but as I said, they will be added
00:32:51sdwtype T = range[1..5]
00:33:09sdwconst i : T
00:33:19sdwassert i == 1
00:33:19sdw?
00:33:49Araq?
00:34:07sdwwhat's i?
00:34:20Araqdoes it compile?
00:34:39sdwranges are busted
00:34:53Araqconst and let require a '='
00:34:55sdware you telling me to check the manual?
00:35:00sdwah
00:35:03sdwthat's good
00:35:07sdwso let's say it's var
00:35:39Araqcompiler should catch that then, yeah (I know it doesn't now)
00:36:10Araqsince a subrange's default value is the same as the base type's
00:36:19Araqwhich is binary 0 for efficiency
00:36:37sdwthat's the part i was missing
00:36:49Araqvar i: int # short for:
00:36:52Araqvar i: int = 0
00:37:22Araqyou can use a .noinit pragma to prevent that
00:37:22sdwso "default construction" in nimrod is always clearing the memory
00:37:35Araqyes
00:38:04sdwI think I'm always going to want that, unfortunately
00:38:30Araqnot if you're overly concerned with speed ;-)
00:38:44sdwwait, i misunderstood
00:39:06sdwi want var i : int to not compile
00:39:19sdwwell, that's not true
00:39:46Araqdo you use arrays in your code?
00:39:49sdwthat should be default constructed, but default construction should be something I can change/disallow through ctors
00:40:24Araqsdw: you can do that with my constructor design
00:40:47sdwthe one in the works or the pragma?
00:41:03Araqthe one in the works
00:41:29Araqthe .noinit pragma is only to disable the memsetting for speed reasons
00:41:49sdwyeah, that's cool to have but I side with you that it should be rare
00:42:55sdwim wondering if with ctors that subranges could be implemented in a library
00:43:39Araqsdw: the compiler even implements interval arithmetic so that subrange[0..3] + 4 == subrange[4 .. 7]
00:43:52Araqtry that with a library :P
00:44:16sdwreplace 4 with a runtime variable
00:44:37Araqthen it's the base type
00:44:51sdwsince 4 is known at compile time, you can feed that into the compile time magic to do it in a library
00:45:12sdwthat would be possible in nimrod, don't you think?
00:45:31Araqno idea what you mean
00:45:48Araqnote that '+' is defined in system.nim
00:46:19sdwlet me see if I can just do it
00:49:41sdwoh
00:50:00sdwthe parameters to a generic cannot be literals
00:50:29Araqyeah, nimrod is not c++
00:50:57Araqyou can attach values to generics via overloading and compiletime procs though
00:51:01sdwwhich means I'm going to have a difficultly encoding, say, 0..3 into the type
00:51:35sdwbut this is what I mean by generalizing subranges
00:51:56sdwwhether or not this is a good idea, I don't know. I wanted to know your thoughts on it
00:52:48Araqsometimes I wonder if C++ programmers ever perform any useful work ;-)
00:53:20AraqI've a book lying around here where the author tries to generalize 'sum' as much as possible via templates
00:53:43Araqthe declaration becomes longer than the function body and he doesn't even notice
00:54:01sdwyup, c++ has difficulty in doing this
00:54:12sdwever looked at the language called D? it's similar
00:54:40Araqooohhh never heard of D
00:55:18Araqthe only language except C++ supporting "ranges"
00:55:34Araqexcept all the dynamically typed ones, of course
00:56:03sdwdid you go into defense mode for a reason? :P
00:56:18AraqI'm sarcastic, not defensive
00:56:44Araqever looked at a language called Rust?
00:56:48sdwyup
00:56:54Araqthey have *type state* oh wait
00:57:00Araqthey don't anymore ;-)
00:57:46Araqand they don't monorphize generics because code size is more important
00:57:49Araqoh wait
00:57:53Araqthey do now
00:58:19sdwanyways, point being that you could achieve subranges in the library through template literals
00:58:38sdwthat could be challenging in D, since static parameters never made it into the language, unfortunately
00:58:55sdwin nimrod, however, I think that'd be quite easy
00:59:04AraqD has no AST macros
00:59:24AraqNimrod invented term rewriting macros with alias analysis and side effect analysis
01:00:35sdwright, so you could find an expression like TRange[0, 3] + literal and then rewrite it into the correct type
01:01:13Araqright, I could but integer literals are fine as a builtin language feature for the time being
01:01:35AraqTR macros should not affect semantic checking btw
01:03:40sdwspeaking of ranges in the D/C++ sense, I think nimrod could do it reasonably well
01:04:58AraqI know
01:05:01AraqD's stdlib is discouraging me from them though
01:05:55AraqI think first class iterators ("yield") are a better solution
01:06:49sdwsometimes
01:13:49Araqsdw: http://forum.dlang.org/thread/[email protected]
01:14:28Araqthere are other threads like this which never seem to end
01:14:56AraqI prefer to steal features that are more stable ;-)
01:16:19sdwhopefully you don't just translate from the d stdlib to nimrod
01:17:04Araqmy nimrod should be better than my D ...
01:18:32sdwwhat is even the forward range equiv using nimrod iterators?
01:18:52sdwif an iterator only is allowed in a for statement, you can never save its iteration state
01:19:26Araqyou really should use nimbuild's docs
01:19:54*JStoker2 is now known as EvilJStoker
01:20:06Araqhttp://build.nimrod-code.org/docs/manual.html
01:20:12AraqI have to sleep now
01:20:13Araqgood night
01:23:41sdwAn iterator is similar to a procedure, except that it is always called in the context of a for loop.
01:28:48sdwSo, I guess I've just confirmed my original assertion
01:29:08sdwand wasted some time double checking what I was pretty sure I already knew
01:40:29*fowl joined #nimrod
02:22:16*sdw left #nimrod (#nimrod)
03:08:54*sdw joined #nimrod
07:31:02*gour joined #nimrod
07:36:22*EvilJStoker is now known as JStoker
08:23:27*fowl quit (Ping timeout: 252 seconds)
08:28:13p0nce<Araq> [01:50:19] and they don't monorphize generics because code size is more important < what?
08:28:28p0nceso they have a uniform representation?
08:29:00p0nceoh, ok they do
08:37:15*fowl joined #nimrod
09:16:08*fowl quit (Ping timeout: 272 seconds)
09:53:49*xcombelle joined #nimrod
09:57:53*fowl joined #nimrod
11:55:36*Araq_ joined #nimrod
11:56:43Araq_sdw: check the manual again please; first class iterators *can* be passed around (why would they be called "first class" otherwise?)
11:59:58Araq_p0nce: rust now expands generics like C++ does afaik
12:00:44Araq_my point was more that it's unwise to copy another language's feature because of buzz and hype
12:10:28*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0/20130215130331])
12:26:49*efool joined #nimrod
12:35:45*sdw quit (*.net *.split)
13:20:45*q66 joined #nimrod
13:36:49*Araq_ joined #nimrod
13:38:39*Araq_ quit (Client Quit)
13:50:16*XAMPP quit (Quit: My code has no bug's, just random features)
14:57:08*gour quit (Disconnected by services)
14:57:09*gour_ joined #nimrod
15:36:34reactormonkfeatures! We need more features!
15:49:07*gour_ is now known as gour
17:01:17dom96users! we need more users!
17:27:38*exhu joined #nimrod
17:27:54exhudevelopers! developers! developers! -)
17:30:04*exhu quit (Client Quit)
18:19:59Araqha, and I thought we need an Araq in holidays ...
18:35:08Araqping gour
19:08:25gourAraq: pong
19:08:50Araqhow's your progress with claro?
19:09:18gourhaven't even touched it...too busy with other stuff
19:17:23Araqgot the example program to work at least?
19:18:14gournope. only build...there were some errors, iirc, as well as the linker one
19:34:23*fowl quit (Ping timeout: 255 seconds)
19:53:07*xcombelle quit (Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.)
20:03:55*FreeArtMan joined #nimrod
20:34:16NimBotAraq/Nimrod f5b4202 Araq [+0 ±2 -0]: small improvements
20:34:16NimBotAraq/Nimrod 0470ac4 Araq [+1 ±2 -1]: better overloading resolution for generics
20:34:16NimBotAraq/Nimrod 52c3a91 Araq [+4 ±5 -4]: Merge branch 'master' of github.com:Araq/Nimrod
20:49:43reactormonkAraq, don't forget to revert the revert ^^
20:50:48Araqreactormonk: take a look
20:51:59reactormonkoke
21:06:58reactormonkAraq, now about the lambda lifting :-)
21:07:05reactormonkor rather the idetools.
21:07:23reactormonkjust wrote a few lines of QT and I'm not sure I like it.
21:08:08Araqactually I'm still working on OR
21:08:33reactormonkwhen false:
21:08:36reactormonkO.o?
21:09:04Araqperforming sem checking lazily for operands could make the language much better
21:09:18reactormonkBahnhof.
21:12:03Araqshould allow us to get rid of "immediate", for instance
21:12:51reactormonkwhat's "immediate"?
21:14:15reactormonklet's see if I can use nimrod with the arduino :-)
21:15:36Araqreactormonk: we have templates and then we have immediate templates ...
21:15:50Araqmaybe we can get rid of this distinction
21:29:00*FreeArtMan quit (Ping timeout: 264 seconds)
21:51:36reactormonklooks like there is a makefile and a scons script. Hm.
22:04:52Araqreactormonk: can't see how lambda lifting is all that important for JS for now
22:05:00Araqdo you really need it now?
22:08:40*gradha joined #nimrod
22:14:44gradhadon't know about features or developers, but Araq sure attracts users http://forum.nimrod-code.org/t/74/
22:17:23Araqdamn you :-)
22:17:30AraqI was about to answer:
22:17:39Araq"bad timing, recently I shaved" :D
22:18:33gradhait's ok, we all know nimrod can have temporary regressions
22:28:35Araqgradha: any progress with whatever you're working on? ;-)
22:32:59gradhanot much, I should try to release something soon, we only have 12 more days until zerg invasion
22:56:34gradhayou know a poll is meant for programmers when one of the option reads "stabbing"
22:57:34*Zor quit (Ping timeout: 252 seconds)
22:58:00Araqwhat?
22:58:21*Zor joined #nimrod
22:59:17gradhaI just went to read http://slashdot.org/pollBooth.pl
23:00:11gradhausually I don't care about polls but recently I've been facepalming myself a lot at work
23:02:46gradhait's on the other side of the coin though: actually no documentation/specs, I would gladly welcome reading if it was an option
23:05:51AraqI can't follow
23:07:05Araqwhat are you working on?
23:08:41gradhanow? nimrod, nothing wrong there. In real life, ios programs with customers who never define anything and change the requirements daily
23:09:34gradhawell, nimrod still has its problems:
23:09:36gradha# Meh, compiler still gets this wrong, won't bother patching this for now.
23:09:41gradha#keys.sort(system.cmp[string])
23:09:52AraqI know, it's not that easy to fix
23:10:00Araqotherwise I would have fixed it already
23:10:08AraqI should mark the bug as critical though
23:11:08gradhaI presume its a problem related to types?
23:11:54gradhaI remember getting around it moving stuff to smaller procs
23:14:56Araqtype TCmp = proc (a, b: string): int
23:15:10Araqkeys.sort(TCmp(system.cmp)) # could work
23:15:26Araqin fact it should work, if not, that's another bug
23:18:16gradhaa bug then http://pastebin.com/c0KdLb9f
23:19:14gradhait seems like the sort from the table module is overriding somehow the system sort?
23:21:15*gour quit (Quit: WeeChat 0.4.0)
23:21:33Araqthere is no system.sort
23:21:44gradhahah, maybe that's the problem
23:22:13Araqand the compiler is correct
23:22:26gradhagreat, now I'm starting to facepalm with nimrod too
23:22:27Araqsystem.cmp doesn't fit that signature
23:22:52Araqimport algorithm to get a sort for 'seq'
23:27:39AraqI mixed that up with anyother bug you encountered
23:27:45Araq*another
23:27:51gradhayeah, sorry, me too
23:28:01Araqwhere []= is resolved too early in a template or something
23:28:21gradhaI'll try to be extra careful in the future next time I mess up the call to sort
23:33:01*fowl joined #nimrod
23:50:56gradhaI think the computer is trying to tell me something http://dl.dropbox.com/u/145894/t/time_to_stop_programming.jpg
23:52:51Araqthat's what you get for visiting arabic porn sites
23:53:06Araqscrewed up your browser's settings
23:53:51gradhaI knew I should not have clicked on the dancing burka, but it was so tempting
23:54:30AraqXD
23:57:27Araqseriously though, what's wrong with nimrod on mac?
23:58:18gradhano idea, shouldn't Zahary know more about it, or it's just me getting the random corruption?
23:58:44Araqhe said he switched to llvm and it disappeared
23:58:57Araqand I think that's what he uses now
23:58:58gradhaoh, I planned to upgrade from lion to mountain lion this weekend, I'm sure that will bring in more fun
23:59:32Araqcan't you gdb the broken nimrod?