@mackuba@martianbase.net
@mackuba@martianbase.net avatar

mackuba

@mackuba@martianbase.net

Independent Mac/iOS & web developer. Building useless random stuff in Swift, Ruby or JavaScript and wasting time. Currently also learning Rust 🦀 I'm mostly hanging out on Bluesky these days and hacking things on the AT Protocol, so follow me there 😎 🐦 @kuba_suder 🦋 @mackuba.eu

This profile is from a federated server and may be incomplete. Browse more on the original instance.

mackuba, to SwiftUI
@mackuba@martianbase.net avatar

And one more thing today: I've updated the Index & Changelog with the new APIs from https://mackuba.eu/swiftui/changelog 😎

mackuba, to random
@mackuba@martianbase.net avatar

Huh, I haven't been following new proposals lately… The "noncopyable" section is some crazy stuff 😲 https://www.hackingwithswift.com/articles/258/whats-new-in-swift-5-9

mackuba, to bluesky
@mackuba@martianbase.net avatar

The by Snarfed was soft-launched this week - still very alpha and a lot of things don't work, but posts are starting to come through both ways 🙂

Right now you need to follow the bridge to get bridged (the DM-request mechanism isn't finished yet). I'm tracking the bridged accounts (M->B) here: https://blue.mackuba.eu/directory/fedi

mackuba, to twitter
@mackuba@martianbase.net avatar

I made another open source thing: BadPigeon 🐦 - a tool that lets you export tweets from without access to the API, by parsing JSON responses exported from a browser. Intended to be a drop-in replacement for Tweet class from the twitter gem: https://github.com/mackuba/bad_pigeon

mackuba, (edited ) to ruby
@mackuba@martianbase.net avatar

Oh man… I've been building several different versions of integration between and or JS whole evening… and I feel like this 😵‍💫 and ihavenoideawhatimdoing.jpg 🐶

But it's starting to work and it looks like it should be pretty fast ⚡

mackuba, to linuxadmin
@mackuba@martianbase.net avatar

Ok, VPS questions again: does anyone here have experience with VPSes in: ArubaCloud, Netcup, Ionos/1and1 or Scaleway (dedicated)? 🤔

mackuba, to ruby
@mackuba@martianbase.net avatar

Current status: I opened about 100 links to articles and threads from Google results comparing #ruby, #golang and #rustlang and I'm planning to read them 🫠

(no, I'm not really considering Go, mostly just trying to convince myself that I'm not making a mistake starting to learn Rust and not Go 🦀😛)

mackuba, to postgres
@mackuba@martianbase.net avatar

Anyone here used both and a lot and could tell me how they compare for larger DBs? Mostly in terms of performance, assuming I don't need some advanced features - talking about 10s or 100s of GBs, a lot of writes but not that many reads. 🤔

mackuba, to bluesky
@mackuba@martianbase.net avatar

Interesting comparison of disk usage on my two servers… I thought the first one with firehose/feeds would have much more use, but the second one with my Mastodon instance has comparable writes and much higher reads. You can also see when Bluesky goes to sleep, while Mastodon never sleeps 😛

(the Bluesky one is not an instance, ATProto federation isn't available yet - it just streams & saves all posts to Sqlite and uses that to serve custom feeds)

Disk usage charts of my Mastodon server. Reads and writes are more or less symmetrical, with more noise but not showing much variation depending on time of day, with an average of 25 read IOs per second and 16 writes.

mackuba, to random
@mackuba@martianbase.net avatar

I made an app for myself that I wanted to have for a long time: something to mark on a calendar on which days I went running or rode a bike 🏃🏻‍♂️🚴🏻‍♂️ I sat down yesterday and built an MVP in one evening, took me about 4 hours with 🙂

mackuba, (edited ) to random
@mackuba@martianbase.net avatar

One year anniversary of when #Twitter started dying.

Dying is still in progress, somehow

mackuba, to random
@mackuba@martianbase.net avatar

Hello from an ARM server 😎

I moved the Mastodon instance to Netcup as a test, I'll see how it behaves - if it's slower, I'll move it back, but if it's fast enough then I'll keep it and it will be half the price of the current one (~€6 vs €12) 💶

It might actually be faster - the CPU is slower at single-core, but there are 6 cores, there's way more RAM (8 vs 2) and a faster SSD. It does feel noticeably snappier, I think - I guess it suffocating in that 2 GB with an Elastic service…

mackuba, to bluesky
@mackuba@martianbase.net avatar

federation is now a thing! (*) 🚀🌌

(*) for 2 users on 1 separate server, but it's a start! 😄

mackuba, to ruby
@mackuba@martianbase.net avatar

I've been playing with benchmarking some regexp matching code in several languages last week (I want to replace that part of code with something faster - I was thinking of Crystal or Swift). ChatGPT helped me write some versions :)

The results were… unexpected. & Crystal didn't do well, but JS & PHP did 🤔

mackuba, to golang
@mackuba@martianbase.net avatar

It's insane that I can have a conversation with this thing and in a few moments and a few back and forths build a working program in a language I know nothing about (I don't know Go)… don't tell me this isn't huge 😳

You: One modification - this current code counts all matches of all regexps against the text. So if one line of text matches two or more regexps, it will be counted as 2 or more. I want a given line of text to only be counted once if it matches
You: What's the command to compile this to a binary? ChatGPT: To compile a Go program to a binary, you can use the go build command followed by the name of the Go file you want to compile. If you want to specify the output binary name, you can use the -o flag followed by the desired name. Assuming your Go file is named main.go, you can compile it to a binary named my_program like this: You: Looks like
You: Great, that works 👍 Is there some way to compile this program in "release mode", with a more optimized version or something? ChatGPT: Yes, you can compile your Go program in release mode with optimizations using the go build command with the -ldflags flag set to -s -w, and the -trimpath flag set to remove the build path from the resulting binary. Here's the command to compile your program in release mode: You: I mean, not optimizations for binary size, but optimizations to make it faster? ChatGPT: Ah, I see! In Go, optimization for speed primarily comes from the compiler's default optimizations, and there isn't a direct flag to enable additional optimizations beyond what the compiler already does. However, there are some general principles you can follow to improve the performance of your Go program: Profiling: Use Go's profiling tools (go test -cpuprofile, go tool pprof, etc.) to identify bottlenecks in your code and optimize them. Profiling helps you understand (…)

mackuba, to bluesky
@mackuba@martianbase.net avatar

tip: if you're running some kind of company/org account that's posting to Twitter/Mastodon etc. and you could consider posting to Bluesky too, but you need to integrate it into some existing system, there is a command line tool someone wrote here: https://github.com/mattn/bsky - it should be possible to integrate it with anything that lets you run a shell command. Handles images, link facets etc.

mackuba, to random
@mackuba@martianbase.net avatar

As someone who's been in the Bitcoin/crypto world since 2013, it's sad to me how in a span of a few years it went from a thing that geeks and hackers were naturally drawn to, to something almost universally despised by fellow programmers to the point I have to keep quiet about being a fan of it… I miss those early days.

mackuba, to bluesky
@mackuba@martianbase.net avatar

I swear, sometimes when I see what people write about / on Mastodon, I feel like I'm watching the Polish state TV controlled by PiS, if you know what I mean… Completely parallel reality, independent facts, split timeline.

mackuba, to bluesky
@mackuba@martianbase.net avatar

👷🏻‍♂️🔨

mackuba, to random
@mackuba@martianbase.net avatar

The funny thing is that you can also do that on Mastodon, it's just that some people here pretend like that's not the case… 🤷🏻‍♂️

mackuba, to bluesky
@mackuba@martianbase.net avatar

Testing my experimental cross-poster… 1 2 3 1 2 3 test test… 😎

mackuba, to random
@mackuba@martianbase.net avatar
mackuba, to random
@mackuba@martianbase.net avatar

Oh yesss new MacBooks! 🤩 That's earlier than I was expecting, gimme plz :]

I have an M1 right now, which is pretty fast, but I bought it with 8 GB of RAM and I need to micromanage open apps and I'm suffering 😩 https://9to5mac.com/2023/07/16/m3-apple-silicon-mac-october/

mackuba, to rust
@mackuba@martianbase.net avatar

New word learned: "monomorphization" 🤨 https://doc.rust-lang.org/book/ch10-01-syntax.html

(Please tell me there are no monads here 😛) #🦀

mackuba, to random
@mackuba@martianbase.net avatar

Current status: beta-testing DMs on Bluesky by making API calls to sendMessage and getMessages in the Ruby irb console, because I didn't feel like messing with npm and React Native, and I figured I'd rather dig into the code and do it manually 😆

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • tacticalgear
  • mdbf
  • InstantRegret
  • magazineikmin
  • Youngstown
  • thenastyranch
  • rosin
  • slotface
  • Durango
  • cubers
  • ngwrru68w68
  • anitta
  • cisconetworking
  • GTA5RPClips
  • modclub
  • tester
  • khanakhh
  • everett
  • provamag3
  • osvaldo12
  • Leos
  • normalnudes
  • ethstaker
  • megavids
  • lostlight
  • All magazines