HNHacker News
TopNewBestAskShowJobs

trishume

4,753 karma · joined January 22, 2012

I program things and blog about them. http://thume.ca/ http://github.com/trishume tristan@thume.ca
submissionscomments
trishume··on Killing TurboTax
For people who haven't used it: SimpleTax just absolutely nails UI quality, it's so nice and smooth that every year I've used them I've been done in under 15 minutes (other than time spent double-checking because it can't have possible been that easy) and come away so grateful for their existence that I gladly throw money at them. One year the Canadian Revenue Agency even introduced a new API that lets SimpleTax pre-fill most of the information like employment income from the stuff the CRA has on file.

I've since moved to the US and I'm dreading doing my taxes using probably TurboTax for the first time this year. At least it probably won't be as bad as previous years when I had to file non-resident US taxes for internships, where you can't even use TurboTax and have to use Glacier or TaxAct, which were terrible compared to SimpleTax.

trishume··on Ask HN: How do you find personal tech blogs?
I mostly subscribe to blogs on RSS when I find a good article on a personal blog on HN or Twitter.

I exported my Feedly list for you, there's a bunch of good personal tech blogs in here:

https://gist.github.com/trishume/5a32594aeb8e80af13b35e5efd0...

trishume··on The State of Linux Debuggers
One I haven't seen anyone mention yet but also haven't tried myself is https://codeclap.handmade.network/

It's not free, but it looks like a high-quality cross-platform gdb and lldb frontend with an imgui UI.

trishume··on Hard to discover tips and apps for macOS
No I hadn't seen that. It appears to have been unmaintained even longer than Anesidora but at least it's open source.
trishume··on Hard to discover tips and apps for macOS
Oh I hadn't noticed, that's real sad. Their "upcoming" feature of showing window tabs is something that would be necessary for me.
trishume··on Hard to discover tips and apps for macOS
I briefly mention the spacebar shortcut in the article but it does indeed deserve more explanation. One of my favorite macOS file browsing features for sure, miss it all the time on Linux, especially the part where it follows your focus when you use the arrow keys. Great for looking through large folders of poorly-named PDFs for the right thing.
trishume··on Hard to discover tips and apps for macOS
Good list, and this reminded me to push an edit to add my favorite symbol shortcut which is option+2 for ™. I use Alfred for things like "¯\_(ツ)_/¯" though. I also didn't know about the Soulver workflow, that might be enough to get me to buy Soulver.
trishume··on Hard to discover tips and apps for macOS
The issue with Discord is if the message compose box is focused the cursor keeps flashing and redrawing a big tile of the screen even in the background, manually defocusing the message box fixes this. This is also something Discord could easily fix I think.
trishume··on Hard to discover tips and apps for macOS
It's a list of macOS-only (with one exception) apps that I use with a bias towards lesser-known things. I use 1Password but it's not fully macOS-only and is widely known. I also use BetterTouchTool and it's nice, but the stuff I use all the time is mostly in Hammerspoon. Having a power meter is how I find out when stuff is tanking my battery life, and like I said I use the weather widget a lot. I use Hex Fiend more than lots of other apps since I like implementing binary formats and doing CTF reverse-engineering contests.
trishume··on Hard to discover tips and apps for macOS
Terminal's split panes are a totally different thing than iTerm2's and IMO not very useful. Terminal can have multiple panes that all show different places in the same scrollback buffer, not different terminals. iTerm2 can have many different terminals within one tab, which I use for example to have a tab for a project with one pane ssh'd into a VM/server and another pane on my local machine for file munging and syncing.
trishume··on Hard to discover tips and apps for macOS
An app that was going to make it on my list was Anesidora, which is a native macOS Pandora player which of all the many music streaming apps I've tested including Apple Music, is the only one which uses less than 10% CPU total including on WindowServer and coreaudiod. Unfortunately since I got it the author seems to have removed it from the app store. There's some other native Pandora apps that might have low resource usage but I haven't tested them. I switched to Pandora for my music streaming mainly because of Anesidora, and luckily I still have it downloaded. Anesidora still redraws when it's hidden, but only once every second, and it uses lower CPU itself and in coreaudiod than other players.
trishume··on Hard to discover tips and apps for macOS
Wow Contexts looks incredibly well designed. I'm not sure I'll actually use it over my current Hammerspoon setup, but they combine all my favorite quick selection techniques like smart ordering, fuzzy matching, providing two-character hints which will definitely select a certain item, persisting things to keep hints consistent, shortcuts where you press a modifier type and then release to activate ...

What I really want now is for Alfred to copy all of Contexts search features so that I can use them for generic search matching in Alfred workflows.

trishume··on Hard to discover tips and apps for macOS
Yah it's perpetually on my todo list to learn to use Alfred for more things, like using its built in file browsing more. It would be nice to have Alfred workflows set up for more things like switching Chrome tabs and Discord channels.

I do use it a ton for launching apps and quick calculations, but Spotlight can do that with a bit less polish.

trishume··on Webgazer.js webcam eye tracking on the browser
I believe this might be available in less than 5 years, potentially less than 2, provided both http://www.adhawkmicrosystems.com/ and https://www.kura.tech/ ship and partner with each other. If either one of those companies dies or their technology doesn't work out like I hope, then it might be a while longer.
trishume··on GhostDB – A Fast Distributed Cache
“microsecond performance” irks me because you can’t get latencies of a microsecond without very expensive special network cards and APIs which they don’t seem to mention and I doubt they use. So they either mean 10s to hundreds of microseconds or they’re taking the reciprocal of their throughput which would be weird and misleading.

If you’ve made a fast product that’s great! Show us with well-explained benchmarks not the term which sounds best but you can still hand wave as justified, because it’ll make people suspicious.

trishume··on Xi-Editor Retrospective
Two reasons: captures, and it needs to know which of the regexes matched. I meant to but forgot to mention in my original comment that the reason Sublime's built-in highlighter is the fastest is they wrote a custom regex engine which basically does the equivalent of or-ing them together but unlike all other regex engines handles captures and information about which one matched properly while doing so. The custom engine doesn't do backtracking and it falls back to Oniguruma for regexes that use fancy features. So yah it's in theory possible you just need to write a custom regex engine to do it.
trishume··on Xi-Editor Retrospective
Author of syntect here: This isn't why TextMate/Sublime/VSCode/Atom style regex parsing is slow.

The main reason is that the parsing model is applying a whole bunch of unanchored regexes to the unparsed remainder of the line one after another until one matches, then starting again for the next token. This means each token parsed can require dozens of regex matches over the same characters. I implemented a bunch of caching schemes to cut down on this number but it still tends to need many matches per token. It sounds like Oil's lexer probably does about one regex run per token, with probably a somewhat faster regex engine, and sure enough it's something like 40x faster than syntect.

Oniguruma is actually pretty fast and anyhow most of the regexes in Sublime syntax definitions are written to not require backtracking, because Sublime has two regex engines and only uses the fast one when no backtracking is required. In fact fancy-regex should delegate directly to Rust's regex crate on these regexes but is somewhat slower than Oniguruma, for reasons I haven't yet looked into (edit: see Raph's comment, it's probably heavy use of captures, another thing Oil's lexer doesn't need).

Also note that byte-serial table-driven lexers have a speed limit of one byte per l1 cache round trip (~5 cycles), whereas faster lexers can take advantage of multi-byte instructions (even SIMD) and out of order execution to go much faster, hence why pulldown-cmark is 2500x faster than syntect rather than just 40.

[edit: I should also clarify that since unlike these other parsers, syntect takes a grammar and can parse many languages, so how fast it is depends a lot on the grammar, I suspect the markdown grammar in particular is slower than usual, given that pulldown-cmark runs about 250MB/s and syntect on ES6 Javascript (a complicated but well-implemented grammar) is about 0.5MB/s, so the Markdown grammar may be 5 times slower]

trishume··on Reverse Engineering Snapchat: Obfuscation Techniques
One thing I'm curious about is what they do to try to stop you from just ripping out the obfuscated token generation library and setting up a harness to run the whole thing in https://www.unicorn-engine.org/ or something. Like presumably they don't compile their whole app with obfuscation and it's just some library that's linked in with some kind of stable-ish API contract with the rest of the app. I wouldn't be surprised if they do interesting things to try and stop you from ripping it out and it'd be cool to learn what those are.
trishume··on Measuring keyboard-to-photon latency with a light sensor
If you use 1000hz polling like my latency tester and keyboard do the latency becomes less than 1ms which is pretty small compared to the other factors. See https://michael.stapelberg.ch/posts/2018-04-17-kinx-latency-...

I'd optimize lots of other things like trying to avoid the compositor, higher refresh rate monitors and lower travel keys before I'd look at USB3.

trishume··on Measuring keyboard-to-photon latency with a light sensor
I wouldn't say anybody measuring input latency at all is common, but if I were doing it I'd use https://isitsnappy.com/ or some other high speed camera frame counting and check the time between when your finger starts moving and the screen changes.
trishume··on Measuring keyboard-to-photon latency with a light sensor
Yah it was over a year ago so my memory is hazy but as far as I know I tried to do exactly that. I watched the WWDC talk and made sure I met all the conditions they say, and tried to use Instruments and Is It Snappy to verify it and I didn't seem to be triggering compositor bypass and had no way of figuring out why not. What I really want is a single open source demo app on Github where someone has said "I tested and this triggers Metal compositor bypass and I confirmed with Instruments and/or Is It Snappy"
trishume··on Measuring keyboard-to-photon latency with a light sensor
I unfortunately don't have a native Linux install currently, just a VM, and my Windows NUC can only connect to my Z27.

There's some good info here on minimal USB latency, it's less than 1ms and I don't think mine is an issue although the macOS event processing stack might introduce some latency: https://michael.stapelberg.ch/posts/2018-04-17-kinx-latency-...

trishume··on Measuring keyboard-to-photon latency with a light sensor
In this case what you were experiencing might have been the lack of compositor, which adds a 16ms delay, or just using a slow editor. The theoretically best possible average latency under a compositor model at the top of the screen is 16+(16/2)=24ms which isn't that far from the 30ms I observe at best on macOS. Cutting the compositor would still halve average latency.

Unfortunately Apple shows no interest in getting rid of that delay, while Microsoft is moving towards sometimes using hardware overlays to avoid that (see raphlinus's comment about DirectFlip), and Linux lets you disable it at the cost of tons of artifacts. Apple only recently tried to add compositor bypass for fullscreen Metal apps but the way they did it is super opaque and I have never succeeded at getting it to trigger and they have no example program that they say definitely does it.

trishume··on Measuring keyboard-to-photon latency with a light sensor
Alacritty makes claims about throughput, which is different than latency, and then uses the word "fast" which can be confused to mean either or both. Alacritty's benchmarks are based on how much text it can process being output to the terminal per second, which it is much better at than most terminals. However separately I think it might be true that kitty also has better throughput, while having better latency and many more features, this is just based on talking to a friend though I haven't tested this.
trishume··on The Concurnas Programming Language
This looks like a nice language with lots of cool features. I especially like the attempts at GPU and off-heap integration.

However I feel like at least the landing page dodges a lot of hard questions. For example the biggest reason anyone should want to write a concurrent program over a synchronous single-threaded one is performance, so talking about how your features are implemented efficiently is important. Specific examples:

Having my isolates semantically copy all their inputs sure might avoid race conditions, but I hope that there's some fancy copy-on-write and sub-slicing stuff going on so that if I spawn 10 threads to process 10 parts of my array I don't make 10 copies of the whole array. For GPU support I want to

The off-heap support mentions "all objects are quickly serializable and deserializable to and from this format by default". Anyone can claim "quickly", I want to know exactly how efficient this serialization is. Does it use zero-copy casting with some patching? Is it just a memcpy to the GC heap? Does each type get code-generated serializers/deserializers or maybe it's done with reflection? Whether this feature is useful entirely depends on exactly how fast this serialization is.

How does the remote code execution transmit code? Do I need to make sure that my work units are big enough that every remote JVM can warm up and JIT transmitted bytecode? Is there caching so I don't transmit the standard library every time?

trishume··on Fragile narrow laggy asynchronous mismatched pipes kill productivity
I think it should be possible to buy or use software from third parties. One thing I'm disappointed about and think we need better tools to avoid is the fact that third parties provide their tools as services rather than libraries. There's reasons they do that, deploying a library that all your customers can easily use is hard right now, but there's no reason it has to be that way.

Some things can't easily be libraries like databases, but other things like some caches, miscellaneous operations like image resizing (depending on an architecture that can handle the load on those servers), and a bunch of other things could just be libraries.

trishume··on Fragile narrow laggy asynchronous mismatched pipes kill productivity
This is also an interesting system in that it's an example of how you can get away with a non-distributed system if your problem is small enough but eventually that falls over. Once you get to large corporation monorepos git operations start to get real slow and use too much hard disk, so you end up with them either creating/using a new VCS or doing some complicated undertaking like https://devblogs.microsoft.com/bharry/the-largest-git-repo-o...
trishume··on Rosetta: The Engine Behind Cray’s Slingshot Exascale-Era Interconnect
Note: I have never worked with an HPC system, take what I say with a grain of salt.

I suspect the answer is in the networking, what this article spends most of its time talking about. HPC networking is so ridiculously much better than commodity networking. 1us latencies vs 100us+, 200Gbps bandwidth vs 10Gbps. I imagine certain kinds of especially simulations involve a ton of communication between nodes simulating nearby cells and everything is completely bottlenecked on that. It might even be that you can't even match a supercomputer's speed by just buying more AWS instances because the scaling factors on the communication mean more instances doesn't make your sim faster. Again this is mostly inference on my part from things I've read, no first-hand knowledge.

trishume··on Teleforking a Process onto a Different Computer
Indeed! I was talking to someone about their attempt to fork a Graal Java process and recreate all the compiler and GC threads, and I said if I had that task I'd be tempted to just use my new knowledge to implement a fork that also recreated those threads rather than trying to understand how to shut them down and restore them properly.
trishume··on Teleforking a Process onto a Different Computer
<3
← PreviousPage 2 of 15Next →