You are viewing archived messages.
Go here to search the history.

Paul Tarvydas 2024-12-09 09:10:55

I've implemented a rough-in of a VHLL (Very High Level Language) and used it to write a non-trivial program (a mutual multi-tasking kernel that does message passing, about 1,400 LOC). It generates Python, Common Lisp and Javascript (node.js) code, essentially using existing languages as assemblers. This uses a variety of techniques, including a DPL (diagrammatic programming language), t2t (text-to-text transpilation) and a jury-rigged REPL programming language workbench. Several mundane gotchas were wrestled down. Now, I'm wondering what direction to take this next. My thought is that this needs to run in a browser (Javascript, WASM?), but that exceeds my limited knowledge and will require going down new learning curves. Maybe I'm thinking too much inside-the-box? Comments (and help) appreciated. FWIW more detail: programmingsimplicity.substack.com/p/rt-now-what?r=1egdky which further references programmingsimplicity.substack.com/p/rt-transpiler?r=1egdky

Tom Larkworthy 2024-12-09 19:56:33

I used to use haxe.org and quite liked it and thought it might be useful for places where you need to maintain business logic in multiple places, e.g. web app + mobile app. There is still quite a frustrating part where you have to normalize external connections e.g. UI as no cross language thing can really do that. Haxe was a compelling type system and existed before Typescript. I think thats what motivated me, so I would like to understand more on what the language RT actually looks like.

Paul Tarvydas 2024-12-10 15:07:39

I understand your question to be: "how to do cross-language stuff?". My answer to portability is in this article.

[meta: is this answering your question?]

📝 Text-Based Portability

Towards Higher Level Syntax for Programming Languages 2024-12-10

Paul Tarvydas 2024-12-11 11:48:00

... I forgot to mention LLMS ... Steve Phillips created a new language that he calls Voltair (formerly called Phi). He created a compiler for it in about 8 hours by getting Claude 3.5 Sonnet to write code that maps Voltair to legal Go code (approx. 2000 LOC). Voltair programs now build and run, while the Go compiler does the heavy lifting of doing the actual compilation work. As I understand it, Phillips started out by getting Claude to write OhmJS code to do the mapping.

Tom Larkworthy 2024-12-09 20:05:45

Miniscule progress on an alternative notebook renderer that hacks the observable runtime to capture all the values. Behold, "foo" is rendered in two places! One of those places is a giant cells containing every other cell in the notebook.... that is what visualizer will be. A cell that renders the whole. So then the outer HTML frame will not actually provide any DOM nodes for the runtime to render into externally, the engine will start and visualizer will dynamically create DOM nodes to render the rest from the inside. An inversion, much more hackable that way.

Paul Tarvydas 2024-12-13 10:26:30

Incremental progress documenting writing of a DSL and generating code from it. A quick overview video...

programmingsimplicity.substack.com/p/2024-12-12-building-a-dsl-example?r=1egdk