00:41:25 | * | silven quit (Read error: Operation timed out) |
00:43:53 | * | silven joined #nimrod |
00:54:57 | * | XAMPP quit (Ping timeout: 256 seconds) |
01:04:09 | * | q66 quit (Quit: Quit) |
01:30:54 | * | Guest53821 joined #nimrod |
01:39:50 | * | Guest53821 quit (Quit: So you know, Cats are interesting. They are kinda like girls. If they come and talk to you, its great. But if you try to talk to them it dosen't always go so well.) |
02:58:33 | * | XAMPP joined #nimrod |
06:48:45 | * | Trix[a]r_za is now known as Trixar_za |
07:46:20 | * | ryderblue left #nimrod (#nimrod) |
07:50:27 | Trixar_za | Araq: Maybe you should mention that Nimrod is pretty much an Batteries included Language aswell. I know many languages like Ruby, Lua and Perl depending heavily on external libraries that needs to be added. Without them, the language can only do basic things - if even that. |
10:29:25 | * | Trixar_za is now known as Trix[a]r_za |
11:32:37 | * | Trix[a]r_za is now known as Trixar_za |
11:47:20 | * | Trixar_za is now known as Trix[a]r_za |
12:02:44 | * | Araq_ joined #nimrod |
12:32:00 | * | Araq_ quit (Quit: ChatZilla 0.9.89 [Firefox 16.0.2/20121024073032]) |
13:25:21 | * | zahary joined #nimrod |
13:45:39 | * | q66 joined #nimrod |
14:07:03 | * | Trix[a]r_za is now known as Trixar_za |
14:08:31 | Trixar_za | dom96: I just discovered the Rubber Duck Debugging method |
14:31:12 | * | apriori_ joined #nimrod |
15:10:53 | apriori_ | fowl: are you here? |
15:51:34 | * | apriori_ quit (Quit: Konversation terminated!) |
16:02:47 | * | Trixar_za is now known as Trix[a]r_za |
16:22:34 | zahary | Araq, why don't you use the do notation in the manual? :P |
16:22:34 | zahary | onRaise is like the perfect candidate for it (raise handler will be several lines long usually) |
16:24:26 | zahary | can I already raise a "recovery" exception from the onRaise handler btw? |
16:24:54 | * | Trix[a]r_za is now known as Trixar_za |
17:37:12 | * | ryderblue joined #nimrod |
17:57:38 | * | ryderblue quit (Remote host closed the connection) |
18:07:48 | Araq | zahary: he he, I tried the 'do' notation but got confusing error messages ;-) |
18:08:08 | Araq | I decided to investigate this later |
18:08:18 | Araq | and went with the traditional syntax |
18:11:32 | Araq | a 'recovery' exception from the onRaise handler sounds like an endless recursion ;-) |
18:13:35 | * | Trixar_za is now known as Trix[a]r_za |
18:27:54 | zahary | well, I was about to ask how will it behave |
18:28:29 | zahary | but we want to emulate the lisp system, right |
18:28:32 | zahary | ? |
18:28:35 | Araq | it's a one line change to prevent it |
18:29:13 | Araq | it's good that you're around, cause my head is full of this: http://nimrod-code.org/nci.pdf |
18:31:24 | Araq | "abstract interpretation" looks like exactly what we need for nimrod's constructors and non-nil types |
18:32:15 | zahary | reading |
18:44:06 | Araq | well NCI is overkill for the first version and maybe even proper abstract interpretation |
18:44:36 | Araq | however, we could simply eval a constructor and check if the produced AST contains any nkNilLit |
18:44:52 | Araq | and issue an error |
18:45:25 | Araq | for unknown values we could introduce a new value nkUnknown or simply generate a value randomly |
18:47:05 | Araq | evals.nim and the data structures it uses look like a perfect fit for AI |
18:47:27 | Araq | and we even already have interval arithmetic :-) |
18:48:13 | Araq | http://en.wikipedia.org/wiki/Abstract_interpretation#Examples_of_abstract_domains |
18:52:38 | zahary | I'm still at page 3, but so far looks a bit like the "codespill" algorithm I was planning to use in my hypolang - there you are always in macro(eval) mode and try to evaluate as much as possible - only when certain expression is detected to use run-time values, then run-time code is "spilled" for that expression |
18:54:53 | zahary | there was supposed to be no difference between static constants and variables: a = 10; (here it's constant in the lexical scope of this assignment); a = argc (becomes a variable); a = 20; (becomes a contant again) |
18:55:03 | * | ryderblue joined #nimrod |
18:55:56 | zahary | I'm mentioning this, because the environment they describe look similar (reading on) |
18:56:00 | * | ryderblue quit (Remote host closed the connection) |
18:58:03 | * | ryderblue joined #nimrod |
19:01:15 | Araq | can't really see the connection to your "spilling" |
19:02:00 | Araq | but never mind |
19:06:00 | fowl | i started working on an SDL2 wrapper |
19:06:11 | Araq | fowl: excellent |
19:07:40 | Araq | is sdl2 still in C? |
19:09:18 | fowl | yep |
19:09:44 | fowl | https://gist.github.com/fcf701b6fbeb3770a0bc |
19:35:03 | * | shevy quit (Ping timeout: 245 seconds) |
19:57:14 | zahary | the similarity is that my "spilling" eval pass had to use the same superpositions / interval arithmetics to determine what is constant or what are the possible values for a variable. |
19:57:17 | * | Vladar joined #nimrod |
19:57:29 | zahary | my algorithm is more naive tho, because loops and recursions involving runtime value were not analyzed any further |
19:58:15 | zahary | this algorithm seems to care about termination so it want to analyze functions like sum(5) instead of just evaluating them |
19:58:46 | zahary | I didn't care for this case as I preferred time bounds for compile-time evaluation as we've discussed before |
20:00:08 | zahary | if I understand this correctly, if the compiler first encounters sum(5), it analyzes it until reaching the fixed-point and then if later encounters sum(10), it must repeat the analysis |
20:01:04 | zahary | I have thought about this issue before and didn't had satisfying solution, so I just opted for time-bounded evaluation |
20:02:02 | Araq | that's my understanding of the algorithm as well |
20:03:16 | zahary | I have though about this "path tagging" too - I planned to use it in simple enough cases |
20:08:19 | zahary | btw, how will dependent types look? |
20:08:19 | zahary | for hypolang, the plan was something like (translating to nimrod): |
20:08:19 | zahary | type TFile = object |
20:08:19 | zahary | handle: TOSHandle |
20:08:19 | zahary | alreadyOpen: bool {.compileTime.} # types can have fields that are compile time variables |
20:08:20 | zahary | proc open(path: string): TFile = |
20:08:20 | zahary | result.alreadyOpen = true # this is evaluated in my eval pass and has only compile-time effect (no run-time code is spilled) |
20:08:57 | zahary | argh, stupid miranda - the identation was stripped? |
20:19:52 | Araq | I had exactly the same thoughts open 'alreadyOpen' :-) |
20:19:57 | Araq | *about |
20:22:28 | zahary | yay :) |
20:23:49 | Araq | brb |
20:45:01 | Araq | so zahary, do you agree? looks like we can get AI with only minor modifications to evals.nim ... |
20:50:29 | * | Vladar quit (Quit: Ухожу я от вас (xchat 2.4.5 или старше)) |
20:51:14 | * | Zerathul joined #nimrod |
21:04:19 | reactormonk | AI? |
21:04:52 | Araq | reactormonk: abstract interpretation |
21:28:00 | Araq | see you later guys |
21:31:01 | * | Zerathul quit (Quit: ChatZilla 0.9.89 [Firefox 16.0.2/20121024073032]) |
21:49:34 | * | shevy joined #nimrod |
22:48:50 | Araq | back |
23:58:10 | * | q66 quit (Quit: Quit) |