HN user

sritchie

1,029 karma

I hack Clojure and Scala. Formerly Twitter, formerly Stripe. Founder of PaddleGuru and RacehubHQ.

Blog: https://samritchie.io

[ my public key: https://keybase.io/sritchie; my proof: https://keybase.io/sritchie/sigs/_TS462cmjfImFbiWim_Fn5sGsIBqvrf20BpHEYUnNt0 ]

Posts27
Comments91
View on HN
github.com 6mo ago

Hydra: A system for building 3D Scene Graphs from sensor data in real-time

sritchie
3pts0
reality.mentat.org 3y ago

Road to reality – executable essay

sritchie
87pts15
emmy.mentat.org 3y ago

(Literate) Numerical Differentiation in Clojure

sritchie
1pts0
github.com 3y ago

MathBox: Presentation Quality WebGL Math Graphing

sritchie
27pts2
jsxgraph.mentat.org 3y ago

Show HN: JSXGraph.cljs, Interactive Geometry in ClojureScript

sritchie
2pts0
press.princeton.edu 4y ago

Visual Differential Geometry and Forms: A Mathematical Drama in Five Acts

sritchie
3pts0
dmrthesis.net 5y ago

DMR's Thesis: Unpacking an Enigma

sritchie
53pts13
www.youtube.com 6y ago

Bill Ritchie on DMR's Early Influences

sritchie
1pts0
github.com 6y ago

Show HN: Caliban, dead-easy Dockerized research workflows locally and on Cloud

sritchie
6pts2
www.eurekalert.org 7y ago

Artificial intelligence speeds efforts to develop fusion energy

sritchie
5pts0
www.washingtonpost.com 7y ago

A Seattle TV station aired doctored footage of Trump’s Oval Office speech

sritchie
2pts0
www.samritchie.io 11y ago

Cascalog 2.0 in Depth

sritchie
2pts0
om-bootstrap.herokuapp.com 11y ago

Om-Bootstrap – Bootstrap 3 Components in Om and ClojureScript

sritchie
5pts0
github.com 11y ago

Haskell Distributed Stream Processing with Exactly-Once Semantics

sritchie
3pts0
sritchie.github.io 12y ago

RESTful Clojure with Liberator + Friend

sritchie
2pts0
blog.twitter.com 12y ago

Streaming MapReduce with Summingbird

sritchie
20pts0
groups.google.com 12y ago

iPhone, meet Haskell

sritchie
373pts48
medium.com 13y ago

Investing in STEM is Old School

sritchie
1pts0
github.com 13y ago

Storehaus from Twitter

sritchie
37pts4
github.com 13y ago

ANN: Bijection 0.3.0, now with Injections

sritchie
1pts0
github.com 13y ago

Kickass Bijections in Scala (from Twitter)

sritchie
5pts0
nakkaya.com 14y ago

Distributed Buddhabrot Fractal in ClojureScript

sritchie
17pts2
github.com 14y ago

How to write Koans for any Clojure library

sritchie
1pts0
www.youtube.com 14y ago

Happy Birthday, Dennis Ritchie (from Penn Jillette)

sritchie
10pts1
cm.bell-labs.com 14y ago

Lesser-Known Dennis Ritchies

sritchie
116pts2
sritchie.github.com 14y ago

Getting Creative with MapReduce

sritchie
58pts7
sritchie.github.com 14y ago

Cascalog 1.8.1 released

sritchie
2pts0

Hahah, I just have to reply and say I loved the original comment and was happy for the laugh. Obviously this is the answer to the riddle of

Given a 3-liter container and a 5-liter container, both initially empty, and access to tap water, how can you measure exactly 4 liters of water without using any additional containers

I've offered and received some convoluted metaphors recently, love leaning hard into this one.

I think the idea is that you performed the exercise to create stress that you want your body to respond to by getting stronger / more aerobically fit etc in some way. So by icing, yes, you recover better, but by reducing the stress you reduce the adaptations.

Imagine you could perfectly recover with some intervention. Then weight lifting no longer works!

For examples like the ones you listed, peak performances where you’re not concerned about gainz and maybe even have to perform again soon after, it makes a lot of sense to do anything to recover quickly.

That note in the docs is from a time when Emmy only ran on the JVM. Now Emmy runs in JS in a browser (see my top level comment for demo links) which I would argue is even easier.

Also the MIT scheme install was historically quite hairy and not supported on M1 Macs, for example.

I’ll update the docs here. Thanks!

Hey Taylor, thanks for posting these!! I'm still working on the airplane... it's a Vans RV-10, and now out at the hangar and maybe 98% complete, one more full-time month of work that I need to carve out so I can fly it by this summer.

Co-author of Emmy here, happy to answer any questions!

Point well taken from tonyarkles that on-boarding and docs need work. My big goals for this project were:

1. finish a 100% port of Gerald Sussman's scmutils algebra system into the browser via ClojureScript (I'm at ~98% or so?)

2. attach a 2D and 3D visualization system, and use the very-high-level physics abstractions to generate fast, interactive animations

3. make this all editable in the browser

4. write a ton of physics lessons and essays using the system

1-3 are all done, 4 is going to happen, but job + young twins are slowing me down now.

The easiest way to play with 1-3 is via the demos I shared at Strange Loop this past year, all of which run in the browser.

The first two live in Maria.cloud, which has all of Emmy available on any page. So fork these, play and share:

- First-Class Visualizations: https://2.maria.cloud/gist/30dbb25a2d2eb7324e0aad1097c459ae

- MathBox + Emmy at Strange Loop: https://2.maria.cloud/gist/0405c3427c88326a181b307371f939bc

These live in an editable version of a Clerk notebook with a less-polished UI:

- Taylor Series: https://sritchie.github.io/strange-loop-2023/notebooks/stl/t...

- Dual Number Visualization: https://sritchie.github.io/strange-loop-2023/notebooks/stl/d...

- (p, q) torus knot: https://sritchie.github.io/strange-loop-2023/notebooks/stl/p...

- Phase Portrait of the Pendulum: https://sritchie.github.io/strange-loop-2023/notebooks/stl/p...

- Geodesics of a Torus: https://sritchie.github.io/strange-loop-2023/notebooks/stl/t...

- Geodesics Klein bottles: https://sritchie.github.io/strange-loop-2023/notebooks/stl/k...

- Animated Particle on an Ellipsoid: https://sritchie.github.io/strange-loop-2023/notebooks/stl/e...

I have reverse-mode (purely functional reverse mode at that!) sitting in a branch, and will get this going at some point soon. Even more fun will be compilation down to XLA, like JAX does in Python.

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.

What would you build / create / write if you had a web-enabled build of SICM (well, scmutils I guess) in hand? I'd love to hear more about your thoughts on how to build a community around these tools and ideas.

Thanks for the Emmy shout-out!

Clerk has been fantastic for rendering 2D and 3D... I just finished a 3D graphics API and am frankly blown away at how great Clerk made this experience.

Here are my recent 3D rendering "tester" Clerk notebooks (over MathBox), for fun:

- https://emmy-viewers.mentat.org/dev/examples/manifold/pq_kno...

- https://emmy-viewers.mentat.org/dev/examples/mathbox/functio...

- https://emmy-viewers.mentat.org/dev/examples/manifold/fdg

- https://emmy-viewers.mentat.org/dev/examples/manifold/pq_kno...

And another Clerk notebook with a bunch of calculus etc in 2D scenes, over Mafs.dev:

- https://emmy-viewers.mentat.org/dev/examples/mafs

I covered this in a few of the comments above... the project was initially completely aimed at the R2R book, and I expect to get back to it. I'll add more background to the project page soon!

Thank you! I had "dependencies between notebooks" and "collaborative mode"... the first one's covered here but I still don't know how to handle some Google Docs-style flow on these.

I would really like to publish essays like this in an environment like Maria: https://2.maria.cloud/curriculum/clojure-with-shapes , with the ability to duck out to my own editor when I'm ready to graduate.

I'm happy to talk more about this if you like!

It's not just you! The last thing I want is a WTF from Penrose...

This was just an oversight from me trying to cram in too much writing, and I'll fix it tonight once the kids are down. I explained the intended connection in a different comment — basically I started the newsletter with the goal of reading Penrose's book, doing all the exercises and trying to build out a community reading it together.

But my notes were just as confusing as the book, so I spent 3 years working on a port of Sussman's computer algebra system and sewing it together with this notebook engine, MathBox for 3D rendering, Mafs, Leva, MathLive, and JSXGraph and Reagent for a declarative way of sharing state between everyone.

Then I pieced it all together in this essay, tried to keep it concise, and blew it by not filling in the whole genesis story and GOAL of following Penrose.

I'll add that, and I will cover chapters of the book too!

I think you make a great point about adding even further abstraction. I was inspired by Michael Nielsen's idea of "Discovery Fiction"[0], and porting the Sussman library gave me the idea that building the abstraction layers required to to do the physics in "Structure and Interpretation of Classical Mechanics" would make for a great narrative backbone.

I DID start the newsletter thinking I would read Road to Reality and get a community going around the book, and I still want to do that! What happened there was when I tried to talk about the book to anyone that wasn't already dialed on the math I was learning (close family, my wife, software engineer friends) I found that I couldn't communicate what I thought was so beautiful about the book and Penrose's development.

I wanted interactive visualizations that could run in the browser to function as little set pieces, so I could set them down and say

- look, this is what I mean!, and

- Here, you take the controls, let's play!

TRTR will come in, mixed in, I hope, with executable Feynman Lectures etc...

Hopefully that helps fill in some context that I left out!

[0]https://michaelnotebook.com/df/index.html

Sorry, of course you're right on "Secondly". The right construction is ω, ω∪{ω}, ω∪{ω}∪{ω∪{ω}}...

For the first point, I went through the book long enough ago that I can't rebuild the proof here, but iirc the more rigorous idea is that you can construct a bijection between 1+ω and ω given the recipe I had above for how to represent numbers as sets, but you can't do it for ω+1, which is bijective with ω∪{ω}. The axiom of infinity declares that ω itself is a set, opening the door for transfinite numbers.

Better?

It's the latter; I'm also not a mathematician, just a guy who worked through Halmos's "Naive Set Theory" in intense detail...

But your question actually hints at my most profound takeaway from that whole book. I think what you're saying is right, AND that foundations-of-mathematics folks spent a long intense period searching for different set theory axioms that did NOT lead to transfinite numbers. But anything anyone could come up with that included "the axiom of infinity" led to transfinites leaking in.

Which begs the question of how to think about these things. Are they "real"? Are they an oddball side effect that we shouldn't take seriously?

I think you've arrowed right to the philosophical heart of all of this.

It follows from the way addition is defined on top of set theory. "a + b" is implemented as "increment a (the set that represents a) b times".

A number is represented in set theory as a set that contains all of the numbers before it. 0, 1, 2 is {}, {{}}, {{} {{}}}...

SO! If you start with a finite "a" and increment it infinite times, you still have infinity; you haven't broken out.

But if you start with Infinity, then adding anything to it gives you {Infinity}, {Infinity {Infinity}}, etc...

Transfinite addition is not commutative!

Orbital Mechanics 3 years ago

Better yet, keep proper definitions and equations and then drive interesting animations from "real deal" code!

I've been working for a couple of years on a computer algebra system written in Clojure (named "Emmy") designed for writing this like. It's a port of Gerald Sussman's scmutils library, plugged in to a bunch of modern graphics libraries.

Here are a few examples, shamefully lacking exposition since much of this is JUST working and I was powering through demos for a talk:

- particle in a quartic potential well: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- Phase Portrait of the Pendulum: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- Colin's torus geodesics: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- Taylor Series https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- (p, q) torus knot: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- Dual Number Visualization: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

I'd love a textbook like the one you link above with figures that feel almost like Kerbal games, powered by the real code in the book that is ALSO generating the math you see.

See https://github.com/mentat-collective/emmy for more information if this is interesting.

I think Steven Wittens’s work at acko.net and https://usegpu.live/ is your best bet here. I’ve been working for a couple of years on building a computer algebra / physics system in Clojure and integrating it with Steven’s previous work on MathBox, with some in-progress demos like this:

https://emmy-viewers.mentat.org/dev/examples/simulation/quar...

https://emmy-viewers.mentat.org/dev/examples/simulation/toro...

Use.GPU looks like it will be close to a drop-in replacement for MathBox, running on WebGPU. Maybe someday I’ll actually be able to build my general relativistic ray tracer, with explorable symbolic physics all the day down…

Iirc what makes rollers so tough is that the contact patch is much shorter on the roller than on the road, so the wheel turns more easily. Your reactions need to be that much quicker.

I had a winter of long roller rides (3.5 hours was the longest) and by the time I hit the road again I could ride on the white line with no effort. I think the dynamics are the same, just higher stakes on the rollers!

Given Wolfram’s writing on computational essays, I don’t understand why he doesn’t publish essays like this as Mathematica notebooks, so we could play with the automata or fork the essay and explore or respond.

Publish the export, of course! But what a great chance to push the computational essay idea with a notebook export too.