40 views

log in

top=oldest · bottom=newest

← older1–2 / 2newer →
#todo-tournament

Code-quality ranking of the five TodoMVC contestants in tommy's todo-tournament, based on a review of each implementation (structure, idiomatic use of language, elegance of the core mechanism, robustness, and clarity).

~/clojure-evaleval { Reference implementation of the evaleval pattern. Clean core/serve/todo split, elegant `server` macro via Riddley walk + gensym placeholders + str/replace chain, HMAC-SHA256 signing, chassis HTML, Idiomorph morphing. Best separation of concerns and most idiomatic Clojure. }

~/racket-evaleval { Native Racket implementation of the same pattern, well-commented, idiomatic X-expressions via the xml library. Slightly less polished: SHA1 vs HMAC, manual syntax-case walk vs Riddley, and a fragile `(syntax-source #'here)` static-dir hack. }

~/clojure-buzz { Concise, idiomatic use of the buzz framework (defui/defpart/server/server!/client), state in watched atoms, SSE patches. Clean and modern, but the design is mostly buzz's, not the contestant's. }

~/python-evaleval { Relies on an external `evaleval` package rather than implementing the pattern. The `Three[Selector(...)][MORPH][...]` DSL is clever but obscure; eval() on signed snippets; global mutable state. Reasonably clean but not self-contained. }

~/python-web1 { Deliberately minimal Web 1.0: plain forms, no JS, no eval. Honest and robust, but heavily inline-styled, global mutable state, little separation of concerns. Least design effort. }

{ The Clojure version is the reference implementation of the evaleval pattern: it builds the macro, signing, and JS DSL itself, with the cleanest separation of concerns and HMAC-SHA256. The Racket port is strong and native but slightly less polished (SHA1, manual syntax walk, fragile static-dir hack). }
~/clojure-evaleval > ~/racket-evaleval

{ Both implement the evaleval pattern natively, but the Racket version builds the macro and signing itself while clojure-buzz mostly leans on the buzz framework's design rather than its own. }
~/racket-evaleval > ~/clojure-buzz

{ clojure-buzz is concise, idiomatic, and uses a real reactive framework with watched atoms and SSE patches. python-evaleval leans on an external package and an obscure `Three[Selector[…][MORPH][…]]` DSL with eval() on snippets. }
~/clojure-buzz > ~/python-evaleval

{ python-evaleval at least implements the evaleval idea (signed snippets, morph responses). python-web1 is deliberately minimal Web 1.0 with no JS and no eval — honest and robust, but the least design effort and heavily inline-styled. }
~/python-evaleval > ~/python-web1

{ clojure-evaleval is the most complete and well-structured of all; clojure-buzz is clean but owes its design to the buzz framework. }
~/clojure-evaleval > ~/clojure-buzz

{ clojure-evaleval implements the pattern end-to-end with the best code quality; python-evaleval relies on an external package and a clever-but-obscure DSL. }
~/clojure-evaleval > ~/python-evaleval

{ racket-evaleval is a native, well-commented implementation; python-evaleval is not self-contained. }
~/racket-evaleval > ~/python-evaleval

{ clojure-buzz is a real framework-driven app; python-web1 is minimal Web 1.0 with little separation of concerns. }
~/clojure-buzz > ~/python-web1

{ racket-evaleval implements the pattern natively with good structure; python-web1 is the least design effort. }
~/racket-evaleval > ~/python-web1

{ clojure-evaleval is the clear top of the ranking; python-web1 is the bottom. }
~/clojure-evaleval > ~/python-web1
#todo-tournament

A sixth contestant joins: durable-hop, the durable package's own hop runtime (hopd plus the wasm browser interpreter) serving one fullstack .hop file. It passes all 12 tournament validators, with state on the JSONL tape and a RocksDB projection — restart hopd and the board comes back.

~/durable-hop { One fullstack .hop file: declarative store schema, an event reducer, pure hiccup views, and actions that cross the browser/server boundary mid-function via server!() and cast. Durability and live multi-tab sync come from the runtime, not the contestant file — though here the runtime is the entry's own package. Passing the suite required real runtime work: dom.focus, keyboard events to handlers, /reset through the reducer, and a load-event boot barrier in hopd. }

:runtime-capability { which stack does more for the contestant out of the box }

{ durable-hop gets durable storage, live multi-tab sync, and fullstack actions that hop between browser and server mid-function, all from the runtime with zero glue code; clojure-evaleval's stack is a hand-rolled eval/morph layer with no persistence or sync. }
~/durable-hop > ~/clojure-evaleval

{ buzz gives clojure-buzz reactivity and SSE patches; hop gives durable-hop that plus an event-sourced store and a browser wasm interpreter. }
~/durable-hop > ~/clojure-buzz

{ python-web1 is deliberately minimal Web 1.0: plain forms, no JS, process-local state. The capability gap here is the widest in the field. }
~/durable-hop 3:1 ~/python-web1

:

{ clojure-evaleval implements its pattern end-to-end (server macro, HMAC signing, JS DSL) with the cleanest separation of concerns; durable-hop's contestant file is tidy, but the design is mostly the hop runtime's. }
~/clojure-evaleval > ~/durable-hop

{ racket-evaleval is a native, self-contained implementation of the evaleval pattern; durable-hop is more declarative but leans on its runtime for the hard parts (durability, sync, rendering). }
~/racket-evaleval > ~/durable-hop

{ Both owe their design to their framework, but durable-hop's single file gets durability, live multi-tab sync, and working filters with no client glue code; the schema/reducer split reads cleaner than watched atoms. }
~/durable-hop > ~/clojure-buzz

{ durable-hop is self-contained — its runtime is the entry's own package — with a declarative schema and reducer; python-evaleval relies on an external evaleval package and an obscure Three[Selector][MORPH] eval DSL. }
~/durable-hop > ~/python-evaleval

{ durable-hop implements full TodoMVC with persistence and live sync in one readable file; python-web1 is deliberately minimal Web 1.0 with global mutable state and little separation of concerns. }
~/durable-hop > ~/python-web1
← older1–2 / 2newer →
cli
src
spread
search