Re: Mailing list header format [Randall Dow <[EMAIL PROTECTED]>]

2008-03-14 Thread Alexander Burger
Hi Randall, > From: Randall Dow > Sender: picolisp@software-lab.de > Reply-to: picolisp@software-lab.de > To: picolisp@software-lab.de Ah, I misunderstood what Uwe said! Somehow I was thinking he talked about the "To" header. This would indeed imply the generation of a separate mail to each membe

Re: Mailing list header format [Randall Dow <[EMAIL PROTECTED]>]

2008-03-14 Thread Alexander Burger
Hi Rand, > Alex, I still miss the "Sender: picolisp@software-lab.de" Header Line. > ... > The sender of the mail sent it to you directly and the list, or > the sender of the mail just sent it to the list. Ah, I didn't know that. It is included now. Cheers, - Alex

Re: Subscribe

2008-03-17 Thread Alexander Burger
Hi Henrik, > You are now subscribed Great, it works! Nice to see you here. Cheers, - Alex

Re: datetime relation

2008-03-19 Thread Alexander Burger
(collect 'ts '+MyClass (list (date 2008 3 15) (time 12 30)) (list (date 2008 3 19) (time 17 10)) ) Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

Console debugging and server applications

2008-03-23 Thread Alexander Burger
re what's going on, you can clean up the whole mess by typing just two key strokes Ctrl-D Ctrl-C no matter if there are zero, one or many child processes running. That's it. Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

Re: Console debugging and server applications

2008-03-24 Thread Alexander Burger
(case "C" (NIL (bye)) ("^D" (prinl) (tell 'bye) (bye)) ("^X" (prinl) (quit)) ) Basically, the line with "^D" was added, which tells all other processes to exit, and then exits itself. Cheers, Alex -- Software

Re: Pico, How to add new class to existing object?

2008-03-31 Thread Alexander Burger
X '(m> () (foo) (bar) ) ) or (it depends on the taste whether this is more elegant) (let *Class X (dm m> () (foo)) ) Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

Re: Pico, OpenGL menus, refresh problem

2008-04-01 Thread Alexander Burger
? Try to put a 'return T' at the end: ... bufString(ex, name); glutAddMenuEntry(name, value); return T; } } As this function returns garbage data without the 'T', it may well explain the wrong behavior. Cheers, Alx -- Software Lab. Alexander Burger

Re: Pico, OpenGL menus, refresh problem

2008-04-01 Thread Alexander Burger
Hi Jon, it would be quite convenient if you could provide a tarball, containing all the files from <http://folk.uio.no/jkleiser/pico/gl/>. This would make downloading a lot easier. Perhaps already with a relative path "simul/gl/". What do you think? Cheers, Alex -- Softwar

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: Many thanks! Works perfectly! Cheers, Alex

Re: Subscribe

2008-04-03 Thread Alexander Burger
Hi Jon, > I'm interested in this implementation. Please subscribe me. Done. Please fee free to ask any question :-) Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

Re: Pico, OpenGL menus, refresh problem

2008-04-07 Thread Alexander Burger
sing is done in the library anyway. Concerning the MacOS target of 10.4, however, it seems that it is harmful considering portability, and not really needed. Is this correct? Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

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 ca

Re: Pico, EOF Overrun

2008-04-09 Thread Alexander Burger
wever, I fixed this bug now. (str "#") returns NIL, and (str "a b # c") returns (a b). The fix is avaiable in the testing release. Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

Re: Pico, EOF Overrun

2008-04-09 Thread Alexander Burger
cause the evaluation of following expressions. Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

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 --

Re: Pico, EOF Overrun

2008-04-09 Thread Alexander Burger
l functions calling 'if' or with a pattern : (who '(if . @Prg)) -> the same as above or with pattern plus expression : (who '(if @Cond . @Prg) (= 4 (length @Prg))) -> functions calling 'if' with 5 arguments Cheers, Alex -- Software Lab. Alexa

Re: Pico, EOF Overrun

2008-04-09 Thread Alexander Burger
like : (more (who 'something) pp) to pretty-print the functions one by one. Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

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
d (at least in cases where the runtime of repeated length calculations does not hurt), 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 B

Re: Subscribe

2008-04-11 Thread Alexander Burger
t all small indexes together into a few files, and put each big index into its own file. At least for not too big databases, performance does not seem to depend very much on the block size. A value of 3 (block size 512 bytes) or 4 (1024) seems a good compromise. Only for very large databases (more than 10 million objects) I found that using very large blocks (6, resulting in 4096 bytes) improves performance. So much for now. This is just for a first overview. I hope it helps at least a little. 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
at, but as you just read the file (without executing it), it will be undefined when you hit that read macro. 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

'@@' Bug

2008-04-11 Thread Alexander Burger
ll '(and 4)' caused the previous value of '@' to be destroyed. Now it is fixed: : (and 3) -> 3 : (and 4) -> 4 : (cons @@ @) -> (3 . 4) Cheers, Alex -- Software Lab. Alexander Burger Bahnhofstr. 24a, D-86462 Langweid [EMAIL PROTECTED], www.software-lab.de, +49 8230 5060

Re: Subscribe

2008-04-13 Thread Alexander Burger
the parent process (e.g. loading a file or modifying a global variable), there is the "boss" mechanism. To use it, "main.l" should include (load "lib/boss.l") Then you can say in 'psh' things like: (boss 'load "someAdditionalFile.l"

New '+Force' prefix class

2008-04-16 Thread Alexander Burger
Hi all, today I introduced a new prefix class for buttons in the 'form' GUI. This was a long-missing feature, and I feel I have to explain the background a little: When a button is pressed in a form, a 'chk>' message is sent to all 'gui' components in that form. If one or several of those method

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

2008-04-18 Thread Alexander Burger
Hi Tomas, > : (cadr (cons 1 2)) > Segmentation fault (core dumped) Yes, this is a known bug. In fact, it was a deliberate design decision. There is always a trade-off between runtime-checks and performance. PicoLisp tries to walk along the line of doing runtime checks for typical errors, but not

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

2008-04-18 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: macros/templates

2008-04-19 Thread Alexander Burger
Hi Tomas, > what is the best way to write the cls macro in the following example? I think your solution is very good! The problem is that there are no evaluating version of the functions 'class' and 'dm'. That's why you have to resort to a macro in the first place. And a macro is always an infer

Mansur: Would you like to translate a little more?

2008-04-19 Thread Alexander Burger
Hi Mansur, please excuse me, but I would like to ask you again to translate some new strings in "app/loc/ru" ;-) As you may have noticed, Tomas triggered me to implement a few 'check>' methods in "app/er.l", and have it called in "app/ord.l". Such checks naturally generate error messages. Besid

Re: Mansur: Would you like to translate a little more?

2008-04-20 Thread Alexander Burger
Hi Mansur, > With pleasure, you are always welcome! > I think I'll send you translated files in a few days. Great! As I said, no hurry :-) Just to have it clean and complete. I did the German and Japanese parts yesterday. Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Mansur: Would you like to translate a little more?

2008-04-25 Thread Alexander Burger
Thank you very much Mansur! :-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: fcntl on cygwin

2008-04-26 Thread Alexander Burger
Hi Mansur, > Implement advisory file locking. yes, this looks promising :-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

PicoLisp extensions for remote DB access

2008-04-27 Thread Alexander Burger
Hi Randall, hi all, the system we are currently developing at SmApper Technologies runs distributed over a number of blades, holding picoLisp databases with a total of (currently) up to 800 million objects. The picoLisp processes communicate via TCP, propagating data during import, and it became n

Re: PicoLisp extensions for remote DB access

2008-05-05 Thread Alexander Burger
Oops, Seems like I shocked everyone to death with that mail ;-) Anyway: There was a small but stupid error, which I feel I have to correct. The extension of 'go' in "doc/family.l" has two lines (task P) (close P) Either leave them out (they are not absolutely needed in this case), or pro

Re: The Bipolar Lisp Hacker - Test

2008-05-12 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-16 Thread Alexander Burger
Hi Jon, this is really funny. Just of today I'm working on a similar problem. As I don't know JSON, however, I tried a direct approach with JS. The mechanism looks surprisingly similar to what you wrote. > "http://localhost:8080/@json?*JsonCallback=?";, and my server script > does things like t

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 w

Re: Pico, handling requests from jQuery

2008-05-19 Thread Alexander Burger
Hi Jon, > 1) How can you know how many (and which) variables that the request > contained? The server part anyway must know which variables are relevant (can be expected to be filled by the client). If you cannot guarantee that all variables are filled by the client, I would simply clear them aft

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 program

Re: Pico, stamp and time zone

2008-05-22 Thread Alexander Burger
Hi Jon, > and time of the file "CHANGES", I get "2008-04-23 16:29:06", and this > should be the UTC date and time. Right. 'info' returns the time in UTC. I think it would be too much trouble to change 'info' or write a similar function in C. I would recommend to write a function that calculates

Re: Pico, handling requests from jQuery

2008-05-27 Thread Alexander Burger
Hi Jon, > space, like "A B", it will turn up in Pico Lisp like "A+B". Is there As a built-in function there is only 'ht:Pack', which is used e.g. in "lib/http.l". But it just decodes hex patterns like "%20": : (ht:Pack (chop "A%20B%20C")) -> "A B C" If you are only concerned about '+',

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', yo

Re: Pico, handling requests from jQuery

2008-05-27 Thread Alexander Burger
Hi John, > The + shows up in post data too, when the default "application/x-www- > form-urlencoded" content type is used and there are spaces in a value. Thanks. I was not aware of that (or forgot about it), perhaps because the picoLisp server exclusively uses content type "multipart/form-data".

Re: Pico, handling requests from jQuery

2008-05-27 Thread Alexander Burger
Hi Jon, > Could it be me doing something wrong in Pico Lisp? Here are the first > few lines on my request handler: > > (de getDirectory () > (let Path (get 'path 'http) > (out NIL (println "getDirectory request" Path)) > (httpHead "text/javascript; charset=utf-8

Re: subscribe

2008-06-01 Thread Alexander Burger
Hi Konrad, actually, your subscription *did* work already at a previous time. You were probably wondering why you did not see any messages. This is due to the fact that we currently have very little traffic on this mailing list. That's a pity, but nobody seems to have any questions. Can I help yo

Re: subscribe

2008-06-02 Thread Alexander Burger
27;z3d' is used, for example, by the flight simulator demo, and 'ext' for several purposes). In this case, the library must be placed into the local "lib/" directory. Then simply call the function : (ext:Sin (/ 314159 2) 10) # 100000 is the scale factor -> 10

Re: Some questions about the Pico Lisp Interpreter

2008-06-05 Thread Alexander Burger
Hi Konrad, > 1) Does the Interpretor do any kind of tail call optimisation, I No, not at all. As far as I can see, this is not easy to implement in an efficient way. The interpreter would have to detect tail recursion at runtime, which takes much more than time than simply executing the call/ret

Re: Pico, (locale "XY") error handling?

2008-06-09 Thread Alexander Burger
On Tue, May 20, 2008 at 01:37:21PM +0200, Jon Kleiser wrote: > !? (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? Indeed, this is a long-missing feature. Or

Re: Hash Tables in Pico Lisp

2008-06-09 Thread Alexander Burger
On Tue, Jun 10, 2008 at 02:31:05PM +1000, konrad Zielinski wrote: > there really isn't a way of implementing a Hash Table in Picolisp is there? Correct. > as far as I understand this would really require an array with direct > addressing at some point, and we have no such thing. Which would make

Re: A broken program

2008-06-11 Thread Alexander Burger
Hi Konrad, > Instead I get > $38801 NIL >"orange" 1 >"orange" 1 > > I don't understand why two invocations of (read T) are returning two ^ (a minor remark: You certainly meant 'line' here, instead of 'read') > symbols which look the same

Re: A broken program

2008-06-11 Thread Alexander Burger
On Thu, Jun 12, 2008 at 09:22:21AM +1000, konrad Zielinski wrote: > Having two strings which look the same but are not equal seems like a > bit of a design flaw. The intuitive notion would be that strings that > look the same should always be equal. Two strings ("transient symbols" in PicoLisp ter

Re: How to best ...

2008-06-11 Thread Alexander Burger
Hi Randall, > (de "keyword" @ >... ) > > (de main () >(eval L) > > where L looks like: > '("keyword" 'any)' This is basically correct. It is just that I learned now in our discussion on Freenode that the value of 'L' results from reading a file. As the "keyword" function is defined as

Re: A broken program

2008-06-11 Thread Alexander Burger
On Thu, Jun 12, 2008 at 03:25:53PM +1000, konrad Zielinski wrote: > I guess rules of thumb from other lisps about not over using symbol > property lists apply to Pico Lisp as well, if for slightly different > reasons. Yes. It seems that property lists are somewhat deprecated in other Lisps. Alleg

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: Contriving a static variable.

2008-06-12 Thread Alexander Burger
Hi Konrad, > Especially if you have been away from any lisp programming for a while > (as I have). However I'm determined to master it so bear with my and > the questions should get a little more insightfull. No problem at all. I'm happy that you are getting down to the interesting parts so quick

Re: Pico, localizing inflections

2008-06-17 Thread Alexander Burger
Hi Jon, > The point here is that the word "red" is not inflected, it's unchanged. I'm not sure if I understand the problem. Usually, you would put whole sentences into the translation files. Do you intend to build the messages from individual words? Then there are many problems around, like the

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: Is there a better way to do this

2008-06-18 Thread Alexander Burger
Hi Konrad, > (let (Line NIL End (chop Mark) Body (cons 'prog B)) > ... >(eval Body))) > but have a feeling it could be expressed more gracefully in Picolisp. Yes. There is a direct way using 'run' which makes the additional (cons 'prog ..) unnecessary: (de process-until (Mark . B

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 > commercia

Re: PicoLisp License

2008-06-27 Thread Alexander Burger
Hi Andrei, > So I may redistribute PicoLisp along with commercial application in both > forms - binary for direct execution as shared library, and sources to > concern GPL. Am I right? The critical point is what you mean with "shared library". If you want to build an *.so file from the interp

Re: At shared hosting

2008-07-02 Thread Alexander Burger
Hi Andrei, basically, there is no problem to run PicoLisp as an application server as a normal user, as long as you don't use a port below 1024. So you must have your users connect to http://host:8080 or similar, which is not so nice. The standard way in PicoLisp is therefore to start 'httpGate'

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: At shared hosting

2008-07-03 Thread Alexander Burger
Hi Anthony, > Lisp server. For clarification though, you have the Pico Lisp > application installed as a user under home, but Pico Lisp is installed > in usr/local correct? Also, where do you place each of these scripts? While it is perfectly possible to install PicoLisp in some global pl

Re: At shared hosting

2008-07-03 Thread Alexander Burger
Hi Anthony, > Great! This is very clear. As a follow-on then, do you have multiple > installations of Pico Lisp on the same server in different directories > or multiple applications in the same /home/app directory? Actually I have no production installation with more than one version of pi

Re: Regexp

2008-07-04 Thread Alexander Burger
Hi Andrei, > Now I'm seeking a regexp library for picolisp. Speaking of myself, I never felt the need for a full-blown regexp library, because I find the built-in 'match' function quite flexible, especially in combination with other list functions. To employ true regular expressions in PicoLisp,

Re: Regexp

2008-07-06 Thread Alexander Burger
On Mon, Jul 07, 2008 at 10:22:03AM +1000, konrad Zielinski wrote: > I found this very frustrating to do in picolisp due to conflicing > requirements, basically boiling down to how the language implements > strings. It would be interesting to discuss the details here. > packing and unpacking my s

Re: Regexp

2008-07-07 Thread Alexander Burger
Hi Konrad, thanks for the long explanation. > this. when ever it prints a list it checks to see if it might be a > string by inspecting the first n bytes (I don't know how many) if they > are all printable ascii cahracters then it prints the list as a That's quite a kludge, IMHO. > delimiter

Re: Regexp

2008-07-07 Thread Alexander Burger
On Tue, Jul 08, 2008 at 09:33:02AM +1000, konrad Zielinski wrote: > "Flesch Index: 93.1/100" > what I want to get out is the 93.1 If it just for parsing (scraping) the input stream, it is very simple: (from "Flesch Index:") (format (till "/" T) 1) This will return a scaled number.

Re: Pico, how to translate function result?

2008-07-08 Thread Alexander Burger
Hi Jon, > do you do if the text to be translated is the result of some function? > This doesn't seem to work: > > ,(someTextBasedOn X Y Z) Yes, in this context the comma makes only sense immediately before the transient symbol. The comma read macro does nothing else than putting the following e

Re: Pico, how to translate function result?

2008-07-08 Thread Alexander Burger
On Tue, Jul 08, 2008 at 04:09:04PM +0200, Jon Kleiser wrote: > Almost. This is better: > > (de translate (Txt) > (if (val (car (idx '*Uni Txt))) @ Txt) ) or even: (de translate (Txt) (if (idx '*Uni Txt) (val (car @)) Txt ) ) ;-) Cheers, - Alex -- UNSUBSCRIBE: m

Re: Pico, Chinese Checkers program

2008-07-09 Thread Alexander Burger
Hi Jon, it works great! Many thanks! It would be nice to have also a 'Q' command (the windows here in fvwm have no close box). Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Segfault

2008-07-10 Thread Alexander Burger
On Thu, Jul 10, 2008 at 02:06:33PM +0300, Andrei Ivushkin wrote: > (setq X ((1 . 2) (3 . 4))) > > It crashes with segmentation fault... Sadly ... yes ;-) I must say, though, that it was never a major goal in PicoLisp to protect the programmer from all possible kinds of errors. Whenever there is

Re: Subscribe

2008-07-22 Thread Alexander Burger
Hi Doug, nice to see you here! It's been quite a long time :-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: fun

2008-07-24 Thread Alexander Burger
Hi Randall, ja, sehr interessant. Werde ich spaeter genauer studieren :-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: problem reading XML

2008-07-24 Thread Alexander Burger
On Fri, Jul 25, 2008 at 09:08:50AM +0700, Henrik Sarvell wrote: > I've had this discussion with Alex already, I ended up with this after it: > (setq Lst (in "atom.xml" (and (xml?) (xml That's correct. However, in Tomas's case: > > there might still be a problem due to the 'comment' l

Re: Building picolisp-2.3.3 (and earlier) on 64 bit Linux

2008-07-24 Thread Alexander Burger
Hi Tomas, thank you very much! This is a valuable information. I never tried to link it on a 64bit machine, as I'm concentrating on the native 64bit version. But it is good to know that it works. Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: fun

2008-07-24 Thread Alexander Burger
On Fri, Jul 25, 2008 at 07:15:19AM +0200, Alexander Burger wrote: > Hi Randall, > ... Oops, sorry, was meant as a personal reply ;-) -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: FFI (gl, gtk...)

2008-07-25 Thread Alexander Burger
Hi Tomas, nice approach! And I'm glad to hear that miniPicoLisp can do anything useful ;-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

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: problem reading XML

2008-07-26 Thread Alexander Burger
On Sat, Jul 26, 2008 at 10:05:05AM +0200, Alexander Burger wrote: > Handling comments in a parser is usually not a good idea anyway, and is > better done by a separate preprocessor. I would recommend something like (in "file (pipe (while (and (echo "")))

Re: problem reading XML

2008-07-28 Thread Alexander Burger
Hi Tomas, > since the XML declaration is optional, I would need to write: > > (or (in F (pipe (while (and (echo ""))) > (and (xml?) (xml > (in F (pipe (while (and (echo ""))) > (xml Yes, this is quite inconvenient. I didn't know that the header is optional.

Re: pipes & redirection

2008-07-28 Thread Alexander Burger
Hi Tomas, > is it possible in picolisp to create pipes from external programs, > e.g. like in bash? I.e. create a pipe, write to it on one end and > read from it on the other end? E.g. `base64 | wc -l`? A one-stage pipe to another program can be called directly, as shown in the example for 'pip

Re: problem reading XML

2008-07-29 Thread Alexander Burger
Hi Tomas, > Would not it be better to have only one function to parse xml in > picolisp distribution? I will have to refine it and test it more > thouroughly though. OK, then let's do it that way. I intended to keep two versions, because I thought it nice to have a lightweight XML (completely wi

Re: pipes & redirection

2008-07-29 Thread Alexander Burger
Hi Tomas, > Do you mean redirecting stderr of the main picolisp process at the > start from shell or is there a way of redirecting forked child Yes. Usually, I do that for production applications anyway. But it will log that noisy messages, too. > processes, maybe with some trick like (out '/de

Re: (mime)

2008-08-01 Thread Alexander Burger
Hi Andrei, > regardless I called (mime), and browser refuses to display the image. > Is that because (mime) call only applied while processing svgtest.l file > (i.e GET request), not while processing GET test.svg ? Ah, OK. I see two problems: 1. The proper way is to call > (mime "svg" "image/

Re: (mime)

2008-08-01 Thread Alexander Burger
On Fri, Aug 01, 2008 at 02:21:03PM +0300, Andrei Ivushkin wrote: > Static file test.svg is passed. Ah, sorry, I misunderstood the problem. >> (mime "svg" "image/svg+xml" 1) > It is really called in svgtest.l So let me recapitulate. You invoke it as p dbg.l lib/http.l lib/xhtml.l lib/form.l

Re: problem reading XML

2008-08-07 Thread Alexander Burger
Hi Tomas, many thanks! I did some minor changes, and attach a new version of "lib/xml.l" to this mail. 1. There was a slight error (still '_xml2' instead of '_xml') 2. I replaced occurrences like (ifn (= '`(chop "DOCTYPE") (list (char) (char) (char) (char) (char) (char) (char))

Re: problem reading XML -- Attachment

2008-08-07 Thread Alexander Burger
On Fri, Aug 08, 2008 at 07:32:58AM +0200, Alexander Burger wrote: > I did some minor changes, and attach a new version of "lib/xml.l" to Stupid me! Forgot the attachment :-( # 08aug08abu # 08aug08 Tomas Hlavaty <[EMAIL PROTECTED]> # Check or write header (de xml? (Flg) (

Re: problem reading XML

2008-08-08 Thread Alexander Burger
Hi Tomas, >(from "]]>")) > > was necessary in the parent process because (echo "]]>") in the child > process did not seem to affect stdin of the parent process and all Ah, yes. That's what happens. Parent and child have independent I/O structures. Thinking about it, I just found an error i

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

Re: Evolving db schema?

2008-08-19 Thread Alexander Burger
Hi Tomas, > For example, I have a relation (rel nm (+Ref +String)) which I want to > change to (rel nm (+Sn +Idx +String)). Is there an way of reindexing > the relation? Yes. In "lib/too.l" there is a function 'rebuild'. It takes a list of objects and a relation specification. The tricky thing

Re: Evolving db schema?

2008-08-20 Thread Alexander Burger
Sorry, two mistakes: On Wed, Aug 20, 2008 at 07:37:27AM +0200, Alexander Burger wrote: > another relation. Let's say that you also have a numeric key on those > objects (rel nr (+Key +String)): - This should of course have been (rel nr (+Key +Number)) > ... >(

Re: Evolving db schema?

2008-08-20 Thread Alexander Burger
Hi Tomas, > I have one more question: I started with one db file and now thinking > about spliting it into more files. How can I move some > objects/relations to another db file? Again, with "lib/too.l" ;-) After changing the list in '*Dbs' (e.g. the 'dbs' call in "er.l"), you can use 'dbfMigr

Re: Evolving db schema?

2008-08-20 Thread Alexander Burger
Hi Tomas, > I also had to (allow '*PW) ;-) Good point! It is missing in "app/main.l". Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

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 var

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', bu

Re: gui +Radio

2008-08-23 Thread Alexander Burger
Hi Tomas, > This way it should work as the only time when *Radio is important is > when a form is being built. You could store it in a property 'radio' in the form (e.g. *Top). In this way it will be empty for a new form, and will be found and reused when a form is reloaded during a POST event.

  1   2   3   4   5   6   7   8   9   10   >