Show HN: Mandelbrot – programmed in widely unknown Easylang, speeded up by WASM
easylang.dev
easylang.dev
It is written mainly in C and is run in the browser using WASM (WebAssembly). The Easylang programs are compiled directly in the browser into an AST (abstract syntax tree) and this is then interpreted.
A recently added feature is that certain code can be compiled directly into WASM code. This is useful for the "inner loop" and can multiply the speed of execution. This feature is experimental and currently only works for certain language constructs. You can test the speed difference in this example by changing "fastfunc iter" to "func iter".
The code of this example is embedded in the URL.
Thank you for making easylang, I plan to use it to teach anyone new to coding.
There are various techniques to go further (obviously one is just to use arbitrary precision arithmetic, another is for example perturbation theory[1])
And there are plenty of "infinite" (or at least some arbitrarily huge level) zoom viewers. You can find videos of zooms going into 10 to the power of thousands. The deeper you go the longer the calculations take.
[1] https://en.m.wikipedia.org/wiki/Plotting_algorithms_for_the_...
E.g. remap: 1e-7 to 9e-7, to numbers 1 to 9?
Thus you can increase the iteration count, but again more calculations.
All other things equal, more zoom leads to more precision and more iterations.