Re: Happy Tenth Birthday, E

Mark Seaborn <mrs-ChQETwBkFSdCgCasaBwmdgC/[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
Allen Short <washort-TyWPi3/[email protected]> wrote:

> I plan to use Ecru alongside Python until it's complete enough to
> write applications with on its own. I've written a Python bridge
> module that can run code in the Ecru VM and exchange objects with
> it. I've also written a parser for E and an expander to Kernel-E in
> Python and a primitive REPL based on them.  (Eventually, I hope to
> rewrite these in E as well, and reuse as much of the existing code
> for 'rune' as possible.)

Looks interesting.

I tried it on Debian lenny i386.  Some simple expressions in the REPL
sometimes work but other times produce warnings or segfaults:

$ sudo apt-get install automake autoconf check libgc-dev libgmp3-dev python2.5-dev
$ ./autogen.sh --prefix=$(pwd)/prefix
$ PATH=prefix/bin PYTHONPATH=prefix/lib/python2.5/site-packages/ LD_LIBRARY_PATH=prefix/lib/ monte
? "foo"+"bar"

(process:25014): GLib-GIO-CRITICAL **: g_output_stream_write_all: assertion `G_IS_OUTPUT_STREAM (stream)' failed

(process:25014): GLib-GIO-CRITICAL **: g_memory_output_stream_get_data: assertion `G_IS_MEMORY_OUTPUT_STREAM (ostream)' failed

(process:25014): GLib-GIO-CRITICAL **: g_seekable_tell: assertion `G_IS_SEEKABLE (seekable)' failed

? "foo"
foo

? "foo"+"bar"
foobar

? 1+1
2

$ PATH=prefix/bin PYTHONPATH=prefix/lib/python2.5/site-packages/ LD_LIBRARY_PATH=prefix/lib/ monte
? 1+1

(process:25022): GLib-GIO-CRITICAL **: g_output_stream_write_all: assertion `G_IS_OUTPUT_STREAM (stream)' failed
Segmentation fault (core dumped)


Here is a backtrace I got from gdb:

? 1+1

(process:23019): GLib-GIO-CRITICAL **: g_output_stream_write_all: assertion `G_IS_OUTPUT_STREAM (stream)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7e3c8c0 (LWP 23019)]
0xf7be3081 in g_string_new () from /usr/lib/libglib-2.0.so
(gdb) bt
#0  0xf7be3081 in g_string_new () from /usr/lib/libglib-2.0.so
#1  0xf7a90f14 in e_make_problem (complaint=0x32 <Address 0x32 out of bounds>, 
    irritant=
        {script = 0xf7aa8ac4, data = {fixnum = 0, bignum = 0x0, chr = 0, gstring = 0x0, float64 = 0x0, refs = 0x0, other = 0x0}}) at src/elib.h:302
#2  0xf7a89bda in e_throw_pair (complaint=0x32 <Address 0x32 out of bounds>, 
    irritant=
        {script = 0x32, data = {fixnum = 0, bignum = 0x0, chr = 0, gstring = 0x0, float64 = 0x0, refs = 0x0, other = 0x0}}) at src/invoke.c:39
#3  0xf7a90878 in writer_print (self=
        {script = 0xf7aa8a9c, data = {fixnum = 138881408, bignum = 0x8472980, chr = 10624, gstring = 0x8472980, float64 = 0x8472980, refs = 0x8472980, other = 0x8472980}}, args=0xffbd7394) at src/prim.c:1198
#4  0xf7a898e6 in e_call (receiver=
        {script = 0xf7aa8a9c, data = {fixnum = 138881408, bignum = 0x8472980, chr = 10624, gstring = 0x8472980, float64 = 0x8472980, refs = 0x8472980, other = 0x8472980}}, selector=0xf7aa8ad4, args=0xffbd7394) at src/invoke.c:128
#5  0xf7a92312 in fixnum_printOn (self=
        {script = 0xf7aa8ac4, data = {fixnum = 2, bignum = 0x2, chr = 2, gstring = 0x2, float64 = 0x2, refs = 0x2, other = 0x2}}, args=0xffbd7430)
    at src/elib.h:204
#6  0xf7a898e6 in e_call (receiver=
        {script = 0xf7aa8ac4, data = {fixnum = 2, bignum = 0x2, chr = 2, gstring = 0x2, float64 = 0x2, refs = 0x2, other = 0x2}}, selector=0xf7aa8aec, 
    args=0xffbd7430) at src/invoke.c:128
#7  0xf7a90837 in writer_print (self=
        {script = 0xf7aa8a9c, data = {fixnum = 138881408, bignum = 0x8472980, chr = 10624, gstring = 0x8472980, float64 = 0x8472980, refs = 0x8472980, other = 0x8472980}}, args=0xf7dee9e0) at src/elib.h:204
#8  0xf7a92600 in writer_println (self=
        {script = 0xf7aa8a9c, data = {fixnum = 138881408, bignum = 0x8472980, chr = 10624, gstring = 0x8472980, float64 = 0x8472980, refs = 0x8472980, other = 0x8472980}}, args=0xf7dee9e0) at src/prim.c:1210
#9  0xf7a898e6 in e_call (receiver=
        {script = 0xf7aa8a9c, data = {fixnum = 138881408, bignum = 0x8472980, chr = 10624, gstring = 0x8472980, float64 = 0x8472980, refs = 0x8472980, other = 0x8472980}}, selector=0xf7dee0e0, args=0xf7dee9e0) at src/invoke.c:128
#10 0xf7db5e47 in ffi_call_SYSV ()
   from /usr/lib/python2.5/lib-dynload/_ctypes.so
#11 0xf7db5cce in ffi_call () from /usr/lib/python2.5/lib-dynload/_ctypes.so
#12 0xf7db07f4 in _CallProc () from /usr/lib/python2.5/lib-dynload/_ctypes.so
#13 0xf7da9f2a in ?? () from /usr/lib/python2.5/lib-dynload/_ctypes.so
#14 0xf7a89840 in ?? () from prefix/lib/libecru.so
#15 0xf7dd5284 in ?? ()
#16 0x00001005 in ?? ()
#17 0xf7ddb374 in ?? ()
#18 0x081ec49c in ?? ()
#19 0x00000000 in ?? ()


Here is a patch to add a GNOME-style autogen.sh script:

=== added file 'autogen.sh'
--- autogen.sh  1970-01-01 00:00:00 +0000
+++ autogen.sh  2008-07-20 19:07:10 +0000
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+cd $srcdir
+
+autoheader
+automake
+autoconf
+
+exec $srcdir/configure "$@"

Regards,
Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.