<<07-02-2013>>

00:45:43*XAMPP-8 quit (Ping timeout: 264 seconds)
00:46:42*XAMPP-8 joined #nimrod
00:57:35NimBotAraq/Nimrod 52d4395 Araq [+1 ±11 -0]: first version of a simple mark&sweep GC; activate with --gc:markAndSweep
01:00:38Araq59429 lines compiled; 2.704 sec total; 254.260MB # mark&sweep
01:01:42Araq59971 lines compiled; 2.806 sec total; 173.178MB # reference counting
01:02:35Araq--> M&S trades memory for speed
01:02:44Araqsuprisingly ...
01:03:15Araq58008 lines compiled; 3.425 sec total; 130.133MB # Boehm
01:03:39Araqgood night
03:31:52*Anaphaxeton quit (Remote host closed the connection)
03:39:18reactormonkCan I just overwrite 'echo' in my lib?
04:54:06*XAMPP-8 quit (Ping timeout: 264 seconds)
08:44:29*gour joined #nimrod
09:33:27Araqping zahary, zahary_
09:35:29zahary_pong Araq
09:36:33Araqsaw my new m&s gc?
09:41:33Araqsuprisingly it's faster than the RC-based GC but uses much more RAM
09:44:13Araqhowever this is due to the doubling of the threshold, if I make the formula * 1.5, it uses 185MB
09:45:53Araqbut then it loses against the old one ...
10:52:41*gour quit (Disconnected by services)
10:52:43*gour_ joined #nimrod
10:58:59*gour_ is now known as gour
11:57:43*q66 joined #nimrod
13:41:53*silven quit (Remote host closed the connection)
13:45:57*silven joined #nimrod
13:51:53*silven quit (Remote host closed the connection)
13:53:44*silven joined #nimrod
13:56:33*silven quit (Remote host closed the connection)
13:59:53*silven joined #nimrod
14:05:58*silven quit (Remote host closed the connection)
14:07:02*silven joined #nimrod
14:14:06*silven quit (Remote host closed the connection)
14:16:00*silven joined #nimrod
14:23:16*silven quit (Remote host closed the connection)
14:26:54*silven joined #nimrod
14:33:23*silven quit (Remote host closed the connection)
14:34:34*silven joined #nimrod
14:42:27*Anaphaxeton joined #nimrod
15:51:08Araqping zahary, zahary_
15:59:00zahary_sorry Araq, too many fires at work to put out today
16:00:05Araqalright np
16:00:08zahary_as for the new GC, well, that was fast :) (implementing it)
16:00:12zahary_I'll try it out tonigh
16:00:30AraqI'm already working on an improved version
16:00:46Araqnot sure if the algorithm that I've in mind is correct though ;-)
16:01:05Araqthat's what I wanted to talk you about
16:01:12zahary_I'd love to add more discovered leaks to my belt (7 so far)
16:03:16Araqwhat do you mean? you found even more leaks?
16:05:49zahary_no, this is the my all-time count. if you remember, I also discovered some zeromem leaks in an old code by ddl_smurf
16:05:59zahary_:)
16:07:14Araqarguably all the leaks in my GC count as 1 leak :P
16:07:49Araqoften I deliberately removed the full write barrier for optimization
16:08:02Araq(I thought it's correct)
16:21:36Araqdom96: please have a look at the bug about os.createDir and aporia
16:22:47dom96link?
16:22:56Araqugh
16:23:28Araqhttps://github.com/Araq/Nimrod/pull/322
16:26:54gourAraq: when i asked about comparison between ada & nimrod yesterday in terms of reliability/security, i hope you understood i'm thinking about type-safety and such things, but I bet you thought about it when designing nimrod considering you used ada in real world
16:28:55Araqgour: yes but to be honest we found a few issues wrt memory safety ;-)
16:29:52gourAraq: well those things can be fixed, i hope...not much of design blunder
16:30:16*gour would use GC preferrably
16:30:41gouriow. "safeNimrod" :-)
16:31:28Araqsure but it's a bit of work and will break some code; I'm talking about branch transitions in 'case objects'
16:32:15gouryou're still below 1.0, so code break is probably not big issue
16:32:28Araqwell ok, it's trivial to fix by not overlaying these fields in memory but where is the fun in that? ;-)
16:33:39Araqalso memory safety in particular is a complex topic, I guess I should finally create a blog and write about it
16:33:57gourpls. do it
16:34:14gourit'll be good for nimrod
16:45:21AraqI know
17:54:53*Zerathul joined #nimrod
18:19:00reactormonkgour, the more issues you create the better nimrod-mode can get :>
18:19:12reactormonkhacked a bit on the js part because I need it
18:30:31*fowl joined #nimrod
18:52:23*FreeArtMan joined #nimrod
18:58:53*zahary quit (Read error: Connection reset by peer)
18:59:04*zahary joined #nimrod
18:59:42*zahary quit (Client Quit)
19:00:20*zahary joined #nimrod
19:03:16apotheonhttp://sourceware.org/ml/glibc-cvs/2013-q1/msg00115.html
19:15:44*shevy quit (Ping timeout: 246 seconds)
19:18:39Araqapotheon: I already know that one ;-) but if you use TWO instead of 2.0 your code is bs anyway
19:19:55dom96I for one think the compiler should understand syntax like "two point five" :P
19:28:25*shevy joined #nimrod
19:40:47*q66 quit (Read error: Connection reset by peer)
19:41:22*q66_ joined #nimrod
19:43:56*q66_ is now known as q66
20:05:38reactormonkAraq, btw, openarray[expr] doesn't match string e.g.
20:30:26*XAMPP-8 joined #nimrod
20:33:48*FreeArtMan quit (Quit: Leaving)
20:43:50gourreactormonk: i'll do as as i find time to play a bit with it
20:50:12Araqreactormonk: try varargs[expr] instead
20:56:48reactormonkAraq, ok
20:57:00gourreactormonk: from which languages you're arriving to nimrod?
20:57:02reactormonkgour, completion doesn't work with + or similar - blame idetools
20:57:05*gradha joined #nimrod
20:57:12reactormonkgour, ruby, mainly. and elisp. Currently learning scala.
20:57:18reactormonkAraq, I assume proc types are contravariant?
20:57:32gourreactormonk: idetools? what's that?
20:57:52reactormonkgour, the nimrod compiler provides me with completion and symbol information.
20:58:18reactormonkgour, go try M-.
20:58:24gourreactormonk: ahh, that's something for core devs then
20:58:36gradhagour: not at all
20:58:44gradhaI use it all the time
20:58:53gourreactormonk: haven't install your mode yet and now have some afk work
20:59:02gourgradha: emacs?
20:59:13gradhaI meant idetools, it's something for users
20:59:20gradhasorry if I barged in the conversation without context
20:59:50Araqreactormonk: they are not contravariant nor covariant
21:00:43reactormonkAraq, aww
21:01:18reactormonkgour, nope, they're the interface that provides the editor with contextual information
21:02:01gourreactormonk: so, editor just uses what it gets, right?
21:08:15reactormonkgour, exactly.
21:08:44gourthen, it's compiler bug...
21:09:14reactormonkgour, if it doesn't get anything or the wrong one, reproduce it. Maybe it's my fault, or idetools doesn't work right. There's a *nimrod-suggestion or so buffer that does a bit more
21:09:22reactormonks/does a bit more/displays the outputs/
21:09:39gourreactormonk: ok. will try tomorrow afternoon
21:34:48gourwhat is the plan in regard to interfacing with C++? i'm thinking about e.g. wx bindings
21:34:57gouror Qt...whatever
21:35:39gradhahmm... that reminds me, maybe it would be worth investigating swing generating bindings for nimrod?
21:37:41gourmaybe..although very often i hear people from different camps complaining about the quality (aka bloat) of swig-generated bindings for the language xyz
21:38:02gradhagranted, but sometimes having something is better than nothing, especially for adoption
21:38:21gradhayou see, you can advertise "we have bindings!" and with fine print "but they are swingified"
21:38:24*gour nods
21:39:01Araqgradha: I'd improve c2nim instead so that it can handle C++
21:39:39gourthat'd be great
21:39:51gradhaNIH syndrome or some other good reason? I mean, c2nim doesn't work with non-massaged C headers, so...
21:40:16Araqneither does anything work with non-massaged C headers
21:40:38gradhaswig doesn't either?
21:41:12Araqnot really
21:41:35Araqin fact, special "header.i" files for swig are common
21:42:24gouriirc, it's possible to run swig directly on *.h as well
21:42:27gradhadisappointing, maybe using llvm would be easier? at least that should support C parsing
21:43:45Araqgood luck with that
21:43:57gradhawas waiting for you to say that
21:44:02gourmaybe this https://github.com/Araq/Nimrod/wiki/Editor-Support needs some update to point at reactormonk's fork?
21:44:17gradhadoit!
21:44:21Araqyou start with a minute long build for LLVM and then you haven't tweaked anything
21:45:11gradhaI had the impression that llvm does the heavy parsing stuff and you can hook into it at the point it uses AST trees or something like that you compiler guys undestand
21:46:07Araqwell it's been a while but I didn't like their APIs and I tried once to implement a 'void run_C_code(char* code);'
21:46:35gradhawow, I had expected they would be providing that
21:46:38Araqwas in their channel and they told me it would be quite some work
21:47:04Araqplus most of their APIs have no C bindings or they are not kept up to date
21:47:27Araqbut if you want to hack it in C++ anyway that's no problem
21:48:15Araqbtw c2nim can also translate function *bodies*
21:48:31AraqI don't think SWIG can do that
21:50:14gourhttp://rosettacode.org/wiki/Nimrod says: "...although it could use more developers, there is currently only one core developer."
21:50:30gradhascratch my words about llvm, I should have said http://clang.llvm.org/docs/Tooling.html
21:50:48gradha"Use LibClang when you want powerful high-level abstractions, like iterating through an AST with a cursor"
21:51:57Araq"and forget about #defines as they are no first class citizens of C/C++" :P
21:52:23gradhayes, I was just thinking that maybe by the time you reach ASTs you have lost something on the way
21:55:05gradhalooks like I'm not the only crazy person with crazy thoughts https://github.com/jacob-carlborg/dstep
21:56:31gourahh, D stuff :-)
21:56:34Araqhttps://github.com/jacob-carlborg/dstep/blob/master/features/array.feature
21:57:49gourwhat is ETA for 0.9.2?
21:58:01gradhathat subdir even has ruby
21:58:09Araqgour: christmas 2012
21:58:11*zahary quit (Ping timeout: 252 seconds)
21:58:22gourgood. that's not far away ;)
22:03:00gradhajust in time for the year of nimrod
22:05:12Araq*shrug* we can always skip 0.9.2 and release 0.9.4 instead
22:30:58*gradha is away: auto-away
22:41:03*gradha is back (gone 00:10:06)
22:46:28gradhaoh, auto-away spamming, I knew it wasn't that a good idea
22:47:04Araqwhy not? it's interesting you spend only 10 minutes on youtube ...
22:47:10gourlol
22:47:26gradhathis time it was a parent-control phone call
22:47:47gradhaAFAICS watching youtube doesn't make the laptop sleep, so it thinks it's active
22:53:43gradhaI think I've been hearing too much of death metal lately, I'm starting to understand the lyrics of the distorted voices, creepy
22:54:47*Zerathul_ joined #nimrod
22:55:56*Zerathul quit (Ping timeout: 256 seconds)
22:55:59*Zerathul_ is now known as Zerathul
23:08:15NimBotAraq/Nimrod 02a0d49 Araq [+0 ±7 -0]: code cleanup for mark&sweep GC
23:08:15NimBotAraq/Nimrod 3ad9b2e Araq [+0 ±3 -0]: made some tests green
23:08:25Araqgood night
23:08:27reactormonkgradha, done
23:08:32reactormonk@ gour
23:08:37gradhaAraq: bye
23:08:44reactormonkAraq, duh
23:09:16Araqreactormonk: what?
23:09:28reactormonkAraq, how can I tell it to convert strings to cstrings?
23:09:39gradhacast to cstring?
23:09:45gradhacstring(string_var)
23:10:07reactormonkand btw, is there a way to avoid toEcmaStr(cstrToNimstr( ... ?
23:10:19Araqtry varargs[expr, cstring]
23:10:20reactormonkehh, context: varargs[expr]
23:10:43Araqif that doesn't work, try varargs[expr, toCString] with a helper toCString that you need to provide
23:11:01Araqand the compiler should optimize away toEcmaStr(cstrToNimstr(...))
23:11:16Araqbug report if it doesn't
23:11:21reactormonkAraq, nope, got string, required varargs[cstring]
23:11:56Araqer
23:12:06Araqtry varargs[cstring, toCString] then
23:12:25reactormonkor varargs[expr] if I put varargs[expr, cstring]
23:12:46reactormonkor varargs[cstring, repr] and implement the fucking repr
23:13:56gourreactormonk: ?
23:14:08Araqyou're aware of ecmasys.nim:305, right?
23:15:10Araqthere is an echo implementation for nodejs and one for manipulating the DOM
23:15:18*gour --> sleep
23:15:23Araqcan't imagine what else you need
23:15:39*gour quit (Quit: WeeChat 0.4.0)
23:16:37reactormonkAraq, let me see
23:17:42*Zerathul quit (Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211])
23:18:38reactormonkAraq, ok. The one in kwin is 'print', so I go console.log = print basically?
23:19:03Araqyep
23:19:35reactormonkor could I overwrite rawEcho in my lib?
23:19:44Araqadd a define "qtjs" or something for your target
23:20:00reactormonkit's kwin.
23:20:05Araqok
23:20:13reactormonkno override proc rawEcho ?
23:20:25Araqthere may be a way to overwrite it but you don't want to go that way ;-)
23:21:16reactormonkwhy not?
23:21:29reactormonkso I wouldn't have to hack the compiler for a lib
23:22:39Araqyou could use a TR macro or overwrite it in JS land via 'emit'
23:22:55Araqbut the TR macro will only work by chance
23:23:12reactormonkyou need an overwrite keyword ;>
23:23:56Araqthe lack of it is what gives Nimrod its strategic advantage for concurrency :P
23:24:15reactormonkyeye
23:24:23Araqonce I implemented what I've in mind ...
23:25:01Araqyou can replace the stdlib including system.nim btw
23:25:15Araqvia some compiler switch that I don't remember
23:25:27Araqso that would be the 3rd possibility
23:25:54Araqbut for now, just touch ecmasys.nim and make a pull request
23:26:09gradhaman, you can't leave us with that "what I've in mind", is it in the todo?
23:27:06Araqgradha: kind of, "use the effect system for static deadlock prevention and race detection"
23:28:11Araqoh btw, try the stock GCC on macosx with the new --gc:markAndSweep please
23:28:21gradhawill do
23:28:23Araqit may be a work-around
23:28:45Araqand it's faster anyway than the default GC
23:28:56gradhait beats reading crap on the interent anyway
23:29:11gradhawhere do I add the switch, nimrod.cfg?
23:29:30Araq'koch boot -d:release --gc:markAndSweep'
23:29:35AraqI'd start with that
23:29:38gradhaok
23:30:39Araq(it's only faster because it uses more memory though)
23:30:56gradharunning
23:32:16gradhacommand line(1, 1) Error: 'none', 'boehm' or 'refc' expected, but 'markAndSweep' found
23:32:24gradhaI must have got a wrong git
23:32:56Araqwell you need to bootstrap once to get that option .... -.-
23:33:11AraqI didn't rebuild the C sources ... sorry
23:33:26gradhabut I do the unzip?
23:33:38Araqshouldn't be necessary
23:35:02gradhaso run build.sh twice?
23:35:33Araqnah
23:35:54Araqrun build.sh, bootstrap with llvm, bootstrap with gcc and --gc:markAndSweep
23:36:03Araqsimple, heh?
23:36:12gradhaerr... that's new
23:37:05Araqplease resist the temptation to document it ;-)
23:37:13Araqit's only for you
23:37:18gradhaso basically whatever I do always, then remove clang patches and run koch --gc:markAndSweep?
23:37:27Araqyes
23:37:29gradhaok
23:37:40gradhaI see you are starting to be afraid of my anal retentive capabilities
23:38:07Araq"afraid" is such a strong word
23:38:15Araqlet's say "respect"
23:38:35gradhathat's new, again
23:40:10AraqI'm tired :P
23:40:12Araqgood night
23:40:24gradhasleep well
23:41:59gradhahoho, doesn't crash
23:42:09gradhaah, crap, forgot to remove patches
23:44:37gradha./koch boot -d:release --gc:markAndSweep --> executables are equal: SUCCESS!
23:45:08gradhaduring the log I got gcc instead of clang, so it seems to be working
23:53:21gradhakoch web wasn't that lucky http://pastebin.com/5SVDiUPh
23:54:20gradhaneither koch tests http://pastebin.com/x8fxNpc5
23:55:25gradhaoh, I guess both invoke the nimrod compiler itself without the markAndSweep switch
23:59:09gradhainteresting, different crash for koch tests if I add --gc:markAndSweep to config/nimrod.cfg http://pastebin.com/9TVhDsNZ
23:59:33*gradha quit (Quit: bbl, have youtube videos to watch)