Live data from Hacker News

Logic for Programmers

logicforprogrammers.com

41–50 of 53 posts

Re: Logic for Programmers

#41
post #7

The problem I see with the book is copy editing. It is self published on lean pub, which I have seen has poor copy editing.

FWIW, I'm on the email list of Hillel, and when discussing that the book is done, he said the following, which makes me thing otherwise: 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…

Sleep well, King, you've earned your respite

Re: Logic for Programmers

#42

I was waiting for the longest time for Hillel to finish his book, I don't like early drafts, glad he's completed it! 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 programme…

Exactly. There are countless academic books on dry LaTeX logic (logicians love nothing more than writing abstract books about logic) with zero programming applications. But books like this one are very rare.

Re: Logic for Programmers

#43

The footer say HTML code generated by Claude. But who did the css? and who did the js? Tangentially, is html code the correct term if all of it is in a single file or is it still html + css + js code seperately in a single file?

Check the file extension for a static single page app (SPA). 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?

I guess my comment came across as if I was mocking the website but I was genuinely curious. And i mean you can have .css filenames and .js filenames in web apps and websites, is that HTML then as well?

Re: Logic for Programmers

#44

I would buy this book, but reading examples of simplify the condition is hard. I don't know the rules that apply to this. Do you know any other book that describes these rules?

I believe that's what the first chapter is for. Kind of a hard problem in deciding what the sample should be, since if it was the first chapter those already familiar with the rules will be disappointed since they want to see applications, but those who don't know the logic rules will have trouble following the applications.

Re: Logic for Programmers

#45
post #2

Back when I was in college, I took some philosophy classes just for fun. I discovered when I took Symbolic Logic that while everyone else was struggling with the class, I was finding it pretty easy, because chaining together a proof in symbolic logic felt just like programming. It was the same mental steps: you have the starting conditions, there's an endpoint you want to reach, and you need to chain together these f…

One of the best programmers I ever worked with had a degree in philosophy, having gotten his education before there were formal Computer Science curriculums. 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…

Ha! Me too - my colleague/friend had a philosophy/political science degree. He was also the funniest person I’ve worked with.

Given the volume of text philosophy wrangles, I’m not surprised TAOCP was casual =))

Re: Logic for Programmers

#46
post #2

Back when I was in college, I took some philosophy classes just for fun. I discovered when I took Symbolic Logic that while everyone else was struggling with the class, I was finding it pretty easy, because chaining together a proof in symbolic logic felt just like programming. It was the same mental steps: you have the starting conditions, there's an endpoint you want to reach, and you need to chain together these f…

Constructing a formal proof is not only related to programming, it's the same thing. Curry–Howard correspondence: "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." h…

It’s not the same thing, in particular if you work in a dynamically-typed programming language, have mutable state, parallelism, and infinite loops. The Curry–Howard correspondence only applies in a limited sense to practical programs.

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.)

Re: Logic for Programmers

#47
post #46

Earlier quoted context omitted.

Constructing a formal proof is not only related to programming, it's the same thing. Curry–Howard correspondence: "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." h…

It’s not the same thing, in particular if you work in a dynamically-typed programming language, have mutable state, parallelism, and infinite loops. The Curry–Howard correspondence only applies in a limited sense to practical programs. 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…

The Curry-Howard correspondence applies to all programs and computation, regardless of language. Some languages, such as dynamically typed ones, expose only a higher level abstraction where its inner workings are implicit and hidden (that's the trade-off), so the user of the language cannot work with the actual fundamentals.

Re: Logic for Programmers

#48
post #30
post #9

Earlier quoted context omitted.

I know that as Kernighan's Law. Seems to be something that seniors learn over time. 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?"

If debugging is the art of removing bugs from programs, then programming must be the art of inserting them.

I once talk about the art of programming in a job interview and got flashed by a bachelor of biz with: but isn’t it suppose to be engineering? I died a little bit inside…

Re: Logic for Programmers

#50
post #48
post #30

Earlier quoted context omitted.

If debugging is the art of removing bugs from programs, then programming must be the art of inserting them.

I once talk about the art of programming in a job interview and got flashed by a bachelor of biz with: but isn’t it suppose to be engineering? I died a little bit inside…

I've been a programmer for 40 years, I've never considered myself to be an engineer.

We don't have the same level of "proven solutions" and constraints and mathematical rigor that engineering has, nor do we have the legal/liability requirements of "Professional Engineers".

I hope that I qualify as the equivalent of an artisan, like a carpenter that makes furniture, that has elements of both art and craft. Even as I've moved up (and down) the hierarchy of programmer/senior/"architect"/manager.

Programmers fit the "craftsperson/journeyperson/apprentice" model much better than engineering practice.

Post reply on HN