Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Eager comprehensions for Bigloo

1 view
Skip to first unread message

phi5...@yahoo.ca

unread,
Mar 23, 2008, 1:26:12 AM3/23/08
to
Many people ran into trouble while trying to use Eager Comprehensions
(SRFI-42) on Bigloo; there are two issues: (1) Bigloo does not accept
identifiers containing the colon character, that it reserves for the
optional type declaration; (2) The :list generator suffers from name
capture, and produces wrong results when running in :parallel. I
believe that the last problem happens in other implementations of
Scheme too, but not on DrScheme, where :list works perfectly well; in
the distribution of SRFI-42, there is also a bug report for the :list
generator. Anyway, I substituted the underline character for the
colon, and fixed the problems with the :list generator. Here is my
definition of the :list generator:

(define-syntax _list
(syntax-rules (index)
((_list cc var (index i) arg ...)
(_parallel cc (_list var arg ...) (_integers i)) )
((_list cc var arg1 arg2 arg ...)
(_list cc var (append arg1 arg2 arg ...)) )
((_list cc var arg)
(let ((t (gensym "h-")) ) ; prevents name capture
(_do cc
(let ())
((t arg))
(not (null? t))
(let ((var (car t))))
#t
((cdr t)) ))) ) )

Finally, I posted a tutorial on list comprehension in Junia's code
distribution site; the tutorial is called zermelo.pdf. In the same
package, you will also find the program files described and listed in
the tutorial, and the list comprehension library ready to run under
Bigloo. Since I could not fix the vector part of the original library,
I removed it. If somebody was able to install the vector comprehension
macros under Bigloo, please, let me know. BTW, although I tested the
library only on Windows, it should work on Linux, and Mac OS-X.
Junia's code page address is

code.google.com/p/stalingui

The package name is list-comprehensions.zip. A last thing. People
keep downloading the beria.pdf stalin tutorial twice as often as the
updated beria-stalin-tutorial.pdf (chapters 1-5). I would like to
point out that the beria.pdf tutorial is obsolete, and that Junia and
Reny keep it there only for statistic reasons. One should download the
beria-stalin-tutorial.pdf (chapters 1-5).

Junia would like to add other Schemes to her tutorial page. However,
no one in our group was able to compile Gambit Scheme on Windows. If
you know how to compile Gambit programs, and generate stand alone
executables, please help us with detailed instruction. I heard that
Gambit generates gigantic exec files, if one does not know how to deal
with it; if you know about any trick that leads to small Gambit exec
files, let us know too.

0 new messages