Skip to content(if available)orjump to list(if available)

Sketch-Programming: A Minimalist Paradigm for Code Design

Garlef

Not sure if that Readme is enough to explain an LLM what to do

I get the idea but I'm not sure if I want to spend the time to fill in the gaps and start an experiment

But I agree with the idea in general: Using informal DSLs as an intermediate language.

I'm not sure, though, if this approach (reduced syntax) is the right one.

jasonthorsness

The nice thing is that the DSL can be informal as you said - it does not need to be rigorously specified, nor does it need to be rigorously followed by the user. I’ve had good success prompting LLMs with pseudo-C and switching right in the middle to just English, and it just goes along with it. You can sort of invent the DSL as you go along at whatever level of control you need.

kfarr

Agreed, sometimes I’ll ask Claude to chat using psuedocode before writing actual code, works fine for me.

thorax

I really like the spirit! This sort of concept was one of the first things I wanted to explore with a spiritually adjacent project (cataclysm). It's been a bit, so I need to take time to update the python JIT generation now that we have much better coding models, but I'm a big fan of this sort of abstraction. https://github.com/Mattie/cataclysm

As most of us here can see, for many tasks now you don't really need to worry that you have the exact right syntax. I think you still need expert precision when it matters immensely, but we all develop tools, scripts, layers and the like that manual precision isn't necessary.

knighthack

I lost confidence completelythe moment I saw that the example code was with React.js.

Immediately felt like one of those disposable framework ideas.

mock-possum

The thing is, for me, writing a bit of vanilla JavaScript is already a sketch - you can very quickly throw together a working prototype, using actual code that doesn’t need to be compiled or run through an LLM to be made functional - you can literally just drop it into an empty .html page and drag it to the browser, or pop open a codepen, or run it with node, and I’ll just work immediately.

This idea of using an intermediate step, where you write non-functional code, just seems like an extra hoop to jump through.

And when you’re ready to progress towards a production-ready solution, you’re looking at upgrading existing code, rather than transcribing or translating this other sketch code stuff.

Idk. If it works for you then it works, but for me, this seems like more work than it’s worth.

lelanthran

Either this is not yet baked enough to explain or the authors were aiming for humor.

> Sketch can be implemented in any programming language...

... as long as it is react.js?

davely

The example was in React but I don’t see how that prevents potentially using this with other frameworks or languages.

That said, I feel like this is learning something like CoffeeScript. You have to learn all this language specific syntax (though simplified), why not just learn the language itself at that point?