If you ever find yourself wondering whether your design is good enough, remember that because the Golang developers opposed generics so adamantly the Kubernetes community ended up with a code generation script (which has the templates defined as string literals and only seems to run in $GOPATH) that is being used to provide type safe client objects for every single API resource. Yikes!
Thinking about making a HaxBall clone.
It's surprisingly fun for how dead simple the game is but network latency is big enough of an issue to make me consider rewriting the whole thing. I would probably make it local-only but who knows, maybe some of the network issues could be remedied by client-side predictions (I can't tell if that's already implemented in the original and if it would make any difference considering how sudden the input changes can be though).
@neauoire how are you storing text in your editor? Is it just a large continuous string? A string per line? Something fancier?
I've been planning to make a blog for years at this point but whenever I sit down to write a post for it I quickly get tangled up in trying to make each sentence perfect which takes all the fun out of writing. In the end I never manage to make more than a few paragraphs I'd be happy with and it's never complete. I feel like I'm closer to completely giving up than to actually finding a way to do this that works for me.
If you ever find yourself interfacing native code with Java remember that calling any of the functions meant to throw an exception don't actually cause your C or C++ logic to stop executing. The JVM can only process the exception after the JNI code returns.
This may be more or less obvious depending on what you're used to but I imagine C++ programmers may easily fall into this trap potentially triggering a lot of undefined behavior.
Day 16 of #adventofcode was pretty fun. I had to go through a lot of steps to get the final solution but fortunately, that didn't have any big effect on the performance. It's one of those days which can't be solved in a mere few lines but the simple initial idea is enough to get it all done.
My day 10 #adventofcode solution is really unsatisfying. I couldn't figure out a way to solve it properly so I just found a pattern in the data and exploited it. I'll have to go back to it because it's a clear demonstration of a gap in my knowledge.
Today's #adventofcode wasn't too difficult but I'm still not convinced my solution for part 2 is correct (even though I got the right answer). I came up with it intuitively and I can't shake off the feeling that it doesn't work on all possible data. Can anyone help me confirm that it works on all sequences of natural numbers?
#adventofcode day 4 is complete! I have decided to fully embrace hacky, get-it-done-quick code.
I have to credit Peter Tseng for his Ruby solutions. I usually clean up my solutions before uploading them and that usually happens after taking a look at how Peter has done it. This often leads to them looking very similar (as long as the initial solution bears any similarity).
For those who want to make #adventofcode more competitive check out this extension https://addons.mozilla.org/pl/firefox/addon/advent-of-code-charts/
It feels weirdly liberating to not have an audience of thousands reading these things. I’ve subconsciously always prided myself in having more followers than tweets, but that made the medium difficult to use for more personal content. Not wanting to post ‘unpopular’ content and all.
This is not my first time on the Fediverse - but thinking of not advertising this one. And maybe actually making use of the higher character limit this time. Already catching myself using Twitter-style shorthands.
I should clear my desk mat, I know 😞
@michał at Hackerspace Pomorze (@hspsh)
Spokojna przystań dla hakerów, mejkerów, i wszelkiej maści kreatywnych i technicznych osób z okolic trójmiasta. Celem 0x3c.pl jest łączyć osoby zaangażowane w różne społeczności na terenie trójmiasta i pozwalać na wymianę wspólnych zainteresowań.