Live data from Hacker News

Show HN: Going into freshman year, figured I should build an interpreter

news.ycombinator.com

61–70 of 84 posts

Re: Show HN: Going into freshman year, figured I should build an interpreter

#61

Earlier quoted context omitted.

C is like a high level assembly language. It maps very closely to how the computer actually runs programs. That, and it’s simplicity, make it a great way to learn. It’s not usually a great idea for production code anymore, but for learning it’s fantastic.

That old chestnut. C is nothing remotely like an assembly language, of any kind. It is a low-level programming language, but only compared to most languages. Disassemble some compiled C code sometime -- it's another world entirely.

C may not be the same as assembly language but the value of learning it is that in general it is the lowest level that we get to for most software. So, most programming languages are either compiled to C or have a virtual machine that is written in C. Many of the things our programs rely on are written in C, for example operating systems and databases. So in a way we can say that "the metal" is C and by understanding it we can potentially understand how our software works from top to bottom.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#62
Learning C controlling some shitty robot in my first year was soo much fun. I was waking up and going to sleep thinking about it. So I hope your first year is also fun.

Obviously you are much more advanced, so my advice would be to keep tinkering with everything u can get your hands on.., and keep spreading to adjacent disciplines (electronics, cad, startupy stuff, and even non tech stuff) until u take over the world haha.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#63
post #54

Earlier quoted context omitted.

This is bad advice. > several better options these days Every other option requires you to buy into some additional paradigm-of-the-day. You can easily lose decades going down the wrong programming rabbit holes.

No. Paradigms are few (OO/logic/functional/procedural/a few more) and learning those is essential and very transferrable. > You can easily lose decades going down the wrong programming rabbit holes total rubbish.

Why do you think the industry keep circling back on old stuff?

Look at how much time we lost with OO. I am only recently coming to grips with how bad it is. C++ was the "thing you are interested in today" back then. And it wasn't well thought through.

What were people doing before Rust?

C is great.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#64
post #54

Earlier quoted context omitted.

No. Paradigms are few (OO/logic/functional/procedural/a few more) and learning those is essential and very transferrable. > You can easily lose decades going down the wrong programming rabbit holes total rubbish.

Why do you think the industry keep circling back on old stuff? Look at how much time we lost with OO. I am only recently coming to grips with how bad it is. C++ was the "thing you are interested in today" back then. And it wasn't well thought through. What were people doing before Rust? C is great.

C is great, agreed. That's the procedural paradigms I mentioned. But the others work very well if used appropriately.

> Why do you think the industry keep circling back on old stuff?

What does this even mean? Can you give some examples?

> Look at how much time we lost with OO

Okay, what do you mean by 'lost' because I find OO to be extremely useful (if used appropriately). Ditto functional, ditto logic.

Are you suggesting we should scrap all of these and just use code procedurally and nothing else? Because that would be a massive step backwards in my view, and I do have decades of experience so I can't understand why you're so negative about anything else but procedural. And maybe C++ was just a bad implementation in hindsight. But it took us a long way.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#65
post #52

Earlier quoted context omitted.

Sorry if I got the syntax wrong, but in something like f = { x = (list 1 2 3) y = (list x x) z = (get x 1) How does the compiler decides if it must free the memory used by x?

It's an interpreter rather than a compiler, and looking at the code it seems to use ref counting

Ref counting makes a lot of sense with the description of the OP, and if there are no cycles it's good.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#66
post #7

Man, your blog ( https://www.liamilan.com/ ) is wonderful. I wish you had an RSS feed, hint, hint.

I agree.

@OP: I recommend to submit your posts here when you have new ones, and post the older ones slowly (like one per week) so people don't get annoyed.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#67

Here's perhaps some unexpected and unsolicited advice... so pretty clearly you aren't going to have a hard time with the CS curriculum (assuming that's what you intend to study) so my $0.02 is - find a second or even third major to augment your skill set. If you are already able to get to this level on your own, you'll likely breeze right through a typical undergrad CS course of study. So consider other courses of st…

Whether done as a minor or second major, or not, I'd like to "second" what dustingetz said: take as much math as you can. You can, IMO, basically never take too many math courses.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#68
post #64

Earlier quoted context omitted.

Why do you think the industry keep circling back on old stuff? Look at how much time we lost with OO. I am only recently coming to grips with how bad it is. C++ was the "thing you are interested in today" back then. And it wasn't well thought through. What were people doing before Rust? C is great.

C is great, agreed. That's the procedural paradigms I mentioned. But the others work very well if used appropriately. > Why do you think the industry keep circling back on old stuff? What does this even mean? Can you give some examples? > Look at how much time we lost with OO Okay, what do you mean by 'lost' because I find OO to be extremely useful (if used appropriately). Ditto functional, ditto logic. Are you sugge…

> What does this even mean?

There is a lot of good wisdom from the 60s, 70s, 80s that people forget and end up re-inventing. I don't think I'm the first person to make this comment.

> OO

It's very subjective I'll admit. But I don't like OO, and it took me along time to realize why. There are many people who feel the same way. The difficulty is in explaining it. Because you have to look at large systems, explore the evolution of these systems, and pluck enough examples where things don't work.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#69
post #64

Earlier quoted context omitted.

C is great, agreed. That's the procedural paradigms I mentioned. But the others work very well if used appropriately. > Why do you think the industry keep circling back on old stuff? What does this even mean? Can you give some examples? > Look at how much time we lost with OO Okay, what do you mean by 'lost' because I find OO to be extremely useful (if used appropriately). Ditto functional, ditto logic. Are you sugge…

> What does this even mean? There is a lot of good wisdom from the 60s, 70s, 80s that people forget and end up re-inventing. I don't think I'm the first person to make this comment. > OO It's very subjective I'll admit. But I don't like OO, and it took me along time to realize why. There are many people who feel the same way. The difficulty is in explaining it. Because you have to look at large systems, explore the e…

You say so but give no actual evidence against it.

I can't learn from that.

Re: Show HN: Going into freshman year, figured I should build an interpreter

#70

Here's perhaps some unexpected and unsolicited advice... so pretty clearly you aren't going to have a hard time with the CS curriculum (assuming that's what you intend to study) so my $0.02 is - find a second or even third major to augment your skill set. If you are already able to get to this level on your own, you'll likely breeze right through a typical undergrad CS course of study. So consider other courses of st…

I agree with this, but have a note about what the second major should be.

I went into mechanical engineering because I had a great natural understanding of basics physics, materials, design, mechanics, blah blah. Even UC Berkeley engineering basically taught me things I knew or would have easily understood it I had to lookup that specific thing. I learned very little from my mechanic engineering degree.

I ALMOST think people shouldn't go into a major based on their strongest aptitude, but I'm not sure yet.

But definitely 100% add another focus since you'll probably breeze through the main course work.

But I dont think it should be philosophy or art or calligraphy like Jobs would recommend. I wouldn't pick a second major that would be a foolish main major.

Pick something that is a hard skill that is useful to learn and understand.

Maybe electrical engineering. Maybe industrial design. Hell, I think tons of people would be well served with what they learned with a second major in accounting.

Post reply on HN