4 ms·
Meh. Python is for scientists. Lisp is for engineers. Which is to say the languages were designed for different language design methodologies. In the old da
by retrocryptid 3y ago
Meh. Python is for scientists. Lisp is for engineers. Which is to say the languages were designed for different language design methodologies. In the old days of Lisp we didn't have large libraries of pre-existing functionality, so it was important for programmers to know how to construct complex functions from simple functions. But now we have python with its expansive partially documented standard and semi-standard libraries. You don't need to know how to rewrite that lump of functionality. You just need to know how to write small test programs that verify you understanding of how it's supposed to be used. And if you find you need to do something that's not supported, you just change what it is you're trying to do.
The flip side of this is that there's a large corpus of programs demonstrating idiomatic python. "There's only one way to do it," was a mantra I heard from Pythonistas in the 2000s. Maybe it's still a cultural value in that community. That would explain the large corpus (that and it being a popular language.)
I've yet to see a LLM spit out even half-way decent Lisp (CL, scheme or even e-lisp). My suspicion is the corpus of available code is small and its language features tend to generate less "boilerplate."
Having taught "practical lisp" in the 90s, SICP was frustrating because of its insistence on describing idiomatic Lisp in text, but with far fewer examples than comparative texts in other languages (k&r c or PASCAL User Manual and Report.)
There seems to be a tradition of this in Scheme and CL books. Where you could easily find books in the 80s entitled "${N} PROGRAMS IN BASIC" or some such, which were useful to provide a corpus of idiomatic code learners could use to build an intuitive understanding of the language. In the Lisp world no such books were available, and members of that community seemed to want learners to develop a wholly rational approach to learning.
So... if your purpose is to have a language that can be generated by ChatGPT, definitely pick Python. My experience with automated tools is they absolutely do not understand how to refactoring lisps effectively.
- nickpsecurity 3y ago“Python is for scientists. Lisp is for engineers.” Then what does that make Hy language? https://hylang.org/ https://hylang.org/ Re Languages with lots of example code and LLM’s With translators or things like Hy lang, one could get the LLM’s to solve your problem in Python before converting it to another form. Then, you just need a translator. If lacking one, it’s easy to translate by hand. The practicality of this concept will probably vary by use case. My experiments had GPT doing sketching, implementations, boilerplate, and even porting Python to Rust. A legally-clear LLM trained on multiple languages could probably be fine-tuned to do Python to LISP conversions. If not, Hy might be a stepping stone, too.
- retrocryptid 3y agoIs there any evidence of anyone using Hylang (other than the community that invented it?)
- nickpsecurity 3y agoProbably not. I mentioned it because it’s existing work that bridges the two. It also might spark HN users’ creativity about how they might do it differently. For instance, I was exploring two ideas. One was how to turn Python into something with no dependencies, more powerful, and fast. I considered converting it to Lisp to use their compilers and macros. Another exploration was, like ShedSkin, converting it to C/C++ but without Python dependencies. It would be easier for me to generate code from Lisp syntax than Python syntax. So, you know, just sharing tools that might get people’s minds going.
- nickpsecurity 3y agoIt's funny that you asked that and then someone posted an app that's almost entirely Hy language. I'm just sharing it so you have one example: https://github.com/atisharma/llama_farm/tree/main https://github.com/atisharma/llama_farm/tree/main The AI's have limited ability to either handle large documents or track conversations. This tool is an attempt to solve that problem. It works with OpenAI and open-source AI's.
- YeGoblynQueenne 3y ago>> I've yet to see a LLM spit out even half-way decent Lisp (CL, scheme or even e-lisp). My suspicion is the corpus of available code is small and its language features tend to generate less "boilerplate." Well, Lisp is noted for its terse and succinct notation [1], so it makes sense that, LOC-for-LOC there is less of it around than Python. ________________ [1] I am told. I wouldn't know. I'm a Prolog programmer.
- deleted 3y ago[deleted]