Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
maleldil
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
47 ms
·
901.
▲
by
maleldil
3y ago
A beginner should use expect instead of unwrap. It makes you faster because you still don't have to handle errors but allows you to add context.
902.
▲
by
maleldil
3y ago
These might be interesting to you: https://github.com/indygreg/python-build-standalone/releases
903.
▲
by
maleldil
3y ago
Windows 7 support ended on 14 Jan 2020. It makes sense not to officially support it. Have you tried building 3.9 from source to see if there's a particular API that's unsupported?
904.
▲
by
maleldil
3y ago
> the exact same syntax in Python No, because the example is showing concatenation of associative arrays. In Python, you'd use a dict, and you can't do `validated + {'status': 'pending'}`: ``` >>> v
905.
▲
by
maleldil
3y ago
I think you have an unusual take on this. Why do you disable history?
906.
▲
by
maleldil
3y ago
Sounds good, thank you! I'll start playing with it.
907.
▲
by
maleldil
3y ago
It looks like it's not possible to export the history to a format the shell can import[0], so if I wanted to try this out, my commands would be locked there. It looks interesting, so if I'm overlooking a way to do this with fish,
908.
▲
by
maleldil
3y ago
There could still be word of mouth that leads to paying customers. Or circumstances change and the paid plans are worth it for previously free customers.
909.
▲
by
maleldil
4y ago
> They're also effectively impossible to maintain consistently without medication. This is key. As someone with bipolar disorder, I'm forever stuck in a cycle of stable with good habits -> episode happens -> can't ke
910.
▲
by
maleldil
4y ago
I'm not sure I understand you. If the project uses something "special" like poetry, hatch, pdm, etc., you only need to install those for development. If you simply want to use the project, they all should be installable direc
911.
▲
by
maleldil
4y ago
The existence of poetry, hatch, pdm, etc. (and lately rye) is proof that "just use pip-tools" isn't consensus.
912.
▲
by
maleldil
4y ago
> Ocaml's module system means that you can describe the async runtime as a signature and make your entire library generic to the async runtime it runs on top of Is this the program describing the interface it expects, and the compil
913.
▲
by
maleldil
4y ago
Youtube sometimes recommends that, but if you scroll the topics bar all the way to the right, you can access it at any time.
914.
▲
by
maleldil
4y ago
That's how you create bubbles.
915.
▲
by
maleldil
4y ago
I agree. I believe the type checker should've been part of the interpreter, or a module like pip. Differences between mypy and pyright drive me crazy. That said, I don't think this a reason not to use type hints. They're stil
916.
▲
by
maleldil
4y ago
> I use Kitty and I think its great, and I stopped using tmux most of the time I want to go 100% kitty (both locally and via SSH), but I don't know whether it can persist sessions. With tmux I can kill the Kitty app, and when I reop
917.
▲
by
maleldil
4y ago
I'm a heavy user of type hints and enable pyright and mypy's strict modes whenever possible. However, you can't always be strict: if you use almost any package in the data science/ML ecosystem, you're unlikely to ge
918.
▲
by
maleldil
4y ago
Similarly for Typer, which is literally "the FastAPI of CLIs"[1]. Handy to type your `main` parameters and have CLI argument parsing. For more complicated cases, it's a wrapper around Click. [1] https://typer.tiang
919.
▲
by
maleldil
4y ago
> The way everybody else seems to be going is strong typing at function interfaces, with automatic inference of as much else as can be done easily Both mypy and pyright will do that. If your function return type is annotated, they will i
920.
▲
by
maleldil
4y ago
https://archive.is/rs32R
921.
▲
by
maleldil
4y ago
I'm not sure; I've only heard reports from others regarding iOS. I can confirm that it drains battery on Android in the background, however.
922.
▲
by
maleldil
4y ago
Citymapper is useful but has extremely high battery usage on both Android and iOS. I use Google Maps and TfL Go instead, but I'd happily use Citymapper more if they fix this.
923.
▲
by
maleldil
4y ago
Rust is _a lot_ slower to develop than sh/bash/Python, though. If your script is in reality a semi-complex CLI tool, then Rust is great, but if it's a 1k line shell script, Python/Ruby/JS (especially with Deno) are
924.
▲
by
maleldil
4y ago
I find it useful to run pdb when my program throws an exception. You can run your program with `python -m pdb -cc file.py args`, and it will leave you in a prompt when there's an exception or a breakpoint (eg the `breakpoint` statement
925.
▲
by
maleldil
4y ago
> Who? Who does say that? Freshman students who barely started coding? Example from this thread: https://news.ycombinator.com/item?id=35098434
926.
▲
by
maleldil
4y ago
No sarcasm needed. My first Mac is an M1, and I've only seen the beachball when badly-behaved programs crash, never for waiting for something.
927.
▲
by
maleldil
4y ago
Pip is the wrong comparison; it should be with PyPI. The package ecosystem is Python's killer app.
928.
▲
by
maleldil
4y ago
I used to buy it in powder form in a drugstore near uni. It didn't dissolve well in water, in my experience, but was quite effective.
929.
▲
by
maleldil
4y ago
That doesn't match with my personal experience comparing the effects of Guaraná Antarctica and other sodas (eg Coke). Also, websites in Portuguese [1] claim that Guaraná contains only 2-4 mg of caffeine per 350ml. I wasn't able to
930.
▲
by
maleldil
4y ago
Interestingly enough, the guaraná soda doesn't contain a lot of caffeine: just 2mg per 350ml can.
More ›