Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Hi List, related to the nice idea of publishing the Rosettacode examples (which would actually be nicer _with_ the task descriptions included) I have a few (probably rather newbie) technical questions about manipulating the file-system and processing text in PicoLisp: 1. How to make, concat,

Re: Processing Text in PicoLisp

2012-07-23 Thread Henrik Sarvell
Hi Thorsten. Below I've pasted links to descriptions of functions that might or might not be what you want based on a quick glance on your questions: 1.) http://software-lab.de/doc/refC.html#call 2.) http://software-lab.de/doc/refM.html#match 3.) I don't really get this one, isn't it possible

Re: Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes: Hi Alex, thanks a lot, thats what I needed to know, now I have to give it a try. 3. Is it possible to use 'prog' or 'let' with 'apply', i.e. apply a whole sequence of functions instead of only one to the 'lst argument? I'm not sure what you

Enhanced ref doc for the 'for' forms

2012-07-23 Thread Jon Kleiser
Hi Alex, For quite some time I've felt that the ref. documentation for the 'for' forms could need some improvements. The 'for' function is a very important function, and for most people who are new to PicoLisp, it will be one of the first functions they will have to learn. At the same time,

Re: Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Henrik Sarvell hsarv...@gmail.com writes: Hi Henrik, Below I've pasted links to descriptions of functions that might or might not be what you want based on a quick glance on your questions: 1.) http://software-lab.de/doc/refC.html#call 2.) http://software-lab.de/doc/refM.html#match

Re: Enhanced ref doc for the 'for' forms

2012-07-23 Thread Alexander Burger
Hi Jon, For quite some time I've felt that the ref. documentation for the 'for' forms could need some improvements. The 'for' function is a Very true! What I've done is (a) inserted a few br line breaks so that the descriptions of the three forms are separated, and so that it will be a

Upper limit for list lenght in PicoLisp?

2012-07-23 Thread Thorsten Jolitz
Hi List, I have a rather strange problem: I want to (from within Emacs) ,-- | (setq X (list string1 ... string200)) `-- and it seems PicoLisp just freezes - no error messages, but no output either, and the process

Re: Upper limit for list lenght in PicoLisp?

2012-07-23 Thread Alexander Burger
Hi Thorsten, Is there something like an upper limit for how many Strings can be in a list in PicoLisp? Or might that be Emacs related? No, there is no limit. Neither to the length of the command line (if you use the built-in line editor). How did you invoke PicoLisp? Does this also happen if

Re: Upper limit for list lenght in PicoLisp?

2012-07-23 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes: Hi Alex, Is there something like an upper limit for how many Strings can be in a list in PicoLisp? Or might that be Emacs related? No, there is no limit. Neither to the length of the command line (if you use the built-in line editor). How did

Re: Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes: For making files where you will usually use 'out', and write directly to the file. To concat two files, you could do: (out c (in a (echo)) (in b (echo))) Erasing a file is not implemented as a PicoLisp function. You can simply call 'rm'

Re: Upper limit for list lenght in PicoLisp?

2012-07-23 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes: Hi Alex, You said that you call it as (setq X (list string1 ... string200)) Note that this evaluates the transient symbols string1 etc., so if one of them has a value NIL (or anything else), it will be included in the list. What you

Re: Processing Text in PicoLisp

2012-07-23 Thread Henrik Sarvell
AFAIK out doesn't do auto dir creation or any dir creation for that matter. Looks good but the cd thing should not be necessary, just use the absolute path in the last call. Note that you can use info to check stuff, could possibly be used in a function that checks a certain path from top to

Re: Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Henrik Sarvell hsarv...@gmail.com writes: AFAIK out doesn't do auto dir creation or any dir creation for that matter. ok Note that you can use info to check stuff, could possibly be used in a function that checks a certain path from top to bottom and creates any missing dirs on the way. Ie

Re: Processing Text in PicoLisp

2012-07-23 Thread Alexander Burger
Hi Thorsten, Is there a way to make 'out' write directories too? No, 'out' just creates or opens a file for writing. Or do I have to use something like ,-- | (call 'mkdir /new/dir/) `-- Yes. But this works only if /new/ already exists. If