256 karma · joined Jun 14, 2020 (6y ago) · 76 submissions
comment 2mo ago · link · parent
Last 5-6 years: COVID surge in HN brings in more people
Last 3-4 years: General rise in AI topics which have broad appeal and brought in a lot of people
Last 2-3 years: More overtly political discourse on HN bringing in more people
Last 1-2 years: Bots start coming in, some are very obvious, but they have gotten better and better to the point its hard to tell anymore.
Last year: Sharp rise in shallow redditor-style comments, especially in cultural/political discussions comments that are snarky but contribute little to discussion outside of affirmations like "Laws are for poor people"
comment 5mo ago · link · parent
- AI loves to use "consumers" instead of just saying people or Americans
- "You’ve spent time and budget on it, yet your audience can’t name a single company they think is doing it well. "
- "The small moments that used to make the web worth visiting are disappearing."
- "The brand that builds that recognition first gets to define the standard."
Nearly every sentence has an AI-ism...
comment 5mo ago · link · parent
Early on this outage it was just the 3.5 pro models affected, then flash started having issues, and now flash-lite is not being responsive.
Slightly related, but has anyone else using the gemini cli noticed that over the past few months, usage of the Gemini 3 pro models frequently times out or hangs? Antigravity cli has been better about this but the quotas are just so low with the 5-hour window bs.
comment 1y ago · link · parent
To complete the analogy, Tesla is invested in vision-only technologies, while its competitors are making gains with Lidar and other tech that Tesla refuses to acknowledge. It's very reminscent of Roomba in the mid 2010s.
The Matic is a cool little robot though.
comment 1y ago · link · parent
comment 2y ago · link · parent
Even just reading your foobar example at a glance took a moment for me.
And case insensitivity is also generally frowned upon. To have a language with both sensitivity and insensitivity is the worst of all worlds with none of the benefits.
If you want to understand why at a deeper level I would recommend reading readability or the case insensitivity sections in any programming languages book. Personally, I enjoy Programming Languages, Principles and Practice (Louden & Lambert)
EDIT: Yes, I get it, it doesn't affect YOU. But it doesn't mean it doesn't affect other people. Non-english languages and/or speakers are an easy example. It also eliminates a whole class of human error, and maybe that only affects non-experienced juniors, but they exist too. There are other issues with symbols being case insensitive and string values being case sensitive. If you want a practical example a classic one is HttpsFtpConn vs. HttpSftpConn
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Which is why I said you probably don't want to use the paradigm I outlined for I/O, but if you did you would want to leverage Java's Managed Blockers and async Completeable Futures for those exact reasons.
> Virtual threads makes the memory overhead lower since you don't need full separate stacks and reduces the cost of spawning new threads, neither of which was ever an issue with streams since they use the common thread pool. Virtual threads don't significantly increase the per-thread performance.
Of course virtual threads don't significantly increase per-thread performance? They make the overhead of spawning multiple threads minimal-to-zero compared to native OS/platform threads, minimizing the cost of jumping from sequential streams to parallel streams. Also, parallel streams don't have to use the global fork join pool, you can use your own fork-join pool? Which is possible in Java, because once again, streams are treated as a first-class citizen and can leverage nearly all other parts of the language efficiently and natively (although I will say Java's verbosity/boilerplateness can suck if you want to leverage your own fork-join pool, but that's widespread complaint of Java not specific to its streams)
comment 3y ago · link · parent
With that said, you should almost always write a stream thinking only sequentially first, then identify steps which can benefit from .parallel() and only parallelize those steps. Its leveraging .parallel() efficiently that provides an advantage at run-time and why I tend to use it.
comment 3y ago · link · parent
Also, that is definitely not the rule? If your problem is parallelizable by nature, parallelism provides massive speedups. Overhead from parallelizing a stream is minimal (effectively nonexistent) now if you leverage Java virtual threads (JDK 21). Additionally, most problems are not parallelizable, yes, but most solutions consist of individual steps and there is a high likelihood that at least one of those steps will benefit from parallelism. Java streams can switch between .parallel() and .sequential() execution on the go. You almost certainly don't want to leverage stream parallelism for most I/O operations, unless you leverage Java's Completeable Futures and Managed Blocking (but any gains here are probably minimal anyways) but the point is that you can leverage them, because streams in Java are a first class citizen.
comment 3y ago · link · parent
Java streams bring real benefits compared to other mature languages. My favorite is that sequential streams can be efficiently parallelized with a single operation, .parallel(), and sequentialized back, .sequential(), on any stream without having to configure a single knob manually (although you certainly can), an equivalent I am unaware of in any other matured language. These make operations such as .collect() and its mutable reductions leverage multiple threads for effectively 0 additional programming time.
edit: A lot of people are focusing on my favorite feature of parallelizing or serializing a stream with a single command, which apparently you can also do in C#, that was just an example guys. Other cool things you can do with Java streams natively now is leverage virtual threads (take that C#), use them asynchronously with completable futures, define how elements are accessed/gathered in streams via spliterators, etc. Streams in Java are very composable (not just as in composition, but as in utility), and enable leveraging nearly every other part of the language natively. In other mature languages, streams are very rigid and feel non-composable. I'm not saying that everything is impossible in other languages, but that in Java streams feel like a first-class citizen.
comment 3y ago · link · parent