Community

Short-form technical ramblings. Formerly VP of Architecture at Community.com, I'm Member of Technical staff at Mozi and co-author of "Docker: Up and Running" from O'Reilly Media.

Activity

Any interest out there in me writing a blog post on this PoC I did awhile back in #TruffleRuby? #Ruby

This #Golang production project at work has been a lot of fun so far. Nearly 20K LoC and the static binary is about 45MB :)

I compared ZStandard compression against GZip in #Golang for a workload that I have at work. ZStandard produces binaries that are about 5% smaller but takes 50% less time to compress and 50% less time to decompress. That's a real boost.

The Go implementation is here

I still use the Magritte #Ruby gem that I wrote 12 years ago in projects. It's a nice wrapper for piping data in and out of external programs.

Ceci n'est pas une pipe

Imagine if splitting a string were something that you could automate for your customers? #awscloud

https://repost.aws/knowledge-center/route53-resolve-dkim-text-record-error

GitHub actions *still* does not support #ARM64 natively in runners. ARM64 builds are run in Qemu on #GitHub's AMD64-based infrastructure. A build that takes less than a minute on my Mac takes 17.5 minutes on GitHub. Sorry, but that is unusable!

Amazon Keyspaces  from #awscloud is pretty interesting. It's a #Cassandra-compatible (with limitations) implementation on top of DynamoDB as far as I can tell. The nice thing about it is that it's serverless so you don't have the huge overhead for running a full Cassandra cluster. We are using it and so far so good. It has a few annoying limitations, though. These are the ones that I've hit:

  • Only supports Cassandra protocol version 3
  • Fancy IAM auth (the default) requires special client library support. You can use user/password auth–thus supporting all libraries–but it is a bit of a faff to set up.
  • Only supports write consistency LOCAL_QUORUM . It does support other consistencies on read.
  • Using TTLs on a table requires that you set a custom option using a CQL ALTER TABLE statement. However, this custom option pisses of real Cassandra (and Scylla) which you are likely to be using for local dev. Which requires a migration workaround.

If you can manage to work around that, it's pretty nice. And the price is attractive.

We relaunched crystal-lang.org with an updated design and a ton of improvements. 🎉🥳
Hope you like it!

Read the anouncement: https://crystal-lang.org/2024/03/27/website-relaunch/

#CrystalLang #website #relaunch

HertzDevil is in need of a new job. You probably know who he is: Core Team member since mid 2022, and main developer behind the recent advances in Windows support. And that’s not only it, he has done lots of work in very distant parts of the compiler and ecosystem. You’ll have fun reading through the almost 700 PRs¹ that he got in.

As his team lead this past year, I’m sorry to let go such an amazing person. Funding reasons forced us to. I have a privileged spot to see him working, an experience I can share with anyone interested. Quite frankly, he’s the Messi of Software Engineering, but with a humble heart!

#fedihired #crystallang #jobsearch

¹ https://github.com/crystal-lang/crystal/pulls?q=is%3Apr+is%3Amerged+author%3AHertzDevil

Go `sqlmock` from Data Dog can be useful for making sure you know exactly which queries are being sent to the DB. But it has a limited set of type matchers and when matchers don't match, it's so hard to figure out what was actually sent. It supports custom matchers.

I figured out a little pattern I like there I pass `t` from the test (`testing.T`) into the custom matcher's struct and then use `t.Log()` to pass back what the heck was wrong with the value passed. So many WTFs saved when tests fail. #Golang

type MicrosTimestamp struct {
    t *testing.T
}
func (r MicrosTimestamp) Match(v driver.Value) bool {
 i, ok := v.(int64)
    if !ok {
        r.t.Log(fmt.Sprintf("TESTS: MicrosTimestamp got %v which is not an int64", v))
        return false
    }
...