Live data from Hacker News

Ask HN: How do I start learning about lower level compiled languages?

news.ycombinator.com

11–20 of 34 posts

Re: Ask HN: How do I start learning about lower level compiled languages?

#11
Folks recommending C are doing you a disservice, C is just one example of a systems programming language. And that example is now outmoded, Rust or Dlang would be fine first systems languages, I haven't looked at Nim in years, so I can't comment on that.

Someone else mentioned The Compiler Explorer, which is a great resource. I would second that.

Questions I would ask yourself are

1) How is a low level language different than the languages you are coming from? What do they solve for you vs what do you have to solve yourself?

2) What are the qualities you are solving for? Latency, predictable performance, memory bandwidth, IPC (instructions per clock cycle), etc?

All of the issues you would like to learn about can be learned directly in Python. So you have to figure out what exactly you want to learn and then learn that thing. Just learning about lower level compiled languages is like learning about rakes and shovels if you are a gardener.

Re: Ask HN: How do I start learning about lower level compiled languages?

#12

Two recommendations: 1. Switch to a team (or company) where they are developing in the language you want to learn. 2. Work through the book "Computer Systems: A programmer's perspective" Nothing beats daily programming in said language on a daily basis. Similar to yourself, I was predominately writing in higher level interpreted languages. Although I did teach myself C by working through books, writing programs and m…

Can get my hands on the 2nd edition for cheap, or is the 3rd edition required? It's quite expensive.

The authors have written up a summary [0] of the differences: in short, 3e reflects the changes in typical computer hardware over the last decade or two.

Note also that there are two versions of the third edition: the standard edition (colorfully striped shape on the cover) and the international edition (globe made of circuit boards on the cover) which is quite a bit cheaper. The contents of the chapters are the same, but the exercises at the ends of the chapters have been rewritten, by the publisher's lackeys, not by the original authors, for the international edition, very poorly by all accounts.

[0] http://csapp.cs.cmu.edu/3e/changes3e.html

Re: Ask HN: How do I start learning about lower level compiled languages?

#13
post #11

Folks recommending C are doing you a disservice, C is just one example of a systems programming language. And that example is now outmoded, Rust or Dlang would be fine first systems languages, I haven't looked at Nim in years, so I can't comment on that. Someone else mentioned The Compiler Explorer, which is a great resource. I would second that. Questions I would ask yourself are 1) How is a low level language diffe…

I have to disagree emphatically that C is outmoded. It may lack some of the polish and novelty of Rust et al, but it's still a fine language. More importantly, it's an industry standard, has been for ages, and will be for ages. So many of the resource and reference material out there (not just for low level / systems programming but especially for it) presumes a working knowledge of C that a person would do himself a disservice by not picking up the language.

Re: Ask HN: How do I start learning about lower level compiled languages?

#14

Two recommendations: 1. Switch to a team (or company) where they are developing in the language you want to learn. 2. Work through the book "Computer Systems: A programmer's perspective" Nothing beats daily programming in said language on a daily basis. Similar to yourself, I was predominately writing in higher level interpreted languages. Although I did teach myself C by working through books, writing programs and m…

Can get my hands on the 2nd edition for cheap, or is the 3rd edition required? It's quite expensive.

1st or 2nd edition is fine

Re: Ask HN: How do I start learning about lower level compiled languages?

#15

Two recommendations: 1. Switch to a team (or company) where they are developing in the language you want to learn. 2. Work through the book "Computer Systems: A programmer's perspective" Nothing beats daily programming in said language on a daily basis. Similar to yourself, I was predominately writing in higher level interpreted languages. Although I did teach myself C by working through books, writing programs and m…

Can get my hands on the 2nd edition for cheap, or is the 3rd edition required? It's quite expensive.

Do the labs too: these exercises are the most valuable. In particular, the binary bomb forces you to really understand the stack, heap, assembly instructions.

Re: Ask HN: How do I start learning about lower level compiled languages?

#16
I hope you go through fundamentals first. You can't understand C without them[0].

Nothing explains systems programming like C[1], including Rust. Godspeed.

[0] Introduction to Computing Systems: From Bits & Gates to C/C++ & Beyond 3rd Edition by Yale Patt (Author), Sanjay Patel (Author)

[1] Books by Robert C. Seacord and/or Noam Nisan

Re: Ask HN: How do I start learning about lower level compiled languages?

#18

C snobs don't like this book, but it's free and fun: https://buildyourownlisp.com/ I ended up expanding the project pretty far: https://github.com/willcipriano/Connery

Neither C snobs nor Lisp snobs like this book, because it uses bad C techniques to implement Lisp is the most weird way (who uses a hand-rolled Parser Generator to parse Lisp?)

Re: Ask HN: How do I start learning about lower level compiled languages?

#19
Learn C. Despite all the slander, it remains the easiest to learn and most widely applicable Systems language. I personally recommend this book (wish it was available when I learnt it): https://www.amazon.com/Effective-Introduction-Professional-R...

Re: Ask HN: How do I start learning about lower level compiled languages?

#20

Two recommendations: 1. Switch to a team (or company) where they are developing in the language you want to learn. 2. Work through the book "Computer Systems: A programmer's perspective" Nothing beats daily programming in said language on a daily basis. Similar to yourself, I was predominately writing in higher level interpreted languages. Although I did teach myself C by working through books, writing programs and m…

Thanks. I really like the first approach.

Now that I work as half data engineer and half infra (cloud). I do have a few hobby projects using C/C++ (e.g. embedded for C and game programming for C++), but nothing really completed and polished. How do I convince someone to give me a job to work on low level systems, even as a junior?

Should I continue working on low level projects and hopefully they are good enough, or there are other approaches?

TBH I'm willing to do free part-time work on sys programming if given the chance, but industry doesn't work like this.

Post reply on HN