Sascha Ziemann | 17 Jan 16:59
Picon

STklos failes to run Silex without reporting an error

I am trying to use Silex with STklos. Silex is a lexer generator for Scheme:

http://www.iro.umontreal.ca/~dube/silex.tar.gz

But when I run Silex with STklos it fails to produce the lexer table
without reporting any error:

$ stklos
*   STklos version 1.10
 *  Copyright (C) 1999-2011 Erick Gallesio - Universite de Nice <eg <at> unice.fr>
* * [Linux-2.6.32-bpo.5-amd64-x86_64/pthread/readline/utf8]
stklos> (load "silex/silex.scm")
stklos> (lex "asn1.l" "stklos.scm")
#t
stklos>

The above session creates the file stklos.scm which contains the
lexer. I have attached the file. You can find at line 1756 a single
quote without any value. That is the bug.

Sorry for the big mail but the bug occurs only with big lexers.

When I run Silex with Gauche it works as expected. I have attached the
lexer generated by Gauche, which contains the correct value behind the
quote.

I have also attached my grammar file in order to reproduce the bug.

Silex stresses the Scheme interpreter by the number of arguments
passed to string-append during an (apply string-append lst) with a lst
(Continue reading)

Taylor Venable | 8 Jan 23:30
Gravatar

Objects & SRFI-10: No Applicable Method

Hi there, I'm new to STklos and am trying to write my first little
program. I want to store objects into a file and read them out easily,
so looking at the manual I found an example of using write-object to
print out a representation ala SRFI-10. When I try this, however, it
doesn't work as I expected.

*   STklos version 1.10
 *  Copyright (C) 1999-2011 Erick Gallesio - Universite de Nice <eg <at> unice.fr>
* * [Linux-3.1.6-1-ARCH-x86_64/pthread/readline/utf8]
stklos> (define-class <foo> () ())
;; <foo>
stklos> (describe (make <foo>))
#[<foo> 1c00db0] is an an instance of class <foo>.
Slots are:
stklos> (define-reader-ctor 'make make)
stklos> (with-input-from-string "#,(make <foo>)" read)
**** Error:
error: no applicable method for #[<generic> make-instance (1)]
in call (make-instance <foo>)
        (type ",help" for more information)
stklos> (make-instance <foo>)
#[<foo> 1c2c240]

What am I doing wrong? Thanks!

--
Taylor C. Venable
http://metasyntax.net/
_______________________________________________
STklos mailing list
(Continue reading)

Erick Gallesio | 31 Dec 18:14
Picon
Picon

[Announce] STklos-1.10 release


This is an announce for the 1.10 release of STklos.

STklos is a free Scheme system compliant with the languages features
defined in R5RS. The aim of this implementation is to be fast as well
as light. The implementation is based on an ad-hoc Virtual
Machine. STklos can also be compiled as a library and embedded in an
application.

The salient points of STklos are:

    * an efficient and powerful object system based on CLOS 
      providing
          o Multiple Inheritance,
          o Generic Functions,
          o Multi-methods
          o an efficient MOP (Meta Object Protocol)
    * a simple to use module system
    * a full tower of numbers implementation, as defined in R5RS,
    * easy connection to the GTK+ toolkit,
    * a Perl compatible regular expressions thanks to the PCRE 
      package,
    * easily extensible with its ScmPkg mechanism,
    * it implements properly tail recursive calls.

This version brings the support of UTF-8 encoding and begins to support some (future) R7RS traits:

    * Added full support for UTF-8 strings and symbols
    * Added support for Win32 support under Cygwin
    * Added some support for R7RS traits:
(Continue reading)

Erick Gallesio | 28 Aug 19:37
Picon
Picon
Favicon

STklos update

Hi,

I have committed a large set of modifications to STklos that were in a private development tree. The modifications permits mainly to support UTF-8 encoding in strings. There are also patches to support the future R7RS version of Scheme (small language). There are some things that still need to be done to have a new version, but current code should be usable. If you don't want to use UTF-8 encoding, you can use the --utf8-encoding=no option.

If you are interested, the code is available at http://stklos.net/hg/hgweb.cgi/archive/tip.tar.gz

A bientôt

--
Erick Gallesio
DSI - Université Nice Sophia Antipolis
_______________________________________________
STklos mailing list
STklos <at> email.essi.fr
http://email.essi.fr/mailman/listinfo/stklos
nitralime | 28 Jan 12:22

FFI docs and examples

Hi folks!

Is there a better (resp. more detailed) documentation of FFI?
Do you know examples of binding external libraries which
can be used to get familiar with FFI?

Regards
Nik
_______________________________________________
STklos mailing list
STklos <at> email.essi.fr
http://email.essi.fr/mailman/listinfo/stklos
Joo ChurlSoo | 7 Jan 01:42
Picon

parameterize


The following parameterize behavior seems to be wrong.

(let ((f (make-parameter 'a))
      (path '())
      (c #f))
  (let ((add (lambda () (set! path (cons (f) path)))))
    (add)
    (parameterize ((f 'b))
 		  (call-with-current-continuation (lambda (c0) (set! c c0)))
 		  (add) (f 'c) (add))
    (f 'd)
    (add)
    (if (< (length path) 5)
 	(c 'end)
 	(reverse path))))
 (a b c d b c d) ;This answer seems to be wrong. (cf.) (a b c d c c d)

--

-- 
Joo ChurlSoo
eg | 30 Dec 20:04
Picon
Picon
Favicon

[Announce] STklos-1.01 release


This is an announce for the 1.01 release of STklos.

STklos is a free Scheme system compliant with the languages features
defined in R5RS. The aim of this implementation is to be fast as well
as light. The implementation is based on an ad-hoc Virtual
Machine. STklos can also be compiled as a library and embedded in an
application.

The salient points of STklos are:

    * an efficient and powerful object system based on CLOS 
      providing
          o Multiple Inheritance,
          o Generic Functions,
          o Multi-methods
          o an efficient MOP (Meta Object Protocol)
    * a simple to use module system
    * a full tower of numbers implementation, as defined in R5RS,
    * easy connection to the GTK+ toolkit,
    * a Perl compatible regular expressions thanks to the PCRE 
      package,
    * easily extensible with its ScmPkg mechanism,
    * it implements properly tail recursive calls.

This release is mainly a maintenance version. Changes in this version:
     * Documentation update
     * Modifications to support ScmPkg on MacOs MacPorts
     * Fix incompatibilities in FFI introduced in 1.00
     * Better x86_64 support
     * Bug fixes

Homepage/Download: See http://www.stklos.net/

--

-- 
Erick Gallesio                                |    tel: +33 (0)492965153
Université de Nice - Sophia Antipolis         |    fax: +33 (0)492965155
ESSI - I3S -- 930, Route des colles           | mailto:eg--at--unice.fr
BP 145 - 06903 Sophia Antipolis CEDEX - FRANCE
_______________________________________________
STklos mailing list
STklos <at> email.essi.fr
http://email.essi.fr/mailman/listinfo/stklos
Rock | 15 Dec 00:48
Picon
Gravatar

Nested quasiquotation bug

I think I've discovered a bug here.

The following:

``(, <at> (append , <at> '((list 2 3) (list 5 7))))

should produce:

(quasiquote ((unquote-splicing (append (list 2 3) (list 5 7)))))

as it does correctly with Guile.

But with stklos 1.0, you get:

`(, <at> (append , <at> '((list 2 3) (list 5 7))))

As you can see, it doesn't evaluate the internal unquote-splicing at all!

Thank you.

--
Rocco Rossi

E-Mail: rocco.rossi <at> gmail.com
Profilo: http://www.google.com/profiles/rocco.rossi

"Sono nato senza conoscere nulla e ho avuto un po' di tempo per cambiare qua e là questa mia condizione." (Richard P. Feynman)

_______________________________________________
STklos mailing list
STklos <at> email.essi.fr
http://email.essi.fr/mailman/listinfo/stklos
Michael Feyereisen | 11 Dec 19:20
Picon

Internat d'Été?

Cher Erick,

STklos m'interesse beaucoup, et j'aimerais savoir s'il serait possible
de faire un internat à l'Université de Nice cet été, afin par exemple
de vous aider à écrire de la documentation, voire du code (en Scheme
ou en C).

Merci beaucoup,

Michael Feyereisen

Imperial College London
Department of Physics
Vitaly Magerya | 7 Nov 14:17
Picon

Can't import SRFI 27 via require-extension

It appears that you can't import SRFI 27 via require-extension,
only through require. Here's an example:

    stklos> (require-extension (srfi 27))
    stklos> default-random-source
    **** Error:
    %execute: variable `default-random-source' unbound
            (type ",help" for more information)

With require on the other hand it works as expected:

    stklos> (require "srfi-27")
    "srfi-27"
    stklos> default-random-source
    #[<random-source> 8247a98]

It appears that SRFI 27 is listed as imported by default in SRFI 0
features list. The fix is this (it's trivial, so I'm sending it
inline):

diff --git a/lib/srfi-0.stk b/lib/srfi-0.stk
--- a/lib/srfi-0.stk
+++ b/lib/srfi-0.stk
@@ -61,7 +61,7 @@
     ;; srfi-24				; ....... withdrawn
     ;; srfi-25				; Multi-dimensional Arrays
     (srfi-26 "srfi-26")			; Specialize Param without Currying
-    ((srfi-27 random))			; Sources of Random Bits
+    ((srfi-27 random)	"srfi-27")	; Sources of Random Bits
     srfi-28				; Basic Format Strings
     ;; srfi-29				; Localization
     srfi-30				; Nested Multi-line Comments
Vitaly Magerya | 6 Nov 21:44
Picon

Broken process functions

It appears that process-kill, process-stop and process-continue
functions are broken. Here's an example:

    stklos> (process-kill (run-process "cat"))
    **** Error:
    process-signal: bad signal name `|SIGTERM|'
            (type ",help" for more information)

The function `process-kill' is defined in lib/process.stk like this:

    (define (process-kill proc) (process-signal proc 'SIGTERM))

My conjecture is that boot code is executed in a case-sensitive
environment, and since src/signal.c contains signal names in lower
case, process-signal fails to find signal "SIGTERM" (it can find
"sigterm" instead).

The trivial fix is to go through lib/process.stk and to lower the
case of SIGTERM, SIGSTOP and SIGCONT in process-signal invocations.
A more complex fix would be to make sure the boot code is compiled
with case-folding enabled, but I have no idea how to do that.

One more problem is that the documentation refers to a non-existent
function "process-send-signal". It should be "process-signal" instead.

Gmane