Michael O'Connor | 7 Jul 15:17 2004
Picon

Re: gc problem

Is there an equivalent function to ecl_register_root()
that un-registers a C variable (once the program's
finished with it), and allows the garbage collector to
reclaim it?

Thanks,

Michael

--- Juan Jose Garcia Ripoll <jlr@...> wrote:
> It may happen that your lisp data (I assume you
> store your lisp code as 
> a list) has been garbage collected. If you did not
> store this code in a 
> lisp global variable, or register a C variable using
> "ecl_register_root(&my_c_variable)", then the
> garbage collector will not 
> find this data and at some point reclaim it for
> future use

		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
(Continue reading)

Juan Jose Garcia Ripoll | 8 Jul 08:22 2004
Picon

Re: *compile-verbose*

Julian Stecklina wrote:

> not print the forms to which they belong with
> *suppress-compiler-notes* set to true. What would be the best way to
> handle that?
>
I just saw that print-current-form is used in warnings. So warnings do
Hi Julian,

thanks for your patches, they have inspired me some further changes. I
have fixed a couple of things. For instance, the functions
print-current-form and print-emitting should not be affected by
*suppress-compiler-notes*, but rather by the variable *compiler-print*
and the flag :print from the COMPILE-FILE function. Apart from this, I
have made some other functions make use of cmperr and cmpwarning so that
the flags *compiler-verbose* and *suppress-compiler-warning* do work.

I am sorry about my lack of responsiveness in the last weeks. I am now
on "conference tour" and have almost no time nor chance to read the
e-mail or work on ECL.

Regards,

Juanjo

--

-- 
Max-Planck-Institut fuer Quantenoptik    +49/(0)89/32905-345
Hans-Kopfermann-Str. 1, D-85748        www.mpq.mpg.de/Theorygroup/CIRAC/
Garching b. Muenchen, Germany        Juan.Ripoll@...

(Continue reading)

Juan Jose Garcia Ripoll | 8 Jul 08:25 2004
Picon

[Fwd: Re: gc problem]

Michael O'Connor wrote:

> Is there an equivalent function to ecl_register_root()
> that un-registers a C variable (once the program's
> finished with it), and allows the garbage collector to
> reclaim it?
>  
>
Not yet. The problem is that the Boehm-Weiser gc. does not allow it, and 
thus, we have to keep our own pool of roots and set up a hook that scans 
them at gc time. I will take note of it.

Regards,

Juanjo

--

-- 
Max-Planck-Institut fuer Quantenoptik    +49/(0)89/32905-345
Hans-Kopfermann-Str. 1, D-85748        www.mpq.mpg.de/Theorygroup/CIRAC/
Garching b. Muenchen, Germany        Juan.Ripoll@...

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
Michael O'Connor | 14 Jul 17:02 2004
Picon

default pathname question

Hi,

I'm trying to set up a default directory in my C
application that load will use when looking for files
at runtime. In Lisp I've found the following works:

(setf *default-pathname-defaults* (make-pathname
:directory "path/to/files"))
...
(load "test.lsp")
(load "../test.lsp")
etc.

In my app, I've got:

char *lisp_path = "/path/to/files";
cl_defparameter(cl_intern(1,
make_simple_string("*DEFAULT-PATHNAME-DEFAULTS*")),
    cl_list(1, cl_pathname_directory(
        make_string_copy(&lisp_path[1]))));

But when I run this I get error "((:RELATIVE "path"
"to" "files")) cannot be coerced to a pathname.

Can someone tell me what I'm doing wrong, or if
there's a better way of doing this?

Thanks,

Michael
(Continue reading)

Marco Antoniotti | 14 Jul 19:22 2004
Picon

Re: default pathname question


On Jul 14, 2004, at 11:02 AM, Michael O'Connor wrote:

> Hi,
>
> I'm trying to set up a default directory in my C
> application that load will use when looking for files
> at runtime. In Lisp I've found the following works:
>
> (setf *default-pathname-defaults* (make-pathname
> :directory "path/to/files"))

You should read the manual for MAKE-PATHNAME

It looks like you really want

(setf *default-pathname-defaults* (make-pathname :directory (list 
:relative "path" "to" "files")))

> ...
> (load "test.lsp")
> (load "../test.lsp")
> etc.
>
> In my app, I've got:
>
> char *lisp_path = "/path/to/files";
> cl_defparameter(cl_intern(1,
> make_simple_string("*DEFAULT-PATHNAME-DEFAULTS*")),
>     cl_list(1, cl_pathname_directory(
(Continue reading)

Julian Stecklina | 25 Jul 22:07 2004
Picon

FreeBSD port

Hello,

a long time ago I submitted an ECL port to the FreeBSD ports tree. Now
it finally got included. ;)

http://www.freshports.org/lang/ecl/

So you can build ECL from source on a recent FreeBSD using portinstall
lang/ecl or ( cd /usr/ports/lang/ecl ; make install clean ) . This has
only been tested on FreeBSD 5.2-CURRENT, but should work fine on older
versions.

(This is an ECL snapshot from February. I will update it somewhen in
this week.)

Have fun,
--

-- 
Julian Stecklina 

Signed/encrypted mail welcome.  Key-ID: 0xD65B2AB5

-> GIVE stylish confetti to HEAVILY ARMED CLOWN <-
-> Heavily Armed Clown: Wheeee!!                <-
Julian Stecklina | 26 Jul 16:49 2004
Picon

Re: FreeBSD port

Julian Stecklina <der_julian@...> writes:

> (This is an ECL snapshot from February. I will update it somewhen in
> this week.)

Done. :)

Regards,
--

-- 
Julian Stecklina 

Signed/encrypted mail welcome.  Key-ID: 0xD65B2AB5

-> GIVE stylish confetti to HEAVILY ARMED CLOWN <-
-> Heavily Armed Clown: Wheeee!!                <-

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
Brian Algeri | 27 Jul 21:09 2004
Picon

New User + A Very Simple Win32 GUI example

Hi, I am a new ECL user.

I downloaded ECL a couple of days ago and have been playing around with the 
program.

Initial reaction:
Ok, Very nice program!  The documentation and examples are a little sparse, 
but
all of the information is there if you hunt through the mail-list, the 
manuals, and
the source and header files.  I also looked through the x-chat source which 
is a nice
ECL reference.

Some Background:
I started learning Lisp about two months ago after I finished reading 'Ansi 
Common Lisp'.
I have been looking for a lisp implementation which I could easly intergrate 
with C/C++.
ECL seems to do that nicely. I primarally do most of my coding on Windows OS 
machines.

ECL learning apps:
My first orientation applications were a simple Hello world standalone ECL 
application.
Then a simple standalone ECL application which called a external C library - 
DLL
static and object. I then decided to try and embed the interpreter inside a 
Win32 C
application, I created a simple toy application in which the Win32 API 
(Continue reading)

Brian Algeri | 27 Jul 21:56 2004
Picon

New User + A Very Simple Win32 GUI example Pt 2

Text of the example doc:

Build enviroment:

I am using Mingw 3.3.1 with BinUtils 2.14.90 and MsysDTK 1.0.1 and
Msys 1.0.10 on a WindowsXP machine.  I am using a cvs version of ECL
which I fetched on July-22-04 I used the 'configure -with-cmuformat
--enable-simple-conf' and 'make windows-nsi' option, but I had to
manualy copy libgc.a from the build directory as this file did not
get included in the NSI setup program. A standalone lisp app with
(c:build-program...) would not work without this library.

Some notes on build process:
I am not using the ECL program to generate the c and obj files for
this example. Not needed for this simple project. I did not need to
use the compile-file or c:build-program as I was not using the lisp2c
compiler for this project - not compiling the lisp source to a native
system object file. I created all the files with a text editor and am
using a makefile to build the project. In the past I examined all the
output from c:build-program with numerous setting using :lisp-files and
:ld-flags and :prologue-code and :epilogue-code to see what was outputed
and how everything worked and what went into the generated c file.
Along with looking at the example in the manual and all the code samples
from the mailing list.

This may or may not be optimal as I have only been using ecl for a couple
of days. You can also compile the below lisp file to a .fas file and load
that in the below example instead of the .lisp file or compile the .lisp
file and then load the .fas file within the C program -- both modifications
require small code changes to the below source, not shown.
(Continue reading)

Julian Stecklina | 27 Jul 23:40 2004
Picon

Re: New User + A Very Simple Win32 GUI example Pt 2

"Brian Algeri" <bdasp@...> writes:

> (defun get-msg-text ()
>   (values "Hello from ECL Lisp"))
>
> (defun get-msg-caption ()
>   (format nil "~a" "Lisp App Message")) ;another way to return a str

Nice introduction to ECL on Windoze. Btw, why don't you use:

(defun get-msg-text ()
  "Hello from ECL Lisp")

?

Regards,
--

-- 
Julian Stecklina 

Signed/encrypted mail welcome.  Key-ID: 0xD65B2AB5

-> GIVE stylish confetti to HEAVILY ARMED CLOWN <-
-> Heavily Armed Clown: Wheeee!!                <-

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
(Continue reading)


Gmane