From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bakul Shah Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Date: Tue, 26 Jun 2018 14:03:37 -0700 References: <1529530542.3279707.1414877304.5B04A2FD@webmail.messagingengine.com> <1529594591.3616046.1415871392.7B6B65AC@webmail.messagingengine.com> <1529919198.1166425.1419218008.639C4326@webmail.messagingengine.com> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: <1529919198.1166425.1419218008.639C4326@webmail.messagingengine.com> Message-Id: Subject: Re: [9fans] What are you using Plan 9 for? Topicbox-Message-UUID: d8e3d0fe-ead9-11e9-9d60-3106f5b1d025 On Jun 25, 2018, at 2:33 AM, Ethan A. Gardener = wrote: >=20 > On Thu, Jun 21, 2018, at 7:03 PM, Bakul Shah wrote: >> On Jun 21, 2018, at 8:23 AM, Ethan A. Gardener = wrote: >>>=20 >>> Thanks! I don't know APL at all, beyond the fact that its need for a = graphical (or at least sophisticated) display held it back in the past. = I should probably look into it now, I'm sure it would save me from = making some mistakes in my design. >>=20 >> Languages j, k & q are ascii only. K is >> quite minimalist (compared to APL & j). >> I quite like Scheme, k and plan9 for >> their minimalist aesthetics. >=20 > I have briefly used q and pure, but I remember nothing practical about > them, only that pure is a verbose q. I've looked into APL a little > now, got an introduction from a 1975 video which was interesting and a > little amusing, and had a look at aiju's k pages -- I was talking about kx.com's array language q, which is a thin layer on top of k4 and it quite SQLish. Very different from the equational language Q or pure. > http://aiju.de/code/k/ . I think the idea of combining operators is > really cool, but I'm certain I'd get mixed up with both APL and k in > the same way I struggle with regexps. stream programming rc/sh style is a bit like array programming. In sh you'd write f < inputFile | g | h or f < inputFile | g | h > outputFile In an apl (array prog. lang.) such as k you'd write h g f inputArray or outputArray: h g f inputArray =09 Of course, a) there is no side channel of stderr for apls. b) apls have a lot of functions built in, while shells do not and rely on external programs. c) apls use variables where shells use external files. To operate on a number of files, in sh you'd have to do for x in a b c; do f $x | g | h ; done in k you'd use the each operator ('): {h g f x}'(a;b;c) A shell can only use pipes (byte streams) to connect functions (implemented as programs). In contrast apls have much richer data types and functions. An interesting experiment would be to try to combine the two models in one language.