Re: [stack] Advantages of cat, joy ..?
Robbert van Dalen <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
k and j is one of the few languages that really *forces* you to think differently. i know, i'm still trying to wrap my head around it :) that said, k's successor - q - is much more accessible. however, (re-)reading q code can be as daunting as (re-)reading k code, especially if the code is written by coding gurus like stevan :) k and j are termed to be 'array' languages. but the way i see it is that an array is a special, but very concrete case of a function. an array is a function that maps (a consecutive domain of) integers to anything (untyped). the function is *the*unifying concept that works in many wondrous ways in k. and i believe *that* is the real power of k. i feel stevan is right about factor. sure, factor does force you to think differently: the stack *does* that to you. but what really new concepts does factor bring to the table? for example, for factor to be efficiently compiled to a register based architecture, it must leave the stack model. it also feeds my suspicion that - if a language primitive can be compiled to x84 one-to-one - that language primitive is not far away from - say - a pascal primitive. but how does k stack up against pascal? i believe k is a magnitude different from pascal, because it puts collections *before* the scalars. and while k is interpreted, it beats heavily optimized (and compiled) pascal programs in many cases. so my guess is that collection based languages are the future. and i do hope that such collection oriented language is (optionally) strongly typed, and hopefully, written in postfix syntax :) that's it: postfix syntax is the most economic way to *syntactically* express computations. now match postfix with q and you might have to most economical language ever... in the end, the primitives make the difference .... are they scalar or ....? - robbert On Sun, Feb 22, 2009 at 4:11 PM, Stevan Apter <[email protected]> wrote: > syntax is as important to me as it is to the next guy, but other > characteristics of PLs matter more, chief among them being how > many new concepts i'm required to master before i can use the > language well. > > when i'm programming, all my thinking takes place within a very > simple framework: find a data representation for my problem, then > find the best set of functions which transform these representations > to solve my problem. r <- f[a;...;z]. iterate until done. > > as a k guy, two things about joy stood out immediately: (i) joy > is a scalar language, and (ii) the syntax is concatenative and > not applicative. but it turned out to be a simple matter to > enhance joy (actually, the false language) with the k primitives > (www.nsl.com/k//f/f.htm). ok, i had to think about "the stack", > but that was a small price to pay for the reduction in syntactic > complexity. > > factor is way too complicated for me. i gave up early on. i > really don't want to think about the internals of the implementation > when i'm coding. the ONLY thing i want floating around in my head > in addition to the problem i'm working on is at most 20 or 30 purely > functional primitives, and ideally these should be divided into a > few classes of a few members each. (granted, i haven't kept up > with factor development, so things might have gotten simpler, but > that's not the direction things seemed to be taking a few years > ago.) > > typing is another language feature i don't want to think about. > i was discouraged from learning haskell because half the messages > posted in their newsgroup involved some typing conundrum. the last > thing i need is to get stopped in my tracks by one of these. don't > get me wrong. the problems john and christopher are working on > interest me, but there's no way i would ever use a language in > my day job which required this extra level of attention. i guess > the easiest way to put it is that i don't want my programs to > fail in more than five or six ways. > > oddly enough, the only language proposed in this forum i can > imagine using is enchilada, and that's mainly for two reasons: > (i) i've seen robbert use the language to solve hard problems > very easily, and (ii) whenever i tried to learn it, my brain > exploded. those facts indicate to me that there are some > powerful new ideas (but very simple ones) going on in that > language. (i had the same experience reading john conway's > book on surreal numbers many years ago.) > > now billy, who's a very creative thinker, has reported similar > problems with j and k, so this might be (it probably is) entirely > a matter of thinking-style, or maybe a function of what languages > you learned first and used most. > > ----- Original Message ----- > From: "John Nowak" <[email protected] <john%40johnnowak.com>> > To: <[email protected] <concatenative%40yahoogroups.com>> > Sent: Saturday, February 21, 2009 4:49 AM > Subject: Re: [stack] Advantages of cat, joy ..? > > > > > On Feb 20, 2009, at 1:00 PM, Joe Bowbeer wrote: > > > >> As the old saying goes: in matters of taste, there's no argument. > > > > True, but I don't think syntax is a "matter of taste" the same way raw > > eel is. Different syntaxes have different qualities. For example, > > Scheme has a syntax that is well-suited to meta-programming and > > structural editing. Joy's syntax makes algebraic manipulation very > > easy. Such qualities aren't subjective or matters of taste. > > > > Of course, some elements of syntax are subjective. My concern though > > is that it's too easy to throw out objectively useful things because > > someone said "ewww" upon first seeing them. > > > > - John > > > > > [Non-text portions of this message have been removed]