3 ms·
Oh my, the memories. I remember when I was fascinated with animated 3d plots of z = f(x,y) functions which I saw on TV, and when the only decently performant wa
by danmaz74 8y ago
Oh my, the memories. I remember when I was fascinated with animated 3d plots of z = f(x,y) functions which I saw on TV, and when the only decently performant way I found to render those plots myself on my Amiga 500 was to build my own compiler of math functions into 68K machine code from my C program.
The machine code was the easy part - what cost me so much time was reinventing on my own a parser without knowing anything about parsers theory and AST (I was 16 then).
Today, you type your function inside Google search and you get a rotating 3d plot rendered in real time in js inside the browser... lol.
- pjmlp 8y agoFor younger generations, C is a synonym for fast code, yet on those days it was quite common that asm { ... } blocks would be like 80% of function bodies. I shared a similar experience regarding parsing also with your age, got a compiler development book at the local library, but the T diagrams of bootstrapping process and how to use automatons only made sense years later. I ended up resorting to common sense and a very lousy parsing algorithm. However my goal was pretty basic, doing syntax highlighting of Turbo Pascal code for printing.
- danmaz74 8y agoYeah, commons sense and quite lousy parsing was my solution too. Only years later I learned how much easier the proper solution would have been - but my local library didn't have any coding book back then :)