<<04-04-2013>>

09:34:22*NimBot joined #nimrod
10:15:06*Trix[a]r_za is now known as Trixar_za
10:35:56dom96welcome back apotheon ;)
11:06:08NimBotAraq/Nimrod 848a839 Araq [+0 ±8 -0]: rod file viewer for easier debugging of rod files
12:23:35*q66 joined #nimrod
13:03:00*Trixar_za is now known as Trix[a]r_za
13:51:45Araqping zahary
14:24:39apotheondom96: thanks
14:47:00zaharyhi Araq
15:38:34*tass_ joined #nimrod
15:41:46Araqzahary: I'm having a hard time to find the cause of how you broke symbol files
15:42:02Araqit's related to some change about the handling of the system module
15:44:12Araqhi tass_, welcome
15:46:09zaharyah, I planned to fix this month ago
15:48:25zahary*months* . it's easy to fix - the culprit is the new way I assign module IDs now
15:51:13zaharyoh, I better try to finally do it even if don't get a good night sleep tonight
15:53:58*tass_ quit (Ping timeout: 258 seconds)
15:58:04Araqspeaking of which ... do the new typeInstCache, procInstCache and usedGenerics
15:58:12Araqfields need to be persisted?
16:00:35zaharythere is a bug with the old scheme I haven't told you about. in certain sequence of events it was possible to remove an implementation of generic proc while it's still being used by another module
16:02:39zaharyto answer your question, the new fields must be persisted somehow, but that's not enough - you must also put the implementations in the right file (I planned to implement my "binning" scheme to solve the problem)
16:09:51Araqwhat do you mean with "old scheme"? my way of doing it?
16:10:39zaharyyes, putting the generic in the file of the first user, without tracking other usages
16:11:05Araqbut that's not how it was done
16:11:14Araqat least not how it was supposed to be done
16:11:32Araqinstead it duplicated the generic instantiations
16:11:34zaharyhow was it supposed to be?
16:11:54Araqthe generics cache was by module for --symbolFiles:on
16:13:17zaharyI remember this, but let me try to recall what was the problem
16:15:27AraqI suppose it was that the C backend doesn't know about it ;-)
16:15:51Araqso for the C backend you can end up with a situation you described
16:16:22zaharyit had something to do with the codegen, yes
16:16:29Araqgenerics would have to be put into special C merge section for it to work
16:16:36Araq*instantiated generics
16:16:50Araqon the other hand ...
16:17:01AraqI forgot how the C file merging works ;-)
16:19:58reactormonkAraq, broke down to 130
16:23:09Araqand again the price for the most undecipherable messages goes to --- reactormonk!
16:24:20reactormonkAraq, I tend to keep the context based on the message I wrote last time ;-)
16:24:46Araqcontext is a very unfunctional thing :P
16:26:44reactormonkhow do you think you keep state in FP?
16:29:56Araqyou pass it around via parameters?
16:34:33reactormonkyeah, but they get bound to context eventually ;-)
16:35:51reactormonkAraq, need to kick you again for 347? ^^
16:38:22Araqnah I got it
16:38:49Araqyou can't continue your work because you NEED slightly different semantics in closures
16:39:52zaharywhat must be different in closures?
16:40:15Araqzahary: nimrod's JS backend currently uses JS's closures
16:40:45zaharyah, and the for loops bite you?
16:41:12Araqyeah
16:41:25Araqand it's not that easy to fix as the workaround we use for C doesn't work
16:41:45Araqas JS has clojures already and Nimrod's callbacks need to be compatible
16:41:53Araq*closures lol
16:42:18Araqso passing a hidden dummy param doesn't work
16:42:30zaharyis there an example gist with all of the problems?
16:44:33reactormonkzahary, there's just one example in the issue :-/
16:49:12zaharywell, it can be solved the coffee-script way
16:49:53Araqvia an additional dummy function() {...} block?
16:50:08zaharyyes, if you detect that the loop variable is captured
16:50:52zaharyor should I say "a loop variable", because it applies to all local variables in the stupid JS world
16:51:36zaharythe dummy block replaces the loop body, not the closure itself
16:52:00zaharyso you don't break inter-op with javascript
16:58:10reactormonkzahary, see my `fix` in the issue
16:58:19reactormonkhttps://gist.github.com/Tass/5225756
16:58:46reactormonkzahary, and yeah, JS scoping is ugly.
17:00:14zaharyyour fix is too hairy, I have a hard time following it
17:00:49zaharybut it doesn't seem to be the way I would do it
17:04:11zaharyI left some comments
17:05:49reactormonkOk
18:05:11reactormonkzahary, I'll create a different patch then
18:31:05*gradha joined #nimrod
18:43:18*silven_ is now known as silven
19:25:56reactormonkzahary, new patch, more the idea you indicate?
19:43:04*zahary1 joined #nimrod
19:58:42gradhaSo I have objc code to recycle files https://gist.github.com/gradha/5313645 and nimrod version at https://gist.github.com/gradha/5313649
19:58:59gradhathe nimrod version only works if you use objc code generation
19:59:18gradhaany ideas if it would be possible to have this available always even from c generation?
20:00:55dom96objc is such an odd beast
20:01:44dom96Is there no way to access this API using straight C?
20:01:49reactormonkdom96, nope
20:02:37reactormonkdom96, or, rather, how would you create one?
20:03:29gradhaI have a C API version, but it's deprecated in Mountain Lion, plus I don't know if it compiles in C, it just looks plain C because there are no objects
20:03:52gradhayou still need to link against the cocoa/appkit frameworks, and I guess that makes you objc anyway
20:04:01reactormonkgradha, yeah, they want to capture people in their ecosystem >:)
20:04:20Araqgradha: newException(EOS, ...) looks wrong, use OSError() instead
20:05:51Araqand I suppose we need a "target by module" switch soon
20:06:05reactormonkAraq, what's that?
20:06:08Araqso that recycle.nim gets compiled as ObjC and the rest does not
20:07:19dom96won't this recycle stuff be a part of os.nim though?
20:08:30dom96What would be nice is objc: ...
20:08:48dom96and the code in that block would be automatically compiled as objc if that's possible.
20:08:59reactormonkwhat if not?
20:09:15dom96reactormonk: what?
20:09:36reactormonkdom96, what if it's not possible to compile it as objc
20:09:46gradhaAraq: maybe putting the implementation in a separate file and using {.compile: "macosxrecycle.m".} ?
20:10:14dom96reactormonk: in that case the compilation should fail.
20:10:41dom96This will mostly be used on Mac OS X, so it should be possible. Right?
20:10:50Araqgradha: ha, exactly my idea :-)
20:11:30Araqhowever I think it shouldn't become part of os.nim anyway
20:13:36gradhaI'll test the idea while you think of a better place
20:14:36Araqnew module: fancyos.nim?
20:14:41Araq;-)
20:14:46reactormonkAraq, go for it
20:14:50gradhanotsouserfriendlyos.nim
20:15:10AraqI dunno, but it doesn't seem to be that useful
20:15:42gradhawho recycles anyway
20:16:05dom96perhaps babel?
20:16:20Araqfor automation you better know for sure it's unnecessary and then delete it properly
20:16:53Araqor you move it to /tmp
20:17:34Araqthe recycle bin feature looks to be a part of a UI toolkit to me
20:20:50gradhaI've made myself a few scripts which I integrate from the desktop and it's nice to have them behaving like other desktop operations, thus this implementation, since I'm rewritting all in nimrod
20:22:11AraqI'm glad to hear that :-)
20:22:29Araqand recycle.nim is useful to have of course
20:22:44gradhashell scripts have a limit, and scripting has horrendous performance
20:23:08AraqI'm still not convinced it should go into os.nim especially since it then has an ObjC dependency on mac
20:23:29gradhanp, I'll babel it
20:23:45Araqcool
20:24:12Araqif only we had babel's design finished
20:24:25gradhanimfancypants sounds promising
20:25:27gradhamaybe I should name it something which rhymes with dongle
20:26:28Araqcareful now
20:26:42Araqmaybe some feminist will read the logs one day
20:27:08gradhacan't wait for that to happen
20:27:40Araqyou could lose your job ;-)
20:27:54gradhayou mean, pestering you on irc?
20:29:01Araqno pestering *you* as you're the one with the dongle jokes
20:29:16dom96"I'll babel it" -- I like that.
20:29:24AraqI'm merely the guy who thinks feminism is a form of fascism
20:30:56gradhamaybe something kpop, since coreans are the superior race anyway and we will die in a zerg rush
20:31:03gradhaa bus zerg rush
20:34:21gradhabtw, does blizzard make something else other than diablo and *craft?
20:34:42Araqsure, "lost wikings"
20:36:37gradhanice, they are working on a card game, hearthstone
20:37:08dom96Don't forget Blizzard Dota
20:37:35dom96oh, they renamed it.
20:41:47Araqoh look an interview with Alan Kay http://www.osnews.com/comments/26914. Again.
20:42:36Araqwhere he can explain to us again what idiots we all are and that nobody comes close to his awesome imagination
20:52:34gradhaat least he is trying, I'm not trying to convince anybody else they are stupid for not coming close to my awesome imagination, maybe I should
20:54:12Araqyou need many more failed prototypes to become as famous as him :P
20:59:22*zahary1 quit (Quit: Leaving.)
21:00:33*gradha quit (Quit: bbl, have youtube videos to watch)
21:01:31Araqand he left without discussing babel with us
21:02:14dom96he can read logs right?
21:02:23Araqtrue
21:08:44Araqwhat's missing for Babel again?
21:11:44dom96proper versioning, dependencies
21:11:53dom96seamless integration with the compiler
21:12:46dom96You had a nice plan for integrating the compiler with it.
21:13:06Araqdependency management can be done with a simple compiler change
21:13:37Araqwhen it doesn't find any matching module, it could invoke "babel install modname" and then try again
21:14:29dom96Wasn't the original idea to explicitly state the packages in the .cfg file?
21:14:56Araqyeah but it's a never ending list of meta information then
21:15:18Araqand the deps are already in the "import" statements, so we'd better make use of that information
21:16:14dom96what about being able to specify non-babel deps?
21:17:28dom96what about versions?
21:18:42dom96I think it might turn out to be a bit of an annoyance if for each module which cannot be located the compiler tries to use babel to install it.
21:19:25Araqhmm
21:22:22AraqI dunno
21:22:30Araqit happens rarely enough
21:24:08Araqbut alright, so lets make a 'nimrod install' for that feature :-/
21:25:24dom96I really prefer the explicit config way
21:27:07dom96having to install each package manually defeats the purpose
21:27:20dom96You can do that already
21:27:55Araqno no
21:28:05Araqnimrod install would install stuff recursively
21:28:20Araqit would basically run 'nimrod check' over the given project
21:28:38Araqexcept that modules that it cannot find are handled over to babel to download and install
21:29:43*fowl quit (Ping timeout: 245 seconds)
21:32:07dom96hrm, ok.
21:32:17dom96How would the import look then?
21:36:14AraqI dunno, I would make it look like any other import
21:36:33dom96well you need the package name in there
21:36:40dom96so that babel knows what to install
21:37:49Araqthe package name is the module name?
21:39:00dom96what if your package wishes to expose multiple modules?
21:39:49Araqthat's not really a problem oh wait it kind of is
21:40:35Araqso we need a notion of a package in the compiler :-/
21:41:29Araqor indeed leave it all to babel
21:47:39Araqso dom96 make a suggestion of how a package should look like
21:48:04AraqI guess a package is a directory with some .babel file in it?
21:48:42dom96sure
21:48:53Araqor maybe simply a directory?
21:50:52Araqif I have /lib/a/modA and that imports modB and there is a /lib/a/modB I guess it doesn't make much sense to use $stdlib/modB ?
21:52:33dom96perhaps that is why we should explicitly specify the packages in the config file.
21:52:55AraqI am no fan of double book keeping
21:53:16Araqthe filesystem is enough to store these things implicitly
21:54:39dom96However you would specify the package in your import line anyway
21:58:04dom96I dislike these ambiguities though
21:58:13Araqwhich ones?
21:59:50dom96someday you might add something to stdlib which will conflict with some package
22:00:41dom96also, remember that you can do: import "package"
22:00:53dom96which makes this conflict more likely
22:02:47Araqwell within a package there is no problem with that
22:03:01Araqas the module within the package gets priority
22:04:46Araqbut it's a point worth considering
22:05:10Araqmaybe some packages become part of the stdlib or vice versa
22:05:43Araqbut hm that's just a versioning problem
22:08:45Araqbut back to dependencies
22:09:11Araqso I can say "requires jester > 0.1"
22:09:40Araqhowever, I have no idea if every version after 0.1 does indeed work
22:09:57Araqnor do I have a chance to find out
22:10:21Araq--> versioning is fundamentally flawed :P
22:11:14Araqblacklisting would work though
22:11:24Araq"doesn't work with version 0.1"
22:12:33Araqor maybe "works with version 1.0"
22:14:07Araqwhat one really wants is "try latest version, if it doesn't work, try the version listed here"
22:14:19Araqfor some definition of "doesn't work"
22:14:53Araqin our case I suppose it means "doesn't compile" ... ;-)
22:15:27dom96IMO it should be: "try version currently installed, if not installed install specific version"
22:15:43Araqoh yeah that's a good point
22:16:30dom96perhaps that behaviour could be configurable.
22:16:45dom96might also be nice to install a newer version if the currently installed one is lower than the specified one
22:17:56Araqbut then it may also be nice to not update in order to not break anything
22:21:07dom96well, will we allow multiple versions to be installed?
22:21:19dom96say one module specifies version 1 and another version 2.
22:21:23dom96er
22:21:26dom96s/module/package/
22:23:11Araqdunno
22:23:39Araqstill looks like a paper tiger to me
22:24:01Araq(a problem you can spend ages to solve and yet never really occurs)
22:24:43Araqyou can always rename the offending package in the worst case
22:25:06dom96well we're already spending way too much time perfecting this
22:25:16dom96it's annoying me to be honest :P
22:26:00Araq*shrug* people get what they deserve :P
22:27:21Araqbut right now we an unfinished nothing
22:27:39dom96how do we?
22:27:44dom96babel exists
22:27:47dom96it's a something
22:27:50dom96it's not nothing
22:28:05Araqalright but it can't download deps recursively
22:30:31Araqbut then maybe it's a feature :P
22:30:44Araqso that people don't have to list deps in the babel file
22:31:14Araqso it's the user's problem :-)
22:32:05dom96yeah, people should just write a sh file to execute babel many times :P
22:33:25AraqC/C++ survive without a package manager
22:34:47dom96yeah, maybe we should just wait until someone creates a package manager for us
22:34:55dom96but it's too late now :P
22:35:08Araqno it's good we're doing it
22:35:18Araqother people will only get it wrong :P
22:39:23dom96that's not very nice
22:39:38Araqbut I'm kidding
22:40:38dom96i'm sure you are
22:40:47AraqI'm not sure ;-)
22:58:39Araqwell I have to sleep now, see you tomorrow
23:06:06dom96bye
23:29:50*q66 quit (Remote host closed the connection)