Remix.run Logo
mrcjkb 12 hours ago

> presumably because that's what Cargo does.

Nope. We chose TOML as the default for various reasons:

- Simplicity. There are use cases for a turing complete configuration language. Lux is not one of them.

- Ergonomics. The ability to edit it using the CLI (technically, that could be possible with Lua too, but it would be a lot more complex and not a very pleasant UX).

> which, I don't know if that's the right call?

The reason we currently support importing a Lua extra.rockspec is ease of migration for complex projects, e.g. with platform-specific overrides (not yet supported by the TOML spec).

ModernMech 11 hours ago | parent [-]

Thanks that does answer my question! Had you considered parsing a subset of lua to get the properties you want? That way users don't have to learn a whole other syntax. I'm thinking in particular of my students whom I teach lua. They struggle enough learning one language, having to teach a second with all its quirks seems like a lot to throw at them.

mrcjkb 6 hours ago | parent | next [-]

That's a neat idea, but it would mean we'd have to maintain our own library. When editing with the CLI, you have to make sure you preserve comments, which the toml-edit crate does quite well.

NuclearPM 10 hours ago | parent | prev [-]

Do you think that is more difficult than explaining to the students why they can’t use loops in their lua config files?

ModernMech 9 hours ago | parent [-]

I wouldn't present it to them as "these config files are the same thing as Lua but without loops", but instead "these are config files and they have the same syntax as the Lua records we just learned about". And I would prefer that over "these are config files and they have a different syntax as the Lua records we just learned about." Although I can see merits on discussing that syntax differences exist between languages, that tends to overwhelm people learning their first language.