Stream: show and tell

Topic: roc-chat


view this post on Zulip Steve Howell (Nov 19 2026 at 18:09):

I have been working a chat server called roc-chat. It's based largely on a zig-based server that I have been running since April. I technically deployed it today, but it's still a little rough around the edges. I will invite folks in the next couple days.

view this post on Zulip Steve Howell (Nov 19 2026 at 18:09):

For now here is a taste of the code: https://github.com/showell/roc-chat/blob/main/app/GitHubSignUp.roc

view this post on Zulip Steve Howell (Nov 19 2026 at 18:11):

Both the original zig server and the new Roc server were written by Claude. I worked on Zulip for over a decade, so the server draws on Zulip influences to a minor degree. It has topics.

view this post on Zulip Steve Howell (Nov 19 2026 at 18:15):

Unlike Zulip, which does HTTP long-polling for live updates, the roc-chat program uses SSE (server sent events). It's live-update system is home grown but mildly inspired by things like datastar and htmx. It's pretty ordinary JS on the client side operating on mostly HTML payloads.

view this post on Zulip Steve Howell (Nov 19 2026 at 18:37):

Unlike Zulip, which has a zillion dependencies, my server is very slim:

Caveats, outside the code:

view this post on Zulip Anton (Nov 19 2026 at 19:31):

What an awesome real world Roc app Steve! It must be one of the biggest Roc projects out there.

view this post on Zulip Anton (Nov 19 2026 at 19:32):

I look forward to joining :)

view this post on Zulip Steve Howell (Nov 20 2026 at 12:06):

Anton said:

I look forward to joining :)

Thanks for the kind words!

You can join here: https://chat.lynrummy.com

You can either authenticate with your GH account (recommended) or ask me for an invite over Zulip DMs. Everyone here is welcome! The client's still a little rough. When you come on to the chat, feel free to send me DMs, even if it's just "Hi Steve, just popped on" or testing a feature like image uploads. Don't worry about spamming; that's the least of my concerns for now.

view this post on Zulip Steve Howell (Nov 20 2026 at 12:11):

pixelsprout has been on. Thank you!

view this post on Zulip Steve Howell (Nov 20 2026 at 14:25):

The chat server is 36k lines of Roc, which includes a lot of tests. I enforce a 500-line limit on Roc modules. I exempt all modules that are specs, as well as GitHubSignIn.roc, which is large but cohesive.

$ find . -name "*.roc" | xargs wc -l | sort -n | tail -10
    474 ./app/ConversationStream.roc
    475 ./app/Search.roc
    488 ./app/AgentsSpec.roc
    492 ./app/Html.roc
    495 ./app/ConversationRoute.roc
    496 ./app/GitHubSignInSpec.roc
    510 ./app/GitHubSignIn.roc
    531 ./app/PageSpec.roc
    812 ./app/HumanInvitesSpec.roc
  36545 total

view this post on Zulip Steve Howell (Nov 20 2026 at 19:39):

Unlike Zulip, roc-chat now supports color syntax for Roc.

You can try it here:

1) optional: ask me over DMs for an invite if you don't want to use Github oauth signin
2) sign in at https://chat.lynrummy.com
3) jump to any conversation with me or on the #general channel
4) post your favorite Roc code with a ~~~ roc fence.
5) report problems or suggestions to me there or here

view this post on Zulip Steve Howell (Nov 21 2026 at 02:26):

Anton said:

What an awesome real world Roc app Steve! It must be one of the biggest Roc projects out there.

It's the biggest Roc app I've written by 2x. The server piece in Roc is not the real challenge of writing a chat system, although it is important, so adversarial reviews would be helpful. A lot of the challenge for chat is product design (and I have my own taste on chat formed from a decade of using Zulip). All the visible pieces are more about JS choices than Roc choices. Roc would be more fun at scale, but chat communities don't challenge you on scale unless you make up problems that don't actually have to exist (cough Zulip cough).

For more details on the overall architecture see my Roc showcase page. Chat's at the top.

view this post on Zulip notramo (Nov 22 2026 at 12:26):

CSS is broken on the login page in Firefox:

view this post on Zulip notramo (Nov 22 2026 at 12:26):

image.png

view this post on Zulip notramo (Nov 22 2026 at 12:31):

Do you allow pentests? Only non-destructive.

view this post on Zulip Steve Howell (Nov 22 2026 at 12:34):

notramo said:

CSS is broken on the login page in Firefox:

How so? I agree it's pretty vanilla looking (I can fix that) but don't understand what's broken.

view this post on Zulip notramo (Nov 22 2026 at 12:34):

Is this the intended design?

view this post on Zulip Steve Howell (Nov 22 2026 at 12:36):

notramo said:

Is this the intended design?

It's the rough first cut. I just haven't given that part of the UI much polish, because you only hit it once. Any suggestions here? Aligning the fields would the first thing I'd do. I would probably center it and add a tiny more prose.

view this post on Zulip notramo (Nov 22 2026 at 12:36):

To avoid design work, I usually utilize a pre-made CSS UI toolkit. DaisyUI is my favorite: https://daisyui.com/

view this post on Zulip notramo (Nov 22 2026 at 12:37):

It has most of the work done, so even if I don't really put effort into design, it's still decent looking.

view this post on Zulip Steve Howell (Nov 22 2026 at 12:38):

You may pentest it.

You can probe the code as well:

https://github.com/showell/roc-chat/tree/main/app

view this post on Zulip Steve Howell (Nov 22 2026 at 12:39):

If you want to create multiple accounts, make the testing accounts clear, so I can remove them later to declutter the UI. Right now any user sees all other users.

view this post on Zulip notramo (Nov 22 2026 at 12:40):

Thanks. To be honest, I don't expect to find anything, Roc is very suitable for writing secure software.

view this post on Zulip notramo (Nov 22 2026 at 12:40):

But it's worth taking a look.

view this post on Zulip Steve Howell (Nov 22 2026 at 12:41):

It does have a zig platform underneath.

view this post on Zulip Steve Howell (Nov 22 2026 at 12:42):

You can grep for "dangerous" in the Roc.

view this post on Zulip Steve Howell (Nov 22 2026 at 12:43):

The Roc does create all the HTML from user input, so some types of exploits need careful attention in Roc itself.

view this post on Zulip notramo (Nov 22 2026 at 12:43):

It does have a zig platform underneath.

I'm not very familiar with low level vulnerabilities. I'm mainly a web developer, so I'll mostly look at the things in the browser.

view this post on Zulip Steve Howell (Nov 22 2026 at 12:44):

Every small thing is appreciated. :slight_smile:

view this post on Zulip Steve Howell (Nov 22 2026 at 12:55):

Regarding styling, apart from the login page, which has gotten no love, I prefer to style things myself with a pretty vanilla aesthetic. There's light mode and dark mode. I use almost no external CSS, because I hate how CSS bitrots and drifts. Instead, most of the styling is done thru small JS helpers directly on the DOM elements as they are created. Some things like hover effects are done with more CSS-like approaches.

view this post on Zulip Steve Howell (Nov 22 2026 at 12:57):

also mobile is more CSS-driven

view this post on Zulip Steve Howell (Nov 22 2026 at 12:59):

image.png

view this post on Zulip Steve Howell (Nov 22 2026 at 13:00):

image.png

view this post on Zulip Steve Howell (Nov 22 2026 at 13:02):

/poll What mode do people prefer?

view this post on Zulip Steve Howell (Nov 22 2026 at 13:02):

Right now dark mode is the default, even though I prefer light mode myself. When I worked on Zulip, we found out somewhat scientifically that people prefer dark mode.

view this post on Zulip Steve Howell (Nov 22 2026 at 13:05):

Incidentally, the code sample in the two screenshots is from roc-chat itself. Even though everything runs on top of zig's standard library HTTP server, the Roc code does real heavy lifting even at the HTTP layer.

view this post on Zulip Steve Howell (Nov 22 2026 at 13:12):

Oh, duh, I forgot you could do light/dark dynamically. This is another thing that gets neglected when you only do something one time haha. Dynamic light/dark is coming.

view this post on Zulip Steve Howell (Nov 22 2026 at 13:13):

Thanks notramo removewingman. I'm still curious what people prefer, actually. It will drive priorities to some extent. If everyone prefers dark mode, I will spend more time myself in dark mode. Unfortunately, that's really subjective, but I would spot at least some things.

view this post on Zulip Steve Howell (Nov 22 2026 at 13:14):

Fun fact: you can vote for multiple options in Zulip polls. I actually wrote the polling system to be more like a brainstorming widget.

view this post on Zulip Steve Howell (Nov 22 2026 at 13:15):

which worked perfectly just now :)

view this post on Zulip notramo (Nov 22 2026 at 13:16):

I recommend setting the default theme to automatic:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme

view this post on Zulip Steve Howell (Nov 22 2026 at 13:17):

That's what I already said I'm doing. :slight_smile:

view this post on Zulip Steve Howell (Nov 22 2026 at 13:18):

or I implied it, I suppose. but yeah, in progress

view this post on Zulip notramo (Nov 22 2026 at 13:18):

I tested it in devtools and browser settings, and it didn't change.

view this post on Zulip Steve Howell (Nov 22 2026 at 13:20):

The change hasn't been deployed yet. But the sun and moon icons should toggle now.

view this post on Zulip notramo (Nov 22 2026 at 13:25):

Where's the source?

view this post on Zulip notramo (Nov 22 2026 at 13:25):

You linked the safari app.

view this post on Zulip Steve Howell (Nov 22 2026 at 13:27):

Sorry, it's still early morning here: https://github.com/showell/roc-chat/tree/main/app

view this post on Zulip Steve Howell (Nov 22 2026 at 13:28):

notramo said:

You linked the safari app.

Fixed above too.

view this post on Zulip Steve Howell (Nov 22 2026 at 18:10):

I want to thank notramo for a thorough audit he did for roc-chat today. It found a couple serious bugs and many other flaws to address. All known issues are addressed on the production site. Fortunately, the site is mostly public or innocuous chat with very few users so far, but the audit led us to make important performance-related changes that will help at bigger scale.

view this post on Zulip Steve Howell (Nov 22 2026 at 18:14):

I had Claude do a writeup of the measures taken today to improve how my Roc code handles things: https://roc.lynrummy.com/security-idioms/

I think it will be of interest to anybody writing secure apps where Roc does any heavy lifting (roc-chat definitely fits the bill). Richard Feldman Claude makes the case that linear types would help roc-chat for some pretty key things. It's toward the top, under "What we'd ask of Roc".

Folks from yesterday's meeting may appreciate how we use "proofs" through various gates to ensure security. There's nothing as formal as Lean or anything, but the combo of Roc and Shale seems sufficient to me. As always, I would love code review on the key pieces of code here. The article embeds Roc snippets with GH links.

view this post on Zulip Richard Feldman (Nov 22 2026 at 19:03):

linear types sound like something for #ideas - I am skeptical that it turns out to be a good idea, but I'm open to listening to what the explanation is for the motivating use cases where they would apparently help. :smile:

view this post on Zulip Steve Howell (Nov 22 2026 at 19:33):

Richard Feldman said:

linear types sound like something for #ideas

see #ideas > linear types

view this post on Zulip Steve Howell (Nov 25 2026 at 02:31):

My ultimate goal for roc-chat is to get community involvement in building a better chat tool for us than Zulip. Zulip's fine. It's particularly well-tuned for this-sized community, and I haven't heard a single complaint about Zulip since I joined here.

But we can do better. Zulip is a big monolithic app built on top of Django that still doesn't support Roc syntax coloring, because they move slow. Folks should try out roc-chat.

view this post on Zulip Steve Howell (Nov 25 2026 at 02:42):

Shouldn't we eat our own dog food for the one type of app that we all tautologically agree is useful?

view this post on Zulip Steve Howell (Nov 25 2026 at 02:55):

https://blog.zulip.com/2026/11/19/zulip-server-13-3-security-release/

view this post on Zulip Luke Boswell (Nov 25 2026 at 03:36):

Tried it out, looks good @Steve Howell -- I think there is a lot of potential here. Roc looks like a great fit for this.

I'm keen to hear your thought on what a roadmap or plan might look like to get from here to a mature enough state for the Roc community, if we are thinking longer term about replacing Zulip. In the meantime I'm sure there are a lot of really cool projects we can collaborate on.

view this post on Zulip Luke Boswell (Nov 25 2026 at 03:39):

If you would consider roc-signals for the front-end, I think that might be a good fit. Joy also would work well too.

If I put my brainstorming cap on, I can think of crazy ideas like embedding REPL's into chat, or linking/integrating with things like Roclet or Rocco. Or crazier things like shaders for cool graphics.

view this post on Zulip Luke Boswell (Nov 25 2026 at 03:40):

If you have Roc on the front end you could render PDF's in the browser, or leverage the package ecosystem.

I've been doing all kinds of things, and I'm finding we usually have what I need already there (or 95% of the way there, and a small patch upstream is all we need).

view this post on Zulip Luke Boswell (Nov 25 2026 at 03:40):

Like yesterday I replaced tar with a pure Roc implementation, so one less dependency that just works* across any operating system.

view this post on Zulip Steve Howell (Nov 25 2026 at 03:42):

Luke Boswell said:

If I put my brainstorming cap on, I can think of crazy ideas like embedding REPL's into chat, or linking/integrating with things like Roclet or Rocco. Or crazier things like shaders for cool graphics.

That's the line of thinking I'm trying to encourage. Totally possible of course.

view this post on Zulip Steve Howell (Nov 25 2026 at 03:44):

My main goal for now is for people to just try it out, so thank you sir for giving it a spin! Once a few more people try it out, I will try to lay out an actual roadmap for conversion.

view this post on Zulip Steve Howell (Nov 25 2026 at 03:54):

Luke Boswell said:

Like yesterday I replaced tar with a pure Roc implementation, so one less dependency that just works* across any operating system.

You can use d on roc-chat to get a tarball of any topic!

view this post on Zulip Steve Howell (Nov 25 2026 at 03:55):

image.png

view this post on Zulip Luke Boswell (Nov 25 2026 at 03:56):

Now you just need p for a PDF, and w for a Word document :wink:

view this post on Zulip Luke Boswell (Nov 25 2026 at 03:56):

That's half a joke ... I didn't put much thought into that being a good idea or not

view this post on Zulip Steve Howell (Nov 25 2026 at 03:57):

https://github.com/showell/roc-chat/blob/main/app/DownloadRoute.roc

view this post on Zulip Steve Howell (Nov 25 2026 at 03:58):

Luke Boswell said:

That's half a joke ... I didn't put much thought into that being a good idea or not

It's not that crazy. Maybe not worthy of a dedicated hotkey haha.

view this post on Zulip Luke Boswell (Nov 25 2026 at 03:59):

In general I've been really leaning into using Roc packages from across the ecosystem, and then upstreaming improvements or ideas where I can.

view this post on Zulip Steve Howell (Nov 25 2026 at 04:00):

There's a real use case for upgrading Zulip chat conversations to documents. Zulip will never get there. roc-chat will

view this post on Zulip Steve Howell (Nov 25 2026 at 04:10):

I should also mention that roc-chat is way faster than Zulip. Zulip runs every single cloud instance on the same server, which is preposterous.

view this post on Zulip Matthieu Pizenberg (Nov 25 2026 at 10:37):

Like yesterday I replaced tar with a pure Roc implementation, so one less dependency that just works* across any operating system.

@Luke Boswell if you haven’t already, highly recommend reading this recent article by the Astral team (people behind uv, ruff, and ty) about re-writing tar from scratch:
https://astral.sh/blog/tar-codec

view this post on Zulip Anton (Nov 25 2026 at 12:10):

Passkey support and end-to-end encryption for DMs would be nice to have.

view this post on Zulip Steve Howell (Nov 25 2026 at 14:37):

Anton said:

Passkey support and end-to-end encryption for DMs would be nice to have.

Yeah, I see the need for that in certain DM conversations, but that would probably never be in the scope of roc-chat. It's a single-hosted platform (like Zulip). It's intended mostly for discussion. If you have folks that you want end-to-end encrypted DM conversations with, I think it's better to have something more peer-to-peer in nature. There are certainly pieces of roc-chat that you could steal to make the client experience more ergonomic, but that's all JS code, not Roc.

view this post on Zulip Steve Howell (Nov 25 2026 at 14:45):

Matthieu Pizenberg said:

https://astral.sh/blog/tar-codec

I laughed at "(t)archeology". Just to be clear, roc-chat only produces tarballs to download your conversations. It doesn't ever have to parse them. Since the article is about dependencies, I'll mention that Zulip has a zillion dependencies, whereas roc-chat has almost none. It depends on zig, roc, and my code, which has about 10,000 lines of tests behind it. I always invite folks here to probe it. notramo already did that, but I am sure folks could find more things to improve.

view this post on Zulip Steve Howell (Nov 25 2026 at 14:47):

Zulip also has a way to download your own data, and it has my code sprinkled all over that subsystem still.


Last updated: Nov 26 2026 at 20:35 UTC