Re: [9fans] plan 9 and lisp

2023-01-19 Thread Edward Partenie
I love it for the same reasons. Small set of small but powerful and
far-reaching abstractions, which all compose well together. That’s good
design!

On Thu, 19 Jan 2023 at 9:09 AM fig  wrote:

> i’m wondering what 9fans think about lisp, specifically scheme. they’re
> both the powerful synthesis of simple ideas. i don’t see any mention of it
> as it compares to 9, but they don’t seem incompatible. personally i think
> they compliment each other in nice ways.
>
> i don’t have any interest in emacs, i don’t even know what it is. nor
> clojure or any of that. i’m talking about lisp being able to manipulate the
> structure of the program with tools that are built into the language.
> learned about it today.
> *9fans * / 9fans / see discussions
>  + participants
>  + delivery options
>  Permalink
> 
>

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-M1c93c4e6b57431f2f3298bab
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread Lassi Kortela

i’m wondering what 9fans think about lisp, specifically scheme.


Cat-v.org has given a nod to Scheme.

Chibi-Scheme has run on Plan 9.

A useful Scheme interpreter can be written in about 10k lines of clear C 
code.


they’re both the powerful synthesis of simple ideas. i don’t see any 
mention of it as it compares to 9, but they don’t seem incompatible. 
personally i think they compliment each other in nice ways.


Plan 9 uses files as the organizing metaphor. Lisp uses objects. 
(Lispers don't care too much about organizing objects into class 
hierarchies; we care about them in the Smalltalk sense, "something you 
can call to do a job". Every function is an object in Lisp.)


https://github.com/mntmn/interim is a hobby OS that tries to combine the 
two. I haven't looked at it in detail but the idea may be "too much of a 
good thing": the two metaphors cover some of the same ground, so there 
is redundancy between them. The Lisp instinct is to represent system 
services as objects, not files.


i don’t have any interest in emacs, i don’t even know what it is. nor 
clojure or any of that.


Emacs = A very imperfect Lisp machine emulator written in C. The code 
written for Emacs mostly deals with text editing, but the Lisp system is 
actually broad enough for general-purpose programming.


Clojure = Java. That may be all 9fans want to know :-)

i’m talking about lisp being able to manipulate the structure of the 
program with tools that are built into the language.
Lisp tends to focus on macros and other S-expression transformations, 
i.e. metaprogramming at as a batch job (at compile time, etc.)


Smalltalk focuses on reflection, i.e. metaprogramming at run time.

Same idea, but Smalltalk is much more dynamic. Most Lisp systems can do 
a lot of runtime reflection but it's not customary to reach for it as 
the first tool of choice. This is more of a cultural matter than a 
technical issue, though culture determines which aspects of the 
implementations are the most polished and comprehensive.


Scheme tends to be less dynamic than Lisp generally. This is also a 
matter of culture, not an intrinsic technical issue. Schemers constantly 
talk about efficiency.


Almost all Lisp dialects use dynamic typing. Almost all Lisp 
implementations (of any dialect) support interactive development, and 
this is the normal way to write Lisp.


Other languages known for metaprogramming: Forth, Rebol.


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-M686c85cafb595890bbb47f8d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Script to apply Edit commands in acme

2023-01-19 Thread revrari
Great tips. Thank you. 
--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Taf408751bc6fb344-M6ae700b031c62aa50ebf7c05
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread mkf9

Lassi Kortela wrote:

Chibi-Scheme has run on Plan 9.

and also S9, which Bakul Shah ported to Plan 9,
https://github.com/bakul/s9fes.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-M8e6f301616f2c99598d95055
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread Csepp


o...@eigenstate.org writes:

> Quoth Lassi Kortela :
>> > i’m wondering what 9fans think about lisp, specifically scheme.
>> 
>> Chibi-Scheme has run on Plan 9.
>> 
> 
> And more recently, Janet:
> 
> https://git.sr.ht/~pixelherodev/janet
> 

In that vein, you can also use one of the Lua packages/ports with Fennel.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-M865a5ed9d146a2835062a8a5
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread Jacob Moody
On 1/19/23 11:26, Csepp wrote:
> 
> o...@eigenstate.org writes:
> 
>> Quoth Lassi Kortela :
 i’m wondering what 9fans think about lisp, specifically scheme.
>>>
>>> Chibi-Scheme has run on Plan 9.
>>>
>>
>> And more recently, Janet:
>>
>> https://git.sr.ht/~pixelherodev/janet
>>
> 
> In that vein, you can also use one of the Lua packages/ports with Fennel.
> 

Might also be worth mentioning here as well, but I did some work to get
a variant of clojure written in go running under 9front. As far as I know
it should still work.

https://github.com/candid82/joker


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-M11a31c36f061c0d668f9f4be
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread Skip Tavakkolian
Regarding Ivy, rsc has some fantastic example code in the form of
solutions to the Advent of Code 2021 puzzles:
https://www.youtube.com/@rscgolang/videos

On Thu, Jan 19, 2023 at 7:48 AM Bakul Shah  wrote:
>
> On Jan 19, 2023, at 7:57 AM, mkf9  wrote:
> >
> > Lassi Kortela wrote:
> >> Chibi-Scheme has run on Plan 9.
> > and also S9, which Bakul Shah ported to Plan 9,
> > https://github.com/bakul/s9fes.
>
> Nils M Holm, the author of s9fes, did the original
> port with some help from me. He didn't want to
> maintain plan9 related changes which is why I am
> maintaining it. Nils also has a book on it but
> AFAIK it doesn't cover anything specific to plan9.
>
> Speaking of little languages
> Nils also ported his klong array programming language
> to plan9 & has a book on it! Slightly more verbose
> than k (roughly k3 from kx.com)
>
> Then there is https://github.com/ktye/i which supports
> a dialect of k. Not sure which, probably k6 or k7. And
> there is minimal help in the form of readme.txt but it
> compiles & runs on 9front:
>
> % git/clone https://github.com/ktye/i
> % git/clone https://github.com/ktye/wg
> % cd i
> % go build '-buildvcs=false'
> % ./k
> ktye/k
> !10
> 0 1 2 3 4 5 6 7 8 9
> +\!10
> 0 1 3 6 10 15 21 28 36 45
> d:`a`b`c!(1 2;3 4;5 6)
> d
> `a|1 2
> `b|3 4
> `c|5 6
> +d
> a b c
> -
> 1 3 5
> 2 4 6
> \\
> 
> There is of course Rob Pike's ivy.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-Mfc5857d5dc8b7c9e5c3f2194
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread ori
Quoth Lassi Kortela :
> > i’m wondering what 9fans think about lisp, specifically scheme.
> 
> Chibi-Scheme has run on Plan 9.
> 

And more recently, Janet:

https://git.sr.ht/~pixelherodev/janet


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-M5a67c34ffb0272ba0a95b097
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread Dan Cross
On Thu, Jan 19, 2023 at 10:48 AM Bakul Shah  wrote:
>[snip]
> Nils M Holm, the author of s9fes, did the original
> port with some help from me. He didn't want to
> maintain plan9 related changes which is why I am
> maintaining it. Nils also has a book on it but
> AFAIK it doesn't cover anything specific to plan9.

I thought that Ozan Yigit had done a small scheme that ran on plan9 at
one point, but I can't find a pointer to it on his page at York at the
moment. Maybe I'm misremembering, but I definitely remember running a
scheme repl under rio, which was actually quite pleasant. Someone
(Russ?) had also ported mosml, which is also interesting to play
around with.

- Dan C.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-M8a312f570b9303bd42f95aa2
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread Bakul Shah
On Jan 19, 2023, at 7:57 AM, mkf9  wrote:
> 
> Lassi Kortela wrote:
>> Chibi-Scheme has run on Plan 9.
> and also S9, which Bakul Shah ported to Plan 9,
> https://github.com/bakul/s9fes.

Nils M Holm, the author of s9fes, did the original
port with some help from me. He didn't want to
maintain plan9 related changes which is why I am
maintaining it. Nils also has a book on it but
AFAIK it doesn't cover anything specific to plan9.

Speaking of little languages
Nils also ported his klong array programming language
to plan9 & has a book on it! Slightly more verbose
than k (roughly k3 from kx.com)

Then there is https://github.com/ktye/i which supports
a dialect of k. Not sure which, probably k6 or k7. And
there is minimal help in the form of readme.txt but it
compiles & runs on 9front:

% git/clone https://github.com/ktye/i
% git/clone https://github.com/ktye/wg
% cd i
% go build '-buildvcs=false'
% ./k
ktye/k
!10
0 1 2 3 4 5 6 7 8 9
+\!10
0 1 3 6 10 15 21 28 36 45
d:`a`b`c!(1 2;3 4;5 6)
d
`a|1 2
`b|3 4
`c|5 6
+d
a b c
-
1 3 5
2 4 6
\\

There is of course Rob Pike's ivy.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-Ma405fc042ed723067725c40e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan 9 and lisp

2023-01-19 Thread Bakul Shah



> On Jan 19, 2023, at 8:01 AM, Dan Cross  wrote:
> 
> On Thu, Jan 19, 2023 at 10:48 AM Bakul Shah  wrote:
>> [snip]
>> Nils M Holm, the author of s9fes, did the original
>> port with some help from me. He didn't want to
>> maintain plan9 related changes which is why I am
>> maintaining it. Nils also has a book on it but
>> AFAIK it doesn't cover anything specific to plan9.
> 
> I thought that Ozan Yigit had done a small scheme that ran on plan9 at
> one point, but I can't find a pointer to it on his page at York at the
> moment. Maybe I'm misremembering, but I definitely remember running a
> scheme repl under rio, which was actually quite pleasant. Someone
> (Russ?) had also ported mosml, which is also interesting to play
> around with.

Ozan did Portable Scheme Interpreter (psi). I had it running on
some BSD in mid '90s.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T7b0afbefb53189b6-M6d073270593ca2d9516d06c5
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Script to apply Edit commands in acme

2023-01-19 Thread Ben Hancock
(Re-posting this message as earlier send appeared to fail; apologies for
any duplication.)

revr...@mweb.co.za writes:
> In sam I can create a script file consisting of a list of edit
> commands to apply to the document. [...] I would like to know if such
> a script would require the regular #!/bin/rc heading, and how it
> would be invoked from within acme.

The paradigm is much the same in acme. As noted earlier, the shebang
just determines which shell the script will run in; you can choose
any shell, or use any executable. You'll just want to make sure that
the script is in your $PATH.

For example, you could create this as $HOME/bin/lstrip:

#! /bin/sh
ssam 'x/^ +?/d'

Make it executable, then write some text in acme:

This is
  some text
that will be cleaned

If you select this text, type "|lstrip" in the tag (without the quotes),
and Button-2 (middle click) it, you will get the desired effect:

This is
some text
that will be cleaned

To operate on the entire window, type "Edit ,|lstrip" and execute that
with B2. By the way, as for your other example of cleaning whitespace at
the end of a newline (Edit ,x/ +$/d), acme does this by default on Put.

The other way you might approach this is just to keep a text file of
commonly used commands around. Then you can select the command you want,
and mouse-chord B2-B1 on "Edit" in the tag of the desired window to
execute that command.

  - Ben

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Taf408751bc6fb344-Mab8c70f37dc76a709197b202
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Script to apply Edit commands in acme

2023-01-19 Thread igor
Quoth Ben Hancock :
[…]
> By the way, […] cleaning whitespace at the end of a newline
> (Edit ,x/ +$/d), acme does this by default on Put.
[…]

Minor correction: There exist ACME patches accomplishing the above.
Howbeit, ACME does not strip trailing whitespace on Put by default.


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Taf408751bc6fb344-M7878a439846f17b1a1d8594b
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription