00:29:41  * coolaj86joined
00:41:31  * coolaj86quit (Ping timeout: 272 seconds)
00:43:09  * coolaj86joined
01:01:23  * xming_joined
01:04:57  * xmingquit (Ping timeout: 272 seconds)
01:13:21  * coolaj86quit (Read error: Connection reset by peer)
01:18:51  * coolaj86joined
01:59:49  * coolaj86quit (Ping timeout: 250 seconds)
02:32:59  * coolaj86joined
02:39:28  * TheJHquit (Read error: Operation timed out)
02:47:09  <creationix>coolaj86: got everything straightened out?, I see levi was helping you
02:47:43  <levi>Trying to, anyway.
02:47:59  <coolaj86>yeah, unfortunately Mountain Lion always crashes whenever I sleep, so I missed the last few messages from levi.
02:48:23  <coolaj86>I'm going to have to do a fresh install...
02:48:44  <coolaj86>is this irc logged somewhere that I could look back at it?
02:49:13  <levi>If nothing else, it's in my buffer right here, I could repeat it.
02:49:45  <levi>What was the last bit you remember?
02:50:32  <coolaj86>right after I ranted about the beliefs in my heart you posted three messages and I was beginning to read them when a distraction came and steered me away.
02:55:57  <levi>function foo() is binding a function to the name 'foo' at the global scope.
02:55:57  <levi>
02:56:07  <levi>local function foo() is binding a function to the name 'foo' at the current lexical scope.
02:56:16  <levi>Both are identical in meaning to manually declaring a variable at that point and then assigning an anonymous function to it.
02:56:22  <levi>Well, in the global scope you don't declare it first.
02:56:30  <levi>Why are you not seeing the contradiction in terms between 'anonymous' and 'bound'?
02:56:37  <levi>The scope belongs to the binding, not the function. The function is just data.
02:56:44  <levi>See the lua manual, section 2.5.9
02:56:52  <levi>'function () ... end' is an expression. It evaluates to an anonymous function, which is a type of data. When you bind it to a local variable, the name of the variable will then refer to that function (which is no longer anonymous, since you have bound it to a name) within the scope of that local variable. When you bind it to a global variable, the name will refer to that function whenever a local binding of the same name does not
02:56:53  <levi>shadow it.
02:56:59  <levi>Also, scoping of local variables in lua is block-based, and the binding becomes visible from the statement *after* the local declaration and remains in effect until the end of the immediately enclosing block.
02:57:06  <levi>(this means that you can't, in your local declaration, bind a variable to an expression that refers to the variable binding you're making)
02:57:12  <levi>(or any of the other variable bindings in the same local declaration)
02:57:34  <levi>And that was it.
03:05:05  <creationix>ahh, sorry I missed your response
03:05:09  <creationix>reading now...
03:05:37  <creationix>so the secret to understanding lua is to know what is just syntax sugar
03:05:49  <creationix>function foo() end -> foo => function () end
03:06:06  <creationix>*function foo() end -> foo = function () end
03:06:38  <creationix>and `local function foo() end` -> `local foo \n foo = function () end`
03:07:01  <creationix>so functions are always expressions after desugaring
03:07:05  <levi>Aside from the global variable bits, lua has very straightforward scoping rules.
03:07:35  <creationix>I do a LOT of js in my day job, so it still bites me from time to time
03:07:54  <creationix>`function foo() {}` in js is nothing like `function foo() end` in lua
03:10:45  <levi>I think he must have wandered away again. :)
03:17:18  <coolaj86>levi: but it's on my screen this time
03:17:44  <coolaj86>and now I'm actually reading it. :-D
03:20:04  <coolaj86>thanks for the info
03:20:57  <levi>I wasn't trying to be difficult, I honestly didn't understand what you were trying to ask at first.
03:21:58  <creationix>oh why does xchat hate me
03:22:18  <creationix>every time anyone joins or parts in any of the rooms I'm in, my screen floods with the list of members of all the rooms
03:22:34  <levi>Man, the ecmascript specification is not very easy to read.
03:22:52  <creationix>levi: really, I thought it was nice
03:23:05  <creationix>but yeah, the language is really complicated under the surface
03:23:19  <creationix>I like how lua appears simple, and really is simple
03:23:21  <levi>Well, yeah, it's the language more than the specification.
03:24:09  <levi>Have you ever read any of the Revised Reports on Scheme? They're basically the Scheme specifications. They're remarkably easy to read.
03:24:25  <creationix>no, I haven't
03:24:27  <creationix>sounds neat
03:24:28  <creationix>I should learn scheme
03:24:50  <levi>You should, it's a very simple language with amazing expressive power.
03:25:01  <creationix>that's lisp syntax right?
03:25:04  <creationix>and functional?
03:25:26  <levi>Yes, though not purely functional like Haskell.
03:25:45  <creationix>I've done a fair bit of ocaml
03:25:55  <creationix>it's also not quite as pure as haskell
03:26:24  <creationix>ohh, I should port node to scheme!
03:26:25  <levi>ocaml goes out if its way a little be more than Scheme to be pure, but they're similar aside from type system and syntax.
03:26:33  <levi>I was actually thinking of that.
03:26:36  <creationix>First-class continuations
03:26:51  <creationix>not sure how many people could handle the syntax though
03:26:57  <creationix>seems if it's not C style, it's no good
03:27:07  <creationix>atleast ocaml didn't have all the parens
03:27:13  <levi>There are a couple of implementations that compile to C that would probably be easy to bind libuv to.
03:27:31  <levi>Gambit Scheme and Chicken Scheme.
03:27:36  <creationix>nothing with an interactive repl?
03:27:43  <creationix>surely it allows C bindings
03:27:45  <levi>Oh, they have interactive repls.
03:27:59  <levi>They just also compile to C.
03:28:05  <coolaj86>have you guys played with parenscript?
03:28:24  <levi>That's the Common Lisp to Javascript compiler, right?
03:28:39  <creationix>coolaj86: that could be fun
03:28:46  <creationix>though js is a rather bloated vm
03:28:51  <coolaj86>"an extended subset of Common Lisp"... sounds like a fancy way to say "not Common Lisp"
03:28:53  <creationix>I'd be more interested if it compiled to lua
03:29:10  <levi>Well, then it wouldn't run on web browsers.
03:29:29  <creationix>native client!
03:29:39  <creationix>except that's chrome only :{
03:29:46  <levi>Parenscript was developed along with a Common Lisp web framework.
03:30:26  <creationix>so what's the best scheme implementation?
03:30:33  <creationix>there seem to be several, even in the ubuntu repos
03:30:42  <levi>This is not the most up-to-date Scheme Report, but it was the standard for a very long time: http://www.schemers.org/Documents/Standards/R5RS/r5rs.pdf
03:31:25  <levi>Look how short it is!
03:31:40  <creationix>I want the luajit of scheme
03:32:14  <levi>Scheme is so simple and easy to implement that there are lots of good implementations. It's sort of a rite of passage for Scheme programmers to write their own implementations, and it's been around for a long time.
03:32:55  <creationix>I see
03:32:58  <creationix>what about IO
03:33:09  <creationix>I guess that should be "io"
03:35:02  <levi>There are some primitives in the standard. They're blocking calls. Most Schemes implement some sort of threading based on continuations or their VM, though.
03:36:57  <levi>It also doesn't preclude a secondary non-blocking I/O system, but you have to be careful to define it so that it doesn't interact badly with call-with-current-continuation.
03:37:46  <levi>Chibi-Scheme is kind of interesting. It's a newer one designed to fit in the same space as Lua.
03:38:32  <creationix>did you see how light-weight luajit coros are?
03:38:40  <levi>Chicken Scheme also compiles to C and has a huge extension library. Racket is a system that has sort of extended beyond Scheme into its own language, though it does have Scheme-compliant modes.
03:39:31  <levi>Racket has the ability to define alternative syntaxes, and it has a bunch of built-in and extension modules to do cool things. It's got a JIT compiling implementation as well.
03:39:43  <levi>Yeah, I think I saw you mention that.
03:41:54  <creationix>wow chibi-scheme starts at 3Mb for a repl
03:42:37  <creationix>luajit, for comparison is ~700k
03:42:49  <creationix>and node is ~10Mb
03:42:58  <levi>Where'd you get 3Mb for chibi-scheme?
03:43:42  <levi>The front page says 'A full-featured build produces a library just under 200kb, whereas a minimal build can be under 80kb.'
03:44:46  <creationix>levi: rss
03:45:00  <creationix>just did a normal make install and ran the repl
03:45:07  <levi>Ahh, ok.
03:45:24  <creationix>the .so is indeed ~700k
03:46:15  <creationix>and io is 6.5Mb
03:46:23  <creationix>wow, lua is really tiny
03:46:47  <levi>Yeah, it is. It's a pretty small language, too.
03:47:25  <creationix>stripped the chibi lib is 171K
03:47:48  <levi>You can apparently also recompile it with fewer features baked in.
03:48:30  <levi>Of course there's also GNU Guile.
03:49:48  <creationix>even candor is larger than luajit
03:49:51  <creationix>1Mb
03:51:58  <creationix>guile starts at 10mb
03:52:03  <levi>Ypsilon Scheme looks interesting.
03:53:40  <levi>Gotta put kids to bed.
03:56:22  <creationix>gotta put me to bed
03:57:49  <coolaj86>gotta hang out with thu gurus at theTransistor
04:00:52  <levi>Are you there now?
04:02:19  <levi>I forgot it was the first Saturday of the month, or I'd probably be there too. :P
04:40:01  * coolaj86quit (Ping timeout: 240 seconds)
05:04:12  * standoojoined
05:37:52  * philips_quit (Excess Flood)
05:41:34  * philips_joined
05:42:46  * mmaleckiquit (Ping timeout: 244 seconds)
06:02:31  * aliemjoined
06:56:03  * TheJHjoined
06:56:41  * luastonedjoined
07:00:05  * luastoned1joined
07:02:23  * luastonedquit (Ping timeout: 246 seconds)
07:05:05  * luastonedjoined
07:08:12  * luastoned1quit (Ping timeout: 264 seconds)
07:08:47  * luastoned1joined
07:09:37  * luastonedquit (Ping timeout: 250 seconds)
07:11:23  * luastonedjoined
07:13:14  * luastoned1quit (Ping timeout: 246 seconds)
10:51:31  * mmaleckijoined
12:22:44  * standooquit (Quit: Leaving.)
13:28:57  * luastoned1joined
13:31:36  * luastonedquit (Ping timeout: 264 seconds)
15:11:24  * philips_quit (Excess Flood)
15:12:07  * philips_joined
16:59:01  * indexzero_joined
17:01:09  * indexzeroquit (Ping timeout: 244 seconds)
17:01:09  * indexzero_changed nick to indexzero
17:01:10  * coolaj86joined
17:04:23  * coolaj86quit (Read error: Connection reset by peer)
19:01:04  * jimt_joined
19:03:34  * jimtquit (Ping timeout: 246 seconds)
19:29:23  * jbuezajoined
21:06:43  * dvv-quit (Ping timeout: 240 seconds)
21:08:23  * creationixquit (Ping timeout: 240 seconds)
21:08:45  * luastoned1quit (Quit: Leaving.)
21:13:27  * creationixjoined
21:13:27  * dvvjoined
21:17:43  * dvvquit (Ping timeout: 240 seconds)
21:18:58  * dvvjoined
21:27:36  * dvvquit (Ping timeout: 245 seconds)
21:28:23  * creationixquit (Ping timeout: 240 seconds)
21:33:28  * dvvjoined
21:36:41  * creationixjoined
21:42:37  * creationixquit (Quit: ZNC - http://znc.in)
21:42:43  * dvvquit (Ping timeout: 240 seconds)
21:47:57  * dvvjoined
22:11:12  * guybrushquit (Quit: gnag!)
22:11:43  * guybrushjoined
22:11:55  * davidboyquit (Ping timeout: 248 seconds)
22:20:29  * aliemquit (Remote host closed the connection)
22:27:32  * davidboyjoined
23:28:53  * jbuezaquit (Quit: jbueza)
23:29:07  * jbuezajoined