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.
For now here is a taste of the code: https://github.com/showell/roc-chat/blob/main/app/GitHubSignUp.roc
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.
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.
Unlike Zulip, which has a zillion dependencies, my server is very slim:
Caveats, outside the code:
What an awesome real world Roc app Steve! It must be one of the biggest Roc projects out there.
I look forward to joining :)
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.
pixelsprout has been on. Thank you!
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
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
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.
CSS is broken on the login page in Firefox:
![]()
Do you allow pentests? Only non-destructive.
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.
Is this the intended design?
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.
To avoid design work, I usually utilize a pre-made CSS UI toolkit. DaisyUI is my favorite: https://daisyui.com/
It has most of the work done, so even if I don't really put effort into design, it's still decent looking.
You may pentest it.
You can probe the code as well:
https://github.com/showell/roc-chat/tree/main/app
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.
Thanks. To be honest, I don't expect to find anything, Roc is very suitable for writing secure software.
But it's worth taking a look.
It does have a zig platform underneath.
You can grep for "dangerous" in the Roc.
The Roc does create all the HTML from user input, so some types of exploits need careful attention in Roc itself.
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.
Every small thing is appreciated. :slight_smile:
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.
also mobile is more CSS-driven
![]()
![]()
/poll What mode do people prefer?
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.
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.
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.
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.
Fun fact: you can vote for multiple options in Zulip polls. I actually wrote the polling system to be more like a brainstorming widget.
which worked perfectly just now :)
I recommend setting the default theme to automatic:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme
That's what I already said I'm doing. :slight_smile:
or I implied it, I suppose. but yeah, in progress
I tested it in devtools and browser settings, and it didn't change.
The change hasn't been deployed yet. But the sun and moon icons should toggle now.
Where's the source?
You linked the safari app.
Sorry, it's still early morning here: https://github.com/showell/roc-chat/tree/main/app
notramo said:
You linked the safari app.
Fixed above too.
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.
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.
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:
Richard Feldman said:
linear types sound like something for #ideas
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.
Shouldn't we eat our own dog food for the one type of app that we all tautologically agree is useful?
https://blog.zulip.com/2026/11/19/zulip-server-13-3-security-release/
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.
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.
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).
Like yesterday I replaced tar with a pure Roc implementation, so one less dependency that just works* across any operating system.
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.
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.
Luke Boswell said:
Like yesterday I replaced
tarwith 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!
![]()
Now you just need p for a PDF, and w for a Word document :wink:
That's half a joke ... I didn't put much thought into that being a good idea or not
https://github.com/showell/roc-chat/blob/main/app/DownloadRoute.roc
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.
In general I've been really leaning into using Roc packages from across the ecosystem, and then upstreaming improvements or ideas where I can.
There's a real use case for upgrading Zulip chat conversations to documents. Zulip will never get there. roc-chat will
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.
Like yesterday I replaced
tarwith 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
Passkey support and end-to-end encryption for DMs would be nice to have.
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.
Matthieu Pizenberg said:
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.
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