News for hackers. Stuff that matters.
Re:Why does Mill use Scala? by IshKebab on Thursday February 13, 2025 @05:48PM (#43042461)
Python is a terrible choice for that sort of thing. Who really wants to have to set up a venv and deal with pip nonsense just to write a config file? Hell even installing Python is sometimes difficult.
Re:Why does Mill use Scala? by iforgot22 on Thursday February 13, 2025 @07:31PM (#43043232)
If only Python had the equivalent of npm.
Re:Why does Mill use Scala? by aiiizzz on Sunday February 16, 2025 @09:30AM (#43068314)
Thought that was pdm. Never saw it used so far.
Re:Why does Mill use Scala? by MathMonkeyMan on Thursday February 13, 2025 @06:01PM (#43042590)
Stick to the standard library as of an oldish version of python (3.6?) and it's pretty much zero-install zero-config.
Re:Why does Mill use Scala? by threeseed on Thursday February 13, 2025 @06:45PM (#43042941)
On a Mac, Python has always been a challenge.

Up until recently Apple only included Python2 and so developers used Homebrew to install Python3. Now it’s very common to find two versions of Python3 installed on a Mac developer’s laptop that conflicts with each other.

You really want to be using virtualenv.

Re:Why does Mill use Scala? by iforgot22 on Thursday February 13, 2025 @07:22PM (#43043181)
All a Mac user has needed to do was install from https://www.python.org/downloads/ and then run python3 in the shell. Even if you use MacPorts or brew or conda or whatever, there's a distinct command to run Python 3 instead of 2.

I get that Python's package manager situation is terrible, but like the other user said, you only need built-in packages to spit out a config json or whatever.

Re:Why does Mill use Scala? by threeseed on Thursday February 13, 2025 @09:43PM (#43044187)
So you would then you end up with three Python3 installations.

And if you install from the website it doesn’t override the path. So will still be using the Apple or Homebrew one.

Re:Why does Mill use Scala? by iforgot22 on Friday February 14, 2025 @08:04PM (#43054800)
If you install it 3 times then yeah, but even then, all 3 of them will still work.

But I could've sworn the python.org installer set the PATH. If not, that's kinda annoying.

Re:Why does Mill use Scala? by tom_ on Thursday February 13, 2025 @07:15PM (#43043134)
Hence the advice to stick to the standard library - because then it doesn't matter all that much. I'm not sure what the full set of environments I've tested my Python 3 scripts actually is, but they've run OK on all the various cloud CI systems I've tried, plus my laptops, VMs, and work PCs.
Re:Why does Mill use Scala? by have-a-break on Friday February 14, 2025 @01:18AM (#43045429)
You could say the same thing about setting up a JVM...
Re:Why does Mill use Scala? by pjmlp on Friday February 14, 2025 @03:43AM (#43046249)
JVM doesn't have everything all over the place, JAVA_HOME and PATH suffices.

It doesn't require reaching out to tons of C libraries when performance is called for, and there are at least two free beer options to AOT compile to native code, if required.

Re:Why does Mill use Scala? by IshKebab on Friday February 14, 2025 @02:18AM (#43045747)
I definitely would!
Re:Why does Mill use Scala? by fastasucan on Saturday February 15, 2025 @07:35AM (#43058042)
You don’t need any of that now that we have uv (https://github.com/astral-sh/uv)
Re:Why does Mill use Scala? by IshKebab on Saturday February 15, 2025 @10:01AM (#43058960)
Not really. Uv is great but it doesn't really help here. If an app uses Python as its configuration file format then the app is running Python. It's going to do `python3 config.py` or similar. It doesn't know anything about uv.

So you would still need to create a uv project, run `uv sync` and `uv activate` or whatever and then run your app. Not practical.

The only option if you use Python as a config file format is to stick to old features (Python 3.6) and not use any third party libraries. But op was saying third party libraries are one of the benefits of using Python...