Daniel Kochmański | 3 Oct 07:08 2015

Fwd: Re: [monolith builds]

Current ML is ecl-devel@..., I'm forwarding this mail there.

Daniel Kochmański writes:

> Faré writes:
>> [Adding ECL-list to this conversation, that I believe should be
>> publicly archived]
> Good idea.
>> On Fri, Oct 2, 2015 at 7:24 AM, Daniel Kochmański
<daniel@...> wrote:
>>> Hey,
>>> when fixing problem with randomized names etc I have taken a closer look
>>> at the build process. You asked earlier how ECL manages to do monolithic
>>> builds.
>>> Each module is initialized with a special function which registers the
>>> whole module and creates lisp objects. Before calling this function ECL
>>> isn't aware of the existance of it neither it has environment.
>>> Module may be composed on other modules. Builder, when constructing
>>> initialization function for "top module" gathers all submodules (object
>>> files or libraries) and parses the binary file to find special tag which
>>> contains name of functions which initialize submodules. Top module in
>>> it's initialization functions calls (beside the other things) all
>>> submodule initialization functions. Then it concatanates all of them in
>>> .a, .fasl, .so, ... files
(Continue reading)

Morgan Howe | 28 Sep 01:23 2015

More detailed embedding example

Hey guys,

I'm playing around with embedding ECL into a C program. I've followed
the blog post which was very useful, but as far as calling lisp
functions, didn't really get beyond the cl_safe_eval type operations.
I'd like to be able to get a handle to a specific lisp function, and
call that function passing some arguments. What I've tried is
basically this series of steps (omitting boot, shutdown, etc for

* cl_safe_eval some code doing (load "foo.lisp") // From the blog
example, works fine
* ecl_make_symbol("BAR", "CL-USER") // Quite sure this is where I'm going wrong
* cl_funcall the symbol from step 2, which gives me this a few times
before dropping to debugger:
Condition of type: SIMPLE-ERROR
0 is an illegal frs index.
No restarts available.

I'm sure step 2 is where I'm going wrong and the symbol I try to
retrieve is not valid, thus the issue in step 3. Sorry if this is too
basic a question, but could someone give me a working example of doing
something like this?


Attila Lendvai | 24 Sep 17:18 2015

cross compiling howto for mips-openwrt-linux


with the invaluable help of jackdaniel on #ecl, i've managed to
cross compile ecl for mips-openwrt-linux.

unfortunately i cannot edit the wiki at, so i'll write it up here. (if
anyone reads it an can give me rights, my user is attila.lendvai)

FTR, https://gitlab.com/embeddable-common-lisp/ecl/wikis/home

the bird's eye view:

 - first you need to compile ecl on the host, but making sure that
   some important variables are the same as on the target (e.g. 32/64
   bit; long long support; what else?).

 - then make clean, and configure the source tree for the target

   - ./configure will fail when run for the first time. you'll then
     need to edit 'build/cross_config' to set some variables regarding
     the target that cannot be detected automatically from the host.

 - then build it once again using a cross-compiling gcc

 - if you are not planning to have a gcc on the target, then configure
   the target with --with-bytecmp=builtin --with-cmp=no

compile for the host:

 - you may need 32 bit support: sudo apt-get install gcc-multilib
(Continue reading)

Daniel Kochmański | 22 Sep 23:16 2015


Dear all,

I've got a question - does anyone really depend on a non-C99 compliant

MSVC supports C99 from 2013 [1], GCC has complete support from 4.5 [2] (with
various bits earlier), TCC also has everything except complex numbers [3]
(what is on their TODO) and Clang has complete support [4].

I'm asking this question because we're considering making C99-supporting
compiler as a dependency for ECL C backend.

This will relieve us from writing backward-compatible workarounds for
the older standard and will simplify the code. That also means, that
various improvements will be possible and code will be easier to

Best regards,

[1] http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-library-support-in-visual-studio-2013.aspx
[2] https://gcc.gnu.org/c99status.html
[3] http://repo.or.cz/w/tinycc.git/blob/HEAD:/TODO
[4] http://clang.llvm.org/docs/UsersManual.html#id43


Daniel Kochmański | Poznań, Poland
;; aka jackdaniel

"Be the change that you wish to see in the world." - Mahatma Gandhi
(Continue reading)

bruce li | 8 Sep 18:15 2015

Safely calling lisp lambda function from C?

I'm writing a wrapper for a game engine that involves a few callbacks.
I wrap the callback in a C function so that I can pass in lambdas as
callbacks. Here is how the code looks like:

cl_object callback_wrapper(cl_object lambda, cl_object ...) {
    cl_funcall(2, lambda, some_params);

It works OK if the passed in lambda function is syntactically correct.
But it fails disastrously if the function contains errors, either
syntactically or logically and it crashes the program. I wonder if
it's possible to call the lambda function in a safer manner and when
anything is wrong, it just drops to the top-level?

A second question is... can I traverse lisp lists in C? I would like
to collect everything into a C++ vector and pass that on to the
engine's API.


Daniel Herring | 5 Sep 18:08 2015

email list subject line

Hi all,

The old mailing list had a "[Ecls-list]" prefix in the subject line.  This 
was helpful for visually scanning a mailbox and could also be used for 
filter rules.

The new list has no such prefix.  Could someone add it?  I don't care the 
exact format -- [Ecls-list], [ECL], whatever.  I would just appreciate the 


Daniel Kochmański | 4 Sep 10:50 2015



I'm little in doubt. Problem is related to ieee-floating-point
extensions, which provide infinities and nan. Everything works fine
until we generate C code, which simply breaks, because it isn't taken
into account.

There are two possible solutions:

- for these cases use constant expressions, which trigger an error on
  some compilers, that is (0.0 / 0.0) for nan, (1.0 / 0.0) for infinity

- use defined by C99 macros: INFINITY and NAN, which will work on any
  compiler supporting C99.

Using the latter is clean and elegant, but raises requirements of ECL
for C backend.

Regarding compilers, C99 is considered complete since GCC 4.5 (and
partly complete in previous versions), while MSVC implemented them with
VS2013 (however ECL runs with bytecmp, so if no additional package using
infinities is added during buildtime, there should be no problem with
using previous versions).

I'm writing to ML to ask your opionions - should we use these macros?

Best regards,


(Continue reading)

bruce li | 1 Sep 15:07 2015

Swank server dies with any error in REPL

Hi, there,
I'm pretty new to ECL. I'm currently considering embedding ECL in a
game engine. When I interactively interrupt the program and drop into
the repl, I load up swank with quicklisp and create swank server with
(swank:create-server :port 4005).  I can connect to it from SLIME. But
any error in the statement, either by deliberately typing sth wrong,
will cause swank server to close instead of dropping into the
debugging environment. I have no idea why this happens. It turns out
that if I start swank on a different thread with
mp:process-run-function, it goes well. But since the game engine is
based on OpenGL, multithreading rendering isn't an option. I wonder if
there is any way to get around the swank server and enable its
debugger when it encounters error.


Daniel Kochmański | 1 Sep 07:04 2015

Re: [Ecls-list] threading failures


that's probably my fault, sorry. I've migrated bugs manually and
probably missed this one (I remember this bug! but can't find anywhere).

I'm adding it to regression tests in repository, thanks!  Yes, old
reports are unfortunately lost.

As a sienote, please use ecl-devel@... mailing list – I'm
closing the old one today. You can subscribe here
https://mailman.common-lisp.net/listinfo/ecl-devel . All archives before
2015-08-10 are imported to the new one and gmane stream is redirected
(if you use it).


James M. Lawrence writes:

> Hello, the threading bugs I reported a while ago appear to have not
> survived the migration from sourceforge, and the old pages are now
> 404'd. There were a number of test cases, including
> (defun test (message-count worker-count)
>   (let ((to-workers (mp:make-semaphore))
>         (from-workers (mp:make-semaphore)))
>     (loop repeat worker-count
>           do (mp:process-run-function
>               "test"
>               (lambda ()
(Continue reading)

Jerry James | 31 Aug 18:02 2015

Re: [ECL][16.0.0][Release]

On Fri, Aug 28, 2015 at 5:00 AM, Daniel Kochmański <daniel <at> turtleware.eu> wrote:
> Dear all,
> since nothing serious came up, we are publishing a new release.
> Announcment:
> https://common-lisp.net/project/ecl/files/ecl-16.0.0-announcement.html
> Source distribution:
> https://common-lisp.net/project/ecl/files/ecl-16.0.0.tgz
> Windows binary installer:
> https://common-lisp.net/project/ecl/files/ecl-16.0.0-msvc-win32-installer.exe

Thanks for the new release.  I just noticed that you've apparently
abandoned the old YY.MM.DD naming scheme for release numbers.  Maybe
that happened last release, too, and I wasn't paying attention.  So
what do the version numbers mean now?

Jerry James

田中慎一 | 27 Aug 15:56 2015

Symbol 'ext:encoding-name not found


I reported a bug about external-format:

This issue is closed, but same code invoked another error.

Guys, have any information?

ECL (Embeddable Common-Lisp) 16.0.0 (git:d6dd52f0002041131af0f8c881acb6391e297da2)
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
Copyright (C) 2015 Daniel Kochmanski
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help. 
Top level in: #<process TOP-LEVEL>.
> (with-open-file (out "test.txt"
                 :direction :output
                 :external-format '(:crlf ext:cp932))
  (write-string "some string" out))
Condition of type: SIMPLE-ERROR
Cannot find the external symbol CP932 in #<"EXT" package>.

Available restarts:

1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.

Broken at SI:BYTECODES. [Evaluation of: (SI:TOP-LEVEL T)] In: #<process TOP-LEVEL>.
>> :q


Thank you,

Ecls-list mailing list