Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bloomthrowaway
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
bloomthrowaway
8y ago
It's the default because in any garbage collected language you can delay taking out the trash as long as you want... as long as you have memory. The most efficient thing to do is never run the collector at all. JS does frequent GC cycl
32.
▲
by
bloomthrowaway
8y ago
It should be able to... Hopefully Go and Java will be some of the first GC languages to target WASM, and we'll find out :) . Personally I'm more worried about the size of the GC getting added to the binaries than how fast it is.
33.
▲
by
bloomthrowaway
8y ago
I'm really excited for WASM, it should be nearly as fast as native code. Java and native code aren't far apart though, so I would say 1.5-2x faster generally
34.
▲
by
bloomthrowaway
8y ago
>Slowness isn't a property of the language it's a property of the runtime This is true to an extent, but look at the time and money poured into PHP and how slow it still is after all these years. Language design choices have a
35.
▲
by
bloomthrowaway
8y ago
Nice! I think it may be slightly out of date though. For example, you don't need Tuples library if you use Apache commons because it has Tuple support. Also, Javaslang has been renamed Vavr. Still a solid article though
36.
▲
by
bloomthrowaway
8y ago
VS Code support for Java ain't bad
37.
▲
by
bloomthrowaway
8y ago
> Concern 5: Java is too slow/consumes too much memory It's sad that this is still a thing. Compared to more trendy languages like Python and Javascript, Java is very light on memory. JS is known for being fairly fast and "
38.
▲
by
bloomthrowaway
8y ago
maybe, but its cleaner in other ways. It burns hotter and more efficiently, creating less CO2 and some other byproducts by a decent margin. It produces more SO due to fuel sulfur content, and more NOX which is produced because of high tempe
39.
▲
by
bloomthrowaway
8y ago
In the auto industry its generally understood that the emissions limits are so low, especially for diesel, that its physically impossible to meet them in some situations like cold engine + cold weather and when driving up grade. Emissions r
40.
▲
by
bloomthrowaway
8y ago
I wouldn't do it. You should split your services out of necessity, not as a design pattern. Service meshes are also quite immature at the moment and basically guaranteed to give you lots of pain. Inter-service communication adds a ton
41.
▲
by
bloomthrowaway
8y ago
I don't mind threads when they're done right. Every Java app server is multi-threaded and I don't remember the last time I ran into deadlocks. It's best for performance and readability to have both threads and async supp
42.
▲
by
bloomthrowaway
8y ago
I don't like Javascript at all, even with all the linters I could find its too easy to make mistakes. Too many old broken language constructs they can't fix. Java's strongest sell has always been an extremely reliable platfor
43.
▲
by
bloomthrowaway
8y ago
> - Python: as a first language of choice replacing Visual Basic or Java. I don't see this happening in practice. Python has taken over the niche of Perl/PHP/Ruby/Bash almost completely but traditional uses for Java a
44.
▲
by
bloomthrowaway
8y ago
multiple hash functions only exist because they don't use secure hashes (for speed reasons) so there's collisions. Normally for passwords you would use a secure hash, negating this
45.
▲
by
bloomthrowaway
8y ago
you're right, although I don't think compression would save a ton of space since the hashes are random. Might save a bit or maybe 2 per entry
46.
▲
by
bloomthrowaway
8y ago
Bloom filters don't do anything special to change FP rates, a compact list of random hashes is always more efficient than using a Bloom filter until the filter is 100% full
47.
▲
by
bloomthrowaway
8y ago
its the same structure as a Bloom filter but more efficient because it has no empty slots
48.
▲
by
bloomthrowaway
8y ago
you can compress it by just truncating the hashes as short as you want
49.
▲
by
bloomthrowaway
8y ago
If you use a secure hash on the banned passwords they will be random (as good as arbitrary), then just truncate them to 7-8 bits and sort by prefix, searching them using binary search. It will be more efficient than a Bloom filter because t
50.
▲
by
bloomthrowaway
8y ago
Sorry to say this, but this is actually worse than just truncating the hash. Why? Bloom filters are designed to maintain a reasonable false positive rate while still allowing you to add items extremely quickly (high insertion rate). Since t