←
Owen Lynch1,265 posts
Owen Lynch avatar

Owen Lynch

@u_map_prop

This is no longer an active account: see localcharts.org or @olynch@mathstodon.xyz for any updates.

◷ Joined December 2017▧ 104 Photos and videos
Owen Lynch avatar
Owen Lynch@u_map_prop·31 Aug 2024

This specific feature, the graph-rewriting, is enabled by the local mode that Yaron is talking about: it ensures that no reference to the graph escapes into the runtime of your app, so the graph can't be mutated after the startup of your app.

Owen Lynch avatar
Owen Lynch@u_map_prop·31 Aug 2024

So far, the only UI library I know that explicitly support Mealy machines, and that does a graph-rewriting pass to optimize how state propagates through your app.

Owen Lynch avatar
Owen Lynch@u_map_prop·16 Aug 2024

An addendum: there are of course other differences between zig and LISP, like the fact that zig gives you the tools to write "systems-y" code in a way that *most* LISPs don't. I say *most* LISPs, because there are some really cool LISPs that *do* do this! prescheme.org/posts/announci…

Owen Lynch avatar
Owen Lynch@u_map_prop·16 Aug 2024

And I'd also like to say: there are many programming languages out there! Many of them, if not all, have some unique features which will enrich your life (yes even Java and Go). Rather than dunking, try to understand why people are excited. Who knows, you might learn something!

Owen Lynch avatar
Owen Lynch@u_map_prop·16 Aug 2024

To conclude, I'd like to point to my library github.com/AlgebraicJulia/Co…, which simulates zig's comptime features in Julia using macros and Julia's @generated functions. Note that this really relies on Julia's type system to work. This would be much harder to do in scheme.

Owen Lynch avatar
Owen Lynch@u_map_prop·16 Aug 2024

It also has drawbacks: you can't change at all the meaning of zig's syntax, so you can't build DSLs in the way that you can in LISP. Of course, some see this as a benefit.

Owen Lynch avatar
Owen Lynch@u_map_prop·16 Aug 2024

Which, incidentally, is *not* a solved problem in the vast majority of LISPs; really only Racket's scope tags system solves this in a principled way, and that was *definitely* not known in the Kennedy administration.

Owen Lynch avatar
Owen Lynch@u_map_prop·16 Aug 2024

Using comptime as opposed to macros has a lot of benefits, because *conceptually*, it's not any different from just writing a normal program in a language like python that has type introspection. You don't have to think about things like variable hygiene.

Owen Lynch avatar
Owen Lynch@u_map_prop·16 Aug 2024

You could "implement an compiler in LISP macros" which did this, but it would be about as much work as writing the compiler from scratch in the first place.

Owen Lynch avatar
Owen Lynch@u_map_prop·16 Aug 2024

For instance, you can use this to unroll for loops, statically eliminate branching, and even introspect on the structure of types.