01:01:28  * Haragethquit (Remote host closed the connection)
01:04:04  * Something12_quit (Ping timeout: 252 seconds)
02:02:00  * Haragethjoined
02:07:47  * Haragethquit (Ping timeout: 260 seconds)
02:08:00  * DarkGodquit (Ping timeout: 276 seconds)
02:55:32  * Haragethjoined
05:01:58  * SkyRocknRolljoined
06:26:55  * rgrinbergquit (Ping timeout: 252 seconds)
06:59:05  * rendarjoined
07:31:03  * DarkGodjoined
08:21:49  * Something12_joined
09:05:19  * Something12_quit (Ping timeout: 252 seconds)
09:47:52  * cptGjoined
09:51:03  * cptG_quit (Ping timeout: 240 seconds)
10:45:57  * cptG_joined
10:49:17  * cptGquit (Ping timeout: 260 seconds)
11:58:55  <cat5e>creationix, apparently rezipping lit.zip fixed it >.>
11:59:10  <cat5e>(I mean unzipping it and then zipping it back)
13:00:16  <daurnimator>creationix: morning
13:04:33  <cat5e>the thing I like about dreams, other than being able to find fixes/workarounds like that, is fast iteration times
13:04:56  <cat5e>in a dream, you don't need to wait for the compiler
13:05:01  <cat5e>you also don't need to type
13:05:14  <cat5e>typing is slower than the compiler
13:06:51  * rgrinbergjoined
13:12:13  <cat5e>uh no wait what, that broke when I put it in /usr/bin >.>
13:13:17  <cat5e>ok no I don't get this anymore
13:15:46  <cat5e>meh
13:16:06  <cat5e>I'm going back to sleep, maybe I'll have another dream
13:32:14  <cat5e>oh it's stripping the binary...
13:32:50  <cat5e>not sure how to disable that
13:33:21  <daurnimator>why does that matter
13:33:34  <cat5e>strip doesn't like appended zips
13:33:44  <cat5e>because the devs are stupid or something
13:34:01  <cat5e>I mean, it's GNU
13:39:00  <cat5e>and it works!
13:45:10  * SkyRocknRollquit (Remote host closed the connection)
13:48:52  <cat5e>finally
13:52:40  <cat5e>so now what
13:54:35  <rphillips>cat5e: did you find the PKGBUILD option=(!strip)
13:54:37  <rphillips>?
13:54:43  <rphillips>options=(!strip)
13:54:47  <cat5e>yeah
13:54:58  <rphillips>nice
13:55:21  <cat5e>so now this is a thing https://aur.archlinux.org/packages/lit/
13:56:36  <cat5e>I couldn't get luvi to compile, but if you want feel free to make a non-bin luvi PKGBUILD :P lit should work fine with it
15:30:21  <cat5e>only wish I could specify a version with `lit make` :/
15:33:37  * Haragethquit (Remote host closed the connection)
15:34:18  * Haragethjoined
15:39:12  * Haragethquit (Ping timeout: 276 seconds)
15:40:30  * rgrinbergquit (Ping timeout: 276 seconds)
15:57:59  * rgrinbergjoined
16:18:07  <creationix>cat5e: don't strip luvi apps. Though it should be safe to strip luvi itself before appending the zip
16:18:34  <creationix>daurnimator, morning
16:19:18  <creationix>if you're still up (it's what 2am there?)
16:28:27  <cat5e>creationix, yeah I learned that the hard way
16:28:40  <cat5e>I still think GNU strip is stupid
16:30:08  <creationix>could be
16:30:21  <creationix>I just know it treats zips at the end as garbage and will often break it
16:30:53  <creationix>which to be fair, is correct behavior. zip appending is a total hack that happens to work really well
16:34:37  <cat5e>ppl append zips at the end of bash scripts :/
16:37:13  * rgrinbergquit (Read error: Connection reset by peer)
16:56:44  * rgrinbergjoined
16:56:48  * Haragethjoined
17:23:43  <creationix>I prepend zips with shebang lines
17:23:53  <creationix>best way to use luvi if you don't need a portable binary
17:51:14  * Haragethquit (Remote host closed the connection)
17:55:57  <cat5e>ocaml bytecode files come with a shebang
18:29:40  * Haragethjoined
18:34:51  <cat5e>creationix, any way to specify a specific version with lit?
18:35:02  <creationix>cat5e version of what?
18:35:27  <cat5e>with lit://luvit/luvit can I specify a version so I can make an AUR package for it?
18:38:46  <cat5e>creationix, would be nice if I could either specify a version or get the version without doing make and stuff
18:39:06  <creationix>yeah, the lit:// urls support a version
18:39:32  <creationix>cat5e: here are the patterns https://github.com/luvit/lit/blob/master/libs/core.lua#L498-L501
18:39:53  <creationix>and the custom luvi can be specified as the last arg to make
18:40:04  <creationix>`lit make url target custom/luvi`
18:40:32  <cat5e>so lit://luvit/luvit@vwhatever?
18:40:39  <creationix>looks like
18:40:41  <cat5e>can I use exact versions?
18:40:56  <creationix>as long as it matches the pattern
18:42:02  <cat5e>I mean does it use the exact version I specify or does it use the latest version in the branch?
18:43:22  <creationix>hmm, good question
18:43:34  <creationix>might be better to download the exact zip directly instead of using a url
18:43:39  <creationix>see also https://github.com/Homebrew/homebrew-core/blob/master/Formula/luvit.rb
18:44:50  <creationix>hmm, actually that recipie doesn't help much
18:49:05  * rgrinbergquit (Read error: Connection reset by peer)
19:02:00  * rendarquit (Ping timeout: 276 seconds)
19:07:06  * rgrinbergjoined
19:23:07  * rgrinbergquit (Read error: Connection reset by peer)
19:31:19  * rendarjoined
19:43:37  * rgrinbergjoined
19:54:10  * rgrinbergquit (Read error: Connection reset by peer)
20:30:34  * rgrinbergjoined
20:44:36  <cat5e>creationix, so what does `lit make lit://luvit/luvit@vwhatever` do?
20:45:19  <creationix>It looks like it uses the version to do a match https://github.com/luvit/lit/blob/master/libs/core.lua#L454
20:45:28  <cat5e>and is it ok if I just do the same thing (but defer to `lit make some.zip`) in a PKGBUILD?
20:45:32  <creationix>which, if I remember correctly, will actually match the latest version that's compat
20:45:54  <creationix>so if there has been a bug-fix release since then, it will actually pull in the later release
20:46:02  <creationix>but downloading a zip should do that exact version
20:46:13  <cat5e>uh this looks like I won't be able to use it in a PKGBUILD
20:46:58  <creationix>right, so the zip route might be the way to go
20:47:09  <creationix>https://lit.luvit.io/packages/luvit/lit/3.4.1.zip, for example should give you 3.4.1 and not 3.4.2
20:47:30  <cat5e>what about luvit/luvit?
20:47:38  <creationix>same thing
20:47:44  <cat5e>oh ok
20:47:52  <creationix>find latest with https://lit.luvit.io/packages/luvit/luvit/latest
20:48:00  <creationix>and then replace with actual version and append .zip
20:48:32  <cat5e>wait
20:48:38  <cat5e>do I need all those deps too?
20:48:52  <creationix>nope, they are included in the zip
20:48:58  <creationix>it actually uses the snapshot hash
20:49:07  <creationix>so even if the deps gets updated, your downloaded zip won't
20:49:32  <cat5e>ok let's try
20:49:43  <creationix>you could technically just append the zip to luvi
20:49:49  <creationix>but it's better to run it through lit make
20:50:03  <creationix>that will only include needed files and try to save space by compiling lua files
20:50:33  <cat5e>hmm about that saving space thing
20:50:50  <cat5e>do you compare the zipped file sizes or do you compare the raw file sizes?
20:51:00  <creationix>I think raw
20:51:06  <cat5e>lol
20:51:06  <creationix>let me check
20:52:31  <creationix>yep https://github.com/luvit/lit/blob/a64e8f9d755f4db8cd8cac560d0597f95dec765b/libs/export-zip.lua#L45-L53
20:52:44  <creationix>I don't have access to the compressed size at this point, so it's counting uncompressed size
20:52:53  <cat5e>lol
20:53:11  <cat5e>you should really compare compressed size
20:53:12  <creationix>so there are cases where it actually bloats the final size a bit since lua is more compressable than bytecode
20:53:20  <cat5e>I heard bytecoded doesn't compress well
20:53:26  <creationix>it doesn't
20:53:31  <creationix>but it's not the end of the world either
20:53:39  <creationix>and it does load faster since it's already compiled
20:53:48  <cat5e>where I'm from, I call that a bug
20:53:50  <creationix>overall, this technique saves lots of space
20:54:05  <creationix>I call it managing complexity
20:54:24  <cat5e>it loads faster except you're still decompressing the bytecode
20:54:33  <cat5e>uncompressing, w/e
20:54:41  <creationix>same thing :)
20:55:13  <cat5e>do you at least store the bytecode as-is instead of compressing it?
20:55:19  <creationix>point is we did lots of experimental measurements on real-world apps and the simple "use bytecode if raw is smaller" algorithm is quite effective
20:55:37  <creationix>the final zip is much smaller and loads every so slightly faster
20:55:51  <creationix>but that's mostly because luvit has apache2 license headers in every gfile
20:55:53  <creationix>*file
20:56:01  <creationix>lots of comment space to be reclaimed there
20:56:14  <cat5e>yeah you can make it much faster if you don't compress it
20:56:35  <creationix>perhaps
20:56:38  <creationix>but it's not a problem
20:56:39  <cat5e>I think zip has a STORE mode that stores raw?
20:56:49  <creationix>I'm not going to make my code more complex without a need
20:56:59  <creationix>the compression is here https://github.com/luvit/lit/blob/a64e8f9d755f4db8cd8cac560d0597f95dec765b/libs/export-zip.lua#L56
20:57:09  <creationix>(the 9 is a magic miniz number for max zip compression)
20:57:42  <creationix>We could simply disable compression if it's bytecode. That's simple enough and might have similar space savings
20:58:11  <creationix>space of lua code isn't a big deal anyway. It's been smaller than luvit itself in every app I've ever seen
20:58:20  <creationix>smaller than the payload in most websites even
21:00:18  <creationix>for example, lit itself is 100 files taking about 400k uncompressed
21:00:54  <cat5e>creationix, so this should work? http://sprunge.us/Pjhh
21:02:04  <cat5e>(gcc-libs is a luvi dependency but it propagates...)
21:02:15  <creationix>looks like it would work
21:02:28  <creationix>but I think better would be depend on luvi and include a shebang to luvi
21:02:36  <cat5e>change the version with .4 this is just for testing
21:02:42  <creationix>since you're using shared libraries for everything, it makes sense to share luvi too
21:03:35  <creationix>something like `echo "$pkgdir/usr/bin/luvi --" > prefix` and then use prefix as the custom luvi
21:04:05  <cat5e>that won't work
21:04:15  <creationix>well, wherever luvi is installed
21:04:22  <creationix>I assume if you depend on it, you know it's path
21:05:14  * a__quit (Remote host closed the connection)
21:06:03  <creationix>with nucleus.js I'm making this a feature of the core. (nucleus app -o target -l) -l for linked
21:06:36  * a__joined
21:09:30  * a__quit (Remote host closed the connection)
21:10:43  * a__joined
21:11:59  * a__quit (Remote host closed the connection)
21:12:27  <cat5e>creationix, does luvi actually do its thing if you use "#/usr/bin/luvi --"?
21:13:11  <creationix>it has special logic that if there is a "--" and no path argument before it, it will consume exactly one of the following args as the bundle base
21:13:12  * a__joined
21:13:20  <creationix>this was added explicitly to support shebang usage like this
21:13:36  <creationix>unix will insert the path to the file before the other args and it will just work
21:13:41  <cat5e>huh cool
21:14:39  <creationix>see the section in this port where I use the prefix to share luvi in alpine linux https://luvit.io/blog/alpine-luvi.html
21:14:43  <creationix>should work the same for arch
21:19:50  <cat5e>so like can I use "luvi lit.zip -- make lit.zip ./lit ./fakeluvi"?
21:20:01  <creationix>yep
21:20:56  <cat5e>can I replace "(x86_64 i686)" with "(any)" as well?
21:21:26  <creationix>I suppose
21:21:32  <creationix>assuming you depend on a native luvi it will work
21:22:02  <creationix>luvit/luvit is 100% lua, all the C code is in luvi
21:22:36  <creationix>same for luvit/lit
21:40:26  <cat5e>so now I just let someone else do the whole luvi thing :P
21:52:25  <cat5e>so I have luvit working, now what?
21:54:14  <creationix>depends on what you want
21:54:31  <creationix>I would think you would prefer to use luv + lua over luvit
21:54:40  <creationix>since you have experience with lua and luarocks
21:54:52  <creationix>lit can work with either if you include a custom loader
21:55:15  <creationix>see this blog post for details https://luvit.io/blog/pure-luv.html
21:58:02  <rch>^ Love the blog post title
22:00:55  <creationix>:)
22:01:03  <creationix>I have way too much fun naming luvit things
22:01:17  <cat5e>since when do I have experience with luarocks???
22:01:29  <creationix>the best I think was the getting started guide that told you to "get lit and make luv"
22:01:45  <creationix>cat5e do you not use it?
22:01:52  <creationix>I assumed all lua people used it
22:01:55  <cat5e>not really...
22:02:16  <cat5e>it's not very user-friendly IMO
22:03:54  <creationix>well, I obviously disliked it enough to write my own
22:04:23  <cat5e>:P
22:09:22  * rgrinbergquit (Ping timeout: 272 seconds)
22:16:24  <cat5e>creationix, so how do I get started? luvit doesn't have man pages
22:16:48  <creationix>cat5e https://luvit.io/docs.html
22:17:25  <cat5e>https://luvit.io/api/synopsis.html
22:17:33  <cat5e>"To run the server, put the code into a file called example.js and execute it with using luvit "
22:17:48  <cat5e>I take it you copypasted node.js docs?
22:23:15  <cat5e>creationix, so do I really just run luvit <somescript.lua>?
22:23:23  <creationix>yep
22:23:42  <creationix>lol "example.js"
22:23:50  <cat5e>ikr? :P
22:44:13  <cat5e>creationix, can I do luvit by probing?
22:44:26  <creationix>probing?
22:44:36  <creationix>the repl has tab completion
22:44:45  <cat5e>yeah, because the docs are lacking
22:44:56  <creationix>yep
22:45:02  <creationix>what in particular are you trying to do?
22:45:10  <cat5e>a pastebin
22:45:19  * Something12_joined
22:45:24  <cat5e>and a LTON API for it
22:46:40  <cat5e>does luvit include sqlite?
22:47:16  <SinisterRectus>pretty print the modules
22:51:36  * Something12_quit (Read error: Connection reset by peer)
22:52:52  <cat5e>creationix, so let's say I wanna use sqlite
22:55:02  <SinisterRectus>luvit doesn't include any sql things
22:55:54  <SinisterRectus>http://wiki.luajit.org/FFI-Bindings#databases might be helpful
22:56:56  <rch>creationix: heh yeah that one is good
22:57:19  <creationix>cat5e, right like I said in the talk. The luvit ecosystem is pretty immature for things like that
23:32:51  * rendarquit (Quit: std::lower_bound + std::less_equal *works* with a vector without duplicates!)
23:42:05  <cat5e>creationix, sqlite is useful in client code
23:42:27  <cat5e>my web browser and my email client both use sqlite