00:09:54  * travis-cijoined
00:09:55  <travis-ci>luvit/luvit#2659 (master - c5d296f : Tim Caswell): The build has errored.
00:09:55  <travis-ci>Change view : https://github.com/luvit/luvit/compare/5e5d0833acc9...c5d296fba034
00:09:55  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/97347380
00:09:55  * travis-cipart
00:10:23  <creationix>new luvit released. dinner time!
00:11:59  * travis-cijoined
00:12:00  <travis-ci>luvit/luvit#2661 (2.7.2 - 34a546e : Tim Caswell): The build passed.
00:12:00  <travis-ci>Change view : https://github.com/luvit/luvit/compare/2.7.2
00:12:00  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/97347695
00:12:00  * travis-cipart
00:19:40  <daurnimator>creationix: I saw your mailing list post
00:19:54  <daurnimator>and I say less community fragmentation is a good thing
00:35:07  * tfnicoquit (Read error: Connection reset by peer)
00:37:57  * tfnicojoined
00:57:31  <creationix>daurnimator, but I need to find a way to continue supporting the few luvit users there are
00:58:00  <creationix>I think you can use luvit's require from normal lua to load luvit modules without overwriting lua's require
00:58:20  <creationix>I wish lua's require was extensible enough to do the relative requires
00:58:35  <creationix>I've seen some pretty crazy hacks to make that work using things like debug.traceback
01:06:31  <daurnimator>creationix: wut? debug.traceback can be implemented in lua.
01:06:44  <daurnimator>I hope you mean debug.getinfo("S")?
01:10:33  * Something12joined
01:40:34  <creationix>daurnimator, maybe that was it. I just remember it being a hack.
01:41:04  <daurnimator>creationix: well it always will be. lua files don't inherently have a path
01:41:23  <creationix>right, and luvi files are just entries in a zip file
01:41:38  <creationix>all files in luvit are loaded by luvit and not by lua
01:41:57  <daurnimator>creationix: sounds like something you can easily add a new lua 'searcher' for.
01:42:06  <creationix>how though?
01:42:14  <creationix>I mean, how do I do the relative search
01:42:27  <creationix>the search only gets the target path, not the path of the module calling require
01:42:39  <creationix>you need both to implement node-style requires
01:43:23  <daurnimator>creationix: local required_from = debug.getinfo("S", 3 --[[will have to double check this number]]).source; if required_from:sub(1,1) == "@" then --[[is a filename]] end
01:45:03  <creationix>right, that was the hack I've seen before I believe
01:45:14  <creationix>but some people disable debug for security reasons
01:45:21  <creationix>I guess this just won't work on those systems
01:45:26  <daurnimator>well yeah
01:45:43  <creationix>but it sure would be cool to use lua's own require instead of our own
01:45:44  <daurnimator>they don't *want* you to know who required you: they consider that a breach of security
01:45:52  <creationix>I wonder where it gets the path from
01:46:06  <daurnimator>creationix: when you call `load()` you provide a 'source name'
01:46:22  <daurnimator>loadfile just passes '"@"..filename' as the source field
01:46:45  <creationix>that could work then
01:47:01  <creationix>well, maybe
01:47:08  <creationix>so the searcher returns a loader and an argument
01:47:17  <creationix>and it's up to the loader function to call load()?
01:47:40  * creationixjust read the lua 5.2 section on searchers
01:48:42  <creationix>hmm, and then there is load vs loadstring, but I guess I can just use load if it exists
01:48:48  <creationix>they seem to work the same
01:49:09  <daurnimator>creationix: in 5.1 you don't get the arg btw.
01:49:21  <creationix>arg in the loader?
01:49:25  <creationix>that's fine, I can just create a closure
01:50:05  <daurnimator>well you probably don't want the loader anyway
01:50:13  <daurnimator>uh s/loader/arg/
01:51:28  <creationix>actually, if this works, it would be a lot cleaner
01:51:42  <creationix>the next problem is making luvit module compatible with normal modules
01:51:48  <creationix>we use exports.* to set lit metadata
01:52:03  <creationix>maybe move that to a special comment at the top?
01:52:15  <creationix>and just return the export value
01:52:40  <daurnimator>creationix: I always found your lit metadata thing weird. cause you can't extra it without actually *running* the module
01:52:56  <creationix>right, I run it in a sandbox and use pcall
01:53:11  <creationix>the sandbox has no globals or builtins so it crashes on the first require usually
01:53:15  <creationix>but yeah, that's weird
01:54:05  <creationix>so I guess people can still use lit to install dependencies
01:54:13  <creationix>but then run their program with normal lua or luajit
01:54:29  <creationix>still nor sure how lit's repository relates to luarocks
01:54:39  <creationix>or inter-dependencies
01:56:35  <daurnimator>creationix: well for one in normal lua/luajit you can't assume any given mainloop
01:56:46  <daurnimator>so won't many lit modules not work?
01:57:32  <creationix>right, users will have to explicitly call uv.run() or something on their own
01:57:44  <creationix>that's fine, luv already has this restriction
01:58:00  <creationix>I kinda like making the event loop explicit, it helps people understand how it works
01:58:43  <daurnimator>creationix: I agree. though I also like have everything fall back to a 'blocking' variant :)
01:58:52  <creationix>that'
01:58:59  <creationix>that's not possible with node libuv APIs
01:59:12  <creationix>s/node/most/
01:59:40  <daurnimator>creationix: I actually think it could be :)
01:59:55  <creationix>os thread blocking?
02:00:00  <creationix>fs* has that, sure
02:00:05  <creationix>and I think spawn even added it recently
02:00:10  <daurnimator>creationix: if you detect that uv.run isn't up the callstack. call it uv.run 'now'.
02:00:13  <creationix>but none of the socket/pipe stuff can block
02:00:24  <creationix>daurnimator, ahh, but that will break the first loop
02:00:34  <creationix>the first call stack doesn't have uv.run till the end
02:00:42  <creationix>and you don't know if the user will call it or not
02:00:56  <creationix>so you'd also have to explicitly tell it to not block, run some commands, and then block
02:01:17  <daurnimator>creationix: right. in cqueues we don't have that problem; as you always wrap everything that you want to be async via cq:wrap()
02:01:33  <creationix>also uv.run blocks on all events, not just the one that was started
02:01:43  <creationix>so if there is any level of concurrency, you can't block on just one command
02:01:56  <daurnimator>creationix: you run until there's no handlers left.
02:02:02  <daurnimator>as that's when you consider the operation "done"
02:02:22  <creationix>right, that's called uv.run ;)
02:02:33  <creationix>but I can't do it automatically
02:02:46  <creationix>wrapping on a wrap function is even more verbose
02:05:50  <creationix>but maybe a wrap function is cleaner
02:05:57  <creationix>it certainly gives you more control at the framework level
02:15:14  * boxofroxquit (Ping timeout: 256 seconds)
02:20:18  <daurnimator>creationix: so, do you have a plan around `require` now? :)
02:23:07  <creationix>well, I should be able to port luvit's require to a searcher/loader
02:23:11  <creationix>that's a good first step
02:23:31  <creationix>and change the lit metadata format to make modules compat
02:23:43  <creationix>still not sure where to publish things or declare dependencies
02:28:24  * boxofroxjoined
02:36:43  <daurnimator>creationix: you can make your own luarocks manifest
02:38:54  <daurnimator>creationix: should be easy enough to create a 'export.*" to rockspec convertor
02:57:24  <daurnimator>creationix: ?
02:57:43  <creationix>yeah, a converter shouldn't be too hard
02:57:56  <creationix>but I'm still not sure there is value in publishing modules to both places
02:58:50  <daurnimator>why *not*?
02:59:11  <creationix>I said "not sure", just have to think it through
03:00:35  <daurnimator>hrm. I just was reading through some luvit files
03:00:46  <daurnimator>I didn't realise you version *all* of the files individually
03:00:50  <daurnimator>that seems really weird to me
03:01:01  <creationix>they are independent libraries published to lit on their own
03:01:10  <creationix>luvit/luvit is a metapackage
03:02:06  <creationix>most are single file modules
03:02:17  <daurnimator>e.g. https://github.com/luvit/luvit/blob/master/deps/http.lua <== where else is this?
03:03:23  <creationix>they don't all have their own repos on github if that's what you mean
03:04:01  <daurnimator>anyway...
03:04:15  <daurnimator>I'm sure you can come up with a exports.* header to rockspec convertor
03:04:45  <creationix>yep, I'll start by converting luvit/require to a lua 5.1 package.loaders function
03:04:47  <daurnimator>from that point you can just use luarocks. you can make your own manifest (see) https://luarocks.org/new-manifest
03:05:19  <creationix>so a manifest is a group of libraries?
03:06:07  <daurnimator>more like a custom/seperate package index
03:06:20  <creationix>interesting
03:06:59  <daurnimator>luarocks by default looks like the "root" manifest. but you can pass a different one on command line; or put your own default in the condig
03:07:04  <daurnimator>*config
03:13:15  <daurnimator>e.g. torch use luarocks for all their pacakges; but have their own manifest.
03:13:25  <daurnimator>I've been telling the snabb guys to do the same.
03:13:54  <creationix>cool
03:15:44  <creationix>that's a clever way to solve the fragmentation problem
03:18:46  * tfnicoquit (Ping timeout: 240 seconds)
03:21:47  * tfnicojoined
04:09:33  <creationix>ugg, this is easier said than done
04:09:39  <creationix>lua has no concept of cwd
04:09:55  <creationix>libuv does, but having require depend on libuv makes things tricky
04:10:00  <creationix>I need luv before bootstrapping
04:51:21  <daurnimator>creationix: what concepts do you need beyond "./"?
04:51:43  <creationix>well, luvit's require is actually pretty complicated
04:51:51  <daurnimator>resolve debug.getinfo(3, "S").source relative to ./
04:51:53  <creationix>but I have a working prototype that has most the core logic
04:53:45  <creationix>daurnimator https://github.com/luvit/luvit/compare/luvly
04:54:07  <creationix>I copy-pastes the pathJoin code from luvi
04:54:47  <creationix>the actual loader is fairly simple https://github.com/luvit/luvit/blob/27252362238fc4fa7d79545be261ef8a7aeda0b0/luvit-loader.lua#L134-L173
04:55:07  <creationix>doesn't support zip bundles at all, but that can be just another loader
04:55:22  * travis-cijoined
04:55:23  <travis-ci>luvit/luvit#2663 (luvly - 2725236 : Tim Caswell): The build passed.
04:55:24  <travis-ci>Change view : https://github.com/luvit/luvit/commit/27252362238f
04:55:24  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/97376458
04:55:24  * travis-cipart
04:56:00  <daurnimator>creationix: so you just need cmd and stat? just use lfs.
04:56:29  <creationix>but why use lfs when I have libuv?
04:56:30  <daurnimator>or even fallback to native command line utils (luarocks does this)
04:56:39  <daurnimator>creationix: because you don't have libuv at this point? :P
04:56:56  <creationix>sure I do, I just installed it in the normal package.cpath location
04:57:02  <creationix>lfs won't be any different
04:57:54  <daurnimator>k :)
04:58:39  <creationix>so I guess using os.execute, I can stat and check exit code?
04:58:44  <creationix>doesn't appear you can scrape the program output
04:58:55  <daurnimator>creationix: io.popen.
04:59:12  <creationix>ahh yes, the io system that I've avoided
04:59:28  <daurnimator>creationix: also, if the 'source' field doesn't start with "@" and it's a relative require you should probably immediately return
04:59:39  <creationix>yeah, just added that
05:00:31  <creationix>and when I eventually add the bundle loader, it will do the same and only load from bundles
05:01:33  <creationix>though luvit's require looks in bundle first always before looking on filesystem
05:01:38  <creationix>in case require is for luvit builtin
05:01:51  <creationix>I'll just have to make sure the loaders are layered properly
05:02:03  * travis-cijoined
05:02:03  <travis-ci>luvit/luvit#2664 (luvly - ed2bf10 : Tim Caswell): The build has errored.
05:02:04  <travis-ci>Change view : https://github.com/luvit/luvit/compare/27252362238f...ed2bf1073ffe
05:02:04  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/97377069
05:02:04  * travis-cipart
05:02:34  <daurnimator>creationix: you could do this with several loaders
05:02:50  <daurnimator>creationix: e.g. one for relative; one for absolute; one for in bundles....
05:03:05  <daurnimator>and just order them in package.loaders however you need.
05:04:30  <creationix>there are a lot of combinations in luvit's require system
05:04:54  <creationix>in one dimension there is (relative path, module path, absolute path)
05:05:00  <creationix>then another is (filesystem, bundle)
05:05:17  <creationix>within module path there is (deps and libs) variants
05:05:38  <creationix>every path looks for ?.lua, ?.so (or ?.dll) and direct match
05:06:11  * travis-cijoined
05:06:12  <travis-ci>luvit/luvit#2665 (luvly - d445d62 : Tim Caswell): The build passed.
05:06:12  <travis-ci>Change view : https://github.com/luvit/luvit/compare/ed2bf1073ffe...d445d626d59d
05:06:12  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/97377432
05:06:12  * travis-cipart
05:06:23  <creationix>I don't want 12 loaders, they would have a bit of duplicated code
05:06:31  <creationix>but I can break them at the points where they share little code
05:20:49  * SkyRocknRolljoined
05:24:23  * travis-cijoined
05:24:24  <travis-ci>luvit/luvit#2666 (luvly - 957fe7c : Tim Caswell): The build passed.
05:24:24  <travis-ci>Change view : https://github.com/luvit/luvit/compare/d445d626d59d...957fe7cc76dc
05:24:24  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/97379552
05:24:24  * travis-cipart
05:37:10  * sclark39quit (Ping timeout: 272 seconds)
05:49:46  * SkyRocknRollquit (Ping timeout: 240 seconds)
06:03:55  * SkyRocknRolljoined
08:50:06  * indexzeroquit (Ping timeout: 240 seconds)
08:53:36  * indexzerojoined
09:03:15  * tfnicoquit (Ping timeout: 260 seconds)
09:07:46  * indexzeroquit (Ping timeout: 256 seconds)
09:11:59  * tfnicojoined
09:13:56  * indexzerojoined
09:19:31  * indexzeroquit (Ping timeout: 265 seconds)
09:20:36  * tfnicoquit (Ping timeout: 240 seconds)
09:25:43  * kostcoquit (Ping timeout: 250 seconds)
09:36:17  * tfnicojoined
09:36:20  * kostcojoined
09:43:58  * indexzerojoined
11:40:45  * indexzeroquit (Ping timeout: 260 seconds)
11:42:30  * tfnicoquit (Ping timeout: 260 seconds)
11:44:26  * indexzerojoined
11:45:45  * tfnicojoined
11:50:06  * indexzeroquit (Read error: Connection reset by peer)
11:54:04  * kostcoquit (Read error: Connection reset by peer)
11:57:44  * indexzerojoined
12:02:15  * tfnicoquit (Ping timeout: 240 seconds)
12:06:35  * indexzeroquit (Ping timeout: 240 seconds)
12:09:36  * Something12quit (Ping timeout: 255 seconds)
12:11:16  * SkyRocknRollquit (Ping timeout: 240 seconds)
12:26:16  * kostcojoined
12:38:30  * tfnicojoined
12:41:34  * indexzerojoined
13:05:13  * tfnicoquit
13:05:24  * tfnicojoined
13:06:17  * indexzero_joined
13:06:40  * indexzeroquit
13:06:41  * indexzero_changed nick to indexzero
13:23:15  * kostcoquit
13:23:23  * kostcojoined
13:26:24  <rphillips>good morning
13:32:35  * kostco_joined
13:33:27  * sclark39joined
15:03:45  * kostco_quit
15:56:08  * sclark39quit (Ping timeout: 272 seconds)
15:57:32  * piernovjoined
17:59:29  <creationix>morning
17:59:33  <creationix>(barely)
19:19:17  <rphillips>creationix: vidyo?
19:19:23  <creationix>sure
19:19:30  <rphillips>your room
20:00:06  <creationix>daurnimator, know what would be really cool? What if the luarocks client knew how to install directly from lit servers?
20:00:16  <creationix>I'd be willing to send in the patch to make it happen
20:00:36  <creationix>I just need a TLS client and some sort of filesystem access to store locally cached objects
20:01:08  <creationix>the rest is pure lua
21:31:01  * sclark39joined
22:46:15  * sclark39quit (Ping timeout: 240 seconds)
23:57:30  <daurnimator>creationix: do you actually need TLS? is it not just http?
23:57:51  <daurnimator>creationix: as policy, all things in luarocks *must* have fallbacks to native system tools.
23:58:02  <daurnimator>e.g. for http, if luasocket isn't available, it falls back to curl on linux
23:58:23  <daurnimator>(and if curl doesn't work; fallback to wget)
23:59:08  <daurnimator>that said; there is talk of a new feature in luarocks 3.0 (coming in a year or more) to write custom rockspec extensions that are deployed via luarocks itself.