Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
maleldil
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
511.
▲
by
maleldil
2y ago
Nix requires a bunch of stuff to setup and to understand. uv is just a binary in PATH.
512.
▲
by
maleldil
2y ago
Patiently waiting for the day when someone makes something similar for macOS.
513.
▲
by
maleldil
2y ago
Your version needs Python. uv needs needs only uv, as it can manage python installation by itself. It's also a lot easier to install uv than to manage Python installations (there's a reason pyenv and the like exist).
514.
▲
by
maleldil
2y ago
What is the problem with that? I see no reason to expect that would work.
515.
▲
by
maleldil
2y ago
It stops when we run out of easy things that can be done to improve the lives of people. It's not that hard.
516.
▲
by
maleldil
2y ago
It doesn't. There are cases where the type-checker can't know the type (e.g. json.load has to return Any), but there are tools in the language to reduce how much that happens. If you commit to a fully strictly-typed codebase, it d
517.
▲
by
maleldil
2y ago
Annotations can and should be checked. If I change a parameter type, other code using the function will now show errors. That won't happen with just documentation.
518.
▲
by
maleldil
2y ago
What does this even mean? If I read from a file that doesn't exist, what should the returned object be? Isn't the state of the file directly tied to the error? If I ignore the error and try to use the file anyway, the following op
519.
▲
by
maleldil
2y ago
Now you're restricting yourself to a subset of the language. There's nothing stopping someone from adding a mutable member to your "immutable" type later. It's much better to have immutable bindings/references
520.
▲
by
maleldil
2y ago
> A "tiny bit more" thinking is not sufficient. They could've at least looked at what other languages were doing at the time, and that would have been much better than what they ended up with. However, as with many other a
521.
▲
by
maleldil
2y ago
When x and y are primitives, yes. But if they're objects, final only prevents you from re-assigning them. You could still call methods that mutate them.
522.
▲
by
maleldil
2y ago
Because they chose a half-assed way to implement generics, and the path they took doesn't interact well with the rest of the type system.
523.
▲
by
maleldil
2y ago
Claude Code is amazing. Unfortunately, it's also very expensive. How do interactions with MCP servers affect token usage/cost?
524.
▲
by
maleldil
2y ago
I have a project on torch 2.6 and numpy 2.2. I never had any issues with that combination.
525.
▲
by
maleldil
2y ago
It was just an example, sheesh. The point is that many mainstream languages get caught in OO soup, even those that don't have to.
526.
▲
by
maleldil
2y ago
You might find yourself in a job market where that isn't possible.
527.
▲
by
maleldil
2y ago
For PhDs, the game is "finishing the degree".
528.
▲
by
maleldil
2y ago
It's unclear whether `chat` is a field/property/member of `RubyLLM` or a method being called.
529.
▲
by
maleldil
2y ago
chat = RubyLLM.chat Is ambiguous, though. You can't know if it's an assignment or creating a new object. I don't think that's more readable.
530.
▲
by
maleldil
2y ago
I understand it's a Ruby thing, `chat = RubyLLM.chat` looks odd. How do I know whether it's a function call returning an object or just an assignment? Why not just use `RubyLLM.chat()` and eliminate the ambiguity?
531.
▲
by
maleldil
2y ago
FWIW, I've had to write similar code when there's some complex "folding" operation. I use map/filter a lot, but fold/reduce/accumulate always seemed harder to understand than a for loop. I also prefer nest
532.
▲
by
maleldil
2y ago
How do you determine where the venv is? AFAIK, uv run in script mode creates the venv in some random temporary directory.
533.
▲
by
maleldil
2y ago
You can also add #![warn(clippy::all, clippy::pedantic)] to your main.rs/lib.rs file to get those lints project-wide.
534.
▲
by
maleldil
2y ago
Neovim: require("lspconfig").rust_analyzer.setup({ settings = { ["rust-analyzer"] = { checkOnSave = { command = "clippy", allFea
535.
▲
by
maleldil
2y ago
How is ruff integrated? As far as I understand, it's still a separate tool that you need to install.
536.
▲
by
maleldil
2y ago
It works transparently. The lock file is cross-platform by default. When using pytorch, it automatically installs with MPS support on macOS and CUDA on Linux; everything just works. I can't speak for Windows, though.
537.
▲
by
maleldil
2y ago
How does this interact with your code editor or IDE? When you edit the file, where does the editor look for information about the imported third-party libraries?
538.
▲
by
maleldil
2y ago
How would the fork be funded? You can't expect a complex program like a browser to be developed exclusively by volunteers in their free time.
539.
▲
by
maleldil
2y ago
This is a good idea, and I also enforce something similar in my projects. I credit Go for popularising gofmt, including strong defaults and little customisation. My main complaint is that gofmt doesn't break lines.
540.
▲
by
maleldil
2y ago
If `isReadyToDoThing` is only used in one place, I'd argue that it's better to inline it with an appropriately-named variable so I don't have to "go to definition" to understand what it's doing. I think people
More ›