10,236 karma · joined Feb 1, 2010 (16y ago) · 1,329 submissions
comment 2w ago · link · parent
comment 2w ago · link · parent
Code that is outside of the purview of Coalton—raw Common Lisp code—is run in explicit (LISP ...) forms [0] which require the user to annotate the type and they add dynamic type checks to ensure the enclosed code meets the contract the programmer specified (unless UNSAFE is used [1]).
comment 1mo ago · link · parent
Lisp isn't some language wild west lacking style and idioms—regardless of whether there's a "go fmt" for it or not. Most open source Lisp code is quite standard and "boring": functions and classes/structs following canonical indentation.
comment 1mo ago · link · parent
comment 1mo ago · link · parent
1. Common Lisp has a whole system for defining and declaring types, and implementations do actually use this information to produce safer and higher performing code, including some amount of static, compile-time verification (e.g., you can get "expected an INTEGER but got a STRING" styles of compile-time errors). Fast, competitive-with-C floating-point math is achieved this way. DEFTYPE/DECLARE work.
2. If you prefer a system that doesn't feel like a 1980s barebones type system (i.e., Common Lisp's), then you can use Coalton [1] which adds types to a Scheme-like DSL within Common Lisp, but has a type system like Haskell's (similar to stock GHC + common extensions). Multi-parameter type classes, monomorphization, functional dependencies, etc. Yet it's still fully interoperable with Lisp code, uses the same Lisp toolchain, same Lisp compilers, same Lisp editors, etc. so it really isn't just a language atop Lisp, but something that's integrated within it.
comment 3mo ago · link · parent
Sometimes now just refers to extremely personal cosmetic changes one makes to their OS/DM/WM/SW.
See also this old bit of computer lore [2].
[1] https://en.wikipedia.org/wiki/Rice_burner
[2] https://www.shlomifish.org/humour/by-others/funroll-loops/Ge...
comment 6mo ago · link · parent
- your program is extraordinarily simple
- you can manage to statically link libc
- you can ship (or statically link) all .so files
- you can ensure your app can run in a sandbox
- you limit the distros you build for
- your app can be built by whatever is on flathub
etc., most solutions to shipping software simply don't work out-of-the-box. Despite the kernel being reasonably stable, userspace APIs are a mess of incompatible.
comment 6mo ago · link · parent
Building banking apps? Well, even if it's Haskell, the Haskellers were dreaming of GPU compiler jobs, not banking front ends. So you're probably down to literally 5 qualified people on earth who want your job.
But then 3 of those 5 don't want to relocate or have other operational desires that require you to re-think how you run your team, and 2 of those 5 believe so strongly in supply-demand that their salary should be 3x the industry average.
Many companies, including Jane Street, come to the same conclusion: If you really want developers of a niche language, you have to be very good at finding smart people who don't know the language and training them.
12.
Dotcl: Common Lisp Implementation on .NET(github.com ↗)
186 points · by reikonomusha · 6mo ago · 47 comments
comment 7mo ago · link · parent
[1] From Toward Safe, Flexible, and Efficient Software in Common Lisp at the European Lisp Symposium, "[Coalton] has been used for the past 5 or so years [...] first in quantum computing and now a serious defense application." https://youtu.be/xuSrsjqJN4M&t=9m14s
comment 7mo ago · link · parent
As of writing, the top comment is "Why?" like the project has to defend itself, on a website that's notionally about curious, interesting, and insightful discussions.</meta>
I used Notepad++ way back when, sort of before I "graduated" to Emacs and the like. I don't know how it's evolved over the past two decades (I presume, intentionally, not much) or what attracts its fanbase anymore. I know I liked it because it felt like a substantial jump from notepad.exe without feeling bloated and slow. At the time, some of the competition felt sluggish while Notepad++ felt nimble.
What do people love about Notepad++ that still isn't really addressed by the "less humble" editors out there?
comment 7mo ago · link · parent
Why has it stuck with Emacs and its derivatives? I don't know. It seems interest in investing time to make a good Lisp environment for a non-Emacs editor fizzles out once it gets to the difficult part of productionizing it, which is why Emacs continues to be the #1 no-cost choice.
comment 7mo ago · link · parent
comment 7mo ago · link · parent
(defun myfun(x)
(let (x)
(setq x 5)
(when (eq x 6)
(print "6")
)
)
)
Which is absolutely not what Lisp code should look like. Emacs-and-kin don't outright stop that, but the defaults are such that it's less likely.____
* Of course, technically, CLOS is something to behold. But you won't sell someone on Lisp because it can do "OOP".
comment 7mo ago · link · parent
The consequence is that an integration with SLIME would have to be a very extensive contrib [1] that is shipped with the Coalton version the user is using, and updated whenever Coalton is updated. No doubt the contrib would have to be very elaborate—it would have to hook in to basically every aspect of SLIME and SWANK if it should be "Coalton-native", from the display of type errors to how auto-complete is handled. Unless the contrib author is very meticulous about backward compatibility, then version mismatches would make everyone involved unhappy. The contrib author would get annoyed at constant bug reports about things not working (even if there's a nice "your Coalton or contrib are out-of-date" error), and users would get annoyed they have to keep a Lisp library in sync with an Emacs add-on.
None of this gets to the matter that Emacs simply isn't a popular text editor, and it's not really the one people are rushing to learn, even if it has substantial merit. I don't know how trustworthy this source is [2], but it claims that Emacs represents a fraction of a percent of the developer community. Even if it's off by 10x, it's still 1-in-50 developers at best.
[1] There's a basic one that shows Coalton type hints, but not much more: https://github.com/slime/slime/blob/master/contrib/slime-coa...
comment 7mo ago · link · parent
Nonetheless, "elementary function" is a technical term dating back to the 19th century; it's very much not a general adjective whose synonym is "basic".
[1] https://en.wikipedia.org/wiki/Hilbert%27s_thirteenth_problem
comment 7mo ago · link · parent
All of these concepts, from sine to real numbers, Bring radicals to complex exponentials, can all be defined in different, equivalent ways. What is interesting are the properties invariant to these definitions.
It still doesn't seem to me that a square root should be any more or less contrived than a Bring radical. Maybe we should call it a ultraradical instead?
comment 7mo ago · link · parent
Like sine or exp, it also has a nice series representation:
sum(k = 0 to inf) binom(5k,k) (-1)^(k+1) a^(4k+1) / (4k+1)
We can compute its digits with the very rapidly convergent Newton iteration x <- x - (x^5 + x + a)/(5x^4 + 1)
and so on.Why not invite it to the table of functions?
Ellipses are simple and beautiful figures known to every child, but why do we rarely invite the elliptic integrals to the table too?
I guess my point is that "nice geometric interpretation" is a little subjective and hasn't led to much consistency in our choice of which functions are popular or obscure.
comment 7mo ago · link · parent
f + f*(exp∘log)
where + and * are understood to produce new functions. Sort of Haskell-y.comment 7mo ago · link · parent
abs(0)
= f(0) ; by defn
= exp(1/2 log 0) ; by defn
= exp(-∞/2) ; log 0 rule
= exp(-∞) ; extended real arith
= 0 ; exp(-∞) rule
If we don't agree with this, then abs() could be defined with a hole punched out of the real line. The logarithm function isn't exactly elegant in this regard with its domain restrictions. :)