14:24:09  * piscisaureus_joined
16:59:49  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
19:18:52  * piscisaureus_joined
20:13:39  * piscisaureus_quit (Ping timeout: 255 seconds)
20:36:01  * brendaneichjoined
20:36:27  <brendaneich>creationix around much?
20:37:18  * matthewrobbjoined
20:37:30  <matthewrobb>Hello
20:49:08  <brendaneich>hey
20:50:59  <matthewrobb>Hey Brendan, do you know if this project is intending to provide an environment that could benefit from the existing module base such as those in npm?
20:51:32  <matthewrobb>It looked as though SpiderNode was striving for that but I cannot tell definitively in this case
20:54:41  <brendaneich>this is even more like node
20:54:50  <brendaneich>since node is really just libuv + lib-i-forget + v8
20:55:04  <brendaneich>and luvmonkey is lib{uv,i-forget} + spidermonkey
20:55:17  <matthewrobb>Right, okay
20:55:19  <brendaneich>should be js-compatible
20:55:35  <matthewrobb>What about the native node modules?
20:55:37  <brendaneich>also any js api q's are fair to ask at dev-tech-js-engine-internals@lists.mozilla.org
20:55:50  <brendaneich>mailman "subscribe" protocol to dev-tech-js-engine-internals-request@lists.mozilla.org, iirc
20:56:26  <matthewrobb>Okay great, thanks
21:00:11  * creationixjoined
21:00:14  <creationix>howdy
21:00:28  <matthewrobb>Hey
21:01:43  <creationix>so should we revive this project and get it going again?
21:03:37  <matthewrobb>I'd like to be using it right now. Unfortunately I have very basic and limited experience working in C/C++
21:04:16  <matthewrobb>I've come into the software development world from the web design/development world and am still playing catch up skill wise
21:05:11  <matthewrobb>But I'm happy to contribute what skills I do have :)
21:06:09  <matthewrobb>I do have a question, has anyone ever tried replacing V8 in webkit with spidermonkey?
21:07:33  <creationix>I've been way too busy since my third-child was born
21:07:58  <matthewrobb>Congratz! My second (a girl) was born Oct.2 2012
21:09:13  <matthewrobb>No one told me it get's EXPONENTIALLY harder with each... I think I was expecting more of a linear progression
21:09:23  <matthewrobb>I can't fathom 3
21:12:40  <creationix>while I simply don't have the time to do the builk of the work, I can certainly lend my experience with binding libuv to various scripting engines
21:12:41  <creationix>matthewrobb, so what interests you about node using spidermonkey?
21:13:54  <matthewrobb>I have been working on github.com/matthewrobb/six for a couple weeks (not much activity lately due to my daughters birth)
21:14:18  <matthewrobb>I was surprised to find just how much of ES6 was already in place there
21:14:26  <matthewrobb>For example, generator functions
21:15:02  <matthewrobb>Which I do not plan on trying to desugar but would LOVE the option of using in node-only code
21:15:39  <brendaneich>matthewrobb: 5 here :-P
21:15:47  <brendaneich>some things are incrementally harder
21:15:55  <matthewrobb>Do they start taking care of themselves at some point
21:16:09  <brendaneich>older they get, the more chores they do (but the three year old grumbles less and usually likes dishes)
21:16:14  <brendaneich>(drops some tho)
21:16:20  <brendaneich>creationix: congrats
21:16:22  <matthewrobb>lol
21:16:47  <brendaneich>matthewrobb: v8 as 2nd engine after jsc helped a bit but there are still bits specific to v8 in chromium.org
21:16:55  <brendaneich>spidermonkey would be even more work
21:17:04  <brendaneich>node is much easier
21:17:19  <brendaneich>creationix: what JS API probs were you stuck on?
21:17:33  <creationix>brendaneich, mainly the wiki always being out of date
21:17:47  <brendaneich>JS API hasn't changed much
21:17:47  <creationix>and I was trying to track the dev branch of sm
21:17:55  <brendaneich>#jsapi on irc.mozilla.org is good if it is out of date
21:18:12  <creationix>yeah, but I don't get much response in there unless I start pinging ops directly
21:18:23  <creationix>I guess I'm too polite to do that all the time
21:18:33  <brendaneich>you can drop my name
21:18:37  <brendaneich>jorendorff is good too
21:18:48  <creationix>yeah, I got the most response from jorendorff
21:18:59  <creationix>now my issue it mainly time
21:19:38  <creationix>honestly I don't see it being more than a weeks work to get bindings done
21:19:52  <matthewrobb>I think people in the node world could benefit from choice more than they might realize
21:19:53  <creationix>and if I clone the api exposed by the v8 bindings in node, the js in node can be reused as-is
21:20:09  <matthewrobb>Oh yeah thats true
21:20:15  <creationix>binary addons obviousy won't work, but that's ok
21:20:23  <creationix>(since they bind to node using V8 apis)
21:20:39  <matthewrobb>could a bridge for those API's be done at some point?
21:20:51  <creationix>the thing I learned when writing luvit is that node is a *lot* more than just libuv bindings to v8
21:21:02  <creationix>matthewrobb, that's what spidernode was
21:21:55  <matthewrobb>i see
21:22:29  <creationix>the main benefits I see to having sm powered node are:
21:22:49  <creationix>1 - faster access to newer JS language features (V8 is implementing them, but it's ness aggressive)
21:22:58  <matthewrobb>+1 that
21:23:09  <creationix>2 - lower memory overhead (from initial testing sm uses half the ram as v8, this really matters on mobile)
21:23:30  <creationix>3 - interpreter node for places like iOS where JIT can't be used (though I'm not sure iOS will allow sm)
21:23:50  <creationix>4 - competition between VMs for the benifit of node
21:23:54  <creationix>:)
21:24:54  <matthewrobb>Yes, I agree with all of those (minus 2 which I likely agree with but would need to verify )
21:25:27  <creationix>I do know that 2 and 3 are real for luvit (node in lua), but then it's not javascript anymore
21:25:34  <creationix>there is value is keeping the same language
21:26:06  <creationix>while sm isn't as small and portable as lua or luajit, it's a lot better than v8
21:26:35  <matthewrobb>Well for me to be able to practically consider using it at places like my job it would need to at the very least not be worse than node with v8
21:26:50  <creationix>yeah, it's probably good there
21:26:55  <matthewrobb>so, holding module support would be key
21:29:21  <matthewrobb>I think it's a lot easier to jump on new features in the "server" space. Whatever you want to call the space Node occupies. So providing competition here to me is the biggest advantage.
21:34:18  <creationix>yep
21:35:06  <creationix>so the question is who has time to work on this?
21:39:11  <matthewrobb>At the moment I do not, nor do I possess the expertise necessary. But it's something I will work towards assuming no one else can pick it up before that time.
21:44:41  * brendaneichquit (Quit: brendaneich)
22:05:18  * Benviejoined
22:05:48  <matthewrobb>Hey Benvie
22:05:54  <Benvie>hey hey
22:05:58  <matthewrobb>lol
22:07:01  <matthewrobb>creationix are you still around?
22:07:34  <creationix>I'm here
22:08:01  <Benvie>looking forward to the fruition of the unholy tryst between luv and monkey
22:08:48  <matthewrobb>Could you give us a Brief run-down of where you left off in with bindings, and what would be required to get it to the next stage?
22:09:18  <matthewrobb>Or not brief, it's your time
22:11:31  <creationix>hmm
22:12:08  <creationix>so a good first milestone would be libuv bindings enough to to setTimeout, setInterval and a tcp server
22:12:22  <creationix>I had that mostly working, but it would segfault pretty often
22:12:29  <creationix>and debugging was painfully slow for me
22:13:13  <creationix>The libuv "classes" involved are uv_handle_t, uv_stream_t, uv_tcp_t, and uv_timer_t
22:13:23  <creationix>libuv's API has changed a little since then, but for the better
22:13:28  <Benvie>yeah
22:13:41  <creationix>in particular the ref system is based on uv handles now and not a global counter
22:14:31  <Benvie>these issues manifested in node too no? just not as segfaults, but...interesting timer functionality
22:14:52  <creationix>so a concrete first task is to update the deps to latest sm and libuv and get the timer and tcp echo examples working flawlesly
22:15:02  <creationix>I wouldn't move past that before that's solid
22:15:09  <creationix>timers are a lot simpler since it's a shallower chain
22:15:10  * piscisaureus_joined
22:15:14  <creationix>timer inherits directly from handle
22:15:22  <creationix>but tcp inherits from stream which inherits from handle
22:15:33  <creationix>and a lot more methods are used to do a tcp server
22:15:37  <creationix>about 6 in stream alone
22:15:51  <creationix>we may need to test generators specially too
22:15:55  <creationix>in luvit, coroutines have bit me
22:16:07  <creationix>I need to manually ref the coroutine if a handle is created inside it
22:16:21  <creationix>also all callbacks need to be called in the context of the main "thread"
22:16:27  <creationix>generators may need the same treatment in sm
22:17:01  <creationix>but once this core is solid, the rest is a lot more boring
22:17:26  <creationix>proper memory management between the scripting engine and the C structs is tricky
22:17:29  <Benvie>yeah, after the core stuff it's mostly to js land
22:17:40  <creationix>especially because of the async callbacks and generator threads
22:17:58  <creationix>(I say thread in the non preemtive case)
22:17:58  <Benvie>generators complicate things significantly
22:18:28  <creationix>I mean, think about it. When you do "setTimeout(500, callback)" the timer object returned by this is often never references in JS
22:18:44  <creationix>but when the timer fires in libuv, the js reference needs to be still valid
22:18:54  <creationix>so there are a lot of implicit references that don't originate from js code
22:19:07  <creationix>and you have to handle those exactly right or you'll get either memory leaks and/or segfaults
22:19:11  <Benvie>node-ffi handles a lot of these by just attaching references in js manually
22:19:21  <Benvie>like to buffers that are pointers
22:19:29  <creationix>sure, if there is something to attach to that has the right lifetime semantics
22:19:59  * brendaneichjoined
22:20:44  * brendaneich_joined
22:20:44  * brendaneichquit (Read error: Connection reset by peer)
22:20:45  * brendaneich_changed nick to brendaneich
22:20:47  * brendaneichquit (Client Quit)
22:20:57  <Benvie>is there a parallel to Persistent<T>
22:21:06  <creationix>I don't remember
22:21:15  <creationix>I seem to remember the semantics are similar
22:21:35  <creationix>regardless of the actual API, you'll need to manually ref and unref stuff at the right times
22:21:42  <Benvie>yeah
22:22:24  <creationix>there is also the question of how to properly store js in C and C in js
22:22:32  <creationix>since a uv handle is a struct in C and an object in js
22:22:37  <creationix>I think I was using sm classes to do this
22:22:50  <creationix>and I know node uses V8 classes
22:23:11  <creationix>https://github.com/creationix/luvmonkey/blob/master/src/luv_timer.c
22:24:06  <creationix>we should probably also aim to clone the node v8 bindings exactly (as exposed to JS) to reuse as much js glue as possible
22:24:10  <creationix>unless they are just a terrible API
22:24:24  <Benvie>need an equivelent for object wrap basically
22:24:32  <creationix>right
22:24:40  <creationix>I actually don't know the node bindings that well
22:24:42  <creationix>I know luvit's best
22:24:47  <creationix>but lua C binding is quite different
22:24:50  <creationix>it's a lot simpler
22:25:22  <Benvie>most of the api's are not too bad, although vm is terrible
22:25:52  <Benvie>but that's implemented in sm at base level basically so
22:28:02  <creationix>anyway I need to run, it's after 5 here and Monday night is family night
22:28:03  <Benvie>in node all the handles follow the same pattern with various twists, and all hinges on persistent<t> and object wrap along with (mostly) manual ref management
22:28:12  <Benvie>adios, have a good night
22:28:14  <creationix>Benvie, do you have time to help implement luvmonkey?
22:28:24  <Benvie>yeah I can definitely put some time into it
22:28:33  <creationix>sweetness!, let me know where I can help
22:28:38  <Benvie>I'd like to see this come to fruition!
22:28:41  <creationix>me too
22:28:48  <matthewrobb>Same here, I'm open to do any leg work or whatever
22:28:48  <Benvie>I'll get into it tonight and get my bearings
22:29:02  <creationix>so if you want, focus on just timer first
22:29:04  <creationix>it's the simplest
22:29:17  <Benvie>yeah, and also fundamental building block
22:29:20  <creationix>I imagine node's setTimeout js sugar is pretty tiny
22:29:26  <Benvie>yeah
22:30:00  <Benvie>freelist is what it uses to manage them
22:30:14  <creationix>should we have freelist too
22:30:23  <creationix>I always thought it was premature optimization
22:30:30  <creationix>luvit is faster than node without it
22:30:32  <Benvie>I had the same impression
22:30:35  <creationix>but then again, it's lua
22:31:12  <creationix>also I want things like node's http module to be userspace
22:31:20  <creationix>keep core lean
22:31:22  <Benvie>beyond that it's just the basic functions that attach the handle objrcts to the target function
22:32:00  <Benvie>agree, that can also help put the burden of keeping matched with any node changes in userland
22:32:28  <Benvie>http is kind of a beast
22:32:35  <matthewrobb>is there any reason this shouldnt work in windows atm
22:33:01  <Benvie>doubt it
22:33:07  <creationix>just that building for windows is hard
22:33:08  <Benvie>make sure you have mozilla build
22:33:13  <creationix>all the libraries are cross-platform
22:33:17  <matthewrobb>right
22:33:18  <Benvie>mozilla build makes all of the pain go away
22:33:32  * brendaneichjoined
22:33:37  <matthewrobb>https://wiki.mozilla.org/MozillaBuild?
22:33:40  <Benvie>I use it to build everything on windows, mozilla related or not
22:33:41  <Benvie>yeah
22:33:45  <matthewrobb>nice
22:33:56  <creationix>cool
22:34:13  <Benvie>self-contained environment with all the dependencies included that would normally require 3 hours of hunting down error messages
22:34:44  <matthewrobb>wb brendan
22:35:04  <Benvie>I originally got it for building ffi but found out it's good for building *anything* on windows. Works great with gyp/node-gyp too
22:35:14  <matthewrobb>sweet
22:35:22  <Benvie>vc++ + mozillabuild = build anything
22:35:33  <matthewrobb>yeah i have vc++ already
22:35:40  * brendaneichquit (Read error: Connection reset by peer)
22:35:46  * brendaneich_joined
22:35:49  <creationix>cool guys, I'm really gone now
22:35:50  <creationix>ttyl
22:35:55  <matthewrobb>see you
22:39:14  <Benvie>what you want to do is
22:39:50  * piscisaureus__joined
22:40:07  * piscisaureus_quit (Read error: Connection reset by peer)
22:41:03  <Benvie>once you get mozillabuild set up, put node in mozilla-build/msys/local/bin
22:41:39  <Benvie>and put node_modules under there too
22:42:08  <Benvie>then add the npm shell file to the directory too
22:42:19  <Benvie>then you get node up in your mozilla build like woah
22:42:35  <Benvie>unless you can use luvmonkey =D
22:42:47  <Benvie>then you just use that
22:43:04  <matthewrobb>im listening to this deubunking dart myths thing from today... ugh, shutting it off
22:43:25  <Benvie>what myths did you have debunked
22:43:33  <matthewrobb>none
22:43:38  <matthewrobb>thats why i shut it off
22:43:51  <Benvie>I was unaware there was a mythology
22:44:00  <matthewrobb>SantaScript
22:44:06  <matthewrobb>EasterBug
22:44:33  <Benvie>tell me more, these things sound good
22:44:43  <matthewrobb>chupacabra
22:44:50  <matthewrobb>that ones the same everywhere tho
22:46:32  <Benvie>have you ever used rhino?
22:46:39  <matthewrobb>yes
22:46:46  <matthewrobb>Not a fan
22:46:56  <matthewrobb>I don't like JVM
22:47:21  <matthewrobb>At work ALLLL our backend stuff is Scala
22:47:42  <Benvie>me either but I heard tell mention about it being one of the few or only examples of being able to serialize execution state?
22:47:52  <matthewrobb>The workflows required to get anything done there are just awful
22:47:58  <matthewrobb>Hmm, perhaps
22:48:33  <Benvie>this is a target goal for me
22:48:37  <matthewrobb>MozBuild 1.6.1?
22:48:44  <Benvie>yeah
22:48:47  <matthewrobb>k cool
22:48:50  <Benvie>that one works with vs2012
22:48:56  <matthewrobb>good
22:49:25  <matthewrobb>hmm
22:49:32  <matthewrobb>windows thinks it didnt install correctly
22:49:37  <Benvie>it did
22:49:45  <matthewrobb>i figured
22:51:37  <matthewrobb>okay so now that nodes in there as you directed
22:51:50  <Benvie>mingw is very similar to cygwin except built on windows apis, but it's still low level
22:51:56  <Benvie>ok go to the base
22:51:59  <Benvie>there's a bunch of bat files
22:52:08  <matthewrobb>yeah
22:52:08  <Benvie>run the one for your visual studio version
22:52:20  <Benvie>node should work out of the box
22:52:42  <matthewrobb>yep
22:52:44  <matthewrobb>nice
22:53:00  <matthewrobb>this is pretty slick
22:53:18  <Benvie>if you do any v8 compiling or node module compiling you'll want to install node-gyp explicitly probably
22:53:25  <Benvie>maybe not, maybe npm does it all now
22:53:32  <Benvie>but this is how I build appjs
22:53:33  <matthewrobb>explicitly as in -g?
22:53:36  <Benvie>node-gyp rebuild
22:53:41  <Benvie>yeah
22:54:13  <matthewrobb>so i have the node binary in that folder, for npm i need to ?
22:54:23  <Benvie>node-gyp handles providing gyp (python), also gets all the correct node header files and crap
22:54:32  <Benvie>for npm you do this
22:54:35  <matthewrobb>o right the shell file
22:54:39  <Benvie>in that bin folder, create a node_modules folder
22:54:42  <Benvie>put npm in there
22:54:44  <matthewrobb>done
22:54:47  <matthewrobb>k
22:54:53  <Benvie>then add the npm (no extension) into bin
22:54:58  <Benvie>should be good to go
22:55:49  <matthewrobb>got it
22:55:51  <matthewrobb>cool
22:56:05  <Benvie>so hopefully this results in a kind of sandbox for this node
22:56:12  <matthewrobb>yeah
22:56:18  <Benvie>that doesn't effect any system stuff you may have
22:56:49  <Benvie>mingw is interesting in that it provides everything from the normal windows environment, and then layers a posix-like collection of stuff on top
22:56:58  <matthewrobb>hmmmm
22:57:03  <Benvie>so in node for example you'll find a massive amount of crap in process.env
22:57:04  <matthewrobb>npm install node-gyp -g
22:57:11  <matthewrobb>installed it in my normal node path
22:57:17  <matthewrobb>OH wait
22:57:25  <matthewrobb>do i need to edit the path in the shell script
22:57:28  <Benvie>ah yes it's using your user thing
22:57:36  <Benvie>you can control it by adding um
22:57:44  <Benvie>something to I think the npm folder
22:58:04  <Benvie>.npmrc
22:58:50  <Benvie>yeah
22:58:51  <matthewrobb>ahh there we go
22:58:53  <Benvie>prefix=${APPDATA}\npm
22:58:55  <matthewrobb>i just had to remove that file
22:59:03  <matthewrobb>i copied my local npm module over
22:59:11  <Benvie>oh yeah
22:59:26  <matthewrobb>cool, this is pretty nice
22:59:38  <Benvie>by defualt it wants to put the cache in /Users/{Users}/AppData/Roaming/npm-cache
23:01:02  <Benvie>I think it may be possible to now to have something like mintty work by default with node
23:02:10  <Benvie>you can configure mingw to automatically use it instead of cmd by dropping it in the mozilla-build/msys/bin folder and I think it automatically uses it
23:02:28  <Benvie>cmd is microsoft's most terrible sin
23:02:39  <matthewrobb>drop what now?
23:02:41  <matthewrobb>MinTTY?
23:02:46  <Benvie>yeah
23:02:51  <Benvie>just an .exe
23:03:27  <Benvie>xterm-256 and fonts and all that stuff, much nicer if you plan to spend much time in console land
23:03:49  <matthewrobb>not sure if it worked
23:03:52  <matthewrobb>still seems like cmd
23:03:53  <matthewrobb>lol
23:04:18  <Benvie>might need to change a thing due to mozilla's custom loader bat files, one sec lemme look
23:05:22  <Benvie>in msys folder there's msys.bat
23:05:36  <Benvie>which I think would work
23:05:40  * brendaneich_quit (Quit: brendaneich_)
23:05:57  <Benvie>need to somehow meld that with the mozilla bat
23:06:29  <Benvie>batch file language is so terrible
23:07:11  <Benvie>anyway that's just a niceity
23:07:13  <Benvie>not required
23:07:54  <matthewrobb>https://bugzilla.mozilla.org/attachment.cgi?id=635847&action=edit
23:08:09  <Benvie>oh hey there it is
23:08:32  <Benvie>ah yeah
23:08:38  <Benvie>it just changes the last line of the bat files
23:08:41  <Benvie>START "mozilla-build" "%MOZILLABUILD%\msys\bin\mintty.exe" /bin/bash --login -i
23:08:48  <Benvie>easy enough
23:09:14  * brendaneichjoined
23:09:28  <matthewrobb>works
23:09:39  <Benvie>nice, going to change mine to use that =D
23:09:49  <Benvie>oh I would test node first
23:09:51  <Benvie>it may not
23:09:57  <Benvie>think they fixed it though
23:10:43  <matthewrobb>didnt seem to work
23:10:45  <matthewrobb>with node
23:11:22  <Benvie>I know it can be fixed, I'll see if I can port some code I have for the task
23:14:20  <matthewrobb>no git in MozillaBuild?
23:14:46  <Benvie>yeah
23:15:07  <Benvie>kind of annoying, gotta manually add it
23:15:29  <Benvie>there's a package manage for mingw
23:15:36  <Benvie>mingw-get, kind of like apt-get
23:15:58  <Benvie>not sure if this environment has enough for that though
23:16:42  <Benvie>oh you know
23:16:50  <Benvie>it does have hg which can handle git stuff
23:17:15  <matthewrobb>http://jbuckley.ca/2011/10/getting-git-working-in-mozilla-build/
23:21:09  <Benvie>http://sourceforge.net/projects/mingw/files/Installer/mingw-get/
23:21:17  <Benvie>that is desirable
23:21:28  <matthewrobb>which one should i get
23:21:36  <Benvie>not the installer
23:21:44  <Benvie>just looking for mingw-get
23:22:16  <Benvie>http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.5-beta-20120426-1/mingw-get-0.5-mingw32-beta-20120426-1-bin.zip/download
23:23:01  <Benvie>should be able to extract to msys
23:23:05  <Benvie>and have it work
23:23:16  <matthewrobb>msys/bin?
23:23:55  <Benvie>nope msys, in the zip file it has
23:24:06  <matthewrobb>i got it
23:24:06  <Benvie>three folders
23:24:36  <Benvie>mingw-get list
23:24:48  <Benvie>probably need to do a mingw-get update
23:25:40  <Benvie>I believe you can get git using this if you're lazy and didn't already get it manually like me
23:25:53  <Benvie>(I mean I'm lazy and didn't manually get it)
23:25:59  <matthewrobb>yes
23:26:06  <matthewrobb>what should i install just 'git'
23:26:33  <Benvie>msys-git maybe
23:26:42  <Benvie>if not just git
23:28:04  <Benvie>hmm
23:28:17  <matthewrobb>doooesnt seem like this is going to work lol
23:31:23  <matthewrobb>m not getting anywhere, im going to go for now, family duties
23:31:28  <matthewrobb>ill be around later/tomorrow
23:31:33  <Benvie>adios
23:31:36  <matthewrobb>cya
23:43:29  * piscisaureus__quit (Quit: ~ Trillian Astra - www.trillian.im ~)