HackerLangs
トップ新着トレンドコメント過去質問紹介求人

nitnelave

no profile record

投稿

An open letter to office suite users

blog.documentfoundation.org
4 ポイント·投稿者 nitnelave·29 日前·1 コメント

Bit warden CLI nom package compromised

gist.github.com
1 ポイント·投稿者 nitnelave·3 か月前·0 コメント

コメント

nitnelave
·11 日前·議論
For context, from wiki:

> Remigration is a far-right concept referring to ethnic cleansing via mass deportation of non-white minority populations [...] to their place of racial ancestry
nitnelave
·2 か月前·議論
Two points make a line in any number of dimensions.
nitnelave
·3 か月前·議論
Ah, good well-architected code, finally... With most of the code in utils/other :D
nitnelave
·4 か月前·議論
I guess I was missing the NPE: https://ideone.com/rp4Nvv

Optional.of(null) throws an NPE
nitnelave
·4 か月前·議論
5, no? Null, Optional::empty, Optional(null), Optional(true), Optional(false)
nitnelave
·4 か月前·議論
Also known as "Make the change easy, then make the change"

Something to realize is that every codebase is legacy. My best new feature implementations are always several commits that do no-op refactorings, with no changes to tests even with good coverage (or adding tests before the refactoring for better coverage), then one short and sweet commit with just the behavior change.
nitnelave
·5 か月前·議論
Rust has clippy nagging you with a bunch of modernity fixes, and sometimes it can autofix them. I learned about a lot of small new features that make the code cleaner through clippy.
nitnelave
·5 か月前·議論
Isn't that the classic argument "Real C programmers don't write defaults!" ?

The one that companies have spent billions of dollars fixing, including creating new restrictive languages?

I mean, I get the point of tests, but if your language obviates the need for some tests, it's a win for everyone. And as for the "how much code will I need to change to propagate this null?", the type system will tell you all the places where it might have an impact; once it compiles again, you can be fairly sure that you handled it in every place.
nitnelave
·5 か月前·議論
Client-side pre-commit hooks are there to help you in the same way that type checking (or a powerful compiler) is there to help you avoid bugs. In particular with git, you can skip the hooks when committing.

Now, if the server enforces checks on push, that's a project policy that should be respected.
nitnelave
·5 か月前·議論
For CLI arguments, have you checked out clap? It's declarative (you create and annotate a struct, it generates the parser), and can be agremented with man page generation or shell completion generation.

And as a result of the parsing step, you get a fully typed struct
nitnelave
·5 か月前·議論
I added "kudu", a type of antilope, and it replaced it with "turtle". I don't know the relationship between the 2, but it doesn't pass a toddler's sniff test!
nitnelave
·6 か月前·議論
You need to go all-in on tea and make your own mark. Get a fancy Chinese teapot with holes in the spout to use loose leaf tea, and start getting snobby about traditional vs modern techniques of Pu'er tea, and you'll get your own brand of respect!
nitnelave
·7 か月前·議論
You can probably get away with just a union between a 64 bit and 2 32 bit integers.
nitnelave
·7 か月前·議論
The alignment constraint is different, which they use to be able to load both as a 64-bit integer and compare to 0 (the empty slot).

You could work around that with a union or casts with explicit alignment constraints, but this is the shortest way to express that.
nitnelave
·8 か月前·議論
I think it's a reference to the Google interview problem that the author of Homebrew (IIRC) failed. They were quite upset about it since they have proved their worth through their famous open-source contributions, but got rejected in a LeetCode-like interview.
nitnelave
·8 か月前·議論
That's broadly the same reason I created LLDAP. It's the 20% of features of an LDAP server that 80% of users need.

It's been hard pushing back and saying no to all the new features. We've started work on a plugin API so that people can add features and opt in to the complexity.
nitnelave
·10 か月前·議論
Also, of course, talk to people. Pitch your PR idea before writing it, so you can avoid hearing "oh, there's a much simpler way" or "we can never merge this approach because of X"