00:10:14 | reactormonk | apriori__: eeeeh, what do you want to do? |
00:15:42 | apriori__ | say I just want to offset a pointer |
00:20:07 | * | silven quit (Ping timeout: 240 seconds) |
00:39:10 | * | apriori__ quit (Quit: Konversation terminated!) |
01:18:39 | * | apriori_ quit (Quit: Konversation terminated!) |
02:19:11 | * | q66 quit (Quit: Quit) |
08:47:30 | * | silven joined #nimrod |
09:07:23 | * | dom96_ joined #nimrod |
09:28:14 | * | q66 joined #nimrod |
10:17:56 | * | Boscop quit (Ping timeout: 252 seconds) |
10:29:26 | * | Trix[a]r_za is now known as Trixar_za |
10:47:26 | * | Araq_ joined #nimrod |
10:47:57 | * | zahary joined #nimrod |
10:49:12 | Araq_ | oh hi zahary |
10:50:26 | zahary | hi |
10:51:09 | zahary | what's up? I'm catching up with the logs |
10:51:44 | Araq_ | dunno, I'm almost done with the closures ... |
10:51:56 | Araq_ | transf is not a pass anymore |
10:52:06 | dom96_ | hello |
10:52:19 | Araq_ | took much longer than I expected as always |
10:52:40 | zahary | transf is merged into sem? |
10:52:55 | Araq_ | and we really need to do something about "Koenig's lookup" |
10:53:22 | Araq_ | zahary: more or less, yes |
10:54:23 | zahary | nice to see that def support is improving. I'll try to add the latest idetools goodies to the vim plugin |
10:54:43 | Araq_ | great but it's still too slow |
10:55:31 | Araq_ | about the koenig's lookup: I really want to disallow locals overriding in generics |
10:55:44 | Araq_ | I had a typo in sets.nim |
10:55:53 | Araq_ | where the proc used a non-existing 't' |
10:56:08 | Araq_ | and in the test case it used 't' and so the test worked |
10:56:18 | Araq_ | that's really bad ... |
10:56:46 | Araq_ | hi dom96_ |
10:56:58 | zahary | distinct types should be the recommended way to do this imo |
10:57:12 | zahary | but errors when conflict is detected is surely nice |
11:00:47 | Araq_ | at least unknown identifiers should be detected in generics |
11:01:15 | Araq_ | though it can be useful if you merely postulate that a %& operator exists ... hm |
11:03:14 | zahary | what was the typo again? I didn't quite follow |
11:03:51 | Araq_ | I've implemented your idea to make semBorrow use overloading resolution and it works nicely :-) |
11:05:23 | zahary | I saw the log already :) |
11:05:50 | zahary | now we need my other borrowAll idea |
11:09:06 | Araq_ | first class iterators are almost implemented too |
11:09:13 | Araq_ | but I have problems with their design |
11:09:30 | Araq_ | iterator it(): int = |
11:09:32 | Araq_ | yield 1 |
11:09:34 | Araq_ | yield 2 |
11:09:36 | Araq_ | yield 3 |
11:09:46 | Araq_ | echo it() # 1 |
11:09:50 | Araq_ | echo it() # 1 or 2 ? |
11:10:06 | Araq_ | in other words when is the closure created? |
11:10:29 | Araq_ | (the closure contains the state field too) |
11:10:59 | fowl | Araq: it() twice should create two iterators |
11:11:06 | Araq_ | when you do: |
11:11:10 | Araq_ | let x = it |
11:11:14 | Araq_ | echo x() # 1 |
11:11:17 | Araq_ | echo x() # 2 |
11:11:45 | Araq_ | because every lexical occurance of 'it' creates a new closure |
11:11:57 | Araq_ | but that's not intuitive |
11:12:28 | * | Araq_ quit (Read error: Connection timed out) |
11:13:33 | * | Araq_ joined #nimrod |
11:13:40 | Araq_ | I played with IEnumerable[T] and C#'s design but it's hard to do it and not introduce indirect/virtual calls at the same time |
11:13:58 | zahary | well, I think the return value should be a object with getValue hasMore and moveNext methods |
11:15:25 | zahary | with type inference it's not necessary to have virtual calls, because the user usually won't specify the type? |
11:15:42 | zahary | so you can infer the concrete type and eliminate virtual calls |
11:16:16 | Araq_ | perhaps, but that the hasNext/next way is completely alien to the way iterators work today |
11:17:26 | zahary | I guess the current inlining method of implementing iterators is nicer most of the time |
11:17:56 | zahary | only when the user explicitly assigns the iterator value to local variable, the more expensive Iterator[T] approach should be used |
11:22:46 | Araq_ | well in my current design there are two types of iterators: 1. closure based and 2. inlining based (current implementation) |
11:23:11 | Araq_ | for (1) there are restrictions with 'try' but it allows for parallel iteration |
11:23:19 | Araq_ | ( for x in a(), y in b() ) |
11:24:43 | Araq_ | and (2) allows for 'try' but cannot be used in a parallel for loop |
11:25:03 | Araq_ | both don't support recursion |
11:25:13 | Araq_ | it's quite messy |
11:25:57 | Araq_ | and of course (2) leads to code bloat but that can be prevented by clever implementations |
11:30:37 | fowl | for x in a(), y in b(x) ? :) |
11:30:59 | zahary | I understand the differences in what's possible and allowed, but I think over time we will eliminate most of the restrictions. |
11:30:59 | zahary | if you say var it = someIterator() you get the Iterator[T] object. in parallel iterations, the compiler writes the parallel loops using Iterator[T] objects, recursive iterators in for loops may be handled with the loop-body-as-a-implicit-closure-param method |
11:31:02 | fowl | nvm i guess that doesnt make sense lol |
11:33:53 | Araq_ | we could also reconsider an implicit conversion from IEnumerable[T] to seq[T] and be done with it ;-) |
11:34:25 | zahary | I don't quite like such methods requiring implicit allocations and copies |
11:35:36 | Araq_ | nor do I |
11:35:59 | Araq_ | but I'll explore this idea further anyway as it supports recursion ;-) |
11:36:52 | Araq_ | and the people who use take(30).filter().map() tend to not care about efficiency anyway |
11:37:12 | zahary | why doesn't the current Iterator[T] approach handle recursion btw? |
11:37:18 | Araq_ | they simply want expressiveness and nimrod is not on par with other languages in this respect |
11:37:30 | zahary | it should albeit inefficiently |
11:38:55 | zahary | the "infinite iterator" is also a potentially good feature that doesn't fly with seq[T] |
11:39:42 | zahary | take(30) is an example of a lazy iterator, which will be hurt too |
11:41:29 | Araq_ | sure |
11:42:15 | Araq_ | you're right it may handle recursion inefficiently |
11:42:54 | Araq_ | I never think about it, it's a joke IMHO; exponential complexity for traversing a tree |
11:43:17 | Araq_ | iirc? |
11:45:07 | zahary | yeah |
12:06:36 | Araq_ | i have to go, see you later |
12:06:40 | * | Araq_ quit (Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]) |
12:44:11 | * | Trixar_za is now known as Trix[a]r_za |
14:39:22 | * | comex quit (*.net *.split) |
14:44:57 | * | comex joined #nimrod |
14:51:13 | * | JStoker quit (Excess Flood) |
15:05:05 | * | JStoker joined #nimrod |
15:06:29 | * | Boscop joined #nimrod |
15:25:36 | Boscop | ping Araq |
15:39:16 | * | Boscop quit (Disconnected by services) |
15:39:17 | * | Boscop joined #nimrod |
15:45:59 | * | shevy quit (Ping timeout: 268 seconds) |
15:51:38 | * | Boscop quit (Disconnected by services) |
15:51:40 | * | Boscop joined #nimrod |
15:58:28 | * | shevy joined #nimrod |
16:11:03 | * | Boscop quit (Ping timeout: 276 seconds) |
16:14:22 | * | Boscop joined #nimrod |
16:28:49 | * | Boscop quit (Ping timeout: 265 seconds) |
16:38:38 | * | zahary quit (Read error: No route to host) |
16:38:45 | * | zahary joined #nimrod |
16:59:44 | Araq | back |
17:01:37 | shevy | top |
17:11:22 | Araq | so ... |
17:11:33 | Araq | I also plan to make 'final' the default for objects |
17:11:55 | Araq | if you want inheritable objects inherit from TObject or use a pragma |
17:12:03 | Araq | opinions? |
17:24:54 | fowl | why |
17:24:55 | dom96 | hrm. |
17:25:08 | dom96 | Yeah, what fowl asked. |
17:25:28 | Araq | because it's the proper default |
17:25:42 | Araq | you can't just inherit from an object that has not been designed for it anyway |
17:26:04 | Araq | and the shorter syntax should be the more efficient syntax |
17:26:24 | dom96 | That makes sense yes. |
17:27:21 | Araq | currently 'type MyObject = object' means "inheritable, but not compatible to TObject" |
17:27:32 | Araq | this doesn't make much sense ... |
17:31:22 | dom96 | It's a bit strange though that inheriting from TObject makes the object inheritable. |
17:31:27 | dom96 | Might confuse people |
17:31:34 | Araq | lol why? |
17:31:57 | Amrykid | TInheritableObject ftw |
17:32:01 | * | Amrykid hides |
17:32:12 | Araq | Amrykid: that's what TObject is all about |
17:32:25 | Araq | TInheritableObject == TObject |
17:32:29 | dom96 | type MyObject = inheritable object |
17:32:31 | dom96 | :P |
17:32:52 | Amrykid | type MyObject = inherits object? |
17:33:02 | Araq | type MyObject = inheritable object of TObject ? |
17:33:18 | Amrykid | type inheritable MyObject? |
17:33:31 | Araq | no new keyword for it |
17:33:42 | Araq | and it's not a question of syntax anyway |
17:34:07 | Araq | the question is "should an object inheriting from something be inheritable by default?" |
17:36:50 | Araq | and I think the question should be answered with "yes" |
17:37:01 | Amrykid | yes. |
17:37:04 | Araq | which is also much nicer for backwards compatibility |
17:37:22 | Amrykid | but how would you specify if it shouldn't be inheritable? |
17:37:36 | Araq | {.final.} like today |
17:37:47 | Amrykid | ah |
17:38:05 | Araq | hrm my closure changes broke quite some tests ... |
17:38:21 | dom96 | huh? Won't {.final.} become obsolete? |
17:38:27 | fowl | i dont get it araq |
17:38:33 | fowl | did you just change your mind? |
17:38:40 | Araq | no |
17:38:46 | Araq | not at all |
17:39:03 | fowl | ah ok i re-read |
17:39:09 | Araq | type o = object # implicitely 'final' (new behaviour) |
17:39:26 | Araq | type o = object of whatever # implicitely not final (like today) |
18:18:21 | fowl | padded str and length-encoded str for streams.nim: https://gist.github.com/3342882 |
18:19:37 | Araq | nice |
18:19:46 | Araq | s.write(str & repeatChar(length - str.len, padChar)) # make it more efficient :P |
18:20:16 | fowl | the assertion on line 39 fails.. ends up with 14 \0s at the end..? |
18:21:50 | fowl | im not sure how to efficiently repeat a char >_> |
18:22:17 | Araq | repeatChar is not bad, but you can get rid of the & |
18:22:36 | Araq | s.write(str); s.write(repeatChar(length - str.len, padChar)) |
18:23:10 | Araq | I don't know why the assertion on line 39 fails |
18:24:01 | Araq | and use 'doAssert' instead of 'assert' in tests within 'when isMainModule' so that they are not deactivated in release mode |
18:25:24 | fowl | i see |
18:27:26 | Araq | result = result.substr(0, lastChr) # --> setLen(result, lastChr+1) |
18:28:06 | Araq | why is length an int16? |
18:30:12 | fowl | sounded good at the time |
19:01:28 | fowl | Araq: what would you use, int8? |
19:12:23 | Araq | fowl: int32 |
19:13:00 | fowl | no string needs to be that long |
19:13:21 | Araq | why not? |
19:15:14 | Araq | 32K isn't that much ... |
19:39:13 | fowl | well i was thinking more for sockets |
19:40:35 | Araq | I see |
19:40:48 | Araq | but you should make it int32 ;-) |
19:44:38 | fowl | strings longer than high(int16) should be shot! |
19:45:39 | fowl | ill just make it generic |
19:46:10 | shevy | hmm |
19:46:14 | shevy | I think I asked this before |
19:46:28 | shevy | when I have nimrod available locally, is there a way to have it fetch latest aporia somehow and install it? |
19:46:40 | shevy | I am so lazy :( |
19:48:16 | fowl | make a recipe for it |
19:48:39 | Araq | dom96 is working on babel, Nimrod's package manager |
19:48:48 | Araq | well not really |
19:48:52 | Araq | but it exists ;-) |
19:54:24 | shevy | dom96!!! |
19:56:57 | Araq | shevy: don't update the nimrod compiler please, I broke methods and closures :P |
19:59:40 | shevy | hehe |
20:06:57 | dom96 | shevy!!! |
21:27:09 | * | Trix[a]r_za is now known as Trixar_za |
22:31:12 | Araq | 100% again :P |
22:31:16 | Araq | and I'm off |
22:31:18 | Araq | good night |
22:31:54 | dom96 | yeah, me too |
22:33:17 | Trixar_za | Night Araq and dom96 |
22:33:18 | Trixar_za | :P |
22:37:03 | * | Nafai quit (Quit: WeeChat 0.3.7) |