2 ms·
> Why do you find it better than Python? I said already - the main reason is you can import files by relative file path. You can get close to the Deno UX with
by IshKebab 9mo ago
> Why do you find it better than Python?
I said already - the main reason is you can import files by relative file path.
You can get close to the Deno UX with uv and a script like this:
#!/usr/bin/env -S uv run --script
#
# /// script
# requires-python = ">=3.12"
# dependencies = ["httpx"]
# ///
import httpx
print(httpx.get("https://example.com"))
But you still have to deal with the venv e.g. for IDE support, linting and so on. It's just more janky than Deno.
I wish someone would make a nice modern scripting language with arbitrary precision integers, static types, file path imports, third party dependencies in single files, etc. Deno is the closest thing I've found but in spite of how good Typescript is there are still a ton of Javascript warts you can't get away from (`var`, `==`, the number format, the prototype system, janky map/reduce design, etc.)
- fainpul 9mo agoPowerShell is pretty good for shell scripting. iwr https://example.com You also have arbitrary precision integers and all the other stuff from .NET $b = [BigInt]::Parse('10000000000000000000000000000000000000000000000000')
- IshKebab 9mo agoPowershell has god awful syntax though. There's no way I'd want to do anything remotely significant with it.
- jcgl 9mo agoPowerShell’s syntax Is just fine. Very few special characters, minimal escaping, easy to read. If you understand PowerShell semantics, the syntax comes quite naturally.
- tracker1 9mo agoShould be able to get better shebang detection for Python similar to this one I requested for Deno/TS ... no longer need the .ts extension for my local use. https://github.com/microsoft/vscode/issues/287819 https://github.com/microsoft/vscode/issues/287819