Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
This article is a response to mfiano’s From Common Lisp to Julia which might also convey some developments happening in Common Lisp. I do not intend to suggest that someone coming from a Matlab, R, or Python background should pickup Common Lisp. Julia is a reasonably good language when compared to what it intends to replace. You should pickup Common Lisp only if you are interested in programming in general, not limited to scientific computing, and envision yourself writing code for the rest of your life. It will expand your mind to what is possible, and that goes beyond the macro system. Along the same lines though, you should also pickup C, Haskell, Forth, and perhaps a few other languages that have some noteworthy things to teach, and that I too have been to lazy to learn.
/I also do not intend to offend anyone. I’m okay with criticizing Common Lisp (I myself have done it below!), but I want t
(defpackage :LISP-1.5-compiler | |
(:use :Common-Lisp) | |
(:shadow :length ; defined by the compiler | |
:reverse ; defined by the compiler | |
:member ; defined by the compiler | |
:map ; like mapl, and function is first argument | |
:exp ; used as special variable in the compiler | |
:compile ; defined by the compiler | |
:maplist ; takes function first | |
:mapcon ; takes function first |
I'll preface this with three things. 1. I prefer schemes over Common Lisps, and I prefer Racket of the Schemes. 2. There is more to it than the points I raise here. 3. I assume you have no previous experience with Lisp, and don't have a preference for Schemes over Common Lisp. With all that out of the way... I would say Common Lisp/SBCL. Let me explain
- SBCL Is by far the most common of the CL implementations in 2021. It will be the easiest to find help for, easiest to find videos about, and many major open source CL projects are written using SBCL
- Download a binary directly from the website http://www.sbcl.org/platform-table.html (even for M1 macs) to get up and running (easy to get started)
- Great video for setting up Emacs + Slime + Quick Lisp https://www.youtube.com/watch?v=VnWVu8VVDbI
Now as to why Common Lisp over Scheme
/* | |
There is a behavior change in glibc>=2.30. dlopen() will fail if the file is | |
position independent executable. This code will clean up the PIE flag in the | |
file to bypass the dlopen() check. | |
MIT License (c) 2020 Yubo Xie, [email protected] | |
*/ | |
#include <stdio.h> | |
#include <string.h> |
Testimonies
The thing in CL I miss most doing Clojure as my day job? CL's compiler. I like having a compiler tell me at compile time about the mistakes I've made. Bogus arguments. Unreachable code because of unhandled exceptions, and so on. CL saves me round after round of bugs that in clojure aren't found until you run the code. If you test well, it's found when testing, if you don't it's found in production. "Clojure compiler" almost demands air quotes.
CL's optional but oh-so-useful model of type declarations is also infinitely more useful (to me) than Clojure's use of "spec", and instrumentation that happens only at test time because of the cost. Depending on the OPTIMIZE declarations, other type defs are a floor wax and dessert topping. Want checks for argument types? Lower optimizations. Want most efficient machine code? High optimizations.
/u/Decweb, March 2023 https://www.reddit.com/r/lisp/comments/11ttnxk/the_rise_fall_of_lisp_too_good_for_the_rest_of/jczpysp/
m.imgur.com##.GalleryHandler-postContainer ~ .GalleryHandler-postContainer | |
m.imgur.com##.getTheApp | |
m.imgur.com##.FloatingOIA-container | |
m.imgur.com##.GalleryInfiniteScroll > div > div[style^="width: 100%; height:"] |
$ python xor.py | |
Training: | |
Epoch 0 MSE: 1.765 | |
Epoch 100 MSE: 0.015 | |
Epoch 200 MSE: 0.005 | |
* Target MSE reached * | |
Evaluating: | |
1 XOR 0 = 1 ( 0.904) Error: 0.096 | |
0 XOR 1 = 1 ( 0.908) Error: 0.092 | |
1 XOR 1 = 0 (-0.008) Error: 0.008 |
#!/usr/bin/python3 | |
# Use: ./8ch-downloader.py <thread url> | |
import requests, os, json, sys | |
def download(url, name, subject_path): | |
filepath = subject_path + '/' + name | |
if not os.path.exists(filepath): | |
print('Get got: ' + name) | |
r = requests.get(url, stream=True) | |
with open(filepath, 'wb') as f: |
account default | |
host mail.messagingengine.com | |
port 587 | |
protocol smtp | |
auth on | |
from [email protected] | |
user [email protected] | |
password topsecretpassword! | |
tls on | |
tls_nocertcheck |