HNHacker News
TopNewBestAskShowJobs

kjksf

6,940 karma · joined September 5, 2009

My website is https://blog.kowalczyk.info

Working on https://filerion.com/, a web based file manager (s3, Dropbox and more).

I created https://www.sumatrapdfreader.org

submissionscomments
kjksf··on Does the American Diabetes Association work for patients or companies?
This is shocking misinformation.

> Meat is considered a complete protein source, meaning it contains all nine essential amino acids that your body cannot produce on its own

Do carbs?

> Carbohydrates primarily provide energy for your body and are not a significant source of amino acids. Essential amino acids, which your body cannot produce on its own, are primarily found in protein-rich foods such as meat, dairy, eggs, and some plant-based sources like quinoa and soy

So you're 100% wrong: carbs do not provide essential amino acids and meat does.

The mechanism behind type 2 diabetes is well known and it's all about eating too much carbs.

Sugars and carbs are converted to glucose in your blood.

You can't have too much (or too little) glucose in blood.

Some of it is burned as fuel but the rest has to be removed somehow so body starts producing insulin to push glucose into cells where it's get converted into fat.

If you can't produce insulin, you have type 1 diabetes and need insulin injections.

If you overeat carbs you store more and more fat. You become over-weight and insulin gets worse at moving glucose from your bloodstream.

The diagnostic test for diabetes is literally: do you have too much glucose in your blood (compared to what is healthy range) or related test a1c which tests for elevated levels of insulin in your blood.

If you know the above, then how in the world can you claim that carbs are not the problem? It is literally the thing that causes diabetes.

The simple solution to reversing type 2 diabetes is therefore to stop eating carbs. That's low carb diets like keto or carnivore.

You make very wrong assertions (carbs are not the problem; carbs have all macronutrients; low carb diets are bad) without a single supporting argument or reference.

kjksf··on Starlink geofence appears to have some gaping holes
That was in the context of hostile nations, like Russia or Iran or Cuba, where Starlink has no chance of being allowed.

Everywhere else it makes much more sense to get permission to operate (vs. trying some pirate operation where Starlink is treated like a contraband that needs to be illegally imported into the country, the payments must happen stealthily, you get no support etc.).

kjksf··on Tesla conducting more layoffs, including entire Supercharger team
They are not destroying superchargers. They are still there and even if they don't add a single new one for the next 5 years, it'll still be the largest and the best supercharging network in US. No need to be so melodramatic about it.

If you ask me it's a temporary cost cutting. When interest rates come down, car sales pick up and revenues pick up, they'll re-start the build out of the network.

kjksf··on Speeding up C++ build times
I wrote about how I keep build times sane in SumatraPDF at https://blog.kowalczyk.info/article/96a4706ec8e44bc4b0bafda2...

The idea is the same: reduce the duplicate parsing of .h files.

I don't use any tools, just a hard-core discipline of only #include'ing .h in .cpp files.

The problem is that if you start #include'ing .h in .h, you quickly start introducing duplication that is intractable, for a human, to avoid.

On another note: C++ compiler should by default keep statistics about the chain of #include's / parsing during compilation and dump it to a file at the end and also summarize how badly you're re-parsing the same .h files during build.

That info would help people remove redundant #include's.

But of course even if they do have such options, you have to turn on some flags and they'll spam your build output instead of writing to a file.

kjksf··on Opengist: Open-source alternative to GitHub Gists
Might as well plug my adjacent tool: https://tools.arslexis.io/gisteditor/

It's a better interface for editing / creating GitHub gists.

Login with GitHub, get a list of gists, get a full blown CodeMirror-based editor. Preview for markdown files.

And it's open-source: https://github.com/kjk/tools.arslexis.io/tree/main/frontend/...

Built mostly with Svelte 4 and a tiny bit of Go backend.

kjksf··on H-1B visa fraud alive and well amid anti-abuse efforts
It's only a counter argument if you make an assumption that H1-B program is designed to bring, specifically, healthcare or pharma workers.

Unless you can point to a reason why law of supply and demand was breached, high salaries reflect high demand vs. low supply and low salaries reflect low demand vs. high supply.

My understanding is that healthcare and pharma are not exactly poor industries so if they don't pay their highly skilled workers a lot of money, the most likely explanation is that there's abundance of those workers.

What follows from that is that we don't need to import them from abroad.

And that logic generalizes to all industries hence it really is that simple as letting in those who can score the highest salaries.

It aligns the interests of U.S. in general (highly paid workers put way more into taxes than they get back in benefits) with the interests of the companies.

It's hard to game, simple to apply and trivial to verify (once you issue SSN you check with IRS once a year if they are really paid what the company said it will pay). And if companies try some fraud they are now in the business of tax fraud.

It boggles the mind that this is not a rule applied by all governments in the world. Unless, of course, you understand that government is not exactly pre-occupied with doing the best thing for the country but with doing the best thing for themselves. All those speeches you can give, on both sides, about immigration!

kjksf··on Fivefold Slower Compared to Go? Optimizing Rust's Protobuf Decoding Performance
To bring this discussion back to earth, the Go code in question is: https://github.com/VictoriaMetrics/easyproto/blob/master/rea...

I don't see why did you label Aliaksandr Valialkin, the author, an "expert". I mean, he's no dummy but what exactly makes him an expert on optimizing Go code?

As someone who also writes Go, I don't see any "hyper optimizations" in the code. It just decodes the bytes of Protocol Buffer using straightforward code that I would expect a competent developer to write.

It really is just: read bytes from memory ([]byte) and interpret them according to PB spec.

There's only one trick there: unsafeBytesToString() that does no-allocation conversion of []byte to string. This is unsafe in general but safe in their specific case. And I've seen this trick before so it's not some secret, expert-only knowledge.

Most comments here are like bad LLMs: hallucinating opinions without bothering to spent even few minutes acquiring the data to base those opinions on.

kjksf··on Interview with Yanis Varoufakis on Technofeudalism
"serfs were peasants who were bound to the land they worked on and were under the authority of the landowners or lords"

Last time I checked Twitter (the supposed lord) doesn't have the power to make you (the supposed serf) post on Twitter.

That is, I would say, a crucial distinction that makes the serf comparison ultra ridiculous.

Then again if Varoufakis said that the relationship between Twitter and its users is based on mutual benefit but Twitter gets more benefit, then it wouldn't make you as angry as saying that they people are serfs of techno-feudalists.

kjksf··on I Tried Tesla FSD
Don't fall for confirmation bias i.e. seeking out information that confirms your priors.

If you want to get an accurate picture of FSD 12, watch random youtube videos: https://www.youtube.com/results?search_query=fsd+12.3

The majority of people are over the moon about how good the latest version is.

kjksf··on Ask HN: Is AngelList Legit?
Not a very good point, though.

Madoff was successful in big part because there was no one that could independently verify anything. (and apparently the government botched multiple investigations after referrals from suspicious people).

That part of AngelList is about coordinating between lots of parties i.e. companies that seek funding and people providing funding.

I'm not sure how you could keep a scam going by publicly telling people that you've invested in hundreds of legit startups on your behalf without a single one of those startups saying "wait a minute, we have no idea what AngelList is and we never got any money from them".

Being skeptical is good but this isn't it.

kjksf··on Ask HN: What non-AI products are you working on?
Yes, it's a fork of Heynote as mentioned in the docs https://edna.arslexis.io/help-win#credits
kjksf··on Scripts should be written using the project main language
I do that in my Go projects.

In fact my "scripts" are actually part of the main executable. I use cmd-line args to invoke the needed functionality.

For example, in the past I would have written a Python script to deploy my Go binary to a server, possibly using tools like Fabric that provide functionality to make it easier.

Today I add `-deploy-hetzner` cmd-line to my Go binary and it does the work. It builds itself, copies the binary to the server, kills the old instances, configures caddy if needed, starts newly uploaded instance etc.

For example my deploy.go is 409 lines of code, which is not that bad. You can see exactly how this works: https://github.com/kjk/edna/blob/main/server/deploy.go

I standardized on how I deploy things so deploy.go is mostly re-used among several projects.

Writing this code isn't much more difficult that what I used to write in Python.

This kind of code can be shorter because I don't have to handle errors, I just panic if something goes wrong.

I like that I don't have to switch between different languages and that I have full control and understanding over what happens. Fabric used to be a bit of a black box.

I even wrote an article about this idea: https://blog.kowalczyk.info/article/4b1f9201181340099b698246...

kjksf··on Ask HN: What non-AI products are you working on?
I'm working on Edna https://edna.arslexis.io/

It's a web-based scratchpad and note taker for developers and power users.

It sits somewhere between Obsidian and Simplenote.

It's particularly optimized for keyboard navigation: Ctrl + K / ⌘ + K to open note navigator where you can quickly create new note, switch between notes, delete notes.

Even though it runs in the browser, when running on Chrome you can store notes in a folder on disk and share between computers if that folder is replicated via DropBox / OneDrive / Google Drive etc.

More info: https://edna.arslexis.io/help

kjksf··on United States vs. Apple
per apple they paid $60 billion to iOS developers. Given 70/30 split, that's $26 billion of revenue to Apple.

For context in 2022 Adobe made $17.6 billion.

So 30% cut of iOS store is 40% more than Adobe revenue.

And I'm guessing the bandwidth + review team overhead is many times lower than, you know, actually paying software developers, marketers, sales people etc. to write and promote software.

kjksf··on -2000 Lines of Code (2007)
And the probability of creating a Macintosh in a union shop is zero.

Abusive boss, normalized unpaid overtime, compensation based heavily on stock options, pay and promotions being based on merit and not on seniority and time spent in a company.

kjksf··on Redis adopts dual source-available licensing
The version they contributed to is still available under the same permissive license that was in effect when they were contributing the code.

The license change only affects the code written in the future and now people can change their mind about contributing.

That seems fair to me.

Maybe you think that morally the license should never change but there is no clause in the license to prevent changing the license, so that would not be a reasonable expectation.

kjksf··on Is Tesla more valuable than Toyota?
Debt can be good when used as leverage.

As I understand it, the majority of debt of car companies is used to provide leases.

So e.g. GM borrows money at X% interest rate and gives credit to customers at X+Y%.

Y% is their profit. So the bigger the debt, the more additional profit they make.

This is also a ticking bomb because leverage generates more profit when times are good but increase losses when times are bad.

That Y% finances the risk that a customer will stop paying.

It also comes from GM being able to re-sell the car after the lease for more that it's worth ($PriceOfCar - $TotalLeasePayments).

When bad times come, like in 2008, those companies are hit with double whammy: people have less money, so more people abandon the lease. And also buy less cars so car prices drop so re-sell value drops.

So suddenly GM has losses and cannot afford the debt payments and that's how they go bankrupt.

kjksf··on Is Tesla more valuable than Toyota?
If self-driving works it's inevitable that the market will transform from mostly selling cars to mostly providing robotaxi service.

Robotaxi service has "winner takes most" dynamics, just like regular human-taxi service. Just look at how stable Uber and Lyft marketshare was over the years.

Imagine company X drops 10 thousand robotaxis in San Francisco area. Anyone who cares to can get a taxi for half the price (or less) of regular taxi.

Company Y develops self-driving technology 6 months later. There's just no way for company Y to re-take significant market share in San Francisco if their costs are similar to company X.

They can drop 10 thousand cars but most San Franciscan who want such service already have app for service X installed and a habit of using it.

Company Y might decide on (expensive) marketing campaign or price war but company X can do that as well. Company X can finance price war from profit but company Y must borrow. And there's only so much you can borrow.

In US we saw this with Uber vs Lyft vs everyone else. Early market share of Uber proved to be bullet proof regardless of what Lyft tried to do.

In China Uber was in a trench price warfare with Didi and when they didn't see a way to win, they decided to loose (and sold their business to Didi).

So the winner of robotaxi market will be the first company that has a working self-driving software AND can produce millions of cars per year to capture the market.

kjksf··on What part of Rust compilation is the bottleneck?
Minor correction: Go compiler used to be a modification of Plan9 C compiler, then a Go port of that modification but then it was completely rewritten as a SSA-based compiler so today it has almost nothing to do with the original Plan9 code.
kjksf··on What part of Rust compilation is the bottleneck?
But then you have to compromise on speed of generated code, poor support of windows, number of libraries and overall ecosystem, no ability to generate standalone executables and probably more but I tried OCaml only briefly so can't speak to all of its shortcomings.
kjksf··on Show HN: Pywebview 5
No. They use whatever webview OS provides.

On Windows it's webview that is Edge (based on Chrome).

On Mac it's webview based on Safari.

They re-use the executable that is already installed in the OS.

They don't provide all the features that Electron does but you can do anything that a modern browser can do + add OS specific things with backend code (written in Go or Python or Rust, depending on which project you use).

kjksf··on Show HN: Pywebview 5
I would recommend wails (https://wails.io/) which is the same thing but for Go.

Nothing against this project it's just Python is not an optimal technology for shipping self-contained desktop apps.

You'll have to bundle the whole of Python distro which is very bloaty.

A Go will compile to a statically linked executable that only contains the code actually used in the app. Still not tiny but probably 10x smaller than packaged Python app.

And I used wails so can vouch that it works.

There's also an option for Rust (which I haven't used because I don't particularly want to learn Rust).

kjksf··on Rolldown: Rollup compatible bundler written in Rust
It'll be equally hard to write it from scratch in rust as it would be to add this to esbuild.

Maybe there are some considerations I don't know about but it does seem like hard forking esbuild would be much faster way to get there (hard fork so that they are not blocked or slowed down by whatever esbuild owner wants).

kjksf··on Interactive SQLite Documentation: Experiment with Queries in Real-Time
If your job requires something that SQLite doesn't provide, then sure, that's the wrong tool for the job.

But SQLite is literally the most frequently used database in the world so it clearly is the right tool for a large number of jobs.

It's a very fast and very capable database and the reliability is unmatched (because it has been the most tested and because Richard Hipp wrote more tests than anyone else).

There's this persistent myth that SQLite is some rinky dinky toy for toddlers.

I repeat: it's very fast, very capable database, more than capable of addressing 97% of the needs of people who use sql databases.

What bothers me about this kinds of "SQLite is not the right tool" assertions is a complete lack of any supporting evidence.

Like, give me an example of something that you're doing where Postgres or MySqlite offers meaningful improvement over SQLite.

I'm not saying those cases do not exist, just that they are much rare that people tend to assert and you haven't provided a single example.

Pieter Levels runs highly profitable, highly trafficked website (Nomad List) on sqlite and he doesn't even write joins. And my point is that you vastly overestimate the need for super duper advanced functionality in databases. Lots of apps were written on top of early MySQL, which was a joke in terms of both capabilities and reliability. SQLite today is more capable and reliable that MySQL was for a long time.

kjksf··on Interactive SQLite Documentation: Experiment with Queries in Real-Time
I don't like lack of pricing either. It would be a deal breaker for me as far as using their stuff. Maybe that's because they're in beta.

But the actual capabilities of their service - it just sounds like you didn't even care to learn what they offer because there's a lot to like.

First, it's a hosted SQLite. For those who know SQLite and not other databases is a reason enough to use it over hosted Postgres or hosted Mysql

They claim involvement of Richard Hipp, the creator of SQLite. That's as huge boost of credibility right there.

They have multi-node replication with Raft. That's not unique but also not something you get everywhere. Most hosted database services just give you a database on a single server.

They have Pub/Sub - that's even more rare than multi-node replication.

They have offline synch where you can sync your cloud db to a sqlite db on a mobile device. I believe that's both useful to many people and 100% unique to their service.

WebLite is also 100% unique and seems very useful to web frontends.

They claim they'll provide a way to run your code, compiled to wasm, on their servers. That would also be 100% unique to them.

They have SDKs for lots of languages.

So technologically that's very compelling and they have useful features not available anywhere else.

kjksf··on Interactive SQLite Documentation: Experiment with Queries in Real-Time
When it comes to services like that, the underlying db engine is the least interesting aspect.

I haven't used SqliteCloud so I can't vouch for them but they make a pretty good case for their technology: https://blog.sqlitecloud.io/how-and-why-we-brought-sqlite-to...

Pub/Sub is, I believe, a rare functionality with hosted sql databases so if you need that, SqliteCloud is one of few places to get it.

They claim they have a unique feature: ability to sync the database to mobile device with CRDT. So you can have a hosted database updated from your backend and have it synced for fast offline access in a mobile app. That, I believe, is something no one else offers.

Weblite is also unique to their platform https://docs.sqlitecloud.io/docs/introduction/weblite

And in general, if you're familiar with SQLite, having option to have it hosted by SqliteCloud is better than using e.g. hosted Postgres and having to learn Postgres

kjksf··on Interactive SQLite Documentation: Experiment with Queries in Real-Time
Why Sqlite? They make a pretty good case here https://blog.sqlitecloud.io/how-and-why-we-brought-sqlite-to...

> if you need high concurrency, multi-node replication, pub/sub capabilities, etc, what is the point of using SQLite in the first place

SqliteCloud is capable of all those things, so what exactly is your complaint?

multi-node replication and pub/sub are not part of sqlite code but SqliteCloud additions and I see no reason why their implementation of replication or pub/sub should be any worse that other implementations

Sqlite used to be much worse at high concurrency that other databases but it's no longer the case in recent versions with additions of WAL mode and SqliteCloud claims additional perf improvements for high concurrency

> There are much better, battle-tested tools to solve these problems.

I meant, it's quite possible but I'll point out an obvious fabrication: you don't know.

You haven't actually tried SqliteCloud, you haven't benchmarked it against other tools so you just don't know.

I'm 97.8% sure of that.

kjksf··on The Corvette that Windows zip folders bought
It's a great story but I can't think of it as an example of general financial illiteracy.

Corvette lt1 is $70k which was $40k in 1993.

It would be $780k today if invested in S&P 500. A nice retirement safety net.

It would be $6 million today if invested in Microsoft stock. That's fuck you money.

So kids, if you're young and have unexpected windfall, invest it at least in S&P 500 index.

But I'm not surprised most people don't do that. I didn't at that age.

kjksf··on "14 Years of Go" by Rob Pike
I have used lots of Go libraries. I even wrote some.

Your opinion here is just bizarre because typical Go code is as far away from typical (bad) Java code as you can get.

Your typical Go library doesn't have FactoryFactory classes, doesn't overuse interfaces, doesn't have dependency injection, doesn't have callstacks 20 frames deep etc.

So yeah, I would like to know which Go libraries specifically you're referring to because I just don't see that in the popular Go packages.

kjksf··on Faster: Fast persistent recoverable log and key-value store
Of course it does: just call TCPConn.SetNoDelay(false).

See https://github.com/golang/go/blob/master/src/net/tcpsock.go#...

← PreviousPage 10 of 34Next →