unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* GuileScript 0.0.0 released
@ 2022-01-18  6:10 Aleix Conchillo Flaqué
  2022-01-18  6:21 ` Jacob Hrbek
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Aleix Conchillo Flaqué @ 2022-01-18  6:10 UTC (permalink / raw)
  To: guile-user

Hi,

I'm excited to announce GuileScript 0.0.0. GuileScript aims to be a Guile
to JavaScript compiler. It currently doesn't do much but there are some
working examples like fibonacci, binary search and reversing a vector. I
don't know where I want to take this or if it will go somewhere, but at
least it was fun to dig into Guile's compiler tower (for now only Tree-IL).

During the holidays I saw this tweet (
https://twitter.com/zaneshelby/status/1477988369154121734?s=20) about
ClojureScript and I thought it would be cool to do the same with Guile, so
I had to start somewhere. I'm still planning to at least try to get
something like that working, we'll see.

Anyways, here it is:

https://github.com/aconchillo/guilescript

Comments, suggestions, patches and full rewrites are welcomed. :-)

Happy hacking!

Aleix


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

* Re: GuileScript 0.0.0 released
  2022-01-18  6:10 GuileScript 0.0.0 released Aleix Conchillo Flaqué
@ 2022-01-18  6:21 ` Jacob Hrbek
  2022-01-18  6:26   ` Aleix Conchillo Flaqué
  2022-01-18  8:07 ` Daniel Meißner
  2022-01-18  9:05 ` Dr. Arne Babenhauserheide
  2 siblings, 1 reply; 8+ messages in thread
From: Jacob Hrbek @ 2022-01-18  6:21 UTC (permalink / raw)
  To: guile-user


[-- Attachment #1.1: Type: text/plain, Size: 1018 bytes --]

What's the projected usecase? Making websites in GNU Guile?

On 1/18/22 07:10, Aleix Conchillo Flaqué wrote:
> Hi,
>
> I'm excited to announce GuileScript 0.0.0. GuileScript aims to be a Guile
> to JavaScript compiler. It currently doesn't do much but there are some
> working examples like fibonacci, binary search and reversing a vector. I
> don't know where I want to take this or if it will go somewhere, but at
> least it was fun to dig into Guile's compiler tower (for now only Tree-IL).
>
> During the holidays I saw this tweet (
> https://twitter.com/zaneshelby/status/1477988369154121734?s=20) about
> ClojureScript and I thought it would be cool to do the same with Guile, so
> I had to start somewhere. I'm still planning to at least try to get
> something like that working, we'll see.
>
> Anyways, here it is:
>
> https://github.com/aconchillo/guilescript
>
> Comments, suggestions, patches and full rewrites are welcomed. :-)
>
> Happy hacking!
>
> Aleix

-- 
Jacob Hrbek


[-- Attachment #1.2: publickey - kreyren@rixotstudio.cz - 1677db82.asc --]
[-- Type: application/pgp-keys, Size: 713 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

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

* Re: GuileScript 0.0.0 released
  2022-01-18  6:21 ` Jacob Hrbek
@ 2022-01-18  6:26   ` Aleix Conchillo Flaqué
  0 siblings, 0 replies; 8+ messages in thread
From: Aleix Conchillo Flaqué @ 2022-01-18  6:26 UTC (permalink / raw)
  To: Jacob Hrbek; +Cc: guile-user

To be honest, I don't know yet, I just did it for fun. For now, I want to
try to replicate what I saw in that tweet and build whatever I need to get
there.

Aleix

On Mon, Jan 17, 2022 at 10:22 PM Jacob Hrbek <kreyren@rixotstudio.cz> wrote:

> What's the projected usecase? Making websites in GNU Guile?
>
> On 1/18/22 07:10, Aleix Conchillo Flaqué wrote:
> > Hi,
> >
> > I'm excited to announce GuileScript 0.0.0. GuileScript aims to be a Guile
> > to JavaScript compiler. It currently doesn't do much but there are some
> > working examples like fibonacci, binary search and reversing a vector. I
> > don't know where I want to take this or if it will go somewhere, but at
> > least it was fun to dig into Guile's compiler tower (for now only
> Tree-IL).
> >
> > During the holidays I saw this tweet (
> > https://twitter.com/zaneshelby/status/1477988369154121734?s=20) about
> > ClojureScript and I thought it would be cool to do the same with Guile,
> so
> > I had to start somewhere. I'm still planning to at least try to get
> > something like that working, we'll see.
> >
> > Anyways, here it is:
> >
> > https://github.com/aconchillo/guilescript
> >
> > Comments, suggestions, patches and full rewrites are welcomed. :-)
> >
> > Happy hacking!
> >
> > Aleix
>
> --
> Jacob Hrbek
>
>


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

* Re: GuileScript 0.0.0 released
  2022-01-18  6:10 GuileScript 0.0.0 released Aleix Conchillo Flaqué
  2022-01-18  6:21 ` Jacob Hrbek
@ 2022-01-18  8:07 ` Daniel Meißner
  2022-01-18  8:12   ` Aleix Conchillo Flaqué
  2022-01-18  9:05 ` Dr. Arne Babenhauserheide
  2 siblings, 1 reply; 8+ messages in thread
From: Daniel Meißner @ 2022-01-18  8:07 UTC (permalink / raw)
  To: Aleix Conchillo Flaqué; +Cc: guile-user

Hi Aleix,

this is so cool, thanks for sharing!  Do you have any plans on adding
some simple WebAPI support?  I mean something along the following would
be very cool:

(render (document:query-selector ".app")
        `(form (h1 ,title)
           (input (@ (type "text")))
           (input (@ (type "submit")))))

compiles to:

const target = document.querySelector(".app");
const el1 = document.createElement("form");
const el2 = document.createElement("h1");
el2.innerText = title;
const el3 = document.createElement("input");
el3.setAttribute("type", "text");
const el4 = document.createElement("input");
el4.setAttribute("type", "submit");
el1.append(el2, el3, el4);

I imagine having a lot of fun writing a Browser web app in Guile :-)

Best
Daniel



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

* Re: GuileScript 0.0.0 released
  2022-01-18  8:07 ` Daniel Meißner
@ 2022-01-18  8:12   ` Aleix Conchillo Flaqué
  2022-01-18  8:22     ` Daniel Meißner
  0 siblings, 1 reply; 8+ messages in thread
From: Aleix Conchillo Flaqué @ 2022-01-18  8:12 UTC (permalink / raw)
  To: Daniel Meißner; +Cc: guile-user

Hi Daniel,

Yes, I was thinking adding support for interacting with the DOM at
some point.

Many cool things can be done. Thanks for the interest!

Aleix

On Tue, Jan 18, 2022, 12:07 AM Daniel Meißner <
daniel.meissner-i4k@ruhr-uni-bochum.de> wrote:

> Hi Aleix,
>
> this is so cool, thanks for sharing!  Do you have any plans on adding
> some simple WebAPI support?  I mean something along the following would
> be very cool:
>
> (render (document:query-selector ".app")
>         `(form (h1 ,title)
>            (input (@ (type "text")))
>            (input (@ (type "submit")))))
>
> compiles to:
>
> const target = document.querySelector(".app");
> const el1 = document.createElement("form");
> const el2 = document.createElement("h1");
> el2.innerText = title;
> const el3 = document.createElement("input");
> el3.setAttribute("type", "text");
> const el4 = document.createElement("input");
> el4.setAttribute("type", "submit");
> el1.append(el2, el3, el4);
>
> I imagine having a lot of fun writing a Browser web app in Guile :-)
>
> Best
> Daniel
>


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

* Re: GuileScript 0.0.0 released
  2022-01-18  8:12   ` Aleix Conchillo Flaqué
@ 2022-01-18  8:22     ` Daniel Meißner
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Meißner @ 2022-01-18  8:22 UTC (permalink / raw)
  To: Aleix Conchillo Flaqué; +Cc: guile-user

Aleix Conchillo Flaqué writes:

> Yes, I was thinking adding support for interacting with the DOM at
> some point.
>
> Many cool things can be done. Thanks for the interest!

Yay!  I will stay up to date with this.

Best
Daniel



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

* Re: GuileScript 0.0.0 released
  2022-01-18  6:10 GuileScript 0.0.0 released Aleix Conchillo Flaqué
  2022-01-18  6:21 ` Jacob Hrbek
  2022-01-18  8:07 ` Daniel Meißner
@ 2022-01-18  9:05 ` Dr. Arne Babenhauserheide
  2022-01-18 19:33   ` Aleix Conchillo Flaqué
  2 siblings, 1 reply; 8+ messages in thread
From: Dr. Arne Babenhauserheide @ 2022-01-18  9:05 UTC (permalink / raw)
  To: Aleix Conchillo Flaqué; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]


Aleix Conchillo Flaqué <aconchillo@gmail.com> writes:

> I'm excited to announce GuileScript 0.0.0. GuileScript aims to be a Guile
> to JavaScript compiler. It currently doesn't do much but there are some
> working examples like fibonacci, binary search and reversing a vector.
> https://github.com/aconchillo/guilescript
>
> Comments, suggestions, patches and full rewrites are welcomed. :-)

That’s really cool! 

I currently use biwascheme¹ for simple tools,² and it would be great to
be able to move from it to Guile, because biwascheme breaks Scheme’s
scoping.

It might be pretty hard to really get this right, though. There’s some
existing work for the compile with the full runtime:
https://lists.gnu.org/archive/html/guile-devel/2021-10/msg00018.html

¹: https://www.biwascheme.org/
²: https://www.draketo.de/software/vorlesung-netztechnik#nummer-zu-sprache

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

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

* Re: GuileScript 0.0.0 released
  2022-01-18  9:05 ` Dr. Arne Babenhauserheide
@ 2022-01-18 19:33   ` Aleix Conchillo Flaqué
  0 siblings, 0 replies; 8+ messages in thread
From: Aleix Conchillo Flaqué @ 2022-01-18 19:33 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: guile-user

On Tue, Jan 18, 2022 at 1:11 AM Dr. Arne Babenhauserheide <arne_bab@web.de>
wrote:

>
> Aleix Conchillo Flaqué <aconchillo@gmail.com> writes:
>
> > I'm excited to announce GuileScript 0.0.0. GuileScript aims to be a Guile
> > to JavaScript compiler. It currently doesn't do much but there are some
> > working examples like fibonacci, binary search and reversing a vector.
> …
> > https://github.com/aconchillo/guilescript
> >
> > Comments, suggestions, patches and full rewrites are welcomed. :-)
>
> That’s really cool!
>
>
Thank you!



> I currently use biwascheme¹ for simple tools,² and it would be great to
> be able to move from it to Guile, because biwascheme breaks Scheme’s
> scoping.
>

May be one day you can move to GuileScript :-D.


> It might be pretty hard to really get this right, though. There’s some
> existing work for the compile with the full runtime:
> https://lists.gnu.org/archive/html/guile-devel/2021-10/msg00018.html
>
>
There are many things I haven't even thought about yet, like multiple
return values. Basically all I did was based on my absolute ignorance of
where I was getting into, I guess that's how some things start :-). I took
a look at Guile's Tree-IL and it looked simple enough for me to do
something with it. I have no idea how far Tree-IL will take me though, I
don't know enough yet. I considered CPS, but opened the Tree-IL -> CPS
compiler and it was too much for me to understand as I just wanted to get
something working quickly. I also thought about also integration Google's
Closure Compiler which will hopefully optimize the generated code. Also,
the plan might just be to have a subset of Guile working. I might also try
to mimic ClojureScript evolution, that's actually how I created
Guilescript. I first checked Tree-IL then took a look at ClojureScript
first commit and then created something similar. I don't know where they
went next :-).

Thank you for your feedback!

Aleix


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

end of thread, other threads:[~2022-01-18 19:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18  6:10 GuileScript 0.0.0 released Aleix Conchillo Flaqué
2022-01-18  6:21 ` Jacob Hrbek
2022-01-18  6:26   ` Aleix Conchillo Flaqué
2022-01-18  8:07 ` Daniel Meißner
2022-01-18  8:12   ` Aleix Conchillo Flaqué
2022-01-18  8:22     ` Daniel Meißner
2022-01-18  9:05 ` Dr. Arne Babenhauserheide
2022-01-18 19:33   ` Aleix Conchillo Flaqué

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).