unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Scheme in the browser: A Hoot of a tale
@ 2023-10-11 17:43 Christine Lemmer-Webber
  2023-10-11 20:24 ` Zelphir Kaltstahl
  0 siblings, 1 reply; 3+ messages in thread
From: Christine Lemmer-Webber @ 2023-10-11 17:43 UTC (permalink / raw)
  To: guile-user

Friends, Guilers, Schemers, I am thrilled, pleased, et cetera to present
you with the following: Guile Hoot can now compile real r7rs-small
programs to code that runs in latest nightly browsers:

  https://spritely.institute/news/scheme-wireworld-in-browser.html

You can try it yourself easily using Firefox or Chrome nightlies.
Guix users using the nonguix channel can give it a try like so:

  guix shell google-chrome-unstable -- google-chrome-unstable \
    https://spritely.institute/news/scheme-wireworld-in-browser.html

Now scroll down.  You'll pass some Scheme code (wow, it's so clear and
readable!), you'll see some examples of Dave Thompson developing this
against the developer WASM VM that Hoot ships with (wait say WHAT?! yes
more on this soon), and then you'll see, in all its glory, a Wireworld
canvas that you can modify and interact with yourself.

And wait... is this running the scheme code right above it?!?!  It sure
is.

We're doing it!  Scheme in the browser is now a REAL THING!  Not
compiling a VM, compiling the program directly to Webassembly, using the
browser's own GC, with tail call optimizations and all the things you
want.

Real. Scheme. In. The. Browser.
As a first class citizen!!!

The first release of Spritely's Hoot is coming soon.  Get hyped.  Get
HYPED!!!!

 - Christine

PS: In the meanwhile, if you're brave enough, you can try the whole
toolkit yourself, with the example in the blogpost... we've got a guix
shell file and a texinfo manual and everything:

  https://gitlab.com/spritely/guile-hoot



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Scheme in the browser: A Hoot of a tale
  2023-10-11 17:43 Scheme in the browser: A Hoot of a tale Christine Lemmer-Webber
@ 2023-10-11 20:24 ` Zelphir Kaltstahl
  2023-10-11 20:47   ` Christine Lemmer-Webber
  0 siblings, 1 reply; 3+ messages in thread
From: Zelphir Kaltstahl @ 2023-10-11 20:24 UTC (permalink / raw)
  To: Christine Lemmer-Webber; +Cc: Guile User

On 10/11/23 19:43, Christine Lemmer-Webber wrote:
> Friends, Guilers, Schemers, I am thrilled, pleased, et cetera to present
> you with the following: Guile Hoot can now compile real r7rs-small
> programs to code that runs in latest nightly browsers:
>
>    https://spritely.institute/news/scheme-wireworld-in-browser.html
>
> You can try it yourself easily using Firefox or Chrome nightlies.
> Guix users using the nonguix channel can give it a try like so:
>
>    guix shell google-chrome-unstable -- google-chrome-unstable \
>      https://spritely.institute/news/scheme-wireworld-in-browser.html
>
> Now scroll down.  You'll pass some Scheme code (wow, it's so clear and
> readable!), you'll see some examples of Dave Thompson developing this
> against the developer WASM VM that Hoot ships with (wait say WHAT?! yes
> more on this soon), and then you'll see, in all its glory, a Wireworld
> canvas that you can modify and interact with yourself.
>
> And wait... is this running the scheme code right above it?!?!  It sure
> is.
>
> We're doing it!  Scheme in the browser is now a REAL THING!  Not
> compiling a VM, compiling the program directly to Webassembly, using the
> browser's own GC, with tail call optimizations and all the things you
> want.
>
> Real. Scheme. In. The. Browser.
> As a first class citizen!!!
>
> The first release of Spritely's Hoot is coming soon.  Get hyped.  Get
> HYPED!!!!
>
>   - Christine
>
> PS: In the meanwhile, if you're brave enough, you can try the whole
> toolkit yourself, with the example in the blogpost... we've got a guix
> shell file and a texinfo manual and everything:
>
>    https://gitlab.com/spritely/guile-hoot

Hello Christine,

I saw a post earlier on Mastodon and already opened it in my browser. Haven't 
got the time to really look at it yet.

What is a Wireworld canvas? Is that a specific library, that interacts with 
canvas in the browser?

Can Guile Hoot be used to make interactive websites, or is it so far only for 
canvas?

Anyway, I think I need to play with this thing soon, and try some examples, as 
this sounds awesome!

Best regards, Zelphir

-- 
repositories:https://notabug.org/ZelphirKaltstahl


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Scheme in the browser: A Hoot of a tale
  2023-10-11 20:24 ` Zelphir Kaltstahl
@ 2023-10-11 20:47   ` Christine Lemmer-Webber
  0 siblings, 0 replies; 3+ messages in thread
From: Christine Lemmer-Webber @ 2023-10-11 20:47 UTC (permalink / raw)
  To: Zelphir Kaltstahl; +Cc: Guile User

Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:

> Hello Christine,

Hello Zelphir!

> I saw a post earlier on Mastodon and already opened it in my
> browser. Haven't got the time to really look at it yet.
>
> What is a Wireworld canvas? Is that a specific library, that interacts
> with canvas in the browser?

Ah!  Wireworld is just a kind of cellular automata (like Conway's Game
of Life) that we really like to use for showing off projects.  It
actually has nothing to do with Webassembly:

  http://www.quinapalus.com/wi-index.html

So what we're showing in the blogpost is an implementation of wireworld
where all the logic is happening in Scheme.  The rendering of that is
some custom Javascript.  You could expose more of the primitives to
Scheme and have more of the rendering happen in Scheme, but we decided
there were various reasons (including having most of the instructions
being familiar Scheme primitives including bytevector manipulation) to
have Scheme manipulate just the data part.

> Can Guile Hoot be used to make interactive websites, or is it so far
> only for canvas?

It can!  It'll become easier over time as more interfaces are exposed,
right now you have to wire up stuff manually via the FFI interface, but
you should be able to do anything you could do in Javascript in Scheme
instead using Hoot.

> Anyway, I think I need to play with this thing soon, and try some
> examples, as this sounds awesome!

Yay!  Let us know what you make!

> Best regards, Zelphir




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-11 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11 17:43 Scheme in the browser: A Hoot of a tale Christine Lemmer-Webber
2023-10-11 20:24 ` Zelphir Kaltstahl
2023-10-11 20:47   ` Christine Lemmer-Webber

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 read-only IMAP folder(s) and NNTP newsgroup(s).