Live data from Hacker News

Show HN: I'm 17 and wrote a guide on how to build your own programming language

easel.hackclub.com

61–70 of 73 posts

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#62
post #33

Very cool. Someone correct me if I am wrong but I dont think this is accurate. >Minimally, should have the following features: variables, looping (think: for/while loops), conditional branching (think: if/else statements) and some form of recursion (think: functions). Why? These are what make a programming language Turing-complete.

Either an infinite for/while and if or unbounded recursion are necessary but you don't need both for Turing completeness. [1]: https://en.wikipedia.org/wiki/Turing_completeness#Examples

My understanding is theyre two sides of the same coin.

Any loop can be written recurisvely or iteratively.

And a loop is really just a move to the same instruction, or equivalently a replication of the same instruction.

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#63
post #38

Very cool. Someone correct me if I am wrong but I dont think this is accurate. >Minimally, should have the following features: variables, looping (think: for/while loops), conditional branching (think: if/else statements) and some form of recursion (think: functions). Why? These are what make a programming language Turing-complete.

In fact, NAND gates are enough to build a Turing complete machine. ;-)

NAND gates are enough to computer any boolean function. Being Turing complete requires some notion of state and state transition.

However, a RAM machine where the program counter is memory mapped, can be Turing complete with a [single machine instruction]( https://en.m.wikipedia.org/wiki/One-instruction_set_computer).

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#64

Earlier quoted context omitted.

Totally unrelated to the content of your post but labeling posts with "I'm [a teenager] and X" has always irked me. It either serves to undermine the content (older people immediately questioning the authority of a teenager) or people respond with meaningless praise ("Wow, great job! I was playing video games when I was your age!"). It also harkens back to the 2000s and 2010s when the industry was obsessed with "teen…

Kids and especially teens seem to do this implicitly whenever they are doing things that they feel is advanced for their age

That's survivor bias.

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#65

Earlier quoted context omitted.

How will you do unbound computation with only NAND gates? Either you need a clock (not a NAND gate) or you need to implement a clock using NAND gates, but that assumes physical aspects such as power propagation speed. Typically you say that you can make arbitrary functions between any two closed domains using only NAND gates.

Turing completeness isn't about having everything you need to build the physical computer, just about expressing program logic that can perform a certain class of unbounded computations. Like, given any C program's logic that takes some input and gives an output, you could calculate the same thing (painfully) with NAND gates. Anyway, bringing up Turing completeness is overly theoretical when talking about a programmi…

> you need to build the physical computer

Exactly.

Now tell me how you will do unbound computation (ie. write on the n+1 cell in the Turing machine) with a fixed number og NAND gates and without a clock.

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#66
post #28
post #7

Earlier quoted context omitted.

This comes up every time someone posts like this, and it's not really very helpful.

I guess the point is that saying you are a teenager in the title can seem like an unfair way to game your post ranking by garnering awe/sympathy. Lots of middle aged people build cool things too, but they can't pull the age card to boost their rank on the front page (at least, not until they are at the other extreme - like 80 or 90 years old)

Not just that; plenty of teenagers build their stuff without announcing that they're teenagers too.

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#67

Earlier quoted context omitted.

Turing completeness isn't about having everything you need to build the physical computer, just about expressing program logic that can perform a certain class of unbounded computations. Like, given any C program's logic that takes some input and gives an output, you could calculate the same thing (painfully) with NAND gates. Anyway, bringing up Turing completeness is overly theoretical when talking about a programmi…

> you need to build the physical computer Exactly. Now tell me how you will do unbound computation (ie. write on the n+1 cell in the Turing machine) with a fixed number og NAND gates and without a clock.

[deleted]

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#68

Earlier quoted context omitted.

Turing completeness isn't about having everything you need to build the physical computer, just about expressing program logic that can perform a certain class of unbounded computations. Like, given any C program's logic that takes some input and gives an output, you could calculate the same thing (painfully) with NAND gates. Anyway, bringing up Turing completeness is overly theoretical when talking about a programmi…

> you need to build the physical computer Exactly. Now tell me how you will do unbound computation (ie. write on the n+1 cell in the Turing machine) with a fixed number og NAND gates and without a clock.

Oh, I see what you mean. Yeah it seems like you need a clock.

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#69

Earlier quoted context omitted.

Kids and especially teens seem to do this implicitly whenever they are doing things that they feel is advanced for their age

That's survivor bias.

No it isn't

Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language

#70

Earlier quoted context omitted.

That's survivor bias.

No it isn't

Of course it is. If a project doesn't state that it was made by a teenager you wouldn't know.

I never stated my age on my projects when I was younger. Neither did any of my developer friends.

Post reply on HN