Arcueid 0.1.2 released

Arcueid 0.1.2 is out. You can download it here.

Lots of new features in this release. I’ve finally fixed the nested quasiquotes bug that has been out for more than a year. Readline seems to be working better than it had in 0.1.1. Some bugfixes like memory leak issues and garbage collector problems. We now have gone back to using the Huelsbergen-Winterbottom VCGC algorithm for garbage collection. Large file support is now available even on 32-bit systems, provided bignum support is also available. We have some regular expressions based on the Plan 9/Inferno Regular Expression library (and it is for now similarly limited). The load function is now built into the interpreter and load paths are now supported. And now there is a script mode so Arcueid can be used in a shebang, e.g. it is now possible to run a file with the executable bit set with the following contents

#!/usr/local/bin/arcueid --script
(prn (+ 1 1))

and that does what one expects.

Regular expressions are provided by means of the r/…/ syntax. Only basic stuff like character classes, the Kleene star and plus operators, the ? operator, alternation, and capturing groups are supported. Many Perl/POSIX constructions are still unavailable, but soon enough the regexp support should evolve to support many of the most useful features. Hope to soon be able to add things like counted repetitions, character class abbreviations like \d, and non-capturing groups. To use regexps, they can be applied to strings, e.g.:

arc> (r/(abc)(def)/ "zzzabcdefgh")
(3 ("abcdef" "abc" "def"))

Which returns a list with the position of the match, and a list of all the capture groups, starting with the entire string matched by the regular expression. Returns nil if the regexp failed to match. The =~ macro can be used, which binds $$ to the position in the string the match obtained, and $0 to the whole matched portion, $1 to the first capture, and so on, similar to the way Perl does it, e.g.:

arc> (=~ r/(abc)(def)/ "zzzabcdefgh" (list $1 $2))
("abc" "def")

Load paths can be added by means of the loadpath-add function, which adds a directory to the load path list loadpath*.

About these ads

~ by stormwyrm on 2013-05-14.

4 Responses to “Arcueid 0.1.2 released”

  1. hi,
    this is the third release I try to build on my mac (os x 10.7.5). Still no success. On the surface it looks like a library problem with malloc, but mayby there is more to it.

    – is it reasonable that the configure script doesn’t check for malloc.h? If I try to run a simple ./configure && make I get:
    make all-recursive
    Making all in src
    /bin/sh ../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c -o alloc.lo alloc.c
    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c alloc.c -fno-common -DPIC -o .libs/alloc.o
    alloc.c:45:20: error: malloc.h: No such file or directory
    make[2]: *** [alloc.lo] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

    – ok, then let’s do it manually:

    cp /usr/include/malloc/malloc.h .
    make clean & make

    and then again declaration error:

    make all-recursive
    Making all in src
    /bin/sh ../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT fileio.lo -MD -MP -MF .deps/fileio.Tpo -c -o fileio.lo fileio.c
    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT fileio.lo -MD -MP -MF .deps/fileio.Tpo -c fileio.c -fno-common -DPIC -o .libs/fileio.o
    fileio.c: In function ‘fio_ready’:
    fileio.c:101: error: ‘fd_set’ undeclared (first use in this function)
    fileio.c:101: error: (Each undeclared identifier is reported only once
    fileio.c:101: error: for each function it appears in.)
    fileio.c:101: error: expected ‘;’ before ‘rfds’
    fileio.c:115: error: ‘FILE’ has no member named ‘_gptr’
    fileio.c:115: error: ‘FILE’ has no member named ‘_egptr’
    fileio.c:121: error: ‘rfds’ undeclared (first use in this function)
    make[2]: *** [fileio.lo] Error 1
    make[1]: *** [all-recursive] Error 1t
    make: *** [all] Error 2

    again, copying header manually.
    and finally, the show stopper.

    osdep.c: In function ‘arc_timedate’:
    osdep.c:112: error: storage size of ‘timep’ isn’t known

    thanks
    ben

    • Well, I don’t have access to an OS X box at the moment, but it seems that it highlights some incompatibilities. You’re right about configure not checking for malloc.h. Thought that might have been included in AC_HEADER_STDC but apparently that isn’t the case. It seems also that OS X doesn’t include definitions for fd_set and other stuff used for select in unistd.h, and I’ll need to change the includes in fileio.c to include as well. There’s also the matter of my using stuff inside the FILE that should be considered internal, but that’s to facilitate non-blocking I/O. Maybe there’s a better way to do it.

      The last part is a bit of a mystery. I don’t know why the size of a struct timep shouldn’t be known if it’s defined in time.h the way it should be as mandated by POSIX. I’d need access to an OS X machine to be able to dig this out.

      Thanks for the bug report. It would help a lot if I could have access to an OS X machine, but all I have at the moment are Linux boxes (x86 and ARM), and Arcueid compiles and runs fine there. Maybe I could try to make a FreeBSD box in a VM and try building it there as well. Probably would highlight more portability bugs.

    • Without access an OS X box, could you try to email me the output of gcc -E on the problematic source files?

    • Add further updates to this here:
      https://github.com/dido/arcueid/issues/59

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: