@nicklockwood@mastodon.social avatar

nicklockwood

@nicklockwood@mastodon.social

iOS. 3D graphics. Retro games. He/Him.

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

mcc, to random
@mcc@mastodon.social avatar

Hello. My computer is not working. Can anyone give me some advice?

nicklockwood,
@nicklockwood@mastodon.social avatar

@mcc have you tried switching to Linux? Or if it's already Linux, have you tried switching to macOS?

nicklockwood, to random
@nicklockwood@mastodon.social avatar

I briefly considered using this image to illustrate the concept of "progressive disclosure" in my Swift talk but ultimately thought better of it 😅

finestructure, to random
@finestructure@mastodon.social avatar

30 hours into and it's great fun. It's not the most compelling story in the world but the graphics and the mechanics are great. An excellent space shooter, and native to the Mac to boot.

I'll be damned if Rockfish Games aren't looking into or even already working on Everspace for the Vision Pro. Feels like a no brainer. Surely Apple must be talking to them about it?

nicklockwood,
@nicklockwood@mastodon.social avatar

@finestructure the name Rockfish sounded vaguely familiar - it turns out they are a spinoff of the Fishlabs studio that made Galaxy on Fire 2, which was maybe my favorite ever space shooter.

(Shame Everspace isn't on iOS tho)

nicklockwood, to random
@nicklockwood@mastodon.social avatar

Does anyone know of a really nice tool for doing presentations with a lot of code in them (including transitions, etc)?

I generally use Deckset because it takes care of syntax highlighting at least, but otherwise it's very limited.

Keynote can do anything, but only with a huge amount of fiddly effort put into each code sample and animation.

I ideally just want something that takes a markdown document as input and "magic moves" all the transitions for you automatically with minimal effort 😅

nicklockwood, to random
@nicklockwood@mastodon.social avatar

In a fit of madness I've agreed to give an internal talk about advanced Swift at my company. Has anybody got any favorite Swift tricks they'd like to share?

nicklockwood,
@nicklockwood@mastodon.social avatar

@ctietze this is a great tip - also other related for loop syntax quirks like for case let foo as type and where clauses

ctietze, to random
@ctietze@mastodon.social avatar

Objective-C professionals around the world, I summen ye 🗺️

Is there not a way to annotate an Objective-C method that returns a Foundation type like NSString to avoid automatic bridging to Swift.String?

I really want to stay in NSString-land.

(Actually, I probably even want to keep fiddling with an NSMutableString as a mutable string)

nicklockwood,
@nicklockwood@mastodon.social avatar

@ctietze I think that's an easier problem - NSMutableString doesn't bridge, so if you return that it shouldn't be converted to String by default

nicklockwood,
@nicklockwood@mastodon.social avatar

@ctietze otherwise, if you control the signature to the method then there are various (slightly ugly) workarounds I can think of, such as returning NSObject and casting it on the Swift side.

nicklockwood,
@nicklockwood@mastodon.social avatar

@ctietze another option might be to create an objc protocol that mirrors the NSString API and then conform NSString to it. If you work exclusively with that protocol, Swift wouldn't know how to bridge it

nicklockwood,
@nicklockwood@mastodon.social avatar

@ctietze I'm curious: if you call such a method by saying something like

mutableString.substring(…) as NSString

would Swift actually do a two-way bridging, or is the optimizer smart enough to recognize that the bridging is a no-op in that scenario?

ratkins, to random
@ratkins@mastodon.social avatar

I’m pleased you’re all angry about the StackOverflow announcement, I’m not because I couldn’t parse any meaningful information out of the corporate gobbledygook.

nicklockwood,
@nicklockwood@mastodon.social avatar

@ratkins it's unclear to me if they intend to use OpenAI to answer questions on StackOverflow (which will make it basically useless) or just use existing StackOverflow answers to train OpenAI (which should probably bother me, but tbh doesn't really)

airspeedswift, to random
@airspeedswift@mastodon.social avatar

Y’all are putting way too much inside didSet.

I get how temptingly convenient it is but it’s setting things up for future sadness.

Also no taking all that logic and stuffing it in a single method you call from didSet. You’re not fooling anyone.

nicklockwood,
@nicklockwood@mastodon.social avatar

@philip @siracusa @airspeedswift @beccadax in languages like Java where the syntax for calling a getter/setter is different from directly accessing a property, the reason for always using setters and getters is that it means you can change the implementation later (e.g. from a stored to computed property) without changing the interface.

In Swift, where the calling syntax is the same for stored and computed properties, there's no need to worry about it up-front.

nicklockwood,
@nicklockwood@mastodon.social avatar

@siracusa subclassing?! In this economy?

nicklockwood, to random
@nicklockwood@mastodon.social avatar

Me (as the sole swiftformat maintainer) filing an invoice against the swiftformat opencollective project to reimburse myself, and then (as the sole swiftformat opencollective project administrator) approving the invoice

nicklockwood, to random
@nicklockwood@mastodon.social avatar

Whoever designed this church spire must have studied at the school of '90s FPS architecture

nicklockwood,
@nicklockwood@mastodon.social avatar

@layoutSubviews yeah, plus that stock brick texture for the main building was a real cop out

icanzilb, to nature
@icanzilb@mastodon.social avatar
nicklockwood,
@nicklockwood@mastodon.social avatar

@icanzilb Windows XP desktop vibes

ctietze, to random
@ctietze@mastodon.social avatar

Why are the .ASM file comments never aligned properly, ever? 😭

nicklockwood,
@nicklockwood@mastodon.social avatar

@ctietze the arguments aren't aligned either - my guess is different tab display settings (8 spaces vs 4?) from the author?

nicklockwood,
@nicklockwood@mastodon.social avatar

@jsq @ctietze brb, just working on ASMFormat

csilverman, to random
@csilverman@mastodon.social avatar

Curious to see how people interpret this pattern. Is the switch on or off?

(I would have done a poll, but apparently you can't have an image and a poll in the same post.)

nicklockwood,
@nicklockwood@mastodon.social avatar
nicklockwood, to random
@nicklockwood@mastodon.social avatar

My daughter had an anxiety dream that we went on vacation somewhere with bad wifi and she lost her duolingo streak 🤣

icanzilb, to random
@icanzilb@mastodon.social avatar
nicklockwood,
@nicklockwood@mastodon.social avatar

@icanzilb I like how they tried to deflect the blame onto (presumably) some hapless individual employee by saying the cause was an unapproved change to the lubricant spec, when really all that demonstrates is that their processes are bad

dave, (edited ) to random
@dave@social.lightbeamapps.com avatar

deleted_by_author

  • Loading...
  • nicklockwood,
    @nicklockwood@mastodon.social avatar

    @dave I think this post could have used a trypophobia warning 😅

    danwood, to swift
    @danwood@mastodon.cloud avatar

    This is pretty fun - in 5.9 and up, with the ability to use case and if statements to assign, you can very tersely express matching to more than one case of an enum. For example:

    nicklockwood,
    @nicklockwood@mastodon.social avatar

    @bealex @danwood another reason is that enum cases are only Equatable by default if they don't have payloads. If any of the cases you were testing for had an associated value then == wouldn't work, whereas this switch pattern still would

    nicklockwood, to random
    @nicklockwood@mastodon.social avatar

    Had a blast meeting up with some of the old gang at NSLondon tonight. It was like a high school reunion but if I'd actually liked the people I went to high school with

    nicklockwood,
    @nicklockwood@mastodon.social avatar

    @matadan I didn't realize you were in London! Oh well - next time!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Leos
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • Youngstown
  • Durango
  • rosin
  • slotface
  • GTA5RPClips
  • InstantRegret
  • PowerRangers
  • kavyap
  • tsrsr
  • DreamBathrooms
  • normalnudes
  • khanakhh
  • hgfsjryuu7
  • everett
  • osvaldo12
  • cubers
  • tacticalgear
  • cisconetworking
  • mdbf
  • vwfavf
  • ethstaker
  • tester
  • modclub
  • anitta
  • All magazines