Show more

So apparently I can’t read the clock and went home from work an hour earlier than intended <_<

I want to add new parameters to functions at compile-time, not at runtime. I.e. in my library have

func foo(name: String)

then in a later release add a parameter

func foo(name: String, age: Int = 0)

and have it auto-generate

func foo(name: String) { foo(name: name, age: 0) }

Would be nice for API design if prog. languages let you add a parameter to a function in a binary stable way. I.e. right now you always need to define an adapter with the signature of the old version that calls the new version to ensure linkage is correct. Y U no autogenerate?

Some Asshole: humans are just naturally inclined to selfish behavior because of evolution

Humans: *form social bonds with strangers*
Humans: *form social bonds with animals*
Humans: *form social bonds with plants*
Humans: *form social bonds with robots*

Does it make sense to allow division by zero in a programming language?

In a general purpose language? Probably not. When dealing with aspect ratios? Maybe.

It’s common to have a pane collapse to 0 on one side, and a sensible behavior is the constrained box to also be 0x0.

Whoever invented orange juice: You’re awesome.

Let me know if you come up with anything else, I’m sure it’ll rock.

Ist dieser „Leberkäsjunkie“- Film eigentlich außerhalb Bayerns auch so groß plakatiert? Oder ist das ein lokales phänomen?

Random thought of the day: If I ever go into game development and get business cards, I want the job title to read “Game Mechanic”.

Is there any way to give Swift‘s Set a custom comparator? I‘d like to keep a list of objects based on a particular property, so I can‘t use Comparable because that looks at all properties.

Anyone have any good rules-of-thumb for naming Swift methods? Particularly if there are any tricks to include constraints in the name without the whole method call becoming un-English?

db.setPrimaryKey(of: record, to: key)
db.setPrimaryKeyIfPresent(of: record, to: key) ← weird.

Nice little glitch in Assassin’s Creed: Odyssey: The NPCs on the road and your horse use the same pathfinding algorithm, which means when you tell it to take you to a map location, it will mow down any and all pedestrians on its way XD

I really wish a resettable lazy property was a thing in Swift.

Forgot to remember a result in C++ and realized that couldn’t have happened in Swift three times over: 1. The method would have needed @ discardableResult, 2. init would have complained about the un-initialized property, 3. using the property would have complained about NIL.

TIL about Swift’s Unmanaged.passUnretained(self).toOpaque() for interacting with C APIs, and about the &+= operator (overflow operator) and its friends. (

Anyone know how to correctly implement async Publisher + Subscriber in Combine (so pushes instead of pulls)? I have a ThingManager I can subscribe to and it’ll call a closure I provide. Is this the right way?

Template parameters in Swift error messages always look like a surprised grave digger. Whoever came up with that syntax, thanks for the smiles:


Hey, if I have a framework that does iOS 12 stuff, and I want to add one class/extension to it only for iOS 13, which uses 13-only API, can I do that without making the extension its own framework?

Like if but around a class?

I remember learning about linked lists because that’s how you searched for a particular window on classic macOS. They’re a fun and fairly straightforward concept if you know pointers.

That said, I’m happy i don’t need to use them in my day-to-day work anymore.

Anyone ever made their own wristwatch out there? Preferentially a wearable really dumb computer with always-on display and battery time of at least 3 days? Also with a decent built-in clock?

Anyone know where to start? Are there tiny mainboards that fit that bill?

Show more
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!