00:07:31 | * | fowl quit (Ping timeout: 248 seconds) |
00:24:20 | sdw | the type is always on the right |
00:24:27 | sdw | who puts it on the left? |
00:24:47 | Araq | some misguided creators of algol |
00:25:09 | sdw | im hapy that c++11 finally has auto, which is what I wanted to get at |
00:25:18 | sdw | auto i = 1; // type is on the right! |
00:25:50 | Araq | but 'auto' does not make it 'const&' |
00:26:20 | sdw | baby steps |
00:26:59 | sdw | do 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:38 | Araq | not really ;-) |
00:28:03 | sdw | much difficulty ahead |
00:28:30 | * | q66 quit (Remote host closed the connection) |
00:29:05 | sdw | i have trouble convincing people that they should prefer smart pointers |
00:29:59 | Araq | sdw: 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:34 | sdw | any plans to generalize subranges? |
00:30:40 | Araq | like? |
00:30:56 | sdw | are you answering in the negative? |
00:30:59 | Araq | they are/will be supported for floats too |
00:31:22 | Araq | no I wonder what generalization you have in mind |
00:31:32 | sdw | hmm, this may be possible in nimrod today |
00:31:47 | sdw | except there are no ctors >< |
00:32:04 | sdw | so if I tell people never declare something without initializing it then maybe I could make it work |
00:32:35 | Araq | I live happily without ctors but as I said, they will be added |
00:32:51 | sdw | type T = range[1..5] |
00:33:09 | sdw | const i : T |
00:33:19 | sdw | assert i == 1 |
00:33:19 | sdw | ? |
00:33:49 | Araq | ? |
00:34:07 | sdw | what's i? |
00:34:20 | Araq | does it compile? |
00:34:39 | sdw | ranges are busted |
00:34:53 | Araq | const and let require a '=' |
00:34:55 | sdw | are you telling me to check the manual? |
00:35:00 | sdw | ah |
00:35:03 | sdw | that's good |
00:35:07 | sdw | so let's say it's var |
00:35:39 | Araq | compiler should catch that then, yeah (I know it doesn't now) |
00:36:10 | Araq | since a subrange's default value is the same as the base type's |
00:36:19 | Araq | which is binary 0 for efficiency |
00:36:37 | sdw | that's the part i was missing |
00:36:49 | Araq | var i: int # short for: |
00:36:52 | Araq | var i: int = 0 |
00:37:22 | Araq | you can use a .noinit pragma to prevent that |
00:37:22 | sdw | so "default construction" in nimrod is always clearing the memory |
00:37:35 | Araq | yes |
00:38:04 | sdw | I think I'm always going to want that, unfortunately |
00:38:30 | Araq | not if you're overly concerned with speed ;-) |
00:38:44 | sdw | wait, i misunderstood |
00:39:06 | sdw | i want var i : int to not compile |
00:39:19 | sdw | well, that's not true |
00:39:46 | Araq | do you use arrays in your code? |
00:39:49 | sdw | that should be default constructed, but default construction should be something I can change/disallow through ctors |
00:40:24 | Araq | sdw: you can do that with my constructor design |
00:40:47 | sdw | the one in the works or the pragma? |
00:41:03 | Araq | the one in the works |
00:41:29 | Araq | the .noinit pragma is only to disable the memsetting for speed reasons |
00:41:49 | sdw | yeah, that's cool to have but I side with you that it should be rare |
00:42:55 | sdw | im wondering if with ctors that subranges could be implemented in a library |
00:43:39 | Araq | sdw: the compiler even implements interval arithmetic so that subrange[0..3] + 4 == subrange[4 .. 7] |
00:43:52 | Araq | try that with a library :P |
00:44:16 | sdw | replace 4 with a runtime variable |
00:44:37 | Araq | then it's the base type |
00:44:51 | sdw | since 4 is known at compile time, you can feed that into the compile time magic to do it in a library |
00:45:12 | sdw | that would be possible in nimrod, don't you think? |
00:45:31 | Araq | no idea what you mean |
00:45:48 | Araq | note that '+' is defined in system.nim |
00:46:19 | sdw | let me see if I can just do it |
00:49:41 | sdw | oh |
00:50:00 | sdw | the parameters to a generic cannot be literals |
00:50:29 | Araq | yeah, nimrod is not c++ |
00:50:57 | Araq | you can attach values to generics via overloading and compiletime procs though |
00:51:01 | sdw | which means I'm going to have a difficultly encoding, say, 0..3 into the type |
00:51:35 | sdw | but this is what I mean by generalizing subranges |
00:51:56 | sdw | whether or not this is a good idea, I don't know. I wanted to know your thoughts on it |
00:52:48 | Araq | sometimes I wonder if C++ programmers ever perform any useful work ;-) |
00:53:20 | Araq | I've a book lying around here where the author tries to generalize 'sum' as much as possible via templates |
00:53:43 | Araq | the declaration becomes longer than the function body and he doesn't even notice |
00:54:01 | sdw | yup, c++ has difficulty in doing this |
00:54:12 | sdw | ever looked at the language called D? it's similar |
00:54:40 | Araq | ooohhh never heard of D |
00:55:18 | Araq | the only language except C++ supporting "ranges" |
00:55:34 | Araq | except all the dynamically typed ones, of course |
00:56:03 | sdw | did you go into defense mode for a reason? :P |
00:56:18 | Araq | I'm sarcastic, not defensive |
00:56:44 | Araq | ever looked at a language called Rust? |
00:56:48 | sdw | yup |
00:56:54 | Araq | they have *type state* oh wait |
00:57:00 | Araq | they don't anymore ;-) |
00:57:46 | Araq | and they don't monorphize generics because code size is more important |
00:57:49 | Araq | oh wait |
00:57:53 | Araq | they do now |
00:58:19 | sdw | anyways, point being that you could achieve subranges in the library through template literals |
00:58:38 | sdw | that could be challenging in D, since static parameters never made it into the language, unfortunately |
00:58:55 | sdw | in nimrod, however, I think that'd be quite easy |
00:59:04 | Araq | D has no AST macros |
00:59:24 | Araq | Nimrod invented term rewriting macros with alias analysis and side effect analysis |
01:00:35 | sdw | right, so you could find an expression like TRange[0, 3] + literal and then rewrite it into the correct type |
01:01:13 | Araq | right, I could but integer literals are fine as a builtin language feature for the time being |
01:01:35 | Araq | TR macros should not affect semantic checking btw |
01:03:40 | sdw | speaking of ranges in the D/C++ sense, I think nimrod could do it reasonably well |
01:04:58 | Araq | I know |
01:05:01 | Araq | D's stdlib is discouraging me from them though |
01:05:55 | Araq | I think first class iterators ("yield") are a better solution |
01:06:49 | sdw | sometimes |
01:13:49 | Araq | sdw: http://forum.dlang.org/thread/[email protected] |
01:14:28 | Araq | there are other threads like this which never seem to end |
01:14:56 | Araq | I prefer to steal features that are more stable ;-) |
01:16:19 | sdw | hopefully you don't just translate from the d stdlib to nimrod |
01:17:04 | Araq | my nimrod should be better than my D ... |
01:18:32 | sdw | what is even the forward range equiv using nimrod iterators? |
01:18:52 | sdw | if an iterator only is allowed in a for statement, you can never save its iteration state |
01:19:26 | Araq | you really should use nimbuild's docs |
01:19:54 | * | JStoker2 is now known as EvilJStoker |
01:20:06 | Araq | http://build.nimrod-code.org/docs/manual.html |
01:20:12 | Araq | I have to sleep now |
01:20:13 | Araq | good night |
01:23:41 | sdw | An iterator is similar to a procedure, except that it is always called in the context of a for loop. |
01:28:48 | sdw | So, I guess I've just confirmed my original assertion |
01:29:08 | sdw | and 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:13 | p0nce | <Araq> [01:50:19] and they don't monorphize generics because code size is more important < what? |
08:28:28 | p0nce | so they have a uniform representation? |
08:29:00 | p0nce | oh, 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:43 | Araq_ | sdw: check the manual again please; first class iterators *can* be passed around (why would they be called "first class" otherwise?) |
11:59:58 | Araq_ | p0nce: rust now expands generics like C++ does afaik |
12:00:44 | Araq_ | 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:34 | reactormonk | features! We need more features! |
15:49:07 | * | gour_ is now known as gour |
17:01:17 | dom96 | users! we need more users! |
17:27:38 | * | exhu joined #nimrod |
17:27:54 | exhu | developers! developers! developers! -) |
17:30:04 | * | exhu quit (Client Quit) |
18:19:59 | Araq | ha, and I thought we need an Araq in holidays ... |
18:35:08 | Araq | ping gour |
19:08:25 | gour | Araq: pong |
19:08:50 | Araq | how's your progress with claro? |
19:09:18 | gour | haven't even touched it...too busy with other stuff |
19:17:23 | Araq | got the example program to work at least? |
19:18:14 | gour | nope. 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:16 | NimBot | Araq/Nimrod f5b4202 Araq [+0 ±2 -0]: small improvements |
20:34:16 | NimBot | Araq/Nimrod 0470ac4 Araq [+1 ±2 -1]: better overloading resolution for generics |
20:34:16 | NimBot | Araq/Nimrod 52c3a91 Araq [+4 ±5 -4]: Merge branch 'master' of github.com:Araq/Nimrod |
20:49:43 | reactormonk | Araq, don't forget to revert the revert ^^ |
20:50:48 | Araq | reactormonk: take a look |
20:51:59 | reactormonk | oke |
21:06:58 | reactormonk | Araq, now about the lambda lifting :-) |
21:07:05 | reactormonk | or rather the idetools. |
21:07:23 | reactormonk | just wrote a few lines of QT and I'm not sure I like it. |
21:08:08 | Araq | actually I'm still working on OR |
21:08:33 | reactormonk | when false: |
21:08:36 | reactormonk | O.o? |
21:09:04 | Araq | performing sem checking lazily for operands could make the language much better |
21:09:18 | reactormonk | Bahnhof. |
21:12:03 | Araq | should allow us to get rid of "immediate", for instance |
21:12:51 | reactormonk | what's "immediate"? |
21:14:15 | reactormonk | let's see if I can use nimrod with the arduino :-) |
21:15:36 | Araq | reactormonk: we have templates and then we have immediate templates ... |
21:15:50 | Araq | maybe we can get rid of this distinction |
21:29:00 | * | FreeArtMan quit (Ping timeout: 264 seconds) |
21:51:36 | reactormonk | looks like there is a makefile and a scons script. Hm. |
22:04:52 | Araq | reactormonk: can't see how lambda lifting is all that important for JS for now |
22:05:00 | Araq | do you really need it now? |
22:08:40 | * | gradha joined #nimrod |
22:14:44 | gradha | don't know about features or developers, but Araq sure attracts users http://forum.nimrod-code.org/t/74/ |
22:17:23 | Araq | damn you :-) |
22:17:30 | Araq | I was about to answer: |
22:17:39 | Araq | "bad timing, recently I shaved" :D |
22:18:33 | gradha | it's ok, we all know nimrod can have temporary regressions |
22:28:35 | Araq | gradha: any progress with whatever you're working on? ;-) |
22:32:59 | gradha | not much, I should try to release something soon, we only have 12 more days until zerg invasion |
22:56:34 | gradha | you 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:00 | Araq | what? |
22:58:21 | * | Zor joined #nimrod |
22:59:17 | gradha | I just went to read http://slashdot.org/pollBooth.pl |
23:00:11 | gradha | usually I don't care about polls but recently I've been facepalming myself a lot at work |
23:02:46 | gradha | it'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:51 | Araq | I can't follow |
23:07:05 | Araq | what are you working on? |
23:08:41 | gradha | now? nimrod, nothing wrong there. In real life, ios programs with customers who never define anything and change the requirements daily |
23:09:34 | gradha | well, nimrod still has its problems: |
23:09:36 | gradha | # Meh, compiler still gets this wrong, won't bother patching this for now. |
23:09:41 | gradha | #keys.sort(system.cmp[string]) |
23:09:52 | Araq | I know, it's not that easy to fix |
23:10:00 | Araq | otherwise I would have fixed it already |
23:10:08 | Araq | I should mark the bug as critical though |
23:11:08 | gradha | I presume its a problem related to types? |
23:11:54 | gradha | I remember getting around it moving stuff to smaller procs |
23:14:56 | Araq | type TCmp = proc (a, b: string): int |
23:15:10 | Araq | keys.sort(TCmp(system.cmp)) # could work |
23:15:26 | Araq | in fact it should work, if not, that's another bug |
23:18:16 | gradha | a bug then http://pastebin.com/c0KdLb9f |
23:19:14 | gradha | it 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:33 | Araq | there is no system.sort |
23:21:44 | gradha | hah, maybe that's the problem |
23:22:13 | Araq | and the compiler is correct |
23:22:26 | gradha | great, now I'm starting to facepalm with nimrod too |
23:22:27 | Araq | system.cmp doesn't fit that signature |
23:22:52 | Araq | import algorithm to get a sort for 'seq' |
23:27:39 | Araq | I mixed that up with anyother bug you encountered |
23:27:45 | Araq | *another |
23:27:51 | gradha | yeah, sorry, me too |
23:28:01 | Araq | where []= is resolved too early in a template or something |
23:28:21 | gradha | I'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:56 | gradha | I think the computer is trying to tell me something http://dl.dropbox.com/u/145894/t/time_to_stop_programming.jpg |
23:52:51 | Araq | that's what you get for visiting arabic porn sites |
23:53:06 | Araq | screwed up your browser's settings |
23:53:51 | gradha | I knew I should not have clicked on the dancing burka, but it was so tempting |
23:54:30 | Araq | XD |
23:57:27 | Araq | seriously though, what's wrong with nimrod on mac? |
23:58:18 | gradha | no idea, shouldn't Zahary know more about it, or it's just me getting the random corruption? |
23:58:44 | Araq | he said he switched to llvm and it disappeared |
23:58:57 | Araq | and I think that's what he uses now |
23:58:58 | gradha | oh, I planned to upgrade from lion to mountain lion this weekend, I'm sure that will bring in more fun |
23:59:32 | Araq | can't you gdb the broken nimrod? |