Re: Announce: ErsatzLisp (Java PicoLisp)

2011-12-09 Thread Alexander Burger
On Fri, Dec 09, 2011 at 07:56:52AM +0100, Alexander Burger wrote: nice to have a link to this kind of Ersatz documentation from the wiki. Good idea. I can prepare a first version. Here is my first try: http://picolisp.com/5000/!wiki?ErsatzReflection It can also be found via the

Re: Announce: ErsatzLisp (Java PicoLisp)

2011-12-08 Thread Alexander Burger
Hi Jon, Is the update below what's available on Ersatz documentation? I couldn't find this info anywhere else. I think it would have been Yes, I think that's all :( nice to have a link to this kind of Ersatz documentation from the wiki. Good idea. I can prepare a first version. You might

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-12-03 Thread Tomas Hlavaty
Hi Alex, (java javax.swing.JFrame T Animation) or (interface java.awt.event.MouseListener ... In wl, there is no need for this because I can do this at read-time, like the above example: `(jclass java.lang.System) Also, I can do it only once, see the 'import' function

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-12-03 Thread Alexander Burger
Hi Tomas, But my original point was, can you use Class instances directly in ErsatzLisp? E.g. something like No, I didn't want to go that far. I just pass the class names. After all, the dynamic lookup of the class during reflection is neglectible compared to the rest of the overhead. You

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-12-02 Thread Tomas Hlavaty
Hi Alex, BTW, how can I access existing objects (like java.lang.System.err) in wl? I can only find 'jnew', which creates new objects. Like this: (jfield `(jclass java.lang.System) 'err) There are some useful functions defined in java.wl file, implemented in picolisp instead of in native

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-12-02 Thread Tomas Hlavaty
Hi Alex, However, I see that in the function 'jarg' you are doing the same (check for all kinds of types). yes, it happens in Java methods: 'jarg' and 'isInstance'. These are necessary to automatically handle primitive types and I think it is impossible to reduce it further while preserving

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-12-02 Thread Alexander Burger
Hi Tomas, I cannot see, though, whether you also handle a mapping of Lisp lists from/to Java arrays, which doubles the code in the case of ErsatzLisp. I think there are two functions: 'jv2l' and 'jvector'. I see. I cannot find out how it works, however. I tried: : (setq S (jnew

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-30 Thread Tomas Hlavaty
Hi Alex, look at lines 99 through 142 of ersatz/fun.src (actual version), you see a lot of tedious type ('instanceof') checks. And they don't even cover all possible cases! The same would be required for the opposite direction. Or does anybody know a better way? I say that the above

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-18 Thread Jon Kleiser
Hi again, On 04-11-10 19:53 , Alexander Burger wrote: Hi all, here is an update. Besides the basic I/O system and half-baked network functions (until now only 'connect', 'accept' and a partial 'port'), we have now a set of functions interfacing to the Java Reflection API. I'd like to

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-18 Thread Alexander Burger
Hi Jon, (public 'obj 'any) - obj Returns the value of a public field 'any' in object 'obj' (public 'cls 'any) - obj Returns the value of a public field 'any' in class 'cls' I would suggest that this 'public' function should allow multiple any's, so that you can do

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-18 Thread Jon Kleiser
Hi Alex, I'll try to find an example to test it. ;-) /Jon On 18-11-10 09:50 , Alexander Burger wrote: Hi Jon, (public 'obj 'any) - obj Returns the value of a public field 'any' in object 'obj' (public 'cls 'any) - obj Returns the value of a public field 'any' in

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-18 Thread Jakob Eriksson
On 11/17/2010 06:13 PM, Alexander Burger wrote: But more important is that this would require quite a mess of code, analog to what is there for getting the values of public fields. If you look at lines 99 through 142 of ersatz/fun.src (actual version), you see a lot of tedious type

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-18 Thread Alexander Burger
On Thu, Nov 18, 2010 at 04:11:24PM +0100, Jakob Eriksson wrote: look at lines 99 through 142 of ersatz/fun.src (actual version), you see a lot of tedious type ('instanceof') checks. And they don't even cover all possible cases! The same would be required for the opposite direction. Or does

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-17 Thread Jon Kleiser
Hi Alex, In your description below I can see no way to - set a value of a public field of an object, or - set a value of a public field of a class Is this something that you may add later? /Jon On 04-11-10 19:53 , Alexander Burger wrote: Hi all, here is an update. Besides the basic I/O

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-17 Thread Alexander Burger
Hi Jon, In your description below I can see no way to - set a value of a public field of an object, or - set a value of a public field of a class You are right. Is this something that you may add later? Hmm, I would actually prefer not to add it. For one thing, the political correct way in

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-17 Thread Alexander Burger
Hi all, now I simplified the file structure of Ersatz PicoLisp a little, to make it better usable as a stand-alone system. The start-up script 'erl' (as it was described in ersatz/README and INSTALL) doesn't exist any longer, and it now can (or should) be started directly as $

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-17 Thread Alexander Burger
On Wed, Nov 17, 2010 at 06:54:52PM +0100, Alexander Burger wrote: Anyone care to try it under another OS, e.g. Windoofs? This would probably require making a batch file ersatz/picolisp.bat, along the line of ersatz/picolisp. The PID is probably not available there, so some arbitrary number

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-17 Thread Alexander Burger
On Wed, Nov 17, 2010 at 07:58:20PM +0100, Alexander Burger wrote: java -DPID=42 -jar picolisp.jar -on *Dbg lib.l Further simplified now: The (on *Dbg) moved to lib.l. Thus java -DPID=42 -jar picolisp.jar lib.l is enough now. Cheers, - Alex -- UNSUBSCRIBE:

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-17 Thread Mansur Mamkin
I've just tried it on my Windows 7 (64bit) with JRE 1.6.0_22 (32bit) It works fine, the only thing is java is not in my PATH, so I needed to write full path to java.exe :) C:\Program Files (x86)\Java\jre6\bin\java.exe -DPID=42 -jar picolisp.jar lib.l On Wed, Nov 17, 2010 at 07:58:20PM +0100,

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-15 Thread Jon Kleiser
Hi Alex, I've now had the chance to test your latest ErsatzLisp, on a Linux machine. When I tried (data @) in your Example below, I got data -- Undefined. Did you change something lately? Will this 'java' function be documented somewhere? ;-) Do you now if it would be possible, or easy, to

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-15 Thread Alexander Burger
Hi Jon, machine. When I tried (data @) in your Example below, I got data -- Undefined. Did you change something lately? Will this 'java' Oops, yes. 'data' is now also covered by 'java': (java 'obj ['cnt]) - any This correspends to the old 'data' function. (java 'obj 'msg 'any ..)

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-05 Thread Jon Kleiser
Hi Alex, This looks very interesting. However, I have some problems building ersatz on my Intel Mac: ..:picoLisp jkleiser$ (cd ersatz; ./mkJar) PicoLisp.java:15: cannot find symbol symbol : class Console location: class PicoLisp final static Console Term = System.console();

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-05 Thread Alexander Burger
Hi Jon, This looks very interesting. However, I have some problems building ersatz on my Intel Mac: ..:picoLisp jkleiser$ (cd ersatz; ./mkJar) PicoLisp.java:15: cannot find symbol symbol : class Console I see. java.io.Console is avaliable only in Java 1.6 or higher. That's why I wrote

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-05 Thread Jakob Eriksson
On 11/05/2010 10:56 AM, Alexander Burger wrote: Too bad. Is there no up-to-date JRE available for the Mac? Should be: http://discussions.apple.com/thread.jspa?threadID=2315116tstart=1 http://www.piranhamethod.com/2010/04/installing-jre-1-6-on-your-mac-os-x-leopard-10-5-8-or-later/ // Jakob

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-05 Thread Jon Kleiser
On 11/5/10 10:56 AM, Alexander Burger wrote: Hi Jon, This looks very interesting. However, I have some problems building ersatz on my Intel Mac: ..:picoLisp jkleiser$ (cd ersatz; ./mkJar) PicoLisp.java:15: cannot find symbol symbol : class Console I see. java.io.Console is avaliable only

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-05 Thread Alexander Burger
Hi Jon, In PicoLisp, it is legal to compare data items of arbitrary type. How do ersatz compare arbitrary Java classes and objects to other PicoLisp types? Are they less than T? Less than Numbers? They are larger than numbers, and less than T, because they are normal anonymous symbols (like

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-11-04 Thread Alexander Burger
Hi all, here is an update. Besides the basic I/O system and half-baked network functions (until now only 'connect', 'accept' and a partial 'port'), we have now a set of functions interfacing to the Java Reflection API. I'd like to describe them shortly, and hear your opinions. You can try it if

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-10-31 Thread Jakob Eriksson
On Sat, Oct 30, 2010 at 07:07:01PM +0200, Alexander Burger wrote: Hi all, the Java version of PicoLisp, which is part of the testing release since a few weeks, is now in a state where I dare to say that the language is usable (just the plain language). Very cool! In the near future I

Re: Announce: ErsatzLisp (Java PicoLisp)

2010-10-31 Thread Alexander Burger
Hi Jakob, I don't think you need to include fork. Yeah, it is a bit heavy. It would mean to start a new thread, and copy all Lisp data. Not really difficult though. Database support should be possible, I guess, but I am not sure about locking. Locking _might_ work with