I’m all for championing excellence over mediocrity, but it is a mistake to imply that academic achievement is the only measure of it. Jocks and prom queens aren’t the antithesis of merit and striving, and in some ways, their arenas are more “real” than academic curriculums. Fight passivity and low standards!
Some updates since then:
- Coalton has typed conditions and restarts
- The type soundness issue is fixed
- Even moar optimizations (like Tuple unboxing)
Writing assembly code in SBCL is seriously awesome. It's amazing to have a compiler, assembler, disassembler, statistical profiler, and optimizer at your fingertips in the REPL.
This is a real thing that makes Lisp magical, not the woo woo enlightenment stuff.
Engines Should Not Read Files
import std.stdio, std.file, std.conv;
int lines(string filename) {
int count;
string s = to!string(https://t.co/zp2wp1ivDL(filename));
foreach (char c; s)
count += (c == '\n');
return count;
}
This engine accepts a filename as input, and counts the number of lines in it. The trouble is, it cannot be used for anything other than a file. You'd have to write another line counting function for those. Worse, file I/O can fail, and so lines() will need to detect and address those errors. You'll also need to deal with how to clean up the allocated string.
The solution is to divorce the function from the details of where its input is coming from:
import source;
int lines(Source s) {
int count;
foreach (char c; s)
count += (c == '\n');
return count;
}
The function will work with any source of characters. (A Source is the inverse of a Sink.) And so any input that is a source of characters can have its lines counted.
hell yeah
SBCL's compiler may be a bit long in the tooth, but it is a gift that (as a result of hard work) keeps on giving, especially in the landscape of dynamic, garbage collected languages
now combine this with Coalton's static types, and numerical code will be even faster
Maybe if I tried harder, D language would be where Rust is now. I was pushing for ownership types (and software transactional memory) in 2009. https://t.co/QLUOT8Nyw0
@ThePrimeagen Clojure wise, I liked joy of clojure as a beginner resource, but you can pick up the language basics pretty quickly from the docs as well... Then again, I learnt clojure after learning Common Lisp so there is that
Coalton reached a milestone where it's known enough (in some communities...) that it gets mentioned on forums and the like by people I don't know.
What's the notability threshold for a Wikipedia article?
> be NASA programmer
> excited to write Lisp
> code lookin like hieroglyphs
> boss walks by
> "wtf is that, alien code?"
> no, just Lisp boss
> boss laughs, Lisp now forbidden
> mfw no cosmic parens
> mission to Mars now in JavaScript
> planet doomed
> feelsbadman.jpg