Live data from Hacker News

Programming from the Ground Up [pdf]

download-mirror.savannah.gnu.org

51–56 of 56 posts

Re: Programming from the Ground Up [pdf]

#51

Learning assembly was probably the biggest thing that made computers click in my head. Since then, I've always thought that learning assembly as your first programming language would be a great place to start. Of course, I'm sure this doesn't apply to everyone. In CS you're usually started off with something like C, Java, or Python. But those languages are so HUGE (in comparison) that it can be really overwhelming. M…

At my university the sequence over two years is

python --> boolean algebra + logic gates --> assembly --> c + java

It used to be

scheme + boolean algebra + logic gates --> assembly + unix programming in c (threads, pipes)

but that was a bit too hardcore for freshman in first semester

Re: Programming from the Ground Up [pdf]

#52
post #22
post #15

Hah, just today I started to read "Haskell programming from first principles"[1] which also targets non-programmers but builds on lambda calculus instead of assembly. Would anyone actually recommend to a beginner to start learn assembly first? [1] http://haskellbook.com/

If you start with assembly I would suggest not picking x86. I would suggest a RISC or virtual assembly like LLVM. x86 just has too much historic weirdness.

Like scores of other generation C64 kids by second language (after BASIC) was 6502 assembly. I think it's suitably straightforward. Although the special addressing mode for the zero page might count as a weirdness.

Re: Programming from the Ground Up [pdf]

#53
post #15

Hah, just today I started to read "Haskell programming from first principles"[1] which also targets non-programmers but builds on lambda calculus instead of assembly. Would anyone actually recommend to a beginner to start learn assembly first? [1] http://haskellbook.com/

I consider it possible, and found a game that tries to teach one the concepts: Human Resource Machine[0]

[0] http://tomorrowcorporation.com/humanresourcemachine

Re: Programming from the Ground Up [pdf]

#54
post #40

Earlier quoted context omitted.

>Would anyone actually recommend to a beginner to start learn assembly first? Yes, if you can find a good book about it. Assembler isn't particularly difficult, but the information teaching it is rather hard. Right now, the lowest-level language I know of with a really good beginner book is C, and it's this book: http://smile.amazon.com/Absolute-Beginners-Guide-C-2nd/dp/06...

Out of curiosity, have you looked at the 3rd edition? http://www.amazon.com/Programming-Absolute-Beginners-Guide-3...

I just took a look at the "LOOK INSIDE!" sample available on amazon.com. A few observations:

The front cover says it's been "Updated for C11", but all the sample programs use "main()" rather than "int main(void)". The form without an explicit return type has been invalid since C99.

Page 11:

"In 1983, ANSI created the X3J11 committee to set a standard version of C. This became known as ANSI C. The most recent version of ANSI C, C11, was formally adopted in 2011."

That's loosely correct, but in fact the 1990, 1999, and 2011 editions of the C standard were published by ISO, not by ANSI (and later adopted by ANSI). Furthermore, it ignores the fact that the phrase "ANSI C" is commonly but incorrectly used to refer to the 1989/1990 version of the language (see gcc's "-ansi" option, for example).

Page 16:

"These are functions:

main() calcIt() printf() strlen()

and these are commands:

return while int if float"

No, those aren't "commands", they're keywords. I can't think of any reasonable meaning of the word "command" that would include "int".

Page 26:

The sample program listing is not properly indented.

Page 36:

"\b moves the cursor back a line".

No, it moves the cursor back a column.

A book for beginning C programmers should not have these kinds of errors after three editions.

Re: Programming from the Ground Up [pdf]

#55
post #31

Earlier quoted context omitted.

I think this is tricky. I was exposed to 8086 assembly having only previously seen a couple flavors of BASIC, and I have to say that it mostly went over my head. It was hard for me to see the bigger picture, the useful functionality that we were painstakingly working toward with our little instructions moving bytes around and taking different paths based on flags. I remember system calls (which are covered early on i…

Assembly was my second language (BASIC being my first), but it was not the x86 line I learned first (it was my second assembly language). I can name half a dozen architectures that are probably better for learning than the x86, some of them relevant today. Probably in order: 6502---not my favorite, but tons of material and emulators exist. The most popular 8 bit CPU and one of the most simple ones. 6809---my favorite…

Great anecdotes! I still have a real soft spot for 68000. It's definitely the IS that made this whole "how computers work" thing make sense to me, and I still often imagine what my programs are doing in terms of what they'd be doing in the 68000 world, even though I know it's actually x86_64 (or ARM, on my phone).

Question for you, if you happen to come back to this: what's the best documentation on ARM that you've found? Every time I try to find some, it seems like I'm supposed to pay for a license, and I get confused.

Post reply on HN