HNHacker News
TopNewBestAskShowJobs

ot

18,939 karma · joined September 28, 2010

Giuseppe Ottaviano

  - Twitter: @ot_y
  - LinkedIn: www.linkedin.com/in/giuseppe-ottaviano-497b7b3
submissionscomments
ot··on Bug in reader/writer locks in Windows API
`numThreads` is written before the child threads that read it are started, so there is an explicit happens-before relationship and no data race. Before `numThreads` is reset, the child thread are joined.

There is no bug in the program, it is legal to use non-atomic variables across threads as long as they're correctly sequenced.

ot··on All you need is Wide Events, not "Metrics, Logs and Traces"
> Just for example, if you wanted to dynamically extract a field at query-time based on the difference of two values and group by that, that's something you can do trivially in splunk/sumo.

You can trivially do that in Scuba too using a derived column, which is supported in the UI. If you need more complex stuff you can write your query in SQL and still use all the supported UI visualizations. And for even more complex stuff, for example if you need joins, the data is usually mirrored to Presto, so you can write arbitrarily complex queries and still visualize the results in the Scuba UI.

I'm not sure if your assessment of Scuba is based on full knowledge of what you can do with it.

ot··on Lenovo's Project Crystal is first laptop with a transparent MicroLED display
I wouldn’t count that as a transparent “display” since it needs a light source when detached, or it wouldn’t be of much use.

So if we only consider self-contained transparent displays, this is indeed a first?

ot··on Mistral Large
"Big Mac's a Big Mac, but they call it Le Big Mac"
ot··on Vision Pro Teardown – Why those fake eyes look so weird
I don't know how you did that math, but you cannot convert kcal to mAh, you need a unit of energy like watt hour

2000 kcal * 4184 (J/kcal) / 3600 (seconds) ~= 2324 Wh

which is... a lot of batteries (a large laptop battery is around 100 Wh)

A human at rest uses around 100W, which is easier to remember.

ot··on Let futures be futures
You can do that, Java did recently. You need full control of all the blocking primitives so they can yield the thread.

Where this breaks is with FFI: if you cannot intercept blocking calls in foreign functions, you block useful threads or even deadlock. This is what the quote in the article is about:

> The cost for the native compatibility with the C/system runtime is the “function coloring” problem.

ot··on Nassim Taleb says the U.S. is in a ‘death spiral’ over government debt
Comparing debt to GDP is very much mainstream economics, not MMT.

https://en.wikipedia.org/wiki/Debt-to-GDP_ratio

> is usually unable take their income streams

It takes a percentage of that, through taxes.

https://en.wikipedia.org/wiki/List_of_sovereign_states_by_ta...

ot··on Show HN: Integer Map Data Structure
What novel ideas did you see here? To me this looks like a standard 16-way compressed trie. The node encoding is quite natural if you consider the limitation of 64M entries (which is really not a lot). Did I miss something?
ot··on Systemd: Enable indefinite service restarts
Imagine you use systemd to manage daemons in a large distributed system. Crashes could be caused by a failure in a dependency. Once you fix the dependency, you want all your systems to recover as quickly as possible, you don't want to go through each one of them to manually restart things.

This doesn't mean that you don't investigate, it just means that you have an additional guarantee that the system can automatically eventually recover.

If you set a limit on number or time or restart, what's a reasonable limit? That will be context dependent, and as soon as it's more than a few minutes, it may as well be infinite.

ot··on Rust-Written Linux Scheduler Showing Promising Results for Gaming Performance
> The scheduler performance has nothing to do with the used language.

This is correct, but I don't think the article is trying to make any claim about the language being relevant for performance.

What I believe the author is showcasing is two things:

- sched_ext allows to write schedulers that outperform a default general-purpose scheduler on certain workloads (performance)

- Since a sched_ext scheduler is a userland process, it can be implemented in any language. The author likes Rust and they used Rust (ergonomics)

The headline compresses both things in one sentence, and this can create some confusion about what they intend to convey.

ot··on Big Tech has already made enough money in 2024 to pay all its 2023 fines
> Total: 26 days 5 hrs 40 mins

What's the significance of adding up together the rows? Time passes simultaneously for all these companies.

ot··on YUI Compressor (2013)
The repo does not appear to have had substantial changes for ~8-9 years https://github.com/yui/yuicompressor

Yahoo announced development was stopped in 2014: https://yahooeng.tumblr.com/post/96098168666/important-annou...

Is this still relevant?

ot··on Adventures of Linux Userspace at Meta [video]
I think that's not what people would normally call "the distribution" :) systemd, coreutils, ssh, shell, ... come from CentOS.

(Hi Pádraig!)

ot··on Adventures of Linux Userspace at Meta [video]
This is not accurate, the system packages are from the CentOS binary distribution. You might be thinking of C/C++ runtime libraries, which are distributed as separate packages used by the internal ("fbcode") binaries, but system binaries link to the standard distribution.
ot··on GCC Specs: An Introduction
Not sure if you're being facetious, but if not, different Wozniak :)
ot··on Rest in Peace, Optane
SSDs are orders of magnitude faster than HDD, enough to justify the cost differential and investments to rethink the software stack.

Octane was an incremental improvement in performance when compared to SSD, and in cost when compared to RAM. An awkward spot to be in.

ot··on A study of Google's code review tooling (Critique)
That's an apples-and-oranges comparisons, 100M is just the size of the frontend/middleware code (Hack), while 2B includes everything, including configuration and generated code.
ot··on Storing data in pointers
Cannot edit anymore but I realized that my comment was wrong :) You just need 2 threads, as long as one is suspended long enough.
ot··on Storing data in pointers
Don't you need 65k threads all contending on the same state for that to happen? Even if your process does have 65k threads, you'd need a pretty large critical section for all of them to be preempted in an unlucky point.

That said, it's better to rely on RCU/hazptr to solve ABA issues, but the extra bits are still useful to store state that can be CAS'd together with the pointer.

ot··on The BPF-programmable network device
Are you thinking of netmap?
ot··on Despite just 5.8% sales, over 38% of bug reports come from the Linux community (2021)
The title is as factual as it can be. If you were expecting a different conclusion, it may have been due to prior biases.

If the title said "Mac users" instead of "Linux community", would you have expected a different conclusion?

ot··on Microsoft is eating the world
But how would that benefit OpenAI? It would be a "fuck you" move that faintly inconveniences Microsoft and destroys OpenAI.
ot··on Google's Gemini model is delayed
They just need him on speed dial for that, not physically present breathing down their necks.
ot··on Google's Gemini model is delayed
> Google co-founder Sergey Brin has been spending “four to five days a week” with the developers.

I don't see how that can make the project move faster. I wouldn't be surprised it has the opposite effect actually.

ot··on Bank of America's unrealized losses on securities rose to $131.6B
Yes, according to those numbers BoA is technically solvent.
ot··on Bank of America's unrealized losses on securities rose to $131.6B
Comparing the balance sheet fluctuations of a bank to its market cap is meaningless.

Banks are extremely leveraged by their nature, BA has like $3T in assets and $2.8T in liabilities, so minor swings in assets value move the equity by amounts that are comparable to the market cap.

ot··on Higher quality random floats
How much entropy do you need for that?
ot··on Circulant Matrices, Eigenvectors, and the FFT
The article shows the connection but it doesn't present an intuition of the why, which I think is by far more interesting, and it's key to understanding Fourier analysis.

You can take a vector and shift all its elements to the right by 1 (rotating the last entry to the first position), let's call this operator S. Since the rows of a circulant matrix C are all rotations, if you apply the shift S, then multiply by C, and then shift back, you get the same result as if you just multiplied by C. In equations, S^-1 C S = C.

This is another way of saying that circulant matrices are shift-invariant. If you have a vector of zeros and just a few values in the middle, the matrix doesn't care where those non-zeros are, the result is the same but shifted accordingly; intuitively, the matrix operates in the frequency domain, not in the spatial domain. This is the same idea behind convolutional neural networks: translation-invariance means that we can ignore the position of an object in an image, and thus share the parameters across all positions, reducing the parameter complexity from quadratic to linear.

Now one of the first things you learn in linear algebra is that if two matrixes commute, they share the eigenspaces. We know that SC = CS from the equation above, so if we want to find the eigenvectors of any C, we can just find the eigenvectors of S.

But if we write S in matrix form, it is just ones under the diagonal, and a one on the top right. That's the companion matrix [1] of x^n - 1! So the eigenvalues are the nth roots of unity, and that shows the connection.

These intuitions translate (haha) quite naturally to function spaces, where shift-invariant operators are diagonalized by Fourier series (for periodic functions) and Fourier transform (for non-periodic functions with finite energy).

[1] https://en.wikipedia.org/wiki/Companion_matrix

EDIT: I just remembered we don't even need to inconvenience the companion matrix. If ω is a n-th root of unit, and you have a vector which is [1, ω, ..., ω^{n-1}] and you multiply it by ω, you get [ω, ..., ω^{n-1}, 1] (because ωω^{n-1} = 1), which is exactly the original vector shifted by 1, so it is an eigenvector of S.

ot··on X.org Alternatives? MicroXWin, Wayland, Y, DFB, Xynth, Fresco, etc. (2009)
For the end user, yes. What would be the alternative?
ot··on How to Use Monadic Operations for `std:optional` in C++23
It is doable, `folly::Expected` supports that: https://github.com/facebook/folly/blob/main/folly/test/Expec...
← PreviousPage 4 of 30Next →