49 karma · joined Aug 21, 2018 (8y ago) · 10 submissions
comment 5d ago · link · parent
Well, you could write your platform in a functional language :) What it is saying is that separating pure vs. effectful/impure comes with some nice benefits, and we're seeing that in the platforms concept. I think if you try it you may see it differently :)
>If you're the guy that created the joy web framework (platform?) for roc, then I watched and enjoyed your talk about it.
Yeah, that's me! Thank you so much! PS. I call it a "framework" just because it spans more than one platform. Not really an important :P
comment 5d ago · link · parent
You could just pick up Roc, pick a platform, and start writing Roc right away without knowing any other language :) There are already a number of platforms to use for CLI apps, web servers, web apps, native GUIs etc.
However, if you want to write your own platform you can. That's a great power to be able to reach for if you want to but it's not typical.
Going back to the JavaScript example: most JS developers just pick a platform, like Bun, and start writing JS. In the same way, you'd pick a Roc platform and start writing Roc.
Sure, if Bun wasn't good enough the JS dev may write their own platform (Bum? :P), and then they'd need a second language. That's the same thing you could do in Roc if you wanted a custom platform :)
comment 6d ago · link · parent
Roc needs a platform written in another language, but you as a Roc author don't have to read or write that language. You don't even need to know which language a platform is written in.
Someone else (like me!) writes a platform, shares it, and you use it. That means you get whatever platform you want: maybe with the concurrency of Go? Or the performance of Zig? Or the memory safety of Rust? And the platform can give you access to their entire ecosystem. All that with no effort on your part, and you get to read and write only Roc. Sweet deal, right? ;D
comment 6d ago · link · parent
I'm not saying everyone should be doing this, but it was an opportunity for me to be able to use Roc while contributing a lot to the community. It did take a lot of work, but seeing where we are now, I'm thrilled with how it has turned out :)
Heh, I almost posted a link to a public-facing Roc app here, but that's not a great idea :P DM me on Zulip (https://roc.zulipchat.com/) if you want to see an example of an actual business running full-stack web apps in Roc!
comment 6d ago · link · parent
comment 6d ago · link · parent
Another way to look at it is a practical comparison: JavaScript is a language, but it needs to run on something. If you run it in the browser, you get access to browser APIs. If you run it on the server with Node/Deno/Bun you get different APIs that are useful for web servers. In that scenario, the browser or Node/Deno/Bun is the platform.
The example above isn't apples-to-apples, but it's a good way to visualize the difference!
Does that help? :)
comment 6d ago · link · parent
If it's any help, I've been writing "serious business apps" in Roc for the past two years, so you can already do quite a bit! I write mostly web apps and had to write my own web framework (https://github.com/niclas-ahden/joy) since it was such early days. I've been extracting and releasing as many packages as I can to help build out the ecosystem for people like you. I hope you'll have a great time when you decide to try it :)
If there's anything specific you need or are unsure about, post on https://roc.zulipchat.com/ and we'll help you!
comment 6d ago · link · parent
If you're into web apps and The Elm Architecture, then check out https://github.com/niclas-ahden/joy I built Joy so that I could use Roc on a daily basis for client work, and it's been awesome! Now it's growing into a full-stack web framework with full type-safety from the database to the browser. Hope you'll like it too! :D
If you're curious about Roc, then join us on the Zulip (https://roc.zulipchat.com/). Welcome in!
comment 4mo ago · link · parent
For sure! I've been using Roc for work exclusively for the past year and a half, writing mostly full-stack web apps, and it's been great. I wrote a small framework/platform (https://github.com/niclas-ahden/joy) which is similar to Elm or Lustre from Gleam.
Previously I used mainly Rust/Haskell/Elm/Ruby/Python and each language has its pros/cons, but for web apps Roc really hits the sweet spot of: runtime performance, compilation speed, strong type system, error handling, and ergonomics. It's definitely worth a try!