00:02:35 | * | fowl_ quit (Ping timeout: 255 seconds) |
00:32:25 | * | fowl joined #nimrod |
00:36:37 | sdw | more noob questions |
00:37:01 | sdw | how the heck is object construction done? it seems as though this doesn't even exist |
00:37:23 | reactormonk | sdw, exactly |
00:37:26 | reactormonk | sdw, do it yourself. |
00:37:53 | reactormonk | sdw, http://sprunge.us/bSCh |
00:38:24 | reactormonk | sdw, related: https://github.com/Araq/Nimrod/issues/75 |
00:49:16 | sdw | and if a ctor is to be emulated? |
00:49:27 | sdw | dtor* |
00:50:50 | sdw | "destructor" |
00:51:27 | sdw | the closest I've found is something like the "with" macro example |
01:05:36 | sdw | also, is there a trick to ensure that an object is properly constructed? |
01:06:16 | sdw | seems like all types are default cosntructed to nil |
01:38:44 | reactormonk | sdw, use a make as above |
01:40:25 | sdw | I'm evaluating nimrod. I'm not asking out of practicality. So far I am under the impression that there is no way to make a non-nullable type in nimrod |
01:49:17 | * | q66 quit (Read error: Connection reset by peer) |
01:50:51 | reactormonk | sdw, Araq would like that I'd say |
01:52:20 | sdw | I should probably say this up front: nimrod is a neat language that has caught my attention. I'm not trying to run it down, just trying to explore where I could potentially go with it |
01:56:30 | reactormonk | sdw, the idetools somewhat of work, but not with infix operations |
01:56:49 | reactormonk | sdw, what editors would you be interested in? |
01:57:19 | sdw | i'm getting along with notepad++ just fine |
01:58:05 | reactormonk | no preexisting nimrod idetools then |
01:59:15 | reactormonk | sdw, https://github.com/Araq/Nimrod/issues/345 for the idetools. For a small project running it once each request works fine, but as as soon as we come near something like aporia, it's down. |
02:24:05 | * | nolan2 quit (Remote host closed the connection) |
02:32:41 | fowl | sdw: http://forum.nimrod-code.org/t/90 |
02:56:30 | * | Anaphaxeton quit (Remote host closed the connection) |
03:59:01 | sdw | fowl: thanks |
04:03:07 | fowl | sdw: irt to nullable types, you guarantee that your constructor creates the object right or throws an exception or just check it after creation |
04:03:37 | fowl | if you want you could implement isNil(yourtype): bool then use it like a pointer |
04:04:34 | fowl | if you're dealing with refs/ptrs you'll be fine using nil as a value if you use it in a guarded way |
04:05:50 | sdw | yes, with enough discipline I would not have any of these bugs |
04:07:08 | sdw | and then there is the matter of destructors, or something similar |
04:07:17 | fowl | sdw: if you post on the forums someone could probably upload the dlls you need for aporia on windows |
04:07:33 | sdw | ah, aporia isn't a big deal. ill just wait for the installer |
04:07:55 | fowl | there is a destructor pragma for use with value types but i dont have experience with it |
04:08:03 | fowl | do you mean destructor for references? |
04:08:25 | sdw | for all types |
04:09:02 | sdw | let's see if I have this right: type T = object [fields] is a value type |
04:09:21 | sdw | prepending ref turns it into a traced reference type |
04:09:33 | sdw | not prepending, but you know what I mean |
04:09:43 | fowl | yea |
04:10:23 | fowl | you can also use anonymous types for references as in `type PFoo = ref object ..` |
04:10:26 | sdw | so I would expect that at the end of the instance's lifetime some proc could be called |
04:11:03 | fowl | http://build.nimrod-code.org/docs/manual.html#destructor-pragma |
04:11:47 | sdw | ah, good |
04:12:33 | sdw | stack based is what is generally wanted. i have never had much use for finalizers |
04:13:02 | fowl | you only really need that if your type contains unmanaged memory (so you can clean it up) otherwise |
04:13:17 | fowl | it should be cleaned up automatically |
04:14:00 | sdw | i was thinking for for files and mutexes |
04:14:04 | sdw | more* |
04:15:53 | sdw | also, does the compiler not implement subranges? |
04:16:37 | fowl | subrange? |
04:17:31 | fowl | http://nimrod-code.org/tut1.html#subranges |
04:17:41 | sdw | right |
04:18:00 | sdw | any paste sites support nimrod? |
04:18:06 | fowl | gist |
04:19:34 | sdw | https://gist.github.com/kFo/5035837 |
04:22:24 | sdw | i suppose gist does not compile |
04:22:36 | sdw | anyways, that compiles and prints "i is -1" |
04:22:54 | fowl | i think that is a bug |
04:23:19 | sdw | if I change it to const, there is no change in output |
04:23:36 | sdw | I would expect this to not compile |
04:23:47 | reactormonk | sdw, file an issue and ask Araq |
07:39:17 | * | reactormonk quit (*.net *.split) |
07:39:17 | * | silven quit (*.net *.split) |
07:42:30 | * | silven joined #nimrod |
07:43:29 | * | reactormonk joined #nimrod |
07:53:15 | * | fowl_ joined #nimrod |
07:54:41 | * | fowl quit (Ping timeout: 248 seconds) |
08:18:01 | * | gour joined #nimrod |
08:18:42 | gour | morning |
08:19:26 | gour | Araq: see https://bitbucket.org/site/master/issue/6483/support-for-nimrod-language-bb-7658#comment-3237123 & https://bitbucket.org/gour/claro |
08:19:56 | gour | oops wrong repo |
08:20:16 | * | fowl__ joined #nimrod |
08:21:03 | * | fowl_ quit (Ping timeout: 252 seconds) |
08:22:15 | gour | here is the correct one https://bitbucket.org/gour/nimrod |
08:38:22 | fowl__ | gour: why dont you just write some code instead of waxing philosophical on version control systems |
08:39:47 | gour | fowl__: i don't understand. what is so 'philosophical on VCSs' in submitting feature request to BB to support Nimrod since we plan to use that hosting for our project? |
08:40:25 | fowl__ | meh nvm |
08:41:11 | * | gour *shrugs* confused |
09:09:06 | * | gour quit (Disconnected by services) |
09:09:07 | * | gour_ joined #nimrod |
09:10:25 | * | gour_ is now known as gour |
10:14:02 | * | fowl__ quit (Quit: Leaving) |
10:29:12 | * | fowl joined #nimrod |
12:42:27 | * | SirKronos joined #nimrod |
12:42:43 | * | SirKronos quit (Client Quit) |
12:47:37 | * | Anaphaxeton joined #nimrod |
12:49:18 | * | xcombelle joined #nimrod |
12:55:33 | * | q66 joined #nimrod |
16:23:42 | * | Anaphaxeton left #nimrod ("Αποχώρησε") |
17:14:35 | dom96 | gour: nice that you're asking the BB guys for Nimrod support |
17:14:48 | dom96 | But why host a clone of the nimrod repo on BB? |
17:49:31 | Araq | sdw: http://build.nimrod-code.org/docs/manual.html#not-nil-annotation |
17:51:46 | Araq | I've long considered constructors a misfeature but they are really necessary for case objects/algebraic types so they are planned for the next release (finally got their design right I hope) |
17:58:17 | Araq | btw I analysed nil bugs in the compiler itself and came to the conclusion that not nullable types are not all that helpful for systems programming; it's just some feature every language *NEEDS* to have due to Hoare's statement |
18:01:22 | Araq | oh and destructors are not restricted to value types but are still unfinished; btw finalizers are essential for weak references |
18:07:16 | Araq | gour: https://bitbucket.org/gour/claro is a 404 |
19:23:08 | * | xcombelle quit (Remote host closed the connection) |
19:41:14 | * | FreeArtMan joined #nimrod |
20:11:06 | reactormonk | sdw, ^ |
20:14:21 | reactormonk | Araq, how would lambda lifting solve the problem? is a for loop a scope? |
20:14:40 | Araq | reactormonk: yes |
20:15:17 | Araq | and guess what the C backend uses the lambda lifting code so we'll get consistent semantics if we use it for JS too |
20:16:18 | reactormonk | Araq, does the LL code operate on the syntax tree? Or which level? |
20:21:34 | Araq | yes, syntax tree |
20:21:52 | Araq | the codegen still needs to be aware of it though |
20:25:05 | reactormonk | How so? |
20:28:10 | Araq | a closure is a pair (fn, env) that need to be passed around by value |
20:28:55 | Araq | so the JS codegen needs to be aware that tyProc is a complex object when callConv == ccClosure |
20:36:09 | ccssnet | ccAFK |
20:41:59 | gour | dom96: because i do not have my own nimrod repo to test with :-) |
20:42:30 | gour | Araq: that was my mistake that i imported Claro when wanted to show you nimrod repo |
20:49:28 | reactormonk | Araq, genClosureCall looks rather long |
20:51:04 | reactormonk | what's a rope btw? |
20:53:19 | reactormonk | git grep ccClosure compiler/cc* | wc -l |
20:53:22 | reactormonk | 13 |
20:53:24 | reactormonk | uh-oh |
20:57:54 | Araq | reactormonk: you can't copy what the C codegen does |
20:58:02 | Araq | JS is too different |
20:58:09 | reactormonk | Araq, I know. |
20:58:15 | reactormonk | but I need to do similar stuff. |
20:58:55 | reactormonk | implements long strings represented as trees for lazy evaluation <- huh? |
20:59:27 | Araq | implements long strings; is represented as ... |
21:00:04 | reactormonk | ooh |
21:01:24 | reactormonk | That's gonna be not-so-easy. |
21:02:34 | Araq | it's easy :P |
21:03:36 | reactormonk | well, you have a slight idea which string to pullwhere |
21:05:21 | * | FreeArtMan quit (Ping timeout: 276 seconds) |
21:06:56 | reactormonk | sadly --def doesn't work that well inside the compiler |
21:10:57 | reactormonk | Araq, ooooh. It's using koch.nim |
21:11:00 | reactormonk | will that work? |
21:11:13 | reactormonk | "idetools" "--stdout" "--track:/tmp/nimrod-suggest9711yN/ccgexprs.nim,68,15" "--include:/home/tass/dev/nimrod/Nimrod/" "--def" "/home/tass/dev/nimrod/Nimrod/koch.nim" |
21:12:55 | Araq | no idea what you want to accomplish |
21:13:08 | reactormonk | find the definition of NodeTableTestOrSet |
21:14:15 | Araq | what's koch to do with it? |
21:14:46 | reactormonk | well, it's got a .nimrod.cfg in there, so that's what nimrod-mode uses |
21:15:20 | Araq | koch is not in the same dir as nimrod.nim |
21:15:48 | reactormonk | well, what's the main file for nimrod.nim? |
21:16:23 | Araq | nimrod.nim is the main file |
21:16:37 | reactormonk | "idetools" "--stdout" "--track:/tmp/nimrod-suggest971C9T/ccgexprs.nim,68,15" "--include:/home/tass/dev/nimrod/Nimrod/compiler/" "--def" "/home/tass/dev/nimrod/Nimrod/compiler/nimrod.nim" |
21:16:44 | reactormonk | still nothing :-( |
21:16:51 | reactormonk | I did touch nimrod.nimrod.cfg |
21:17:52 | Araq | no idea how that could work |
21:18:24 | Araq | oh I guess at 68,15 there is NodeTableTestOrSet |
21:33:46 | reactormonk | exactly |
21:34:02 | reactormonk | and it should find that, shouldn't it |
21:34:37 | Araq | true |
21:34:52 | Araq | well it doesn't really look for the definition iirc |
21:35:02 | Araq | but for the first occurance of the symbol |
21:35:04 | * | Trix[a]r_za is now known as Trixar_za |
21:36:15 | reactormonk | still - no response |
21:39:37 | Araq | oh yeah I think dom96 mentioned there is now an endless loop with --def |
21:40:01 | dom96 | indeed\ |
21:40:56 | reactormonk | Araq, it terminates, with an empty response |
21:45:13 | Araq | well that's far better than an endless loop :P |
21:46:04 | reactormonk | still sucks |
21:46:24 | Araq | btw NodeTableTestOrSet is in trees.nim iirc |
21:46:29 | dom96 | ugh, is there any way to stop Windows from stealing the stack trace from me? |
21:46:33 | Araq | and it's not important |
21:47:04 | Araq | dom96: how does it steal it from you? |
21:47:35 | dom96 | Perhaps it doesn't. But a "app.exe stopped working..." dialog shows up |
21:48:04 | reactormonk | Araq, it would really help to have --def working. |
21:48:08 | Araq | exit excpt.nim to not exit with 1 but with 0 |
21:50:20 | dom96 | doesn't help it seems |
21:53:54 | dom96 | Seems it segfaults on: s.prev = framePtr |
21:56:07 | dom96 | Araq: Tips on how to debug this? |
21:56:33 | Araq | what are you debugging? |
21:56:38 | reactormonk | dom96, did --def ever work for ya? |
21:56:46 | dom96 | reactormonk: of course |
21:56:55 | dom96 | reactormonk: I use it quite regularly in fact. |
21:56:57 | reactormonk | dom96, inside the nimrod compiler? |
21:57:11 | dom96 | reactormonk: mostly in apori |
21:57:14 | dom96 | *aporia |
21:57:23 | dom96 | Araq: the "could not import:" issue |
21:57:48 | reactormonk | doesn't work there either :-/ |
21:57:51 | reactormonk | hm. |
21:58:26 | Araq | dom96: got gdb open? |
21:58:30 | dom96 | Araq: yep |
21:58:55 | Araq | is 's' nil/null? |
21:59:44 | dom96 | $1 = (TFrame *) 0x22fe5c |
22:00:03 | Araq | what's the stack trace? |
22:01:50 | dom96 | https://gist.github.com/dom96/0b1bbb8eb4164093f0fd |
22:15:02 | Araq | hm weird |
22:16:26 | Araq | well it can't import "gtk_info_bar_new_with_buttons" :P |
22:17:31 | dom96 | I figured that much out :P |
22:17:44 | dom96 | It would be nice if I didn't need to gdb this thing though |
22:21:08 | Araq | well it looks like some weird stack corruption |
22:22:07 | * | gradha joined #nimrod |
22:23:11 | reactormonk | dom96, could you give me a working --def call within aporia? |
22:23:52 | dom96 | reactormonk: sorry, can't right now. |
22:24:15 | reactormonk | dom96, not urgent |
22:26:00 | dom96 | Araq: well should I keep the DLLs so that I can reproduce this? |
22:27:20 | Araq | dom96: yes please |
22:27:43 | Araq | are you sure it's no 64 vs. 32 bit issue? |
22:29:14 | dom96 | I'm quite certain, yes. |
22:31:23 | gradha | reactormonk: the idetools example you posted works fine for me |
22:31:40 | reactormonk | gradha, :-( |
22:31:52 | gradha | see http://pastebin.com/JmbRH5Tj |
22:33:03 | reactormonk | gradha, http://sprunge.us/BPVM :-( |
22:33:32 | gradha | aren't you missing the main project file? |
22:34:38 | * | gour quit (Quit: WeeChat 0.4.0) |
22:34:51 | gradha | I don't know where from the vim plugin is adding "./cgen.nim" but maybe that's what's missing? |
22:35:02 | reactormonk | ow. |
22:35:23 | reactormonk | damn |
22:35:30 | gradha | yes, it fails for me if it's not there |
22:35:31 | reactormonk | looks like that one's better than my prediction |
22:35:57 | reactormonk | ... wtf, now it works. |
22:36:27 | dom96 | hrm, perhaps it would be a good idea to make the compiler output an error when the main project file is missing. |
22:37:35 | reactormonk | Araq, http://sprunge.us/hOMS I call include not working |
22:39:45 | Araq | reactormonk: are you kidding me? |
22:40:02 | Araq | gradha said it works for him, so how can 'include' be the issue here? |
22:40:18 | reactormonk | Araq, see the two calls |
22:40:36 | reactormonk | because http://sprunge.us/IeHc |
22:41:02 | dom96 | what does --include do? |
22:42:37 | reactormonk | *head->wall* |
22:42:52 | reactormonk | it should be --lib |
22:42:58 | reactormonk | ... but that segfaults the compiler O.o |
22:43:26 | gradha | I see github lists all my nimrod repos as empty language, and nimrod fork still as C, impressive |
22:43:35 | dom96 | reactormonk: what are you trying to accomplish? |
22:43:48 | reactormonk | dom96, save it to a tempfile and call idetools from there |
22:43:57 | reactormonk | will change that as soon as nimrod serve |
22:44:11 | Araq | gradha: hey, it's been a year or so ... you can't expect them to care about their users, can you? |
22:44:17 | dom96 | reactormonk: I think you're looking for --path |
22:44:18 | gradha | oh, wait, Aporia is written in shell code, awesome |
22:44:20 | reactormonk | Araq, http://sprunge.us/FZCJ |
22:44:39 | reactormonk | dom96, inf loop \o/ |
22:44:52 | reactormonk | oh, nope. just takes a while and doesn't return anyhting |
22:45:29 | Araq | reactormonk: fix it then |
22:45:31 | Araq | it's easy |
22:45:47 | dom96 | er, doesn't --lib set the location of the stdlib? |
22:45:47 | gradha | Araq: in the future I'll make myself a hipster cat meme: I was programming nimrod when it wasn't even recognized as a language |
22:46:07 | Araq | gradha: nice one :D |
22:46:47 | reactormonk | dom96, --lib:PATH set the system library path |
22:47:06 | reactormonk | -p, --path:PATH add path to search paths |
22:48:17 | Araq | reactormonk: BECAUSE of idetools the compiler doesn't stort after the first error |
22:48:26 | Araq | so rawMessage(errSystemNeeds, name) doesn't quit it |
22:48:43 | Araq | and line 42 accesses 'result' which is nil |
22:48:45 | reactormonk | path: http://sprunge.us/FFCY :-( |
23:00:00 | Araq | reactormonk: doesn't work for me either, looking into it |
23:14:04 | * | gradha quit (Quit: bbl, have youtube videos to watch) |