HNHacker News
TopNewBestAskShowJobs

rustybolt

1,343 karma · joined October 15, 2019

submissionscomments
rustybolt··on Fast
> Rarely in software does anyone ask for “fast.”

Are you kidding me? My product owner and management ask me all the time to implement features "fast".

rustybolt··on How I keep up with AI progress
> "and why you must too"

Oh please

rustybolt··on I made my VM think it has a CPU fan
> Your first impulse might be to use DLL hooking and patch the cimwin32. But that’s smol pp way of thinking. We can do better.

What's wrong with DLL hooking though?

rustybolt··on We ran a Unix-like OS Xv6 on our home-built CPU with a home-built C compiler (2020)
Nice.

> I asked the professors if we could instead port MINIX3 to the Raspberry Pi

I think they were expecting you to fail.

> QEMU's Raspberry Pi emulation accuracy was so abysmal

When I did some hobby OS dev my strategy was to make it work on QEMU and then pray it would work on real hardware as well, which worked OK...

How did you handle the debugging the raspberry pi on real hardware?

rustybolt··on War story: the hardest bug I ever debugged
> How it took me 2 days

That can't possibly be the hardest bug ever

rustybolt··on Coding Isn't Programming
Hacking isn't coding isn't programming isn't software development isn't software engineering. But in the end many people use these terms mostly interchangeably and making a point of the differences between the definitions you personally use is rarely a productive use of time.
rustybolt··on “A calculator app? Anyone could make that”
> No, all finite continued fractions express a rational number

Any real number x has an infinite continued fraction representation. By efficient I mean that the information of the continued fraction coefficients is an efficient way to compute rational upper and lower bounds that approximate x well (they are the best rational approximations to x).

> They are occasionally convenient for certain problem structures but, as I'm sure you've already discovered, somewhat less convenient for a wide range of common problems.

I'm curious what you mean exactly. I've found them to be very convenient for evaluating arithmetic expressions (involving both rational and irrational numbers) to fairly high accuracy. They are not the most efficient solution for this, but their simplicity and not having to do error analysis is far better than any other purely numerical system.

> fundamentally equivalent to simple fractions.

This feels like it is a bit too reductionist. I can come up with a lot of example, but it's quite hard to find the best rational approximations of a number with just fractions, while it's trivial with continued fractions. Likewise, a number like the golden ratio, e, or any algebraic number has a simple description in terms of continued fractions, while this is certainly not the case for normal fractions.

That continued fractions can be easily converted to normal fractions and vice versa, is a strength of continued fractions, not a weakness.

rustybolt··on “A calculator app? Anyone could make that”
In a purely numerical setting, you can only distinguish these two cases when you evaluate the expression with enough accuracy. This may feel like a weakness, but if you think about this it is a much more "honest" way of handling inaccuracy than just rounding like you would do with floating point arithmetic.

A good way to think about the framework, is that for any expression you can compute a rational lower and upper bound for the "true" real solution. With enough computation you can get them arbitrarily close, but when an intermediate result is not rational, you will never be able to compute the true solution (even if it happens to be rational; a good example is that for sqrt(2) * sqrt(2) you will only be able to get a solution of the form 2 ± ϵ for some arbitrarily small ϵ).

rustybolt··on “A calculator app? Anyone could make that”
Nice story. An even more powerful way to express numbers is as a continued fraction (https://en.wikipedia.org/wiki/Continued_fraction). You can express both real and rational numbers efficiently using a continued fraction representation.

As a fun fact, I have a not-that-old math textbook (from a famous number theorist) that says that it is most likely that algorithms for adding/multiplying continued fractions do not exist. Then in 1972 Bill Gosper came along and proved that (in his own words) "Continued fractions are not only perfectly amenable to arithmetic, they are amenable to perfect arithmetic.", see https://perl.plover.com/yak/cftalk/INFO/gosper.txt.

I have been working on a Python library called reals (https://github.com/rubenvannieuwpoort/reals). The idea is that you should be able to use it as a drop-in replacement for the Decimal or Fraction type, and it should "just work" (it's very much a work-in-progress, though). It works by using the techniques described by Bill Gosper to manipulate continued fractions. I ran into the problems described on this page, and a lot more. Fun times.

rustybolt··on I still like Sublime Text
On the odd chance that you read this and feel like replying, I have always been in awe of Sublime Text's UI. Can you elaborate a bit on how it works? There was a short comment by Jon Skinner that it is custom and written on top of a cross-platform portability layer, but I mean, I'd love to hear some more details.
rustybolt··on Resolving a mysterious problem with find
I'm very glad you're not reviewing my PRs.
rustybolt··on SICP: The only computer science book worth reading twice? (2010)
I really wanted to like SICP and I probably would have if I read it 15 years ago. I started reading it last month and I found it to be too broad. It covers too much interesting mathematical principles and then jumps to the next one right when it starts to get interesting. In other words, it's too shallow.

It probably doesn't help that I've seen many courses/documents that are (in hindsight) derivatives from SICP, so I have the nagging thought "not this again" when a topic is introduced in SICP.

rustybolt··on Lessons from Plain Text
In some cases pretending everything is ASCII is the sane thing to do. With Unicode, sorting and case conversion are neigh impossible to do correctly. While there are algorithms for collating codepoints into (extended) grapheme clusters, there is still a lot of freedom, so while there are wrong ways to do it there is no canonical right way.
rustybolt··on Conway's Gradient of Life
> This is just the brute force solution.

It's the trivial solution. It's significantly more efficient than using backprop. It's much simpler and leads to practically the same result.

This makes me wonder why you would use backprop to do this. It feels like a waste of time, and I'm not sure why this post generates so much attention on HN.

Also see https://nullprogram.com/blog/2020/11/24/

> I'm pretty sure that's no more efficient than guessing all pixels at once and trying to check of that worked or not.

It's iterative so you don't have to run for a very long time, and it will keep improving the loss function for longer.

rustybolt··on Conway's Gradient of Life
Feels to me like there is no need for backpropagation. I think you can just iteratively grab a random pixel and flip it of that would bring you closer to the target after one step.

It would probably work even better if you tweak the loss function with some kind of averaging/blurring filter.

rustybolt··on Memorizing the first 100 perfect squares (2022)
One nice thing from knowing squares is that you can calculate for example 23 * 47 as (35 - 12) * (35 + 12) = 35^2 - 12^2.

But this doesn't always work and you still need to be good at adding/subtracting.

rustybolt··on The expected value of the game is positive regardless of Ballmer’s strategy
This is actually extremely basic game theory, but I agree that most CS programs would probably not cover it.
rustybolt··on The expected value of the game is positive regardless of Ballmer’s strategy
That seems reasonable, and in that context I would think it's actually a good interview question.

But it seems that Steve Ballmer used this question as if it has a single right answer, and that answer is "no". Unless it's more about the question "do you want to play this game, right here, right now?", then it becomes more about heuristics and quick reasoning.

It's all about context I guess.

rustybolt··on The expected value of the game is positive regardless of Ballmer’s strategy
> Do most people not do this?

I'd say it's impossible to answer this question conclusively within the time frame of an interview. That makes it, in my opinion, a bad interview question.

My answer to this question would be to show that I understand what it would take to answer this question correctly (you'd have to find a mixed strategy that has a positive expected value for every choice of number), I wouldn't be able to give a confident "yes" or "no" answer on the spot. I think that's the only correct answer.

In practice, I think this question is advantegeous for those who confidently blurt out an answer and then make up a heuristic argument for it. But a heuristic argument can be found for both "yes" and "no".

rustybolt··on The expected value of the game is positive regardless of Ballmer’s strategy
The question seems like a mathematical one.

What you're saying sounds to me like "your answer doesn't need to be correct, it just needs to sound reasonable". What you're filtering on with this question is good bullshitters.

To me, the only reasonable to this question is "I don't know". I think even a mathematical genius like Terrence Tao would not be able to give you the answer to this on the spot. (Although I can also totally believe that he would instantly see this from some obscure theorem that only like 5 people on the planet know.)

rustybolt··on The expected value of the game is positive regardless of Ballmer’s strategy
I don't think this is true. Most people will not be bankrupt after losing a dollar. If this is true then Steve failed badly at communicating this context.

To be honest, I think Steve just didn't grasp the mathematical deepness of the problem.

rustybolt··on Is my vision that bad? No, it's just a bug in Apple's Calculator
> I would contact Apple, if there was a feedback option, but there isn’t

This is infuriating and the same for all the big companies (at least Google, Microsoft, Apple); you have a serious issue and simply no way to talk to a representative. The best you can do is post something on Hacker News and hope it somehow gets picked up.

I worked at a company that paid Microsoft a lot to have a 1-day SLA for support. When I contacted them, I got a reply back weeks later saying "hey sorry I missed your email". About two weeks later (which was the time it took to email back and forth), it was clear that I had to insert another ticket and mark the subject as something else (that was not directly related, but apparently the team responsible for that subject was also working on the functionality I found a bug in. There was no way for me to know this since it was something internal to Microsoft). So, I had to go through the whole procedure again.

Once I did that, the reply was "oh yeah, we dropped that functionality but the documentation doesn't mention it. we recommend you use <technology X> for this". Where, of course, technology X did not support the feature I was trying to use.

rustybolt··on Is it time to version observability?
> The thesis of the article is that you should use events as the source of truth, and derive logs, metrics, and traces from them.

That was the main point? Man, the article goes on and on about definitions and semantic versioning and how we should call observability "olly", but glad to hear there's actually a coherent thought behind it.

Also, I don't think the "it's too expensive to log everything" argument should be true. Storage is insanely cheap and you can fit a whole lot of information inside a single MB (even more so when using compression).

rustybolt··on The News Is Information Junk Food (2022)
Bite-sized articles have their value. I don't know how many mobile tabs I have open, Chrome stops displaying the number when you reach 100. Most of the tabs contain a deep dive into a particular topic and it's not feasible to actually read every one of them.

However, every unread tab I close feels like a personal failure to keep up.

I can see the value of news articles and short videos like those from Fireship: It might be educational and/or entertaining, but if not, it hasn't been a serious time investment, so it doesn't matter anyway.

rustybolt··on Reverse Engineering for Everyone
> Clearly, talking to some software over the network is 'using' it?

In some sense, yes. But I wouldn't say my mom uses Linux when she uses her Ipad to visit a website hosted on a Linux server.

rustybolt··on I've eaten a meal replacement shake twice a day for two years (2019)
I fully agree with you: Fruit and vegetables from local farmers is a bit more expensive. Whether it's from local farmers is also not really relevant to the nutritional value. So the whole line of reasoning is just complete bogus. The whole article feels like a thinly-veiled advertisement without any informational value.
rustybolt··on I've eaten a meal replacement shake twice a day for two years (2019)
> Telling people to eat more fruits and vegetables often tends to be 1 percent or a high-income solution

Am I totally out of touch with reality or is this a completely ridiculous remark? Only 1 procent of people is able to afford the most basic food?

rustybolt··on Beating NumPy matrix multiplication in 150 lines of C
Yes
rustybolt··on I rewired my brain to become fluent in math (2014)
"Young man, in mathematics you don't understand things. You just get used to them."
rustybolt··on FuryGpu – Custom PCIe FPGA GPU
I have seen semi-regular updates from you on discord and it is awesome to see how far this project has come (and also a bit frustrating to see how relatively little progress I have made on my FPGA projects in the same time!). I was hoping you'd do a writeup, can't wait!
← PreviousPage 2 of 10Next →