Show HN: I'm 17 and wrote a guide on how to build your own programming language
61–70 of 73 posts
Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language
#62Very 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
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
#63Very 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. ;-)
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
#64Earlier 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
Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language
#65Earlier 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…
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
#66Earlier 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)
Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language
#67Earlier 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.
Re: Show HN: I'm 17 and wrote a guide on how to build your own programming language
#68Earlier 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.