beginer question

2019-03-30 Thread sundar bp
hello gurus, another newbie question, trying to learn +QueryChart with an example of my own, an application for a pizzeria (the reason being if it is my own example the concepts stick better than reading the wonderful documentation on the website, which by the way I have been doing too :) As you

Re: Request for review of my string to float function

2019-03-30 Thread C K Kashyap
Thanks Alex, Sorry ... I was distracted exploring vip :) ... I like the rule - "In PicoLisp a shorter program is also faster" :) What I take away is this. Whether it is 1 byte or 32 per character, one will have to consider a case when the whole file does not fit in memory (although a factor of

Re: Request for review of my string to float function

2019-03-30 Thread Alexander Burger
On Sat, Mar 30, 2019 at 06:10:02PM +0100, Alexander Burger wrote: > > About 1 cell per character - if I understand correctly, that would be > > 16bytes per character on 64 bit I forgot to explain one more thing: It is not 16, but 32 bytes per character! Each character in a 'chop'ped string is a

Re: Request for review of my string to float function

2019-03-30 Thread Alexander Burger
On Sat, Mar 30, 2019 at 09:04:28AM -0700, C K Kashyap wrote: > The sample you shared certainly looks more elegant. I have a follow up > question though - we seem to do 3 iterations in it, the main one, one for > length and one for member. Coming to think of it, given my scenario, its > negligible.

Re: Request for review of my string to float function

2019-03-30 Thread C K Kashyap
Thank you so much Alex, I just love this - #-> (and (= "." (car Lst)) (on P)) :) The sample you shared certainly looks more elegant. I have a follow up question though - we seem to do 3 iterations in it, the main one, one for length and one for member. Coming to think of it, given my scenario,

Re: Request for review of my string to float function

2019-03-30 Thread Alexander Burger
Hi Kashyap, > While working on the json library I had to write a string to float I recommend to use upper case for locally bound symbols (de isNum (N) (or (= "." N) (num? (format N))) ) The 'num?' can be omitted, because 'format' returns NIL if it does not succeed. (or (= "."

Request for review of my string to float function

2019-03-30 Thread C K Kashyap
Hi, While working on the json library I had to write a string to float function. In a list of characters when I encounter a digit, I'd like to go over the rest of the list and consume all the digits (and possibly a period) that form a number. I'd appreciate some feedback from a Lispiness and

Re: Making json.l parse floating point

2019-03-30 Thread C K Kashyap
Looks like this PR was closed. Shouldn't we iterate and get this fixed. I am happy to update the PR. Regards, Kashyap On Sat, Mar 30, 2019 at 4:32 AM Alexander Burger wrote: > On Sat, Mar 30, 2019 at 10:51:44AM +, Alexander Williams wrote: > >

Re: Making json.l parse floating point

2019-03-30 Thread Alexander Burger
On Sat, Mar 30, 2019 at 10:51:44AM +, Alexander Williams wrote: > The use of (++ Value) instead of (pop 'Value) may be an improvement, but it > breaks backward compatibility with older clients since the time you > implemented (++ Value), so I can't accept that in my libraries just yet.. at >

Re: Making json.l parse floating point

2019-03-30 Thread Alexander Williams
The use of (++ Value) instead of (pop 'Value) may be an improvement, but it breaks backward compatibility with older clients since the time you implemented (++ Value), so I can't accept that in my libraries just yet.. at least not until I'm certain I don't have any applications with older

Re: Making json.l parse floating point

2019-03-30 Thread Alexander Williams
Hi, I appreciate the desire to improve my code, but please open issues or make pull requests to me on GitHub, because I don't follow the PicoLisp mailing list closely: https://github.com/aw/picolisp-json Thanks, AW On Wed, 27 Mar 2019, C K Kashyap wrote: Hi, I am trying to write a