HNHacker News
TopNewBestAskShowJobs

jlouis

2,358 karma · joined June 21, 2008

Hacker. Prefers functional programming.
submissionscomments
jlouis··on Erlang/OTP 25.0 Release
While Serverless does address some of the points which were the design goals of Erlang, it doesn't address them all. In no particular order:

Hardware interaction is more or less non-existent in the world of Serverless.

Timing/Latency is not really controllable. It's at the whim of your provider.

FaaS doesn't support very large systems well. It's far more about scaling down than up.

Erlang is functional for a reason: it minimizes faults. Quality follows.

Complex feature interaction is limited in the stateless serverless world.

Cloud providers tend to solve for a different set of problems, which is fine. But I'm going to claim that many of the things Erlang was designed to solve runs dual to the problems in the cloud space.

jlouis··on Erlang/OTP 25.0 Release
If you are allowed to write e.g., a Java program and run it on the JVM, the speedup will typically be on the orders of magnitude in favor of the JVM. Static type systems and extensive optimization matter.

However, chances are you have an Erlang program, and it's quite large. In this case, the speedup compared to the older bytecode interpreter is good for many programs. It is performance you get "for free" by upgrading.

The underlying reason for picking something like Erlang is robustness. Java isn't really built for this kind of programming, and the JVM doesn't directly facilitate it either.

jlouis··on Type-Based Optimizations in the JIT
It's from one of the first implementations of the language. If you want to move fast, and you have no ambition about execution speed, this is a solution to the problem of implementing loops.

PHP worked by parsing code directly from the file for every executed statement. So you ran the full lex->parse->interpret path for each statement. A loop need to jump back, which can be tracked by the file offset position, so you can redo the lex->parse->interpret step for the loops statements again.

Modern PHP will not do this, because it's highly inefficient. I'm not even sure it survived into the 2000's.

jlouis··on Type-Based Optimizations in the JIT
BEAM is precompiled bytecode. The loader will peephole optimize the byte code replacing some instruction sequences with optimized variants. Bytecode resides in memory already, and there is no disk seeking.
jlouis··on Type-Based Optimizations in the JIT
PHP is the language which would implement a loop by pushing a byte offset to a stack and seek in the file at the end of the loop. Massive improvement if you had a disk cache.

It's all relative to where you come from. The byte code interpreter of BEAM is very close to a poor man's JIT. It has some op-fusion, and uses threaded code. So gaining efficiency will require lot of work.

jlouis··on Intel deprecates SGX on Core series processors
One would think that, but the reality is that there are some workloads which seem to fare better on AVX-512 currently. Usually where you can't get the benefit of the massive GPU parallelism/thread rotation into play, and you need low-latency between operations for a large-enough data set, while its still small enough for benefit from the cache on the CPU.

I'm pretty sure GPUs closes that gap over time though.

jlouis··on Solaris 11.4 free for non-production personal use
Some of the core offerings in Solaris (ZFS, Zones, dTrace, mdb) were ahead of their time, arguably. And the implementation is far more balanced than what you see in e.g., Linux, with good central documentation.

So if you have a system which was built on Solaris, it might be smart to keep it operating on Solaris because you happen to know the tools and so on.

It's likely any greenfield tech is better built on other systems. I'd use Illumos over Solaris, or FreeBSD.

jlouis··on The hunt for the M1’s neural engine
It's an area of the chip suited for operations on low precision/range floating point numbers. Neural networks don't generally require high precision in floating point computations, but require a lot of them. This means your data paths can be smaller (16 bit wide rather than 32 bit wide); the consequence of which is you can do far more computation per mm2 die space.

The second part of the chain is that you also tailor the operations the die area support to those operations necessary in a typical neural network, further optimizing the chip.

The end result is very power-efficient execution of neural networks, which allows you to beat a GPU or CPUs power curve, improving thermals of the core, and in the case of mobile devices, optimizes battery usage.

jlouis··on Apple M1 Ultra
Insane claims requires insane evidence. We don't have that there.

For some workloads i would not be surprised at all. But for all workloads, ...

jlouis··on Danish government makes its new economic model open source
My guess is that the non-linearity of the problem might make it harder for something like Gurobi to solve. GAMS is essentially a frontend for solvers, so you are compiling your input source into a format suitable for an underlying solver or a set thereof.
jlouis··on Microsoft to Acquire Activision Blizzard
They are painting an exit route for him.
jlouis··on Tell HN: GitHub is down again
Go uses a proxy for downloading modules, so there's no Github involved. And you could run your own proxy-cache if you wanted. In addition, your work machine has a local proxy cache of the modules you already downloaded.

Go doesn't use a repository as a single source either, which is another problem in of itself.

jlouis··on Go’ing Insane: Endless Error Handling
I agree with this point. Errors is a natural important part of programming. You can try to make error handling easier through sugar, but in the end you need to handle the error one way or the other. A proper sum-type would help in Go, but that's at best a more convenient and better way of handling the error. The error doesn't magically disappear.
jlouis··on Why Erlang?
Detecting a bug, crashing, and then restarting, can be much easier to write than code which is bug-free. In fact, some times, you need so much code that it is likely you are introducing more bugs by trying to handle an edge-case.

A key point of Erlang systems, however, is that they are really good at reporting the state of the system when it crashes (due to functional programming, you have the state from before the crash happened, and what event lead to the crash).

The restart is a stop-gap measure that gives you service for the system as a whole. You can then look at the logged bug report and fix the problem. But you are in control of how quickly you want to fix the problem. There is a cost to fixing a bug as well.

jlouis··on Friendship ended with the garbage collector
Any memory allocation scheme faces that trade-off, more or less; especially so in a concurrent environment that also employs parallelism.
jlouis··on Why Go Is Not Good (2014)
See also https://talks.golang.org/2012/splash.article
jlouis··on Go: Fuzzing Is Beta Ready
Fuzz testing is expensive.

And you gotta start somewhere. String inputs is a good start, and you can use those to test other inputs by factoring through conversion functions.

jlouis··on Go: Fuzzing Is Beta Ready
Yep, but in the dual, they have the same goal: produce interesting inputs to the program which might exhibit trouble.

This is why you can use one of the approaches to help the other side of the approach.

The 3rd solution is concolic testing: use an SMT/SAT solver to flip branches. The path down to the branch imposes a formula. By inverting the formula, we can pick a certain branch path. Now you ask the SMT solver to check there there's no way to go down that branch. If it finds satisfiability, you have a counterexample and can explore that path.

jlouis··on GraphQL Conf. 2021
GraphQL is like 3k to 4k Lines in the server side. Not exactly a large system.
jlouis··on GraphQL Conf. 2021
It can be argued you can remove query validation from the critical path entirely.

Though in my experience, it's a very small fraction of the actual processing time by Amdahl.

jlouis··on Multicore OCaml: April 2021
The key problem is program transformation, and in particular optimizations. Different CPUs/ISAs, and compilers, might want to transform your program to make it run faster.

However, in the multi-core setting, data races pose bounds and limits on how much you can trigger those optimizations. The program doesn't generally execute sequentially in a way that can be entirely reasoned about. Instructions might be reordered for the sake of the program to run faster.

Programmers can't work with that. So one proposes a memory model. Follow these rules, and our optimizations won't alter the behavior of the program. They kind-of describes what happens "in between" the critical sections of the program, hence the lack of a mutex mention.

The paper presents a local property and then shows, formally, that this property is enough to guarantee an efficient memory model. That is, a model in which you can perform optimizations, while programmers can still reason about the programs behavior.

The crux of the paper is that the property is local. This is new, because memory models which came before it are global: to reason about correctness, you have to consider the whole program, rather than consider a small (local) subset. OCaml requires more safety than most programming languages, so this is good for the fact that you can now compose local fragments of OCaml programs, without having to worry about a global safety property.

The property is also simpler for programmers to reason about.

The way you "use" the paper is that you adapt your optimizations to follow the property, and you make sure that the virtual memory model is implemented the same way on different architectures.

Finally, the examples: they explore the idea of a local reasoning. In particular, they show why the (existing) global properties fail if you view them under the stronger requirement of local reasoning. It's the setup for the paper, since it means you can't just use the existing models. They need to be adapted if you want a more localized property.

jlouis··on New x86 micro-op vulnerability breaks all known Spectre defenses
I'm more inclined to believe M1 is fast because it's a modern design where every part of the architecture is under Apple's control.

In particular, the design uses a memory hub with the memory chips very close to the CPU core. And it has a massive L2 cache on top.

jlouis··on Evolution of Random Number Generators
If size is a prime, repeated multiplication on a generator element (any element) will work if you compute `mod p`. But it's not going to have nice random properties for the most part. It's just a "permutation".

The reason it works is because the subgroup order generated by the element has to be divisible in the group order. There's only 1 and p. So unless it's trivial (i.e., the element 1), it's going to be p and thus it generates the whole group in p steps.

jlouis··on Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Calls in C
I'm going to guess most of the time is being spent elsewhere in the systems they are looking at and it is rather rare they have a situation where the parser is dominating. Protobuf is already a winner compared to the JSON mess we're in.
jlouis··on Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Calls in C
You just push the stack into the heap, and don't have a specific area which is the stack area. It's pretty common as a technique if you have something such as call-with-current-continuation.

The "stack" is still there in this case, but spread out over multiple heap blocks.

jlouis··on I am stepping down from Perl Steering Council and Core
Perl is a nice tool for quickly mangling textual data. I ended up using sed/awk and Python instead for much of what used Perl for back in the day.

Today, data is often semi-structured and jq has become part of the toolbox as well.

jlouis··on Tailwind JIT fails to credit Windi CSS
This will almost surely happen.

CSS will be extended until it solves the pain points, at which point things will swing in the other direction.

It's just a question of where your abstraction point is. Currently it's in a component. Tomorrow it might move.

jlouis··on Tailwind JIT fails to credit Windi CSS
Offline dead code elimination was already a thing. Moving it online seems rather natural.

Could you come up with that idea independently? I think so.

jlouis··on EU vaccine rollout severely lags behind
Yes. UK and US have both had some export regulations on vaccines, which aren't present in EU. So the current flow of available doses isn't really a free market in the usual sense.

There are other factors than dose availability though. Putting vaccines into people isn't easy to do on a large scale in a short time window. Vaccine programmes are usually running with a much larger window, with vaccines that doesn't require extreme cold temperatures.

UK seems better prepared for this than many of the EU-bloc's countries.

The other part of the question however is: "Severely lags behind what?". Even with a "slow" rollout, EU countries in general are better off than many other countries in the world. It isn't the case they are trying to keep up with the pack in general, as they are well positioned. It's more that there are a few countries who are doing extremely well on a quick rollout.

jlouis··on TLA+
For TLA it's manual. For other systems, like Coq for instance, you can extract to another language.

(Also important are that systems in this space are different. What something like Coq is good for is completely different to what TLA+ is good for. Another idea in the same vein is property-based-testing. Here the concrete code is tested by invoking random test examples, so you are testing the actual code/implementation. But this also means you can't use typical tricks of model checkers where they can regard whole classes of inputs the "same" in a test).

← PreviousPage 4 of 22Next →