Congratulations! I showed your project to my 12 year old son who has just started to learn programming (in JS no less!) and his jaw dropped. In addition to being a programmer, you are now a role-model. Really well done.
Thanks a ton! Tell your son that it took me a while, and a lot of work, but it feels great to finish something (there are a lot of projects that I don't finish...). I began learning using Scratch a long time ago. They even featured me last year (the project was a solar system in which I used sine and cosine to calculate the rotation of the planets). I then used blocklike.js to move to JS. I watch a lot of YouTube vid…
Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
141–150 of 304 posts
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#142Congratulations! I showed your project to my 12 year old son who has just started to learn programming (in JS no less!) and his jaw dropped. In addition to being a programmer, you are now a role-model. Really well done.
>I showed your project to my 12 year old son who has just started to learn programming (in JS no less!) It would be much better if he would start with Scratch, Processing, Smalltalk, or even Python. On JS he'll have to lose time coping with complicated build tools, horrible package system, async etc.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#143Great work. I will give you a different piece of advice. Make sure to work out 360 out of 365 days in a year, without weights.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#144Earlier quoted context omitted.
Thanks a ton! Tell your son that it took me a while, and a lot of work, but it feels great to finish something (there are a lot of projects that I don't finish...). I began learning using Scratch a long time ago. They even featured me last year (the project was a solar system in which I used sine and cosine to calculate the rotation of the planets). I then used blocklike.js to move to JS. I watch a lot of YouTube vid…
sine and cosine last year? Now I want to know what your parents are feeding you!!! ;)
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#145Great job! One way to improve this code is to add comments. Use comments to describe what each function does and what the parameters are supposed to be. Then you can tell at a glance what the function does without having to analyze the code later on. Us old people tend to forget things.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#146Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#147Congratulations! I showed your project to my 12 year old son who has just started to learn programming (in JS no less!) and his jaw dropped. In addition to being a programmer, you are now a role-model. Really well done.
>I showed your project to my 12 year old son who has just started to learn programming (in JS no less!) It would be much better if he would start with Scratch, Processing, Smalltalk, or even Python. On JS he'll have to lose time coping with complicated build tools, horrible package system, async etc.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#148Inside of animate() you are calling setTimeout() to automatically call animate repeatedly but this is also calling setTimeout() every time animate runs but setTimeout() should only be run once.
You should be able to take
setTimeout(() => {
animate();
}, 100);
and paste it over animate() on the last lineRe: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#149Great work! I made a quick Observable notebook out of your code, in case anyone wants to see what it does without downloading or running it on their own machine: https://beta.observablehq.com/@jrus/wolfram-cellular-automat...
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#150Earlier quoted context omitted.
Thanks a ton! Tell your son that it took me a while, and a lot of work, but it feels great to finish something (there are a lot of projects that I don't finish...). I began learning using Scratch a long time ago. They even featured me last year (the project was a solar system in which I used sine and cosine to calculate the rotation of the planets). I then used blocklike.js to move to JS. I watch a lot of YouTube vid…
sine and cosine last year? Now I want to know what your parents are feeding you!!! ;)
Various example BASIC programs (e.g. Lissajous curve and circle plotters and such) used those functions and from their behavior I kind of picked up the relationship to both undulation and the circle. I found out about the arctangent function, and from that I realized that it could be used for 3D projection. I made a proof-of-concept program that mapped some connected points in 3D (boxes and whatnot) to 2D by calculating the visual angles using arctangents: i.e. I plotted the angle between the line of sight and each point, rather than a simple planar projection. It resulted in the objects appearing in a very nice "fish eye" perspective on the screen, which was very pleasing. From all that I learned about radians also and how there are "two pi" of them in a circle, since the functions accepted radians and not degrees.
You know how they say that necessity is the mother of invention; it's also the mother of learning trigonometric functions and whatever else.