TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Mandelbrot – programmed in widely unknown Easylang, speeded up by WASM

22 点作者 chkas超过 1 年前

5 条评论

chkas超过 1 年前
Easylang is a domain-specific language for learning programming and also for small web canvas applications. It has a reduced set of functions, a simple syntax, a browser IDE and integrated graphic commands. It is statically typed and has only strings and numbers (floating point), arrays of strings and numbers, and arrays of arrays as data types. Easylang was made by me and is open source (GPL).<p>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.<p>A recently added feature is that certain code can be compiled directly into WASM code. This is useful for the &quot;inner loop&quot; 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 &quot;fastfunc iter&quot; to &quot;func iter&quot;.<p>The code of this example is embedded in the URL.
nuancebydefault超过 1 年前
I find this amazing! The code read&#x2F;writes like a high level interpreted language and runs like offline compiled code. The fact that it works in a &#x27;random&#x27; browser on a &#x27;random&#x27; platform is the cherry on the cake.
xmonkee超过 1 年前
A friend of mine recently asked me the dreaded &quot;How do i get into programming&quot;. I pointed them to easylang.dev!<p>Thank you for making easylang, I plan to use it to teach anyone new to coding.
ameaninglessuid超过 1 年前
This is awesome, but reminds me of something I was recently wondering: why are there no infinite-zoom Mandelbrot viewers? They all stop at a certain level of zoom instead of generating the finer details. What&#x27;s the limitation? I can&#x27;t imagine you&#x27;d have to render the entire fractal in fine detail to zoom in on a specific piece.
评论 #37759571 未加载
评论 #37760321 未加载
kaserfan1超过 1 年前
ok geil