Stream: show and tell

Topic: roc + htmx example webb app


view this post on Zulip Luke Boswell (Feb 18 2024 at 07:24):

roc-htmx-playground is an example web app using roc and htmx.

I've been using it as a way to test ideas and develop features for roc-lang/basic-webserver.

You are welcome to tinker with it and add features or provide any feedback. I don't have any plans, just adding the next feature that pops into my head, and refactoring as I find things I don't like or want to try differently.

view this post on Zulip Luke Boswell (Feb 18 2024 at 07:30):

Note -- I'm currently using a local copy of basic-webserver use this branch if you want to run this before there is a new release.

view this post on Zulip Hannes Nevalainen (Feb 18 2024 at 20:43):

Nice :) seems like a nice combo of tools to build a little app!

view this post on Zulip Luke Boswell (Feb 20 2024 at 10:04):

I thought I might try using ChatGPT 4 to help me build a new feature.

Most of the code in this commit is written by the LLM.

I had to clean it up a little because it thinks it's writing Elm, so things like case of or comments using --, but for the most part it generated valid roc first time -- particularly on the html view.

I cleaned it up a little as there was some minor inconsitencies in the error handling logic, and some code style. But was fun to do, and felt much faster than writing on my own.

Here's a demo of the new feature.

roc-htmx-1.gif


Last updated: Jul 06 2025 at 12:14 UTC