Thans Alex, Regarding the (local) - I'll take a look if I can produce a Pull Request with the fix. I wonder though if it has anything to do with the "problem with namespace" mentioned under the "Usage" section of https://github.com/aw/picolisp-json Regards, Kashyap
On Wed, Mar 27, 2019 at 11:51 PM Alexander Burger <a...@software-lab.de> wrote: > Hi Kashyap, > > > I made a tiny change to support floating point (to be used with scaling > > that is). I wanted to get it reviewed to confirm if I am not missing > > something. > > > > I added a condition to json-parse-unicode in json.l > > <https://github.com/aw/picolisp-json/blob/master/json.l> > > If you mean this line > > > [*(and (= "." (car Value))) (pop 'Value) (link R '. (pop > > 'Value)) ]* > > I think it is fine, though I have not studied the whole JSon library. > > A minor improvement could be to replace all calls like (pop 'Value) with > (++ Value) which is a tiny little bit smaller and faster, but that's only > cosmetics. > > > But what REALLY nags me is that this code is still around: > > (local MODULE_INFO *Msg err-throw) > (local json-parse-file json-parse-string json-parse-unicode > json-count-brackets) > ... > > This is WRONG!! It is a pity that this is still public and being > propagated as > an example! Please don't use it! > > The correct syntax is: > > (local) (MODULE_INFO *Msg err-throw) > (local) (json-parse-file json-parse-string json-parse-unicode > json-count-brackets) > ... > > 'local' takes NO arguments. It must read the symbols from the input stream. > Otherwise the symbols ARE already read when 'local' runs and will possibly > be found in the wrong namespace. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >