Live data from Hacker News

Teach Yourself C in 24 Hours (1997)

aelinik.free.fr

41–50 of 83 posts

Re: Teach Yourself C in 24 Hours (1997)

#41
post #34
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…

Some languages cannot be compiled because their behavior is dependent on runtime values. An example is John Shutt's Kernel language. Here's what Shutt has to say about the difference between interpreted and compiled languages: https://fexpr.blogspot.co.uk/2016/08/interpreted-programming... tl;dr: The choice of compiled vs interpreted is made early on and greatly affects the design of the language semantics early on.

I don't think this breaks my point. For example, I don't see of any reason a language could be compiled but not interpreted. And that alone breaks the idea that a language is necessarily either compiled or interpreted.

Moreover, the distinction that Shutt makes in this blogpost between compiled and interpreted is not very clear: most of what he says rings more to me as a distinction between static and dynamic rather than between compiled and interpreted, but I concede that I read the blogpost rather quickly and without taking the time to fully grasp everything.

Re: Teach Yourself C in 24 Hours (1997)

#42
post #4

I only opened the first chapter, but I certainly won't recommend a book where things such as "There are two types of programming languages: compiled language and interpreted language." are written.

It stings but you can't get pedantic into these sorts of tutorials. Maybe he could [*] warning: crude classifaction, more to learn in these books

Re: Teach Yourself C in 24 Hours (1997)

#44
post #33
post #31

Earlier quoted context omitted.

I really want to see K&R Third Edition which is written as perfectly as the original but updated to C11. Just to have the textbook with the modern ISO specification and latest introductions.

Is C11 a plus though? It has features strongly diverging from C++ (e.g. struct initializers), and may only add confusion.

The languages, idioms, and ecosystems are different enough that I don't see that as a problem. They should be treated like two different languages. You wouldn't read a C book and expect to understand the conventions of C#. Neither should you for C++.

Re: Teach Yourself C in 24 Hours (1997)

#45
Many here will rush to trot out the usual "but, we should all be using { fashionable language of the day | Rust } instead of C". Maybe. Maybe not. But there is something of a sweet spot with C and after all these years it persists due to that sweet spot despite some of the potential downsides.

Re: Teach Yourself C in 24 Hours (1997)

#46
I've been coding JavaScript and PHP for 6 years. I know the advanced topics of both languages. I'm in the office on a Saturday right now asking the question I'm always asking, "Where does this go?" I wish I knew the answer so I can go home -- the really important part of coding can't be learned in a day, a month, 12 weeks at a bootcamp, or after 6 years.

Re: Teach Yourself C in 24 Hours (1997)

#47

I think there is a fundamental problem that isn't addressed in teaching people how to code. The problem is that every single course/book talks about the tools of the trade but not the art. Most books start with: - Variables - Loops - Functions ... etc. In doing so, it is simply overloading the student with syntax memorization and conceptual overload. It bothers me so much that very few books (Kernighan) talk about WH…

I’m self taught, and I would have killed to have had resources like that in early days. I always got glimpses of what I wanted to understand, but it seemed like a lot of technique and very little “why” much of the time.

Re: Teach Yourself C in 24 Hours (1997)

#48
post #33
post #31

Earlier quoted context omitted.

I really want to see K&R Third Edition which is written as perfectly as the original but updated to C11. Just to have the textbook with the modern ISO specification and latest introductions.

Is C11 a plus though? It has features strongly diverging from C++ (e.g. struct initializers), and may only add confusion.

Flexible array members, designated initializers, compound literals, anonymous structs and unions, and many of the library features are pretty great. They more than pull their weight.

I am glad the C11 committee put more weight on implementibility for C++ compilers than C99 did. Variable-length arrays in particular feel like the C99 committee decided to poke the C++ committee in the eye with a stick. (Given how the C++ world treated C at the time, though, I understand the temptation.) That said, if being compilable as C++ were a hard requirement for C features the world would be a poorer place.

Re: Teach Yourself C in 24 Hours (1997)

#49
post #41
post #34

Earlier quoted context omitted.

Some languages cannot be compiled because their behavior is dependent on runtime values. An example is John Shutt's Kernel language. Here's what Shutt has to say about the difference between interpreted and compiled languages: https://fexpr.blogspot.co.uk/2016/08/interpreted-programming... tl;dr: The choice of compiled vs interpreted is made early on and greatly affects the design of the language semantics early on.

I don't think this breaks my point. For example, I don't see of any reason a language could be compiled but not interpreted. And that alone breaks the idea that a language is necessarily either compiled or interpreted. Moreover, the distinction that Shutt makes in this blogpost between compiled and interpreted is not very clear: most of what he says rings more to me as a distinction between static and dynamic rather…

Interpreters are more flexible; I'd expect that any compiled language could also be interpreted. I'd expect that at least some languages where the canonical implementation is an interpreter could also have an ahead-of-time compiler implementation, but that some of those languages would have at least sections of the program that need to be just-in-time compiled (or even recompiled) at runtime. That would pose extra difficulty in making a compiled implementation of the language.

Re: Teach Yourself C in 24 Hours (1997)

#50

I think there is a fundamental problem that isn't addressed in teaching people how to code. The problem is that every single course/book talks about the tools of the trade but not the art. Most books start with: - Variables - Loops - Functions ... etc. In doing so, it is simply overloading the student with syntax memorization and conceptual overload. It bothers me so much that very few books (Kernighan) talk about WH…

I think SICP also pretty good in this regard. Thankfully it's available online for free

(I haven't gone through both) but I think HtDP and SICP are interchangeable-ish.

From the wikipedia page: HtDP was designed as a textbook to address certain issues that some students and teachers had with SICP.

Post reply on HN