Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
ANN: chibi-scheme 0.1
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alex Shinn  
View profile  
 More options Apr 8 2009, 12:39 pm
Newsgroups: comp.lang.scheme
From: Alex Shinn <alexsh...@gmail.com>
Date: Wed, 8 Apr 2009 09:39:30 -0700 (PDT)
Local: Wed, Apr 8 2009 12:39 pm
Subject: ANN: chibi-scheme 0.1
An initial preview release of Chibi-Scheme is available at

  http://synthcode.com/scheme/chibi-scheme-0.1.tgz

Smaller than TinyScheme, faster than a speeding Guile, able to leap
tall vectors in a single bounds check, with native hygiene to boot!

WARNING: Do not use Chibi-Scheme!

Seriously, there are real Scheme compilers out there.  The author
of Chibi-Scheme was working on one himself before starting this
silly project, and will likely continue to work on it for years to
come.  But sometimes we all just want to release something.

There seems to be a disturbing trend, however, of people taking
toy Scheme interpreters seriously.  It can't be for ease of use,
because the serious compilers all have the most friendly FFI's.
It can't be for the small memory footprint, because the difference
between a 100k and 2MB program text will be dwarfed by the runtime
memory, and all of the real implementations have much more
efficient memory usage.  But time and again you'll find TinyScheme
crop in in bizarre places, which leads one to wonder how much of a
bad name is Scheme getting by being so often represented by one of
the slowest language implementations on the planet?

So Chibi-Scheme exists as a better toy implementation.  It's a
very small but mostly complete R5RS Scheme implementation using a
reasonably fast custom VM.  Chibi-Scheme tries as much as possible
not to trade its small size by cutting corners, and provides full
continuations, both low and high-level hygienic macros based on
syntactic-closures, string ports and exceptions.  It also has
optional immediate symbols, just to be quirky.

But don't use Chibi-Scheme.  Don't use toy Scheme implementations
at all.  But if you really want a toy... well, then perhaps
Chibi-Scheme 0.3 or so may be right for you.

[On a more serious note, I do want to hold this up as an example
of how extremely simple and natural it is to implement
syntactic-closures compared to alternatives such as syntax-case.
The whole macro implementation is about 25 lines of low-level C
code (modulo the extra lines I'll have to add later for bug
fixes), as opposed to say the 4000 or so lines of Scheme for
psyntax.]

--
Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Shinn  
View profile  
 More options Apr 9 2009, 12:14 am
Newsgroups: comp.lang.scheme
From: Alex Shinn <alexsh...@gmail.com>
Date: Wed, 8 Apr 2009 21:14:44 -0700 (PDT)
Local: Thurs, Apr 9 2009 12:14 am
Subject: Re: ANN: chibi-scheme 0.1
John Cowan has kindly volunteered to host the file at

  http://www.ccil.org/~cowan/chibi-scheme-0.1.tgz

until I get a more stable server.

--
Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
namekuseijin  
View profile  
 More options Apr 9 2009, 3:10 am
Newsgroups: comp.lang.scheme
From: namekuseijin <namekusei...@gmail.com>
Date: Thu, 9 Apr 2009 00:10:26 -0700 (PDT)
Local: Thurs, Apr 9 2009 3:10 am
Subject: Re: ANN: chibi-scheme 0.1
On Apr 8, 1:39 pm, Alex Shinn <alexsh...@gmail.com> wrote:

> An initial preview release of Chibi-Scheme is available at

>  http://synthcode.com/scheme/chibi-scheme-0.1.tgz

> Smaller than TinyScheme, faster than a speeding Guile, able to leap
> tall vectors in a single bounds check, with native hygiene to boot!

oh the fun! :)

> WARNING: Do not use Chibi-Scheme!

> Seriously, there are real Scheme compilers out there.
[snip]
> There seems to be a disturbing trend, however, of people taking
> toy Scheme interpreters seriously.
[snip]
> efficient memory usage.  But time and again you'll find TinyScheme
> crop in in bizarre places, which leads one to wonder how much of a
> bad name is Scheme getting by being so often represented by one of
> the slowest language implementations on the planet?

Well, I'm guilty myself of once recommending it as a very small (and
incomplete) Scheme, before first realizing how slow it is.

OTOH, "It is meant to be used as an embedded scripting interpreter for
other programs."  Scripting GUI elements should not exactly demand
performance.

> So Chibi-Scheme exists as a better toy implementation.  It's a
> very small but mostly complete R5RS Scheme implementation using a
> reasonably fast custom VM.  Chibi-Scheme tries as much as possible
> not to trade its small size by cutting corners, and provides full
> continuations, both low and high-level hygienic macros based on
> syntactic-closures, string ports and exceptions.  It also has
> optional immediate symbols, just to be quirky.

Impressive!  As much of your Scheme code anyway.

Is it easy to embed it into an app?

> [On a more serious note, I do want to hold this up as an example
> of how extremely simple and natural it is to implement
> syntactic-closures compared to alternatives such as syntax-case.
> The whole macro implementation is about 25 lines of low-level C
> code (modulo the extra lines I'll have to add later for bug
> fixes), as opposed to say the 4000 or so lines of Scheme for
> psyntax.]

C code is much more compact and economic than Scheme code.  Besides,
isn't psyntax a host of libs for various implementations?

Interesting nonetheless.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal J. Bourguignon  
View profile  
 More options Apr 9 2009, 3:42 am
Newsgroups: comp.lang.scheme
From: p...@informatimago.com (Pascal J. Bourguignon)
Date: Thu, 09 Apr 2009 09:42:31 +0200
Local: Thurs, Apr 9 2009 3:42 am
Subject: Re: ANN: chibi-scheme 0.1

namekuseijin <namekusei...@gmail.com> writes:
> C code is much more compact and economic than Scheme code.

This is not what I get as experimental results.  When I translated my C
libraries into lisp, only 1/10 of them needed translations (the others
were already included in CL, (or Scheme libraries), or were plain useless,
given lisp power), and of those translated, the lisp code was 1/10 of C.

--
__Pascal Bourguignon__
http://www.informatimago.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Abdulaziz Ghuloum  
View profile  
 More options Apr 9 2009, 4:27 am
Newsgroups: comp.lang.scheme
From: Abdulaziz Ghuloum <aghul...@cee.ess.indiana.edu>
Date: Thu, 09 Apr 2009 11:27:01 +0300
Local: Thurs, Apr 9 2009 4:27 am
Subject: Re: ANN: chibi-scheme 0.1

Alex Shinn wrote:
> [On a more serious note, I do want to hold this up as an example
> of how extremely simple and natural it is to implement
> syntactic-closures compared to alternatives such as syntax-case.
> The whole macro implementation is about 25 lines of low-level C
> code (modulo the extra lines I'll have to add later for bug
> fixes), as opposed to say the 4000 or so lines of Scheme for
> psyntax.]

Seriously?  If it took you one line to implement each basic
form (lambda, cond, or, and, etc), you'd probably end up
with more than 25 lines of code.  R6RS's guard macros, by
itself, takes more than 25 lines of code.  All these do add
up in a complete macro system like psyntax or Andre's
syntax-case implementation and they do make the majority of
the 4000 lines that you're comparing against.

Aziz,,,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Shinn  
View profile   Translate to Translated (View Original)
 More options Apr 9 2009, 6:32 am
Newsgroups: comp.lang.scheme
From: Alex Shinn <alexsh...@gmail.com>
Date: Thu, 9 Apr 2009 03:32:59 -0700 (PDT)
Local: Thurs, Apr 9 2009 6:32 am
Subject: Re: ANN: chibi-scheme 0.1
On 4月9日, 午後5:27, Abdulaziz Ghuloum <aghul...@cee.ess.indiana.edu>
wrote:

Yes, read the source - it's tiny! :)

The whole idea is _not_ to include any logic about Scheme
in the macro expander at all.  Instead, you interleave
macro expansion with syntactic analysis.  So you have a fixed
cost for implementing the core forms (define, set!, lambda, if,
begin and quote).  Then another cost for implementing any macros
at all - define-syntax, let-syntax and letrec-syntax core forms,
plus one extra case in the analysis loop to see a macro as a head
form and expand it (about 50 lines in chibi-scheme).  Then a few
extra special cases for recognizing syntactic closure forms in
analysis and swapping the environments, which really is just a
few more lines of code.  identifier=? is 17 lines, though; all
told the hygienic macros are maybe 50 more lines than a defmacro
version.

I'm not counting the R5RS derived forms, which are about 150 lines
of explicit renaming macros (in the already complete and functioning
macro system) or syntax-rules which is itself another 150 line
explicit renaming macro.  These are optional - you could decide on
your own Scheme dialect with different derived forms, or use an
alternate pattern matching style to syntax-rules, without any need
to modify the core macro system.

Of course, in the process of defining these macros the first ones
have to be defined only in terms of core forms, and you need to
bootstrap yourself up into a more expressive language.  It's an
interesting exercise to find which should be defined first to
find the shortest overall definitions.  You'd think you'd want to
implement let and letrec first, but I found it was easier to
implement cond first, then quasiquote.  syntax-rules is of course
last, but just to be safe it was initially written without
quasiquote, which makes it especially ugly :)

--
Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Shinn  
View profile   Translate to Translated (View Original)
 More options Apr 10 2009, 9:16 am
Newsgroups: comp.lang.scheme
From: Alex Shinn <alexsh...@gmail.com>
Date: Fri, 10 Apr 2009 06:16:38 -0700 (PDT)
Local: Fri, Apr 10 2009 9:16 am
Subject: Re: ANN: chibi-scheme 0.1
On 4月9日, 午後4:10, namekuseijin <namekusei...@gmail.com> wrote:

> Is it easy to embed it into an app?

Yes, very.  You can also have multiple VMs running
simultaneously.

--
Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Shinn  
View profile   Translate to Translated (View Original)
 More options Apr 11 2009, 11:28 pm
Newsgroups: comp.lang.scheme
From: Alex Shinn <alexsh...@gmail.com>
Date: Sat, 11 Apr 2009 20:28:41 -0700 (PDT)
Local: Sat, Apr 11 2009 11:28 pm
Subject: Re: ANN: chibi-scheme 0.1
On 4月9日, 午後7:32, Alex Shinn <alexsh...@gmail.com> wrote:

> [...] or syntax-rules which is itself another 150 line
> explicit renaming macro.

And is broken.  All my tests were for ER macros.
I'll fix that in the next release.

--
Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Abdulaziz Ghuloum  
View profile   Translate to Translated (View Original)
 More options Jun 16 2009, 2:07 pm
Newsgroups: comp.lang.scheme
From: Abdulaziz Ghuloum <aghul...@cee.ess.indiana.edu>
Date: Tue, 16 Jun 2009 21:07:22 +0300
Local: Tues, Jun 16 2009 2:07 pm
Subject: Re: ANN: chibi-scheme 0.1

Alex Shinn wrote:
> On 4月9日, 午後7:32, Alex Shinn <alexsh...@gmail.com> wrote:

>> [...] or syntax-rules which is itself another 150 line
>> explicit renaming macro.

> And is broken.  All my tests were for ER macros.
> I'll fix that in the next release.

Is this next release coming soon?  Or, do you make the development
version (in cvs, svn, git, bzr, tgz, etc.) accessible to the public?

I really would like to see this implementation of syntax-rules as an
explicit renaming macro. (preferably one that actually works)

Aziz,,,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »