Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rav
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
rav
2mo ago
> For example, it would be interesting to incorporate Ghost Font into CAPTCHA systems, as most systems are easily solved by AI today. It seems to me like it should be easy enough to take Ghost Font, apply normal video compression techniq
2.
▲
by
rav
3mo ago
Today I learned that jq -Rrj is a shorter command line for doing the same as tr -d '\n'.
3.
▲
by
rav
3mo ago
Not the first time that a Nature publication's "too good to be true" results turn out to be based on simple programming errors... Nature 532, 210 (2016) was retracted after it was shown that a hand-coded gradient function, us
4.
▲
by
rav
3mo ago
There's a note at the end: > As always, this blog post is written by me, without any AI, so all errors are my own. However, the illustrations in the post are clearly made by generative AI, are they not?
5.
▲
by
rav
3mo ago
> Of course, if you're implementing POSIX vi, there are quite a few features that have aged poorly, like roff/troff macros and line-editing What do you mean by "roff/troff macros"? EDIT: Ah, you're probably
6.
▲
by
rav
5mo ago
Looking in dev console reveals that the issue is an error response from https://cdn.skypack.dev/canvas-confetti - at the moment that URL returns: A server error has occurred FUNCTION_INVOCATION_FAILED
7.
▲
by
rav
5mo ago
Given a commit that both refactors (A) and adds a feature (B), you can go into the codebase and remove the new feature by hand (B^-1), commit the feature removal, and immediately revert the feature removal. This leads to three commits: (A B
8.
▲
by
rav
5mo ago
In TypeScript it's called "bivariance", which sounds very programming language theory like, but is not a term typically used in academic contexts, since it is unsound almost by default. It's described here: https:/
9.
▲
by
rav
1y ago
How is it "50-90%" savings? If a given application doesn't repeat its queries, surely there's nothing to save by caching the responses?
10.
▲
by
rav
1y ago
You can rewrite it using let-or-else to get rid of the unwrap, which some would find to be more idiomatic. let value = Some(param.as_ref()) else { // Handle, and continue, return an error etc } // Use
11.
▲
by
rav
1y ago
At the moment it seems like you can avoid AI search results by either including swear words, or by using 'minus' to exclude terms (e.g. append -elephant to your search query).
12.
▲
by
rav
1y ago
I often run rm -rf as part of operations (for reasons), and my habit is to first run "sudo du -csh" on the paths to be deleted, check that the total size makes sense, and then up-arrow and replace "du -csh" with "rm
13.
▲
by
rav
1y ago
My suggestion: Change the color of visited links! Adding a "visited" color for links will make it easier for visitors to see which posts they have already read.
14.
▲
by
rav
2y ago
On a small team I usually already know who wrote the code I'm reading, but it's nice to see if a block of code is all from the same point in time, or if some of the lines are the result of later bugfixing. It's also useful to
15.
▲
by
rav
2y ago
Ooh, core.hooksPath is quite nifty. I usually use something like ln -sf ../../scripts/git-pre-commit-hook .git/hooks/pre-commit which simply adds a pre-commit symlink to a script in the repo's scr
16.
▲
by
rav
2y ago
I don't understand what a dedicated "completely open source offering" provides or what your "five nines feature flag system" provides. If you're running on a simple system architecture, then you can sync some t
17.
▲
by
rav
2y ago
It seems to me that macOS has env -S as well, but the shebang parsing is different. The result is that shebang lines using env -S are portable if they don't contain any quotes or other characters. The reason is that, running env -S &#x
18.
▲
by
rav
2y ago
Oh wow, today I learned about env -S - when I saw the shebang line in the article, I immediately thought "that doesn't work on Linux, shebang lines can only pass a single argument". Basically, running foo.py starting with
19.
▲
by
rav
2y ago
No love for the <plaintext> tag? "The <plaintext> HTML element renders everything following the start tag as raw text, ignoring any following HTML. There is no closing tag, since everything after it is considered raw text.&
20.
▲
by
rav
2y ago
FIM is "fill in middle", i.e. completion in a text editor using context on both sides of the cursor.
21.
▲
by
rav
2y ago
Actually, "git reset --soft" moves the current branch to another commit, without moving the index (aka staging area) along with it, whereas "git reset" (aka "git reset --mixed") moves the current branch AND the
22.
▲
by
rav
2y ago
For move-branch: Use `git branch -f master HEAD~` if you're currently on another branch, or `git reset --soft HEAD~` if you're currently on master.
23.
▲
by
rav
2y ago
You could use handwritten asmjs in that case. I did it at work to improve performance on some pixel-wise software rendering we were doing. (We have since then switched to WebGL, but asmjs was a nice stepping stone.) If I recall correctly, i
24.
▲
by
rav
2y ago
To run a macro on the start of each line matching your search, you can use: :g//norm @q Here, g// repeats the most recent search, and norm @q runs the q macro on each matched line. This is not quite the same as
25.
▲
by
rav
2y ago
Heads up - you should use "qD instead of "qdd to avoid an extra newline at the end of the register contents. (In fact the current Vim 9.1.954 behavior seems a bit odd in that it moves the cursor down, but not to the start of the l
26.
▲
by
rav
2y ago
There's also the no-macro solution where you just use ":%norm [series of keystrokes]" to run the given keystrokes on each line, but that comes with the added difficulty of not giving any visual feedback of what the keystrokes
27.
▲
by
rav
2y ago
Actually, from an algorithmic standpoint it's the opposite: the minimum cover problem (where overlap is allowed) is NP-hard whereas the minimum partition problem (where overlap is NOT allowed) has polynomial-time algorithms. "An A
28.
▲
by
rav
2y ago
Regarding the Vim macro that ends by going to the next line to be "replayable": You can also use the following command to run the macro once per line: :%norm @q
29.
▲
by
rav
2y ago
The default chords from left to right sound pretty standard in my ears: vii⁰, I, ii, iii, IV, V, vi - but maybe it's locrian if you take the leftmost chord to be the tonic, and a plain major if you take the second from the left to be t
30.
▲
by
rav
2y ago
Solving the duck-rabbit puzzle in Animal Well gave me such chills. In the beginning of the game the player comes across a room with a duck that quacks at you when you walk by. In a distant corner of the world there's a picture of a duc
More ›