<<10-01-2013>>

00:19:00*q66 quit (Quit: Quit)
06:14:06*silven_ joined #nimrod
06:14:59*silven quit (Ping timeout: 260 seconds)
06:37:34reactormonkany way to use xpath with nimrod? Or just tarzan through the xml with code.
06:42:12reactormonk http://sprunge.us/ZVaG :-/
07:26:49*reactormonk quit (Changing host)
07:26:49*reactormonk joined #nimrod
07:51:56reactormonkhow do I pass around a longlong?
07:52:28fowlreactormonk: i think the type is clonglong but check the docs for system.nim
07:52:43reactormonkwell, target is JS
07:52:53reactormonkso an int should do fine :-/
09:10:42*Trix[a]r_za is now known as Trixar_za
11:02:56*Trixar_za is now known as Trix[a]r_za
11:41:15*Araq is now known as Araq_win
11:44:59*Araq_win is now known as Araq
14:17:36*q66 joined #nimrod
16:25:55dom96Yay. They might finally merge the linguist pull request.
17:38:19Araqdom96: was about time ;-)
17:38:27dom96indeed
17:38:50dom96See? They still care :)
17:39:07Araqwe'll see
18:01:59*Amrykid quit (*.net *.split)
18:02:27*Amrykid joined #nimrod
18:30:54Araqping zahary
18:45:43Araqso ... now that nimbuild supports branches, we maybe should change our workflow
18:46:05Araqmy idea is to use a 'devel' branch and apply every change there first
18:46:27Araqand when the test results didn't change, I merge the changes into master
18:46:54Araqeffectively this means 'master' will be the latest stable version
18:47:14Araqpeople treat it as such already anyway
18:47:30dom96Sounds good. But which branch should contributions go to then?
18:48:25dom96Even if we tell people to create pull requests to the devel branch they will most likely ignore that anyway :P
18:48:53dom96I was planning on making nimbuild test the pull requests
18:49:32dom96That's a fair bit of work though. I would also like to migrate to mongodb before doing that.
18:50:38Araqtesting pull requests seems like a bad idea
18:51:02Araqpeople can than OoS our builders ;-)
18:51:13Araq*then DoS attach
18:51:17Araq*attack
18:51:19Araqarg
18:51:34Araqand it wastes resources
18:51:56dom96True. But travis-ci manages it.
18:52:05dom96And rate limiting isn't that hard to implement.
18:52:16Araqhrm true
18:52:22dom96Also i'm planning to do some fancy checking of what files were changed
18:52:44dom96The compiler sources will rarely be changed, so there is no need to bootstrap every time.
18:52:47Araqwhat's wrong with redis? how's mongo better for nimbuild?
18:53:04Araqbut the compiler uses the stdlib
18:53:18Araqso you can rarely avoid bootstrapping
18:53:44dom96well that sucks a bit then :\
18:54:04dom96it's hard to query for the data in redis
18:55:22Araqit's hard to query for the data in mongo too
18:55:46Araqthese nosql databases don't get the "query language" part
18:56:14dom96well I will play around with mongodb first
18:56:21Araqmongo uses javascript as a query language
18:56:56dom96That doesn't seem too bad.
18:57:34Araqit only works for trivial queries
18:58:27dom96perhaps I will continue to use redis and simply redesign the data layout a bit.
18:58:52dom96When I first designed it, I didn't not think about future branch support.
18:59:05dom96s/didn't/did/
18:59:17Araqhe he
18:59:29*dom96 punches brain
18:59:55dom96But anyway, back to the original topic.
19:00:10dom96How do other projects do it?
19:01:16Araqdunno
19:01:45dom96http://nvie.com/posts/a-successful-git-branching-model/
19:02:01dom96I think that model is quite popular.
19:04:35Araqso master only contains release versions?
19:04:51dom96yeah, I guess that's a bit meh.
19:06:48dom96hrm. I guess even if we decide that whatever we use for now is bad we can always easily change the model.
19:08:31dom96Can't we?
19:08:53Araqyes but I think we should do it this way:
19:09:14Araqeasy bugfixes with a slim chance to break anything -- directly in master
19:09:28Araqother bugfixes -- in a devel branch
19:09:51Araqnew features -- in a per feature branch
19:10:50Araqbreaking the language -- in a v0.9.x branch
19:11:38dom96I don't like the last one
19:12:55dom96vX.X.X should only be for tags
19:13:09dom96You can't have a branch and a tag with the same name.
19:13:21Araqoh yeah
19:13:35Araqwell it's version0.9.x then or something
19:13:51dom96hrm, but why?
19:13:53dom96I don't get it.
19:14:30Araqwell my idea is that 0.9.0 is released, so master should be as compatible with 0.9.0 as possible
19:14:43Araquntil 0.9.2 is out
19:16:07dom96hrm. So then will you merge stuff from devel into your "broken language" branch and the master branch?
19:16:49Araqhrm devel is not the right name
19:17:04Araqdevel is only temporary to push the changes to nimbuild
19:17:19Araqand then after the tests are green it'll go into master
19:17:35dom96I think it should simply be a feature branch then
19:17:50dom96the name doesn't really matter.
19:18:09dom96You have worked on a feature, or a fix, and you want to see if it breaks something.
19:18:22dom96If it does, you fix the breakage
19:18:24dom96retest
19:18:32dom96once it doesn't you merge to master
19:18:34dom96and delete the branch
19:20:40dom96Once we decide on a branching model please document it in the readme btw :P
19:20:55dom96or I can do it if you don't feel like it.
19:21:08Araqwhy does that belong into the readme?
19:21:24dom96So that potential contributors don't get confused
19:21:47Araq*shrug* alright
19:22:10Araqbbl
19:22:45Araqyour idea of simply using a feature branch sounds good
19:22:51Araqkeeps it simple
20:16:09reactormonkany way to use xpath with nimrod? Or just tarzan through the xml with code.
20:16:54dom96reactormonk: Currently no, sorry.
20:20:51*AlexLibman likes extensive use of man pages: `man nimrod`, `man nimrod-generics`, man nimrod-xmltree`, etc.
20:21:12AlexLibmans/ man/ \`man/
20:21:17Araqwake up, it's 2013 :P
20:21:30Araqnobody cares about man pages :P
20:21:30AlexLibmanErr, s/, man/, \`man/
20:21:38reactormonkAlexLibman, well, you can teach the docgen to generate manpages
20:21:41reactormonkwould help debian, too.
20:21:55AlexLibmanOK, maybe you're right.
20:24:03dom96Someone should write a "Nimrod for Rubyists" in the style of http://www.rustforrubyists.com
20:24:13dom96or even better "Nimrod for Pythonners(?)"
20:24:34reactormonkdom96, let's see. I'm writing above code generator in ruby ;>
20:24:40AlexLibmanLots more pythoneers that rubyrats out there...
20:25:02reactormonkI can only speak about ruby.
20:25:08AlexLibmans/that/than/
20:25:43dom96Araq: So, are you going to push a new branch? I'm curious if nimbuild works :P
20:27:25Araqdom96: have no branch to create for now ...
20:27:48dom96ok, np.
20:58:49reactormonkthere's only one numeric type in JS, right?
21:00:04Araqreactormonk: yeah but most implementations keep an integer-like number in an integer
21:00:16Araqit's totally transparent though
21:00:40reactormonkgot a qulonglong here
21:01:25Araqwhat are you doing?
21:01:59reactormonkAraq, http://techbase.kde.org/Development/Tutorials/KWin/Scripting/API_4.9 via JS... ;>
21:02:33reactormonkIt's madness
21:03:07Araqso your scripting a KDE app with JS compiled by Nimrod?
21:03:13Araq*you're
21:03:14reactormonkyes.
21:03:19reactormonkmuahaha
21:03:25Araqwrite a blog post about it
21:03:55reactormonkAye sir. But first I have to finish this ruby script which converts the doxygen XML to nimrod code.
21:04:20Araqwhat?
21:05:18reactormonkwell, that webpage above is generated with some xslt. So I take the source XML generated by doxygen (API description) and got a ruby script to generate the bindings for nimrod (with a lot of importc)
21:06:04reactormonkKnow a good blog host? Tumbl?
21:06:36*Araq is working on his own blog software ...
21:07:19dom96reactormonk: You could use jekyll + github pages
21:07:55apotheonreactormonk: Actually, there's one programmer-facing numeric type in JavaScript, but behind the scenes there are distinct types, and not knowing about how these things interact can cause problems. Yes, really.
21:08:33Araqlike what?
21:10:18apotheonlike IEEE rounding errors
21:10:34apotheon. . . on what you thought was integer math
21:10:53reactormonkapotheon, it's an id, so I could treat is as a sting as well
21:11:52Araqthere are no IEEE rounding errors for floating point numbers that represent integers
21:12:05Araqok, for integers in the 32 bit range at least
21:12:09reactormonkAraq, any idea how to implement getters/setters in nimrod for JS objects? The global object is a bit hairy there :-/
21:12:45Araqwhat's the global object? the one generated by the compiler?
21:12:53reactormonknope, provided by the runtime
21:12:58reactormonkiirc it's 'workspace'
21:13:49Araqvar workspace {.importc.}: X ?
21:14:07reactormonkand X is the type?
21:14:14Araqsure
21:14:33reactormonkGood.
21:16:36reactormonkNope, workspace isn't the global object.
21:16:45reactormonkBut that shouldn't matter much.
21:17:40apotheonAraq: Try floating point math that yields a fractional result with a rounding error that changes the result of integer truncation by one.
21:18:15apotheonAraq: . . . but you can't see what's happening because you're using the JavaScript Number "type".
21:18:48reactormonkAraq, can I define properties as read-only? Aka fields as read-only?
21:19:17Araqreactormonk: no
21:20:18reactormonkAraq, hm. Fuck it then.
21:23:31Araqprovide an accessor proc instead for readonly access
21:23:49Araqapotheon: good point about the div operation
21:23:54reactormonkAraq, good idea.
21:24:14apotheonAraq: JavaScript's type system isn't just inconvenient. It's an abomination.
21:24:34Araqso Math.floor(x / y) is not good enough for 'div'?
21:25:53apotheonnot in rare cases
21:26:11apotheon(where "rare" ends up meaning "especially surprising" sometimes)
21:27:21Araqwell that's a bug in the JS codegen then :-)
21:27:31Araqsounds impossible to fix though
21:29:46reactormonkAraq, argh, it will be a fucking PITA to implement signals and slots
21:30:15Araqwhy?
21:31:19reactormonkoh, wait, the argstring is there \o/
21:31:54reactormonk http://sprunge.us/JEOO current generation.
21:32:31reactormonkI have no idea though how to attach the enums to e.g. workspace
21:32:36Araqbtw how's the doc comment working?
21:32:55Araqthat idetools provide?
21:35:21Araqreactormonk: I think you should use 'ref object' instead of 'object' here
21:35:35reactormonkwhy?
21:35:43reactormonkdefskVarcreateTabLabel.boxPHBox/home/tass/dev/nimrod/Aporia/aporia.nim2949""
21:35:50reactormonkfucking IRC and tabs.
21:36:12reactormonkAraq, seems to work so far. except not much is documented here ;-)
21:36:28Araqbecause that's what JS's semantics are: it uses reference semantics for objects
21:41:29*Amrykid quit (Changing host)
21:41:29*Amrykid joined #nimrod
21:53:06reactormonkcan I just write 'ref object'? Or do I have to jump through the Tfoo = object Pfoo = ref Tfoo hoop?
21:53:35Araqnowadays you can just write 'ref object'
21:53:43reactormonk\o/
22:10:50reactormonkAlexLibman, what about adding a clause that military usage is forbidden to BSD/GPL?
22:32:15reactormonkEhm, what's the syntax for a proc that takes a proc?
22:32:35Araqproc p(q: proc (x: int): int)
22:35:31reactormonkCan I somehow hack this? API says: clientMaximizeSet(KWin::Client *client, bool h, bool v) code should look like: workspace.clientMaximizeSet.connect(function(client, h, v) {
22:35:41reactormonkobserve the 'connect' part
22:36:32reactormonktemplate somehow?
22:37:18Araqhm
22:38:09reactormonkAlso note that it gets ugly with typecheck if I have to add a fucking type for each :-/
22:38:37Araqwhat do you mean by that?
22:39:00reactormonkwell, I have to provide connect to the name of the signal - and the signal has a type. So I have to create a type per signal
22:39:14Araquse a generic instead
22:39:48reactormonkCan a generic hold *args ?
22:39:52reactormonkor ... as you call it
22:40:25AraqI call it '...'?
22:40:35reactormonkvarargs
22:41:15Araqproc p[T](y: varargs[T]) works but then they all need to be of the same type
22:41:33Araqhowever, p(y: varargs[expr]) should do what you want
22:41:54Araqthat's a varargs of arbitrary types
22:43:08reactormonkCan't I directly emit code from the signal?
22:43:39AraqI can't follow
22:44:35reactormonkWell, the above generic basically dumps typecheck, right?
22:44:53Araqright
22:46:20AraqI'm implementing that 'importcpp' will be mapped to JS's a.f(x) syntax
22:46:55Araq'importcpp' may later be renamed to 'importInfix' or something
22:47:23reactormonkI'll go with signal %s*(callback: proc(%s)) for now and think on it later.
22:47:36reactormonkMaybe a template.
22:55:31reactormonkAraq, QVariant as union type - how do I deal with that in nimrod?
22:56:26Araqthere is no such thing as a union in JS :P
22:56:49*Araq doesn't really get Qt's docs
22:57:12Araqpretend that the 'union' is an 'object' instead could work for your case
22:57:29reactormonkAraq, I _suppose_ you get either a string or an int or whatever back
22:58:12Araqpretend that the 'union' is an 'object' so that you can access all the fields in Nimrod
22:58:31reactormonkHmm
23:01:02reactormonkbool registerShortcut(QString title, QString text, QString keySequence, QScriptValue callback)
23:01:05reactormonkfuck it.
23:01:43Araqwriting a proper Qt wrapper may be the better option
23:01:51Araqdepending on what you want to do
23:02:08reactormonkWell, I'd like to run it as JS so I can fuck with it on runtime
23:02:19Araqok
23:02:38reactormonkI just take it that the callback doesn't get any arguments
23:02:44reactormonkJS is kinda forgiving there
23:03:46reactormonkcallDBus(QString service, QString path, QString interface, QString method, QVariant arg..., QScriptValue callback = QScriptValue()): Call a D-Bus method at (service, path, interface and method). A variable number of arguments can be added to the method call. The D-Bus call is always performed in an async way invoking the callback provided as the last (optional) argument. The reply values of the D-Bus method
23:03:48reactormonkcall are passed to the callback.
23:03:51reactormonkthat's gonna be fun.
23:04:22reactormonkHow are the nimrod semantics on varargs in the middle of a function argument?=
23:06:15Araqer ... ugh, use openArray[expr] and pass them in [] and except compiler bugs
23:06:24Araq*expect
23:06:55Araqthese features have never been designed for misusing them in the JS target ...
23:07:12reactormonkHow do I tell nimrod to expect compiler bugs?
23:09:45reactormonkAraq, oh, and importcpp should work in the future for infix syntax?
23:10:17Araqyeah, should help, right?
23:10:29reactormonkYes, it does.
23:10:41reactormonkAnd importc attaches to the global object? (via this or similar)?
23:13:23Araqer ... no?
23:13:35Araqit produces foo(a, b, c) iirc
23:32:09reactormonkoke