9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Ethan A. Gardener" <eekee57@fastmail.fm>
To: 9fans@9fans.net
Subject: Re: [9fans] What are you using Plan 9 for?
Date: Mon, 25 Jun 2018 10:33:18 +0100	[thread overview]
Message-ID: <1529919198.1166425.1419218008.639C4326@webmail.messagingengine.com> (raw)
In-Reply-To: <F3478EAA-C259-4766-9E96-E4003455D0A4@bitblocks.com>

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 --
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.  Pure would be better, but I
haven't heard mention of it since that one time I tried it.  This
amuses me because its documentation stated in true Gnu style, "q is
unmaintained, new projects should use pure."

I picked up an idea from microapl.com, workspaces.  Saving system
state is one of my goals for my OS, and the concept of workspaces
pertaining to separate tasks keeps popping up when I get ideas.  For
those who don't know, it's this:

Quoting from http://www.microapl.com/apl/introduction_chapter1.html
> In addition, it has a very useful concept called the
> workspace.  This is basically a collection of the data
> items, functions, and classes which you set up in the course
> of doing a particular job.
> 
> The workspace is in computer memory while you work, making
> everything you want immediately accessible.  It can be saved
> (i.e.  copied on to a disc) in its entirety when you stop,
> and loaded back into memory next time you want to use it.

I'm finding other relevant ideas in that introduction, too.


> 
> Arthur Whitney, k’s designer, had told
> me he was making it run on bare metal.
> He was muttering about how Linux just
> gets in the way! Though I don’t know if
> he actually did that.

Bare metal dreams!  I have similar ambitions for my Forth OS, of
course.  :) This is where things like OpenFirmware are good, because
you get a bunch of drivers for free.  They may not offer the highest
performance, but when developing an OS on your own, I'm sure they'd
save a lot of time and frustration.  And you may get things which
might be last on your list to implement, like the webcam in an OLPC.

> 
> Another crazy bare metal tale: A few
> years before Eben Upton came up with
> Raspberry Pi, he had ported cpython to
> run on the videocore on a GPU only
> chip (bcm2707) using custom software
> hackery. Using python like BASIC is a great idea!

Wild!  :) It's better than, but reminds me of the time I compiled
Python to run alone on the Linux kernel.  I was lazy, I didn't want to
reimplement utilities like mount, and so I left it.  Now, I think I
should have pushed myself to implement those and a text editor too.
It would have boosted my skills over a decade ago.

> 
> Personally I’d prefer something like k, Scheme, python or lua (and not 
> forth) to boot into. I am admire forth but I’m
> not a fan of *programming* in stack languages!

Python and Tcl were on my list for my OS. I don't recall thinking of
lisps except elisp for some reason.  Anyway, I had high hopes for
Forth's sequential nature.  It is quite good, especially for the wide
range of tasks I want to apply it to; the syntax is so flexible!  As I
said, I have trouble with regexps, and printf isn't far behind.
Here's example usage for a sprintf-like system from Swift Forth:

    <%  S" This is a test " %s  DPL @ %d  S"  finally" %s %cr %>

Literal strings, variable references, and escapes go in their logical
order.  There's no need for escapes to be just one character.  These
are features I want.  As I write this, I realize that this all could
be done in other languages with minor syntax variations.  I can
imagine it in Python as a tuple containing literal strings and the
names of members of a class.  In Lisp, a list with strings and
symbols.  (Do symbols work the same way in Scheme?) I'm thinking it
over, but I may stick with Forth for other reasons.  I haven't ruled
out implementing some of my project in another language to see how it
compares.

Other reasons I like Forth are its efficiency (relative to Python and
maybe Lisp), the fact that very low level work is natural, and
especially the great simplicity of Forth interpreters.  The stack can
be a bit of a pain, but not as much as I expected, and it's what
enables that flexible syntax.  It helps to break code up into very
small definitions, although it's not always obvious how to break it
up.  Also, in other languages I sometimes find myself fighting some
aspect of the language; the language itself gets in the way.  I can't
see that happening with Forth, it doesn't have the same constraints.
(Some Forth document made the same point.) The idea seems to be:
instead of constraints, test every little part.  A REPL makes that
reasonable.

Forth also taught me how to think better; some improvements I'd failed
to pick up in any amount of Python or C, but that's probably just me.

-- 
The lyf so short, the craft so long to lerne. -- Chaucer



  reply	other threads:[~2018-06-25  9:33 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 [this message]
2018-06-26  5:17           ` 刘宇宝
2018-06-27 19:01             ` Ethan A. Gardener
2018-06-26 21:03           ` Bakul Shah
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=1529919198.1166425.1419218008.639C4326@webmail.messagingengine.com \
    --to=eekee57@fastmail.fm \
    --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).