<<21-02-2013>>

21:58:21*NimBot joined #nimrod
21:58:58reactormonkzahary, what sould nimrod.nim be? the main project file? Or start a serve per file?
21:59:44zaharythe main project file
22:00:09reactormonkDoes it need to require all files? What of test files that are not included by the main file?
22:00:17reactormonks/require/import/
22:01:14zaharythe compiler will do exactly what it does when compiling the project. if a module is directly on indirectly imported, then it's a part of the project
22:01:44reactormonkI have found that namespaces are not transitive
22:01:57zaharyit should work with a directories featuring a nimrod.cfg file too (having a mainmodule: X directive)
22:02:08Araqnor should they be transitive o.O
22:02:21reactormonkAraq, I agree
22:02:26Araqyou can use 'export' for that btw
22:02:36reactormonkAraq, haven't seen that
22:03:02dom96zahary: why does it exit when a command is processed?
22:03:25zaharyit shouldn't do that :) does it?
22:04:24gradhadom96: first nimbot and now the compiler?
22:04:37dom96gradha: I'm on a killing spree.
22:05:03dom96zahary: yeah, it does :(
22:05:04reactormonkdom96, hey! that's my task.
22:06:17zaharydom96, what do you do exactly?
22:06:26zaharyI just tried in on the compiler itself
22:06:32dom96nimrod serve --server.type:stdin aporia.nim
22:06:51dom96idetools --track:aporia.nim,2184,6 --suggest aporia.nim
22:07:01dom96Note that I added 'win.' on that line
22:08:30zaharyhmm, I'm getting a C compilation error on Aporia (clang on mac os)
22:09:22dom96what's the error?
22:11:21zaharylooks like a marked for a global variable which is generated, but the global variable itself isn't (I'm using the mark and sweep GC now by default)
22:11:33zahary* marker *
22:11:57zaharyuse of undeclared identifier 'currexception_13224'
22:12:08dom96I think gradha might have had a similar problem.
22:14:43reactormonkAraq, it works for objects but not for refs :-(
22:15:10Araq== for refs already exists
22:15:20gradhadom96: haven't touch Aporia for a long time, but yes, it crashes now on me too with the default gc
22:15:45Araqand you need to define 'ref' for $
22:15:47gradhaapparently a checkout from San Valentine day, lovely
22:16:13Araqdom96: you got the memory management wrong :P
22:17:21gradhaI'll update the compiler and try again
22:17:47reactormonkAraq, should I mark ref in $ ?
22:18:14dom96Araq: Care to be a bit more specific?
22:18:37Araqreactormonk: ugh, no
22:18:51Araqwe have 'repr' for these things
22:18:55reactormonkAraq, ok
22:19:03reactormonkso let's implement repr for JS :-)
22:19:23Araqin fact, I don't really like $ for objects either but hrm
22:19:41reactormonkit's good to have a basic notion for those
22:20:08Araqyeah I guess
22:20:18Araqyou can olways override it
22:20:25reactormonkThat's the idea
22:20:37reactormonkhmm, reference equality should test the reference?
22:20:57Araqdom96: I remember you playing around with GC_ref and passing GC'ed memory to GTK
22:21:39dom96yes, that could be it.
22:22:11reactormonkBecause for now obj == obj is true for value and false for refs
22:22:27gradhahey, this error is new, on San Valentine day it was internal error: genStmts(nkNone), now it is genStmts(nkYieldStmt)
22:22:56reactormonkShould == for refs use the derefed ==?
22:23:04gradhawill put this on github
22:23:10Araqreactormonk: don't mess with == for refs
22:23:20reactormonkAraq, guessed so :-/
22:23:25Araqit obviously should *not* deref
22:23:49reactormonkAraq, so you have to overwrite ref and value for custom objects - good old equal vs. same
22:25:52reactormonkany motivation to resolve this?
22:26:38Araqx[] == y[] vs x == y
22:26:48Araqwhere x, y are refs
22:27:43reactormonkno shortcut for x[] == y[] that is transparent for refs?
22:28:00Araqyou can introduce x === y for x[] == y[] and jump for joy
22:28:19reactormonk... well, JS has reference semantics anywhere.
22:28:41reactormonkwait, they only have == anyway. Would be nice to have it though
22:29:14Araqwhat's the problem? the compiler does not have to produce JS's == for Nimrod's ==
22:30:06reactormonkMy problem is that you have to care about refs and non-refs in JS, or for code that works both in C and JS and that's I'd like the equal to be different on C and JS to take care of the different default semantics value vs. ref
22:30:29Araqo.o
22:30:46reactormonkgiven your reaction, you should care?
22:31:45Araqdon't change Nimrod's semantics unnecessarily just because you happen to target JS
22:32:21Araqit's bad enough JS doesn't support 64bit integers etc.
22:32:30reactormonkMy idea is to use a convention of 'equal' which changes depending on platform - not sure if that adds too much complexity that breaks
22:32:59Araqcan't think of any use case where 'equal' is necessary or desired
22:33:10dom96zahary: any ideas what the problem is?
22:33:25reactormonkAraq, ok.
22:33:41reactormonkAraq, pushed and tested.
22:35:47Araqproc `$`*[T: ref](x: T): string = $x[] # remove that again please
22:36:13reactormonkaww
22:39:53Araqwhen every type supports every operation there is not much type safety left :P
22:40:17Araqwe used to support 'len' for everything for instance
22:40:30Araqit would transform len(x) into len([x]) into 1
22:41:05Araqwas very error prone
22:41:29reactormonkReferential transparency would help a bit imo
22:43:18Araqwhat has that to do with it?
22:43:58reactormonklet's see if it means what I think it means
22:50:14gradhareading on use of # as len synonim I made http://pastebin.com/bDG3LXLz to abuse unicode characters
22:50:38gradhadoesn't work that well with the dot sugar syntax
22:54:40*gradha quit (Quit: bbl, have youtube videos to watch)
22:55:18*zahary quit (Quit: Leaving.)
23:00:38reactormonkAraq, anyway, pull.
23:00:43gourAraq: what do you think about using wxC (part of wxhaskell project) to provide wx bindings for nimrod?
23:02:55Araqgour: I think it's a good idea if they are up to date and maintained
23:05:13NimBotAraq/Nimrod 5bf71d1 Simon Hafner [+1 ±0 -0]: added tests for == and $
23:05:13NimBotAraq/Nimrod 1daa424 Simon Hafner [+0 ±2 -0]: added tests, actually implemented $ and ==
23:05:13NimBotAraq/Nimrod 4186c1c Simon Hafner [+0 ±2 -0]: added $ for refs and removed == for ref test... 3 more lines
23:05:13NimBotAraq/Nimrod cc8a656 Simon Hafner [+0 ±2 -0]: removed `$` for refs upon request
23:05:13NimBotAraq/Nimrod 5862a9c Araq [+1 ±1 -0]: Merge pull request #341 from Tass/master... 3 more lines
23:05:21gourlatest version of wxhaskell supports >= 2.9.x (https://github.com/jodonoghue/wxHaskell) not much recent work, but it seems everyone is waiting for 3.0 which was supposed to happen years ago :-/
23:08:38Araqgour: the problem is that then you have to build and install libwxc.so
23:08:45Araqor whatever it's called
23:09:12Araqand I find these things so painful on linux that I avoid it like the plague :P
23:09:16gourwhat about claro? it would be ported to nimrod or still bindings via C?
23:09:52Araqported to Nimrod, but gradually
23:10:18gouryeah that makes sense and it would be long-term solution for writing GUI apps
23:12:18gourit actually sounds as the best option if claro is, in the present state, capable-enough (aka rich-enough) gui toolkit
23:12:58Araqit has a canvas that you can draw onto with cairo
23:13:13Araqwhich is supposed to be used for custom widgets I think
23:13:34Araqapart from that it has a layout engine, buttons and the usual widgets
23:13:59Araqthough their text editor widgets sucks iirc
23:14:04*fowl quit (Ping timeout: 256 seconds)
23:14:06gourwhat about 'general' widgets like buttons, menus, different dialogs etc.?
23:15:21Araqlook at its include/widgets directory please
23:16:44gourlooks as solid list
23:17:34Araqa table widget is missing though
23:23:45reactormonkI like the tk ones :-)
23:25:23gouri remember talks in haskell about reactive fp gui programming, D also wanted to have some 'native' toolkit, DWT was done for the purpose, so having native toolkit in nimrod would be extraordinary feature :-)
23:29:40*fowl joined #nimrod
23:31:59Araqlooking at it again, it's still quite some work to give a native Nimrod interface
23:34:15gourwhat is the right solution for GUI in Nimrod then? writing cli apps?
23:34:41*Anaphaxeton quit (Quit: Αποχώρησε)
23:35:00AraqI'm just saying Claro still needs some love
23:35:15Araqbut we should give it a try
23:36:16*fowl quit (Read error: Connection reset by peer)
23:36:24dom96A native toolkit sounds like a fun project, but I already have too many projects :\
23:36:33gourok, that sounds better :-)
23:37:02gourdom96: step by step, as Araq wrote
23:40:28AraqNimBot didn't get the push
23:40:43Araqis there a way to trigger it manually from here?
23:40:57dom96test hook
23:42:12Araqnah
23:43:15AraqI'll push again soon anyway
23:43:34dom96hopefully I'll have NimBot fixed by tomorrow
23:43:42dom96good night
23:44:07Araqgood night
23:45:04gourif i understand properly, Claro does something like wx but for C instead of C++?
23:45:08gournight dom96
23:46:01Araqgour: yes it has 3 backends, one for windows, one for gtk and one for cocoa
23:46:25Araqit's quite a thin layer over each of these
23:48:16gourhow does it avoid 'install libwxc.so' problem pertinent to wx bindings?
23:49:27Araqwe can add lots of {.compile: "file.c".} to the nimrod wrapper and embed it ;-)
23:49:30Araqbut ok
23:49:37Araqwe could do the same for wxC
23:49:45*gour nods
23:50:09Araqbut libwxwidgets.so is not common on Linux either I think
23:50:31Araqand it's too bit to embed in the nimrod app
23:50:59gourconsidering the limited man power, it might be smart to save time and just use wx via wxC...there is not QtC, afaik
23:51:42gourat least as temporary solution until nimrod becomes (more) popular
23:51:50Araqbut wxWidgets is much more bloated
23:52:02Araqand the API sucks
23:52:13gourright, but not complete wx has to be used
23:52:21gourAPI is another story
23:52:23NimBotAraq/Nimrod 4ed60c2 Araq [+0 ±1 -0]: added gradha's improvements for the times module (issue #231)
23:52:23NimBotAraq/Nimrod 8b48792 Araq [+1 ±2 -0]: Merge branch 'master' of github.com:Araq/Nimrod
23:53:12gouranyway, i believe asking about decent bindings/toolkit to write multi-platform apps in nimrod is not too much offtopic :-)
23:54:01gouri wonder if wx's API improved from 2.8 --> 2.9/3.0?
23:54:40*fowl joined #nimrod
23:54:48Araqit did, it now uses utf-8 everywhere I think
23:54:55Araqwhich is nice for nimrod
23:55:48gourbut there was some hot discussion about wxString, iirc, Vadim was changing his mind about some stuff
23:56:33gourIP has two paid devs, but it looks as wx has one part-time dev
23:56:38gour*IUP
23:57:54AraqI'm not worried about that
23:57:58gourQt is also big, nicely supported, but it would require support for C++
23:58:06gourabout wx?
23:58:15AraqwxWidgets is used widely enough that somebody would take over
23:58:19fowlAraq: i think some things have to change for c++ code generation
23:58:38Araqfowl: I'm listening
23:59:11gourotoh, i like ex concept and it's native on every platform (if we accept gtk on linux as native)
23:59:28gour*wx concept
23:59:52fowlAraq: ive read on stackoverflow that in c++ its convention to declare variables when you need them, opposed to in c declaring things at the beginning of the function