[01:44:10] * jtimon [jtimon!~quassel@117.29.134.37.dynamic.jazztel.es] has quit (Ping timeout: 240 seconds). [02:30:57] @tri3?[`@ws `@xs `@ys `@zs ws.. ~v ~w ~x [ws.. v w x => xs..] [xs.. v w x => ys..] [ys.. v w x => zs..] => zs..]: #v#w#x#f#g#h v w x f# v w x g# v w x h# [02:34:40] kernelj: Do you like APL? If so, you might find company in #proglangdesign [03:38:03] hackerfoo: thanks I didn't know that channel existed [03:38:24] but yeah my language is very full of sigils [03:38:37] mainly because it has NO keywords [03:38:59] I just wrote this in Cat [03:39:05] define multi(x fs) { fs empty [pop] [uncons [x swap multi] dip x swap apply] if } [03:39:44] written in Starpial as @multi?[TODO]: #v#l l each[#f v f#] [03:40:52] the dodgyness that is Cat gives a type of ('A 'b list -> 'A) [03:41:48] >> 10 [[2 +] [2 *] [2 /]] list multi [03:41:49] stack: 12 20 5 [03:42:14] #proglangdesign is pretty active. I fall about halfway in the names vs. symbols debate. [03:42:45] I'm really a bit annoyed about Cat giving invalid types [03:42:55] I don't know how it qualifies as statically typed [03:43:17] Keysymbols? aren't much different from keywords. [03:43:38] the difference is that you can remap any word to anything [03:43:59] I have to define true as 0 0 = because there's no keyword for it [03:44:10] You could do that just by say, requiring an underscore before keywords. [03:44:21] ew [03:50:08] I think maybe I need to ban use of 'apply' in the land of types [03:52:28] but then you might want type level functions, so it's confusing [03:54:05] there's no equivalent in regular dependent types to draw on [03:54:36] maybe I need both quotation types [ => ] and quotations [ ] [03:54:56] and you can only call the latter [04:04:30] or of course functions taken in dependently [04:21:34] sweet, quotations that return quotation types [04:42:45] * MDude [MDude!~MDude@c-73-187-225-46.hsd1.pa.comcast.net] has joined the channel. [04:58:27] @multi?[`@zss?{{`@*}+} head(zss) ~v {drop(zss) tail(zss)} zipwith[#xs#ys [xs.. v => ys..]] => top(zss)]: #v#l l each[#f v f#] [04:59:23] @multi?[`@zss?{{`@*}+} head(zss) ~v {drop(zss) tail(zss)} zipwith[#xs#ys [xs.. v => ys..]] => top(zss)]: #v#l l each[#f v f#] [04:59:53] @multi?[`@zss?{{`@*}+} head(zss).. ~v {drop(zss) tail(zss)} zipwith[#xs#ys [xs.. v => ys..]] => top(zss)..]: #v#l l each[#f v f#] [05:00:26] I think that's it! [05:03:20] basically writing a program to build the type of the quotations for all the functions [05:35:40] @curryn?[`@xs `@ys @vs{n times:`@} xs.. vs.. [xs.. vs.. => ys..] #n?uint => [xs.. => ys..]]: times[curry] [06:01:03] * FreeFull [FreeFull!~freefull@defocus/sausage-lover] has quit. [06:34:16] heh, found a bug in my 'elif' from trying to type it [06:36:13] also found a proper valid use for 'swap' [06:51:22] this is great stuff http://dpaste.com/1XTHKYF [07:08:46] * dustinm`_ [dustinm`_!~dustinm@68.ip-149-56-14.net] has quit (Read error: Connection reset by peer). [07:15:13] * dustinm` [dustinm`!~dustinm@68.ip-149-56-14.net] has joined the channel. [08:18:08] * proteusguy [proteusguy!~proteus-g@49.228.118.146] has quit (Remote host closed the connection). [09:15:12] * jtimon [jtimon!~quassel@117.29.134.37.dynamic.jazztel.es] has joined the channel. [10:21:28] * mollerse [mollerse!~mollerse@188.226.247.139] has joined the channel. [12:00:28] * rudha [rudha!~rudha@p200300760E7BD9F2D9990A6A2BABF150.dip0.t-ipconnect.de] has quit (Quit: Leaving). [15:17:59] * Sgeo [Sgeo!~Sgeo@ool-18e4354b.dyn.optonline.net] has quit (Ping timeout: 268 seconds). [15:30:07] * Sgeo [Sgeo!~Sgeo@ool-18e4354b.dyn.optonline.net] has joined the channel. [15:33:37] * Sgeo_ [Sgeo_!~Sgeo@ool-18e4354b.dyn.optonline.net] has joined the channel. [15:34:22] * Sgeo [Sgeo!~Sgeo@ool-18e4354b.dyn.optonline.net] has quit (Ping timeout: 246 seconds). [16:19:21] * FreeFull [FreeFull!~freefull@defocus/sausage-lover] has joined the channel. [16:27:25] don't suppose anyone here is available to help me fix the unification in Cat? [17:38:00] Why? Is Cat maintained anymore? [17:50:22] I want to fix it because it's almost useful [17:50:39] and no I don't think it's maintained [17:50:51] used to be on Google Code [17:51:46] hackerfoo: if you know of a better statically typed non-weird stack language with sequence unification then let me know... [17:54:13] Kitten is statically typed [17:55:06] I know but it's weird [17:55:33] Less weird than mine :) [17:55:54] the lack of docs annoys me [17:56:01] It does row unification, I believe [17:56:19] evincar is the author [17:57:18] I guess I should try it but it would be nice if Cat worked [17:57:34] supposedly 1.0 beta 4 [17:58:09] are there any other statically typed ones or is that it? [18:00:52] None that I know of, not with Hindley-Milner style type inference, at least. [18:01:17] There aren't a lot of concatenative languages that are active. [18:01:28] ok well if Kitten doesn't come up with b0rked types then maybe I'll be happy [18:01:39] this channel used to be quite busy a few years back [18:01:50] mostly Factor people though [18:02:06] I remember I was trying to run on a machine without SSE2 [18:02:25] and they told me how to bootstrap it so I could run Factor [18:04:21] damn, Kitten has the : for Python style indented block just like Starpial does :P [18:05:21] I used to have something like the \word style of quoting but I got rid of it [18:05:42] having to write [word] isn't exactly a big deal, one extra character [18:06:38] hm, non polymorphic * like in OCaml :/ [18:07:49] I still haven't came up with a way to add ADTs to Starpial yet, that's quite high up on the TODO list [18:11:11] meh I'm gonna finish typing my prelude in the new super-awesome type system I came up with [18:29:37] If you're interested in working on Kitten, evincar is looking for contributors. [18:30:02] hm might be interesting [18:32:18] hrm what to do about partial functions [18:32:35] I've got 'indexof' which finds the position of an element in a list [18:32:53] if it's not there it results in a match failure as if looking in an empty list [18:34:59] Idris seems to use partial functions, it just doesn't allow them to be used in types... [18:35:36] I guess generating exceptions in type land isn't good [18:41:33] or maybe it is I'm not sure yet [18:42:05] now non-terminating functions that's bad, so if it's partial in that sense then sure, don't evaluate it [18:42:31] My approach is similar to Icon, but takes it further in that failure can't be handled: https://en.wikipedia.org/wiki/Icon_(programming_language) [18:45:04] the thing is match exceptions and handlers in Starpial are fairly core to how case matching works [18:45:06] So "[] head" fails and "[] head 1 |" --> 1 [18:46:27] yea you just kill the execution path [18:46:39] that's pretty much how it's supposed to work in starpial too [18:47:25] I should've read what you said before talking probably [18:48:01] * jtimon [jtimon!~quassel@117.29.134.37.dynamic.jazztel.es] has quit (Ping timeout: 255 seconds). [18:48:12] The key is, you can't have something like Icon's "if". [18:48:21] hackerfoo: what does "[] head" produce on the stack that you can use | on it? [18:48:35] It doesn't [18:48:47] is | not a binary operator? [18:49:16] Okay, I guess there's not really a stack either. [18:49:27] Hold on [18:49:42] in starpial I used to have this concept called exception stacks but I got rid of that completely [18:51:00] It's explained in detail here: http://hackerfoo.com/posts/poprc-runtime-operation-part4.html [18:52:20] But essentially, every value can have and "alt" which points to the next reduction node to try, and nodes can be marked as a failure. Failure propagates similar to floating point NaNs. [18:52:49] yeah that's pretty much what my exception stacks did [18:53:02] I can't remember why I got rid of it off the top of my head... hmmm [18:53:35] it was maybe something to do with arity [18:53:40] Slide 37 here shows how graphs are split, which happens when something takes an argument that has an alt: http://hackerfoo.com/presentations/ttpl_slides.html [18:55:26] So every value can be thought of as being a set, except values in one set can be related to others through alt_sets, so that "1 2 | dup" doesn't produce something like "1 2" or "2 1". [18:56:26] This is the source of the 1/2 bits limitation for alt paths, because alt_sets are present in every node, and operations on them must be fast. [18:57:56] what is alt_set [18:58:25] it's not obvious how the two chains are related [18:59:02] how do you know the chains are the same length / do they have to be? [18:59:10] It basically a ternary valued bit set. [18:59:59] You can think of it as unification on a bit set, each bit can be 0, 1, or unset, and unifying them does what you'd expect. [19:00:55] Each time a | is encountered, a fresh bit is assigned such that it is 0 on the first path and 1 on the second, so the two can never mix. [19:02:24] 2 2 [+] [*] | apply <<< this maintains two separate values of 4? [19:10:41] anyway yeah I can see where the 16 alternations restriction comes from now [19:20:37] hackerfoo: I'm guessing your 'failure' values depend on you knowing the arity of the functions you're using to spread them? [19:21:03] like if you have arity input 2 output 3 and one of the inputs is failure then you get 3 failures as output? [19:25:45] I think the reason I removed the exception value/stack thing is because I added rollback semantics [19:36:13] * jtimon [jtimon!~quassel@117.29.134.37.dynamic.jazztel.es] has joined the channel. [19:37:35] y'know what I think I should scrap the weird way I'm using match exceptions and make them unhandlable like yours [19:40:26] oh right yeah I wanted it so the match exception handler only executes in the case that the failed quotation did fail [19:43:29] yeah I think it would be better to just have non-determinism and only allow side effects when there's only one path or all paths are doing the same side effect [19:49:20] * lonjil [lonjil!~quassel@2a02:418:6050:ed15:ed15:ed15:e741:32d6] has joined the channel. [19:57:43] I only really seem to use it for case matching, maybe should just weaken it [20:17:14] kernelj: Yeah, two values of 4 [20:22:42] I use a unique IO token for sequencing IO, but I think I'm going to have to rely on static analysis to ensure that an IO operation can't split. [20:23:09] Which is pretty obvious in the bytecode. [22:36:53] * flogbot [flogbot!~flogbot@2001:4800:7814:0:2804:b05a:ff04:4ba7] has quit (Ping timeout: 246 seconds). [22:37:01] * flogbot [flogbot!~flogbot@2001:4800:7814:0:2804:b05a:ff04:4ba7] has joined the channel. [22:37:01] :kornbluth.freenode.net 353 flogbot = #concatenative :flogbot lonjil jtimon FreeFull Sgeo_ mollerse dustinm` MDude kernelj rotty rgrinberg puckipedia otoburb shmibs PiDelport bmp jeremyheiler kanzure strmpnk hackerfoo m_hackerfoo diginet doublec groovy2shoes ephe_meral jeaye rjungemann merry koisoke erg shachaf earl_ carvite flout [22:37:01] :kornbluth.freenode.net 366 flogbot #concatenative :End of /NAMES list.