From: Bakul Shah <bakul@iitbombay.org>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] plan 9 and lisp
Date: Fri, 20 Jan 2023 11:45:27 -0800 [thread overview]
Message-ID: <C271A325-504E-40C8-B3DC-7DDF04A88AA3@iitbombay.org> (raw)
In-Reply-To: <CAJSxfmKju-BjGBDhwv5nmkvO3ZdGsbTgyr_WeqbA9c49VVtB8g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2579 bytes --]
Thanks!
Nick Nickolov's k comes with solutions to ~150 AoC-{2015..2022} puzzles. All run when you make k! As an example, here is aoc/21/25.k (Game of Sea Cucumbers, which Russ vlogged about):
#!../../k
n:#'1*:\x:".>v"?0:"i/25"
(l;d;r;u):n/'n!'/:(!n)+/:3(|1 -1*)\!2 /left down right up
i:0;{i+:1;x:a[r]+x*~a:(1=x)>x l;(2*a d)+x*~a:(2=x)>x u}/,/x;i
[Of course, the real fun is in solving these puzzles but it helps to know what others do!]
Unfortunately no plan9 port as it relies on mmap.
https://codeberg.org/ngn/k
https://xpqz.github.io/kbook/Introduction.html
https://github.com/razetime/ngn-k-tutorial
It is also one of the fastest (~0.5 sec to generate and add a billion numbers on a Ryzen 2700).
> On Jan 19, 2023, at 9:07 AM, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
>
> 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 <bakul@iitbombay.org> wrote:
>>
>> On Jan 19, 2023, at 7:57 AM, mkf9 <mkf9@riseup.net> 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-M28a9059decf39a3bacc5e4c6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
[-- Attachment #2: Type: text/html, Size: 4477 bytes --]
next prev parent reply other threads:[~2023-01-20 19:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 7:09 fig
2023-01-19 11:22 ` Lassi Kortela
2023-01-19 15:28 ` ori
2023-01-19 18:26 ` Csepp
2023-01-19 18:33 ` Jacob Moody
2023-01-19 15:57 ` mkf9
2023-01-19 15:47 ` Bakul Shah
2023-01-19 16:01 ` Dan Cross
2023-01-19 16:13 ` Bakul Shah
2023-01-19 17:07 ` Skip Tavakkolian
2023-01-20 19:45 ` Bakul Shah [this message]
2023-01-23 11:31 ` Nick LaForge
2023-01-23 11:45 ` Lassi Kortela
2023-01-25 14:12 ` Ahmed Khaled
2023-01-26 19:34 ` Skip Tavakkolian
2023-01-25 22:59 ` Bakul Shah
2023-01-26 7:18 ` Lassi Kortela
2023-01-26 18:18 ` Tony Mendoza
2023-01-19 11:29 ` Edward Partenie
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=C271A325-504E-40C8-B3DC-7DDF04A88AA3@iitbombay.org \
--to=bakul@iitbombay.org \
--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).