cocalc
JSage
Our great sponsors
cocalc | JSage | |
---|---|---|
4 | 4 | |
1,115 | 33 | |
1.3% | - | |
10.0 | 0.0 | |
2 days ago | about 1 year ago | |
TypeScript | JavaScript | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 only |
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.
cocalc
-
Ask HN: Did you encounter any Leap Year bugs today? How bad was it?
I have some unit tests for billing and subscription code for my company that started breaking in CI today due to the leap day: https://github.com/sagemathinc/cocalc/commit/8575029c2b76787...
-
Ask HN: Who has deployed commercial features using GPT4?
1. I'm integrating ChatGPT extensively into https://CoCalc.com. This integration makes a lot of sense, because cocalc is a platform in which relatively inexperienced students use Jupyter notebooks, linux terminals and Latex. So far, the most popular feature by far is a "Help me fix this" button that appears above stacktraces in Jupyter notebooks.
2. One software engineering challenges is that ChatGPT often outputs code in markdown blocks. I've had to emphasize in prompts that it should explicitly mark the language. I then got inspired to make it possible to evaluate in place the code that appears in these blocks using a Jupyter kernel, and spent a week making that work (so, e.g., if you type a question into the chatgpt box on the landing page at https://cocalc.com, and code appears in the output, often you can just evaluate it right there). There seem to be endless surprises and challenges though. For example, a few minutes ago I realized that sometimes the giant tracebacks one gets when using Python in Jupyter notebooks are so big (even doing simple things with matplotlib) that they end up resulting in too much truncation: https://github.com/sagemathinc/cocalc/issues/6634
3. I'm mostly using GPT-3.5-turbo rather than GPT4, even though I have a GPT4 api key. Aside from costs, GPT4 takes about 4x as long, which often just feels too long for my use case. The average time for a complete response from GPT-3.5 for my application is about 8 seconds, versus over 30s for GPT4.
-
Math on GitHub: Following Up
Github's implementation is really lazy. There are many much better approaches to precisely this problem. E.g., Jupyter notebooks implement one that has matured in the wild over a decade. There's this very flexible markdown-it plugin that implements anther https://github.com/goessner/markdown-it-texmath, and my version of it here https://github.com/sagemathinc/cocalc/blob/master/src/packag... which I rewrote in typescript with a focus on the same semantics as Jupyter has, but for CoCalc, and I've been working on using unifiedjs to provide more general latex for Markdown (not just formulas) here https://github.com/sagemathinc/cocalc/pull/5982 Parsing math is much easier if you use a plugin to an existing markdown parser, rather than trying to do some hack outside of that (which is what Github probably does, and also what Jupyter does).
JSage
-
CoWasm: An alternative to Emscripten, based on Zig (demo: Python in the browser)
Yes, porting https://SageMath.org to the browser is part of the plan, and this is a key foundation for that. I ported some of the components of Sage (e.g., https://libntl.org/) already as part of https://github.com/sagemathinc/jsage, and I don't see any fundamental obstruction to porting all of Sage, except time. It would be great if once CoWasm is more stable, I can get some help porting some components to WASM.
- SageMath is a free open-source mathematics software system
-
Tiny WASI – A tiny WASI runtime written in TypeScript
And here is the more lightweight and flexible (in some ways) one from Wasmer, before they completely rewrote it in Rust:
https://github.com/sagemathinc/JSage/tree/main/packages/wasi
It took me some work to track down the old version, fix some bugs in it, and keep it going. But I personally find the old version very useful too, and if you can see from the comments that it has an interesting history.
-
We've been lied to: JavaScript is fast
Here's a third called "JPython", which I've been writing lately for fun:
https://github.com/sagemathinc/JSage/tree/main/packages/jpyt...
What are some alternatives?
Scientific-Notes - Collaborative, open-source notes on mathematical physics with Obsidian.md
Transcrypt - Python 3.9 to JavaScript compiler - Lean, fast, open! -
kroki - Creates diagrams from textual descriptions!
ElectronVisualized - Public Archive: Beautiful and Elegant Quantum Mechanics Visualization.
Franklin.jl - (yet another) static site generator. Simple, customisable, fast, maths with KaTeX, code evaluation, optional pre-rendering, in Julia.
mt63_wasm - MT63 encoder and decoder in WebAssembly
obsidian-mathlinks - An Obsidian.md plugin to render MathJax in your links.
tinywasi - A tiny WASI runtime written in TypeScript
symbolic - A Symbolic Package for Octave using SymPy
Microsoft Automatic Graph Layout - A set of tools for graph layout and viewing
markdown-it-texmath - Support TeX math equations with your Markdown documents.
node-clinic - Clinic.js diagnoses your Node.js performance issues