Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
_old_dude_
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
91.
▲
by
_old_dude_
4y ago
The problem of the Java code above is that it tries to serve many masters, one of them being the JIT, i.e. the code is written that way so the JIT can fully inline the whole code. The first "final", the "StatelessOp", th
92.
▲
by
_old_dude_
4y ago
Yes, this rings a bell :) But usually the issue is that people talk about OOP vs FP without specifying the scale, by example the Java stream API hide the mutations / side effects (not unlike Haskell monads do), so you can use { r
93.
▲
by
_old_dude_
4y ago
In Java -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining and -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation The generated logs can be seen with JITWatch [1]. [1] https://github.com
94.
▲
by
_old_dude_
4y ago
The main difference with Go is that the table of a HashMap in Java is a table of pointers, not a table of structs, so the overhead to not shrink the table is less an issue.
95.
▲
by
_old_dude_
4y ago
In Java, usually an Error like AssertionError is used for those cases. By example, for a switch on an enum, the compiler inserts a "throw new ...Error()" automatically when the default case is not specified.
96.
▲
by
_old_dude_
4y ago
Funding ! eclipse IDE is in majority maintained by IBM and IBM has decided to allocate less money to Eclipse.
97.
▲
by
_old_dude_
4y ago
It's not as bad as it seems because the language already have constructors. So instead of having a peculiar case for constructors, you unify constructors and methods by saying that void does not have to be specified. And i do not buy y
98.
▲
by
_old_dude_
4y ago
And Quarkus / microprofile API offers a programmatic API, ConfigProvider.getConfig() see https://quarkus.io/guides/config-reference
99.
▲
by
_old_dude_
4y ago
My wife (french) said it starts because Home Alone (1990) was very popular in France. Macaulay Culkin character is named Kevin.
100.
▲
by
_old_dude_
4y ago
or a function sort(), but it was clear by 1997 that there was a lot of money thrown around for everyone knowing how to write a backend in Java.
101.
▲
by
_old_dude_
4y ago
There is a follow up, the fix used in Java was not good enough [2]. [2] https://bugs.openjdk.org/browse/JDK-8203864
102.
▲
by
_old_dude_
4y ago
Microsoft is starting to port VS studio (IntelliSense) which is proprietary to VS code which is opensource. Current C# plugin (Omnisharp) is opensource, so they announce that it will be replaced by a closed source selector that let you choo
103.
▲
by
_old_dude_
4y ago
I will show my age, but did you try core war [1, 2] ? [1] https://en.wikipedia.org/wiki/Core_War [2] https://www.corewar.io/
104.
▲
by
_old_dude_
4y ago
It has practical value, let say you have something that caches the result of a lambda record Cache<T, U>(Function<T, U> function) { U get(T value) { ... } } you can use it that way var cache = new Cache<Integ
105.
▲
by
_old_dude_
4y ago
It is still an incremental/lazy DVCS, the first checkout does not download the whole repository, but for most users it looks like a DVCS.
106.
▲
by
_old_dude_
4y ago
The same feature does not entail the same tradeoff depending on the languages. For Kotlin, extensions methods are essential otherwise you can not extend existing Java types with Kotlin types. For C#, you need extension methods for LINQ beca
107.
▲
by
_old_dude_
4y ago
One issue to implement TCO is that the "security model"/circus of Java is based on the stack frames, so you can not remove stack frames without getting into trouble. The security manager has to be removed first [1] [1] https
108.
▲
by
_old_dude_
4y ago
The problem is not Linux per se, it's the fact that pthread_create [1] reserves 2M for the stack, so the process runs out of memory if you have 1 million threads (1M * 2M == 2T) [1] https://man7.org/linux/man-pages
109.
▲
by
_old_dude_
4y ago
> with standard APIs it is not even possible to parse an integer out of a string without allocating memory Not true anymore :) https://docs.oracle.com/en/java/javase/17/docs/api/java.base...
110.
▲
by
_old_dude_
5y ago
You need flow typing when you do pattern matching on generalized abstract data type (GADT). Here is an example in Java sealed interface Foo<T> permits Impl {} // union type record Impl() implements Foo<String&g
111.
▲
by
_old_dude_
5y ago
Jupyter notebook is a regression from Excel, at least Excel computes the dependencies between the cells. With Jupyter, you have to be careful in the order you evaluate the cells. And both falls on the floor the minute you want to use a spre
112.
▲
by
_old_dude_
5y ago
This is the runtime API, that uses the JITs to generate the trampoline codes necessary to go from the Java calling convention to the C calling convention (upcall and downcall), a kind of like libffi for Java. If you have a typed langages li
113.
▲
by
_old_dude_
5y ago
Or, less charitably, they have provided a trove of documents to the buyer so the buyer can outgrow their business using a competitor.
114.
▲
by
_old_dude_
5y ago
I think the busy loop version can use Thread.onSpinWait() to improve performance if the tryLock fails. [1] https://docs.oracle.com/en/java/javase/17/docs/api/java.base... ()
115.
▲
by
_old_dude_
5y ago
Azul (not affiliated) provides JDKs with JavaFX bundled https://www.azul.com/downloads/?version=java-17-lts&package=...
116.
▲
by
_old_dude_
5y ago
Since Java 9/11 (9 is not a LTS), String internals was reworked to use either 8 bits or 16 bits per char. [1] [1] https://openjdk.java.net/jeps/254
117.
▲
by
_old_dude_
5y ago
sealed typed are union types, granted they have been introduced very recently.
118.
▲
by
_old_dude_
5y ago
If you can, you can give a try to Quarkus, while the doc is not up to the level of Spring, in term of ergonomics, configuration, hot reload, test containers, this is closer to what .NET does, by example annotations are optional and are reso
119.
▲
by
_old_dude_
5y ago
I've recently used rewrite that comes with YAML recipes [1] for the common refactoring [1] https://docs.openrewrite.org/reference/yaml-format-reference
120.
▲
by
_old_dude_
5y ago
prettier [1] and google-java-format [2] [1] https://prettier.io/ [2] https://github.com/google/google-java-format
More ›