HNHacker News
TopNewBestAskShowJobs

gnachman

3,214 karma · joined January 23, 2011

[ my public key: https://keybase.io/iterm2; my proof: https://keybase.io/iterm2/sigs/uoqjLdotgkHihVXK6xwzRw2TCtvtV4bCFj9z-hOTEH8 ]
submissionscomments
gnachman··on Critical Security Issue Identified in iTerm2
Yes, everyone should upgrade. An exploit would use the tmux integration control sequence without your consent.
gnachman··on Critical Security Issue Identified in iTerm2
iTerm2 author here. I’ll be glad to answer questions.
gnachman··on Ask HN: Who Wants to Be Fired?
I have the same issue and it was completely resolved with Amytriptalene. Until I found the right doctor it felt like my life was over, and they kept giving me useless treatments. Contact Dr Hanno at Stanford; he’s the only competent one I have found.
gnachman··on Most programmers don't know what Expect can do for them
I created coprocesses in iTerm2 because I missed Expect but I also hated Expect because it had a very expect-y way of doing things that never felt comfortable (though I shan't say a nasty word about Tcl!) Also, what mzs said about "now get out of the way".
gnachman··on iTerm2 3.3
This has been considered. See here for details:

https://gitlab.com/gnachman/iterm2/wikis/iTerm2-Version-3.3-...

gnachman··on iTerm2 3.3
The API was originally designed for a third-party app to add autocomplete. That never happened, but it should have everything you need.
gnachman··on iTerm2 3.3
I tried to get that latency tool running but it seems that Java's Cocoa bindings have rotted too much to work any more. I'm done with big year-long release cycles, and I plan to focus on performance and core functionality for the foreseeable future. If anyone can get that thing working please reach out :)
gnachman··on iTerm2 3.3
If you prefer not to use tmux's status bar, turn on Prefs > Advanced > Always use the tmux status bar in tmux integration mode. I'll make this better in the future once I figure out a sane way to expose it in the UI.
gnachman··on Jony Ive to form independent design company with Apple as client
> worst adapter I've ever seen

I can help with that:

https://www.apple.com/sg_smb_5200/shop/product/MB571Z/A/mini...

Half the charm is lost without seeing the two DVI cables that plug in to it.

gnachman··on Ray Tracing with Metal [video]
Thanks!
gnachman··on The State of Apple's Developer Documentation
> It's also mentioned in Mac OS X Internals: A Systems Approach, FWIW.

It's funny you should mention this. After someone sent me an amazing pull request using this call, I thought "hm, this should be in Mac OS X Internals: A Systems Approach. Why didn't I see it?" So I looked it up, and yes, it's there, but there's nowhere near enough context or description for it to be of use to anyone but (at most) the author. Here's what it says:

The /usr/libexec/StartupItemContext program can be used to run an executable in the startup context—that is, the context in which the Mac OS X startup items run. It works by calling bootstrap_parent() repeatedly until it has reached the startup (root) context. It then sets the port as its own bootstrap port, after which it can execute the requested program.

The automatic relaunching of servers by the Bootstrap Server is useful for creating crash-resistant servers. However, it is neither necessary not advisable to create production servers by directly using the Bootstrap Server interface. Beginning with MacOS X 10.4, the launch API, as exported through <launch.h>, should be used. With this caveat, let us look at two examples of using the Bootstrap Server interface.

[an example that shows how to list all known services]

[a rather complex example that creates a bootstrap service and maybe uses bootstrap_parent somewhere]

There are bits of wisdom in this wonderfully written (and of course now obsolete) tech note:

https://developer.apple.com/library/archive/technotes/tn2083...

But of course, most people just copy-paste from the code Apple has (I would guess grudgingly) made open-source and we hope for the best.

gnachman··on The State of Apple's Developer Documentation
Some personal favorites, culled by searching my source code for swear words:

NSTitleBarAccessoryViewController lacked documentation from the time it was introduced in macOS 10.10 until recently (perhaps Mojave? That's when I first found it). There was literally nothing except the header file and the announcment in the release notes for the OS. It was also full of bugs that rendered it unusable for my application.

Overriding -scrollWheel: has all kinds of nonsense side-effects. These are only documented in release notes. Scroll wheels in general are way more complex than you'd imagine. If it weren't for Chrome's open source Mac code, it would be a complete mystery. See the investigation here (search for "of mice and men") for what Apple should have documented: https://chromium.googlesource.com/chromium/blink/+/d40e271ac...

Passing a constant buffer to a fragment shader will cause it to be truncated at 64k on some graphics drivers. Not a bug, just an undocumented limitation. Doesn't happen on my computer. That was fun to figure out.

NSMapTable with weak keys and strong value leaks the values, according to an archived document. The main docs say nothing on the topic.

If you'd like to know why an exception was thrown, you have to print the value of the proper CPU register. On x86-64 it's $rax. As far as I know this is an oral tradition, passed down from senior developer to junior developer.

If you want a daemon to survive the user logging out and logging in, you have to use a barely-documented function (bootstrap_parent) which is only mentioned in a now-archived tech note.

gnachman··on Tesla's Screen Saga Shows Why Automotive Grade Matters
I called Tesla service in December because of both displays delaminating. They said they’d call me back, which of course they never did. This explains it, I guess.
gnachman··on Ligatures in Programming Fonts: Hell No
It also makes the lives of terminal emulator developers much more difficult. Won't someone think of the terminal emulator developers?
gnachman··on Terminal latency (2017)
As mentioned, this is somewhat out of date. iTerm2 has gotten a GPU renderer since then, which should reduce the latency. Unfortunately I can't get typometer to work. I guess it's because it's not requesting the right permissions on macOS 10.14.
gnachman··on Firefox Send: Free encrypted file transfer service
If it works, it prevents mass surveillance and makes insider attacks much more difficult.
gnachman··on Why I hate the weekends (2017)
FAANG in 2004 paid much less in nominal terms than it does today. I was a level 5 swe at Google in 2006 and total comp was around $170k.
gnachman··on Google+ for consumers will shut down on April 2nd
The real tragedy is that g+ wrecked Google. It was a nice place to work that I was proud of. They got scared of Facebook and threw out reason, taste, common sense, and ethics in an incompetent desperate rush to win Social. It was deeply saddening to watch it happen. Now the parasite is gone but too late for the host.
gnachman··on Why Is It So Hard to Detect Keyup Events on Linux?
> No, no one can fix this

It's been solved twice, but I'd like to get that down to just once :)

https://sw.kovidgoyal.net/kitty/protocol-extensions.html#key...

https://gitlab.com/gnachman/iterm2/issues/7440

gnachman··on Why Is It So Hard to Detect Keyup Events on Linux?
This is functionality that the terminal emulator reasonably should provide to enable games or other interactive applications. I believe that would solve the author's complaints. Some work has been done along these lines in both Kitty and iTerm2. Not everyone likes the idea because it breaks the basic abstraction of a terminal. I kinda like it, though, and I'm optimistic that the situation will improve in the coming years.
gnachman··on lsix: ls for images
Some day they'll be standards and I'll change the documentation to say "perfectly normal" instead of "proprietary" :)
gnachman··on lsix: ls for images
I've been meaning to add sixel support since forever, but I like my way of doing it so much more because it supports the file formats people use, which are generally a much better encoding than sixel. That being said, this is nicer than iTerm2's equivalent (called imgls) because it re-encodes the image to make it smaller over the wire. That being said, I'd rather use a lot of bandwidth than have to install imagemagick everywhere. That's probably just my bias against dependencies showing :)
gnachman··on The Coming Crisis in Home Computers (1983)
How can this be in light of his performance at Atari? I’ve always blamed him for their downfall, but maybe there’s something I don’t know.
gnachman··on Bracketed paste mode (2013)
It's all fine and dandy until your ssh session dies and then pasting does weird things you don't understand.

iTerm2 can detect this if you install shell integration. I wish there were a more standard way to deal with this scenario, which affects everything in a terminal that has a mode (focus reporting, mouse reporting, application keypad mode, etc.).

gnachman··on Ask HN: Anyone from Google here? The new Gmail UI is painful
Yes. It was broken for the ten years I worked there.
gnachman··on Assertions in Production Code? (2008)
By default macOS apps do not terminate on certain assertions within certain event handlers, because exceptions are caught by the framework. The app just does weird stuff after this happens. This is terrible. Once I figured out how to make it crash I fixed a handful of bugs and the number of reports of inexplicable behavior went way down.
gnachman··on ATtention Spanned: Comprehensive Android Vulnerability Analysis of AT Commands
Only if you could get the other party to type +++ first to enter command mode, though. I'm not aware of any modem that would accept commands, including ATH0, outside of command mode. Then again, there were a lot of bad modems in the world…
gnachman··on John Ousterhout: My favorite sayings
AOLserver was my first job out of college. Glad someone remembers it!
gnachman··on iTerm2 has a new drawing engine that uses Metal 2
Edit session divorces the session from its underlying profile so you can make local changes to it only
gnachman··on iTerm2 has a new drawing engine that uses Metal 2
Please file an issue and include a debug log
← PreviousPage 3 of 8Next →