Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pkolaczk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
46 ms
·
541.
▲
by
pkolaczk
5y ago
With Kotlin based approach to nulls you can't represent Option<Option<T>> values.
542.
▲
by
pkolaczk
5y ago
Some people are curious and constantly learning new things. Some people don't and just do the same stuff over and over again. So the fact some people are more experienced than the others even after spending the same number of years in
543.
▲
by
pkolaczk
5y ago
Not a Lua developer here, what is the problem with nil? Just curious.
544.
▲
by
pkolaczk
5y ago
I also think a lot of advice on that website is terrible, but there are some good bits there, too. For example while the general advice to never use bottom-up programming is awfully wrong, there is some value in the example they give later
545.
▲
by
pkolaczk
5y ago
That is a theoretical effect I frequently see mentioned, but never seen materialize in practice. Quite likely it is hidden by other things that affect Java performance negatively. Cache effects might play a role here as well. Deallocating m
546.
▲
by
pkolaczk
5y ago
Because Atkinson cycle gas ICE has about the same efficiency as a diesel ICE (about 40%), but is a lot simpler and cheaper to produce. Gasoline cost is just one factor. There are also maintenance costs and turbodiesels lose pretty badly the
547.
▲
by
pkolaczk
5y ago
Not in city driving. I own a hybrid Highlander and in city driving it burns considerably less gas than Ford Galaxy or VW Sharan with a diesel engine, despite being bigger, heavier and more powerful at the same time. I agree that on a highwa
548.
▲
by
pkolaczk
5y ago
AFAIK CRCs are not the fastest "hashes" you can get. Some non-cryptographic hashes outperform crcs by a large factor and provide longer checksums and much better statistical properties. E.g. see this: * https://www.strc
549.
▲
by
pkolaczk
5y ago
A shameless plug: fclones does that as well, including support for symlinks.
550.
▲
by
pkolaczk
5y ago
> However, if most of them aren’t, chances are you find a difference in the first block read, But just to read the first block, you need to open both files and move the heads from one to another at least once. If the files are placed in
551.
▲
by
pkolaczk
5y ago
Most programs I tested have very simple basic usage - just the program name and a list of directories. I doubt typing the above would be faster, and figuring out for the first time - definitely not. Also executing that on a million of files
552.
▲
by
pkolaczk
5y ago
This program uses CRC32 to compute hashes. This is a terrible idea - a 32bit hash is just too short and the probability of collisions is way too high. Only a few thousand files are enough to get 50% probability of a collision. Even though t
553.
▲
by
pkolaczk
5y ago
jdupes, rdfind, fclones and possibly many others compute checksums of prefixes (and sometimes suffixes) of the files. That reduces the number of files to be fully hashed. Computing incremental checksums in parallel and breaking up once chec
554.
▲
by
pkolaczk
5y ago
Instead of trying to be clever, fclones gives the user a choice. It can select files to remove by their nesting level, creation/update/access time or glob expression (include/exclude). It also allows the user to modify the li
555.
▲
by
pkolaczk
5y ago
Why do you think pass-by-value takes up more memory? The data gets packed on the stack pretty densely, so as long as the data structures are tiny, that shouldn't be a problem. On the flip side heap allocation is typically prone to som
556.
▲
by
pkolaczk
5y ago
Proper abstraction can have a huge upside by allowing people to understand a part of the project without the need to understand all of it. We're using abstractions all the time really, you don't need generics for that. An iterator
557.
▲
by
pkolaczk
5y ago
A lot depends on the local labor law. Here where I live (Poland and I guess same in the rest of EU), the outputs of your work which were not directly ordered by your employer or were not part of the job are not owned by the employer (and
558.
▲
by
pkolaczk
5y ago
In some places. Not in Poland, as long as you're not competing with your employer. Also clauses like "we own the work you do in your personal time" have no legal implications here, because they directly contradict the labor l
559.
▲
by
pkolaczk
5y ago
Writing generic code is indeed harder than writing non-generic code, but what I wanted to point out is that you can't compare generic code to a non-generic piece that handles only one type (which is often what people do), because the f
560.
▲
by
pkolaczk
5y ago
Without generics, you'd have N functions instead of 1. Are you sure N times the complexity of non-generic function is less than 1 time the complexity of a generic function?
561.
▲
by
pkolaczk
5y ago
If a friend calls me unexpectedly, most of the time I do care more about them than whatever I was doing, because I can just resume what I was doing a few minutes later. Most stuff can be interrupted and resumed without a problem. If this wa
562.
▲
by
pkolaczk
5y ago
Often you don't need to reimplement 100% of functionality of a library but just a 1% of it. Then, a talented team can usually make that 1% higher quality just because they are not limited by the complexity and tradeoffs added by the re
563.
▲
by
pkolaczk
5y ago
If the resume has a good content, the only rule IMHO is it needs to be easy to read. It doesn't matter if you use LaTeX, Rustdoc, MS Word, Libre Office, HTML or markdown as long as I can quickly get all the information I want. When I d
564.
▲
by
pkolaczk
5y ago
Of course it is not less code, but that additional code is mostly declarative documentation in the form of function signatures. You'd have to hold it in your head anyways to understand the original code, but now it is stated explicitly
565.
▲
by
pkolaczk
5y ago
It should make it definitely easier to read, if names of the extracted functions are good, signatures are simple and you can understand well what they do without looking at their implementations. The main point of abstraction is not reusa
566.
▲
by
pkolaczk
5y ago
Fair point - but they are very close. The fact that at least some hybrids are more green than some full electric cars tells something. But this ranking doesn't include the other factors like price tag or convenience (range, time to ref
567.
▲
by
pkolaczk
5y ago
The non-plugin hybrids are just as environmentally friendly as full electric cars, because they have 10x-20x smaller battery and that makes a huge difference in initial emissions. The OP likely wrote about PHEVs which indeed have batteries
568.
▲
by
pkolaczk
5y ago
It takes carbon to produce a BEV as well. And somehow BEVs are a lot more expensive (up to 40% more, when there are no subsidies) to produce than HEVs, which suggests more resources and energy is spent on producing a BEV. For many people t
569.
▲
by
pkolaczk
5y ago
Definitely not all induction stoves are like that - in my previous appartament I had an induction stove from Bosch, and the frequency of alternating "on/off" was high enough that it was not noticeable at all. It also had 20 p
570.
▲
by
pkolaczk
5y ago
Is it a hard guarantee or just a soft goal like in G1, which tries to stay within the target pause milliseconds, but there are many ways it can fail to? Can it handle 100+ GB large heaps? Even if it is a hard guarantee, then, from the link
More ›