HN user

qsantos

1,500 karma

https://qsantos.fr/

qsantos@qsantos.fr

Socials: - github.com/qsantos - linkedin.com/in/qsantos

Posts107
Comments69
View on HN
qntm.org 10mo ago

How many valid JSON strings are there?

qsantos
1pts0
www.thecodedmessage.com 11mo ago

LLMs in Programming

qsantos
2pts0
htmx.org 1y ago

When Should You Use Hypermedia? (2022)

qsantos
2pts0
herecomesthemoon.net 1y ago

Type Inference in Rust and C++

qsantos
1pts0
kobzol.github.io 1y ago

Async Rust is about concurrency, not (just) performance

qsantos
5pts0
www.redblobgames.com 1y ago

What I Did in 2024

qsantos
1pts0
www.bytedrum.com 1y ago

When Self–Hosting Fails: The Night My Blog Vanished

qsantos
5pts1
qsantos.fr 1y ago

You Can Move Unpin

qsantos
2pts1
branchfree.org 1y ago

The Environment Will Be Saved If We Just Avoid Doing Icky Things

qsantos
2pts1
wunkolo.github.io 1y ago

Vecint: Average Color

qsantos
27pts4
sabrinajewson.org 1y ago

"Hygienic" Let Statements in Rust

qsantos
25pts0
csvbase.com 1y ago

There are 665 open licences, most are pretty rubbish

qsantos
44pts21
wunkolo.github.io 1y ago

GPU Debug Scopes

qsantos
102pts7
qsantos.fr 1y ago

Why Undefined Behavior Matters (2022)

qsantos
1pts0
qsantos.fr 1y ago

Linux Pipes Are Slow

qsantos
340pts166
xkcd.com 1y ago

File Transfer

qsantos
4pts2
endler.dev 1y ago

The Dying Web

qsantos
64pts45
www.thecodedmessage.com 1y ago

The AI Non-Economy: A Rant

qsantos
2pts0
yosefk.com 2y ago

Profiling with Ctrl-C

qsantos
4pts0
dirtypipe.cm4all.com 2y ago

The Dirty Pipe Vulnerability (2022)

qsantos
8pts1
theincredibleholk.org 2y ago

How to Shrink Rust

qsantos
3pts0
www.bazhenov.me 2y ago

Performance Roulette: The Luck of Code Alignment

qsantos
1pts0
mbuffett.com 2y ago

Processing 6B Chess Games in Less Than 2 Hours

qsantos
2pts0
www.arroyo.dev 2y ago

How to build a plugin system in Rust

qsantos
3pts0
barretts.club 2y ago

Rust Is for the Engine, Not the Game

qsantos
75pts65
kevinlynagh.com 2y ago

Performance of Rust's match vs. lookup tables

qsantos
3pts0
cruxponent.com 2y ago

Model-Based RL (1/?)

qsantos
1pts0
ntietz.com 2y ago

Rust's iterators optimize nicely–and contain a footgun

qsantos
1pts0
www.tugberkugurlu.com 2y ago

Resistance Against Git Merge Hell (2015)

qsantos
56pts111
qntm.org 2y ago

The Assist

qsantos
3pts1
You Can Move Unpin 2 years ago

Clarification needed: the original title is “You can move !Unpin”, which is definitely more surprising!

Totally agree, my server should definitely be able to handle the load. But this is a WordPress install, which is definitely doing too much work for what it is when just serving the pages. I plan to improve on this!

My server struggles a bit with the load on the WordPress site. You should be fine just reloading. I will make sure to improve things for the next time!

For the first Rust program, where I just write to memory, I just use the time utility when running the program from zsh. Then, I divide the number of bytes written by the number of seconds elapsed. That's why it's not an infinite loop ;)

Thanks a lot for the information! I was not quite sure what to look for in this case. I have added in note in the article.

I am again getting the hug of death of Hacker News. The situation is better than the last time thanks to caching WordPress pages, but loading the page can still take a few seconds, so bear with me!

The mother forced herself to save by punishing herself if she did not.

The $2000 in the saving account was earmarked for the dowry, and she would not touch it. So, she had to save every month to pay back the loan to the bank. The longer she took to do this, the more interest she paid.

This is a kind of non-rational trick that some people use to "trick themselves into doing the right thing". This is like paying some random stranger $100 if you do not accomplish some task.

Thanks!

And I agreed that this is not “pure” Vim.

But I did need to find a compromise. There is little point in having an “insert” mode, like Vimium does, since I am targeting a very specific website and not overriding any existing shortcut (AFAICT). If you think it's important to you, I might consider implementing custom key bindings so that you can use with “pure” Vim shortcuts!

Regarding the scrolling, it could be two things:

1. I do not update the address bar on every key press, to avoid some kind of rate limitation I encountered when I did so initially. Instead, there is a very short delay so before it happens. But the viewport should still scroll immediately. 2. If it's smooth scrolling, there is actually a toggle you can change in the extension settings. If you still have the behavior without smooth scrolling, I would be curious to know more, to see if I can make the experience more pleasant.

I do! I use Vimium C for general browsing. But, considering the time I spend on Hacker News, I needed something to optimize my procrastination even further!

Coincidently, I have written a browser extension to navigate Hacker News comments using Vi-style key bindings [1]. It has no compilation steps, no npm. It is mostly a 1kLoC file of vanilla JavaScript.

Modern frameworks are definitely needed for large applications, but there is no need all that complexity when the scope is reduced.

[1] https://github.com/qsantos/ViHN/

That's why I phrased it that way. But since you mentioned working modulo 2^64, I thought that would count :-).

It's useful to make it explicit anyway for people who might miss that, so thanks!

That's a very good question.

I think the simplest approach to prove it would be to show that both computations yield the global minimum. Since there is only one global minimum, then they must be equal.

I think my own education followed the “traditional” way of learning computer science, albeit after years of tinkering with computers and programming as a kid. But I often felt that some concepts were much simpler when you made the connection with something concrete.

Of course, you would not use analogy for formal proofs, but it helped build a mental model incrementally instead of having to conjure various concepts out of thin air and draw connections between them.

The point is that dynamic programming builds on various abstract concepts that many college students only understand to a level deep enough to pass exams. Making the connection with caching, which is a mostly-unrelated, and much more concrete concept, give them the basis to build a mental framework. Sure, they might do without, but why make it harder?

I agree with that article that recursion is better introduced with relevant data structures than with Fibonacci. And I agree that Fibonacci is also too simple to explain dynamic programming, which is why I showed how it works with edit distance, and they with AoC 2023-12-18.

Please, take the perspective of an average computer science student, who might have had some interest in computers, but maybe did not look too deep in the theory. In the past few years, they just had to learn graphs, automata and Turing machines, complexity classes, computer architecture, compilation theory, and possibly a programming language they never used before, maybe two. And they might prefer having social life than doing all-nighters on computer-assisted proof assignments :-) .

In short, I am not saying you cannot learn dynamic programming straight away from the theory, just that you are going to lose many people with this approach.

In fact, it makes me think of “New Math” [1], an effort to teach math from the ground-up starting in junior high. I am not familiar with how it worked in the US, but at least in France, it was definitely not a success. I would definitely have had a lot of fun, but many more did not, and failed to get a basic mathematical education at all as a result.

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