9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] What are you using Plan 9 for?
Date: Tue, 26 Jun 2018 14:03:37 -0700	[thread overview]
Message-ID: <D1CC7DE6-142F-4918-80F0-37E6862DDF67@bitblocks.com> (raw)
In-Reply-To: <1529919198.1166425.1419218008.639C4326@webmail.messagingengine.com>

On Jun 25, 2018, at 2:33 AM, Ethan A. Gardener <eekee57@fastmail.fm> wrote:
> 
> On Thu, Jun 21, 2018, at 7:03 PM, Bakul Shah wrote:
>> On Jun 21, 2018, at 8:23 AM, Ethan A. Gardener <eekee57@fastmail.fm> wrote:
>>> 
>>> 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.
>> 
>> 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.
> 
> 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
	
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.





  parent reply	other threads:[~2018-06-26 21:03 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11  6:14 刘宇宝
2018-06-12 14:57 ` 刘宇宝
2018-06-14  2:53 ` N. S. Montanaro
2018-06-14  3:53   ` 刘宇宝
2018-06-14  5:17     ` Lucio De Re
2018-06-14 21:12       ` hiro
2018-06-15  0:57         ` 刘宇宝
2018-06-15  2:24           ` N. S. Montanaro
2018-06-15 11:44           ` hiro
2018-06-16 13:39     ` Ole-Hjalmar Kristensen
2018-06-16 15:26       ` Jerome Ibanes
2018-06-21  9:06     ` Rui Carmo
2018-06-21  9:53       ` dexen deVries
     [not found]       ` <BJXPR01MB0277C36675F3F1EA52FC46EAD44B0@BJXPR01MB0277.CHNPR01.prod.partner.outlook.cn>
2018-06-26  3:24         ` 刘宇宝
2018-06-26  6:36           ` Tyga
2018-06-27 19:10             ` Ethan A. Gardener
2018-06-27 18:45           ` Ethan A. Gardener
2018-06-14  9:46 ` Tyga
2018-06-14 14:22   ` Steve Simon
2018-06-14 16:15     ` tlaronde
2018-06-14 17:23       ` hiro
2018-06-14 17:45     ` Daniel Camoles
2018-06-15  6:13       ` Mart Zirnask
2018-06-15 13:51         ` Lucio De Re
2018-06-15 14:26           ` hiro
2018-06-15 16:03             ` Mart Zirnask
2018-06-15 17:47             ` Lucio De Re
2018-06-15 19:02         ` Mark van Atten
2018-06-15 23:58           ` Iruatã Souza
2018-06-16  9:35             ` tlaronde
2018-06-18  8:35             ` Mark van Atten
2018-06-14 21:20   ` hiro
2018-06-20 21:35 ` Ethan A. Gardener
2018-06-21  3:58   ` Lucio De Re
2018-06-21  4:49     ` Bakul Shah
2018-06-21 16:02       ` Ethan A. Gardener
2018-06-21 15:23     ` Ethan A. Gardener
2018-06-21 18:03       ` Bakul Shah
2018-06-25  9:33         ` Ethan A. Gardener
2018-06-26  5:17           ` 刘宇宝
2018-06-27 19:01             ` Ethan A. Gardener
2018-06-26 21:03           ` Bakul Shah [this message]
2018-06-21  5:39   ` Kurt H Maier
2018-06-21 16:39     ` Ethan A. Gardener
2018-06-21 20:18     ` Skip Tavakkolian
2018-06-28  9:57       ` Richard Miller
2018-06-27  5:18     ` Iruatã Souza
2018-06-28  2:04       ` Tyga
2018-06-21  7:20   ` Mart Zirnask
2018-06-21 15:11     ` Ethan A. Gardener
2018-06-24  8:22       ` 刘宇宝
2018-06-15  8:16 cinap_lenrek
     [not found] <1740027127.295380.1529081094082.ref@mail.yahoo.com>
2018-06-15 16:44 ` Brian L. Stuart
2018-06-15 18:16   ` Mark van Atten
     [not found] <1401313358.335074.1529087916083.ref@mail.yahoo.com>
2018-06-15 18:38 ` Brian L. Stuart
     [not found] <135406475.3232013.1530116414782.ref@mail.yahoo.com>
2018-06-27 16:20 ` Brian L. Stuart
2018-06-28  2:06   ` Tyga
2018-06-28  7:22     ` Mart Zirnask
2018-06-28 18:47       ` Bakul Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D1CC7DE6-142F-4918-80F0-37E6862DDF67@bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).