<<26-02-2013>>

00:02:35*fowl_ quit (Ping timeout: 255 seconds)
00:32:25*fowl joined #nimrod
00:36:37sdwmore noob questions
00:37:01sdwhow the heck is object construction done? it seems as though this doesn't even exist
00:37:23reactormonksdw, exactly
00:37:26reactormonksdw, do it yourself.
00:37:53reactormonksdw, http://sprunge.us/bSCh
00:38:24reactormonksdw, related: https://github.com/Araq/Nimrod/issues/75
00:49:16sdwand if a ctor is to be emulated?
00:49:27sdwdtor*
00:50:50sdw"destructor"
00:51:27sdwthe closest I've found is something like the "with" macro example
01:05:36sdwalso, is there a trick to ensure that an object is properly constructed?
01:06:16sdwseems like all types are default cosntructed to nil
01:38:44reactormonksdw, use a make as above
01:40:25sdwI'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:51reactormonksdw, Araq would like that I'd say
01:52:20sdwI 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:30reactormonksdw, the idetools somewhat of work, but not with infix operations
01:56:49reactormonksdw, what editors would you be interested in?
01:57:19sdwi'm getting along with notepad++ just fine
01:58:05reactormonkno preexisting nimrod idetools then
01:59:15reactormonksdw, 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:41fowlsdw: http://forum.nimrod-code.org/t/90
02:56:30*Anaphaxeton quit (Remote host closed the connection)
03:59:01sdwfowl: thanks
04:03:07fowlsdw: 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:37fowlif you want you could implement isNil(yourtype): bool then use it like a pointer
04:04:34fowlif 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:50sdwyes, with enough discipline I would not have any of these bugs
04:07:08sdwand then there is the matter of destructors, or something similar
04:07:17fowlsdw: if you post on the forums someone could probably upload the dlls you need for aporia on windows
04:07:33sdwah, aporia isn't a big deal. ill just wait for the installer
04:07:55fowlthere is a destructor pragma for use with value types but i dont have experience with it
04:08:03fowldo you mean destructor for references?
04:08:25sdwfor all types
04:09:02sdwlet's see if I have this right: type T = object [fields] is a value type
04:09:21sdwprepending ref turns it into a traced reference type
04:09:33sdwnot prepending, but you know what I mean
04:09:43fowlyea
04:10:23fowlyou can also use anonymous types for references as in `type PFoo = ref object ..`
04:10:26sdwso I would expect that at the end of the instance's lifetime some proc could be called
04:11:03fowlhttp://build.nimrod-code.org/docs/manual.html#destructor-pragma
04:11:47sdwah, good
04:12:33sdwstack based is what is generally wanted. i have never had much use for finalizers
04:13:02fowlyou only really need that if your type contains unmanaged memory (so you can clean it up) otherwise
04:13:17fowlit should be cleaned up automatically
04:14:00sdwi was thinking for for files and mutexes
04:14:04sdwmore*
04:15:53sdwalso, does the compiler not implement subranges?
04:16:37fowlsubrange?
04:17:31fowlhttp://nimrod-code.org/tut1.html#subranges
04:17:41sdwright
04:18:00sdwany paste sites support nimrod?
04:18:06fowlgist
04:19:34sdwhttps://gist.github.com/kFo/5035837
04:22:24sdwi suppose gist does not compile
04:22:36sdwanyways, that compiles and prints "i is -1"
04:22:54fowli think that is a bug
04:23:19sdwif I change it to const, there is no change in output
04:23:36sdwI would expect this to not compile
04:23:47reactormonksdw, 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:42gourmorning
08:19:26gourAraq: see https://bitbucket.org/site/master/issue/6483/support-for-nimrod-language-bb-7658#comment-3237123 & https://bitbucket.org/gour/claro
08:19:56gouroops wrong repo
08:20:16*fowl__ joined #nimrod
08:21:03*fowl_ quit (Ping timeout: 252 seconds)
08:22:15gourhere is the correct one https://bitbucket.org/gour/nimrod
08:38:22fowl__gour: why dont you just write some code instead of waxing philosophical on version control systems
08:39:47gourfowl__: 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:25fowl__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:35dom96gour: nice that you're asking the BB guys for Nimrod support
17:14:48dom96But why host a clone of the nimrod repo on BB?
17:49:31Araqsdw: http://build.nimrod-code.org/docs/manual.html#not-nil-annotation
17:51:46AraqI'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:17Araqbtw 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:22Araqoh and destructors are not restricted to value types but are still unfinished; btw finalizers are essential for weak references
18:07:16Araqgour: 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:06reactormonksdw, ^
20:14:21reactormonkAraq, how would lambda lifting solve the problem? is a for loop a scope?
20:14:40Araqreactormonk: yes
20:15:17Araqand 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:18reactormonkAraq, does the LL code operate on the syntax tree? Or which level?
20:21:34Araqyes, syntax tree
20:21:52Araqthe codegen still needs to be aware of it though
20:25:05reactormonkHow so?
20:28:10Araqa closure is a pair (fn, env) that need to be passed around by value
20:28:55Araqso the JS codegen needs to be aware that tyProc is a complex object when callConv == ccClosure
20:36:09ccssnetccAFK
20:41:59gourdom96: because i do not have my own nimrod repo to test with :-)
20:42:30gourAraq: that was my mistake that i imported Claro when wanted to show you nimrod repo
20:49:28reactormonkAraq, genClosureCall looks rather long
20:51:04reactormonkwhat's a rope btw?
20:53:19reactormonkgit grep ccClosure compiler/cc* | wc -l
20:53:22reactormonk13
20:53:24reactormonkuh-oh
20:57:54Araqreactormonk: you can't copy what the C codegen does
20:58:02AraqJS is too different
20:58:09reactormonkAraq, I know.
20:58:15reactormonkbut I need to do similar stuff.
20:58:55reactormonkimplements long strings represented as trees for lazy evaluation <- huh?
20:59:27Araqimplements long strings; is represented as ...
21:00:04reactormonkooh
21:01:24reactormonkThat's gonna be not-so-easy.
21:02:34Araqit's easy :P
21:03:36reactormonkwell, you have a slight idea which string to pullwhere
21:05:21*FreeArtMan quit (Ping timeout: 276 seconds)
21:06:56reactormonksadly --def doesn't work that well inside the compiler
21:10:57reactormonkAraq, ooooh. It's using koch.nim
21:11:00reactormonkwill that work?
21:11:13reactormonk"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:55Araqno idea what you want to accomplish
21:13:08reactormonkfind the definition of NodeTableTestOrSet
21:14:15Araqwhat's koch to do with it?
21:14:46reactormonkwell, it's got a .nimrod.cfg in there, so that's what nimrod-mode uses
21:15:20Araqkoch is not in the same dir as nimrod.nim
21:15:48reactormonkwell, what's the main file for nimrod.nim?
21:16:23Araqnimrod.nim is the main file
21:16:37reactormonk"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:44reactormonkstill nothing :-(
21:16:51reactormonkI did touch nimrod.nimrod.cfg
21:17:52Araqno idea how that could work
21:18:24Araqoh I guess at 68,15 there is NodeTableTestOrSet
21:33:46reactormonkexactly
21:34:02reactormonkand it should find that, shouldn't it
21:34:37Araqtrue
21:34:52Araqwell it doesn't really look for the definition iirc
21:35:02Araqbut for the first occurance of the symbol
21:35:04*Trix[a]r_za is now known as Trixar_za
21:36:15reactormonkstill - no response
21:39:37Araqoh yeah I think dom96 mentioned there is now an endless loop with --def
21:40:01dom96indeed\
21:40:56reactormonkAraq, it terminates, with an empty response
21:45:13Araqwell that's far better than an endless loop :P
21:46:04reactormonkstill sucks
21:46:24Araqbtw NodeTableTestOrSet is in trees.nim iirc
21:46:29dom96ugh, is there any way to stop Windows from stealing the stack trace from me?
21:46:33Araqand it's not important
21:47:04Araqdom96: how does it steal it from you?
21:47:35dom96Perhaps it doesn't. But a "app.exe stopped working..." dialog shows up
21:48:04reactormonkAraq, it would really help to have --def working.
21:48:08Araq exit excpt.nim to not exit with 1 but with 0
21:50:20dom96doesn't help it seems
21:53:54dom96Seems it segfaults on: s.prev = framePtr
21:56:07dom96Araq: Tips on how to debug this?
21:56:33Araqwhat are you debugging?
21:56:38reactormonkdom96, did --def ever work for ya?
21:56:46dom96reactormonk: of course
21:56:55dom96reactormonk: I use it quite regularly in fact.
21:56:57reactormonkdom96, inside the nimrod compiler?
21:57:11dom96reactormonk: mostly in apori
21:57:14dom96*aporia
21:57:23dom96Araq: the "could not import:" issue
21:57:48reactormonkdoesn't work there either :-/
21:57:51reactormonkhm.
21:58:26Araqdom96: got gdb open?
21:58:30dom96Araq: yep
21:58:55Araqis 's' nil/null?
21:59:44dom96$1 = (TFrame *) 0x22fe5c
22:00:03Araqwhat's the stack trace?
22:01:50dom96https://gist.github.com/dom96/0b1bbb8eb4164093f0fd
22:15:02Araqhm weird
22:16:26Araqwell it can't import "gtk_info_bar_new_with_buttons" :P
22:17:31dom96I figured that much out :P
22:17:44dom96It would be nice if I didn't need to gdb this thing though
22:21:08Araqwell it looks like some weird stack corruption
22:22:07*gradha joined #nimrod
22:23:11reactormonkdom96, could you give me a working --def call within aporia?
22:23:52dom96reactormonk: sorry, can't right now.
22:24:15reactormonkdom96, not urgent
22:26:00dom96Araq: well should I keep the DLLs so that I can reproduce this?
22:27:20Araqdom96: yes please
22:27:43Araqare you sure it's no 64 vs. 32 bit issue?
22:29:14dom96I'm quite certain, yes.
22:31:23gradhareactormonk: the idetools example you posted works fine for me
22:31:40reactormonkgradha, :-(
22:31:52gradhasee http://pastebin.com/JmbRH5Tj
22:33:03reactormonkgradha, http://sprunge.us/BPVM :-(
22:33:32gradhaaren't you missing the main project file?
22:34:38*gour quit (Quit: WeeChat 0.4.0)
22:34:51gradhaI don't know where from the vim plugin is adding "./cgen.nim" but maybe that's what's missing?
22:35:02reactormonkow.
22:35:23reactormonkdamn
22:35:30gradhayes, it fails for me if it's not there
22:35:31reactormonklooks like that one's better than my prediction
22:35:57reactormonk... wtf, now it works.
22:36:27dom96hrm, perhaps it would be a good idea to make the compiler output an error when the main project file is missing.
22:37:35reactormonkAraq, http://sprunge.us/hOMS I call include not working
22:39:45Araqreactormonk: are you kidding me?
22:40:02Araqgradha said it works for him, so how can 'include' be the issue here?
22:40:18reactormonkAraq, see the two calls
22:40:36reactormonkbecause http://sprunge.us/IeHc
22:41:02dom96what does --include do?
22:42:37reactormonk*head->wall*
22:42:52reactormonkit should be --lib
22:42:58reactormonk... but that segfaults the compiler O.o
22:43:26gradhaI see github lists all my nimrod repos as empty language, and nimrod fork still as C, impressive
22:43:35dom96reactormonk: what are you trying to accomplish?
22:43:48reactormonkdom96, save it to a tempfile and call idetools from there
22:43:57reactormonkwill change that as soon as nimrod serve
22:44:11Araqgradha: hey, it's been a year or so ... you can't expect them to care about their users, can you?
22:44:17dom96reactormonk: I think you're looking for --path
22:44:18gradhaoh, wait, Aporia is written in shell code, awesome
22:44:20reactormonkAraq, http://sprunge.us/FZCJ
22:44:39reactormonkdom96, inf loop \o/
22:44:52reactormonkoh, nope. just takes a while and doesn't return anyhting
22:45:29Araqreactormonk: fix it then
22:45:31Araqit's easy
22:45:47dom96er, doesn't --lib set the location of the stdlib?
22:45:47gradhaAraq: 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:07Araqgradha: nice one :D
22:46:47reactormonkdom96, --lib:PATH set the system library path
22:47:06reactormonk -p, --path:PATH add path to search paths
22:48:17Araqreactormonk: BECAUSE of idetools the compiler doesn't stort after the first error
22:48:26Araqso rawMessage(errSystemNeeds, name) doesn't quit it
22:48:43Araqand line 42 accesses 'result' which is nil
22:48:45reactormonkpath: http://sprunge.us/FFCY :-(
23:00:00Araqreactormonk: doesn't work for me either, looking into it
23:14:04*gradha quit (Quit: bbl, have youtube videos to watch)