HNHacker News
TopNewBestAskShowJobs

hakunin

2,508 karma · joined March 4, 2010

https://max.engineer, mastodon:ruby.social/@maxim, x.com/hakunin, bsky.app/profile/max.engineer

meet.hn/city/43.1009031,-75.2326641/City-of-Utica

---

submissionscomments
hakunin··on DeepSeek OCR
I get what you're saying, I'm just disagreeing with your thought process. By that logic benchmarks would also not include the LLMs that they did, since most people wouldn't be able to run those either (it takes expensive hardware). In fact, more people would probably be able to run Vision framework than those LLMs, for cheaper (Vision is even on iPhones). I'm more inclined to agree if you say "maybe people just don't like Apple". :)
hakunin··on DeepSeek OCR
The short answer is a tool like OwlOCR (which also has CLI support). The long answer is that there are tools on github (I created the stars list: https://github.com/stars/maxim/lists/apple-vision-framework/) that try to use the framework for various things. I’m also trying to build an ffi-based Ruby gem that provides convenient access in Ruby to the framework’s functionality.
hakunin··on DeepSeek OCR
I don’t think 10% of anything would be considered relatively small even if we talk about 10 items: literally there’s only 10 items and this 1 has the rare quality of being among 10. Let alone billions of devices. Unless you want to reduce it to tautology, and instead of answering “why it’s not benchmarked” just go for “10 is smaller than 90, so I’m right”.

My point is, I don’t think any comparative benchmark would ever exclude something based on “oh it’s just 10%, who cares.” I think the issue is more that Apple Vision Framework is not well known as an OCR option, but maybe it’s starting to change.

And another part of the irony is that Apple’s framework probably gets way more real world usage in practice than most of the tools in that benchmark.

hakunin··on DeepSeek OCR
I mostly OCR English, so Japanese (as mentioned by parent) wouldn't be an issue for me, but I do care about handwriting. See, these insights are super helpful. If only there was, say, a benchmark to show these.

My main question really is: what are practical OCR tools that I can string together on my MacBook Pro M1 Max w/ 64GB Ram to maximize OCR quality for lots of mail and schoolwork coming into my house, all mostly in English.

I use ScanSnap Manager with its built in OCR tools, but that's probably super outdated by now. Apple Vision does way better job than that. I heard people say also that Apple Vision is better than Tesseract. But is there something better still that's also practical to run in a scripted environment on my machine?

hakunin··on DeepSeek OCR
10% of hardware is an insanely vast amount, no?
hakunin··on DeepSeek OCR
Wish someone benchmarked Apple Vision Framework against these others. It's built into most Apple devices, but people don't know you can actually harness it to do fast, good quality OCR for you (and go a few extra steps to produce searchable pdfs, which is my typical use case). I'm very curious where it would fall in the benchmarks.
hakunin··on What Dynamic Typing Is For
Right, but I hope you also understand that nobody's arguing for removing static types in your situation. In a highly fluid, multiple deployment per day, low stakes environment, I'd rather push a fix than subject the entire development process to the extra overhead of static types. That's gotta be at least 80% of all software.
hakunin··on How does Turbo listen for Turbo Streams
Yeah, these are examples of situations I was referring to, where it makes sense.
hakunin··on What Dynamic Typing Is For
I don't disagree, dynamic languages require better writing skills, so for example, in case of bilingual teams, metadata helps bridge the language barrier. However, if your team is good at expressing how/what/why[1] in your dynamic language, you will not have much issue answering what things are. Again, there are costs with either choice.

[1]: https://max.engineer/maintainable-code

hakunin··on What Dynamic Typing Is For
Thanks for writing this (just a generally interesting window into a rare industry). As you point out, you can't only ever add. If there was a study suggesting that static types don't add enough safety to justify tradeoffs, you might consider phasing them out. In your industry, they are currently acceptable, there's consensus on their value. You probably have to prioritize procedure over individual developers' clarity of perception (because people differ too much and stakes are too high). That's fair, but also a rare requirement. Stakes are usually lower.
hakunin··on What Dynamic Typing Is For
> It’s interesting to ask how we can bring development costs down without compromising quality; in my world, it’s not at all interesting to talk about strategically reducing quality.

You have some level of quality ya'll are used to, that was already achieved by compromise, and you'd like to stay there. How was that original standard established?

On an exponential graph of safety vs effort (where effort goes up a lot for small safety gains) you are willing to put in a lot more points of effort than general industry to achieve a few more points of safety.

hakunin··on What Dynamic Typing Is For
Everything has a cost. If you had to pick between "write 99% correct code in 1 week" vs "write 100% correct code in 1 year", you probably would pick the former, and just solve the 1% as you go. It's an absurd hypothetical, but illustrates that it's not just about correctness. Cost matters.

What often annoys me about proponents of static typing is that they sound like it doesn't have a cost. But it does.

1. It makes syntax more verbose, harder to see the "story" among the "metadata".

2. It makes code less composable, meaning that everything requires complex interfaces to support everything else.

3. It encourages reuse of fewer general types across the codebase, vs narrow scoped situational ones.

4. It optimizes for "everything must be protected from everything" mentality, when in reality you only have like 2-5 possible data entries into your system.

5. It makes tests more complex to write.

6. Compiled languages are less likely to give you a powerful/practical REPL in a live environment.

For some, this loses more than it gains.

Also, albeit I haven't seen this studied, human factor probably plays bigger role here than we realize. Too many road signs ironically make roads less safe due to distraction. When my code looks simple and small, my brain gets to focus better on "what can go wrong specifically here". When the language demands I spend my attention constructing types, and add more and more noise, it leaves me less energy and perspective on just taking a step back and thinking "what's actually happening here".

hakunin··on Adding Breadcrumbs to a Rails Application
Here's my preferred approach, with breadcrumbs kept in erb views:

Make this view helper.

    def breadcrumb(&)
      render(layout: 'common/breadcrumb', &)
    end
Add this partial 'common/_breadcrumb.html.erb' (do whatever html you want):

    <li class="breadcrumb-item">
      <%= yield %>
    </li>
Add this to your layout:

    <% if content_for?(:breadcrumbs) %>
      <ol class="breadcrumbs">
        <%= yield :breadcrumbs %>
      </ol>
    <% else %>
Then this is how you use it in your views:

    <% content_for :breadcrumbs do %>
      <%= breadcrumb { link_to 'Foo', foo_url } %>
      <%= breadcrumb { link_to 'Bar', bar_url } %>
      <%= breadcrumb { 'you are here' } %>
    <% end %>
For minitest tests I add this helper:

    module AssertBreadcrumbs
      Crumb = Struct.new(:text, :href)

      # Note: the block must have 1 argument per breadcrumb. It asserts their count.
      def assert_breadcrumbs(&blk)
        assert_select '.breadcrumb-item', blk.parameters.size do |items|
          structs = items.map { |item|
            if (link = item.css('a')[0])
              Crumb.new(link.text, link['href'])
            else
              Crumb.new(item.text.strip)
            end
          }

          yield(*structs)
        end
      end
    end
Which you can use in tests like this:

    assert_breadcrumbs do |item1, item2, item3|
      assert_equal 'Foo', item1.text
      assert_equal foo_url, item1.href

      assert_equal 'Bar', item2.text
      assert_equal bar_url, item2.href

      assert_equal 'you are here', item3.text
      assert_nil item3.href
    end
hakunin··on How does Turbo listen for Turbo Streams
Nice deep dive. On a tangential point: nowadays Turbo Streams are less needed in Rails, because of the way Turbo automatically kicks in by default. And in most (not all) situations, backend doesn't really save much time returning a piece of a page vs a full page, since in most backends preparing data for response takes 10s of milliseconds. So might as well just stick with default, unless you know that you specifically need to serve some granular change. While learning this stuff, I wrote a little FAQ (where I was the frequent asker of questions) that clarifies some things: https://notes.max.engineer/turbo-8-faq
hakunin··on Ruby Blocks
I think I feel you. However, I think you have conceptually loaded "method" with more meaning. I think a less loaded way to think of the object/method is that the object is the first argument to the method that is called on it. So

    5.times { puts 'hi' }
is equivalent to

    times(5) { puts 'hi' }
which you could expand to

    my_function = -> { puts 'hi' } 
    repeat_times(5, &my_function)
And here is another reason for the disconnect: in a purely functional language repeating a function five times is useless, you're doing something for side effects only. Looping in itself is kind of a wrong (i.e. incomplete) abstraction for functional dev, because you're usually thinking in higher level concepts, such as `reduce`-based transformations. Maybe that's another part of the reason why `5.times { … }` feels off.

After my foray into functional programming, I actually ended up appreciating Ruby more, because it lets you have it both ways: program your computer directly, and harness functional concepts. Since computer hardware is not functional I don't want the extra ceremony and abstraction over it for the sake of purity.

All that said, going back and forth between Ruby and Elixir really conceptually crystallized for me that the method call receiver is basically just the first argument to the method, accessible with the keyword `self` (which in Python is made explicit for example).

hakunin··on Apple M5 chip
Everything I recently researched about display technologies, mini LED has no image retention/burn-in issues, and renders fonts better compared to OLED. It seems you want OLED for media (and mobile, since you often alternate entire screens), IPS for work, and mini LED as a more expensive compromise without burn-in, that does text as well as IPS, and media almost as well as OLED. I wonder why would they even want to use OLED on work screens with lots of static content, did something major change about the tech such that it doesn't suffer these issues anymore?
hakunin··on Five years as a startup CTO: How, why, and was it worth it? (2024)
I know it's weird, I'm a long time software guy myself, and would be surprised too if I didn't see this for myself. The thing about us is that our customers are banks. New banks are joining because they already know about us from the other banks. Our founders do the literal legwork of flying places and talking to people, establishing direct relationships, and talking on the phone. This is actually one of our strengths, we are not primarily a tech shop trying to sell tech to banks, but rather our founders are former bankers themselves who are trying to help solve their problems first, and sell tech as a side effect of that.
hakunin··on Five years as a startup CTO: How, why, and was it worth it? (2024)
I work with him at this company. We are still going, just don’t have much of a public facing side, because most of the sales are direct b2b. We’re working on showcasing more of what we do, but it hasn’t been our top priority.
hakunin··on Instant Checkout and the Agentic Commerce Protocol
We tried different services like these, they quickly become unappetizing. You end up forcing yourself to microwave a box vs. order something fresh cooked.
hakunin··on Instant Checkout and the Agentic Commerce Protocol
I need this for DoorDash desperately. My wife and I trying to figure out what to eat every day is one of the most annoying parts of the day. If anyone has any recommendations, would be much appreciated.
hakunin··on Cloudflare is sponsoring Ladybird and Omarchy
For one, I don't think complexity is determinative of impact. At least I hope not, otherwise my startup ideas are all DOA. For two, Omarchy is becoming more complex as more maintainers come in to write way more automation. You can kind of foresee where this is going: an Arch wrapper slowly growing into effectively a separate OS that's pushing other software to accommodate its choices. (See getting chromium to support live theme reloading, trying to get Fortnight to support Linux, etc).

IOW, Ladybird has depth, Omarchy has breadth.

hakunin··on Be careful with Go struct embedding
This might sound bad, but having worked in a few different languages, I find it kind of cute how some parts of Go seem to promote simplicity while others are simply what the authors were used to growing up. Sometimes it frustrates me when I write Go, when I see a tradeoff due to the latter. But yeah. Languages tend to have a lot of subjectivity of their author in them. The more "strict" the language is, the more confined you are to the author's opinions.
hakunin··on After getting Jimmy Kimmel suspended, FCC chair threatens ABC's The View
> I disagree that this is an accurate characterization of the side that isn't the "fringe far left".

The evidence is there. Trump has been thrashing back and forth on tariffs, explaining 2 mutually-exclusive reasons to have them, and they justify it each time. Trump has been infringing on free speech and due process at levels beyond anything democrats have ever done (if you don't count republican conspiracy theories), and they justify it. I have listened to a lot of debates, and nobody can answer a question "what would Trump do that would make me vote for democrats instead".

> Hasan Piker is getting to do another round

Again, these people are not voters.

> I am comparing media figures to media figures.

I'm sorry, I should've been clearer. You said "It was not a Republican media figure who made that video […]" and "it's not the right-wingers who are being shown to have all sorts of clips". I understood that as you making a point that democrats are worse than republicans in general because of these examples. Which cannot be true because the entire Trump cabinet and most republican lawmakers are now doing the most heated and divisive rhetoric constantly and unapologetically, as though they are influencers and agitators, not government of a 2-party nation. Their actions speak even louder than words. So what you're pointing out in totality pales in comparison to what republicans are doing. And I'm saying: you cannot point to leftie twitch streamers that don't have any political power, and compare them to the literal White House and republican lawmakers, to judge the magnitude of the problem on each side.

However, even if we single out just the media figures, it's absolutely insane how much conspiracy, lies, and divisive rhetoric has been fed into right wing minds. And it's almost awe-inspiring how lockstep all republican pundits are with each other. Nothing like that exists on the left.

hakunin··on After getting Jimmy Kimmel suspended, FCC chair threatens ABC's The View
> Twitch

There are only 2 sides on twitch right now, both illiberal. One side has the political philosophy that amounts to "if Trump does it, we support it". The other side is a fringe far left (e.g. tankies).

Except the former "philosophy" is supported by 90% of republicans, and the latter is ostracized by democrats. Even AOC (the once symbol of far leftism) shifted towards more mainstream liberal democratic values. These twitch lefties don't vote. They are politically nowhere in this country.

And you are comparing president of the country to twitch streamers. President is not supposed to be an edgy instigator and influencer, he's supposed to be president for everyone.

And yet, every disavowal that Trump made, he ended up blaming democrats in the same breath. He constantly berates everyone on the left, sues, destroys politically, or otherwise silences anyone who criticizes him. I'm supposed to feel like he's my president even if I didn't vote for him, but I cannot, because he makes that distinction very clear.

hakunin··on After getting Jimmy Kimmel suspended, FCC chair threatens ABC's The View
> - What Kimmel said was wrong (assuming you believe Utah state investigators) and deeply irresponsible and inflammatory.

I agree that we should be disavowing violence.

The problem is that for 10 years democratic lawmakers and media figures are disavowing violence on both sides, while republican lawmakers and media figures are doing the opposite: stoking the flames, promoting the idea of civil war, telling everyone that the country is stolen from them, that immigrants are out to get them, that democrats are out to get them, etc. According to this rhetoric, democrats are to blame for all of this. When something bad happens and it's not democrats who caused it, they come up with a conspiratorial explanation for how it's still democrats.

So when one side keeps constantly disavowing, and the other side keeps constantly attacking, at some point disavowing becomes literally the wrong thing to do. You can't lay down your weapon while the other person just keeps hitting, and expect the hitting to stop.

What we are being shown repeatedly by republicans is that violent, divisive rhetoric actually leads to electoral victories, and grants free license to become "president for one side only" and do whatever that side wants. If democrats continue to disavow and apologize, they will end up simply extinct. This is why some democrats stopped doing that.

hakunin··on iTerm2 Web Browser
This is surprisingly on point for any (esp. backend/fullstack) web devs who have terminal and editor (2 separate windows) maximized side by side in MacOS, where it only natively supports 2 maximized windows at a time. I used to have terminal + editor in one space, and terminal + browser in another. And sometimes I would add another space with editor+browser, in case I was doing something more front-end oriented. Now I can have everything in one space on MacOS.
hakunin··on I don't like curved displays
To be fair, this is a short lived effect immediately after transition. Goes away in 2 minutes.
hakunin··on I don't like curved displays
I got a curved 5k2k lg display for games, and every time I switch to work monitor (5k regular flat lg), it feels like I'm looking at an old CRT that's bulging out at me. Such a strange sensation. I do like the curved display a lot however.
hakunin··on Americans Lose Faith That Hard Work Leads to Economic Gains, WSJ-NORC Poll Finds
I guess the “hard work = gains” sentiment is showing something, but since it’s literally a misnomer on its face, and people take it way too literally, I think it doesn't show what many think it does.

I think the problem is that work changed too fast. This shift is much harder to navigate. A lot of 20th century career conveyer belts have been disrupted in the last 30 years. A lot of schools are still setting traditional expectations that no longer match reality. This is why people think their work doesn’t lead to gains: job requirements have been swapped from under US workers, and everyone is struggling to keep up. That said, opportunities are larger than ever, but we have to become more "entrepreneurial" again, perhaps more akin to the way we were during Industrial Revolution. Take that English major and use it to become an excellent YouTuber rather than a writer, type shit.

> In fact, I'd go so far as to say everything about capitalism trends towards pre-made paths.

How do you explain every new innovation? Cars during the time of horses? Twitter during the time of Facebook and MySpace, family medicine during the time of hospitalists and experts (fairly new field), Amazon during the times of Sears, framework laptop during the times of Apple, etc, etc. People don’t always know what they want, and America is incredibly well catered towards starting businesses (at least until a certain guy in a certain white building does permanent damage). Saying that we’re all constrained to market is very reductive. We are more empowered to find new ways to be useful than ever before. Doing economically unviable things has never been ok.

I just want to make it clear that very specifically “hard work means economic gains” is ridiculous on its face, and a lot of people take it literally, without the caveat that you have to do something useful.

hakunin··on Americans Lose Faith That Hard Work Leads to Economic Gains, WSJ-NORC Poll Finds
Funny you say that, I too am an immigrant to US. Your parents probably understood the above on an intuitive level. We immigrants think of it as "goes without saying" type thing.

> It doesnt work anymore

It never worked to just work hard. People in today's society want to part with more money than ever in all of history (to buy things and services), you just need to be a part of what they want to part with their money for.

← PreviousPage 6 of 17Next →