Search found 11 matches

by konrad
Tue Sep 18, 2007 4:14 am
Forum: Anything else we might add?
Topic: Parsing C Header Files
Replies: 4
Views: 4776

It's not too difficult to use the built in functionality. Simply scanning for function prototypes should be sufficient. It's not like FFIs in CL where you have to map each type to a newLISP type. Typically, if you need regular access to data in a composite C type, you would define a function that a...
by konrad
Mon Sep 17, 2007 1:36 am
Forum: Anything else we might add?
Topic: Parsing C Header Files
Replies: 4
Views: 4776

Parsing C Header Files

Is anyone trying to parse C header files to auto-import modules. what the build in (import ...) function does is a good start but not generally sufficient as in addition to functions most C libraries also expose a large number of constants and structure definitions, in some cases using preprocessor ...
by konrad
Fri Sep 14, 2007 5:18 am
Forum: newLISP in the real world
Topic: newlisp and libcaca
Replies: 6
Views: 5606

Now for the next line

Well that works. The next trick is to capture events. Not to do this the C code 1) creates a variable based on a structure 2) passes the address of the structure into a function so it can be written too. I assume that I need to (set 'ev (pack ...)) to get a correct event symbol and then I need to un...
by konrad
Thu Sep 13, 2007 11:53 pm
Forum: newLISP in the real world
Topic: newlisp and libcaca
Replies: 6
Views: 5606

Oops.

Yes Er that will be it.

I don't know how many times i've spend ages trying to debug a typo,

so here is another example. dp is what I had meant to xall the variable not db. Using longer names like display would have probably saved me on this one : )

regards

Konrad
by konrad
Wed Sep 12, 2007 3:13 am
Forum: newLISP in the real world
Topic: newlisp and libcaca
Replies: 6
Views: 5606

newlisp code

Here is my code: (context 'CUCUL) (set 'libcucul "/usr/lib/libcucul.so") (set 'funcs '( "cucul_create_canvas" "cucul_set_color_ansi" "cucul_putstr" )) (dolist (func funcs) (import libcucul func)) (set 'consts '( ("BLACK" 0x00) ("WHITE" 0x0f))) (dolist (const consts) (constant (sym (const 0)) (const ...
by konrad
Mon Sep 10, 2007 12:02 am
Forum: newLISP in the real world
Topic: newlisp and libcaca
Replies: 6
Views: 5606

newlisp and libcaca

Hi all I'm trying to get libcaca (an Ascii basically just the basic tutorial that can be found at: http://linux.die.net/man/3/tutorial However i get a segfault at the line " caca_refresh_display(dp);" running an strace shows : gettimeofday({1189337045, 203711}, NULL) = 0 I've tried running the progr...
by konrad
Fri Sep 07, 2007 10:46 pm
Forum: Anything else we might add?
Topic: Autoloading
Replies: 2
Views: 2814

At the moment I have a Context with a paths symbol that evaluates to a list.
you are correct in that this symbol should be set based on the current platform.
by konrad
Fri Sep 07, 2007 11:44 am
Forum: Anything else we might add?
Topic: Autoloading
Replies: 2
Views: 2814

Autoloading

One thing I have missed coming from python is the ability to have load find modules for me, rather than having to know where they are on they are on the filesystem. Writing somthing like this is easy. The question however is what should the searchpath be? currently I'm using: <pre> "." "./modules" "...
by konrad
Tue Sep 04, 2007 1:36 am
Forum: newLISP newS
Topic: This is ridiculous
Replies: 25
Views: 35044

(4) Integer and Float Arithmetik You can redefine the integer operators (see manual) and then you get just the same number treatment you have in other scripting languages. This is about the only critisism I would agree with. + - etc should be smarter. And by smarter I don't meen should return float...
by konrad
Sun Aug 26, 2007 12:11 pm
Forum: Anything else we might add?
Topic: newLisp Internals
Replies: 5
Views: 4601

Look foward to reading your summary,

regards

Konrad.
by konrad
Fri Aug 24, 2007 3:12 am
Forum: Anything else we might add?
Topic: newLisp Internals
Replies: 5
Views: 4601

newLisp Internals

Hi I was just wondering if there was any documentation (other than reading the source) on how the newLisp interpreter actually works and what data structures it uses to do its job?

About the only thing I seem to have been able to find is the paper on Memory Management.