HN user

stefano

1,479 karma

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

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

Posts39
Comments250
View on HN
www.theregister.com 8mo ago

Microsoft seemingly just revealed that OpenAI lost $11.5B last quarter

stefano
105pts30
twitter.com 8y ago

Tether Printer

stefano
4pts0
gee.cs.oswego.edu 8y ago

A Memory Allocator (2000)

stefano
2pts0
pypi.python.org 10y ago

Python integration for the Duktape Javascript interpreter

stefano
3pts1
stefano.dissegna.me 10y ago

Bulk Inserts Performance with Django and PostgreSQL

stefano
1pts0
www.artima.com 11y ago

The DCI Architecture: A New Vision of Object-Oriented Programming (2009)

stefano
23pts5
www.redline.st 14y ago

Adopt a Class

stefano
2pts0
lambda-the-ultimate.org 14y ago

Why Dependent Types Matter [2005]

stefano
1pts0
twitter.com 15y ago

Database Dump of 18 Italian Universities

stefano
3pts0
whiley.org 15y ago

Whiley, a programming language with extended static checking

stefano
39pts15
wknight8111.blogspot.com 15y ago

Parrot as a Mature Platform

stefano
23pts5
morepypy.blogspot.com 15y ago

EuroPython 2010 Videos available

stefano
1pts0
use.perl.org 16y ago

Rakudo Star (a "usable Perl 6") to be released by July 29

stefano
69pts7
blog.laptopmag.com 16y ago

Nvidia CEO: Netbooks and Tablets to Meld, Hints at Tegra-Powered webOS Devices

stefano
2pts0
www.mprove.de 16y ago

A Personal Computer for Children of All Ages

stefano
1pts0
blogs.perl.org 16y ago

Welcome, and say Hello to my friend Plumage

stefano
4pts0
p-cos.blogspot.com 16y ago

Filtered functions

stefano
13pts0
abcl-dev.blogspot.com 16y ago

ABCL on Google App Engine

stefano
1pts0
en.wikipedia.org 16y ago

The Lucid programming language

stefano
33pts8
wknight8111.blogspot.com 16y ago

Optimizing Parrot

stefano
20pts2
blog.selflanguage.org 16y ago

Announcing the Self Handbook

stefano
3pts0
ifelipe.net 16y ago

UnCommonWeb: Preparing for the road ahead

stefano
8pts2
www.iecc.com 16y ago

Linkers and Loaders

stefano
22pts3
clojure.higher-order.net 16y ago

Clojure: the "write skew" anomaly

stefano
1pts0
enlivend.livejournal.com 16y ago

Lisp book - chapter preview (13-16)

stefano
1pts0
learnyousomeerlang.com 16y ago

Learn You Some Erlang For Great Good

stefano
1pts0
programmer.97things.oreilly.com 16y ago

Speed Kills

stefano
33pts24
carcaddar.blogspot.com 16y ago

Eager Future for Common Lisp

stefano
18pts0
github.com 16y ago

Blizkost: embedding Perl 5 in Parrot

stefano
1pts0
lichteblau.blogspot.com 16y ago

Cl-perec blog series by pinterface

stefano
1pts0

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.

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.

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).

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.

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.

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.

Python 3.9 6 years ago

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.

Django 3.1 6 years ago

By default yes, but you can configure queries fetching behavior using select_related/prefetch_related to avoid the N+1 queries problem.

Django 3.1 6 years ago

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.

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.

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?