unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Daniel Kraft <d@domob.eu>
Cc: guile-devel@gnu.org
Subject: Re: Brainfuck branch
Date: Wed, 24 Jun 2009 13:19:04 +0200	[thread overview]
Message-ID: <m3vdmlop5j.fsf@pobox.com> (raw)
In-Reply-To: <h0e44t$q1n$1@ger.gmane.org> (Daniel Kraft's message of "Sat, 06 Jun 2009 18:05:48 +0200")

Hi Daniel,

On Sat 06 Jun 2009 18:05, Daniel Kraft <d@domob.eu> writes:

> I just re-pushed the brainfuck branch (but should contain not much new
> as compared to the last push) after the savannah break-down.  I think it
> should have gotten right this time, too, but I again had to struggle a
> bit with git ;)

Thanks for the patches!

I cherry-picked the relevant work to master. It's a cool compiler! And,
it brought out some other bugs that I had been meaning to fix.

I added a Tree-IL compiler, because I thought it would be more
illustrative. Then I fixed some repl bugs so that brainfuck can be
compiled with `,c', and input works now too.

I'm still not happy with the generated code (produced by the
tree-il->glil compiler), but I think I have some ideas about how to make
that better.

But for now:

    scheme@(guile-user)> ,L brainfuck
    Guile Brainfuck interpreter 1.0 on Guile 1.9.0
    Copyright (C) 2001-2008 Free Software Foundation, Inc.

    Enter `,help' for help.
    brainfuck@(guile-user)> ++++++++++        initializes cell zero to 10
    ... [
    ...    >+++++++>++++++++++>+++>+<<<<-
    ... ]                 this loop sets the next four cells to 70/100/30/10 
    ... >++.              print   'H'
    ... >+.               print   'e'
    ... +++++++.                  'l'
    ... .                         'l'
    ... +++.                      'o'
    ... >++.                      space
    ... <<+++++++++++++++.        'W'
    ... >.                        'o'
    ... +++.                      'r'
    ... ------.                   'l'
    ... --------.                 'd'
    ... >+.                       '!'
    ... >.                        newline
    ... ]
    Hello World!
    brainfuck@(guile-user)> 

Cheers,

Andy
-- 
http://wingolog.org/




  parent reply	other threads:[~2009-06-24 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-06 16:05 Brainfuck branch Daniel Kraft
2009-06-06 16:53 ` Andreas Rottmann
2009-06-24 11:19 ` Andy Wingo [this message]
2009-06-24 18:25   ` 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=m3vdmlop5j.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=d@domob.eu \
    --cc=guile-devel@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).