@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, (edited ) to random
@mackuba@martianbase.net avatar

Ok, wizards plz help 🥺

I have a table posts (), with a string repo (user DID) and int thread_id. Thread_id references the thread root post, around 1/6 of posts have thread_id NULL, the rest are replies. There's an index on repo+time and one on thread_id.

I want to select recent posts from one or more users that have thread_id NULL. But this very smart query planner uses the thread_id index to find posts, even though that will make it check 1/6 of all posts…

mackuba, to bluesky
@mackuba@martianbase.net avatar

traffic tonight:

mackuba, to random
@mackuba@martianbase.net avatar

Just out of curiosity, can anyone recommend a nice terminal-based editor (ideally with multi-file support) which is not any variant of Vi(m) or Emacs? 😄 I normally use Nano when editing files on a server, but I was wondering if there's maybe something better.

mackuba, to random
@mackuba@martianbase.net avatar

Pretty good summary of the drawbacks of having a single-user Mastodon instance that result from ActivityPub's architecture (and partially from Mastodon's implementation): https://mull.net/mastodon

It's nice to be in control of your account, but you need to know what you're getting yourself into.

mackuba, to random
@mackuba@martianbase.net avatar

question: if I have a main storyboard set in Info.plist, and an initial (entry point) window controller in that storyboard (with "single presentation"), so like in the Mac app Xcode template, the storyboard automatically creates the window controller and its window and displays it; can I get a reference to that controller from AppDelegate somehow? (Calling instantiateInitialController creates a second window controller for some reason…) 🤨

mackuba, to random
@mackuba@martianbase.net avatar

Oh wow… someone on StackOverflow recommended to use this for an animation; available in iOS since 3.1, on macOS added only in Sonoma 😳

mackuba, to OutOfTheLoop
@mackuba@martianbase.net avatar

I'm getting the impression that there's apparently some kind of drama about the iTerm terminal app?…

mackuba, to bluesky
@mackuba@martianbase.net avatar

launched DMs! 👀 (not federated or encrypted yet, just a v1) https://bsky.app/profile/bsky.app/post/3kt3y33tk4w2m

Took them like a month to build it all from start to finish :0

mackuba, to bluesky
@mackuba@martianbase.net avatar

I sometimes wonder how things would've looked on if the first beta had been ready just 6 months earlier, if all those people who left Twitter for Mastodon could have gone there…

I've just checked the hashtag feed for and apparently there were 19 posts in total… (and 9 of those from me) 😕

mackuba, to random
@mackuba@martianbase.net avatar
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 😆

mackuba, to random
@mackuba@martianbase.net avatar

That feeling when Mastodon people would rather side with Jack Dorsey than with the developers 🙃

mackuba, to bluesky
@mackuba@martianbase.net avatar

Jay, 's CEO, now has a bridged account here via Bridgy Fed 🙂 @jay.bsky.team@bsky.brid.gy 🦋

mackuba, to bluesky
@mackuba@martianbase.net avatar

has posted an updated protocol roadmap for the coming months: https://docs.bsky.app/blog/2024-protocol-roadmap

mackuba, to random
@mackuba@martianbase.net avatar

I don't need an iPad, I don't need an iPad, I don't need an iPad…

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 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 bluesky
@mackuba@martianbase.net avatar

Mastodon when launches: "it's Jack's social network"

Mastodon when told that Jack is not the CEO and doesn't own or control it: "but he's still on the board"

Mastodon when Jack leaves the board: "well Bluesky is dead now since Jack left"

mackuba, to random
@mackuba@martianbase.net avatar

Oh nice, looks like it's official 👀 https://docs.bsky.app/blog/self-host-federation

(I don't know what's the status of the "10 users" limit, at least the Bridgy PDS got it lifted, but even if it's not announced yet I think it's also going away / or will be relaxed soon)

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

Good read - interesting comparison of how moderation is handled on the Fediverse and , with Fedi being more like a "network of clubs" and Bluesky putting more emphasis on personal preference vs. closed communities, and what this means in practice: https://www.aendra.com/some-thoughts-on-running-a-moderation-service-that-blocks-screenshots/

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 bluesky
@mackuba@martianbase.net avatar

So apparently we've hit that 30% chance after all and didn't die before they allowed a bridge to run, who'd have guessed? 🤔

Somebody plz ping Evan about this - I'm not on Threads, I don't like commercial social media platforms 😈

mackuba, to random
@mackuba@martianbase.net avatar

Test 1

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