Pinned toot
Pinned toot

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 love this approach. If you're not working with tools that make your job easier, then what are you doing?

rachelbythebay.com/w/2020/02/0

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.

rapitasystems.com/blog/what-re

I always thought variadic arguments in C were the weirdest thing and it turns out it's that way for a good reason:

retrocomputing.stackexchange.c

(it's trying to preserve historic hacks if you haven't guessed it)

l really need to set aside a couple of hours every week for programming. I work out more than I code recently but my brain needs a workout too!

I keep coming up with cool project ideas and then

not
doing
them

yakub boosted

Apparently, USB DSL modems are a thing and you can use them to plug your computer into a phone line and makes calls:

iotbytes.wordpress.com/record-

Using some VoIP technology would probably be easier but you have to agree with me that it's nowhere near as cool.

I need to spend less time with people and more with computers. I haven't worked on any personal projects in ages and it's making me pretty miserable.

yakub boosted

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.

Show thread

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.

Why?

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:
idiosyncratic-ruby.com/17-stre

From 7z man page:

-r[-|0]
Recurse subdirectories (CAUTION: this flag does not do what you think, avoid using it)

I didn't even need to do that but now I can't help but wonder what this flag actually does 🤔

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).

I spent so much time handling errors in C recently that I'm starting to really understand why goto is actually a pretty reasonable feature of the language.

@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.

Show more
0x3c.pl

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ń.