calculang
Mermaid
calculang | Mermaid | |
---|---|---|
5 | 90 | |
39 | 3,584 | |
- | 3.2% | |
2.9 | 9.1 | |
4 days ago | 6 days ago | |
JavaScript | TypeScript | |
GNU Affero General Public License v3.0 | 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.
calculang
- Show HN: Open-source, browser-local data exploration using DuckDB-WASM and PRQL
-
Dynamic programming in Haskell: automatic memoization
I develop calculang, a language for calculations. It converts concise formulae into Javascript.
Since calculation formulae are usually inherently pure, a `--memo` flag to the compiler memoizes the lot.
Many of my models are written in this recursive style and only work because of memoization. Sometimes other tricks are needed e.g. careful ordering of the calls, so that the memo is available before the stack breaks.
My first calculang example is a bouncing ball: the position at t depends speed and the position at t-1. With loops we'll usually discover the same thing, but it's so much harder to follow.
First-class memoization to proliferate this style is a really neat thing.
[0] https://github.com/calculang/calculang
[1] bouncing ball code: https://github.com/declann/calculang-miscellaneous-models/bl...
[2] bouncing ball initial post: https://observablehq.com/@declann/calculang-bouncing-ball?co...
[3] if you can tolerate my slow-load WIP devtools and are on a Desktop, this is better, with buttons to navigate through the model development (only some of which are working now!): https://models-on-a-plane.pages.dev/stories/bounce/
-
AI intensifies fight against ‘paper mills’ that churn out fake research
My instinct about numbers (i.e. incl. statistics) is that they should be reproducible: on-demand, with results and workings easily subjected to interrogation.
In reality in many fields - my experience is in finance, but also in science - calculations are scattered across different languages and systems. This adds friction to any process about reproducing, understanding, analysing numbers.
This is some motivation for calculang, a language for calculations I develop. https://github.com/calculang/calculang
For the HN crew it's an under-development(!) functional language with properties to permit flexible designs that can scale. It's for numbers and if you share the model alongside your numbers people can check them according to the model and see the workings.
It goes well with visual number [dev/person]tools that I will release one of soon, and in the future watch for a browser extension for the workings behind numbers you are reading.
Important, it won't address the raw data part of the problem, but where numbers following from that are concerned, it might get closer to that instinct.
-
Ask HN: Those making $0/month or less on side projects – Show and tell
I'm developing calculang, a language for calculations: https://github.com/calculang/calculang
I've made some examples here: https://observablehq.com/collection/@declann/calculang
Some tooling work for visualizations and for showing the workings will be released in the next weeks.
There are no positive money flows; I've spent many years experimenting, developing, and now 1 year after a public release the twitter page where I make announcements has 24 followers: https://twitter.com/calculang
I'm a modelling consultant - I work with numbers, I think they should be simple, but they are disjointed across systems and entities and programming languages and spreadsheets. The friction accumulates everywhere: to get a simple result, to follow the workings, to do any analysis, to share one or the other.
-
How to store your app's entire state in the url
I'm developing more tools to these ends, via my overarching project calculang, a language for calculations [1].
I also have a loan/repayment validator [2] but haven't added this QR code feature yet.
Bank letters e.g. "Interest rates are rising and now we want 100e more per month, every month" could use a QR code to an independent validator or to see the workings behind the 100 calculation.
Not using this in the real world now and there are security considerations to keep in mind, but reading state from a URL facilitates the usecase, QR codes that link physical numbers to their calculation and model.
Implementation of payroll calculator is an Observable notebook and thankfully it neatly supports all my strict requirements as a QR code demo.
[0] https://observablehq.com/@declann/payroll-playground-ireland...
+Feature tweet: https://twitter.com/calculang/status/1608183731533107206
[1] https://github.com/calculang/calculang
[2] https://observablehq.com/@declann/loan-validator-dev
Mermaid
- Conquering System Design Diagrams: My Shift to Mermaid.js
- Mermaid Live Editor
- Mermaid Chart, a Markdown-like tool for creating diagrams, raises $7.5M
-
Using Mermaid JS to generate a diagram from Power Automate
Mermaid JS is a tool that lets you create diagrams and charts such as flowcharts, sequence diagrams, Gantt charts using simple text commands. It works by converting your text commands into a graphical representation that you can customize and share. https://mermaid.live/
- FLaNK Stack Weekly 22 January 2024
-
LLMs and Programming in the first days of 2024
I'm not OP, but I just ask GPT to turn code or process or whatever else into a mermaid diagram. Most of the time I don't even need to few-shot prompt it with examples. Then you dump the resulting text into something like https://mermaid.live/ and voilà.
-
Open-source drawing tool – Excalidraw
I like excalidraw for live discussions but if I want to make more detailed or better looking diagrams, I really enjoy these two tools:
- For drag-and-drop/WYSIWYG, I really like DrawIO. They have a web version https://app.diagrams.net/ but I strongly recommend the desktop version https://github.com/jgraph/drawio-desktop/releases/
- For text-as-diagram, I think Mermaid wins this by default since GitHub added markdown support for these: https://mermaid.live/ (This was github's announcement https://github.blog/2022-02-14-include-diagrams-markdown-fil... )
-
I lost a full day's work thanks to Mermaid.
After hours without being able to solve this problem, I decided to make the chart directly in Mermaid's live editor and export it to PNG and SVG. The big problem is that the letters are still too small, the quality of the PNG is very low, and the SVG only works on the web, not with other applications like PowerPoint and Inkscape.
-
Nomnoml
You can export to PNG and other formats in the Mermaid editor https://mermaid.live/
-
Creating mindmaps with ChatGPT
Copy paste code here: https://mermaid.live
What are some alternatives?
summonscript - Manifest manifold models with magical machinations.
plantuml - Generate diagrams from textual description
CozeJS - Coze Javascript - cryptographic JSON messaging specification
kroki - Creates diagrams from textual descriptions!
graphic-walker - An open source alternative to Tableau. Embeddable visual analytic
obsidian-releases - Community plugins list, theme list, and releases of Obsidian.
URLFormJS - URLFormJS - Create sticky forms, stateful applications, and shareable links.
golang-nextjs-portable - Go program with embedded Next.js app.
sveltekit-search-params - The easiest way to read and WRITE from query parameters in sveltekit.
DrawThe.Net - drawthe.net draws network diagrams dynamically from a text file describing the placement, layout and icons. Given a yaml file describing the hierarchy of the network and it's connections, a resulting diagram will be created.
u - μ is a JavaScript library for encoding/decoding state (JavaScript object) in URL
wavedrom - :ocean: Digital timing diagram rendering engine