Looking through the sample chapter, I'm reminded of my experience with symbolic logic class. It looks like it'll be much the same thing, but flipped on its head: instead of knowing programming and using that knowledge to make symbolic logic easier, this looks like it'll be about knowing symbolic logic and using that knowledge to make programming easier. Seems pretty useful; I'll give the sample chapters a more in-depth read soon.
"In programming language theory and proof theory, the Curry–Howard correspondence is a direct relationship between computer programs and mathematical proofs. It is also known as the Curry–Howard isomorphism or equivalence, or the proofs-as-programs and propositions- or formulae-as-types interpretation."
https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...
That’s why you can have a productive programmer who is nevertheless unable to construct valid proofs.
(I’m very much in favor that programming should involve proofs as much as possible, but that’s something to strive for, not a matter of fact.)
Another example is CompCert (a proven correct C compiler used by Airbus and others for real production software).
He was one of only two folks I've ever met outside of TeX User Group conferences who had read _The Art of Computer Programming_ (and had a well-thumbed set of Vols. 1--3 on a shelf next to his desk) and had written (and sold commercially) an operating system and full application suite, and when asked, always had a (wonderfully documented) bit of code to apply to any problem.
Given the volume of text philosophy wrangles, I’m not surprised TAOCP was casual =))
I really like this: https://disi.unitn.it/~bernardi/RSISE11/Papers/curry-howard....
I think every programmer should understand the consequences of CHI to the discipline, which are profound. It means that there is no need for classical logic as a separate metalanguage, the properties of programs could also be expressed in the programming language of your choice. Furthermore, it shows that "running the program" and "reasoning about the program" are ultimately the same processes, which raises some good philosophical questions about testing for example. But also about how can we approach the program design, maybe we can just "calculate it" from the constraints. It also opens us to things such as supercompilation.
I think the discipline needs to move towards formal understanding how different programming languages and logics express similar ideas, because it's a really powerful tool of mutual understanding.
(Also, I personally find the typed LC notation, especially with type checking and inference, easier than the classical logic notation. It might be the reason why logic is considered too complicated.)
What ambition? The book is an applied introduction for people who aren’t even familiar with what ∃ means. It’s 200 pages, which is at best comparable to a semester-long course.
It kinda reminds me of the debate whether functional programming is suitable for beginners, despite being simpler than imperative, while imperative is more familiar.
I am opposed to familiarity argument (I think classical predicate logic and existential quantifier are being taught in early high school, maybe sooner, so they are more familiar than lambda calculus).
Based on my own programming and math experience, I wish I learnt about functional programming, LC, dependent types and CHI much sooner. I don't think it has to be complicated, I know some attempts (although a bit incomplete) to show this to beginners - To Mock a Mockingbird, Haskell Programming from First Principles.
"Functional programming" in applied programming usually just means using less mutable state and using stuff like `map` and `reduce` to make semantics of code more predictable and move the burden of optimizing actual implicit mess it creates to compiler/interpreter.
"constructive proofs are allegedly code. They are not"
I disagree, what CHI shows is that specific language you choose matters only a little (as long as you stick to TC and have some means of compositionality).
I want programmers get to the point where they think of programming in a single unified language, of which different programming languages (and logics) are just expressions of (sometimes a bit more restrictive). I think it would enable metaprogramming (and formal methods) on an unprecedented scale.
I'm not following your point, is the criticism that a book on logic is only focusing on logic?
Reading some comments in this thread is borderline depressing: half of the people complaining this isn't more abstracted and generalized mathematics and the other half complaining there's too much computer science and is not about coding only.
Which means that this book is exactly perfect for programmers interested in learning about computer science. Might be a niche, but it is a real audience.
Also, Hillel (author) has a blog that's absolutely worth checking out as well as some great conference talks which are on YouTube, he's on the short list of speakers who I automatically watch any of their talks.
It seems to favor the compact and efficient kind of code that is brittle in the hand of a mildly competent junior dev, or a heavy multitasking senior.
I like smart code, in fun projects, but on the job I prefer fast to read and to reason code. Don’t try to be fancy.
So I guess that’s a book to challenge my assumptions. I like that. Thx.
https://github.com/dwmkerr/hacker-laws#kernighans-law
"Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?"
I know it's explaining the joke, but you've blown past "clever" if you've reached the point where you can't debug it.
Otherwise, you're the only one who can fix your code, and becomes a whole bus factor thing.
Alternatively hop straight into Prolog (Art of Prolog, Craft of Prolog).
Proofs of incompleteness theorems, the halting problem, Rice's theorem etc. all share a diagonalization structure. The keyword here is Lawvere's fixed-point theorem[0], but it's a bit of abstract nonsense, so here's a good accessible video on the topic[1].
I'm not sure the incompleteness theorems themselves are immediately and directly applicable to software development, but I find that having several examples of diagonaization proofs bouncing around in my head makes the Lawvere structure apparent. Since proofs are just programs, the pattern is surprisingly pervasive. Futamura projections are one incarnation, which is essentially how many interpreters end up providing "compilation" of programs into standalone binaries.
[0]:https://en.wikipedia.org/wiki/Lawvere%27s_fixed-point_theore...
Those are not aimed at programmers, so very different and not a replacement. Just look at the free sample on the website. Besides, incompleteness theorems are probably irrelevant for programmers.
I guess I’m more mature now, so I’ll have yet another attempt… but I don’t like my chances!
If I do "buy now," I get a strange text-only "out of stock" page.
If I add to cart and try to check out, I'm redirected to the "switch account" page, where only my currently logged-in account is listed.
I buy things on amazon ask the time and have never seen this before.
EDIT: whatever that was, it's fixed now. I was able to purchase the print book.
This marks the completion of a project that took five years of work, six bookwriting professionals, fourteen domain experts, and fifteen public alphas.
This has been, without a doubt, the biggest and most exhausting project I've ever done. The examples in the discarded drafts alone could make a second book. The cursed knowledge I've gained on LaTeX and typography could fill a third (or at least a couple of entertaining blog posts). Self-publishing was simultaneously the worst and best decision I made.
Now excuse me I am going to sleep for a month.Is it something like .htcsjs, .hsj, or .HSJ on Windows? Or just .html?
More seriously, seems anything that can render .html handles the other two inline, so calling it HTML even with css and js in it seems fine?