unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* About sweet-expression
@ 2012-03-06  3:21 Nala Ginrut
  2012-03-06  3:22 ` Nala Ginrut
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Nala Ginrut @ 2012-03-06  3:21 UTC (permalink / raw)
  To: guile-devel

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

I try to port sweet-expression to newest Guile. Fortunately, the author
wrote a compatible version for old Guile in 2008. So I just try to rewrite
part of it for some obvious reasons. It woks fine now.
Though some guys doesn't like sweet-expression at all (OK, they're real
Lispers! But me too ;-)). I'm not a big fan to write Scheme like this:
-----------------------
define fibfast(n)
  if {n < 2}
    n
    fibup(n 2 1 0)
-----------------------
But I think it maybe useful for newbies especially came from Python of C.
If we can fix the problems which I'll mention later, I expect it to be
added as inner language support.

I put it here, if you're interested, please checkout here:
git://gitorious.org/nacre/guile-sweet.git
It supports Modern & Sugar both. You may read the README and try the
example.

But there're some problems for the original implementation, so I didn't
format a patch. I think there should be something to be fixed.
1.  The author's comment shows that we don't need to re-implement a reader
if our reader treats "[]" and "{}" as delimiter.  But seems "{}" is not
delimiter in current Guile. Mark Weaver said it should be fixed.
2. And the second suggestion of Mark Weaver is we *must* try the Guile
inner reader tools and keep some information if there's errors happened. I
think it's a more worthy consideration. The current sweet is too weak to be
a productive thing.
3. We don't have "nfx" macro in current Guile, so only simple infix
expression can be evaluated. Say, all the operators are homologous:
{1 + 2 + 3} is simple infix expression
{1 + 2 - 3} is not.
Anyway, it's not a big deal, I'll fix it later. But I'm not sure whether it
should be in Guile or in app? Since the author use "nfx" directly, maybe
it's a common thing we missed?

[-- Attachment #2: Type: text/html, Size: 2779 bytes --]

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

end of thread, other threads:[~2012-04-12  1:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06  3:21 About sweet-expression Nala Ginrut
2012-03-06  3:22 ` Nala Ginrut
2012-03-06  4:35 ` Mark H Weaver
2012-03-12 17:17   ` Nala Ginrut
2012-03-12 19:05     ` Mark H Weaver
2012-03-13  2:01       ` Nala Ginrut
2012-03-13  3:51         ` Nala Ginrut
2012-04-12  1:53           ` Nala Ginrut
2012-03-06  6:42 ` David Kastrup
2012-03-06  8:16   ` Nala Ginrut
2012-03-12 16:47     ` Nala Ginrut

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