←back to thread

212 points todsacerdoti | 1 comments | | HN request time: 0.218s | source
Show context
williamcotton ◴[] No.46004377[source]
I've been working on my own web app DSL, with most of the typing done by Claude Code, eg,

  GET /hello/:world
    |> jq: `{ world: .params.world }`
    |> handlebars: `<p>hello, {{world}}</p>`
  
  describe "hello, world"
    it "calls the route"
      when calling GET /hello/world
      then status is 200
      and output equals `<p>hello, world</p>`
Here's a WIP article about the DSL:

https://williamcotton.com/articles/introducing-web-pipe

And the DSL itself (written in Rust):

https://github.com/williamcotton/webpipe

And an LSP for the language:

https://github.com/williamcotton/webpipe-lsp

And of course my blog is built on top of Web Pipe:

https://github.com/williamcotton/williamcotton.com/blob/mast...

It is absolutely amazing that a solo developer (with a demanding job, kids, etc) with just some spare hours here and there can write all of this with the help of these tools.

replies(5): >>46004648 #>>46004743 #>>46005872 #>>46005982 #>>46006162 #
shevy-java ◴[] No.46004743[source]
That is impressive, but it also looks like a babelfish language. The |> seems to have been inspired by Elixir? But this is like a mish-mash of javascript-like entities; and then Rust is also used? It also seems rather verbose. I mean it's great that it did not require a lot of effort, but why would people favour this over less verbose DSL?
replies(2): >>46005045 #>>46011174 #
1. AdieuToLogic ◴[] No.46011174[source]
> The |> seems to have been inspired by Elixir?

This is an infix operator commonly used to define the Thrush combinator, which transcends Elixir (or any other programming language). It is effectively:

  f (g (x)) = g (x) |> f