Re: Questions

2009-05-14 Thread Kriangkrai Soatthiyanont
Hi Alex, Only when an object is accessed (value, property list etc.), it is automatically loaded into the Lisp heap as an external symbol. And once loaded, they can be garbage collected when needed, right? The current database files are in a binary format (called PLIO for PicoLisp I/O).

FFI

2009-05-14 Thread Kriangkrai Soatthiyanont
Hi All, This is my attemp on FFI (Foreign Function Interface). It is based on Tomas's work and Alex's answers. Thanks you both! It should work on standard PicoLisp. I hope that it would be useful as a starting point for people new to PicoLisp wanting to interface with C libraries. Best regards,

Re: Vim syntax

2009-05-13 Thread Kriangkrai Soatthiyanont
Hi Alex Just that it has an extended internal architecture (doc/structures), and is written in a generic assembly language, which in turn is written in PicoLisp. Therefore, it has nuch cleaner internal structures and algorithms. Can it interface with C libraries? Best regards, KS --

Re: Questions

2009-05-11 Thread Kriangkrai Soatthiyanont
Hi Alex, As I said, not without modification of the low-level error handler. Execution is not continued after the error is caught, as the 'catch' is in 'mydefs' and not on the lowest level. Why would you need that? It will enable code like this: (with-xml (tag1 (@ attr1 val1)

Re: Questions

2009-05-11 Thread Kriangkrai Soatthiyanont
Hi Tomas, =A0 =A0(with-xml =A0 =A0 =A0 (tag1 (@ attr1 val1) =A0 =A0 =A0 =A0 =A0text =A0 =A0 =A0 =A0 =A0(tag2 text) =A0 =A0 =A0 =A0 =A0text )) If you go this route, why not something like: (with-xml =A0 (tag1 @attr1 val1 =A0 =A0 =A0text =A0 =A0 =A0(tag2 text) =A0 =A0 =A0text ) )

Re: Questions

2009-05-11 Thread Kriangkrai Soatthiyanont
Hi Alex, Please take a look in src/ext.c. There is, for example, 'ext:Sin', that interfaces to scaled integers: =A0 : (ext:Sin 314159 10) =A0 - 0 =A0 : (ext:Cos 314159 10) =A0 - -10 Ah, Thanks. Could you please explain how a double value is encoded in cell? I could not

Re: Questions

2009-05-09 Thread Kriangkrai Soatthiyanont
Hi Alex, 1. What is the purpose of calling (wait) after (server 8080 ...)? It will wait for what? What is the differences if (wait) is not called? In this case (when called without any arguments), 'wait' will wait for an infinite time (see also doc/refW.html#wait). The purpose is to inhibit

Re: 'call' function disables echoing input

2009-05-08 Thread Kriangkrai Soatthiyanont
Hi Alex, Many thanks! Now it works, though it would be much better to have 'call' working correctly. (de shell* (S) # run shell command with interactive input (let Raw (raw) (unless Raw (raw T)) (let Opts '(icrnl icanon iexten echo echoe echok echoctl echoke) #! use (call

Re: Block comment and unescape string

2009-05-08 Thread Kriangkrai Soatthiyanont
Hi Henrik, You may call me KS. It's NOT my intention to fork Pico Lisp! I just need some features. If I can do them myself, I implement and share them back. If I do not know how, I request them or ask for an alternative solution. It's OK for my contribution to not be included in standard Pico

Re: Block comment and unescape string

2009-05-08 Thread Kriangkrai Soatthiyanont
Hi Alex and Henrik, Is Kriangkrai acceptable, too? Sure. Kriangkrai is my first name. KS is from K for Kriangkrai (my first name) and S for Soatthiyanont (my surname). Kriangkrai Soatthiyanont sounds Thai Yes, I'm Thai. Sawadee Krub :-) Best regards, KS -- UNSUBSCRIBE: mailto:picol

Questions

2009-05-08 Thread Kriangkrai Soatthiyanont
Hi Alex, 1. What is the purpose of calling (wait) after (server 8080 ...)? It will wait for what? What is the differences if (wait) is not called? 2. Could you explain how does ht: magic work? : ht:Prin - NIL : (ht:Prin xxx) xxx- T : (ht:abc) ht:abc --

'call' function disables echoing input

2009-05-07 Thread Kriangkrai Soatthiyanont
Hi, The 'call' function seems to disable echo. Also, The Enter key does not end an input line, Ctrl-J must be used instead. When I run: (call 'sh -c echo -n 'name: '; read name; echo $name) It outputs name : and waits for input. I type something (e.g. abc) but nothing echo. I press the Enter

Re: Block comment and unescape string

2009-05-07 Thread Kriangkrai Soatthiyanont
Hi Alex, With unescaped string, we don't need to worry escaping (e.g. \ \^), well except ensuring that there is no $} in the string. With that, we can generate files easily, e.g. (out t.html (prin {$htmlbody style=background-color:#EEE...div class=xxx.../div.../body/html$})) Best regards, KS

Re: Block comment and unescape string

2009-05-07 Thread Kriangkrai Soatthiyanont
Hi Alex, Yes, it's ok to include only block comment :-) Best regards, KS On Fri, May 8, 2009 at 1:20 AM, Alexander Burger a...@software-lab.de wrot= e: Hi Kriangkrai, But what if we want to mix it with expressions? =A0 =A0(let (Clr #EEE =A0Cls xxx) =A0 =A0 =A0 (pack {$htmlbody

Subscribe

2009-05-05 Thread Kriangkrai Soatthiyanont