So I found my issue with Swift collections: Turns out when you fail to implement replaceSubrange() in RangeReplaceableCollection (in my case due to a typo), calling append() enters an endless recursion. Once I found and fixed the typo, it all worked.

A bit disappointed in Ruby’s low-level file read/write methods that they just hand through C’s “r”/“w”/“a” string instead of using proper constants.

Neat trick for shell scripts: AppleScript has a “display notification” command that you can call from your scripts using osascript to show a user notification on any Mac.

Had already expected to have to send back some hoodies I’d ordered because the sticker said the wrong size … turns out they were just mis-labeled. They fit anyway.

So happy I don’t have to go through the hassle of returning them or getting a refund.

Anyone have an example of a simple custom Swift class that implements RandomAccessCollection and RangeReplaceableCollection?

This WYSIWYG HTML editor was apparently not prepared for having source code pasted into its text. It escapes less-than and greater-than signs twice, and adds closing tags when your text contains < foo > 😂

Always interesting to see what happens when you’re an edge use case.

Is there something like DaisyDisk for Mach-O files? Show a graph and coalesce all code sections and show their sizes etc. ?

Maybe point out stuff that shouldn’t be in a release binary?

If my dylib’s __ LINKEDIT section loses about 1MB in size from one version to the other; anyone know why that could be?

nm doesn’t return that many differences.

What kinds of things are stored in __ LINKEDIT? I deleted ObjC classes, but that’s a separate segment, no?

Main issue with Swift right now is that there is a lot of C and ObjC interop stuff in there that in the beginning was the only way to do things, and was only recently replaced with stuff that feels more at home in Swift.

Swift needs a C++: The Good Parts.

I greatly enjoy using Swift. I don’t think it’s as bad and as needlessly complex a language as everyone makes it out to be. ObjC the language was simpler, but there was a lot of convention to learn on top of that which Swift codifies.

Not saying I’m using it right though.

Say, is there any occasion in Swift where a trailing semicolon on a line would actually change the behavior of the program? Given if requires curly braces etc., I can’t think of a spot where an extra empty statement would be an issue, no?

This may surprise some of you, but despite generally being nostalgic for old tech, I don’t miss PSNs at all.

I love and hate Markdown. Great readability, but no formal escaping, so there are things you can’t do (like nested backticks in a shell script in-line as part of your text). Also, everyone has their own interpretation: What is italic, what is bold? Is double-asterisk a thing?

Impressive how far AppKit has come! I just managed to create a command line tool that runs a GUI app. Without any XIB file.

Tricks: TransformProcessType, create an Info.plist section in the binary and manually set a delegate and call run() on NSApplication.shared.

Hadn’t heard that the planned C++ standard graphics library io2d (aka N3888, P0267, or “stateless Cairo”) was removed from the standard again:

hatcat.com

They’re still developing the code & hoping to bring it back though. (Github io2d.org)