I've been hearing claims my entire programming career about how Lisp is supposedly "superior" to mainstream programming languages, but I've never seen a concise code example that actually demonstrates this. For instance, it's easy to demonstrate how Rust is superior to C: Just show a short piece of code where an array is returned from a function. In C, this will involve raw pointers and manual memory management with…
I genuinely like Rust, but it's pretty amazing that you managed to write a comment on this article and make it about Rust. Peak HN :-) Re Lisp's superiority - Lisp was certainly a superior language when it was devised many decades ago, but over time much of its comparative advantage has been absorbed by other languages. Starting in the 90s when productive, GC'd scripting languages like Python started being prominent…
Lisp-stick on a Python
101–110 of 170 posts
Re: Lisp-stick on a Python
#102Re: Lisp-stick on a Python
#103Earlier quoted context omitted.
> Or a web browser https://nyxt.atlas.engineer/
this uses a C++ rendering engine
otoh how much rust is there in firefox? a:
Re: Lisp-stick on a Python
#104Earlier quoted context omitted.
I can, without restarting my program: 1. Gather assembly level profiling information 2. Redefine & recompile a function 3. Gather new assembly level profiling I can iterate dozens of times between #2 and #3 in the time of a single incremental production build in rust (debug builds are not useful for gathering profiling data). Generally speaking it takes less than a second to recompile and load a source file, and it c…
Doesn’t VS do that too though? Also if you’re talking about performance or memory profiling, why are you using a Lisp in the first place?
Re: Lisp-stick on a Python
#105What am I looking at here? And what is it for?
https://docs.hylang.org/en/stable/whyhy.html
Shortened from there:
Hy (or “Hylang”) is a multi-paradigm general-purpose programming language in the Lisp family. It’s implemented as a kind of alternative syntax for Python. Hy provides direct access to Python’s built-ins and third-party Python libraries, while allowing you to freely mix imperative, functional, and object-oriented styles of programming.
Re: Lisp-stick on a Python
#106Earlier quoted context omitted.
I can, without restarting my program: 1. Gather assembly level profiling information 2. Redefine & recompile a function 3. Gather new assembly level profiling I can iterate dozens of times between #2 and #3 in the time of a single incremental production build in rust (debug builds are not useful for gathering profiling data). Generally speaking it takes less than a second to recompile and load a source file, and it c…
> Redefine & recompile a function not just functions, but whole classes too
Re: Lisp-stick on a Python
#107Earlier quoted context omitted.
I mean the famous example is of course, (define (eval exp env) (cond ((number? exp) exp) ((string? exp) exp) ((symbol? exp) (lookup exp env) ((eq? (car exp) 'quote) (cadr exp)) ((eq? (car exp) 'lambda) (list 'closure (cdr exp) env)) ((eq? (car exp) 'cond) (eval-cond (cdr exp)) (else (apply (eval (car exp) env) (eval-list (cdr exp) env))))) which uses a Lisp to define itself. This means roughly that if you understand…
> This means roughly that if you understand enough Lisp to understand this program Any recommendations on good resources for learning Lisp to a degree that this program is understandable?
Re: Lisp-stick on a Python
#108Lisp examples always use addition, but this is what trips me up (- 2 3) And (- 4 3 2)
Re: Lisp-stick on a Python
#109Earlier quoted context omitted.
> Redefine & recompile a function not just functions, but whole classes too
Does this include replacing all existing instances of this class with new instances? Otherwise, how is this different from what we can do in any other dynamic language like python or javascript?
https://lispcookbook.github.io/cl-cookbook/clos.html#:~:text....
Re: Lisp-stick on a Python
#110Earlier quoted context omitted.
> Redefine & recompile a function not just functions, but whole classes too
Does this include replacing all existing instances of this class with new instances? Otherwise, how is this different from what we can do in any other dynamic language like python or javascript?