Todd Dukes | 5 Sep 00:06

-library equivalent of "-Xlinker --whole-archive"


I have a library that among other things defines a class called graph.

My first program creates a data structure that includes instances of
this class and writes them to a binary data file.

Another program loads this data structure and prints a summary
report. This program does not actually need the data in the graph
class so there is no code for creating or accessing graph class
instances in the code of the program.

I use the (library utility) statement in the module clause of my
second program to say that it is using the library. At runtime I get
an error saying the the class 'graph' cannot be found. I have
eliminated the error by putting.

(make-graph #f #f)

into my summary report program. There should be a better way. I have
resolved this in the past with C++ programs by using the
--whole-archive flag. Is there a way to do this with libraries in
bigloo?

Let me know if this makes no sense to anyone and I'll try to clarify.

Thanks,
Todd.

Todd Dukes | 3 Sep 18:49

xml-parse on 3.1b vs. 3.1a


I see a difference in the way the header information is arranged in
the return value of xml-parse between version 3.1a and the
3.1b-beta29Aug08 version.

I have copied a small portion of the xml file and the results of printing
the parsed data structure below.

Are these the only changes I should expect in the parsed xml data
structure? If there are any others, are they documented?

Thanks,
Todd.

xml ---
<?xml version="1.0" encoding="UTF-8" ?>

<data>
xml ---

bigloo 3.1b ----

(raw-data ((xml-decl (encoding . UTF-8) (version . 1.0)) (data () (

bigloo 3.1b ----

bigloo 3.1a ----
(raw-data ((instruction . <?xml version="1.0" encoding="UTF-8" ?>) 

 (data () (
(Continue reading)

Jakob Praher | 25 Aug 17:38

newbie: wrong (jvm) bytecode generated for constructors with array signature?

hi,

I give up. After looking at the comptime code for some time, I can't
find the missing peaces, to look at the issue all by myself.

First of all: I am trying to improve my knowledge of scheme and thus I
want to use scheme for gluing together some java components..., by using
bigloo -jvm to compile scheme 2 java bytecodes, bigloo version 3.1a on a
GNU/Linux machine.

So far so good, but:

I use the following declarations to boostrap access to java:

(module foo
   (java

   (class %jobject  "java.lang.Object")
   (class %jstring
         (constructor new (::string)
	"java.lang.String")

   (class %url
	(constructor new (::%jstring))
	"java.net.URL")

   (array url* ::%url)

   (class %urlcl
          (constructor create (::url*))
(Continue reading)

pierarda | 22 Aug 22:13

Bigloo, snow and make-struct...

Hi everyone.

While porting some code wrote to the Scheme Now (aka snow) system, I stumbled
upon what I believe to be a bug in bigloo...

The following code shows the behaviour:

% cat bigloo-snow.scm							       
									       
			       
":";exec snow -- "$0" "$@"
(package* bigloo-snow/v1.0.0

	  (provide:
	    
	    ;; creates an empty structure type
	    (define-macro* (define-a-struct name)
	      `(define-struct ,name))
	    
	    ;; appends two symbols
	    (define-macro* (kons a b)
	      (define (symbol-append s1 s2)
		(string->symbol
		  (string-append
		    (symbol->string s1)
		    (symbol->string s2))))
	      (symbol-append a b))
	    
	    ;; calls the creation of a structured element  
	    (define-macro* (make-my-struct name)
(Continue reading)

Manuel.Serrano | 21 Aug 15:05

bigloo3.1b goes beta

Hello There,

I have just promoted Bigloo3.1b. It has now stepped into its beta
stage. My plan is to release it as the next "stable" within a week or
so (in any case, no later than the end of the month).

In consequence, I would appreciate your help, in particular, in testing
the installation procedure.

The version 3.1b brings some new features and it also should improve
the performance of many compiled programs.

--

-- 
Manuel

Manuel.Serrano | 21 Aug 13:21

Re: Bee with bigloo3.1b-alpha18Aug08 on Mac OSX

Hello Rembrandt,

> I tried to compile the bee (just for fun -- I have a working bee :-)) with
> the latest bigloo (bigloo3.1b-alpha18Aug08), and got the following:
> 
> (Mac OSX 10.5.4; i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build
> 5465); ./configure --dotnet=no --jvm=no --bee=full --enable-srfi1
> --finalization=yes --emacs=/Applications/Emacs.app/Contents/MacOS/Emacs
> --lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp)
> 
> as ever,
> Rembrandt
> 
> 
> 529 bigloo3.1b> make compile-bee
> >>> (cd src; make)
> if [ "yes" = "yes" ]; then \
>       make lib_s.dylib; \
>         fi
> make[3]: Nothing to be done for `lib_s.dylib'.
> make[2]: `/Users/local/Bigloo/bigloo3.1b/bin/cigloo' is up to date.
> (expr=load-path; \
>           for p in . ude bee cee bug lee dbg; do \
>              expr="(cons \"../$p\" (cons \"$p\" $expr))"; \
>           done; \
>     make elc EFLAGS="-no-site-file -eval '(setq load-path $expr)' -batch -q
> -f batch-byte-compile")
> make[2]: Nothing to be done for `elc'.
> make[3]: Nothing to be done for `all'.
> make[4]: Nothing to be done for `main'.
(Continue reading)

Manuel.Serrano | 18 Aug 12:54

Re: Bigloo on FreeBSD

Hello Karsten,

Thank you very much for you mail. 

> After trying out Hop on my local OS X machine, I wanted to deploy it
> on my FreeBSD server. As it turned out, it didn't work.
> 
> I attached three patches that fix two major problems on FreeBSD and
> improve threading.
> 
> The first is trivial, the wrong header file is included in bglmixer.c.
The latest version no longer includes bglmixer.c. There is actually no
need to implement a direct mixer binding for using Gstreamer. This
part has thus been removed from the gstreamer binding.

> The second was very tricky. I got an error message that the library
> init symbol could not be found in libbigloopth. As it turned out,
> errors from dlsym() where not checked correctly. dlsym() returns NULL
> on error, and then dlerror() can be used to retrieve an error message.
> However, only dlerror() was checked for a non-NULL value, which fails
> if there had been previous errors with dlsym() where the error message
> was not handled. On FreeBSD, nsswitch uses a dummy function called
> "_nss_cache_cycle_prevention_function" to prevent some forms of loops.
> The code checking for this function ignores the error message, as it
> expects the call to fail most of the time, and thus, the error popped
> up in the first call to dlsym() in Bigloo.
Sure. You are right.

> The third patch is a minor (or major, depends on your point of view)
> improvement for threading. On FreeBSD, you can choose between
(Continue reading)

Benedikt Rosenau | 12 Aug 14:03

Bug report

Hallo Manuel,

I attached a short program to this mail. This program leads to
a segmentation fault both in interpreted and compiled mode.
Compiling with debug information and running through a debugger
shows that the problem comes from line 9 and 10 of the source
code. However, a backtrace shows that the program ran into an
endless loop without reason.

Regards,
   Benedikt
(module eliminate-showcase)
(define (replace-expression-with-symbol expr sym l)
  (cond
    ((equal? expr l) sym)
    ((list? l) (map (lambda (e) replace-expression-with-symbol expr sym e) l))
    (else l)))

(define (first-true-sublist l)
  (let loop ((work-list l))
    (if (null? work-list)
      l
      (let ((e (car work-list)))
        (if (list? e) (first-true-sublist e) (loop (cdr work-list)))))))

(define (eliminate l)
  (if (list? l)
    (let ((sym (gensym)) (sub-list (first-true-sublist l)))
(Continue reading)

Todd Dukes | 1 Aug 22:20

bignum bit operations?


Are the bit operations available for big numbers? 

I am looking for bit-rshbignum and bit-andbignum and do not find
them. Am I missing something or are they not available?

Thanks,
Todd.

Manuel.Serrano | 21 Jul 16:42

Re: reading vtab

Hello Sven,

> I would expect that bigloo can read whitespace sequences,
> but vtab (ASCII 11) causes an error:
> 
> 1:=> (call-with-output-file "vtab" (lambda (port) (write-char (integer->char 11) port)))
> #<output_port:vtab>
> 1:=> (define in (open-input-file "vtab"))
> in
> 1:=> (read in)
> 
> File "vtab", character 1:
> *** ERROR:read:
> Illegal char -- #a011
>     0.... read
That's true. Bigloo handles #a012 and #a013 but not #a011. I will add
it for the next alpha because I don't think there is a good reason not
to handle this character too.

--

-- 
Manuel

w r | 16 Jul 19:38

sqlite

I'm experimenting with the sqlite interface (bigloo 3.1a on linux), and ran into 2 issues:

1) This code gets an error parsing the '1.234' value field:
(module sql
	(library sqlite)
	(main main))

(delete-file "test.db")
(define *db* (instantiate::sqlite (path "test.db")))

(define (main args)
  (sqlite-exec *db* "CREATE TABLE table1 (id INTEGER, name TEXT, value REAL)")

  (sqlite-exec *db* "INSERT INTO table1 (id, name) VALUES (1, 'first')")
  (pp (sqlite-map *db* vector "SELECT * FROM table1"))
  ;; prints (#("1" "first" #unspecified))

  (sqlite-exec *db* "INSERT INTO table1 (id, name, value) VALUES (2, 'second', 1.234)")
  (pp (sqlite-map *db* vector "SELECT * FROM table1"))
  ;; *** ERROR:parser:
  ;; parse error (unexpected token `DOT') -- (DOT #{loc [string] 60})
  )

2) The databases I create using bigloo aren't recognized by sqlite3.  I get:

$ sqlite3 test.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> .tables
Error: file is encrypted or is not a database
(Continue reading)


Gmane