Better HN
topnewbestaskshowjobs
Log inSign up

jaredly

292 karma · joined Aug 9, 2013 (13y ago) · 44 submissions

https://jaredforsyth.com @jaredly@mastodon.social https://twitter.com/jaredforsth
Submissions

1.

Automate TypeScript Refactors with Dosido(jaredforsyth.com ↗)

1 points · by jaredly · 4mo ago · discuss

comment 1y ago · link · parent

Giving a real-world complex ambiguous scenario to 14 different Agent LLMs

3.

A Practical Comparison of AI Coding Agents(jaredforsyth.com ↗)

1 points · by jaredly · 1y ago · 1 comment

comment 3y ago · link · parent

So the "repo" in this case is a database, where currently the only things stored are denormalized source tree nodes. I could imagine extending the database to support arbitrary assets, probably also addressed by the hash of their contents (same as top-level language definitions are).

comment 3y ago · link · parent

Oh hi kevin! So if there's a possibility that the "extra data" would get out of sync with the "source code" (e.g. via a git merge, or someone just editing the source code as plain text), then it unfortunately breaks the guarantees that this system needs :( I guess I could store a sha of each and fail loudly if I detect that one was edited "outside of the IDE" but again I think that would break the assumptions that git makes about diffs &c. I've tried to go down the "text but nicer" route before, and it always comes up short; so now I'm trying "text is not a supported representation" we'll see how far I get.

comment 3y ago · link · parent

Hm so it is a state machine, but (my hope is that) all state transitions are simple and direct (and observable!) outcomes of user action. If the transitions get at all complex or unobservable, I'll probably call it a failed experiment.

It might also end up being the case that users keep types "visible" at all times, only turning them off in certain situations. I can also imagine a flag to "only hide inferred types that are primitives" or something similar.

comment 3y ago · link · parent

So I think "easy to mentally model" gets harder and harder to achieve as the type system becomes more powerful. If your conclusion is that we keep the type system limited in power, that's valid! but not what I'm exploring.

Another point that I failed to make in the post (thanks for the pushback!) is that type inference algorithms leave you high & dry in the presence of a type error. Then you're left with lots of hidden state (the internal steps the algorithm took before arriving at the error) and the final conclusion, which, if you're lucky, points you to two places in the code where the inferred types are in disagreement.

With my proposed system, all types are annotated all the time (to be shown or hidden via editor flag, or on hover), and the annotations are updated in response to actions taken within the editor. The "algorithm" becomes extremely simple, with almost no intermediate steps.

Of course, proof will be in the pudding, if I can actually achieve a pleasant editing experience :)

comment 3y ago · link · parent

Yeah, it is definitely nice to have inferred types surfaced to you, but in these systems they are still re-computed on every textual edit, as opposed to being "sticky" (persisted in the source tree).

comment 3y ago · link · parent

Source control does look very different in a projectional language, as git diffs no longer make much sense (viewing a pull-request with the source tree's JSON blob is essentially useless).

Unison is the language that's gone farthest with this, as far as I know; their solution to diffs & merges is to handle everything from within their CLI, bypassing git entirely. I imagine I'll do something similar.

10.

Type Inference That Sticks(jaredforsyth.com ↗)

67 points · by jaredly · 3y ago · 36 comments

11.

Evaluating GunJS as a local-first database(jaredforsyth.com ↗)

27 points · by jaredly · 6y ago · discuss

12.

VeoLuz: Generative art toy that visualizes photon paths, built in rust+reasonml(jaredforsyth.com ↗)

5 points · by jaredly · 7y ago · 1 comment

13.

Deploying Native Reason/OCaml with Zeit's Now.sh(jaredforsyth.com ↗)

1 points · by jaredly · 8y ago · discuss

comment 8y ago · link · parent

Convergent evolution :) I made the version version of Gravitron in 2006

comment 8y ago · link · parent

I haven't optimized it for mobile browsers, but it wouldn't be hard. Was pretty heads down on getting mobile native out the door.

comment 8y ago · link · parent

In the game, the only place I check the platform is to see how big I should make the screen (like 3 lines). Everything else is shared! The big news here is that you can use a single codebase (and a nice advanced language like ocaml), and deploy to 4 platforms. The framework I'm using is called "reprocessing", which is a ~port of the "processing" language to OCaml, targetting OpenGL. It abstracts out the different platforms.

17.

Making a cross-platform mobile game in Reason/OCaml(jaredforsyth.com ↗)

170 points · by jaredly · 8y ago · 24 comments

18.

Migrating to a Mobile Monorepo for React Native(engineering.khanacademy.org ↗)

1 points · by jaredly · 9y ago · discuss

19.

Detecting unused styles in JavaScript with `babel-traverse`(jaredforsyth.com ↗)

1 points · by jaredly · 9y ago · discuss

comment 10y ago · link · parent

much more readable transpiled output, really nice (and getting nicer) FFI to javascript. but it doesn't interface with existing ocaml stuff as well (doesn't use `.cmo/.cma` so it needs to compile everything from source afaict)

comment 10y ago · link · parent

lots to look into, thanks!

comment 10y ago · link · parent

looks neat!

comment 10y ago · link · parent

right. should have "(by convention)" in there. unfortunately not (yet) language enforced.

comment 10y ago · link · parent

1) I see om/next attacking the same problems as falcor and relay, and david nolen makes reference to both of them (as sources of inspiration) in the talks he's given.

2) it may only hurt once a day/week once you have an established flow going, but when trying to figure things out & start things up, you restart a lot more than that. hence the barrier to entry

comment 10y ago · link · parent

I just listened to this podcast[0], and there's a really great discussion in there about when it's nice to have types, and when it's more trouble than it's really worth.

That's why javascript's flow[1] appeals to me so much, and I'm really interested in core.typed.

[0] http://giantrobots.fm/172 [1] http://flowtype.org

comment 10y ago · link · parent

I was going to have a section on Elm, and then the post got too long :) Clojure(script) feels much more mature, and general-purpose. Elm is client-only, not nearly as many libraries, etc.

Would clojure's readability be helped by having a non-lisp pretty-printer? I've been thinking about this a bit - s-exps are great for writing, but fails to take advantage of our advanced visual pattern matching when reading it.

comment 10y ago · link · parent

Awesome! Thanks, I've been looking around for good projects to check out and hack on.

comment 10y ago · link · parent

thanks! Yeah, I'm really excited about clojurescript, but there is a big barrier to get over. I'm working on it, and hope to report back :)

29.

What Holds Me Back from ClojureScript(jaredforsyth.com ↗)

107 points · by jaredly · 10y ago · 53 comments

12