Show HN: TinyClock – a tiny true 5-arch universal Mac OS X single-binary GUI app (tycho.sytes.net)
1. Single universal binary, that can be natively executed on every hardware platform Mac OS X was made for (32/64 bit, PowerPC/x86/AppleSilicon).
2. Minimalistic gadget-style design. If launched as a tool, there is no menubar, no dock icon, no nothing, just the clock window.
3. Support for hidpi and dark mode for environments, that have them.
4. Window title bar for moving the window with a mouse, and a handle to resize it (latter for OS versions, that have it).
5. Can be easily ported to GNUStep and thus other OSes (sources under GPLv3).
6. Simple Makefile build system.
81 comments
[ 3.2 ms ] story [ 147 ms ] thread1. The Mach-O executable format was not changed between all those OS versions (likely).
2. It is possible to gather sub-binaries for one CPU type but different OS types (less likely).
And SDK's and compillers (in emulator or on hardware) are required to try.
http://tenfourfox.blogspot.com/2020/06/the-super-duper-unive...
Previous Hacker News discussion
https://news.ycombinator.com/item?id=23754052
But enough about my private life. You're making us blush
It seems that this early version is significantly different from later NeXTstep (3.3) and OpenStep versions. For example, it does not use app bundles. System apps installed in the /Apps folder, such as Terminal, are simple Mach-O executable m68k binaries.
If we wanted to target such an early NeXTstep, in addition, the source code of TinyClock would have to be changed significantly. One problem is that early versions of AppKit used "NX" instead of "NS" prefixes. More difficult is that a number of classes used by TinyClock seem to be unimplemented - not even NSString (resp. NXString) seems to be available. More complex classes such as NSCalendarDate or NSBezierPath also seem to be a later addition (unless the 0.8 install image is missing some header files, the earliest documentation I could find was on 1.0).
So it seems that a completely universal binary is out of the question, unfortunately.
When coming from git/Mercurial/subversion etc as I do, it is at least mildly weird that the Bazaar repo address is the same as the address of a web document. The two objects are not (at least in my world) the same, so why should they share URIs?
Edit: deduped.
https://datatracker.ietf.org/doc/html/rfc2068#section-12
https://datatracker.ietf.org/doc/html/rfc2068#section-14.1
See also https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_ne...
(FWIW - I don't know if that's how `bzr` does this, but it might, and the concept is 25 years old now.)
Edit: s/different content/different representations of the same resource/
[0] https://en.wikipedia.org/wiki/GNU_Bazaar
[2] https://github.com/breezy-team/breezy
https://news.ycombinator.com/item?id=25514288
https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/...
https://ivanthinking.net/tags/anduril-ui/
https://zeroair.org/2019/10/14/lumintop-fw1a-flashlight-revi...
[edit] added HN link
https://tycho.sytes.net/TinyClock/README.md
The Makefile creates index.html from README.md (and also TinyClock.dmg)
As it should, since one is a clock, the other a web browser.
Interesting stuff. Cross platform development is inspiring.
Yeah. Surely a better statistic to be had.here. System preferences?
I write native.
I do tend to release apps in UIKit, so I don't quite achieve Buzzword Bingo, but I have always been a fan of native apps, and have watched the various efforts to avoid native, with the kind of sick fascination usually reserved for train wrecks.
I am quite aware that it is not the ideal "business posture," but that's how I roll.
I've been writing for Apple platforms, pretty much exclusively, since 1986.
Linking more libraries slows down launch due to initialization that happens to get the libraries ready to use. Besides that it's mostly what the app itself is doing on startup.
So yes, beating Safari for a tiny app is… a good thing, but not very impressive.
By now, Safari should be so snappy it opens your pages and have their document tree ready two seconds before you think of doing it.
> Unlike done in previous project, netop Tiger SDKs (used to build several intermediate binaries) don’t contain 64-bit AppKit versions, and thus ppc64 and x86_64 binaries are excluded from the binary release.
The binary release is only three-architecture; it does not run on current Intel MacOS since it's missing an x86_64 segment. (You get a "this app needs to be updated" dialog if you try.)
[1]https://en.wikipedia.org/wiki/Mach-O
[2]https://en.wikipedia.org/wiki/Fat_binary
I'm reminded of the Feynman "why" video. The other answers are technically more accurate than mine, and even mine assumes you understand the concept of CPU types. It's difficult to pitch answers at the right level.
Technically more accurate and complete than your answer, but an analogy I expect most non-technical people could understand.
But I do it with lots of different available downloads, not as a single binary. That's what I find impressive about this. Somebody's running that XCode mod where you can bring in all the libraries from all the previous versions back to the dawn of time. I'm not even going to pretend to try to keep something like that working: I do my retro builds (and original design) on an antique machine dedicated to the purpose, and the modern stuff on a modern laptop dedicated to staying current.
[0] https://en.wikipedia.org/wiki/Apple_M1#Products_that_use_the...
> bzr clone https://tycho.sytes.net/TinyClock/
I am surprised to find git not having built in support for cloning Bazaar repos. Almost as surprised as I am at finding a Bazaar repo in the wild.
> “TinyClock.app” needs to be updated.
> The developer of this app needs to update it to work with this version of macOS. Contact the developer for more information.
https://jdon.at/Uff03u
Whether an app containing code for 3 architectures qualifies as "true 5-arch universal" is in the eye of the beholder I guess.
Edit: answered my own question by reading the actual page — "Unlike done in previous project, netop Tiger SDKs (used to build several intermediate binaries) don’t contain 64-bit AppKit versions, and thus ppc64 and x86_64 binaries are excluded from the binary release."
lipo -info TinyClock.app/Contents/MacOS/TinyClock Architectures in the fat file: TinyClock.app/Contents/MacOS/TinyClock are: i386 x86_64 ppc64 ppc arm64
https://tmkk.undo.jp/xld/index_e.html
*Sorbet Leopard is a modern update of Leopard, incorporating speedups from Tiger and the unreleased PPC Snow Leopard.
Not only does the binary not load, but the dmg itself won't extract, it just opens to a blank Disk Copy window no matter what you try to do.
IMO CarbonLib is more impressive as you can target MacOS 8.1-9 as well as X (up until x86 support was dropped).
Oh, and it will run and render over the network with paleolitic Unixen thanks to X :).
Except for SGI, but I am not that sure.