Live data from Hacker News

Show HN: Minum – A minimal Java web framework

github.com

111–113 of 113 posts

Re: Show HN: Minum – A minimal Java web framework

#111
post #64

Earlier quoted context omitted.

There are locks around those - for example, writeLock

I mean race conditions between the operations, e.g. an update followed by a delete: 1. update x in memory 2. delete x in memory 3. update fn checks for file on disk 4. delete x from disk 5. update x on disk Is this not possible and you end up with different state in memory and on disk.

great find. i’ve got some adjustments in mind, mainly carefully placed locks. i’d like to give you credit for the call out in the docs/acknowledgment file. is there some better way to reference you than jabradoodle? the code i’m considering is in the branch under_consideration.

Re: Show HN: Minum – A minimal Java web framework

#112
post #31
post #25

Earlier quoted context omitted.

> The real nice thing about Java is everything is statically typed Optional and generics would like a word... Edit: OK, since this got a downvote, let me be clearer, with some help from the parent: You just use Optional , and if you're lucky some of your dependencies BUT NOT ALL OF THEIR TRANSITIVE DEPENDENCIES also use Optional correctly and don't return null, and before you know it you've lost the nice safety and i…

I have never ever ever seen a null inside an Optional -- the most common constructor actually Optional::ofNullable makes the correct decision, so you can't even fck it up, and if you deliberately try to, I'm sure intellij would scream your head off.

The reason you've never seen it is because it won't let you,

private Optional(T value) { this.value = Objects.requireNonNull(value); }

Re: Show HN: Minum – A minimal Java web framework

#113
post #111

Earlier quoted context omitted.

I mean race conditions between the operations, e.g. an update followed by a delete: 1. update x in memory 2. delete x in memory 3. update fn checks for file on disk 4. delete x from disk 5. update x on disk Is this not possible and you end up with different state in memory and on disk.

great find. i’ve got some adjustments in mind, mainly carefully placed locks. i’d like to give you credit for the call out in the docs/acknowledgment file. is there some better way to reference you than jabradoodle? the code i’m considering is in the branch under_consideration.

Thanks that is kind of you. For the time being I would rather not tie my real life identity to my Internet identity.
Post reply on HN