Thanks for your 2 cents worth, Alex -- and for 'picolisp-json' , which the code uses, and which is really great . Now I don't need NodeJS !
I agree, that particular code was a 1st working version horrible "quick and dirty" coded version, a much better version is attached. But the point of posting to the list was NOT to get help debugging my code, which I gratefully recieved nevertheless, (thanks!), but really to report a situation where Debug Mode is enabled and the debugger fails to discover / warn about or trap a coredump situation that ONLY occurs when NOT in Debug Mode - this ieads to nasty Heisenbug situations and did take a long time to spot & determine the root cause of. One of the reasons I like picolisp is because of its very simple "free form" syntax, compared to eg. Python, and one can redefine aliases to built in functions ( (def _{ let) ...) and macros so easily, it is so flexible and lends itself to many styles. Coding Styles / justification & whitespace / parentheses folding preferences + coloring / fonts should be entirely up to whatever application you are using for code reading (I use Emacs) - it sounds like yours needs some tweaking to auto-pretty-print code to your liking. I like coding "foundations upwards", first I write any-old-code-that-gets-the-job-done, then I analyse the low-level requirements, investigate best ways of doing things, write low-level frameworks, and then classes on top, once the underlying fundamentals are working & tested. Admittedly, I am at stage 1 with this web-controlled persistant route & firewall rule & VPN configurator I am writing . Anyway, many thanks for all the helpful comments & support, and here is a much better version of L_RT.l and its test handler with many problems wrt the original version I posted fixed. On 06/08/2023, Alex Williams <picolisp@software-lab.de> wrote: > Hi Jason, > > I don't want to be rude, but to put emphasis on what Alexander Burger > wrote, your code is really bad. It doesn't follow any of the very simple > "naming conventions" of PicoLisp, and it doesn't even follow other > LISP "coding conventions". It's hard to read, difficult to grok, messy, > poorly documented, and overly complex. > > Perhaps as a suggestion, you should review existing code by > other authors, see "how it's done", and inspire yourself to write in a way > that makes it possible for others to help you. Then, it would help greatly > if you chop up your large functions into smaller ones. > > Although I love networking stuff and I'd like to help you out, at the > moment your code makes my eyes bleed. > > Cheers, > > > AW > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
L_RT.l
Description: Binary data
L_RT_rh.l
Description: Binary data