HNHacker News
TopNewBestAskShowJobs

stefano

1,479 karma · joined June 2, 2008

I've got a passion for learning and implementing programming languages, especially those in the Lisp family.

My github account: http://github.com/stefano

submissionscomments
stefano··on Arthur Whitney releases an open-source subset of K with MIT license
Those are some very big claims with respect to performance. Has anyone outside of the author been able to reproduce the claims, considering you need to pay 100k/month just to do it?

I also wonder if the commercial version has anti-benchmark clauses like some database vendors. I've always seen claims that K is much faster than anything else out there, but I've never seen an actual independent benchmark with numbers.

Edit: according to https://mlochbaum.github.io/BQN/implementation/kclaims.html, commercial licenses do indeed come with anti-benchmark clauses, which makes it very hard to take the one in this post at face value.

stefano··on Why All Cryptocurrency Should Die in a Fire
> three to seven transactions per second, but with a centralized trusted entity

The byzantine generals problem doesn't apply when you have trusted entities.

stefano··on Bulgaria Freelance Taxes: Detailed Breakdown
Depending on your age and how much you can deduct, the switch over can come as "low" as 90k. At 100k you should always be ahead in any case. And that's without counting the social security contributions. Depending on how you value them, it might be more convenient even under <90k.
stefano··on Bulgaria Freelance Taxes: Detailed Breakdown
Taxes at that income level are around 50%, including ~20k worth of social security contributions. You're probably mixing up VAT, advance payments and final balance payments to get to that 76%, which is NOT what you're really paying on your income, unless your accountant made some major mistake.

BTW, if you invoiced 65k instead of 80k, you could use the "forfettario" tax regimen, which would result in a higher net income (yes, it's that crazy: you earn more if you earn less).

stefano··on A routine gem update ended up creating $73k worth of subscriptions
Fourth option: don't introduce this change at all. It's a debatable stylistic improvement in exchange for a big breaking change that will force your users to go through, update and re-test every single query. Not worth it.
stefano··on GitHub Copilot
How do you guarantee it doesn't copy a GPL-ed function line-by-line?
stefano··on Intel seeks $10B in subsidies for European chip plant
Maybe if it comes with clauses for a substantial transfer of technology to EU partners. But I doubt Intel would agree to that.
stefano··on Switzerland votes against electronic ID system provided by private companies
As an alternative to SPID you can also use your national electronic ID card, which is issued by the state without the involvement of private companies.
stefano··on Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS
Same. The only issue I had with virtualenv was when I copied one to a different directory and it didn't work. It turns out you can't do that. Everything else has always worked fine, and I've been using it professionally for 10 years.
stefano··on AstraZeneca/EU contract
Sanofi will be producing the Pfizer-Biontech vaccine, but it takes a lot of time to set up a new production line. Last estimate I saw was saying July.
stefano··on AWS Lambda pricing now per ms
This is very true. Just importing Django + Django Rest Framework + some other minor libraries in Google App Engine (standard) leads to painfully slow response times when a new instance spins up. Like, more than 10s to spin up an instance. Although App Engine seems to be 3-4 times slower than my desktop computer from 2014 on this particular task. I wonder if AWS lambda is better.
stefano··on Play: Statically typed Forth, compiled to WASM
Having implemented a threaded Forth with WASM, the most annoying problem is that WASM doesn't support jumps to arbitrary memory locations. You can either call functions (and you don't have access to the call stack), jump backward to a previously defined block entry point or jump forward to the end of a previously defined block. Threading then requires a double indirection in the core loop, and you have to use an explicit IP "register" in a global variable.
stefano··on ProtonMail CEO calls Apple's forced in-app purchases 'Mafia extortion'
The premium is actually higher than that. For $100, the developer gets $70. Which means the premium is $30 on a $70 base price, i.e. a ~42% higher price. That's a very steep price for easier payment cancellation.
stefano··on Python 3.9
It was a problem only because somehow they decided that type annotations should evaluate to something meaningful at runtime, instead of being a compile-time only construct like in every other language.
stefano··on Epic, Spotify, and Tinder form advocacy group to push for app store changes
Because it's as far as you can go from being a "Hacker".
stefano··on Django 3.1
By default yes, but you can configure queries fetching behavior using select_related/prefetch_related to avoid the N+1 queries problem.
stefano··on Django 3.1
That depends on what that request is doing. It could be fetching a single record from the database and serializing it, or it could be running a complex analysis.
stefano··on A little bit of plain JavaScript can do a lot
You can have a nicely organized JS project without using a framework, albeit you can expect a bit more boilerplate.

There are many approaches you can take. The following is an MVC approach I'm trying out in a personal project. It's organized as follows:

There's a subscribe/emit system, where you can link functions to run when an object sends an emit signal. This can be done in a couple dozen lines of code. Example: https://gist.github.com/stefano/32cbe9bef5a68ecb3286113369d8...

Models are JavaScript objects. They have methods to read their state and to update it. The methods that update the state need to call emit() so all subscribers are notified.

Views are functions. They return an object with 2 properties: a DOM node (the root of the view), and an update function. The update function takes a model instance, and updates the DOM structure accordingly. If a view supports user interaction, it'll take a delegate object as a parameter. The view will add event handlers which call the delegate object. Example of a text input with a label and optional validation error: https://gist.github.com/stefano/2135cc15470cceba4ac2d344fe2e...

The controller is a function or class. It returns an object with its root view and a function to run when the controller is destroyed for cleanup. It can either take a model as a parameter or instantiate it. It also instantiates the root view, passing itself (or another object) as the delegate. In the delegate methods, it calls the model update methods. The controller subscribes the view to model changes, and unsubscribes them when it's destroyed. Alternatively, the view can subscribe/unsubscribe itself.

With this approach, views can be composed by calling the view functions from inside another view, passing down a delegate and adding the root DOM node to the parent view DOM structure.

The controller and the model are completely independent of the DOM. The model can be tested independently. The controller can be tested with a mock view. The view can be tested by passing in a mock model.

Views only depend on their initial state and the state of the model passed to the update function.

stefano··on 20yo Robinhood Customer Commits Suicide After Seeing $730K Negative Balance
In the EU, before opening a trading account you are forced by law to compile a standard questionnaire to assess your financial knowledge and risk tolerance. Depending on the results, you might not be able to trade certain instruments.
stefano··on Facebook Novi: Wallet for Libra Digital Currencies
It's pretty hard to set a bar lower than that.
stefano··on German government to bail Lufthansa out of bankruptcy with nearly $10B state aid
The EU has temporarily removed state aid rules.
stefano··on Additional 6.6M File for Initial Unemployment Benefits [pdf]
No one in Italy has ever been denied an ICU bed yet.
stefano··on Federal Reserve pledges asset purchases with no limit to support markets
I guess the idea is to keep companies solvent so they'll still be there when the quarantine restrictions are lifted.
stefano··on British Society for Immunology open letter to Government on SARS-CoV-2 response
Italy is doing all of those things.
stefano··on Ask HN: Is UK government insane or genius?
One region of Italy is close to their ICU beds limit, despite a full lockdown. And they have more beds per person than the UK. Without a full lockdown, won't they run out of beds very quickly, thus increasing the death rate a lot?
stefano··on Payments on mortgages to be suspended across Italy after coronavirus outbreak
I don't see how that has to do with Germany paying italian debt, since Italy participated in the bailout of Greek banks.
stefano··on Payments on mortgages to be suspended across Italy after coronavirus outbreak
That has never happened in history and I don't see why you think it will this time.
stefano··on Fed cuts half point in emergency move amid spreading virus
> I don't think US and other countries will be able to quarantine entire cities.

Italy quarantined entire towns.

stefano··on Domain Logic and SQL (2003)
If the data fits in RAM, you could try loading it into an in-memory sqlite database, and run SQL queries there.
stefano··on Finland to give dads same parental leave as mums
It's a paid leave, so you'd be losing money by paying someone to keep your kids so that you can work and earn the exact same money you'd earn by staying home.
Page 1 of 9Next →