Re: Subscribe

2008-04-10 Thread Tomas Hlavaty
Hi Alex, I just discovered picolisp and must say how impressed and excited I am about it;-) What is the recommended way of deploying picolisp web apps? I was thinking having it behind nginx but I see that there are some utilities in picolisp dealing with deployment and ssl, e.g. httpGate,

Re: problem reading XML

2008-07-25 Thread Tomas Hlavaty
Hi Henrik Alex, thanks for your suggestions but I thing that it works for you only because your XML data satisfy some particular assumtions: Henrik assumes that the the ?xml declaration is present and is at the beginning of the file. (setq Lst (in atom.xml (and (xml?) (xml Alex also

Re: problem reading XML

2008-07-27 Thread Tomas Hlavaty
Hi Alex, (in file (pipe (while (and (echo !--) (from --))) (xml) ) ) I fact, I would like to remove that half-hearted comment feature from lib/xml.l. Does anybody have objections? since the XML declaration is optional, I would need to write: (or (in F (pipe (while (and

pipes redirection

2008-07-27 Thread Tomas Hlavaty
Hi Alex, 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`? Also, is it possible in the following code to suppress the two prompts Encryption key: Again:

Re: problem reading XML

2008-08-06 Thread Tomas Hlavaty
Hi Alex, So please take your time, and send it to me when ready. here is the XML parser: # expects well formed XML # encoding by picolisp (utf8 only, no utf16 etc.) # trim whitespace except in cdata # ignore ? !-- !DOCTYPE # non-builtin entities as normal text: ent; = ent (de _xml (In Char)

Re: problem reading XML

2008-08-08 Thread Tomas Hlavaty
Hi Alex, 1. There was a slight error (still '_xml2' instead of '_xml') Oops, sorry about that. 2. I replaced occurrences like (ifn (= '`(chop DOCTYPE) (list (char) (char) (char) (char) (char) (char) (char))) with (if (find '((C) ( C (char))) '`(chop DOCTYPE))

Re: problem reading XML

2008-08-08 Thread Tomas Hlavaty
Hi Alex, I'll run test your changed code and let you know. the updated file xml.l is attached. Cheers, Tomas xml.l Description: Binary data

Re: Evolving db schema?

2008-08-20 Thread Tomas Hlavaty
Hi Alex, Yes. In lib/too.l there is a function 'rebuild'. It takes a list of objects and a relation specification. thank you for the examples. The function 'dbgc' does this (also in lib/too.l). Also, thanks for the back.l file! I have one more question: I started with one db file and now

Re: Evolving db schema?

2008-08-20 Thread Tomas Hlavaty
Hi Alex, - This should of course have been (rel nr (+Key +Number)) - Somewhere here should be a line (load lib/too.l) I also had to (allow '*PW) ;-) Thanks for help, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Getl and maps behavior?

2008-08-21 Thread Tomas Hlavaty
Hi Henrik, 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 the object itself. maybe the js - picolisp mapping false - NIL is not the

Re: gui +Radio

2008-08-22 Thread Tomas Hlavaty
Hi Alex, 1. (default .. NIL) has no effect, (off *Radio) might be more appropriate. I still don't have all those picolisp functions under my skin :-( Thinking about it though, this line is probably unnecessary because *Radio is never used as a global variable but only dynamically bound while

Re: Getl and maps behavior?

2008-08-22 Thread Tomas Hlavaty
Hi Alex, Most of all, a cell can be passed to functions that expect a variable 'var' argument, like 'set', 'inc', 'pop', and many more. This is also the reason for the property functions 'prop' and '::'. : (put 'A 'counter 0) - 0 : (put 'A 'list (1 2 3 4)) - (1 2 3 4) :

Re: Getl and maps behavior?

2008-08-22 Thread Tomas Hlavaty
Hi Henrik, sorry I am not following in your thread but I do not seem to be getting all emails from the mailing list. Is anybody experiencing similar problem? As far as I've been able to see any kind of key is double quoted in the json string (so that is what happens now), at least in the

Re: gui +Radio

2008-08-23 Thread Tomas Hlavaty
Hi Alex, Regarding that, here's a modified version of your '+Radio' class: that is neat:-) I can be called like this: (gui '(+Radio) NIL value1a) (gui '(+Radio) -1 value1b) (gui '(+Radio) -2 value1c) ... (gui '(+Radio) NIL value2a) (gui '(+Radio) -1 value2b) (gui

Re: gui +Radio

2008-08-23 Thread Tomas Hlavaty
Hi Alex, Actually, the 'set' and 'val' methods are also not needed. I am not sure about that, because if you use +Radio inside a chart, the selected value will be repeated as many times as there are radiobuttons in a group. Keeping the val NIL for all except the first radio button avoids this.

Re: Getl and maps behavior?

2008-08-23 Thread Tomas Hlavaty
Hi Alex, Having list cells behave like variables (by referring to their CAR parts) is a very useful feature. Not only for properties, but also for other list structures. : (setq L (1 2 3 4 5 6 7 8 9)) - (1 2 3 4 5 6 7 8 9) : (nth L 6) - (6 7 8 9) :

Re: gui +Radio

2008-08-23 Thread Tomas Hlavaty
Hi Alex, Well, the first field will often be different anyway, because it typically will have a +Var or +E/R prefix. not necessarily. It should be possible to create it programmatically like this (as part of a chart): (let L '(((group1 . value1a) (group1 . value1b)

Re: FFI and miniPicolisp

2008-09-03 Thread Tomas Hlavaty
Hi Simon, (cfun RNG* new_RNG (ulong seed)) (cfun double RNG_next_double (RNG* self)) {cfun_new_RNG, epi:w_RNG}, {cfun_RNG_next_double, epi:G_next_double}, Everything links fine, but are these functions automatically exposed? Are there any tips so I can do things like (setq r

chart row reordering?

2008-09-15 Thread Tomas Hlavaty
Hi Alex, app/ord.l:24-52 there is chart which allows to chage the order of the rows. Could you please explain how this works? The app/er.l contains something like: (class +Ord +Entity) (rel nr (+Need +Key +Number)) (rel pos (+List +Joint) ord (+Pos)) (class +Pos +Entity) (rel ord (+Dep

Re: +BlobField appends new lines

2008-09-16 Thread Tomas Hlavaty
Hi Alex, Which browser are you using? I use Firefox 3.0.1. I tested it with w3m and Firefox, and most of my customers use IE. Does it also happen if you try the online demo at http://app.7fach.de? It does not happen with the online demo. And it does not happen when I try it with the

Re: chart row reordering?

2008-09-17 Thread Tomas Hlavaty
Hi Alex, Does the following script something close? yes, that's exactly what I am trying to achieve except how would this work with persistent objects? Assuming I have the following schema and want to change order of items it in a category *ID of type +Cat? (class +Cat +Entity) (rel nr

Re: chart row reordering?

2008-09-17 Thread Tomas Hlavaty
Hi Alex, thank you for great explanation! Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

deploying multiple picolisp web applications

2008-09-26 Thread Tomas Hlavaty
Hi Alex, I would like to ask whether you ever deploy multiple picolisp applications on a server and if yes what is your setup (assuming the only http entrance from outside is the port 80)? I imagine that I could start several apps on different ports, put each behind httpGate and use a web server

Re: deploying multiple picolisp web applications

2008-09-26 Thread Tomas Hlavaty
Hi Alex, In fact, this is rather the normal case. There is hardly ever a server running only a single application. If I understand it well, you have a server with static content http://www.software-lab.de/ running apache (and no picolisp application) and a server with picolisp web server

Re: Subscribe

2008-10-01 Thread Tomas Hlavaty
Hi Eugene, Hello Eugene :-) You are now subscribed Hi Guys, welcome. Whilst web browser interfacing is very useful for many situations, I really would prefer a richer alternative, like GTK Server (which is used by newLISP) - has anyone done anything along those lines? Using gtk-server

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

2008-10-03 Thread Tomas Hlavaty
Hi Alex, I encountered the following problem with GC: === $ gdb ~/picolisp/bin/picolisp ~/picolisp/core GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change

Re: using the http server to return xml

2008-10-04 Thread Tomas Hlavaty
Hi Konrad I still don't quite follow what curl is supposed to be showing is wrong with my use of http header. I'm installing it now and will dig further. I'm determined to get this thing working right. curl shows you what response is seen by the browser. Getting back to your previous

Re: Asyncronous IO

2008-10-08 Thread Tomas Hlavaty
Hi Konrad and Henrik, Is the best way to simply review the Twisted source and reimplementing in Pico, keeping the OODB in mind all the time maybe? reading from http://en.wikipedia.org/wiki/Twisted_(software) Twisted supports an abstraction over raw threads=E2=80=94using a thread = as a

picoWiki

2008-10-08 Thread Tomas Hlavaty
Hi all, I am implementing a wiki in picoLisp, see http://logand.com/picoWiki Do you think it would be useful for the picoLisp comunity (can we call it that way yet?) to have a wiki with publicly editable info about picoLisp and related stuff? If yes, any ideas and/or content contributions

Re: Asyncronous IO

2008-10-08 Thread Tomas Hlavaty
Hi Alex, In addition, I sometimes use the 'alarm' function (in combination with 'catch', 'throw' and 'finally') to ensure that no operation takes too long. I don't think alarm is good enough though. It is good for timeouts but not for schedulling. BTW: I found a typo in

Re: picoWiki

2008-10-08 Thread Tomas Hlavaty
Hi Alex, Good idea! However, I did not succeed to connect (yet?). I just tried with w3m, looks like w3m messes up the relative links, e.g. if I am at http://logand.com/picoWiki and have a relative link a class=i href=?ChangesChanges/a, w3m will interpret it as http://logand.com/?Changes. It

Re: Asyncronous IO

2008-10-08 Thread Tomas Hlavaty
Hi Alex, 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 something is

Re: Asyncronous IO

2008-10-08 Thread Tomas Hlavaty
Hi Alex, thanks for the explanation! Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Asyncronous IO

2008-10-09 Thread Tomas Hlavaty
Hi Alex, The drawback of implementing such a fully non-blocking system will be that the present separation of event generation (select) and data processing (read) cannot be held up any longer, and a completely different application flow is required. yes, indeed. I attach a simple

Re: Asyncronous IO

2008-10-10 Thread Tomas Hlavaty
Hi Konrad, train. The task and *Run mechanism (if used with enough care) give us non blocking reads. 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. I would say that select (in C) and

Re: Asyncronous IO

2008-10-10 Thread Tomas Hlavaty
Hi Alex, http://www.software-lab.de/refP.html#poll says: (poll 'cnt) - cnt | NIL Checks for the availability of data for reading on the file descriptor cnt. See also open, in and close. : (and (poll *Fd) (in @ (read))) # Prevent blocking The comment is a bit misleading as it does

Re: picoWiki

2008-10-10 Thread Tomas Hlavaty
Hi Henrik, I could help with implementing the code highlighting I have on prodevtips, it's all happening in the client through javascript, very easy actually, you simply need the ability to add html in the content, if the necessary javascript files are included then you can do:

Re: picoWiki

2008-10-12 Thread Tomas Hlavaty
I will have to implement some picoWiki markup for html anchor for this. Anchors is a bad idea actually. It does not go well with the wiki style links and page management. Also, using anchors leads to long documents which are pain to edit in a wiki. Every topic worth referencing should have

Re: Cutting a circular list.

2008-10-13 Thread Tomas Hlavaty
Hi Konrad, The one nice thing about having core documetnation, which is local to my system is that I can access it when I'm offline, which is most of the time. I get the impression that some people stay online constantly. Here in Australia however internet connections are comparable

Re: picoWiki

2008-10-13 Thread Tomas Hlavaty
Hi Konrad, If I could make a feature suggestion. It would be handy if there was a shortcut syntax for linking to the definition of terms in the core documentation (much as the lisp tag currently does). so that we didn't have to type the entire address every time. possibly {ref set} to refer

Re: Cutting a circular list.

2008-10-13 Thread Tomas Hlavaty
Hi Konrad, basically tell the system . walk through all your pages generate the HTML and save to a file. you can get something like that with wget program. The result is not great though for the purpose. This would need special link handling and some file naming rules. Obviously forms and

Re: picoWiki

2008-10-13 Thread Tomas Hlavaty
Hi Konrad, Yes I see it now \ref{set} does what I want. sorry for the confusion, the syntax is actually \{ref:set} which fits well with the existing \{http: way of handling links. You were too quick and discovered my experiment before I settled on a solution;-) In regards to the todo. I

Re: picoWiki on CVS ?

2008-10-13 Thread Tomas Hlavaty
Hi Eugene, I hope this isn't too naive but couldn't the picoWiki on a CVS and thus be resync'd as desired??? I use RCS for picoWiki versioning (which is kind of single file pre-CVS). It works well with the way wiki manages files and versions. I am not sure what you mean by resync'd but

Re: Status of 64 picoLisp

2008-10-15 Thread Tomas Hlavaty
Hi Konrad, I;m on a 64 bit system which for the moment has prevented me from trying out Thomas's Async read and write code. I'm working on a 32 bit chroot enviornment to run pico in for now, but it would be nice to go native. It should work even on 64 bit Linux without chroot environment.

Re: Status of 64 picoLisp

2008-10-15 Thread Tomas Hlavaty
Hi Alex, It is a complete rewrite. Even the implementation language changed. Instead of C it is written in a generic assembler (which in turn is written in PicoLisp :) that generates GNU assembler code (currently there is only a x86-64 generator, but other CPUs are possible). I guess that

Re: Status of 64 picoLisp

2008-10-16 Thread Tomas Hlavaty
Hi Alex, 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). Cheers, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Status of 64 picoLisp

2008-10-16 Thread Tomas Hlavaty
Hi Alex, thanks for explanation. I was curious to try picolisp bignums and must say that for somebody doing anything serious, it is probably rather inefficient. As a benchmark, I tried the example from http://paste.lisp.org/display/15116 (setq X 0) (setq Y 1) (for (N 2 (= N 100) (inc N))

Re: Cookie question

2008-10-18 Thread Tomas Hlavaty
Hi Henrik, (cookie 'uid Uid) (redirect @desktop)) The cookie won't get set if you are redirecting. I found the same problem when implementing this in picoWiki and solved this by going to the same page and then

Re: Pipe and http

2008-10-19 Thread Tomas Hlavaty
Hi Alex, '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? the following script shows the bug: #!bin/picolisp lib.l (load

Re: Variable number of arguments in SVG functions

2008-10-20 Thread Tomas Hlavaty
How about the following? (de text Prg (prin text) (while (atom (car Prg)) (prin (pop 'Prg) =\ (eval (pop 'Prg) 1) \) ) (prin ) (run Prg) # the text, or other elements (prinl /text) ) Then you could write : (text id 123 dx (+ 3 4)

Re: Some questions about the Pico Lisp Interpreter

2008-10-20 Thread Tomas Hlavaty
Hi all, 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

Re: Asyncronous IO

2008-10-20 Thread Tomas Hlavaty
Hi Konrad, would you be able to tell me what all the arguments to the functions in nb.l actually are. I mean what are they used for not just data type, as I can't say i fully follow it beyound that the first argument to rdx is a list beign used as a buffer. I put the description into

Re: Variable number of arguments in SVG functions

2008-10-20 Thread Tomas Hlavaty
Hi Alex, 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. Thanks, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: picoWiki

2008-10-21 Thread Tomas Hlavaty
Hi Konrad, I think Picowiki could use a title index. As somthing that is automatically generated there has been a page called All but the link was down at the bottom. I moved it to the top menu now. Thank you, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
Hi Jon and Alex, Since this is pure XML, it would seem natural to find a function like this xml in lib/xml.l. I haven't studied the functions in that file Tomas also suggested this. I think it is a good idea. I would like to let Tomas make the final decision and/or design. I take it as

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
The only problem with this code is that the body is not run in the parent environment, which I don't know how to fix or what problems it could cause. The trick with run/eval in parent environment is used quite often in picoLisp to avoid variable binding clashes. I was wandering whether it

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
Hi Alex, Indenting is impossible to do well I think because the function does not know what is going to happen in the body (the 'xml' function knows I think so, too. This is also the reason why the functions in lib/xhtml.l don't do any efforts to indent. And with this xml function we go a

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
The disadvantage of gensym'd symbols is that the code is more difficult to understand when pretty printed, and cannot be written to some file and retrieved later. True. The PicoLisp solution of transient symbols has an identical effect (especially if you surround the function definition(s)

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
it would be possible to do indenting if the body prg was not run in the parent environment. Then we could pass some indenting state to the recursive calls of xml and indent accordingly. Should be possible. If we had (de xml (Level . Lst) (default Level 0) Then we could do

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
If you use transient symbols (de foo Prg (when (car Prg) (run (cdr Prg)) ) ) then it basically works : (foo T (+ 1 2 3)) - 6 : (foo NIL (+ 1 2 3)) - NIL BUT if you want to use '@' : (and 2 (foo T (+ 1 @ 3))) !? (+ 1 @ 3) T -- Number

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
For one thing, the quote in the call of 'up' is too much. But this is not the main problem. Sorry, my mistake. The hard-to-explain thing is, that here (up @ 2) is needed: (de foo Prg (when (car Prg) (run (let @ (up @ 2) (cdr Prg))) ) ) (up @ 2) is not right, it sets @

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
Up until now, the simplest (and recommended, I think) version was: (de foo Prg (when (car Prg) (run (cdr Prg) 1) ) ) 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, or

Re: Variable number of arguments in SVG functions

2008-10-22 Thread Tomas Hlavaty
Hi Alex and Jon, Indenting is impossible to do well I think because the function does not know what is going to happen in the body (the 'xml' function knows I think so, too. This is also the reason why the functions in lib/xhtml.l don't do any efforts to indent. And with this xml function

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

2008-10-24 Thread Tomas Hlavaty
Hi Alex, So I would propose to extend 'eval' and 'run' with another optional argument (eval 'any ['cnt ['lst]]) (run 'any ['cnt ['lst]]) I prefer this solution:-) Cheers, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

closures

2008-10-24 Thread Tomas Hlavaty
Hi Alex, is there a better way of achieving the following? (let @S '((I . 0)) (def 'count (fill '(() (job '@S (inc 'I) (def 'reset (fill '(() (job '@S (zero I)) The two functions are closed over the same var/env. (count) = 1 (count) = 2 (reset) = 0 (count) = 1

'do'

2008-10-24 Thread Tomas Hlavaty
Hi Alex, I am wondering whether it would be possible (and worth it) to extend 'do' function to accomodate the following scenario: : (do2 (I . 5) (print I) finished) 12345- finished : (do2 (I . -5) (print I) finished) 54321- finished Here is the prototype code but that would have to be

Re: 'do'

2008-10-26 Thread Tomas Hlavaty
Hi Alex, The current implementation of 'do' is not well suited to grant access to the internal counter to the application level. Because 32bit PicoLisp has no short numbers, incrementing a number always results in the allocation of a new cell (turning the old cell into garbage). To avoid

Re: closures

2008-10-26 Thread Tomas Hlavaty
Hi Alex, (let @S '((I . 0)) (def 'count (curry (@S) () (job '@S (inc 'I (def 'reset (curry (@S) () (job '@S (zero I ) (let @S (list (cons 'I 0)) (let I (cons 0) I like it this way, thanks. I also found that once the things inside the closures get complicated,

'pre?', 'sub?' and 'length'

2008-10-26 Thread Tomas Hlavaty
Hi Alex, diving more into picoLisp utility functions I foud some functions that could be extended: For example 'pre?' and 'sub?' could understand lists: (de pre (P L) (let X T (while (and X P L) (if (and (pair P) (pair L) (= (car P) (car L))) (setq P (cdr P) L (cdr

Re: 'do'

2008-10-26 Thread Tomas Hlavaty
Do you really think you would need such a feature often? It would be useful sometimes, when debuging for example, I would not have to change the code much, just stick I and print... (let I 0 (do 5 (print (inc 'I)) finished)) With this I would have to add parens and inc etc. Not something

Re: 'pre?', 'sub?' and 'length'

2008-10-26 Thread Tomas Hlavaty
This would make sense. That functionality is covered by 'head', though. Oops, I did not notice this... must read ref more carefully:-o because 'T' has the meaning of infinite in comparisons. Nice interpretation. I will assume my case is too application specific. I'm very glad about this

Re: closures

2008-10-26 Thread Tomas Hlavaty
Hi Alex, Have you measured and/or noticed impact on performance of these micro-optimizations? I mean, are they really worth it? Very probably not ... it is similar to the situation with 'do' ;-) When you work on the 64 bit version, you obviously implemented miniPicoLisp prototype and now

Re: Asyncronous IO

2008-10-27 Thread Tomas Hlavaty
Hi all, For Konrad's chat application, the buffer should be shared by all callbacks as it is now. I wrote an asynchronous chat server example and documented it on picoWiki http://logand.com/picoWiki/non-blocking I also added http://logand.com/picoWiki/closure based on the discussion I had

Re: Http query variables

2008-11-20 Thread Tomas Hlavaty
Hi Alex, For this there is another mechanism in '_htSet': If the name does not start with '*', the corresponding value is stored in the 'http' property of that symbol. This will avoid conflicts with existing symbols. I'll have a look at that, thanks. Storing these symbols in '*Allow' is

Re: Http query variables

2008-11-21 Thread Tomas Hlavaty
Hi Alex, I would definitely not use +String, to avoid the trouble and cost of conversions. If it is just a list of cons pairs where the CDR parts are atomic, there is no currently other way than +Any. But if it is of a homogeneous list structure like ((key1 string1 123) (key2 string2

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

2008-11-22 Thread Tomas Hlavaty
Hi Alex, I have the following code: === (load @lib/http.l @lib/xhtml.l @lib/form.l) (de done () (msg done) (html 0 done NIL NIL Finito ) ) (de start () (html 0 start NIL NIL (prin form action=\@done\ method=\post\ input type=\hidden\ value=\v1\ name=\n1\/ input

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

2008-11-23 Thread Tomas Hlavaty
Hi Alex, (for (N *ContLen (gt0 N)) (dec 'N (size (link (char ) ) Hmm, sorry, this also seems not to work :-( The problem is that (char) does a single-character look-ahead, so it will also hang. I just found it too, it hangs on the last char:-( At the moment I see no

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

2008-11-23 Thread Tomas Hlavaty
I was thinking about rewriting the server, I already wrote a prototype asynchronous http server but I have only the reading part non-blocking and not the writing part yet. I do not want to spend too much time on it right now. Sorry, I was not clear. It would not have to be a asynhronous

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

2008-11-23 Thread Tomas Hlavaty
An even better solution might be to extend the built-in 'line' function in that a way that when only a single 'cnt' argument is passed it is taken as a length parameter. The idea is that in the current semantics of 'line' a single 'cnt' argument makes no sense. But would cnt mean number of

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

2008-11-23 Thread Tomas Hlavaty
Hi Alex, thanks for fixing it. Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

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

2008-11-23 Thread Tomas Hlavaty
Hi Alex, (redef _htSet @ (if (and *HtVarsHook (*HtVarsHook)) (push '*HtVars (cons (pack (next)) (next))) (pass _htSet) ) ) thank you, I will use this;-) Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

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

2008-11-23 Thread Tomas Hlavaty
Hi Alex, isn't semantics of 'peek' and 'char' a bit strange? 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. I think that once I get something from peek, I should be able to get

cookie parsing bug fix

2008-11-25 Thread Tomas Hlavaty
Hi Alex, in file @lib/http.l (de _htHead () .. (setq *Cookies (mapcar '((L) (setq L (split L =)) (cons (htArg (car L)) (htArg (cadr L))) ) (split @X ;) ) ) ) leaves single

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

2008-11-26 Thread Tomas Hlavaty
Hi Alex, My suspicion is that it has something to do with Keep-Alive, and one just a thought: even if the client sends keep-alive, the server can respond close and close the connection. Is there any particular reason you do not want to close the connection after you served the request? Would

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

2008-11-26 Thread Tomas Hlavaty
Hi Alex, Sometimes POST seems to lose data, or contain data out of context. No idea yet, but I observe this once every few weeks, and I'm tracing the activities now. I haven't noticed this yet but I'll let you know if I do;-) Cheers, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

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

2008-11-26 Thread Tomas Hlavaty
Hi Alex, it works for me now with ht:Read. Would it be possible to put comment into CHANGES file? Do you use any version control system? Thanks, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: db and multiple processes

2008-11-27 Thread Tomas Hlavaty
Hi Alex, Usually not, though I do it in certain cases. In what cases and how you do it? I want to split my app into two independent processes (process families): an admin part (quite complex, can change a lot and significantly, can stop quite often for upgrades etc.) and public part (quite

Re: db and multiple processes

2008-11-27 Thread Tomas Hlavaty
Hi Alex, The SmApper system also has an application manager, and tens to hundreds of interconnected database applications on blade clusters. that sounds impressive, what does it actually mean? Just curious, is that all picolisp processes spread over many machines managing many databases all

Re: db and multiple processes

2008-12-01 Thread Tomas Hlavaty
Hi Alex, What I'd like to know first: Is it necessary here that they both share a common database, or would it also be conceivable that each has its own database, and they just exchange information? yes, I managed to export data from the admin part (at suitable times) for the 24/7 part so

Re: db and multiple processes

2008-12-02 Thread Tomas Hlavaty
Hi Alex, Well, then I'm rather worried. Something must be really wrong with the distribution mechanism ;-) found it. I am sorry, something seriously wrong with me:-( Cheers, Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

database contest article

2008-12-04 Thread Tomas Hlavaty
Hi Alex, I am trying to find as much information about the database contest you took part in as possible. So far, I found: http://www.mysql.de/news-and-events/in-the-news/ct.1306.190-193.pdf (in German) http://www.greatlinux.com.cn/turbo/userfiles/file/mysql_wp_benchmarks_50.pdf (in English,

Re: database contest article

2008-12-04 Thread Tomas Hlavaty
Hi Henrik, Anyone care to explain why PicoLisp only got second place? :-) if they measured The way to do it, picoLisp would be 1st:-D I would speculate: one limiting factor might be the forking http server (it should be simple to test how many requests per second I can fire at it and compare

Re: database contest article

2008-12-04 Thread Tomas Hlavaty
I would speculate: one limiting factor might be the forking http server (it should be simple to test how many requests per second I can fire at it and compare it to the competition results to get a rough idea) but it is pure speculation as I know almost nothing about that competition. I just

Re: database contest article

2008-12-04 Thread Tomas Hlavaty
Hi Alex, The major reason, however, was a serious bug in PicoLisp at that time. We found it at SmApper, some time after the contest, when importing data from a large number of processes. what a pity:-( The bug was that after the select() system call only the first available file

Re: database contest article

2008-12-04 Thread Tomas Hlavaty
Hi Henrik, Well Thomas, I see that they used PHP in that test which means they're using the beloved Apache probably. which I think you have bashed earlier for its forkedness etc, this Wasn't it somebody else? ;-) Apache tries to be clever about forking, maintaining a process pool for

Re: database contest article

2008-12-04 Thread Tomas Hlavaty
Wasn't it somebody else? Randall maybe... I believe to remember it was Konrad ;-) are we officially adopting blame culture? ;-) Tomas -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

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

2008-12-23 Thread Tomas Hlavaty
Hi Alex, BTW, did you have a chance to experiment with the new extensions of 'eval' and 'run'? I feel that the new 'lst' argument (for excluding specific symbols from the process) was a good idea. I think it was a good idea too. I have attached the xml function which makes use of the new

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

2009-01-02 Thread Tomas Hlavaty
, and send it to me during this week? Then it can be included in picoLisp-2.3.5 due to the end of this month. It'll have to go in the next version:-o Thank you, Tomas # 09aug08abu # 09aug08 Tomas Hlavaty kviet...@seznam.cz # Check or write header (de xml? (Flg) (if Flg (prinl ?xml

Re: sort

2009-01-02 Thread Tomas Hlavaty
Hi Alex, What user-defined less-than relation do you have in mind? I am implementing multi-methods in picolisp, see http://logand.com/picoWiki/multimethods What I need there is to order methods by their prototype, so that more specialized methods are called first. This more specialized thing

Re: sort

2009-01-02 Thread Tomas Hlavaty
Hi Alex, : (lintAll) - ((order (bnd S))) I tried it on the multi-method code and got a warning: (de mmApply @ (let (N (next) A (rest) K (mapcar type A) Mm (filter '((M) (mmApplicable K (car M))) (get N 'mm)) ) (ifn Mm (quit 'mm (list No

  1   2   3   4   >