00:43:46  <jpleau>luv got an update today to -4
00:44:01  <jpleau>cat5e: ^
00:44:33  <cat5e>I wish luv didn't use stupid versioning
00:44:40  <cat5e>that'd be .4 in the AUR package
00:44:57  <jpleau>cat5e: most lua libraries have that scheme because they upload to luarocks, it's not stupid
00:45:22  <jpleau>I just use 1.9.0-4-1 in debian, works fine
00:45:23  <daurnimator>huh?
00:45:28  <cat5e>it is stupid
00:45:35  <cat5e>I can't use - in arch versions
00:45:38  <cat5e>because arch
00:46:05  <daurnimator>why is luv using -d?
00:46:14  <daurnimator>that's meant to be the rockspec version
00:46:21  <daurnimator>infact it's assumed to be the rockspec version
00:46:28  <cat5e>lol
00:46:34  <cat5e>well someone's stupid apparently
00:46:37  <daurnimator>the code for x.y.z-1 to x.y.z-5 **MUST** be the same. only the rockspec may change.
00:46:59  <daurnimator>creationix: ^^
00:47:01  <cat5e>(sorry tim)
00:48:53  <daurnimator>the last -3/-4 is for if e.g. your filehost goes down or the repository is moved => you update the rockspec to point at the new code location.
00:49:47  <daurnimator>cat5e: ^^ with that followed, you *shouldn't* have the -3/-4 in the AUR package name. usually you'll be updating the AUR to point at the new file location at similar times though
00:50:51  <cat5e>daurnimator, got it, but yeah stupid versioning
00:51:02  <cat5e>I need to handle it somehow :/
00:51:31  <cat5e>and the -x is because I fucked up the PKGBUILD a bunch of times while making it :P
02:41:39  * DarkGodquit (Quit: Leaving)
02:49:18  <creationix>daurnimator: it's because it matches the libuv version
02:49:31  <creationix>any ideas? upstream libuv is 1.9.0
02:50:15  <creationix> perhaps?
02:56:14  <jpleau>One way I saw it recently, the author has version 1.0.2, he tags it as 1.0.2, but pushed it as 1.0.2-1 to luarocks. He then pushed 1.0.2-2 to luarocks, without tagging it. Then 1.0.3 happened, he tagged it on github, and pushed 1.0.3-1 to luarocks. This is like distributions do it, but I'm not sure how its widespread in the lua/rocks world
03:00:16  <jpleau>That's what happens when there's a package manager for each language ;)
04:52:47  <creationix>yep, that's basically what I was doing. I was not aware that luarocks had different conventions from most linux package managers
05:44:47  * SkyRocknRolljoined
06:15:14  * rgrinbergquit (Ping timeout: 260 seconds)
06:40:35  * rendarjoined
07:31:13  * DarkGodjoined
11:16:36  * SkyRocknRollquit (Ping timeout: 276 seconds)
12:22:30  * rgrinbergjoined
13:20:24  * ^vquit (Ping timeout: 250 seconds)
13:25:19  * ^vjoined
16:01:37  <creationix>rphillips, we still need to help Adam to an agent release on his own right?
16:03:08  <creationix>I'm working in updating lit and luvit right now
16:09:30  <rphillips>correct
16:20:44  * rgrinbergquit (Ping timeout: 260 seconds)
16:45:13  * rgrinbergjoined
18:19:48  * travis-cijoined
18:19:49  <travis-ci>luvit/luvit#2859 (master - 149f01a : Tim Caswell): The build passed.
18:19:49  <travis-ci>Change view : https://github.com/luvit/luvit/compare/9c01fbeb201d...149f01ae8a33
18:19:49  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/147547025
18:19:49  * travis-cipart
18:41:39  * rgrinbergquit (Ping timeout: 244 seconds)
18:43:09  * rendarquit (Ping timeout: 276 seconds)
18:55:02  <jpleau>creationix: https://github.com/luvit/luv/commit/b9012465944178a58fd32d8a90630c0fa97ca54e#commitcomment-18387068 :) You want me to send a PR to add the copyright at the top or you want to do it directly?
18:55:27  <creationix>whichever you prefer
18:55:36  <creationix>I can add it now if you like
18:56:09  <jpleau>sure, thanks
18:58:37  <creationix>jpleau https://github.com/luvit/luv/commit/30010c081930f05c8ad5d9f075e52be413ec1489
18:58:57  <jpleau>:) thanks creationix
18:59:29  <creationix>Thank you for helping with the license stuff.
19:01:19  <jpleau>I think that was the last one too: http://anonscm.debian.org/cgit/pkg-lua/lua-luv.git/tree/debian/copyright the end result
19:06:14  * rgrinbergjoined
19:10:13  * travis-cijoined
19:10:13  <travis-ci>luvit/luv#280 (master - 30010c0 : Tim Caswell): The build has errored.
19:10:14  <travis-ci>Change view : https://github.com/luvit/luv/compare/66906947cf87...30010c081930
19:10:14  <travis-ci>Build details : https://travis-ci.org/luvit/luv/builds/147560157
19:10:14  * travis-cipart
19:10:38  <creationix>nice
19:11:59  <creationix>oh interesting, one file is dual licensed "The Luvit Authors" and David Capello
19:12:51  * rendarjoined
19:13:39  <jpleau>Yeah, I try to include everything I can if possible
19:19:45  * travis-cijoined
19:19:46  <travis-ci>luvit/luvit#2860 (2.11.5 - 149f01a : Tim Caswell): The build passed.
19:19:46  <travis-ci>Change view : https://github.com/luvit/luvit/compare/2.11.5
19:19:46  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/147562883
19:19:46  * travis-cipart
19:43:50  <daurnimator>creationix: OT: is 'require' special in node.js?
19:44:49  <daurnimator>https://nodejs.org/api/all.html#globals_require > require isn't actually a global but rather local to each module.
19:44:54  * rendarquit (Ping timeout: 276 seconds)
19:46:51  <creationix>right, it's injected into the scope, similar to how luvit's require works
19:47:00  <creationix>though I'm trying to migrate to using lua's global require
19:48:02  <creationix>daurnimator ^
19:48:22  <daurnimator>creationix: https://stackoverflow.com/questions/38598694/how-are-local-to-module-objects-implemented-in-node-js
20:15:05  * rendarjoined
20:17:05  <daurnimator>creationix: the underlying question being: with only access to `global`, how can I get a reference to `require` (or infact, I just want to get the `fs` module)
20:17:32  <creationix>the local require instance is probably not accessible
20:17:37  <creationix>but I think you could get to the fs module
20:18:45  <creationix>daurnimator this looks accurate from what I remember http://eli.thegreenplace.net/2013/05/27/how-require-loads-modules-in-node-js
20:19:12  <daurnimator>creationix: then how does this work? http://sprunge.us/LVTM
20:20:44  <creationix>the repl is weird, but that's interesting
20:21:41  <creationix>yeah, looks like global.require only exists in the repl context
20:24:27  <daurnimator>>.<
20:28:40  <daurnimator>creationix: so; my code *may* be in repl; may in in a js module. but it only has access to `global`...... how should I get the `fs` module?
20:30:18  <creationix>looking...
20:31:16  <creationix>probably via process.binding (as long as you only need builtins)
20:35:03  <creationix>daurnimator: global.fs is a hidden magic getter that loads the fs builtin
20:35:14  <creationix>https://github.com/nodejs/node/blob/master/lib/internal/module.js#L59-L96
20:41:35  <creationix>daurnimator, I can't answer your question because. Is it because someone marked it as duplicate?
20:43:25  <daurnimator>creationix: can you click "reopen"?
20:43:36  <creationix>no, I don't have the javascript badge
20:43:44  <creationix>I should really build up my stack overflow profile
20:44:02  <daurnimator>creationix: which (other) modules have these magical getters?
20:44:07  <daurnimator>are they documented/stable?
20:44:16  <creationix>it's listed just above the section I highlighted
20:44:18  <creationix>so the builtins
20:44:35  <creationix>and using those I think you can bootstrap a real require function to get usercode as well
20:46:26  <creationix>hmm, bootstrapping might be tricky, they don't expose any of the module modules
20:50:50  <creationix>daurnimator, would the vm module be useful? https://nodejs.org/dist/latest-v6.x/docs/api/vm.html
20:52:14  <creationix>hmm, probably not, in their example require is explicitly passed in meaning the vm can't create an instance https://nodejs.org/dist/latest-v6.x/docs/api/vm.html#vm_example_running_an_http_server_within_a_vm
20:53:59  <daurnimator>creationix: yep. just saw the same thing
20:54:43  <creationix>well, that gives your the builtins at least. I could help you re-implement a minimal version of node's resolution algorithm using fs, but I doubt you want to go that route
20:54:59  <daurnimator>yeah.....
20:55:09  <daurnimator>I was hoping things would be less retarded >.<
21:00:43  <creationix>I've got a meeting to head to, but I can ask in #node-dev if you want
21:00:54  <creationix>I haven't worked on node core in years. I might be missing something
21:34:48  <creationix>daurnimator why don't you have access to require? Not even in your host code that runs the sandbox?
21:35:24  <daurnimator>the js <=> lua bridge I wrote only exposes window/global to lua code
21:35:45  <creationix>and you don't want to expose require?
21:36:01  <daurnimator>node.js is mostly an afterthought. I don't even want to support it
21:36:17  <daurnimator>It's meant to be used in the browser
21:36:30  <daurnimator>(where this weird `require` local doesn't exist)
21:41:59  <creationix>daurnimator, ok, so I think it's possible
21:42:24  <creationix>or at least, not as bad as I thought
21:42:25  <creationix>https://github.com/nodejs/node/blob/e22ffefff221caee264ab0b88691478a03ab1862/lib/internal/bootstrap_node.js#L354-L453
21:42:54  <creationix>global.process.binding('natives') returns source code to all the builtin modules
21:43:12  <creationix>including the internal ones that implement require
21:44:46  <creationix>luvit's require is much easier to bootstrap, this is a mess
21:48:28  <daurnimator>creationix: where is `require` actually declared?
21:48:44  <creationix>which one, looks like there are at least 3 levels of require functions
21:49:47  <daurnimator>>.<
21:49:56  <creationix>the final one that's injected into normal modules is in https://github.com/nodejs/node/blob/e22ffefff221caee264ab0b88691478a03ab1862/lib/internal/module.js#L13-L40
21:50:16  <daurnimator>Looks like process.bindings is undocumented
21:50:45  <creationix>yep
21:50:56  <creationix>it's the bridge to C++ and a private API
21:51:06  <creationix>with luvit I have a public API in luv
21:51:48  <creationix>so how bad do you want this? I think it's possible, but it's not going to be pretty
21:53:34  <daurnimator>looks like the repl goes through here: https://github.com/nodejs/node/blob/e22ffefff221caee264ab0b88691478a03ab1862/lib/internal/bootstrap_node.js#L295
21:55:55  <creationix>daurnimator: right, that's why global.require exists in the repl
21:56:15  <creationix>you could do the same in your app
21:57:03  <daurnimator>ah this point I've exhausted my patience with node.js
21:57:08  <daurnimator>s/ah/at/
21:57:23  <creationix>sorry
21:57:41  <creationix>but seriously, just do `global.require = require` and it will be no worse than the official repl
21:58:12  <creationix>if you want, you can even make a custom require with a controlled module scope instead of relative to whatever file in your node sets up the bridge
21:58:34  <creationix>making a custom require on your host side is easy, doing it from across the bridge via only global is nasty
22:02:52  <daurnimator>https://www.youtube.com/watch?v=_cBbSUnFsZI
22:05:01  <creationix>daurnimator, so in a node script, you can use something like global.process.mainModule.constructor.prototype.require('fs')
22:05:10  <creationix>but it doesn't exist in the repl
22:07:07  <creationix>daurnimator global.process.mainModule is a supported API https://nodejs.org/dist/latest-v6.x/docs/api/process.html#process_process_mainmodule
22:08:23  <daurnimator>creationix: useful!
22:08:29  <daurnimator>(doesn't exist in repl though)
22:11:10  <creationix>yep, best I got. Dinner time here and I'm sure you're tired
22:11:31  <daurnimator>creationix: I'm in SF. 3pm here
22:11:36  <creationix>oh nice
22:11:47  <creationix>I was wondering why you were still up
22:12:01  <creationix>later
23:18:36  * rendarquit (Quit: std::lower_bound + std::less_equal *works* with a vector without duplicates!)