TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Maxima in the browser using Embedded Common Lisp on WASM

248 pointsby v9v4 months ago

18 comments

r858043066104 months ago
because nobody knows maxima, some things to try. also plot2d&#x2F;plot3d work, so that&#x27;s pretty neat. the whole thing is powered by <a href="https:&#x2F;&#x2F;ecl.common-lisp.dev" rel="nofollow">https:&#x2F;&#x2F;ecl.common-lisp.dev</a> and the op announcement is here <a href="https:&#x2F;&#x2F;mailman3.common-lisp.net&#x2F;hyperkitty&#x2F;list&#x2F;ecl-devel@common-lisp.net&#x2F;thread&#x2F;T64S5EMVV6WHDPKWZ3AQHEPO3EQE2K5M&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mailman3.common-lisp.net&#x2F;hyperkitty&#x2F;list&#x2F;ecl-devel@c...</a><p><pre><code> :lisp (+ 2 2) solve(f(x)^2-1,x); integrate(x^2,x); 2^1024; factor(30!); a:1 b:2 a+b; sqrt(a^2+b^2); expr: log((x+2)*(x-2))+log(x); ratsimp(expr); fullratsimp(expr); trigsimp(2*cos(x)^2 + sin(x)^2); solve(x^3=1,x); diff(sin(x), x); float([%e,%pi,%phi,%gamma]); f(x):=x^2; f(10); taylor(sin(x),x,0,5); plot2d(x^2-x+3,[x,-10,10]); plot2d([x^2, x^3, x^4 -x +1] ,[x,-10,10]); f(x,y):= sin(x) + cos(y); plot3d(f(x,y), [x,-5,5], [y,-5,5]);</code></pre>
评论 #42856410 未加载
评论 #42864733 未加载
评论 #42855910 未加载
unusual-name4 months ago
We used maxima extensively in high school. I remember that I forgot to bring my laptop when we had our first maxima lesson. My teachers understandably scolded me for not bringing my laptop to school, but to their surprise I found an online version of maxima. [1] While it was good enough for this period, in contrast to this implementation it was truly awful.<p>I just think it&#x27;s kinda sad that a lot of people never heard of maxima, as it is a pretty decent tool once you learn how to use it.<p>[1] <a href="http:&#x2F;&#x2F;www.dma.ufv.br&#x2F;maxima&#x2F;index.php" rel="nofollow">http:&#x2F;&#x2F;www.dma.ufv.br&#x2F;maxima&#x2F;index.php</a>
评论 #42855601 未加载
veryveryold4 months ago
(to_lisp); (loop for i below 1000000 count t) takes 0.34 seconds on my system with vanilla maxima (on gcl). In the browser it takes about 7 seconds, so it must be a factor of 21 in computer time. Using sbcl outside maxima it takes 0.002 seconds. So one can get some idea about performance.<p>Perhaps it could be combined with J (array language), like in the playground <a href="https:&#x2F;&#x2F;code.jsoftware.com&#x2F;wiki&#x2F;Playground" rel="nofollow">https:&#x2F;&#x2F;code.jsoftware.com&#x2F;wiki&#x2F;Playground</a> that is using webassembly<p>It seems to work very well locally without connection to the web.
评论 #42855572 未加载
评论 #42854371 未加载
评论 #42858440 未加载
v9v4 months ago
Raymond Toy posted this on the ECL mailing list: <a href="https:&#x2F;&#x2F;mailman3.common-lisp.net&#x2F;hyperkitty&#x2F;list&#x2F;ecl-devel@common-lisp.net&#x2F;thread&#x2F;T64S5EMVV6WHDPKWZ3AQHEPO3EQE2K5M&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mailman3.common-lisp.net&#x2F;hyperkitty&#x2F;list&#x2F;ecl-devel@c...</a>
vindarel4 months ago
I&#x27;ll add options to run Maxima:<p>* [Maxima on Android](<a href="https:&#x2F;&#x2F;play.google.com&#x2F;store&#x2F;apps&#x2F;details?id=jp.yhonda">https:&#x2F;&#x2F;play.google.com&#x2F;store&#x2F;apps&#x2F;details?id=jp.yhonda</a>), built with ECL.<p>* [Maxima on Jupyter](<a href="https:&#x2F;&#x2F;github.com&#x2F;robert-dodier&#x2F;maxima-jupyter">https:&#x2F;&#x2F;github.com&#x2F;robert-dodier&#x2F;maxima-jupyter</a>)<p>* Maxima can be used via [SageMath](<a href="https:&#x2F;&#x2F;www.sagemath.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.sagemath.org&#x2F;</a>) and [KDE Cantor](<a href="https:&#x2F;&#x2F;apps.kde.org&#x2F;cantor&#x2F;" rel="nofollow">https:&#x2F;&#x2F;apps.kde.org&#x2F;cantor&#x2F;</a>).<p>* Of course, with Emacs: [maxima-mode](<a href="https:&#x2F;&#x2F;gitlab.com&#x2F;sasanidas&#x2F;maxima" rel="nofollow">https:&#x2F;&#x2F;gitlab.com&#x2F;sasanidas&#x2F;maxima</a>) ([screenshot](<a href="https:&#x2F;&#x2F;community.linuxmint.com&#x2F;img&#x2F;screenshots&#x2F;maxima-emacs.png" rel="nofollow">https:&#x2F;&#x2F;community.linuxmint.com&#x2F;img&#x2F;screenshots&#x2F;maxima-emacs...</a>))<p>and [maxima-interface](<a href="https:&#x2F;&#x2F;github.com&#x2F;jmbr&#x2F;maxima-interface">https:&#x2F;&#x2F;github.com&#x2F;jmbr&#x2F;maxima-interface</a>) to ease the interface between Maxima and Common Lisp.<p>* it can be used [from a Lisp REPL](<a href="https:&#x2F;&#x2F;mahmoodsheikh36.github.io&#x2F;post&#x2F;20230510181916-maxima_in_lisp&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mahmoodsheikh36.github.io&#x2F;post&#x2F;20230510181916-maxima...</a>).<p>(and [wxMaxima](<a href="https:&#x2F;&#x2F;wxmaxima-developers.github.io&#x2F;wxmaxima&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wxmaxima-developers.github.io&#x2F;wxmaxima&#x2F;</a>): a graphical frontend as mentioned earlier)<p>(find the links and more scientific libraries for CL on <a href="https:&#x2F;&#x2F;github.com&#x2F;CodyReichert&#x2F;awesome-cl">https:&#x2F;&#x2F;github.com&#x2F;CodyReichert&#x2F;awesome-cl</a>)
phoe-krk4 months ago
It&#x27;s called &quot;Embeddable Common Lisp&quot;, not &quot;Embedded Common Lisp&quot;.<p><a href="https:&#x2F;&#x2F;ecl.common-lisp.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ecl.common-lisp.dev&#x2F;</a>
magicalhippo4 months ago
I&#x27;ve tried Maxima on a few occasions but the syntax somehow fails to agree with me.<p>Been looking for a self-hosted alternative to Wolfram Alpha, and just stumbled over Mathics, which has a Django front-end[1]. Rough but usable Mathematica alternative, at least for basic use.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;Mathics3&#x2F;mathics-django">https:&#x2F;&#x2F;github.com&#x2F;Mathics3&#x2F;mathics-django</a>
评论 #42909100 未加载
评论 #42854682 未加载
maple31424 months ago
Similar project: PARI&#x2F;GP on WASM <a href="https:&#x2F;&#x2F;pari.math.u-bordeaux.fr&#x2F;gpexpwasm.html" rel="nofollow">https:&#x2F;&#x2F;pari.math.u-bordeaux.fr&#x2F;gpexpwasm.html</a>
trott4 months ago
How do Maxima and SymPy compare in terms of capability, features and speed (native, not WASM)?
评论 #42964224 未加载
fsckboy4 months ago
tangential: can Macsyma&#x2F;Maxima do symbolic boolean algebra, reducing formulae to bog standard &quot;OR of ANDs&quot; form?<p>(I&#x27;ve tried looking at the doc, and it&#x27;s clearly not a feature they showcase, and as others have said, the way it works is not intuitive to me. I really need this, but trying to do it in lisp is becoming its own project and I want to get back to my project. I found some really nice online reducers, but the UIs are not conducive to pasting&#x2F;putting in simultaneous equations, and using those outputs as inputs again)
评论 #42856372 未加载
azakai4 months ago
It looks like the wasm file here is not fully optimized. Reading the wasm and JS, I&#x27;d guess -O1 perhaps? Linking with -O3 would make it smaller and possibly faster (10% smaller binary in a quick local test, and it removes 90% of locals, which should speed things up too)<p>But it is possible that it&#x27;s already fast enough for the purposes here, and this doesn&#x27;t matter.
评论 #42858303 未加载
fud1014 months ago
I love Maxima, i don&#x27;t really need a CAS much these days but whenever I do, I will turn to Maxima.
hackernj4 months ago
Nice. I&#x27;ve been using this Maxima interpreter: <a href="http:&#x2F;&#x2F;www.dma.ufv.br&#x2F;maxima&#x2F;index.php" rel="nofollow">http:&#x2F;&#x2F;www.dma.ufv.br&#x2F;maxima&#x2F;index.php</a>
gtpedrosa4 months ago
This brings back memories. We used this in my mechanical engineering mechanisms class. It was cool to have the (simplified!) symbolic formulas describing the movements we were designing.
phkahler4 months ago
Is there a place to get a wxmaxima installer for Windows other than SourceForge? I no longer trust stuff from there.
评论 #42858562 未加载
soegaard4 months ago
This is great?<p>Feature request: A way to easily copy old expressions into the current input field (to fix mistakes).
评论 #42859593 未加载
dartos4 months ago
How did you get Common Lisp running on wasm? I thought wasm didn’t support tail call recursive
评论 #42855015 未加载
评论 #42856049 未加载
评论 #42856152 未加载
openrisk4 months ago
omg, macsyma is still alive and I can now manipulate <i>real</i> tensors in the browser?
评论 #42856771 未加载