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

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

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: 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, : (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

Re: sort

2009-01-07 Thread Tomas Hlavaty
Hi Alex, : (let L (make (do 10 (link (rand (bench (sort L) T)) 0.251 sec - T thanks for pointing out the 'bench' function;-) Cheers, Tomas -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: sort

2009-01-07 Thread Tomas Hlavaty
Hi Alex, A typical example would be sorting a list of customers by city, name and customer number, in that order. A binary comparison for 'sort2' would look like (sort2 (collect ... '+CuSu ...) '((CuSu1 CuSu2) (cond (( (; CuSu1 ort) (; CuSu2 ort))

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

2009-01-07 Thread Tomas Hlavaty
, chunking works fine. I tried it with the v2.3.5 + the latest lib/xml.l from the testing release only so I am not sure whether it is caused by the recent changes in i/o functions. Thank you, Tomas # 03jan09abu # 07jan09 Tomas Hlavaty kviet...@seznam.cz # Check or write header (de xml? (Flg

Re: sort

2009-01-07 Thread Tomas Hlavaty
I'm not sure. I feel that it is its ugliness which predestines it to denote such a local concept. Fair enough:-) Cheers, Tomas -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: sort

2009-01-07 Thread Tomas Hlavaty
Hi Alex, and on top of that calls the retrieval code twice on each invocation). I am not sure about what you mean. The 'sort' algorithm have some strategy how it accesses the elements and by the time the function compare() is called, it already has the elements available so it does not have

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

2009-01-17 Thread Tomas Hlavaty
Hi Alex, Then (xml T ...) would generate a list, while (xml ...) would write to the current stream, no matter if it is chunked or not. you are right, the interface would be more logical without 'out'. I think the parameter Out = T should have been associated with the N parameter, i.e. -2 ~

Re: deploying multiple picolisp web applications

2009-01-19 Thread Tomas Hlavaty
Hi Alex, A direct link to the default port might not always be desired, as this is often not the main application (but some other home page). I cannot see how this can be a problem? Having the same configuration, the only difference is that with httpGate you would get connection error while

Re: deploying multiple picolisp web applications

2009-01-19 Thread Tomas Hlavaty
Hi Alex, But still I want to keep simple things simple. 'httpGate0' connects back to the first port without asking, which I think is the worst default behavior. I guess that it depends on the point of view. I think httpGate is more complicated than httpGate0 and also it is broken in the

Re: deploying multiple picolisp web applications

2009-01-20 Thread Tomas Hlavaty
Hi Alex, parse the Referer: So I added it to lib/http.l, available now in the testing release. thank you, the referer could be useful to have there. I think it would be good to have all headers the client sent accessible though. Cheers, Tomas -- UNSUBSCRIBE:

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

2009-01-21 Thread Tomas Hlavaty
. Thank you, Tomas # 03jan09abu # 21jan09 Tomas Hlavaty kviet...@seznam.cz # Check or write header (de xml? (Flg) (if Flg (prinl ?xml version=\1.0\ encoding=\utf-8\?) (skip) (prog1 (head '( ? x m l) (till )) (char) ) ) ) # Generate/Parse XML data # expects well

IPC

2009-01-31 Thread Tomas Hlavaty
Hi Alex, I am struggling to understand picolisp IPC functions (hear, tell, rpc, sync...). I have attached code for the Dining Philosophers problem which gets stuck after calling 'hear' in the philosopher (child) process. The idea is that each philosopher is a process which opens a fifo and all

Re: IPC

2009-02-02 Thread Tomas Hlavaty
Hi Alex, as in 'open'. Therefore, I would rather reduce the functionality of 'hear', so that from now on it only accepts a file descriptor (and no longer a symbolic argument). I'll write it into the ReleaseNotes. I see, thank you. You tried to use 'rpc' to send messages to the other

Re: IPC

2009-02-07 Thread Tomas Hlavaty
Hi all, the Chandy / Misra solution to Dining Philosophers Problem in picolisp seems to be working now so the code is now at http://logand.com/sw/phil.l for anybody interested. The problem with the previous code was that once the hungry philosopher handed over his dirty fork, he had to ask to

Re: IPC

2009-02-08 Thread Tomas Hlavaty
Hi Alex, There is no other place where the internal event loop (the C-function waitFd()) is called. I see. I'm wondering whether the 'fifo' is really necessary? The fifo is there to defer requests for chopsticks when the philosopher is hungry or eating. Do you have any other mechanism in

Re: IPC

2009-02-09 Thread Tomas Hlavaty
Hi Alex, The fifo is there to defer requests for chopsticks when the philosopher is hungry or eating. Do you have any other mechanism in mind? As the tell - hear mechanism is a pipe, it behaves like a fifo. So I would expect that this would suffice. Not due to the logic of the algorithm,

'match' side-effect interacts with '_htSet'

2009-02-16 Thread Tomas Hlavaty
Hi Alex, I have a web application which displays a page by loading an allowed *.l file. In that *.l file, I use 'match' with @Z pattern var and then process and display the result. The var @Z is set by 'match' to whatever was matched and displaying the data for the first time works fine.

Re: +BubbleButton does not update chart when javascript enabled

2009-02-20 Thread Tomas Hlavaty
Hi Alex, I pasted it into app/role.l, changed 'it' to 'usr', '+It' to '+User' and (choIt ..) to (choDlg ..), and it works just fine. I found it works with the standard deployment with httpGate but does not work for me when running behind a web server (nginx). Everything seems to be working

Re: +BubbleButton does not update chart when javascript enabled

2009-02-20 Thread Tomas Hlavaty
Hi Alex, it looks like it should not be getting 1 T 0 from the server but only T. Not sure why is that... Could you please describe the form.js protocol briefly? Thank you, Tomas -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: +BubbleButton does not update chart when javascript enabled

2009-02-21 Thread Tomas Hlavaty
) ) (dm val () (bool (super)) ) (class +Radio +field) # Inited by Tomas Hlavaty kviet...@seznam.cz # grp val lbl # (grp val [lbl]) (dm T (Grp Val Lbl) (super) (=: grp (if Grp (field @) This)) (=: val Val) (=: lbl Lbl) ) (dm show (Var) (showFld (radio (cons '*Gui

Re: +BubbleButton does not update chart when javascript enabled

2009-02-21 Thread Tomas Hlavaty
Hi Alex, The restriction to HTTP/1.0 has another disadvantage: It will degrade the performance of XMLHttpRequests, because it needs to open and close a separate TCP connection for each HTTP transaction. Certain operations, like scrolling in charts, are perceptibly slowed down, especially when

picoLisp and Gtk

2009-02-26 Thread Tomas Hlavaty
Hi all, I updated the gtk-server interface at http://logand.com/gtk/ and added a some more complicated examples: http://logand.com/gtk/gtk-mandelbrot.l http://logand.com/gtk/gtk-gl-teapot.l Cheers, Tomas -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: cookies redirect fix

2009-03-21 Thread Tomas Hlavaty
Hi Alex, I'm a bit late with my reply, as I'm travelling through the south of Japan since almost two weeks, and have only infrequent (and unreliable) access to the internet. enjoy your trip then;-) ( (loc *Cookies http)) I see. To just redefine 'httpStat' in the way you suggested,

Re: Cookie question

2009-04-02 Thread Tomas Hlavaty
Hi Henrik, (cookie 'uid Uid) (setq *Cookies (cons 'uid Uid)) (redirect (pack *Domain @desktop))) The problem is that 'redirect' does not set the cookies (see the previous discussion and @lib/http.l code for 'redirect', 'httpStat' and 'httpHead'). Also, you do not need (setq *Cookies (cons

Re: Status of 64 picoLisp

2009-04-02 Thread Tomas Hlavaty
Hi Alex, However, I am aware of the fact that in picoLisp the printing of numeric results is often much more expensive than the actual calculations, due to the conversions necessary for the decimal base. If I take out the final (prinl Y) from gmp-test2.l, I get: It makes a considerable

Re: Cookie question

2009-04-02 Thread Tomas Hlavaty
Hi Alex, ok, ok, now as there is such a _huge_ demand for cookies ;-) :-D I was always reluctant to include any cookie support at all, as the http and form frameworks are designed to work without them Fair enough. I privately consider cookies a bad design issue. I agree to some extent.

Re: Some input/output problems

2009-04-04 Thread Tomas Hlavaty
Hi Henrik, any example of using the normal curl to handle redirects would be welcome so I don't have to go via php. $ man curl suggests that using the -L option will cause curl to use the redirected url, e.g.: curl -s -L http://feeds.feedburner.com/codinghorror works. However, it again

Subscribe

2009-04-20 Thread Tomas Hlavaty
Hello Tomas Hlavaty t...@logand.com :-) You are now subscribed Changing address -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

collect and db difference?

2009-04-21 Thread Tomas Hlavaty
Hi Alex, is this expected behaviour? : (collect 'usr '+Pat *U 'doc *D) -(NIL) : (db 'usr '+Pat *U 'doc *D) -{Bg} I would expect 'collect' returning ({Bg}). Or could it be some problem with my ER schema? (class +Pat +Entity) (rel doc (+Ref +Link) NIL (+Doc)) (rel usr (+Ref +Link) NIL (+Usr))

(pack (intern NIL)) bug?

2009-04-21 Thread Tomas Hlavaty
Hi Alex, is there a function to look up an interned symbol? 'intern' does not seem to be doing that: : (intern NIL) - NIL : (pack NIL) - NIL : (pack (intern NIL)) - NIL : This behaviour seems a bit strange to me. I would expect (pack (intern NIL)) to return NIL... Thank you, Tomas --

Re: (pack (intern NIL)) bug?

2009-04-22 Thread Tomas Hlavaty
Hi Alex, The question is: What is the correct way? I am writing my own sexp reader which is safe against malicious input, i.e. it does not call eval (the escape chars like ` are not understood). : (intern 123) - 123 : (+ @ 7) 123 -- Number expected I thought I could use

'chain' and atom argument

2009-04-22 Thread Tomas Hlavaty
Hi Alex, (chain 'lst ..) - lst is there a reason 'chain' does not work with atoms? : (make (link 1)) - (1) : (make (link 1) (chain 2)) - (1) : (make (link 1) (chain (cons 2 3))) - (1 2 . 3) : (make (link 1) (chain 2) (chain (cons 3 4))) - (1 3 . 4) : (make (link 1) (chain 2) (chain (cons 3

Re: 'chain' and atom argument

2009-04-22 Thread Tomas Hlavaty
Hi Alex, I would expect: : (make (link 1) (chain 2)) - (1 . 2) In this respect, 'chain' is analogous, it simply processes the cell arguments, and does not preserve any CDRs, as it cannot not know if later more elements will be added with 'link' or 'chain'. Yes, I think the behaviour

Re: collect and db difference?

2009-04-22 Thread Tomas Hlavaty
Hi Alex, 1. You could use the Pilog functions 'pilog' or 'solve' and 'select' 2. The most efficient way is to use an '+Aux' key. This generates a combined key in addition to the two indexes for 'usr' and 'doc'. Thank you for the examples, Tomas -- UNSUBSCRIBE:

Re: parsing input

2009-04-24 Thread Tomas Hlavaty
Hi Randall, I read a line, which looks something like: 01/02/2009 30.00400.00tRandall Dow in which the fields are separated by a varying number of spaces. That gets put into L, and then I delete the NILs that come from multiple spaces. Do you have a suggestion for a better

postscript utf8

2009-04-25 Thread Tomas Hlavaty
Hi Alex, current @lib/ps.l does not deal with utf well enough and comes with a workaround involving bin/lat1. Bellow is a prototype code for displaying utf characters in poscript insired by https://mailman.research.att.com/pipermail/graphviz-interest/2004q2/001407.html # *PsGlyph (in

Re: Forgot the code again!

2009-05-06 Thread Tomas Hlavaty
Hi Alex, the usage of 'idx' in my implementation had a serious flaw: Because the unicod values in glyphlist.txt are partially sorted, we get a highly imbalanced tree: Why does inserting and removing using 'idx' require manual rebalancing using 'balance' in the first place? I would expect

Re: postscript utf8

2009-05-06 Thread Tomas Hlavaty
Hi Alex, them into a lib/head.ps header file. This file is now included from ... I just downloaded the testing version and can't find it there? Hmm, it should be there: $ tar tvfz picoLisp.tgz |grep head.ps -rw-r--r-- abu/abu 641 2009-05-05 15:19 lib/head.ps I see the

Re: pdf generator

2009-05-07 Thread Tomas Hlavaty
Hi Alex, I think it is wiser and much easier to write a separate C library for specialized I/O. you convinced me:-) Thanks, Tomas -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: 'idx' and balancing

2009-05-07 Thread Tomas Hlavaty
Hi Alex, 'idx' is deliberately designed in this way. It does only the basic, straight-forward binary tree operations. This can be quite fast, because balancing operations (or using self-balancing trees like splay trees) introduce additional overhead. And - except for pathological situations

Re: Questions

2009-05-11 Thread Tomas Hlavaty
Hi Kriangkrai, (with-xml (tag1 (@ attr1 val1) text (tag2 text) text )) If you go this route, why not something like: (with-xml (tag1 @attr1 val1 text (tag2 text) text ) ) Also, if you don't manage to hook your error handler to

Re: Questions

2009-05-12 Thread Tomas Hlavaty
Hi Kriangkrai, A tutorial on PicoLisp FFI would be great; with that, PicoLisp would have no shortage of libraries! ;-) not exactly a tutorial, but I have looked into this a while ago and you can find a prototype ffi generator at http://logand.com/mplisp/src/mod/ It should be fairly

Re: Questions

2009-05-12 Thread Tomas Hlavaty
Hi Kriangkrai, Because with (@ attr1 val1 ...), you can retrive the attributes by just using (assoc '@ sxml). Is there any advantage of using your syntax @attr1 val1 ...? advantage is that you don't have to put the attributes in a list manually, your 'with-xml' function can do that for you;-)

  1   2   3   >