5 ms·
Two disappointments I have with K/Q is that 1) functions that take multiple arguments break the pattern of concatenating functions to build advanced expression
by murbard2 11y ago
Two disappointments I have with K/Q is that
1) functions that take multiple arguments break the pattern of concatenating functions to build advanced expressions (yes, there is . but it's not nice to use)
2) the right to left evaluation means you constantly have to go back to the begin of the line to append functions
Both of these problems go away if you make it a stack based language with postfix notation.
- jboggan 11y agoI've been thinking about this a lot myself, these are my main problems with them as well. I've starting messing around with an unholy abomination that is taking the worst features of Ruby, Perl, and J* and making such a postfix language. I'm taking the rest of the year off to work on this so hopefully it yields something fun and stupid. * - I love the notation in J/K/APL but really want to see it written left to right, much like chaining together map/reduce/filter methods in Ruby with dot notation. I also want auto-vivification from Perl and the use of implicit variables for map/reduce/filter. I look forward to messing with Klong.
- PeCaN 11y agoWhat is it with J/Perl hybrids? My own inspirations for Vio[1] are J, Perl, and Factor. It's about as unreadable as you might expect. It borrows more from Perl's text processing capabilities than things like auto-vivification or implicit variables (well, all its variables are implicit, since it's a purely tacit/concatenative stack language). 1: https://github.com/alpha123/vio https://github.com/alpha123/vio
- PeCaN 11y agoCoincidentally, a stack-based concatenative array language is exactly what I'm working on right now. It combines all the readability of K with... all the readability of Forth. It's at https://github.com/alpha123/vio https://github.com/alpha123/vio if you're interested, but very much WIP. The VM is rather simple if you feel like poking around. Other notable features would be built-in parser combinators (with an unreadable postfix regex-like syntax). Concatenative parser combinators are pleasantly surprising to use.
- chc4 11y agoIt's be great if you had some examples to read through, or any documentation really. Even a minimal README. I'm interested in the idea, but without anything to go on it's pretty impossible to look at.
- PeCaN 11y agoYeah sorry, it's a week old and I pushed it to GitHub just so I could link to something in that comment ;) Something of a README is now up.
- Detrus 11y agoWhat problems go away if you use a non-text IDE like http://peaker.github.io/lamdu/ http://peaker.github.io/lamdu/ ?
- dakr 11y agoYou may enjoy lang5, which is a fusion of forth and APL. I find it a fun language to play with and it is easy to read (though not as terse as APL/J/k, of course). [home] http://lang5.sourceforge.net/tiki-index.php http://lang5.sourceforge.net/tiki-index.php [examples] http://lang5.sourceforge.net/tiki-index.php?page=About http://lang5.sourceforge.net/tiki-index.php?page=About