00:00:57 | dom96 | But it will get done :) |
00:06:24 | * | ryderblue quit (Remote host closed the connection) |
00:48:12 | * | q66 quit (Quit: Quit) |
01:12:36 | * | Trixar_za is now known as Trix[a]r_za |
02:12:31 | * | netrino_ quit (Quit: Ave!) |
02:46:41 | * | netrino quit (Ping timeout: 252 seconds) |
06:15:17 | * | Araq__ quit (Read error: Connection timed out) |
06:17:30 | * | Araq_ joined #nimrod |
06:18:54 | * | Trix[a]r_za is now known as Trixar_za |
06:35:56 | * | Araq_ quit (Read error: Operation timed out) |
06:37:31 | * | Araq_ joined #nimrod |
07:37:53 | Trixar_za | Well, let's see if I can port this: http://byuu.org/programming/beat/ |
08:40:02 | Araq | Trixar_za: why do you want to port it? |
08:42:03 | Araq | reactormonk: you can implement a lisp-like condition system if you want to; now that we have closures it's not hard; do you want to? I can guide you how to do it |
08:44:40 | Trixar_za | Boredom. Also it's Linux code is written in C++ |
08:46:38 | Araq | well ... we surely have lots of things left to do that you could do instead |
08:48:31 | Araq | for instance a webkit wrapper would be nice :-) |
08:52:02 | * | Araq_ quit (Read error: Operation timed out) |
08:53:30 | * | Araq_ joined #nimrod |
09:15:27 | Trixar_za | This is going to be painful |
09:27:51 | Trixar_za | home/brenton/nimrod/c2nim/c2nim.nim(11, 41) Error: cannot open 'llstream' |
09:27:57 | Trixar_za | Sometime tells me I have to update Nimrod |
09:28:02 | Trixar_za | Something* |
09:43:31 | Trixar_za | Oo |
09:43:37 | Trixar_za | It's building faster than it used to |
10:00:09 | Araq | Trixar_za: strange error ... everything right with your paths? |
10:07:43 | Trixar_za | Nah, i just use the release copy to compile the development version's c2nim |
10:07:50 | Trixar_za | used* |
10:08:06 | Trixar_za | Downloaded and bootstrapped the one off github |
10:08:09 | Trixar_za | And it worked fine |
10:08:14 | Araq | alright, good. |
10:08:25 | Trixar_za | ... but I'm probably not going to do the webkit header |
10:08:27 | Trixar_za | It's huge |
10:08:37 | Trixar_za | And in several different files |
10:08:48 | Araq | there is a gtk wrapper around it that is way smaller |
10:09:13 | Trixar_za | 163 files |
10:10:07 | Trixar_za | 173 if you include the JavaScriptCore |
10:10:08 | Trixar_za | :P |
10:19:09 | dom96 | good morning |
10:25:26 | Araq | hi dom96 |
10:41:51 | * | Araq_ quit (Read error: Connection timed out) |
10:42:31 | * | Araq_ joined #nimrod |
12:14:45 | * | Trixar_za is now known as Trix[a]r_za |
13:21:57 | * | q66 joined #nimrod |
13:36:06 | Araq | so ... I want to have 1 release before christmas ;-) |
13:39:15 | Araq | any feature desparately needed? |
13:39:49 | q66 | butts |
13:41:17 | q66 | Araq, global type inference! :p |
13:41:59 | Araq | we have clay-like type propagation :P |
13:42:08 | Araq | somebody should test it though ... |
13:42:26 | dom96 | continuations! |
13:42:42 | dom96 | well perhaps not desperately needed |
13:42:53 | q66 | continuations would be neat. |
13:45:01 | Araq | hrm ... continuations are expensive but I guess people don't care ... |
13:48:11 | * | Boscop quit (Ping timeout: 256 seconds) |
13:51:14 | Araq | kind of ironic how bad C's support for stack control is |
13:51:58 | Araq | the reason is of course that C has not been designed as a "low level" language :P |
13:52:24 | * | Araq_ quit (Read error: Connection timed out) |
13:53:33 | * | Araq_ joined #nimrod |
13:55:34 | * | Boscop joined #nimrod |
15:14:29 | * | Araq_ quit (Read error: Connection timed out) |
15:15:30 | * | Araq_ joined #nimrod |
17:16:26 | Araq | so dom96 ... |
17:16:32 | Araq | you promised improved docs :P |
17:17:39 | dom96 | I'm kind of busy with nimbuild :P |
17:34:02 | * | Araq_ quit (Read error: Connection timed out) |
17:35:29 | * | Araq_ joined #nimrod |
18:04:53 | * | comex` joined #nimrod |
18:06:17 | * | ccssnet quit (*.net *.split) |
18:06:18 | * | comex quit (*.net *.split) |
18:22:24 | * | Araq_ quit (Read error: Connection timed out) |
18:23:31 | * | Araq_ joined #nimrod |
18:46:49 | reactormonk | Araq, sure, but not this week |
18:47:18 | Araq | too bad then :P |
18:47:26 | Araq | cause it looks like 3 lines of code to me |
18:47:32 | Araq | and I feel like doing it :P |
18:47:51 | reactormonk | Araq, but the main point is to define conditions for the errors in the stdlib - having a feature without stdlib support is a useless feature |
18:48:23 | Araq | hm what do you have in mind? |
18:57:44 | reactormonk | go through every 'raise' statement in the stdlib and see if there's a condition that would fit |
18:57:52 | reactormonk | err, not condition, but restart |
18:58:54 | Araq | well hm |
19:01:15 | reactormonk | otherwise we have the car that runs on 5% of the streets |
19:02:40 | reactormonk | and a default if the condition is uncaught - one that you can change. CLI apps want a different one than webapps than GUI ... |
19:02:56 | reactormonk | and warnings don't abort if uncaught |
19:05:12 | * | Araq_ quit (Read error: Operation timed out) |
19:07:33 | * | Araq_ joined #nimrod |
19:09:13 | Araq | well the stdlib hardly has any UI support |
19:09:33 | Araq | and if 'write' fails with an IO exception I'm not sure we need a 'retry' mechanism for that |
19:09:51 | reactormonk | write to a file? |
19:09:57 | Araq | yeah |
19:10:28 | reactormonk | write to a different fd, open a new fd and write to that one |
19:10:44 | reactormonk | actually just a) would be enough, you can do b) yourself then |
19:10:55 | Araq | when was the last time you needed to do that? :P |
19:11:19 | reactormonk | you might have a point there |
19:12:17 | Araq | well I guess I should simply explain how I'm about to implement the feature: |
19:12:59 | Araq | currently a 'try' statement produces a hidden 'SafePoint' object on the stack |
19:13:36 | Araq | a 'raise' statement then jumps to that (uses C's setjmp/longjmp) |
19:14:11 | Araq | I will add a closure field to the SafePoint data structure |
19:14:38 | Araq | and 'raise' will check if it's set and execute that instead of longjmp'ing |
19:14:48 | Araq | which means 'raise' will not unroll the stack then |
19:15:35 | Araq | it will depent on the type of exception being raised though |
19:16:11 | Araq | there will be a built-in proc named 'handle' to set this closure field |
19:16:17 | Araq | so it will look like: |
19:16:18 | Araq | try: |
19:17:08 | Araq | handle(EIO, proc () = WriteToDifferentFile(mydata)) |
19:17:16 | Araq | WriteToFile(myData) |
19:17:20 | Araq | finally: |
19:17:26 | Araq | close(x) |
19:18:01 | Araq | since every 'raise' is potentially not unwinding the stack, I don't need to go through every 'raise' statement in the stdlib |
19:19:49 | Araq | even nicer would be if a 'handle' section would part of the 'try' statement but that's much more work to implement |
19:20:11 | Araq | and would hide the closure construction which is a bit troublesome in a systems programming language |
19:20:54 | Araq | (and yeah my example is silly) |
19:34:42 | reactormonk | so you don't offer restarts from a raise? |
19:35:09 | reactormonk | I propose a syntax like |
19:35:12 | reactormonk | try: |
19:35:16 | reactormonk | WriteToFile(myData) |
19:35:19 | reactormonk | handle EIO: |
19:35:40 | reactormonk | ChangeFD(something_else) |
19:35:43 | reactormonk | finally: |
19:35:49 | reactormonk | close(x) |
19:36:51 | Araq | well syntax aside, where's the difference? |
19:37:13 | Araq | you can 'restart' in the callback |
19:37:33 | reactormonk | there is none :-) |
19:38:07 | Araq | your syntax is much nicer, I agree |
19:38:13 | Araq | it's also more work :P |
19:38:32 | reactormonk | imho both should be possible |
19:38:48 | Araq | and 'handle' can't become a keyword easily I think |
19:38:56 | Araq | windows' api is full of handles |
19:38:58 | reactormonk | go with 'catch' then |
19:39:33 | Araq | too confusing :P |
19:39:37 | reactormonk | I have to admit I prefer the ruby terminology with begin/rescue and throw/catch |
19:40:02 | reactormonk | why? if you don't call a restart, do a stack unroll |
19:50:47 | * | Araq_ quit (Read error: Connection timed out) |
19:51:17 | Araq | well if you don't call 'handle' in my proposal, you'll get a stack unroll |
19:51:33 | * | Araq_ joined #nimrod |
19:52:11 | Araq | can't see what's wrong with it |
20:01:56 | * | fowl quit (Ping timeout: 248 seconds) |
20:02:10 | reactormonk | now way to merge them? |
20:03:38 | reactormonk | s/now/no/ |
20:04:06 | Araq | merge what? |
20:04:15 | reactormonk | the two keywords - catch and handle |
20:13:41 | * | fowl joined #nimrod |
20:16:44 | Araq | hu? currently nimrod has neither |
20:17:34 | reactormonk | oh. |
20:17:46 | reactormonk | how do you rescue/catch/whatever raises then? :-) |
20:22:32 | Araq | with a built-in 'handle' proc |
20:22:39 | Araq | no keyword :P |
20:29:41 | * | Araq_ quit (Read error: Connection timed out) |
20:31:31 | * | Araq_ joined #nimrod |
20:37:21 | * | ccssnet joined #nimrod |
20:44:01 | * | Araq_ quit (Read error: Operation timed out) |
20:45:29 | * | Araq_ joined #nimrod |
21:08:39 | * | Araq_ quit (Read error: Connection timed out) |
21:09:32 | * | Araq_ joined #nimrod |
23:02:15 | * | Araq__ joined #nimrod |
23:03:23 | * | Araq_ quit (Ping timeout: 260 seconds) |
23:34:15 | * | comex` is now known as comex |