unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Nala Ginrut <nalaginrut@gmail.com>
To: Eric Bavier <ericbavier@openmailbox.org>
Cc: guile-user@gnu.org
Subject: Re: [potluck dish] Compiler for the Joy language
Date: Thu, 18 Feb 2016 13:04:39 +0800	[thread overview]
Message-ID: <1455771879.3838.2.camel@Renee-desktop.suse> (raw)
In-Reply-To: <20160215221723.240e4fa6@openmailbox.org>

I'm glad to see a new language implemented on Guile!
IMO, the language project could be out of Guile core, and it's easier to
maintain or apply patches.

Thanks!

On Mon, 2016-02-15 at 22:17 -0600, Eric Bavier wrote:
> Hello Guilers,
> 
> And happy birthday Guile!
> 
> I started this project a few weeks ago, and managed to make enough
> progress that I thought I'd share it for the potluck.
> 
> Joy is a simple, forth-like, purely functional, concatenative
> programming language:
> 
> https://en.wikipedia.org/wiki/Joy_(programming_language)
> http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language
> 
> Attached is a patch to guile master that adds a module/language/joy
> directory, with lexer, parser, compiler to tree-il, runtime, and minimal
> standard library.  This is still a work-in-progress, but you can already
> do some fun things:
> 
> $ guile
> scheme@(guile-user)> ,L joy
> joy@(guile-user)> "<path-to>/base.joy" include .
> joy@(guile-user)> 2 3 + 4 1 .
> $1 = (1 4 5)
> joy@(guile-user)> DEFINE foo == 2 3 + 4 1 ; bar == + + .
> joy@(guile-user)> foo bar .
> $2 = (10)
> joy@(guile-user)> [1 2 3 4 5 6] [fact] map .
> $3 = ((1 2 6 24 120 720))
> joy@(guile-user)> [1 2 3 4 5 6] [fact] map sum .
> $4 = (873)
> joy@(guile-user)> [1 2 3 4 5 6] [fact 2 /] map .
> $5 = ((0 1 3 12 60 360))
> 
> My interest in Joy came from a search to find a small language whose
> minimal base could be implemented as an easily-audited assembly
> interpreter, but which has higher-level language capabilities.  The
> guile implementation sprang out of a desire to get to know the language
> a bit more before embarking on the assembly route.  Learning more about
> Guile's multi-language support has been a real pleasure, and I'd love
> to see it/help it grow more.
> 
> Limitations and things yet to do:
> 
> - The compiler and runtime currently do not support "sets" aka bitsets
>   as a native type like the reference implementation does.
> 
> - String support in the primitives and base library is not complete.  I
>   have been toying with the idea of just compiling strings to
>   lists-of-chars for easier handling and simplicity of the primitives.
> 
> - REPL: A joy-specific writer would be nice.  And better backtraces?
> 
> - Writing more interesting libraries.  I had hoped to write a useful
>   parser-combinator library.
> 
> - Better include-path handling.
> 
> - Distribution: part of Guile, or separate?
> 
> Anyhow, I hope some find this interesting.
> 
> Happy Hacking and happy birthday Guile!
> `~Eric Bavier





  parent reply	other threads:[~2016-02-18  5:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16  4:17 [potluck dish] Compiler for the Joy language Eric Bavier
2016-02-16 19:41 ` Christopher Allan Webber
2016-02-18  5:04 ` Nala Ginrut [this message]
2016-02-22 14:10 ` Ludovic Courtès
     [not found] <20160223002736.1c82ee82@openmailbox.org>
2016-02-24 14:35 ` Ludovic Courtès

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455771879.3838.2.camel@Renee-desktop.suse \
    --to=nalaginrut@gmail.com \
    --cc=ericbavier@openmailbox.org \
    --cc=guile-user@gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).