Re: Termux-Penti-PicoLisp

2017-05-18 Thread Dean Gwilliam
Thanks very much Alex. On 18 May 2017 at 07:00, Alexander Burger wrote: > On Thu, May 18, 2017 at 07:40:34AM +0300, Mike Pechkin wrote: > > cant play videos on windows 10 in chrome-firefox-opera > > Hmm, really? Here on Android with Firefox it works, and also on Debian >

Re: Fixed-point scaling and lookup tables

2017-04-02 Thread Dean Gwilliam
>Picolisp's built-in functions for scaled arithmetic are brilliant That's music to my ears because I've been looking forward to working with those ever since I started Picolisp for solving systems of equations. Still working on acquiring the data at the moment but...getting there :), Thank you for

Re: help with global replace in text file/list of bytes

2017-02-21 Thread dean
in this direction. (de lchg (From To Ipth Opth) (out Opth (in Ipth (while (echo From) (prin To) On 21 February 2017 at 15:20, dean <deangwillia...@gmail.com> wrote: > PS ..yes that Rosetta Code example is close to what I'm after. > > On 21 February 2017

Re: help with global replace in text file/list of bytes

2017-02-21 Thread dean
PS ..yes that Rosetta Code example is close to what I'm after. On 21 February 2017 at 15:19, dean <deangwillia...@gmail.com> wrote: > Hi Andreas > >Do you really need to load all the stuff into RAM? > No...I was originally using in/out > and will go back to trying that fo

Re: help with global replace in text file/list of bytes

2017-02-21 Thread dean
ut ...maybe not. I'll have a go trying to incorporate the above advice and example and report back. It might take me a while. Thank you both very much for your help. Best Regards Dean On 21 February 2017 at 13:14, Joe Bogner <joebog...@gmail.com> wrote: > After trying to figure it o

help with global replace in text file/list of bytes

2017-02-21 Thread dean
I need to globally replace certain words in a text file and because I need to process it a byte at a time initially...I'm inputting processed list of bytes into the global replace function "lchg" (and others) like this. (lbytes_to_fl Cleaned_txt_pth (lchg "fl ow" "flow" (fltr2

Re: clip and chop down consecutive "internal" white spaces to one

2017-02-18 Thread dean
Hi Alex Thank you very much for the elaboration. It helps a lot. Best Regards Dean On 18 February 2017 at 08:11, Alexander Burger <a...@software-lab.de> wrote: > Hi Lindsay, > > >(glue C (filter '((E) E) (split (chop S) C > > I would do the same. > &

Re: clip and chop down consecutive "internal" white spaces to one space??

2017-02-18 Thread dean
(chop Str)) (if (<> Ch " ") (if (= Last_ch " ") (link (pack " " Ch)) (link Ch))) (setq Last_ch Ch)) Best Regards Dean On 18 February 2017 at 06:39, Lindsay John Lawrence < lawrence.lindsayj...@gmai

clip and chop down consecutive "internal" white spaces to one space??

2017-02-17 Thread dean
I've done this and it works but...is there a slicker way :) (setq S " this contains 2 consecutive spaces ") (de shrink (Str) #can't clip before inner pack so need to pack, chop, clip and re-pack (pack (clip (chop (pack (let (Last_ch " ")

Re: trouble reading non blocking space etc

2017-02-15 Thread dean
Until those >128 characters messed me up...I was working with lines but am sure I can adapt what you've writtenwhich looks very slick :) ...to cope with that by trapping the Line feed character and processing the accumulated list upto that point. Thank you very much for your help. On 15

Re: trouble reading non blocking space etc

2017-02-14 Thread dean
test.txt" (while (rd 1) (link (char @ ) ) > -> "hi their: how are you^J" > > # .. or without pack > : (make (in "test.txt" (while (rd 1) (link (char @ ) > -> ("h" "i" " " "t" "h" "e" "

Re: trouble reading non blocking space etc

2017-02-14 Thread dean
Ok...It seems that (rd 1) doesn't work well with (until (eof) so I tried (in "/home/me/test_fl.txt" (while (setq B (rd 1)) (prinl (char B)) (if (= (key) "x") (quit and "while" testing the output of "rd 1" worked fine On 14 F

Re: trouble reading non blocking space etc

2017-02-14 Thread dean
Ok Done it now including the decimal codes and I'd previously seen both hex and hax so...this should keep me busy for a while :). (in "/home/me/test_fl.txt" (until (eof) (setq B (rd 1)) (prinl B ) (if (= (key) "x") (quit On 14 February 2017 at 15:5

Re: trouble reading non blocking space etc

2017-02-14 Thread dean
On 14 February 2017 at 13:03, dean <deangwillia...@gmail.com> wrote: > My mistakeI haven't done it at all and what is moreI'm not sure > how you get the hex value (or decimal value) of the byte to decide what to > do with it. > > On 14 February 2017 at 12:38, dean &l

Re: trouble reading non blocking space etc

2017-02-14 Thread dean
My mistakeI haven't done it at all and what is moreI'm not sure how you get the hex value (or decimal value) of the byte to decide what to do with it. On 14 February 2017 at 12:38, dean <deangwillia...@gmail.com> wrote: > Done it :) > > (in "/home/me/test_fl.t

Re: trouble reading non blocking space etc

2017-02-14 Thread dean
Done it :) (in "/home/me/test_fl.txt" (until (eof) (echo 1) (setq B (in NIL)) (prinl B) (key))) On 14 February 2017 at 12:26, dean <deangwillia...@gmail.com> wrote: > Looking a possible ways around this I saw this in the tutorial :) > >

Re: trouble reading non blocking space etc

2017-02-14 Thread dean
Looking a possible ways around this I saw this in the tutorial :) (in "/home/me/test_fl.txt" (until (eof) (echo 1) (key))) and it works great. My problem is I don't know how to capture (echo 1) into a symbol's val. On 13 February 2017 at 23:03, dean <deangwillia

Re: trouble reading non blocking space etc

2017-02-13 Thread dean
Thank you very much for this! I tried (cd src; make tools) both from the command line...because of "$" and from within Picolisps RPL because of the parens. I looked in src and there is just the utf2.c file. When I do $ (cd src; make tools) from the command line I get... $ (cd src; make tools) ***

trouble reading non blocking space etc

2017-02-13 Thread dean
Hi Here's a test file with it's hex above 6869 a074 6865 6972 3aa0 686f 7720 6172 6520 796f 750a hi.their:.how are you. The following program... (in "/home/me/test_fl.txt" (until (eof) (setq Ln (line T)) (prinl Ln))) results in this hiനeir:ਯw are you I tried this (load

Re: altering LOCAL list elements

2017-02-11 Thread dean
Thank you On 11 February 2017 at 11:51, Joh-Tob Schäg <johtob...@gmail.com> wrote: > You can also explicitly change the car or cdr of a list cell. > If you do a little diging in the docs you might find the functions. > Am 11.02.2017 12:45 schrieb "dean" <deangwilli

Re: altering LOCAL list elements

2017-02-11 Thread dean
to the new head of the list. >> >> Does that explanation make sense? >> >> You can either destructivly change the car of a cell in the list or write >> your own pop which keeps the same cell at the head of the list (by >> reassigning car parts appropiatly). >

Re: altering LOCAL list elements

2017-02-11 Thread dean
This works too but I really want to remove setq from the middle of doit : (de doit () (let L (0 0 0) (setq L (insert '1 (remove '1 L) 2)) (prinl "L is " L) ) ) -> doit : (doit) L is 200 -> (2 0 0) On 11 February 2017 at 10:29, dean <deangwillia...@gmail.co

Re: altering LOCAL list elements

2017-02-11 Thread dean
and use a local solution but don't think that I can On 11 February 2017 at 10:38, dean <deangwillia...@gmail.com> wrote: > This works too but I really want to remove setq from the middle of doit > > : (de doit () >(let L (0 0 0) > (setq L (insert '1 (remove '1 L)

Re: altering LOCAL list elements

2017-02-11 Thread dean
BTW I left setq in the midlle of doit by accident...i.e I used it to work out how to replace a list element by index not value as per the built-in replace. On 11 February 2017 at 10:38, dean <deangwillia...@gmail.com> wrote: > and use a local solution but don't think that I can

Re: altering LOCAL list elements

2017-02-11 Thread dean
commented out which would replace the top setq... line but no go and probably quite rightly. It just that (let A 3..(inc 'A)...allows A to have it's value altered but there doesn't seem to be a way to bring inc/dec to bear on a list element in the same very influential way. On 11 February

Re: altering LOCAL list elements

2017-02-11 Thread dean
k you for your advice and best regards Dean On 11 February 2017 at 02:07, Joe Bogner <joebog...@gmail.com> wrote: > dean, is this what you are describing? > > (let L (list 1 2 3) > (setq L (append L (4))) > (printsp L) ) > > > (1 2 3 4) > >

altering LOCAL list elements

2017-02-10 Thread dean
Hi I've seen that I can alter local/let'd atoms? via inc/dec i.e. (inc 'Some_atom) which gets me a long way... ..but what about list elements? (setq L (0 0 0)) (de doit () #(let L (0 0 0) (setq L (insert '1 (remove '1 L) 2)) (prinl "L is " L) #) ) When I "setq" L this works

Re: unit testing?

2017-02-10 Thread dean
Hi andreas That looks very good to me...thank you very much indeed! Best Regards Dean On 10 February 2017 at 17:12, <andr...@itship.ch> wrote: > Hi Dean > > PicoLisp is an interpreted language, so very dynamic. > Therefore, why not just do it with a global flag variable? >

Re: unit testing?

2017-02-08 Thread dean
that's right that's great. Thank you Chrostophe for the further explanation re Python. Best Regards Dean On 8 February 2017 at 14:47, Christophe Gragnic <christophegrag...@gmail.com > wrote: > On Wed, Feb 8, 2017 at 12:13 PM, Alexander Burger <a...@software-lab.de> >

unit testing?

2017-02-08 Thread dean
When developing non-trivial functions in isolationyou need to copy some of the supporting scaffolding over from your main program to support it. When you subsequently come to "load" the module into your main program...there's a danger of duplicate scaffolding. Is there some way to hide the

Re: replacement for (let L2 (drop L1 2)....

2017-02-07 Thread dean
don't have that problem now and despite my lack of familiarity and needing to look a lot of stuff upthe results are extremely rewarding. Thank you all for your help and advice. Best Regards Dean On 7 February 2017 at 08:50, Jon Kleiser <jon.klei...@ceres.no> wrote: > Hi, > > I

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread dean
I just came back to say I just looked and didn't realise I had to click P16 to see that function Thanks once again. Just goes to show...however idiot-proof you make your system someone will just invent a better idiot :) On 6 February 2017 at 22:51, dean <deangwillia...@gmail.com>

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread dean
Oh gosh...I missed that completely...Thanks Lindsay...That explains everything! I'm really pleased you told me that because drop looks like a really useful function. Best Regards Dean On 6 February 2017 at 22:27, Lindsay John Lawrence < lawrence.lindsayj...@gmail.com> wrote: > P16

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread dean
sr which I think ISN'T local and I think I compiled a local version. Irrespectivethank you very much for your solution. Best Regards Dean On 6 February 2017 at 15:24, Alexander Burger <a...@software-lab.de> wrote: > On Mon, Feb 06, 2017 at 12:25:14PM +0100, Alexander Burger wr

replacement for (let L2 (drop L1 2)....

2017-02-06 Thread dean
Hi I'd like to split a list '(txt1 2 txt2 6 into 2 lists '(txt1 txt2... and '(2 6 I found drop (in ninety nine...) which looks ideal but it's apparently undefined in pil64. I've looked for something similar but it's not jumping out :) Any help much appreciated.

returning a list of symbols after sorting...not values

2017-02-05 Thread dean
"by".found it :) : (let (A 1 B 2 C 3) (by val sort '(C A B))) -> (A B C)

returning a list of symbols after sorting...not values

2017-02-05 Thread dean
I'm sure I've seen an example of this but can't find it. e.g. ( let (A 1 B 3 C 2) (let L1 (list A B C) (let L2 (sort L1. but getting A B & C in order not 1 2 3 Any help much appreciated

Re: Future of PicoLisp?

2017-02-04 Thread dean
cture-for-arguments which saves you using the stack but not quite as fast as the value sitting their in the register. Hope that helps and no problem if this is not of interest...I just saw it as a way of overcoming CLANG problems re pil32. Best Regards Dean On 4 February 2017 at 20:46, dean <dea

Re: Future of PicoLisp?

2017-02-04 Thread dean
Call DWORD ProcAddr USING protoFreeCCSDLL(Key,Param) TO lResult 'Do some more calls/processing 'Release Library Call FreeLibrary(hLib) Function = lResult End Function On 4 February 2017 at 20:26, dean <deangwillia...@gmail.com> wrote: > Re the carry flag...you can get

Re: Future of PicoLisp?

2017-02-04 Thread dean
Hi Alex With stack control I mean that you can do unlimited 'push'es and 'pop's to/from the stack inside a function, and build arbitrary structures this way on the stack. You can add, subtract, increment and decrement the stack pointer arbitrarily, and switch between different stacks by assigning

Re: (NIL) vs Nothing

2017-02-04 Thread dean
Thank you for your further explanation On 4 February 2017 at 08:29, Alexander Burger wrote: > On Fri, Feb 03, 2017 at 10:04:02PM +0100, pd wrote: > > The reason for this difference is let behaviour: let binds a symbol to a > > value *inside* let expression but first

Re: Future of PicoLisp?

2017-02-04 Thread dean
n addition to the meta statement #STACK num_exprSet the maximum potential stack size. here's a link re stack overhead reduction with some additional links further down that expand on the subject. http://www.powerbasic.com/help/pbcc/stack_overhead_reduction.htm Best Regards Dean On 3 February

Re: Future of PicoLisp?

2017-02-04 Thread dean
Oops our threads have crossed. Sorry about that. I'll read what you've said now. On 4 February 2017 at 08:47, dean <deangwillia...@gmail.com> wrote: > Hi Alex... > > re multiple entry points...assuming that means setjmp and longjmp which > save and preserve those registers ab

Re: (NIL) vs Nothing

2017-02-04 Thread dean
're interested let me know ;-) > > As picolisp seem not to have a let* like in classical lisp I assume let > bindings are done in parallel as traditionally let behaves in classical > lisp, sure Alex can state it clearly > > > On Thu, Feb 2, 2017 at 7:20 PM, dean <deangwillia

Re: Future of PicoLisp?

2017-02-03 Thread dean
t; have tried it if it had not been available as a package from ubuntu. > > As Dean said, if there's anything we can do, let us know. > > On Fri, Feb 3, 2017 at 10:31 AM, Alexander Burger <a...@software-lab.de> > wrote: > >> Hi Dean, >> >> > Assum

Re: Future of PicoLisp?

2017-02-03 Thread dean
The above addresses only your pil32 problem. I had no idea re pil64 on Android so glad you sorted it :) On 3 February 2017 at 13:06, dean <deangwillia...@gmail.com> wrote: > >the future of PicoLisp is dark. > That sounds about right...I run openbsd and they've just ma

Re: (NIL) vs Nothing

2017-02-02 Thread dean
Just to illustrate what I meant... : (let X 0 (for Y 3 (let X (inc 'X) (prinl X 1 1 1 -> 1 On 2 February 2017 at 18:16, dean <deangwillia...@gmail.com> wrote: > Thank you very much for the adviceI've just used that and it's worked > a treat > > : (let

Re: (NIL) vs Nothing

2017-02-02 Thread dean
res with the first let. Irrespective...you've provided a very elegant solution to my problem and I thank you for it! On 2 February 2017 at 17:24, pd <eukel...@gmail.com> wrote: > I think this is not the use you intent > > In *my* opinion: > > On Thu, Feb 2, 2017 at 3:44 PM, dean

Re: (NIL) vs Nothing

2017-02-01 Thread dean
Thank you for your insight that contradicts and clarifies numerous of my misconceptions. That's exactly what I needed. Best Regards Dean On 1 February 2017 at 08:20, Alexander Burger <a...@software-lab.de> wrote: > He Dean, > > > I've "proved" that a let statement'

Re: (NIL) vs Nothing

2017-01-31 Thread dean
Ln_no ) but really like this short and to the point syntax. Again...thank you very muchI feel I've learnt a lot today. Best Regards Dean On 31 January 2017 at 19:30, dean <deangwillia...@gmail.com> wrote: > BTW > > This *might* be what you need. I can't

Re: (NIL) vs Nothing

2017-01-31 Thread dean
ank you for your help and example. They are very much appreciated. Best Regards Dean On 31 January 2017 at 18:31, Alexander Burger <a...@software-lab.de> wrote: > On Tue, Jan 31, 2017 at 07:14:57PM +0100, Alexander Burger wrote: > > The only place where it is good is the line (se

Re: (NIL) vs Nothing

2017-01-31 Thread dean
(if (<> (: new_buf) NIL) (if (=0 (: first_ln_no)) (=: first_ln_no Ln_no)) (reset> This)) (setq Res 0 On 31 January 2017 at 16:35, dean <deangwillia...@gmail.com> wrote: > Any help adv

Re: (NIL) vs Nothing

2017-01-31 Thread dean
se there's an if statement deciding whether to change it's supplied value or not. On 31 January 2017 at 16:29, dean <deangwillia...@gmail.com> wrote: > Oops acccidentally sent before I finished...Sorry! > > I was going to say the examples I've seen tend to be > (let X 3 > >

Re: (NIL) vs Nothing

2017-01-31 Thread dean
Any help advising how I should restructure the parens in order to replace setq with let would really help me to understand how to do it. Thank you in anticipation and sorry if this is a really easy thing to do. On 31 January 2017 at 16:32, dean <deangwillia...@gmail.com> wrote:

Re: (NIL) vs Nothing

2017-01-31 Thread dean
es)) (prog #not a member (=: new_buf (fltr_mtchng_hdng_rmndrs Ln)) (if (<> (: new_buf) NIL) (if (=0 (: first_ln_no)) (=: first_ln_no Ln_no)) (reset> This)) (let Res 0) On

Re: (NIL) vs Nothing

2017-01-31 Thread dean
Each one of the "let"s in the following method WAS a setq. All I did was wrap the existing body with parens and assign Ln and Res with "let" but it doesn't work. The examples I've seen tend to be like this... (let X 3 ) ) On 30 January 2017 at 16:19, dean <deangwil

Re: (NIL) vs Nothing

2017-01-30 Thread dean
Hi Alex Yes that worked great preceded by a testi.e. whizzing through all file lines in the input file until almost the 4000th which triggered reporting on the method of interests's input and output. Thank you very much for the advice. Best Regards Dean On 30 January 2017 at 11:07, Alexander

Re: (NIL) vs Nothing

2017-01-30 Thread dean
t I am in debug mode on a method (rather than a function which is just (debug 'Fn) at that point. I have tried but get can't trace. Any help much appreciated. On 29 January 2017 at 15:29, dean <deangwillia...@gmail.com> wrote: > I've just tried sprinkling (!) in my source. > That is g

Re: (NIL) vs Nothing

2017-01-29 Thread dean
I've just tried sprinkling (!) in my source. That is going to help me A LOT. It looks like the PL equivalent of int 3 :)

Re: (NIL) vs Nothing

2017-01-29 Thread dean
Dean On 29 January 2017 at 14:42, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, > > > I'm tending to develop functions in isolation so I can watch them like a > > hawk. > > Watching like a hawk is always good! ;) > > In addition to that, I would

Re: (NIL) vs Nothing

2017-01-29 Thread dean
or let inside the object's methods. I'm sure the answer will become clear after experimenting with let but I'm not sure at the moment. On 29 January 2017 at 11:47, dean <deangwillia...@gmail.com> wrote: > Hi Chrostophe and Alex > > Thank you very much for your adviceIt is very

Re: (NIL) vs Nothing

2017-01-29 Thread dean
ike to crack this so any advice re how to correctly use "let" would be very welcome and appreciated. BTWPL's object system is a pleasure to use. Thank you for it! Best Regards Dean On 28 January 2017 at 19:13, Alexander Burger <a...@software-lab.de> wrote: >

Re: (NIL) vs Nothing

2017-01-28 Thread dean
That' greatthank you for both examples. On 27 January 2017 at 19:03, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, > > > (de fltr (Buf Ln) > >(setq New_buf (mapcar '((Ele) (pack (tail (- (length Ln)) (chop > Ele > > (

re (NIL) vs nothing

2017-01-27 Thread dean
down to NIL. I'll keep working on it. Best Regards Dean

(NIL) vs Nothing

2017-01-27 Thread dean
I've got this filtering function (de fltr (Buf Ln) (setq New_buf (mapcar '((Ele) (pack (tail (- (length Ln)) (chop Ele (filter '((Ele) (pre? Ln Ele)) Buf If any element 'Ele' of Buf starts with Ln it get's put into New_buf but not before the the Ln part is chopped off

Re: Is there a shorter syntax for calling a method from a method in

2017-01-27 Thread dean
Hi Alex That's great...thank you very much. Best Regards Dean On 27 January 2017 at 06:53, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, > > > i.e. I'm calling m1 from m2 using the same syntax as calling methods > > externallybut just replacing *Obj wi

Is there a shorter syntax for calling a method from a method in the

2017-01-26 Thread dean
i.e. I'm calling m1 from m2 using the same syntax as calling methods externallybut just replacing *Obj with This. No problem if not butIs there a shorter way e.g. like (: member) instead of (get This 'member) (class +Clss) (dm T ()) (dm m1> () (setq Res 4)) (dm m2> (Arg2) (+ (send

Re: Matching and Hashes

2017-01-25 Thread dean
I've just found filter (which looks like find ALL) whilst reading up on find sothank you very much both for the question and answer. On 25 January 2017 at 07:03, Alexander Burger wrote: > Hi Joe, > > > (de account-list > > ("Bank Charge"."Expenses:Bank

Re: dealing with bad input ']' when reading and printing lines in a

2017-01-24 Thread dean
Hi Alex Thank you for your example and further guidance. I'll look into all of those suggestions. Best Regards Dean On 24 January 2017 at 17:02, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, > > > I was reading each line in an input file text file, trimmi

Re: dealing with bad input ']' when reading and printing lines in a

2017-01-24 Thread dean
ist elements) over multiple lines making things a bit more involved than (if (member Ln List) now but I'm not sure that's significant to this problem. Thank you for asking and best regards Dean On 24 January 2017 at 12:14, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, &g

dealing with bad input ']' when reading and printing lines in a text file

2017-01-24 Thread dean
(de main (Pth) (in Pth (until (eof) (setq Rec (str (line T))) (prinl Rec) The above is giving me Bad input ']' I wrongly thought str would cope with this Any hep much appreciated

Re: executing a function + argument passed in as an argument to

2017-01-21 Thread dean
>Yes, you should really try to understand Lisp's evaluation mechanisms. I agree. (eval Lst) and apply look just the job for this...Thank you for these. Best Regards Dean On 20 January 2017 at 20:57, Alexander Burger <a...@software-lab.de> wrote: > On Fri, Jan 20, 2017 at 07:20:36PM

Re: executing a function + argument passed in as an argument to

2017-01-20 Thread dean
) (setq Some_num 4) (prinl (fnfn '(x2 Some_num))) #->8 Hope this is ok On 20 January 2017 at 19:20, dean <deangwillia...@gmail.com> wrote: > Thank you Alex...that's great. > I just came back to say that the above worked well for both strings and > numbers entered dire

Re: executing a function + argument passed in as an argument to

2017-01-20 Thread dean
be something wrong with this example (de x2 (Num) (setq Res (* Num 2))) (de fnfn (Canned_fn) (wait 1000) ((car Canned_fn) (cdr Canned_fn))) #calling a canned fn passed as arg (prinl (x2 3)) #testing straight fn call -> 6 (prinl (fnfn '(x2 4))) #calling x2 as canned fn->8 Best Regard

executing a function + argument passed in as an argument to another function

2017-01-20 Thread dean
I seem to be able to do this by (de some_fn (Canned_fn_and_arg.. and then executing the Canned_fn_and_arg inside some_fn by doing ((car Canned_fn) (car (cdr Canned_fn))) Is this the right way or is there a slicker one?

Re: exit case body/prog/function

2017-01-19 Thread dean
Hi John Yes...you're right...I was using an (if (or (stop test 1) (stop test 2)) (do nothing) (do all the stuff) but your "unless" is much more direct. Hi Alex Yes I like that a lot! Thank you both for your further help. Best Regards Dean On 19 January 2017 at 17:02, Alexan

Re: exit case body/prog/function

2017-01-19 Thread dean
Hi Alex Thank you for confirming no return and the alternative. Best Regards Dean On 19 January 2017 at 14:44, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, > > > I'd like to do this but am not sure if it's possible > > > > ( case > >

Re: exit case body/prog/function

2017-01-19 Thread dean
nd One objection stops any further execution. I have had some very experienced programmers comment that this style is uglyMaybe but I find it very easy to understand/maintain. #fn some_fn or in lisp (prog..) # if cond1 then exit fn # if cond2 then exit fn # do a # do b # do c

Re: exit case body/prog/function

2017-01-19 Thread dean
er <joebog...@gmail.com> wrote: > dean, I would use unless. > > See this control structure below as an alternative to the prog/if > > : (setq Test1 1) > -> 1 > : (case Test1 (1 (unless Test2 (prinl "true" > true > -> "true" > > : (s

exit case body/prog/function

2017-01-19 Thread dean
I'd like to do this but am not sure if it's possible ( case #= start of match clause ( (prog (if () (EXIT THIS MATCH CLAUSE/PROG)) (otherwise you'll execute this statement) ) ) #= end of match clause . . . I also wonder if

Re: using xml.l

2017-01-16 Thread dean
16, 2017 at 07:48:52PM +0000, dean wrote: > > When I try to slurp the xml in I get > > [fl.xml:1] !DOCTYPE -- Unbalanced XML > > > > I'm assuming ":1" refers to the second line here... > > > > > > Yes, then please try "@lib/xml.l" i

Re: using xml.l

2017-01-16 Thread dean
really know what I'm doing wrong. On 16 January 2017 at 17:44, dean <deangwillia...@gmail.com> wrote: > >'read' cannot be used to parse an XML file, because it expects Lisp > syntax. > > Thank you for putting me straight on that. > > >You can then operate on the

Re: using xml.l

2017-01-16 Thread dean
>'read' cannot be used to parse an XML file, because it expects Lisp syntax

Re: using xml.l

2017-01-16 Thread dean
est to get around this On 16 January 2017 at 14:53, dean <deangwillia...@gmail.com> wrote: > Thank you very much for that. > Best Regards > Dean > > On 16 January 2017 at 14:33, Alexander Burger <a...@software-lab.de> wrote: > >> Hi Dean, >> >> &g

Re: using xml.l

2017-01-16 Thread dean
Thank you very much for that. Best Regards Dean On 16 January 2017 at 14:33, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, > > > To get started I thought I'd try to list all the functions in xml.l using > > PL and tried... > > in "/ho

using xml.l contd

2017-01-16 Thread dean
Ok I found some good examples on Rosetta code i.e. https://rosettacode.org/wiki/XML/Input#PicoLisp and see that I have unbalanced xml. I'm just wondering what the best tools to analyse this would be on openbsd.

using xml.l

2017-01-16 Thread dean
To get started I thought I'd try to list all the functions in xml.l using PL and tried... in "/home/me/xml.l" (while (line T) (prinl @))) as a starting point but I'm not sure how you get past the third line which is blank so I reverted to what I know for now :) $ perl -ne'$w='de';print if

Re: how to specify *.txt as an argument to ls

2017-01-15 Thread dean
I seethank you very much for explaining that. On 15 January 2017 at 09:49, Alexander Burger <a...@software-lab.de> wrote: > On Sat, Jan 14, 2017 at 10:12:35PM +0000, dean wrote: > > '`(chop "@.PDF") > > BTW what's the difference between the two leading ti

Re: how to specify *.txt as an argument to ls

2017-01-15 Thread dean
It's all running flawlessly. On 15 January 2017 at 10:11, dean <deangwillia...@gmail.com> wrote: > I seethank you very much for explaining that. > > > On 15 January 2017 at 09:49, Alexander Burger <a...@software-lab.de> wrote: > >> On Sat, Jan 14, 201

Re: how to specify *.txt as an argument to ls

2017-01-15 Thread dean
Thank you very much for the explanation.

how to specify *.txt as an argument to ls

2017-01-14 Thread dean
To help work out how to call pdftohtml with arguments I thought I'd try to do "ls *.txt" in the form of (call 'ls "*.txt") but I've got something wrong. I have seen * specified as @ as in '`(chop "@.PDF") and that worked fine with match but not with ls. BTW what's the difference between the two

Re: differentiate between pg_up vs pg_down keys and delete vs

2017-01-14 Thread dean
Thank you very much indeed for this On 13 January 2017 at 11:02, Danilo Kordic wrote: > Or simply: > $ pil > : [raw] > -> NIL > : [sys 'TERM] > -> "xterm" > : [setq PgDn "^[[6~" PgUp "^[[5~"] > -- > UNSUBSCRIBE:

Re: Fwd: automatically generating test data

2017-01-12 Thread dean
Hi Alex I'm really pleased I asked. Thank you for putting me straight. Best Regards Dean On 12 January 2017 at 16:28, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, > > > Is this the best way of automatically generating a list of ("" "bbb

Re: differentiate between pg_up vs pg_down keys and delete vs

2017-01-12 Thread dean
Mike Thank you for your postThe link says 404 dead page or something similar Best Regards Dean On 12 January 2017 at 17:37, dean <deangwillia...@gmail.com> wrote: > Hi Alex > I seeI seemed to get "^[" returned by -> but then got the PL prompt > ":"

Re: Fwd: trapping key in case statement

2017-01-12 Thread dean
Hi Alex Thank you very much for the explanation. Best Regards Dean On 12 January 2017 at 15:58, Alexander Burger <a...@software-lab.de> wrote: > Hi Dean, > > > I can match the (key) value of backspace to BS using 'if' but am not sure > > how to using 'case' > &g

Fwd: differentiate between pg_up vs pg_down keys and delete vs

2017-01-12 Thread dean
-- Forwarded message -- From: dean <deangwillia...@gmail.com> Date: 5 January 2017 at 15:55 Subject: differentiate between pg_up vs pg_down keys and delete vs backspace keys To: picolisp@software-lab.de So far I've been doing (setq Key_you_want ) and this has worke

Fwd: automatically generating test data

2017-01-12 Thread dean
-- Forwarded message -- From: dean <deangwillia...@gmail.com> Date: 6 January 2017 at 08:50 Subject: automatically generating test data To: picolisp@software-lab.de Is this the best way of automatically generating a list of ("" "" etc. (de m

Fwd: trapping key in case statement

2017-01-12 Thread dean
-- Forwarded message -- From: dean <deangwillia...@gmail.com> Date: 5 January 2017 at 22:15 Subject: trapping key in case statement To: picolisp@software-lab.de I can match the (key) value of backspace to BS using 'if' but am not sure how to using 'case' (setq BS "^?&

Re: shorter way of assigning list elements to multiple symbols?

2016-12-24 Thread dean
Thank you very much Danilo On 23 December 2016 at 17:34, Danilo Kordic wrote: > When `continuation' is: > - `list' 3rd becomes 2nd. > - `[quote @ [mapc 'set '[R1 R2 R3] [rest]]]' 3rd becomes 1st. > -- > UNSUBSCRIBE:

Re: why does my thread appear to have been started by Willie Arnold who

2016-12-23 Thread dean
me append it as > answer to your question to prevent others from waisting there time > responding... > > 2016-12-22 22:28 GMT+01:00 dean <deangwillia...@gmail.com>: > >> BTW I seem to have answered my own queston i.e. >> If I wrap an evaluated symbol in nest

  1   2   >