Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
maleldil
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
571.
▲
by
maleldil
2y ago
> getting super human at coding They're getting super-human at _competitive coding_, which is essentially identifying and writing algorithms. They _are not_ good at general coding, as demonstrated by their subpar scores at benchmark
572.
▲
by
maleldil
2y ago
My understanding is the opposite: man pages are much more difficult to produce than plain help text, so it's unreasonable to expect they'll always be available, while help is easy enough to (almost) always be there. If you use any
573.
▲
by
maleldil
2y ago
I like vivid[1] for managing colours in the terminal. It sets LS_COLORS to configure colours for many tools in one command. [1] https://github.com/sharkdp/vivid
574.
▲
by
maleldil
2y ago
> The common denominator for getting help would be man(1). That's... not what a common denominator means. It's far easier to check for `--help` or `-h` and print _something_ than write a whole document in a weird markup languag
575.
▲
by
maleldil
2y ago
> Many memory-safe languages are very fast (fast enough for the vast majority of use-cases). That depends on what "fast enough" means. A better way would be to say "memory-safe with (near) zero overhead".
576.
▲
by
maleldil
2y ago
This is a good solution. It interacts weirdly with programs that use native tabs (e.g. each Ghostty tab shows up as a separate window), but other than that, coming from other OSs, it works as you'd expect. I tried getting used to the &
577.
▲
by
maleldil
2y ago
Given how important backwards compatibility is for C++, it's either take over a basically unused keyword or come up with something so weird that would never appear in existing code. Java solved this by making var a reserved type, not a
578.
▲
by
maleldil
2y ago
> I definitely would carefully ask that people should really use rustfmt, though, if they don't do so yet. If you don't already, you should run `cargo fmt --check` in CI and block PR merges until it passes. You can also run it
579.
▲
by
maleldil
2y ago
> Once you have cut taxes, it essentially doesn't matter which party wins the next election: The have to gut expenditures anyway See the current Labour government in the UK, who would very much like to spend money on government init
580.
▲
by
maleldil
2y ago
I meant that you could do this with isort in Python or rustfmt with `group_imports = StdExternalCrate` (sadly, not the default), where the imports are automatically separated into blocks, which is basically what you seem to be doing manuall
581.
▲
by
maleldil
2y ago
> Worker's Party is a center-left party that is currently the ruling partying Brazil. PT stopped being a left-wing party decades ago. The current vice president was once a presidential candidate and leader of a neoliberal party.
582.
▲
by
maleldil
2y ago
Those would be edge cases where formatting can be turned off if needed. This would require justification during code review. Otherwise, we'd keep the automatic format, with a strong tendency towards the latter. The general benefit of a
583.
▲
by
maleldil
2y ago
Gofmt's style is no one's favorite, yet gofmt is everyone's favorite.[1] [1] https://go-proverbs.github.io/
584.
▲
by
maleldil
2y ago
IMO, gofmt doesn't go far enough. It should sort imports and break lines automatically, or you end up with different people with slightly different preferences for breaking up lines, leading to an inconsistent style. Something like gof
585.
▲
by
maleldil
2y ago
Reinforcement Learning can train a model based on some reward function. The suggestion is that real-world accountability could be translated into such a reward function. Also, OP explicitly mentioned "online learning", which is a
586.
▲
by
maleldil
2y ago
Also Ra, Fine Structure and a number of short stories. They are incredible. See also their post on Clean Code: https://qntm.org/clean
587.
▲
by
maleldil
2y ago
One useful tool beyond regular grep for counting the number of times a pattern appears is ast-grep [1], which allows for more sophisticated rules. [1] https://ast-grep.github.io/
588.
▲
by
maleldil
2y ago
> To me this just sounds like a discipline issue rather than a semantic one. Using an explicit parameter obviates the need for discipline since you can mechanically trace where the value was set. In contrast, global values can lead to ac
589.
▲
by
maleldil
2y ago
IMO the main reason to use a more "advanced" terminal is if you run your code editor in it. If you're just running random commands (which you are, since you code in VS Code), I don't think it's a big deal.
590.
▲
by
maleldil
2y ago
Here are a few ways to add key bindings to do this in a single action, but it's macOS-only and a little clunky. I prefer the one a little further down where you use a second keybind to open the editor. [1] https://github.com
591.
▲
by
maleldil
2y ago
Maybe they're referring to saving the state of the windows when you quit the program? https://ghostty.org/docs/config/reference#window-save-state
592.
▲
by
maleldil
2y ago
Don't install neovim with your system package manager, just like your other development tools. If you rely on a tool where the version makes a big difference, you should be in control of it, not the system package manager. You can buil
593.
▲
by
maleldil
2y ago
Vim is more stable simply because it changes less often. Neovim is constantly improving its APIs, and that can break stuff. If you don't want to deal with breaking changes, just don't update. You can still use most plugins.
594.
▲
by
maleldil
2y ago
You can get JSON output with a JSON schema via tool use [1]. Is this not reliable like (e.g.) OpenAI's structured outputs? [1] https://github.com/anthropics/anthropic-cookbook/blob/main/t...
595.
▲
by
maleldil
2y ago
> But it shifts the need to memorize undefined behavior with the need to memorize the borrow checker rules. With one massive difference: the borrow checker will tell you when you're wrong at compile time. Undefined behaviour will ma
596.
▲
by
maleldil
2y ago
Most Python programmers don't really have to understand metaclasses or other advanced concepts like descriptors. The main metaclass they'd use would be to create abstract classes, and these days you can just subclass ABC.
597.
▲
by
maleldil
2y ago
> I’m smarter than it is Given how many important projects maintained by smart people have dealt with bugs that safe Rust makes impossible, I'm inclined to doubt that.
598.
▲
by
maleldil
2y ago
Jujutsu has `jj undo`, but which undoes whatever was your last jj command, regardless of what it was. It makes much more confident to do an operation I'm uncertain of. And if I regret something many actions down the line, you have `jj
599.
▲
by
maleldil
2y ago
Another vote for jujutsu. No one else needs to know you're using it. You can think of it as just a different CLI for git (although you shouldn't mix them). I used to use third-party interfaces like lazygit, but I don't need t
600.
▲
by
maleldil
2y ago
Regarding your Claude copying flow, there's a Python-compatible alternative. In nvim, you can use treesitter selections to select a block, and treesitter is aware of the indentation.
More ›