Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
moring
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
211.
▲
by
moring
3y ago
I didn't know this was a thing... what a major oversight! Now one big reason for Guava has just disappeared. Thanks a lot!
212.
▲
by
moring
3y ago
Thank you for your feedback. I'm using Guava because of its immutable collections. There are alternatives, so changing this is probably not that hard. However, it would help to know what exactly you don't like about Guava, to avoi
213.
▲
by
moring
3y ago
> How about error handling? This is a very general question, so I have to give a general answer. Application-level errors are expected to be thrown as exceptions. Unknown exceptions will result in a 500, as usual, in particular to not le
214.
▲
by
moring
3y ago
See https://news.ycombinator.com/item?id=36284955
215.
▲
by
moring
3y ago
Thanks for your feedback. grumpyrest is not averse to dependency injection, but rather trying to "get out of the way". In particular it does not rely on (automatic) DI. My intention is that you can totally use it in a project th
216.
▲
by
moring
3y ago
Do you have your code publicly available? I'd like to have a look on how you did it.
217.
▲
by
moring
3y ago
> Some people have an aversion to "goto" statements, and Java annotations are even worse, they're a "comefrom" statement, where you end up executing code before or after your function based on this annotation, so
218.
▲
by
moring
3y ago
Thanks for your feedback. I'll take that into account. You are totally right about having to mock RequestCycle, which isn't good. Furthermore, RequestCycle isn't really mockable in its current state. I'm planning to solv
219.
▲
by
moring
3y ago
How do you identify the executed code? I don't even know how to start. You cannot single-step into it from the annotation, nor can you select the annotation, "go to definition" and see the code. You can "find usages&qu
220.
▲
by
moring
3y ago
I did not know Takes, and I'll definitely have a closer look. Thanks a lot!
221.
▲
by
moring
3y ago
Thanks for your feedback. The README has been criticized in another comment already, so I'll definitely take that serious.
222.
▲
by
moring
3y ago
Thanks for your feedback. My experience with code generation from an OpenAPI spec wasn't that great, to be honest. The comments about performance are based on earlier experience with a similar scenario in which code generation _did_ im
223.
▲
by
moring
3y ago
Hi, thanks for your feedback. Maven integration is not there yet. Gradle makes it easy to generate a POM, but I have honestly never published anything to central, and I don't even know what is necessary for that. I have added this to m
224.
▲
by
moring
3y ago
I don't know why this was downvoted. Spark was actually one of the alternatives I considered before I concluded that I couldn't find any framework that suits me, and started writing grumpyrest. The main issue I had with spark was,
225.
▲
by
moring
3y ago
The issues that I see with Spring aren't really code snippets from SO, but the fact that annotations drop all the advantages that Java had as a language. Just two examples: When you create an Object of the wrong class and try to pass i
226.
▲
by
moring
3y ago
I added a simple example to the README that shows for to build a single-endpoint API and also how to do things in JSON with the type system instead of annotations.
227.
▲
by
moring
3y ago
Keep in mind that I had to cram as much useful information as possible into a single headline. The GitHub page says "without _automatic_ dependency injection". What grumpyrest does is sometimes called "poor man's DI"
228.
▲
by
moring
3y ago
Thank you for the feedback. I'll keep that in mind for the next version.
229.
▲
Show HN: Java REST without annotations, DI nor reactive streams
(github.com)
148 points
by
moring
3y ago
|
138 comments
230.
▲
by
moring
3y ago
There is another side to this coin, too. It is clients that describe their needs, not some specific and wrong solution, and then either get told they did not do their homework, or their needs getting ignored by a dev who thinks he is smarte
231.
▲
by
moring
3y ago
If you have a rough idea how it works, include these in your google queries to get results that go into details ;) Some more things to include: - perspective correction may be needed (the surface with the QR code is not parallel to the imag
232.
▲
by
moring
3y ago
> I mean, the same argument has been applied to other cryptographic tools. Why encrypt your messages, unless you're sending something sketchy? Why obfuscate programs, unless you're hiding something? There is a huge difference:
233.
▲
by
moring
3y ago
Also, there often isn't a single "root" cause. Causality is a DAG. To start, the alternator belt can simply break even when well-maintained. It can break when under stress due to another part that isn't working correctly
234.
▲
by
moring
3y ago
What happens if the code gets pre-empted between free_foo(whatever) and the if-statement, memory allocation gets changed, and subsequently dereferencing the pointer to read whatever->did_something causes a page fault? I am making assum
235.
▲
by
moring
3y ago
Let me rephrase my question: Is there actually such a thing as an "unexploitable use-after-free"? How would that look like? How would you reason that it is actually unexploitable? Context: My experience with C programming is that
236.
▲
by
moring
3y ago
Honest question: Why did they build an exploit that uses the bug? I always assumed that use-after-free is equivalent to "game over" (i.e. I assumed that local privilege escalation is a given) and it is clear that such a bug must b
237.
▲
by
moring
3y ago
I think that analogy is broken. Measuring a coastline more precisely doesn't just become more complex (measuring precisely often does), but actually increases the measured length towards infinity. Unless you wanted to say that the same
238.
▲
by
moring
3y ago
Amateur-me thinks that it would not be too hard to prevent such an attack: Have a voltage fault detection circuit at all (TPM-relevant) supply pins that hard-locks the chip until it gets power cycled, and have those circuits be powered by o
239.
▲
by
moring
3y ago
> Index on Boolean is useless, it's an easy mistake that will take memory and space disk for nothing. Why? Is it because an index on the bool alone, with symmetric distribution, will still leave you with half the table to scan? In o
240.
▲
by
moring
3y ago
> It seems to me that the point raised by moring is more like (...) Yes, that was what I meant. It was admittedly fueled by the confusion when I started from "did I miss some major news", as well as a lack of knowledge of what
More ›