Working on a basic example platform/app that runs elm on frontend and webserver with websocket on the backend using new compiler. I have custom fork of interpreter that I use, so if there's anything in there that is different than standard compiler that's why.
https://github.com/codegod100/chatserver
Awesome, @nandi! Sorry for the slightly unrelated question, but where can I get the JSON module required to build your Roc code?
Cool :sunglasses:.
I've just deployed a similar chat with Elm, but using swift-vapor as a backend. But now I'm tempted to use Roc :grimacing:
@nandi what's different about the interpreter on the fork? Is it things you're looking to upstream, or is it specific to that project?
Richard Feldman said:
nandi what's different about the interpreter on the fork? Is it things you're looking to upstream, or is it specific to that project?
It's an amalgam of quick fixes I made for experimentation/bug fixes/etc. There's like 15 commits I rebase onto main after each pull. I need to go through and figure out whats trash and what can actually be a PR. It's just that I'm not a very good zig programmer yet and I don't really know the codebase so I'm kind of afraid of wasting people's time with slop
here's a link to my fork https://github.com/codegod100/roc/tree/dev
Johannes Rubenz said:
Awesome, @nandi! Sorry for the slightly unrelated question, but where can I get the JSON module required to build your Roc code?
It's hard coded into the repo heh https://github.com/codegod100/chatserver/blob/main/app/Json.roc
feel free to ask any questions, happy to share what I'm learning, even tho I'm kind of a newb.
Gábor Librecz said:
Cool :sunglasses:.
I've just deployed a similar chat with Elm, but using swift-vapor as a backend. But now I'm tempted to use Roc :grimacing:
do it.
@nandi, I’m using the Roc compiler version release-fast-df9672f3.
When I run:
roc build app/main.roc
I get the following errors:
-- MODULE NOT FOUND ------------------------------
The module Json was not found in this Roc project.
You're attempting to use this module here:
┌─ app/main.roc:9:1
│
9 │ import Json
│ ^^^^^^^^^^^
-- UNDEFINED VARIABLE ----------------------------
Nothing is named extract_client_id in this scope.
Is there an import or exposing missing up top?
┌─ app/main.roc:109:21
│
109 │ client_id = Json.extract_client_id(json_str)
│ ^^^^^^^^^^^^^^^^^^^^^^
-- UNDEFINED VARIABLE --------------------------
...
Found 6 error(s) and 0 warning(s) for app/main.roc.
I’d really appreciate any pointers. :grinning:
@Johannes Rubenz um.. I fixed some stuff in my interpreter fork about sibling module imports, so this might be that. if you're feeling spicy you might pull my fork and build it and see if it resolves it. I linked it in my response to Richard.
I see, thanks a lot! :slight_smile:
updated code so you don't need my fork of interpreter to run
I also put json code into zig since the roc was slow even after I got it to work heh oh well one thing at a time
Last updated: Jan 12 2026 at 12:19 UTC