[00:19:19] * rgrinberg [rgrinberg!~rgrinberg@hlfxns016cw-142134033086.dhcp-dynamic.FibreOp.ns.bellaliant.net] has joined the channel. [02:47:23] * fuzzyhorns [fuzzyhorns!~fuzzyhorn@c-73-38-57-191.hsd1.ma.comcast.net] has quit (Quit: Leaving.). [03:09:50] * saml_ [saml_!~saml@cpe-24-102-97-97.nyc.res.rr.com] has quit (Quit: Leaving). [04:24:31] * eatonphi1 [eatonphi1!~weechat@li1030-104.members.linode.com] has joined the channel. [04:24:33] * eatonphil [eatonphil!weechat@2600:3c03::f03c:91ff:fe91:94a9] has quit (Ping timeout: 276 seconds). [05:33:29] * rgrinberg [rgrinberg!~rgrinberg@hlfxns016cw-142134033086.dhcp-dynamic.FibreOp.ns.bellaliant.net] has quit (Ping timeout: 260 seconds). [08:48:52] * jtimon [jtimon!~quassel@neubau-gw.kalkbreite.net] has joined the channel. [09:39:51] * jtimon [jtimon!~quassel@neubau-gw.kalkbreite.net] has quit (Ping timeout: 246 seconds). [09:47:44] * jtimon [jtimon!~quassel@neubau-gw.kalkbreite.net] has joined the channel. [09:56:59] * jtimon [jtimon!~quassel@neubau-gw.kalkbreite.net] has quit (Remote host closed the connection). [11:05:36] 973606b Björn Lindqvist: cpu.x86.assembler: enable zero extension for AND with small immediates [11:45:08] * saml_ [saml_!~saml@cpe-24-102-97-97.nyc.res.rr.com] has joined the channel. [11:51:25] * cods [cods!~fred@rsbac/developer/cods] has joined the channel. [12:05:36] e60d45a Björn Lindqvist: Docs: fixing help-lint failures [12:05:37] 5b3933e Björn Lindqvist: cpu.x86: xor rax, rax -> xor eax, eax [12:15:48] * jtimon [jtimon!~quassel@neubau-gw.kalkbreite.net] has joined the channel. [15:54:12] * jtimon [jtimon!~quassel@neubau-gw.kalkbreite.net] has quit (Ping timeout: 276 seconds). [15:54:53] * jtimon [jtimon!~quassel@neubau-gw.kalkbreite.net] has joined the channel. [16:26:59] * jtimon [jtimon!~quassel@neubau-gw.kalkbreite.net] has quit (Remote host closed the connection). [16:44:32] * tgunr [tgunr!~davec@cpe-66-91-34-168.hawaii.res.rr.com] has quit (Ping timeout: 260 seconds). [19:27:20] * puckipedia [puckipedia!~puck@irc.puckipedia.com] has quit (Read error: Connection reset by peer). [19:27:30] * puckipedia [puckipedia!~puck@irc.puckipedia.com] has joined the channel. [19:28:27] * nchambers [nchambers!nchambers@carmelirc.duckdns.org] has left the channel ("Leaving"). [19:33:37] * evincar [evincar!~jonathanp@173-228-12-231.dsl.dynamic.fusionbroadband.com] has joined the channel. [19:34:05] defanor: I haven't written up a comprehensive description yet, but I can answer any questions. [19:34:16] About Kitten. [19:34:27] Sorry I didn't see your messages earlier. [19:37:32] erg: We should maybe add https://irclogs.factorcode.org/concatenative/ to the channel topic if that's going to be the new stable log URL. [19:38:08] Feel free to give me ops. ;) [19:41:24] I also haven't worked on Kitten in a few weeks. [19:41:47] Thinking about getting back into it, since people keep expressing interest e.g. on Twitter. [19:42:17] I've been noodling around with my reactive/async language, Hap. [19:42:45] Trying to come up with a nice minimal core that's also reasonably efficient. [19:44:11] The previous implementation was an interpreter with pull-based semantics. [19:44:15] Basically every event listener would be tested at every sequence point. [19:45:35] Changing to a push-based semantics (only test what changed) is more efficient asymptotically, but has higher constant overhead. [19:48:39] Namely, every object has to maintain a set of weakrefs to objects that reference it, so it can invalidate their values when its own value changes. [19:49:35] Unfortunately, in imperative-land, weakrefs are somewhat costly as you have to iterate the whole weakref table at each GC. [19:51:50] I think GHC's RTS does something more clever, but I haven't looked into it very deeply. [20:11:36] * ChanServ has set mode +o to evincar [20:11:50] evincar: change the topic if you please :D [20:12:16] evincar: i'm just waiting for a netsplit to take out flogbot, and it may never rejoin... lol [20:12:51] if anyone here knows who runs clog, please ask them to get it back into the channel! [20:33:22] Presumably nef@bespin.org, whoever that is. :P [20:35:54] evincar: i'm mostly interested in kitten's type system. is it all arbitrary, or does it, say, correspond to any existing one? [20:37:18] defanor: It's Hindley-Milner, with a slightly modified generalisation step. [20:39:28] evincar: how's it mapped to Hindley-Milner (and to LC)? and how is that step modified? [20:39:42] Polymorphism over the stack lets you generalise e.g. "map" from: [20:39:55] "forall r s a b. r * List a * (s * a -> s * b) -> r * List b" [20:39:58] to: [20:40:03] "forall r a b. r * List a * (forall s. s * a -> s * b) -> r * List b". [20:40:41] In Kitten notation, that'd be " (R..., List, (S..., A -> S..., B) -> R..., List)" [20:41:07] or " (List, (A -> B) -> List)" with some syntactic sugar. [20:41:52] The advantage being that you can apply HOF arguments multiple times on different types of stacks [20:41:55] as long as the arguments & return values line up correctly. [20:43:33] An expression like "f g" is typed just like "g . f" in Haskell. [20:44:52] And local variables correspond to lambda abstractions. [20:44:57] So "f -> x; x g" is typed similarly to "(\x -> g x) . f" in Haskell [20:45:08] * delvinj [delvinj!~Miranda@173-160-116-46-Minnesota.hfc.comcastbusiness.net] has quit (Quit: it's the end). [20:45:12] with the exception that these functions accept & return stacks, not single values. [20:45:25] Does the source for the cat language exist anywhere? I had a hard time googling for it [20:45:52] * eatonphi1 is now known as eatonphil [20:47:10] evincar: i see, but something is not clear still. probably the biggest challenge for me is to see how it's mapped to LC (and then HM) [20:47:28] eatonphil: Hmm, I can't get to the download of cat.zip from the Wayback Machine. :( [20:47:57] * Hotkeys is now known as Selkirk [20:48:38] :( [20:48:52] http://www.codeproject.com/Articles/16247/Cat-A-Statically-Typed-Programming-Language-Interp [20:49:07] fk code project logins tho [20:50:10] defanor: Well, for example, "dup (*)" in Kitten would be "(\ (a, (b, stack)) -> (a * b, stack)) . (\ (x, stack) -> (x, (x, stack)))" in Haskell. [20:50:12] evincar: are the local variables in kitten just syntax sugar, or is there a special handling for those? [20:51:23] erg: that is a great article, thank you [20:52:16] np [20:52:27] evincar: oh, here's a bit that is not clear: the functions are first-class in kitten, right? how would a function construct/return another function? does it emulate closures by capturing variables in the stack somehow? [20:52:43] defanor: Locals don't desugar to stack manipulation, if that's what you mean. [20:53:04] evincar: yup, that's what i meant. but can they, in principle? [20:53:10] In the latest version of the compiler that I'm working on, locals & stack manipulation are compiled in basically the same way. Values may be stored in registers, on the (system) stack, &c. [20:53:21] Yes, they could, but it's generally pretty inefficient to do so. [20:54:01] Converting lambdas to combinators is called an "abstraction algorithm" and they generally scale very poorly (quadratically IIRC) [20:54:09] * saml_ [saml_!~saml@cpe-24-102-97-97.nyc.res.rr.com] has quit (Remote host closed the connection). [20:55:36] To construct an anonymous function, you use the "{}" notation in Kitten, and they support capturing local variables (by copy). [20:56:21] E.g. "define curried_add (Int32 -> Int32 -> Int32) { -> x; { -> y; x + y } }" [20:56:52] This separates the notions of "anonymous function" and "local name binding", which are coupled in LC. [20:57:08] how would that example look like without local variables? [20:57:53] (if it's not too long or hard to translate) [20:58:41] Hmm, something like "\function to_both \+ compose compose" maybe? That is, wrap the two top values of the stack in quotations, and compose them along with the "+" function. [20:59:09] Internally this would still use the capture mechanism, because "function" is implemented as "-> x; { x }". [20:59:23] But that's more or less an implementation detail. [20:59:51] You could implement closures as vectors of function pointers, for example, and compose them by concatenation. [21:01:03] will check it in the interpreter now, thanks [21:01:25] Haha, I dunno how the old compiler will handle it. Good luck. :) [21:01:52] oh [21:03:02] btw, is there anything that could be used as a reference around? perhaps some source file with comments; i'd like to check what e.g. `function` is for [21:08:49] (s1... t1 -> s1... @ s2... (s2... -> s2... t1)) ← what does "@" stand for? [21:13:04] ah, i guess it's to combine parts of a stack [21:13:37] "s1... t1" means that there are some stack elements, called s1, and then t1, right? [21:14:41] In the old notation, "@" was "forall". [21:15:26] And yes, "s1... t1" (now "S1..., T1") has that meaning. [21:16:16] It's kind of a mess because the language has been changing for a while past what's on master, but there's nothing really usable outside of master. :/ [21:17:14] it might be nice to mention in the intro, seems to clarify things a bit. so, you consider typing over whole stacks, not just their top elements, right? [21:17:34] Right. [21:18:03] Yeah, I didn't get around to describing the type system in the intro...which is silly because it's like the differentiating feature of the language, haha [21:18:22] I am but one man. [21:18:51] yup, that's how i've found it. wondered how a statically typed concatenative language would look like. btw, might also be nice to link it from wiki: it only mentions Cat [21:19:01] s/wiki/wikipedia/ [21:19:38] in the article about concatenative languages, iirc [21:19:39] People have linked to it in the past. In fact there was a Wikipedia page (I don't know who made it) but it was removed as "not notable". [21:20:19] huh, that's strange. Cat seems to be even dead, but still there [21:20:34] slava got removed for not notable. even factor is sometimes flagged as not notable [21:20:44] Kitten is only semi-notable in the concatenative community because I come in here and ramble about it all the time. [21:23:10] cdiggins used to come around here [21:23:31] hello [21:24:32] hi suppi [21:24:49] I'm really very new to concatenative programming, I found kitten and really liked the site's design and the logo :) [21:24:53] so I came here [21:25:16] But i don't really know much about it or how to use it [21:27:19] i guess i'll clone, build and see what happens :) [21:27:33] * defanor just learned that there's a logo [21:27:47] is it intentional that the logo is a background image? [21:28:17] doesn't get shown in w3m, or even in graphical browsers with high contrast mode/color overriding enabled [21:29:14] it's also in the favicon ;) [21:37:55] I think it was intentional that the logo is a background image...but I don't know what I was thinking. [21:38:30] suppi: Be aware that the site & master are in sync, but out of date with the latest iteration of the language. [21:38:46] So take everything with a grain of salt. Maybe a couple teaspoons, actually. [21:39:11] evincar, any tip on how to approach it then? [21:39:13] I should quit apologising and just work on the blasted thing. :P [21:39:48] suppi: Hang out here, ask questions, yell at me to work on it? [21:40:04] evincar, hmmm, I'll try :) [21:40:21] maybe i'll try learning from reading the source. I've never done that before. [21:41:06] new branch, new folder? [21:42:06] suppi: Both. https://github.com/evincarofautumn/kitten/pull/152 [21:42:47] I might be able to get shitty-codegen done this weekend and put this on master. [21:42:53] quite some work. :) [21:43:19] But I make no promises because my girlfriend is in town. <3 [21:43:47] that's great :) [21:44:18] I think I'll start by reading /mini? [21:44:31] * bjz [bjz!~bjz@14-201-215-168.tpgi.com.au] has joined the channel. [21:44:35] Sure, that would give you an idea of how the typechecker works. [21:45:13] The (ad-hoc, unspecified) syntax of the mini-Kitten is different, and it handles local variables a bit differently (explicit move/copy). [21:45:52] I tried using the repl a bit. looks pretty interesting [21:59:10] * fuzzyhorns [fuzzyhorns!~fuzzyhorn@c-73-38-57-191.hsd1.ma.comcast.net] has joined the channel. [22:28:13] * fuzzyhorns [fuzzyhorns!~fuzzyhorn@c-73-38-57-191.hsd1.ma.comcast.net] has quit (Quit: Leaving.). [23:26:52] * rgrinberg [rgrinberg!~rgrinberg@hlfxns016cw-142134033086.dhcp-dynamic.FibreOp.ns.bellaliant.net] has joined the channel. [23:38:42] * evincar [evincar!~jonathanp@173-228-12-231.dsl.dynamic.fusionbroadband.com] has quit (Ping timeout: 260 seconds).