HNHacker News
TopNewBestAskShowJobs

mayoff

2,016 karma · joined June 2, 2010

Random bits of iOS programming
submissionscomments
mayoff··on Epic’s new motion-capture animation tech
If it's slow, costly, and hard to animate characters, only cutscenes—where the animated characters are the focus—will have well-animated characters. But if it's fast, cheap, and easy, then even the incidental “scenery” NPCs can have nice animations, making the game world seem more alive.
mayoff··on Mars After Midnight: Gameplay Loop
Check out Master Key for more chunky 1-bit chunky graphics.

https://store.steampowered.com/app/1763030/Master_Key/

https://www.kickstarter.com/projects/778295166/master-key/

mayoff··on The words you choose within an app are an essential part of its user experience
Don’t anthropomorphize computers. They hate that.
mayoff··on Rust vs. Haskell
Java code is always in the IO and Except monads.
mayoff··on Ask HN: I just want to have fun programming again
Programming in Elm with mdgriffith's elm-ui package is the only way I've ever been able to tolerate developing a ‘modern’ web app.
mayoff··on Determine durations with monotonic clocks if available
The difference in CLOCK_MONOTONIC behavior between Linux and Darwin (Apple) systems was an issue when they added Clock to the Swift standard library. It led to the two built-in clock implementations being named SuspendingClock and ContinuousClock, rather than UptimeClock and MonotonicClock.
mayoff··on The Git source code audit, viewed as a Rust programmer
Swift does this. Bare operators like + and * trap (crash) on overflow. You can use &+ and &* for 2s complement wrapping.
mayoff··on The Mystery of Richard Posner
> even most middle class people can't afford to hire lawyers

Even most upper-class people can't afford to hire lawyers, according to Peter Thiel, who said

> If you're a single-digit millionaire like Hulk Hogan, you have no effective access to our legal system. It costs too much.

https://www.theatlantic.com/liveblogs/2016/10/news-today/505...

mayoff··on A modular system for isometric pixel blocks
In spite of what the page says, the cell isn't 7x7. One diamond-shaped cell is 24 pixels wide, measuring from the center of the leftmost pixel to the center of the rightmost pixel, and 12 pixels tall center-to-center.
mayoff··on Apple announces full Swift rewrite of the Foundation framework (2022)
Array is defined in the Swift standard library, but the compiler knows about the type directly, and also recognizes various @_semantics("array.blah") annotations that appear in the standard library source code. I believe the semantics annotations are primarily to help the optimizer.

https://github.com/apple/swift/blob/main/stdlib/public/core/...

mayoff··on Apple is struggling to build Mac Pro based on its own silicon
I use SoundSource for this, but I did pay $39 for it.

https://rogueamoeba.com/soundsource/

mayoff··on Tell HN: HP printers force you into agreement
So you bought a printer that is marketed as “Works only with original HP toner; requires HP account, internet to operate” and now you're mad that it requires you to use original HP toner?

https://www.hp.com/us-en/shop/pdp/hp-laserjet-m209dwe-printe...

mayoff··on Adventures in Advent of Code
Or if you compile in release mode, in which case the fixed version is (maybe only sometimes?) inlined into your executable.

I ran into the same bug, but since I'd included a `precondition` to verify that each elf-group had only one common item type, I discovered the bug immediately. I then needed about 5-10 minutes to convince myself that it really was a Swift bug and not a mayoff bug.

mayoff··on The case for dynamic, functional programming
> dynamic languages don't require you to "emulate the compiler" in your head

On the contrary. Your ‘functional’ timer function takes an argument and applies the - operator to it.

You must be sure, every time you call the function, that you pass an argument to which - can be applied. If you don't, your user might see a TypeError. So you, the human author of the code, must ‘emulate the compiler’ by performing type inference and type checking in your head.

In my statically-typed language, the compiler ensures that my program only ever passes arguments for which the - operator is applicable. I don't need to ‘emulate the compiler’, because I'm actually using a compiler.

mayoff··on Linear.app
I guess some people spend so much time in Jira or whatever that they want keyboard shortcuts for everything? My company uses Jira and I'm a developer and I've never felt like “oh my god I'm wasting so much time mousing around in Jira”.
mayoff··on Stanford Apologizes for Limiting Jewish Student Admissions in the 1950s
In What Do You Care What Other People Think?, Feynman's mother says:

> “We're saving money as best we can, and we're trying to send him to Columbia or MIT.”

And a page later, Feynman says:

> After that summer, I went away to college at MIT. (I couldn't go to Columbia because of the Jewish quota.)

mayoff··on Ask HN: Why is the iOS UI difficult to maneuver?
iOS has a feature called Reachability which can help you reach the top half of the screen. Perform a small swipe down on the bottom edge of the screen to move the entire screen content down about 50%.

https://support.apple.com/guide/iphone/reachability-iph145eb...

mayoff··on Weird Al had 100 gigs of RAM
46 inches at at 16:9 aspect ratio.
mayoff··on Don’t think to write, write to think
“If you think without writing down your thoughts, you only think you're thinking.” – Leslie Lamport

https://www.microsoft.com/en-us/research/video/thinking-for-...

mayoff··on We are all nerds: The literary works of Neal Stephenson
Neal Stephenson discussing the “Stephenson can't write endings” meme:

https://www.reddit.com/r/nealstephenson/comments/5jjwmq/neal...

mayoff··on An opinionated approach to GNU Make
.DELETE_ON_ERROR is not sufficient. Some day your make process will be killed (due to a bug, OOM, kernel crash, power loss, whatever) while the recipe is running, thus having no chance to delete the broken output.

I had this happen often enough (in a quite large system that farmed out compile jobs to a cluster) that now I always make my recipes write to a temporary file, and then rename the temp file to the actual target, e.g.

test.o: test.c > cc -o $@.tmp $< > mv $@.tmp $@

Once you adopt this strategy, .DELETE_ON_ERROR is irrelevant.

mayoff··on From novice to master, and back again (2013)
1. Have problem.

2. Google it.

3. Find answer on stackoverflow.

4. Try to upvote.

5. "You can't vote for your own post."

This has happened to me multiple times.

mayoff··on Performance comparison: counting words in Python, C/C++, Awk, Rust, and more
Note that only an unoptimized Swift solution was provided, and Swift String operations (like `lowercased`) are fully Unicode-compliant.
mayoff··on Imaginary numbers are real
Die ganzen Zahlen hat der liebe Gott gemacht, alles andere ist Menschenwerk.

— Leopold Kronecker

(“God made the integers; all else is the work of man.”)

mayoff··on Apple Removes Flag Icons in Monterey 12.4
It doesn't just use two-letter codes.

https://news.ycombinator.com/item?id=31521207

mayoff··on Apple Removes Flag Icons in Monterey 12.4
It doesn't just use two-letter codes. The Arabic layouts show “ع”. The Hebrew layouts show “א‎”. The Greek layout shows “λ”. The Thai layouts show “ก”. The Canadian English layout shows “CA”, the French layout shows “FR”, the Canadian French layout shows “CA” above “CSA”, and the Swiss French layout shows “CH” above “FR”.
mayoff··on Apple Removes Flag Icons in Monterey 12.4
It doesn't just use two-letter icons. The Arabic layouts show “ع”. The Hebrew layouts show “א‎”. The Greek layout shows “λ”. The Thai layouts show “ก”. The Canadian English layout shows “CA”, the French layout shows “FR”, the Canadian French layout shows “CA” above “CSA”, and the Swiss French layout shows “CH” above “FR”.
mayoff··on Ask HN: What game do you wish existed?
In the original Fallout, you have 150 game days to finish the first major quest (find a new water chip).

In Unsighted, every character (including the player) has a finite lifetime remaining. You find items that can temporarily extend any player's lifetime, including your own, but it is very difficult to finish the game before any character dies. https://store.steampowered.com/app/1062110/UNSIGHTED/

mayoff··on “Computers”, BSA Merit Badge Series (1973)
I was dialing in to a system used by dozens of Convex employees to do their jobs. One (or more?) of them ran `ps` and didn't like seeing `hack` in the output during business hours. I don't know if it was really a resource consumption issue.
mayoff··on “Computers”, BSA Merit Badge Series (1973)
I was in an Explorer Post that met at Convex Computer Corporation in Dallas, TX in 1986. It was my first exposure to Unix and C programming. A few of us got dial-up access to a Convex C-1 “minisupercomputer”. Then I got in trouble for dialing in just to play Hack. (This was before it became Nethack.)
← PreviousPage 4 of 12Next →