Hi, I'm a bit confused about what I should write for the packages pf
packages { pf: ??? }
If you are new to roc, I would advise starting with the tutorial and using basic-cli.
In general, roc is always built on top of a platform. More details on platforms here: https://www.roc-lang.org/platforms
please ask more questions if that isn't what you are looking for
Curious how people feel about pf in general. I think it trips me up a bit every time I read it because "platform" is a single word so it feels weird to have a syllable level abbreviation. For basic-cli I like packages { cli: "..." }, but I realize that might not feel natural for all platforms.
When I saw you use cli I immediately wanted to change all of my code to use it as well. Reads so much nicer (though does kinda hide which package is the platform)
Oh I thought the field needed to be called pf
Brendan Hansknecht said:
When I saw you use
cliI immediately wanted to change all of my code to use it as well. Reads so much nicer (though does kinda hide which package is the platform)
I agree. Also, the new app header I'll soon be working on will have a special platform keyword indicating which package is the platform:
app [main]
requires {
cli: platform "https://…/basic-cli/…",
json: "https://.../roc-json"
}
So it should be clear even if you use a different name.
Oh, so I don't need to finish my sentence. I've written so far that: "Is there a way to disambiguate between a purly Roc package and a platform? I know there is no package manager right now, but is the syntax planned to be the same? Because ..."
oh that's cool, I never thought of cli!
what would it be for basic-webserver? web? :thinking:
server?
wserv ?
so imports [cli.File.{ readUtf8 }] feels reasonable, although imports [web.File.{ readUtf8 }] feels weird :big_smile:
imports [server.File.{ readUtf8 }] feels more reasonable
web sounds like it would run on the browser
If you're using Nea it could be nea :shrug:
This might partially depend on if the Roc community goes hard on the Elm philosophy that everything should have a very direct name, or if there are platforms with cute/colorful names.
Like in elixir Phoenix is a namespace for all code related to the web server. In context that's fine.
Elias Mulhall said:
This might partially depend on if the Roc community goes hard on the Elm philosophy that everything should have a very direct name, or if there are platforms with cute/colorful names.
Like in elixir
Phoenixis a namespace for all code related to the web server. In context that's fine.
I think in the context of platforms it's natural to have a variety of names because the main point of platforms is to provide a way to build applications for a particular use case in a particular way, and there will naturally be different approaches with different tradeoffs for the same (or similar) domains
and nea is a great example of that!
Last updated: Nov 09 2025 at 12:14 UTC