HN user

scythmic_waves

445 karma
Posts1
Comments137
View on HN

Anecdotally, it is very much different in Elixir land. I occasionally see bugs related to something being unexpectedly `nil` but it's pretty rare IME.

I'd love to evidence what I'm saying with specific numbers since this kind of discussion would benefit from being as objective as possible. Sadly I don't have them. But I still believe what I'm saying and I have a few guesses about some of the causes:

1. Immutable data - so, so many bugs are caused by data mutating out from under you in subtle ways. If you write `x = 1` in your Elixir function, nothing can change the value of `x` except an explicit rebinding. You can then write e.g. `y = f(x)` and know `x` remains unchanged after. Note: this is also true even if the variable is a composite type. `my_struct = blah()` will remain the same in it's entirety no matter what you do with `my_struct`. This is different than in JS where e.g. you can change the contents of an object even if it's declared `const`.

2. Assertive style - the Elixir community favors writing things in an "assertive" fashion [1]. Briefly, this a way of writing code that will fail the moment an assumption is broken rather than letting the issue propagate.

3. Pattern matching (somewhat like destructuring in JS) - Elixir code actually ends up feeling "typed" with pattern matching. E.g. `%Time{} = today = Date.utc_today()` will attempt to bind `today` to the result of `Date.utc_today()` and will raise a `MatchError` when the result, a `%Date{}` struct, fails to be a `%Time{}` struct. Or `[a, b] = [1, 2, 3]` will raise a `MatchError` because `[1, 2, 3]` isn't a list of length exactly 2. You can use pattern matching to write very assertive code quite tersely.

These reasons are all local properties of code. But when all its parts are written in this way, a program as a whole gains a level of correctness that's hard to achieve in a dynamically typed language without them.

Also these reasons aren't exhaustive, but they're top of mind when thinking about this topic.

[1] https://dashbit.co/blog/writing-assertive-code-with-elixir

I think it's because, without further context, it's so hard to argue against. Pretty much every person in every culture cares deeply about their children. So if you can successfully hitch your position to that idea, it too becomes hard to argue against.

It's the same with tough on crime. "What, you want criminals to keep getting away with it?!"

From the conclusion:

The primary trade-off observed is the increased calculation time for OLS and SVD steps. Consequently, the next phase of this work involves implementing these operations within custom Triton kernels to amortize latency. By viewing the cache through the lens of reconstruction fidelity rather than just memory capacity, we can develop more sustainable architectures for long-context inference.

Reading between the lines, the increase in latency was so significant that they didn't want to include it before they had a chance to try and optimize the problem away first.

Still interesting research. Hope they get good results!

Is it?

Your reasoning relies on this being true:

[CRQCs] will be slow, expensive, and power hungry for at least a decade

How could you know that? What if it was 5 years? 1 year? 6 months?

I predict there will be an insane global pivot once Q-day arrives. No nation wants to invest billions in science fiction. Every nation wants to invest billions in a practical reality of being able to read everyone's secrets.

Ohhh thank you! I thought the same as the parent comment: I expected that button to turn off the animation immediately. I guess the author wanted the yellow background to "melt" the snowflakes?

I used this recently for my resume and I recommend it.

I have the technical background to write Latex and Typst documents but I honestly didn't want the headache. Plus I'm the type to futz with styling all day long instead of putting down actual content. RenderCV was simple to use and did exactly what I wanted.

as a code reviewer [you] are only expected to review the code visually and are not provided the resources required to compile the code on your local machine to see the compiler fail.

As a PR reviewer I frequently pull down the code and run it. Especially if I'm suggesting changes because I want to make sure my suggestion is correct.

Do other PR reviewers not do this?

The first link is a mistake. It's supposed to be the thing being discussed here: https://news.ycombinator.com/item?id=45170164.

The 2nd link seems reasonable to me? Why does a study about 25k workers in Denmark (11 occupations, 7k workplaces) not count as evidence? If there was a strong effect to be found globally, it seems likely to be found in Denmark too.

Also, what about the other links? The discussions about the strange accounting and lack of profitability seem like evidence as well.

If anything, this article struck me as well-evidenced.

Hey it'd be great if you could rank the choices individually rather ranked-choice-style than picking just one first-past-the-post-style. I'm sure you could still compute a score, but it'd lead to less frustration from the quiz taker.

E.g. the debugging question: I use all of those methods to some degree. But I "think logically about the code" (or whatever that choice was) nearly 100% of the time, so I felt compelled to pick that one even though I didn't feel like it represented me all that well.

Critiquing beyond burgers for their macro breakdown doesn't make sense to me.

They're selling a meat replacement. Replacing the meat in my diet with their product does not work for my goals without additional planning to compensate. Therefore it's not a good replacement for me. A criticism need not apply in all cases to be valid.

I'd still be able to hit 150g/day at least without really trying.

What are your calorie goals? If you're in a surplus, maybe. But I'm currently in a deficit with 150g protein / 1600 calorie. I do not find that I can hit this goal "without really trying", _especially_ without protein powder.

And to clarify, it's 100% possible to hit my goals eating vegetarian/vegan. But with meat in my diet it's much easier because their high protein content gives me more flexibility with the rest of the diet. If I wanted to do it vegetarian, I wouldn't use beyond meat because it'd be even harder than other options.

Thanks for breaking that down.

As someone doing weightlifting, this is the primary reason I don't bother with vegetarian meats. They actually taste pretty good IMO, but they don't offer nutritional benefits commensurate with animal meat.

It's a shame, really. I'd gladly incorporate them if I could get a similar protein : calorie ratio.

This particular professor has been teaching for 30 years. I'm not sure I find your explanation all that convincing in light of that, especially since this isn't an isolated opinion.

I'm much more interested in how much the average student has had a phone to distract them during their lifetime. For the incoming 2025 class of 18 year olds, the iPhone came out the year they were born. So potentially 100%. I expect that plus the availability of LLMs is a deadly combo on an engaged student body.

As someone working in a niche area, I can confirm. It's shocking how little tech adoption there is in my industry. Plenty of low hanging fruit.

However I still sympathize with the parent comment. The niche-industry-exception state of affairs will become less true over time. And then you're left with the same set of incentives (minus dedicated hobbyists).

Fast B-Trees 2 years ago

I appreciate write-ups of failed experiments like this. They're sorta like null results in science, but for engineering. And they can help others from needlessly walking down the same path.

If everyone only wrote about their successes, we'd all have to independently rediscover failures behind closed doors.

I think because a full proof covering existence and uniqueness will either be really long or require tools from outside the scope of the text. E.g. there's a somewhat concise proof using linear algebra which I'll partially reproduce below. (I like this proof because the equation is derived from first principles rather than starting with an ansatz.)

---

Let x_n be a sequence defined by the recurrence relation:

    x_{n+1} = a * x_{n-1} + b * x_n
Observe that if we define a sequence of two-element vectors of successive elements:
    [x_0]  [x_1]  [x_2]
    [x_1], [x_2], [x_3], ...
then we can form the relation in terms of matrix/vector multiplication:
    [x_1] = [[0  1]] [x_0]
    [x_2]   [[a  b]] [x_1]
Let's name the sequence of vectors as y_n and call the matrix M:
    y_1 = M * y_0
We can get the next term in the sequence with another multiplication:
    y_2 = M * y_1
        = M * (M * y_0)
        = M^2 * y_0
By induction we have:
    y_n = M^n * y_0
M has characteristic polynomial:
    r^2 - br - a = 0
with roots:
    r_1 = (b - c)/2
    r_2 = (b + c)/2
    c   = √(b^2 + 4a)
Therefore we have by diagonalization:
    y_n = S * [[r_1^n  0    ]] * S^(-1) * y_0
              [[0      r_2^n]]
where S is the matrix of eigenvectors. From here, we can finish our existence and uniqueness proofs from the existence and uniqueness of the eigenvalues of M.