Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rogerkeays
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
Re-Evaluating GPT-4's Bar Exam Performance
(link.springer.com)
122 points
by
rogerkeays
2y ago
|
137 comments
2.
▲
by
rogerkeays
2y ago
Andrews PW, Thomson JA Jr. The bright side of being blue: depression as an adaptation for analyzing complex problems. Psychol Rev. 2009 Jul https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2734449/
3.
▲
by
rogerkeays
3y ago
Good point. Actually the plugin didn't handle this case either (fixed now). Thanks for the feedback.
4.
▲
by
rogerkeays
3y ago
You don't think it would limit the independent use of f()?
5.
▲
by
rogerkeays
3y ago
This language looks really cool. Thanks for sharing.
6.
▲
by
rogerkeays
3y ago
You can also rethrow checked exceptions as runtime exceptions by exploiting type erasure: public static RuntimeException unchecked(Exception e) { Exceptions.<RuntimeException>throw_checked(e); return null;
7.
▲
by
rogerkeays
3y ago
... not sure if serious or not
8.
▲
by
rogerkeays
3y ago
I put Java's popularity down to good support for Corporate-Oriented Programming ;)
9.
▲
by
rogerkeays
3y ago
You still get warnings about checked exceptions from this plugin, so it's not entirely flying blind.
10.
▲
by
rogerkeays
3y ago
I think this project shows how trivial it is to convert checked exception errors to compiler warnings. https://github.com/rogerkeays/unchecked/blob/f22c8cde3557de0... No need to change the type hierarchy. Jus
11.
▲
by
rogerkeays
3y ago
Good point...
12.
▲
by
rogerkeays
3y ago
Ha, yeh. At first I had the command line examples first, but everyone was going on and on about maven and stuff, so I figured that's what the audience wants. [EDIT] I moved the command line stuff back to the top of the README. XML make
13.
▲
Unchecked Java: Say goodbye to checked exceptions
(github.com)
143 points
by
rogerkeays
3y ago
|
291 comments
14.
▲
by
rogerkeays
3y ago
The "what to do" and "tests" sections of this article is spot on! As for the sociopath/psychopath distinction, I think both terms refer to people with a Cluster B personality disorder. Since this is such a mouthful,
15.
▲
by
rogerkeays
3y ago
OK, sorry.
16.
▲
by
rogerkeays
3y ago
and a MyStringBuilderInterfaceProxyFactory too of course
17.
▲
by
rogerkeays
3y ago
The JDK team won't like this. As it is Fluent, Lombok, and (I presume) Manifold are using all sorts of unsupported hacks to access compiler internals. If you restrict yourself to the compiler plugin API you don't get much mileage.
18.
▲
by
rogerkeays
3y ago
sweet
19.
▲
by
rogerkeays
3y ago
IDEs are not my strong point. Aren't they smart enough to just search static methods in the scope of the compilation unit? Okay, so they have to be indexed first I suppose, but still... Ah, I suppose you want to search for methods you
20.
▲
by
rogerkeays
3y ago
How do you do the same thing to java.lang.String?
21.
▲
by
rogerkeays
3y ago
Nice example. The extra parameters really drive the point home. Hope you don't mind if I steal it for the README.
22.
▲
by
rogerkeays
3y ago
I don't know yet. I'm already using some of my own variations of sneakyThrows, but what I really want is just to disable the whole damn thing in the compiler (checked exceptions are a compiler feature, not a JVM feature). I won&#x
23.
▲
by
rogerkeays
3y ago
Yes, inheritance is a nightmare!
24.
▲
by
rogerkeays
3y ago
Fluent transforms the abstract syntax tree at compile-time resulting in .class'es in a .jar that always work at runtime. There are no runtime dependencies.
25.
▲
by
rogerkeays
3y ago
The syntax tree is only transformed when instance method lookup fails. i.e. when your code doesn't compile in standard java form. You would be doing pretty well to accidentally call an extension method seeing as you either have to writ
26.
▲
by
rogerkeays
3y ago
You can call a static method on an instance. This project allows you to call static methods not defined within the instance's class.
27.
▲
by
rogerkeays
3y ago
Do you really think a JEP is worth investing my time in? AFAICT, the Java gods have already made up their minds on extension methods.
28.
▲
by
rogerkeays
3y ago
Thanks for the link. I've been trying to find the canonical answer to this question myself. There's the philosophical standpoint: API designers should control their APIs , and the technical: poor reflective discoverability, poor
29.
▲
by
rogerkeays
3y ago
Just to make it clear, Fluent does not use any annotations.
30.
▲
by
rogerkeays
3y ago
Yeh, backwards compatibility is one of the biggest selling points of Java. Hopefully, Fluent will show that we can change one or two lines of compiler code and not burn down the whole house. We'll see.
More ›