HNHacker News
TopNewBestAskShowJobs

dajonker

967 karma · joined August 19, 2015

submissionscomments
dajonker··on Google spoofed via DKIM replay attack: A technical breakdown
Would this be preventable by setting strict alignment for SPF? i.e. aspf=s in the DMARC DNS record.
dajonker··on Use Your Type System
It is. To some it is more fun to reinvent the wheel than to study history
dajonker··on Use Your Type System
A lot of us programmer folk are indefinitely in search of that one thing that will finally let us write the perfect, bug-free, high performance software. We take these concepts to the extreme and convince ourselves that it will absolutely work as long as we strictly do it the Right Way and only the Right Way. Then we try to convince to our fellow programmers that the Right Way will solve all of our problems and that it is the Only Way. It will be great, it will be grand, it will be amazing.
dajonker··on OpenAI charges by the minute, so speed up your audio
Gemini 2.5 pro is, in my usage, quite superior for high quality transcriptions of phone calls, in Dutch in my case. As long as you upload the audio to GCS there you can easily process conversations of over an hour. It correctly identified and labeled speakers.

The cheaper 2.5 flash made noticeably more mistakes, for example it didn't correctly output numbers while the Pro model did.

As for OpenAI, their gpt-4o-transcribe model did worse than 2.5 flash, completely messing up names of places and/or people. Plus it doesn't label the conversation in turns, it just outputs a single continuous piece of text.

dajonker··on Phlex for Rails Emails: Action Mailer Without ERB
It's a necessary evil, isn't it? You're not programming your application in pure HTML or SQL, you write it in some general language that can do much more. But the browser and database don't speak that language natively. They want strings which they then turn into something useful. So you need to build these big strings and unless your application is completely static, you'll need string interpolation one way or another.
dajonker··on Framework's first desktop is a strange–but unique–mini ITX gaming PC
The Ryzen APU could be interesting for running local AI models and with 128 GB of RAM you can fit quite a large model. Plus it should be relatively energy efficient compared to a full size desktop build with separate GPU. Lack of PCIe 5.0 is a bit of a bummer as you could otherwise plug in some new Samsung 9100 Pro NVMe drives.

Would love to see how it performs. It supposedly has a memory bandwidth of 256 GB/sec which is about similar to a Threadripper Pro 7965WX with 8 memory channels. A Mac Studio M2 Ultra has 800 GB/sec of bandwidth though (which is RTX4080/RTX5080 territory) but is also about 2-3x more expensive at 128 GB of memory, not to mention the cost of upgrading internal storage.

dajonker··on OCR4all
Gemini does not seem to do OCR with LLM. They seem to use their existing OCR technology of which they feed the output into the LLM. If you set the temperature to 0 and ask for the exact text as found in the document, you get really good results. I once got weird results where I got literally the JSON output of the OCR result with bounding boxes and everything.
dajonker··on Ruby on Rails 8 with Vite and Tailwind CSS 4
I tried Vite with rails for development once, as you can set it up to automatically reload when any html/CSS/js changes, but in the end I didn't think it was worth the extra hassle of more configuration and dependencies on the JavaScript ecosystem. I personally prefer the simplicity of the "no build" setup with importmaps.
dajonker··on Fish 4.0: The Fish of Theseus
I might be wrong but most optimizing compilers will treat "if false" and the following code as dead and remove it.
dajonker··on Why we use our own hardware
This exactly, most leaks don't involve any physical access. Why bother with something hard when you can just get in through an unmaintained Wordpress/SharePoint/other legacy product that some department can't live without.
dajonker··on 2x 16GBx256GB Mac minis cost $1 cheaper than a single 32GBx512GB Mac mini
RAM and storage upgrades have always been absurdly expensive at Apple. It never stopped millions of people from buying them anyway.
dajonker··on Rewrite It in Rails
Unfortunately, I did not! The reason for choosing Rust was mostly because of the lack of nulls and the way it handles errors. Basically the Option and Result types. And because you have so much low level control with a language that otherwise feels quite like a high level language.

I did try Erlang around 2017-2018 and quite liked it. The Joe Armstrong book is one of my favorite programming books. Perhaps I'll have a look at Elixir if I ever need to build something new from scratch.

dajonker··on Rewrite It in Rails
Also try other languages for yourself and see if they are indeed as good as you think they might be. Or you might never realize that the grass isn't necessarily always greener on the other side. Unfortunately not everyone will have time to do that for longer than a couple of hours or days.
dajonker··on Rewrite It in Rails
These kinds of tests are useless (to me at least) for three reasons.

First, these kinds of tests don't do anything useful and just show that some frameworks have more overhead than others. Once you have an app that was developed over years rather than hours and actually does a lot of stuff on every request, it's a whole different game.

Second, the kinds of applications I write rarely get more than 10-20 requests per second. If Rails would peak at 2500 rps as that YouTube video tests it at, that would be plenty. If I were writing some kind of IoT platform rather than a business app, I'd probably not start with Rails for that reason.

Third, for an actual web application, you want to consider what the user experiences, not just how fast the server responds. You can make an application feel much faster than the server response times by preloading on hover, (http) caching, async loading of things that are not visible yet, etc.

dajonker··on Rewrite It in Rails
There's lots of tricks you can do, such as preloading pages when the users hovers over the link. This makes even a "slow" page load of 400ms feel pretty much instant to a human.
dajonker··on Rewrite It in Rails
The downside of using more than one programming language (not counting javascript) is that it makes everything more complex. Development, testing, deployment, issue tracking, etc. Plus it forces people to either specialize in one part of the application or learn two things in depth.
dajonker··on Rewrite It in Rails
Yes this was indeed the most important thing for me to realize. I am now much happier, not constantly thinking "if only I had Rust enums!"
dajonker··on Rewrite It in Rails
In another company I had to completely replace ActiveAdmin with "vanilla" Rails abstractions as it was quite buggy and caused Rails to hang indefinitely as soon as you edited any ruby file. The admin part also turned out to be the most used part of the app, so it probably made sense to replace it in any case, but the bugginess at the time was more than I could handle.
dajonker··on Rewrite It in Rails
Sure, I'll bite. Are you a Rails developer maintaining an app that actually has massive performance issues?

Luckily, our Rails app is very snappy and runs on hardware equivalent to an average 4 year old laptop. No issues with performance that I can't fix. No exorbitant power usage.

Also, as a niche business app, it will never have to scale as much as GitHub does.

dajonker··on Rewrite It in Rails
Yeah, it is maybe a bit of a clickbaity title, but I thought it was relevant enough. I tried Rewriting it in Rust and ended up not finding it worth the cost. There was some rewriting in Rails, but indeed, not very much.

I did learn that things wouldn't necessarily be any better if I were to use language/framework X instead of Y.

Edit: I guess I also learned that Rails does so much for you, so you can focus on building a good product. Just gotta make sure you use it as it wants to be used as much as possible.

dajonker··on AMD's Turin: 5th Gen EPYC Launched
Surely that's a good reason for Oracle to increase their prices even more, leading to a cat-and-mouse game between CPU makers and software license sellers.
dajonker··on How to make Product give a shit about your architecture proposal
You hit the nail on the head, it's about responsibility and trust, and this is often lacking in various ways when tech feels like they need permission from product to spend time on anything.
dajonker··on How to make Product give a shit about your architecture proposal
In my experience/opinion, if you are mature enough as an engineer(ing team), you should be able to make and implement most technical decisions on your own. Discussing technical changes with non-technical people is usually a giant waste of time. They often don't understand what you want to do in the first place and think it's optional, because why else would you bring it up for discussion?

Similarly, don't plan refactoring or architecture changes on the same board as your feature requests. Product managers will think they can change the priorities of this type of work and then they will.

The only thing that is useful to discuss in advance is scheduling when you can take the system down for maintenance.

For the rest, it's better to ask for forgiveness than to ask for permission: just do the changes that you think are technically necessary to keep everything running smoothly. Measure the outcomes and present them professionally.

Of course, with maturity as an engineer, I mean that you will not decide to do crazy, hype driven things like rewriting everything in Rust and then not doing any new features for a year. You have to be able to make trade offs and compromises to keep both sides happy.

dajonker··on Rust needs a web framework
I think dhh said, great frameworks/libraries are extracted, not created from scratch. That would mean, someone building a (successful, money making) web application in Rust and building their own framework as they go, open sources that framework and then continues using it for their production applications.

I have not seen such a success story for any Rust web framework yet. Although I would love to see one (or more!)

dajonker··on Rust needs a web framework
For me, the type system and the performance without having to do any optimization. The complete lack of runtime errors when your code compiles (*if you choose to write code that way)
dajonker··on Rust needs a web framework
What makes Rails (and similar frameworks in other languages) great is the large number of companies using it in production and having many people contribute to it. It therefore is very feature complete and works for a lot of use cases and edge cases. For everything that Rails does not do out of the box, there is a great ecosystem of libraries. Rust has no such framework. There is often just one person pulling the whole project and the number of active contributors is very small. This carries some risks and might mean that you end up having to do a lot of plumbing yourself.
dajonker··on Solar will get too cheap to connect to the power grid
5-7 years should be a no-brainer, that's pretty good value since the panels and batteries easily last longer than that.
dajonker··on Django SQLite Production Config
SQLite is a great database but it's not suited for applications with frequent writes or write-transactions that take longer than a couple of milliseconds.

I tried basically everything in this blog post with our Rails business application and none of it really works in practice. I expect the same to be true for Django.

The reason is that with Rails, you usually end up with a bunch of callbacks on models which cause "long" running transactions. For example, the application writes a record to the database, then uses the newly generated primary key to create a bunch of related records, etc. With a reasonable amount of business logic, this means that a transaction can easily run over 100 milliseconds. Not because the database is slow (it's not), but because the application may do all kinds of slow stuff in between the different statements that run in a transaction.

SQLite is single threaded when it comes to writes, so when an average write can take 100 ms, your throughput is already limited to about 10 transactions per second. IMMEDIATE transactions are indeed necessary, to wait dor the database to be ready before attwempting any transaction. Because at least it is easy to have a backoff/retry strategy before letting the framework run its transaction logic.

However, even with just a handful of active users, I needed to make sure that waiting transactions were retried a large number of times, to prevent users from getting a 500 error and requiring them to perform the same action again. However, users were complaining that the application was slow, and I had the metrics that told me the same.

Eventually I just switched to Postgres and all of the issues just disappeared. The users also immediately told me that the application became much more responsive.

I did notice in the metrics that a lot of the read operations actually became slower, as SQLite is really efficient at doing lots of small reads as compared to a client/server model database.

I do still think that SQLite is very suited for production applications, but only when it is read heavy or has very lightweight write transactions.

dajonker··on Mp3tag – Universal Tag Editor
Have you tried "Mixed in Key" for detection of BPM and key? I used this a long time ago for EDM and for that it works great. I don't know if it works reasonably well for other genres.
dajonker··on Write OpenAPI with TypeSpec
We have been using this for a couple of months now and it works really well. It's so much better than writing OpenAPI by hand, and I never ever will do that again after working with TypeSpec.

Thank you!

← PreviousPage 3 of 9Next →