emmy
zig
Our great sponsors
emmy | zig | |
---|---|---|
14 | 816 | |
353 | 30,631 | |
24.9% | 5.2% | |
5.2 | 10.0 | |
5 days ago | 5 days ago | |
Clojure | Zig | |
GNU General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
emmy
-
Ask HN: Any interactive math tutorials that use a computational algebra system?
I'm a senior level programmer who recently became interested in furthering my math education.
I also just became aware of computational algebra systems like emmy: https://github.com/mentat-collective/emmy
My question is: is there an interactive math curriculum/textbook/etc that uses such a system to teach the math? I would find that a lot more engaging than learning math the old way!
- The Emmy Computer Algebra System
-
Pure Programming Language
This library bring these capabilities to Clojure:
https://github.com/mentat-collective/emmy
It's based on an older library for Scheme, by Sussman.
- Emmy A powerful computer algebra system written in Clojure(Script)
-
Learn Physics with Functional Programming
Of course! And referencing your other comment, during the ~2 year period I've been working on Emmy (on top of work by Colin Smith), I was keen to make the implementation more accessible and well-documented than the original.
There's still not a great map of the project (from primitives to general relativity), but many of the namespaces are written as literate programming explorations: https://emmy.mentat.org/#explore-the-project
Here's the automatic differentiation implementation/essay, for example: https://sritchie.github.io/emmy/src/emmy/differential.html
A rough sketch of the tower is:
- `emmy.value` and `emmy.generic` implement the extensible generic operations
- `emmy.ratio`, `emmy.complex` and `emmy.numbers` fleshes out the numeric tower
- `emmy.expression` and `emmy.abstract.number` add support for symbolic literals
Next we need an algebraic simplifier...
- `emmy.pattern.{match,rule,syntax} give us a pattern matching language
- `emmy.simplify.rules` adds a ton of simplification rules, out of which
- `emmy.simplify` builds a simplification engine
Actually the simplifier has three parts... the first two start in `emmy.rational-function` and `emmy.polynomial` and involve converting an expression into either a polynomial or a rational function and then back out, putting them into "canonical form" in the process. That will send you down the rabbit hole of polynomial GCD etc...
And on and on! I'm happy to facilitate any code reading journey you go on or chat about Emmy or the original scmutils, feel free to write at sam [at] mentat.org, or else visit the Discord I run for the project at https://discord.gg/hsRBqGEeQ4.
- Moldable Live Programming for Clojure
- Looking for a partial application macro that can apply parameters out of order by name
- Emmy: A powerful computer algebra system written in Clojure(Script)
-
I think Zig is hard but worth it
> You can get a feel for how unergonomic this is by avoiding the use of all arithmetic operators in your code and instead forcing yourself to use user defined plus(a,b), minus(a,b), assign(a,b), etc, or programming directly with the C blas api.
You've dramatically overstated your case, since that's true of every Lisp-like language.
Lisp is a perfectly suitable language for developing mathematics in, see SICM [0] for details.
If you want to see SICM in action, Emmy [1] is a Clojure project that ported SICM to both Clojure and Clerk notebooks (like Jupyter notebooks, but better for programmers).
[0] https://mitpress.mit.edu/9780262028967/structure-and-interpr...
[1] https://emmy.mentat.org/
-
Polynomial Interpolation
Here's some Clojure code I wrote for the Emmy computer algebra system that implements polynomial interpolation with a few different algorithms described in Numerical Recipes:
https://github.com/mentat-collective/emmy/blob/main/src/emmy...
I discovered while writing this that I could express each of these algorithms as folds that consumed a stream of points, accumulating a progressively higher order polynomial.
Here's the same sort of thing but for rational function interpolation: https://github.com/mentat-collective/emmy/blob/main/src/emmy...
zig
-
Memory-mapped IO registers in Zig. (2021)
There is an issue proposing this approach: https://github.com/ziglang/zig/issues/4284
- Zig Programming Language
- Zig Language 0.12 Release
-
Zig 0.12.0 Release Notes
https://github.com/ziglang/zig/issues/224
e.g.:
> > When debugging/prototyping, it's useful to comment out a line without having to refactor, e.g.
-
How to Write a PHP Extension with Zig?
When writing code in a scripting language, sometimes you need that extra bit of performance (or maybe an async feature from Zig).
-
Bun - The One Tool for All Your JavaScript/Typescript Project's Needs?
NodeJS is by no means a slow runtime, it wouldn’t be so popular if it was. But compared to Bun, it’s slow. Bun was built from the ground up with speed in mind, using both JavascriptCore and Zig. The Bun team spent an enormous amount of time and energy trying to make Bun fast, including lots of profiling, benchmarking, and optimizations.
-
Bun 1.1
ntdll.dll!RtlUserThreadStart()
There are valid reasons to use APIs from NTDLL. Where I disagree with zig#1840 is the idea that it is always better to use NTDLL versions of API. Every other software ecosystem uses the standard Win32 APIs and diverging from that without a good reason seems like a good way to have unexpected behavior. One concrete example is most users and programmers expect Windows to redirect some file system paths when running on WOW64. But this is implemented in Kernel32, not ntdll.
https://github.com/ziglang/zig/issues/11894
- Zig, Rust, and Other Languages
-
Nanos – A Unikernel
Zig also has an IRC channel on libera (#zig) that is moderated by Andrew Kelley.[1]
[1] https://github.com/ziglang/zig/wiki/Community
- Ask HN: What Underrated Open Source Project Deserves More Recognition?
What are some alternatives?
clerk - ⚡️ Moldable Live Programming for Clojure
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
locus - A specialised computer algebra system for topos theory.
Odin - Odin Programming Language
sicmutils - Computer Algebra, Physics and Differential Geometry in Clojure.
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
rust - Empowering everyone to build reliable and efficient software.
go - The Go programming language
ssr-proxy-js - A Server-Side Rendering Proxy focused on customization and flexibility!
rust - Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266
TinyGo - Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
crystal - The Crystal Programming Language