Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ClaudeM

#1
Whither newLISP? / Re: loop & recur
July 03, 2021, 10:11:11 AM
Allô,



There are two questions: a philosophical one and a practical one.



1) Is adding loop & recur to newLISP a deviation from the "character" of newLISP? Is iteration a preferred solution? Is trampolining used where a recursive solution makes sense?



2) The supplied macros are a proof of concept; they may be quite inefficient? There is likely room for improvement. Is trampolining more efficient?



Has this been discussed before? Searching for "recur" in the forum did not find anything.



Merci.



--

ClaudeM
#2
Whither newLISP? / loop & recur
July 01, 2021, 03:41:31 PM
Allô,



I like newLISP and got to use it at work for some CSV processing. Thank you.



I come from Scheme and miss simple recursion. I wrote some macros to implement loop & recur (I am not a fan of Clojure). Does this agree with the newLISP way? Is the code OK? These are my first macros.



I tried putting in in the body of the message, but preview choked. I have attached it.



Merci.



--

ClaudeM
#3
It took a long time for me to get back to this. The actual problem was me getting the file order backward. I was fooled when I concatenated the two files into a single file with the main last and it worked. The main goes first.



I did some digging around - use vim to look at the executable and read the source code; it was an interesting journey. It was educational : converting a list to a string, etc.



Oddly, the main is just a string with embedded newlines, while the CSV library is text (with [text]; and [/text] delimiters).



newLISP is great!
#4
Good evening,



I have successfully used the buildexe and exehead scripts on Linux, but failed on MS Windows. I am using newLISP 10.7.5 on both platforms.



What am I missing?



Thank you.



--

ClaudeM