Re: Pico, OpenGL menus, refresh problem

2008-04-02 Thread Alexander Burger
On Wed, Apr 02, 2008 at 10:11:49AM +0200, Jon Kleiser wrote: A tarball is now avilable here: http://folk.uio.no/jkleiser/pico/gl.tgz Many thanks! Works perfectly! Cheers, Alex

Re: PDF Functionality

2008-04-07 Thread Alexander Burger
Hi John, Does pico have PDF functions? I was considering implenting something in that area. There is lib/ps.l. It is a set of functions that generate PostScript pages, which are then usually converted to PDF (or directly sent to a printer). The primary function for that is 'psOut'. You can

Re: Pico, EOF Overrun

2008-04-09 Thread Alexander Burger
Hi Jon, behaviour ;-), so I probably should use something else than 'str' for this. ... (de ifwarnfile (Path) (in Path (ifwarn (str (till NIL T ) How about, for example, (in Path (while (read) (ifwarn @) ) ) Cheers, Alex -- Software Lab. Alexander Burger

Re: Subscribe

2008-04-10 Thread Alexander Burger
Hi Tomas, can I subscribe to the picolisp mailing list? Sure. It already happened (automatically). Welcome! Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

Re: Pico, difficulty with circular lists

2008-04-10 Thread Alexander Burger
), but it cannot solve all problems. An improved solution could keep a list of cells during traversal, to detect at least a circularity up to a certain size. Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

Re: Pico, difficulty with circular lists

2008-04-11 Thread Alexander Burger
On Fri, Apr 11, 2008 at 04:46:14PM +0200, Alexander Burger wrote: Exact. The function 'MUL' is defined before that, but as you just read the file (without executing it), it will be undefined when you hit that read macro. Well, and while thinking about it: Inspecting files in such a way

Re: bug: (cadr (cons 1 2)) = Segmentation fault (core dumped)

2008-04-19 Thread Alexander Burger
Hi Henrik, You're trying to access unassigned memory in your examples, C would crash if you went out of bounds on an array too. The only viable options you have in Thanks for the comment. Let me add an explanation why this access to unassigned memory happens in the first place. In the call

Re: The Bipolar Lisp Hacker - Test

2008-05-13 Thread Alexander Burger
Hi Randall, you are right. There must be an empty line to delimit the header. I changed misc/mailing, it should be correct now. Thanks! - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Pico, handling requests from jQuery

2008-05-18 Thread Alexander Burger
Hi Jon, You can also encode numbers, internal+external symbols, and simple lists, if you use 'ht:Fmt' (or 'mkUrl'). : (pack http://localhost:8080/@json?; (ht:Fmt 123 'abc (4 5 6))) - http://localhost:8080/@json?+123$abc_+4_+5_+6; That's nice, but more useful when the request

Re: Pico, (locale XY) error handling?

2008-05-20 Thread Alexander Burger
Hi Jon, : (locale NO) !? (load (if (setq *Ctry Ctry) (pack @loc/ @) @loc/NIL)) loc/NO open: No such file or directory Does Pico Lisp have an error handling mechanism that can handle errors like this? Unfortunately, not after they occurred, in the sense of catching them programmatically.

Re: Pico, handling requests from jQuery

2008-05-27 Thread Alexander Burger
Hi Jon, properly. I get the + in Pico Lisp. Therefor I cannot know whether a + in Pico Lisp originated as a + or a space. I think the plus-to-space decoding has to be done at the same time as the %xy decoding. Or ... OK, I understand. As the %xy decoding happens in 'ht:Pack', you could

Re: Contriving a static variable.

2008-06-12 Thread Alexander Burger
On Fri, Jun 13, 2008 at 01:14:04PM +1000, konrad Zielinski wrote: I've been trying to get my head around how closures work in Pico lisp. As PicoLisp uses dynamic binding, there are no _direct_ static lexical clausures. As in other cases too, the programmer has to (or better: can) control things

Re: Pico, localizing inflections

2008-06-18 Thread Alexander Burger
Hi Jon, I'll try to explain a little better. In Chinese Checkers there are pieces I see. However, I still believe the problem results mainly because you try to build the message from individual words. Probably because you construct the messages at runtime. Here are the involved lines from my

Re: PicoLisp License

2008-06-27 Thread Alexander Burger
Hello Andrei, On Fri, Jun 27, 2008 at 01:15:13PM +0300, Andrei Ivushkin wrote: Dear Alexander, Please explain GPL license of PicoLisp and possibility for using it in commercial applications. Thank you. Please explain GPL license of PicoLisp and possibility for using it in commercial

Re: At shared hosting

2008-07-03 Thread Alexander Burger
Hi Anthony, Due to frustrations working with Pico Lisp on MacOSX10.5 I recently sorry to hear that ... we obviously did not succeed to find a unified 'make' process for Mac OS. creating a Pico Lisp init.d script within Debian possibly with a I think the script can be very simple. Here

Re: problem reading XML

2008-07-26 Thread Alexander Burger
Hi Tomas, It is legal to have comments before the root element (case b.xml). You are right. Comment handling is buggy here. Initially, the XML parser did not support comments at all, and they were introduced later rather listlessly. Just for completeness, because I never needed them. (This is

Re: 'date' and 'time'

2008-08-19 Thread Alexander Burger
Hi Andrei, (date) When called with a T argument, the current Coordinated Universal Time (UTC) is returned. (time) When called with a T argument, the time of the last call to date is returned. I need to obtain current UTC not only for date but also for time. How do I? You can use a

Re: Getl and maps behavior?

2008-08-21 Thread Alexander Burger
Hi Henrik, The main problem is that I need to be able to handle an arbitrary object and convert all Ts to true, and NILs to false in the JSON string. With the NILs we run into a problem, because a property value of NIL means that this property does not exist. So it can never be extracted from

Re: Getl and maps behavior?

2008-08-22 Thread Alexander Burger
Hi Tomas, Alex, why does getl return a list of (property-value . property-name) and not a list of (property-name . property-value)? There are some practical reasons for representing the elements of property lists in such a way. Most of all, a cell can be passed to functions that expect a

Re: gui +Radio

2008-08-22 Thread Alexander Burger
Hi Tomas, though I did not find the time yet to try your +Radio component, I'd like to touch on two points: ## to be the first for HTML rendering and return NIL value. *Radio ## must be set to NIL before a form is rendered. (default *Radio NIL) 1. (default .. NIL) has no effect, (off

Re: Getl and maps behavior?

2008-08-22 Thread Alexander Burger
Hi Tomas, Isn't it just because it was implemented this way? I mean these functions could be implemented to behave the same way even if getl returned a list of (property-name . property-value) which in this case Ah, there is a misunderstanding. I was not talking especially about 'getl', but

Re: gui +Radio

2008-08-23 Thread Alexander Burger
Hi Tomas, now I tried some of the proposals I made. 1. We can avoid the group association list completely, if we store a '+field' reference into components that are not the group leader. 2. We can directly use the 'radio' function, simplifying the code a little Regarding that, here's a

Re: gui +Radio

2008-08-23 Thread Alexander Burger
Actually, the 'set' and 'val' methods are also not needed. The reduces '+Radio' to: (class +Radio +field) # grp val lbl # (grp val [lbl]) (dm T (Grp Val Lbl) (super) (=: grp (field Grp)) (=: val Val) (=: lbl Lbl) ) (dm

Retry: New 'script' function

2008-09-09 Thread Alexander Burger
Hi all, Sorry to bother all who already saw this posting. However, due to a misconfiguration on my server not all members received it, and it was not archived on www.mail-archive.com. So this was the message: Hi all, it is

Re: +BlobField appends new lines

2008-09-16 Thread Alexander Burger
Hi Tomas, I found that +BlobField appends a new line any time the content is changed. You can replicate it by editing in app/cusu memo field. If Strange. I cannot reproduce that. Also, I never observed that effect anywhere else, despite we are using +BlobField relatively often. Which

Re: jQuery again

2008-09-25 Thread Alexander Burger
Hi Henrik, nice but now we have something simpler, a POST on the same domain, i.e. http://localhost:8080. I observed similar problems when sending a POST to the lib/form.l framework. There it works, however, because that framework falls back to a (non-Ajax) HTTP-POST when the first try fail.

Re: Upload fields?

2008-09-25 Thread Alexander Burger
Hi Henrik, Another question, I have a small upload form I want to use, again without (action) or (app), is this possible? Here is a simple example: #!bin/picolisp lib.l (load ext.l lib/http.l lib/xhtml.l) (de start () (html

Re: deploying multiple picolisp web applications

2008-09-26 Thread Alexander Burger
it down to a simple example. Here is home.l: # 26sep08abu # (c) Software Lab. Alexander Burger # *DNS *Dom (allowed () @home favicon.ico ) (load lib/http.l) (de main () (setq *DNS (mapcar '((Dom

Re: Subscribe

2008-10-02 Thread Alexander Burger
Hi John, Henrik, I wish I'd known about your website earlier. Perhaps Alex can link to it so it's more googleable? You are right. Somehow I believed that I did that already, but it seems I forgot to actually do it. On Wed, Oct 01, 2008 at 07:23:32PM +0700, Henrik Sarvell wrote: Google has

Re: deploying multiple picolisp web applications

2008-10-03 Thread Alexander Burger
Hi Tomas, It I use httpGate on port 80, I also lose all logging as done by Apache, for example, and cannot use things like webalizer (web log statistics tool) any more. Right, this is quite a disadvantage. Isn't httpGate opening potential security hole tunneling through to any port

Re: Idx lists with symbol - values, value lost in db

2008-10-04 Thread Alexander Burger
Hi Henrik, the word is the key and the count the value. When storing in the database somehow the value (count) gets lost and I have no idea why. This is probably my fault. I gave you a bad advice :-( The idx'ings and countings work all fine, and the counted values are stored in the value of

Re: v2.3.3 and v2.3.4 core dump at gc.c:68

2008-10-04 Thread Alexander Burger
Now I found it! (pool bad.db) (do 200 (new T) (gc)) If you put this into a file named bad.l, and call $ bin/picolisp bad.l Segmentation fault This crashes reproducibly when bin/picolisp was compiled with

Re: using the http server to return xml

2008-10-04 Thread Alexander Burger
On Sat, Oct 04, 2008 at 10:22:49PM +1000, konrad Zielinski wrote: I'm guessing this means that Mime remains whatever it was when server started and my setting of mime was taking place in a forked process for the request, and hence was not actually affecting anything. I am Yes, this was

Re: using the http server to return xml

2008-10-04 Thread Alexander Burger
Hi Konrad, xml files arround like this I guess I can make these settings globally for the application. I'm not entierly sure what the implications are. It is possible to set '*Http1' and '*Chunked' globally, but you must sure that this takes place each time after a HTTP GET or POST request,

Re: behavior of +Need

2008-10-05 Thread Alexander Burger
Hi Ballona! I don't know if I'm missing something here, but see the example below: Your example looks perfectly ok :-) # I know I shouldn't do this, but it's only to keep it simple (show '{1}) ... You are right in that it is not recommended to refer to external objects explicitly in a

Re: jQuery again

2008-10-05 Thread Alexander Burger
Hi Henrik, The above works flawlessly with Apache + PHP. Surely jQuery will do that right, but still I do not understand where the problem might lie in the PicoLisp server. The tracing definitely shows that the HTTP header arrives, but the following POST data (a single line) don't. The

Re: Idx lists with symbol - values, value lost in db

2008-10-05 Thread Alexander Burger
On Sun, Oct 05, 2008 at 05:22:37PM +0700, Henrik Sarvell wrote: (class +Awords +Entity) (rel words (+Key +List)) (rel counts (+List)) ... [idxtest.l:2] !? (extra Var (cdr Lst)) T -- Bad extra Oops, sorry, my fault! It should have been (rel words (+List +Key +String)) (rel counts

Re: v2.3.3 and v2.3.4 core dump at gc.c:68

2008-10-05 Thread Alexander Burger
On Sat, Oct 04, 2008 at 10:58:58PM +0300, Andrei Ivushkin wrote: Funny enough. I've just downloaded and compiled picolisp-2.3.4 on Zenwalk ... and bad.l script works fine. Good to hear that. I still hope that this bug is restricted to the GCC version distributed with Ubuntu. I quite frequently

Re: jQuery again

2008-10-05 Thread Alexander Burger
On Sun, Oct 05, 2008 at 02:41:33PM +0700, Henrik Sarvell wrote: http : 5 line : line = (P O S T / @ a j a x T e s t H T T P / 1 . 1) _htHead : ... _htHead = NIL line : So this is exactly what I expected. Why does Firefox send the HTTP header, but not the following

Re: v2.3.3 and v2.3.4 core dump at gc.c:68

2008-10-05 Thread Alexander Burger
On Sun, Oct 05, 2008 at 04:34:09PM +0700, Henrik Sarvell wrote: friction as possible which I get from Ubuntu, is there another distro which will give me the same ease of use? Not sure. Ubuntu is really nice, and clever usually when it comes to hardware detection. Knoppix is an alternative,

Re: jQuery again

2008-10-05 Thread Alexander Burger
Hi Henrik, The above works just fine, however when changing the GET to POST I run in to the same stalling problem as I did before. Is there a reason why xmlHttp.open(GET, http://localhost/@ajaxTest;, true); xmlHttp.send(null); When you changed GET to POST, did you also make sure to

Re: Asyncronous IO

2008-10-08 Thread Alexander Burger
Hi Konrad, sufficently abstract the URL space from the physical disk. Most other mature frameworks allow your to creat a completly virtual url space which has no relation to physical files on disk. The way the forms.l maps a full path to its javascript file and puts it in the output Hmm,

Re: Asyncronous IO

2008-10-08 Thread Alexander Burger
On Wed, Oct 08, 2008 at 09:55:16PM +1100, konrad Zielinski wrote: I belive the issue is that I have actually installed picoLisp under usr/local but don't use it exclusivly from that directory. As such I Ah, yes, in that case the path gets expanded. I didn't think about that, because I always

Re: Asyncronous IO

2008-10-08 Thread Alexander Burger
Hi Tomas, I do not think Konrad could achieve single process/thread http server without a bit of coding in C. PicoLisp I/O operations block I think Not necessarily. If we use the select() mechanism provided by '*Run' and 'task', you can make input operations like 'listen', 'accept', 'read',

Re: Asyncronous IO

2008-10-08 Thread Alexander Burger
Hi Tomas, I don't think alarm is good enough though. It is good for timeouts but not for schedulling. True. I would not use if for scheduling, though, but to terminate operations which might possibly take too long (e.g. 'connect' to another server). BTW: I found a typo in

Re: picoWiki

2008-10-08 Thread Alexander Burger
Hi Tomas, I am implementing a wiki in picoLisp, see http://logand.com/picoWiki Good idea! However, I did not succeed to connect (yet?). Do you think it would be useful for the picoLisp comunity (can we call it that way yet?) Hehe, perhaps better call it a com-mini-ty ;-) Cheers, - Alex --

Re: picoWiki

2008-10-08 Thread Alexander Burger
http://logand.com/picoWiki Ah, now it works! Seems I just had a temporary network problem. Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Asyncronous IO

2008-10-08 Thread Alexander Burger
Hi all, oops, sorry! Forget what I wrote: A .html file will be directly sent to the client, without any forking. And also .l files do not automatically cause the fork, but only if (app) is called during their execution. This was wrong. The 'server' function in lib/http.l will always fork

Re: Asyncronous IO

2008-10-09 Thread Alexander Burger
Hi Tomas, Not necessarily. If we use the select() mechanism provided by '*Run' and 'task', you can make input operations like 'listen', 'accept', 'read', 'rd' etc. non-blocking. select() does not make thinks non-blocking as far as I am aware. It just wakes up the process when

Re: Asyncronous IO

2008-10-09 Thread Alexander Burger
Hi Konrad, your response to Tomas's questions dosn't seem to have made it to the list. This is strange. I did receive it back, and it appeared in the archive. How can that be? Is it possible that it got lost in some spam filter? Most of the documentation I have seen seems to suggest that

Re: picoWiki

2008-10-09 Thread Alexander Burger
Hi Tomas, class=i href=?ChangesChanges/a, w3m will interpret it as http://logand.com/?Changes. It works in Firefox though, i.e. it opens http://logand.com/picoWiki?Changes page as intended. Just tried with both w3m and firefox, and both seem to work well :-) Cheers, - Alex -- UNSUBSCRIBE:

Re: Asyncronous IO

2008-10-09 Thread Alexander Burger
On Thu, Oct 09, 2008 at 11:03:06AM +0200, Alexander Burger wrote: I'll try this out soon. It will probably involve only the removal of the blocking(YES, ex, sd2); calls in src/net.c, and additional checks for EAGAIN after some read() calls. Does anybody see a problem

Re: Asyncronous IO

2008-10-09 Thread Alexander Burger
On Thu, Oct 09, 2008 at 08:12:28AM +0200, Alexander Burger wrote: Under Linux, select() may report a socket file descriptor as ready for reading, while nevertheless a subsequent read blocks. This could for example happen when data has arrived but upon examination has wrong checksum

Re: Asyncronous IO

2008-10-09 Thread Alexander Burger
Aarrgh ... Sorry, this was complete nonsense! I get into a busy waiting loop with that. I have to change it back, the old version was correct. Sorry for the confusion, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Asyncronous IO

2008-10-09 Thread Alexander Burger
Hi all, Sorry for the confusion, Let me try to explain the situation: In the present system, it does not help at all to put the socket into non-blocking mode. The reason is that select() is conceptionally separated from read(). After select() signals (correctly or incorrectly) that data are

Re: Asyncronous IO

2008-10-10 Thread Alexander Burger
Hi Tomas, I attach a simple non-blocking echo server. There are some functions Nice! Conceptually it should not block, I am not sure how to test it though. Any ideas? Positive testing works well: abu:~/pico ./p dbg.l nb-ex.l : (more *Run) (5 (when (accept @) (task @ Sock @

Re: Asyncronous IO

2008-10-10 Thread Alexander Burger
Hi Konrad, But the underlying select function also provides non blocking writes. so that you can dely trying to write to a socket until it is ready for more data. Yep, this is also needed. It would appear that task and *Run have no way of using this part of the select function. Right.

Re: Cutting a circular list.

2008-10-11 Thread Alexander Burger
Hi Konrad, Well thats two improvements to the documentation. Perhaps a perfect candidate for the Wiki? The description of set says: Stores new values any in the var arguments. I suspect it should say what you said above. Well, I wanted to avoid such a verbose description in the

Re: Cutting a circular list.

2008-10-13 Thread Alexander Burger
Hi Konrad, I would say that there are some functions where additional verbosity is warranted. the function for assigning values is one such place. Especially when the acutal behaviour may not be what people with Lisp experience expect. While succinctness is good in documentation, it is

Re: picoWiki

2008-10-13 Thread Alexander Burger
Hi Randall, I think that the original author of picolisp may be concerned that he gives up the documentation, and is left in one or two years with a mess. No problem at all! I'm happy for any third party documentation, providing for possibly different and additional views (as, for example,

Re: multipart/x-mixed-replace

2008-10-14 Thread Alexander Burger
Hi Tomas, I am wondering whether there is a way to end the loop without crashing? I tried (loop ... (NIL (flush))) but that does not work and Oops. This is the right way to go, and is supposed to work. There is obviously a bug in the PicoLisp kernel. I must investigate it more closely, but I

Re: multipart/x-mixed-replace

2008-10-14 Thread Alexander Burger
On Tue, Oct 14, 2008 at 11:06:59AM +0200, Alexander Burger wrote: wait : 1000 close : 6 close = 6 wait = NIL 23078 SIG-11 Well, now the situation is clear to me. I would not call it a bug in the PicoLisp kernel, though crashing with a segmentation violation when

Re: Cutting a circular list.

2008-10-14 Thread Alexander Burger
Hi Konrad, I decided to re-implemtn the fifo function using these primitives. Good idea! This will give a lot of useful and practical examples. (de my-fifo (Fifo Item) (let RealFifo (eval Fifo) (if Item (if RealFifo # Adding to a Fifo (let NewHead

Re: multipart/x-mixed-replace

2008-10-14 Thread Alexander Burger
On Tue, Oct 14, 2008 at 08:58:53AM +0200, Alexander Burger wrote: So the problem must have to do with the background event handling in 'wait'. I suspect that the socket is closed in between. Yep. I inserted the lines (load @dbg.l) (trace 'wait) (trace 'close) (server 8080 @start

Re: Status of 64 picoLisp

2008-10-15 Thread Alexander Burger
Hi Konrad, I was just wondering what the current status of 64 bit picolisp is. The good news: It is under work since more than one year now :-) The bad new: I'm afraid it will still take quite a while :-( I do not want to go public with it before I'm sure that most details are settled down.

Re: Status of 64 picoLisp

2008-10-16 Thread Alexander Burger
On Wed, Oct 15, 2008 at 10:27:59PM +0100, Tomas Hlavaty wrote: your 64 bit Linux fine. You'll need to add the -m32 option to gcc.l .. or download the latest testing version. -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Status of 64 picoLisp

2008-10-16 Thread Alexander Burger
Hi Tomas, I was curious to try picolisp bignums and must say that for somebody doing anything serious, it is probably rather inefficient. As a I'm aware of that. The bignum implementation was not intended to be particularly fast, or - to put it corrrectly - cannot be expected to be very fast

Re: Status of 64 picoLisp

2008-10-16 Thread Alexander Burger
On Thu, Oct 16, 2008 at 10:24:40PM +1100, konrad Zielinski wrote: And now back to questions about 64 bit picolisp: Is switching to an assembler going to mean the demise of gcc.l ? Are we going to see inline picoLisp Assembler instead?O Yes, the current version of gcc.l will not work any

Re: Status of 64 picoLisp

2008-10-16 Thread Alexander Burger
Hi Tomas, Yes, the current version of gcc.l will not work any longer :-( What is the reason for this not being possible? I though C and asm can be linked together (C is compiled to asm anyway). On the instruction level this is correct, but the calling conventions of the (assembly)

Re: Cookie question

2008-10-18 Thread Alexander Burger
Hi Henrik, separate problem, I want to jump to http://localhost:8080/@desktop but the GUI stuff is overriding something so I end up for instance at http://localhost:54688/@desktop. Yes. This is because the browser assumes a local URL and thus uses the base href to produce the full address.

Re: +UrlField

2008-10-18 Thread Alexander Burger
Hi Tomas, +UrlField is missing from lib/form.l. Was that intended? Oops, sorry! The old subclass of +TextField (class +UrlField +TextField) with the derived classes (class +HttpField +UrlField) (class +MailField +UrlField) is now a prefix class (class +Url) used

Re: Pipe and http

2008-10-19 Thread Alexander Burger
On Sun, Oct 19, 2008 at 12:04:12PM +0200, Alexander Burger wrote: Trying (trace 'pipe) in the server Ah, this does not work. Only normal functions (that evaluate all their arguments) can be traced. 'trace' is not intelligent enough to know how built-in functions evaluate their arguments

Re: Pipe and http

2008-10-19 Thread Alexander Burger
Hi Tomas, 'pipe' worked fine except when run in a server which returned NIL. This would indeed be a bug in the PicoLisp kernel. Do you think you can construct a simple, stand-alone example that demonstrates this effect? Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: lib/xml.l rw------- permission in picoLisp-2.3.4

2008-10-19 Thread Alexander Burger
Hi Tomas, the file lib/xml.l has different permissions that other files in picolisp-2.3.4 and the permissions changed with the new version. Oops, sorry! Must have to do with the fact that I originally received that file by mail from you ;-) Fixed from now on. Cheers, - Alex -- UNSUBSCRIBE:

Re: Variable number of arguments in SVG functions

2008-10-20 Thread Alexander Burger
Hi Jon, then the calls would very often have a lot of NIL arguments, which looks rather ugly. Should I switch to property lists? Any suggestions? How about the following? (de text Prg (prin text) (while (atom (car Prg)) (prin (pop 'Prg) =\ (eval (pop 'Prg) 1) \) )

Re: Status of 64 picoLisp

2008-10-21 Thread Alexander Burger
On Tue, Oct 21, 2008 at 09:20:30AM +1100, konrad Zielinski wrote: THe interesting thing will be handling C structs. As almost every interesting C API makes heavy use of them. Well, you know, I don't want to discuss such things prematurely. But as you insist ... ;-) Consulting my last year's

Re: Some questions about the Pico Lisp Interpreter

2008-10-21 Thread Alexander Burger
On Tue, Oct 21, 2008 at 12:28:42AM +0100, Tomas Hlavaty wrote: http://logand.com/picoWiki/trampoline so feel free to comment on it. Beautiful! -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Variable number of arguments in SVG functions

2008-10-21 Thread Alexander Burger
Hi Tomas, maybe it could become part of lib/xml.l? I would use it as it looks more convenient than building list for 'xml' function in some cases. I'm not sure. It might be convenient, but it makes 'xml' asymmetrical. Are you thinking of a separate 'xml' function? It should be tried in

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Alexander Burger
On Wed, Oct 22, 2008 at 04:47:36PM +0100, Tomas Hlavaty wrote: (de foo Prg (let At (up @) (when (car Prg) (let @ At (run (cdr Prg)) : (and 2 (foo T (+ 1 @ 3))) - 6 Yep. In that case, you can even omit the 'up', as '@' is not modified yet. And the 'let's

Let's extend 'eval' and 'run' (was: Variable number of arguments

2008-10-24 Thread Alexander Burger
On Thu, Oct 23, 2008 at 10:34:49AM +0200, Alexander Burger wrote: On Wed, Oct 22, 2008 at 05:52:14PM +0100, Tomas Hlavaty wrote: Well, I think this version has one important limitation: if Prg has a recursive call(s) to foo, the deeper foo won't see any values set by the foo above

Re: Select with OR clause

2008-10-31 Thread Alexander Burger
Hi Henrik, oops, sorry, didn't notice a small glitch! An additional level of parentheses is missing! It must be: (((a1 +Similarity @A a2 +Similarity @A))) Explanation: The single generator clause is (a1 +Similarity @A) then the OR clause is ((a1 +Similarity @A a2 +Similarity @A))

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
On Sun, Nov 23, 2008 at 10:29:35AM +, Tomas Hlavaty wrote: What about using 'peek' on the last char? Yes, this might do. A C function 'char1' might be fastest fix probably. Or 'ht:Read' in src/ht.c, usable as: (ht:Read *ContLen) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
On Sun, Nov 23, 2008 at 01:16:55PM +0100, Alexander Burger wrote: Let me investigate a solution like (ht:Read *ContLen), returning a single-char-line for a given number of bytes. OK, I've built this now. The 'ht' library has a new function 'Read'. I had also to change lib/form.js (remove

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
Hi Tomas, you to get http query vars in assoc list (see *HtVars and *HtVarsHook). Sometimes it is possible to make application-specific changes or extensions dynamically at application startup, without the need to modify the system files. For example, your extension of '_htSet' (de _htSet

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
Henrik + Tomas, many thanks for pointing out this bug! I feel much better now :-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: http server hangs on post without enctype=multipart/form-data

2008-11-23 Thread Alexander Burger
Hi Tomas, I would expect 'char' to block and return next character when available and 'peek' return the next character if available otherwise return nothing without blocking. On that level there is no concept of blocking. Data are read as a logical stream. Something similar to what you

Re: cookie parsing bug fix

2008-11-26 Thread Alexander Burger
Hi Tomas, leaves single space in front of all cookie names except the first one. ... (cons (htArg (clip (car L))) (htArg (cadr L))) ) Thanks! I didn't notice that, as I don't use cookies in applications, and obiously never tested with more than one :-) Cheers, - Alex

Re: http server hangs on post without enctype=multipart/form-data

2008-11-26 Thread Alexander Burger
Hi Tomas, it works for me now with ht:Read. Fine! :-) Would it be possible to put comment into CHANGES file? Usually I mention there only kernel changes (though until 2006 I regarded some GUI parts also as belonging to the kernel). At the moment I'm still searching for a Heisenbug,

Re: db and multiple processes

2008-11-27 Thread Alexander Burger
Hi Tomas, is it fine to have two/many *independent* processes using the same database? Usually not, though I do it in certain cases. On the lowest level, the db consists of independent objects (external symbols). When a process accesses such a symbol, it obtains a read-lock on the db, reads

Re: db and multiple processes

2008-11-27 Thread Alexander Burger
Hi Tomas, In what cases and how you do it? At SmApper we had a set of stand-alone shell tools (i.e. with the first line containing '#!bin/picolisp') that were used to do quick scans of some databases and build reports. They simply loaded the er.l of those applications, and called 'pool' on the

Re: db and multiple processes

2008-11-28 Thread Alexander Burger
Hi Tomas, that all picolisp processes spread over many machines managing many databases all communicating (interconnected, in what sence?) to solve one (or many unrelated) business problem? I looked at SmApper website and it seems quite a secret technology;-) Well, then I cannot tell too

Re: db and multiple processes

2008-11-28 Thread Alexander Burger
On Fri, Nov 28, 2008 at 01:15:46PM +0100, Alexander Burger wrote: If you go with a common database, I would do it like this: The parent process only loads lib/http.l and a common er.l, defines a function Another great advantage of this solution is that you don't even have to stop any

readline()

2008-11-29 Thread Alexander Burger
not be enough for some people. So I sent him a quick hack: # 27nov08abu # (c) Software Lab. Alexander Burger (load lib/gcc.l) (gcc readline '(-lreadline) '_led) #include readline/readline.h #include readline/history.h any _led(any ex

Re: database contest article

2008-12-04 Thread Alexander Burger
On Thu, Dec 04, 2008 at 11:40:29PM +0700, Henrik Sarvell wrote: Wasn't it somebody else? Randall maybe... I believe to remember it was Konrad ;-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: database contest article

2008-12-04 Thread Alexander Burger
Hi Tomas, Have you tried to rerun your solution and what improvement (trans/min) did you achieve? Unfortunately not ... Actually, my compagnon Josef Bartl wrote it initially. He urged that we participate. I did some tuning then, and he did the testing. After that, both of us were busy, so we

Re: database contest article

2008-12-05 Thread Alexander Burger
Hi Tomas, I just tried to roughly benchmark the forking server and I do not think it is a limiting factor. With the following code That's right. For a database benchmark it is not a limiting factor, this will be more on the db side. However, if I try a non-forking server

Re: readline()

2008-12-05 Thread Alexander Burger
On Fri, Dec 05, 2008 at 07:24:47AM +0100, Alexander Burger wrote: What remains is the nasty feature that readline() does not obey the line's starting column. It should start at column 2 (because PicoLisp issues its own prompt : ). OK, found it! Here is the current implementation

Re: Pipe and http

2008-12-12 Thread Alexander Burger
Sorry friends, it was STILL not completely correct! :-( On Mon, Oct 20, 2008 at 07:09:06AM +0200, Alexander Burger wrote: Fixed! I uploaded a new testing version. Both effects were a result of the fact that 'pipe' did not write to the process' standard output as it should. Instead, it used

Re: Let's extend 'eval' and 'run' (was: Variable number of

2008-12-23 Thread Alexander Burger
Hi Tomas, Would it be a good idea for these to become part of picolisp as we discussed earlier? Sure. Both the new 'xml' as well as the improved 'xml' should be included. I tried xml2-test.l, and it passed all tests. I would suggest to put 'xml' and the changes into lib/xml.l. What do you

Re: sort

2008-12-23 Thread Alexander Burger
Hi Tomas, the 'sort' function has the less-than relation built-in. Is there an easy way of sorting a list using a user-defined less-than relation? Well, in a certain way you used it already, with 'by'. I'm not quite sure about the purpose of (when (apply Lt NIL X Y)

  1   2   3   4   5   6   7   8   9   10   >