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!
I didn't realize there were so many alternative frontends for popular websites.
I love this approach. If you're not working with tools that make your job easier, then what are you doing?
Fascinating for two reasons - the bug is pretty unexpected but it also shows how essential it is to be able to modify systems you don't have physical access to.
I always thought variadic arguments in C were the weirdest thing and it turns out it's that way for a good reason:
(it's trying to preserve historic hacks if you haven't guessed it)
Apparently, USB DSL modems are a thing and you can use them to plug your computer into a phone line and makes calls:
Using some VoIP technology would probably be easier but you have to agree with me that it's nowhere near as cool.
I would've never known about this and many other features of Ruby if it wasn't for the Idiosyncratic Ruby series.
Reading it you may think that Ruby has a lot of obscure elements hidden from general knowledge and generally suffers from feature bloat.
Is it true? Pretty much.
Is that bad for a programming language? Yeah.
Is that bad for a scripting language for one-off scripts and shell one-liners? No way.
I don't use Ruby much these days but I'm still very happy that I know it. Otherwise, I'd be very sad I don't know Perl.
Some tasks are so much easier to do with an actual programming language than by creating a long pipeline of sed, awk, etc.
In some scenarios, Ruby can even be used as a drop-in replacement for those tools!
Check out this post on stream editing in Ruby:
I'm actually surprised you can do so much worse than printf when formatting integers.
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.
@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ń.