Readit News logoReadit News
WillAdams · 2 months ago
For folks who are curious about this sort of thing and want an approachable starting point, I would recommend:

https://www.goodreads.com/book/show/44882.Code

It would be way cool to see an actual application which wanted this sort of speed optimization --- the last significant assembly language program I can recall using was WriteNow, which was ~100,000 lines of assembly and to this day is my favourite word-processor (well, the NeXT version --- the Mac, even v2.0 suffered in comparison for not having access to Display PostScript and Services).

Really wish that there was a writeup of it at folklore.org --- unfortunately, it only gets a single mention:

https://www.folklore.org/The_Grand_Unified_Model_The_Finder....

(or that there was an equivalent site for the early history of NeXT)

meisel · 2 months ago
The real optimization here is to move off UIKit and interact with the GPU more directly
JimDabell · 2 months ago
There is also an iOS app implemented in C here:

https://stackoverflow.com/a/10290255/8427

baumschubser · 2 months ago
snibbetracker is an example of a C/SDL iOS app. <1MB from the app store which is really wild. https://apps.apple.com/de/app/snibbetracker/id1065797528
c-fe · 2 months ago
<1MB is also relatively easy to reach with swiftui apps. I had two fully working ones in the app store below 1MB. They are removed now since I didnt pay the yearly 100€
herodotus · 2 months ago
When I was in second or third year of computer science in 1971 or '72, we (of course) learned IBM 360 assembler, but we also had to design a simple binary adder using AND OR and XOR gates. All on paper - no need for any soldering or electronics, which I regret. I cannot remember how many bits of input - probably 4 but may have been 6. But I did do quite a bit of asm programming, including a routine for calculating square roots using Chebyschev polynomials and newtons algorithm.
ChrisMarshallNY · 2 months ago
Very cool, if impractical (it’s likely that you’d never get an ASM app through the App Store Approval process).

ARM Assembly is a much more Byzantine creature, than the old 8- and 16-bit versions I used, way back in the Pleistocene.

I’m always a fan of starting from the “bare metal,” to learn, but these days, it’s a long trip. When I was just a wee sprog, it was only a couple of steps away.

Ecco · 2 months ago
How would that impact the App Store approval? AFAIK they review binaries anyway…
ChrisMarshallNY · 2 months ago
They do, but ASM doesn't have the guardrails that the compiled languages have, so it's almost certain that private APIs would get accessed.
Fokamul · 2 months ago
It's likely in future, you won't need app store approval process. I hope that EU will nuke Apple with some huge fines.

And there will be corporate tax per each EU country, it's ridiculous corporates are raking huge money here and paying basically nothing on taxes, well only in Ireland and they're having party.

Anyway, asm is great if you are using iOS emulator and need to do something and since you have root there, well :) (not apple meme simulator)

jeroenhd · 2 months ago
You can already deploy apps on alternative stores inside of the EU. Apple has some bullshit fee but Epic has promised to cover that for AltStore.
anta40 · 2 months ago
Even better if build steps are provided
starmole · 2 months ago
Super cool! Would love to see the build/deploy steps needed.
zffr · 2 months ago
I just tested this on my computer.

  1. Make a new Xcode iOS project and delete all files except for Info.plist
  2. Remove all keys from Info.plist
  3. In the build settings search for "storyboard" and remove all keys
  4. Add yellow.asm to project
  5. Link UIKit, and Foundation
After all that you can build and run on a simulator

saagarjha · 2 months ago
xcrun -sdk iphoneos clang yellow.asm, pack it into an IPA and sign it
anta40 · 2 months ago
Hmm doesn't work. Here's the error log (I'm on Mac M2):

https://gist.github.com/anta40/60f62c803a091ad0415d60f8cac55...

iMario · 2 months ago
Would love to see equivalent in C, not ObjectiveC... plain C.
incanus77 · 2 months ago
That would be great if iOS supported a GUI in C.
avidphantasm · 2 months ago
Looks more sensible than having to use XCode and Apple's atrocious developer documentation.