Live data from Hacker News

Teach Yourself C in 24 Hours (1997)

aelinik.free.fr

11–20 of 83 posts

Re: Teach Yourself C in 24 Hours (1997)

#12
post #9

Earlier quoted context omitted.

Would you prefer “one of the many ways to categorize languages is into buckets of either compiled or interpreted”?

No, that is also wrong. Even if you only consider compilers and interpreters (in real life there are many in-betweens: bytecode/VW, JIT, etc.), a language is not either interpreted or compiled. Maybe its reference/canonical implementation is an interpreter or a compiler, but that's all. What would stop anyone from writing a C interpreter? Or a Python compiler? Now consider OCaml, which canonical distribution comes wi…

"ocaml does both" wfm.

This is an introduction, details will be glossed over.

Re: Teach Yourself C in 24 Hours (1997)

#15
post #12
post #9

Earlier quoted context omitted.

No, that is also wrong. Even if you only consider compilers and interpreters (in real life there are many in-betweens: bytecode/VW, JIT, etc.), a language is not either interpreted or compiled. Maybe its reference/canonical implementation is an interpreter or a compiler, but that's all. What would stop anyone from writing a C interpreter? Or a Python compiler? Now consider OCaml, which canonical distribution comes wi…

"ocaml does both" wfm. This is an introduction, details will be glossed over.

Sorry, I don't understand, what does "wfm" mean?

> This is an introduction, details will be glossed over.

Maybe, but I really don't like this. Sometimes it is necessary to simplify things (at least in the first place) to teach them, but it is very rarely the case that it is necessary to say something actually wrong. For example I think it is totally acceptable to ignore the existence of VM and JIT in this chapter, because explaining what they are requires knowledge that the targeted readers don't yet have.

But I don't see what good it does to say that the two types of languages are compiled languages and interpreted languages. It may even be counterproductive because the same paragraph which explains what a compiled language is as opposed to an interpreted one ends with this sentences: “You can think of the C language as a compiled language because most C language vendors make only C compilers to support programs written in C.”. This sentence is now confusing for the inexperienced reader, while it is the only acceptable one in the paragraph.

It would not have been more complicated to explain that languages can be implemented either with a compiler or an interpreter, then explain what is the difference between the two (this is already done), and then finish with that same sentence :).

Re: Teach Yourself C in 24 Hours (1997)

#17
post #3

This was one of the first books I read on C and programming I general! I remember I wasn't happy at all with it, so I gave up on it a bit after the middle. It must be pretty old.

I've never understood why anyone (in the day) would read anything other than K&R (or ANSI 89). Were those not good enough to learn C?

Re: Teach Yourself C in 24 Hours (1997)

#18
post #15
post #12

Earlier quoted context omitted.

"ocaml does both" wfm. This is an introduction, details will be glossed over.

Sorry, I don't understand, what does "wfm" mean? > This is an introduction, details will be glossed over. Maybe, but I really don't like this. Sometimes it is necessary to simplify things (at least in the first place) to teach them, but it is very rarely the case that it is necessary to say something actually wrong. For example I think it is totally acceptable to ignore the existence of VM and JIT in this chapter, be…

> what does "wfm" mean?

"works for me" https://www.urbandictionary.com/define.php?term=wfm

Re: Teach Yourself C in 24 Hours (1997)

#19
post #17
post #3

This was one of the first books I read on C and programming I general! I remember I wasn't happy at all with it, so I gave up on it a bit after the middle. It must be pretty old.

I've never understood why anyone (in the day) would read anything other than K&R (or ANSI 89). Were those not good enough to learn C?

When I was a kid you had maybe 2-3 books on C at the local bookstore, and they were all terrible. But sometimes they came with a (crippled or obsolete) compiler, so that was a huge plus.

The book I learned from was C in 12 lessons by Greg Perry, which I found is still on the shelves to this day, 25 years later. Terrible book.

The bad part is you don’t learn how to do anything other than little bit of simple input and output and loops, and the worst explanation of pointers you can think of.

You can’t do anything in the base language, but that’s just the way C works, you need a platform specific book to learn to do anything worthwhile. This is why the 80’s assembler books were so useful and inspiring.

For what you end up learning in the book you could have actually spent the 24 hours (or less) using something like Python, where you’d be way more productive and hundred times less confused. Actually doing work instead of messing with pointers and fscanf().

Post reply on HN