Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rav
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
121.
▲
by
rav
5y ago
> I used to run Windows virtualised under Linux with a PCIe passthrough GPU. I remember having to re-install windows directly on my machine at a LAN party once because CS:GO couldn't be run in a VM anymore :( Have you tried running
122.
▲
by
rav
5y ago
> Software is like writing. It can’t help but express how the author thinks about their code. These tools try to iron that personality out - and for what reason? A single-author novel can have personality. A 100-author 30-volume encyclop
123.
▲
by
rav
5y ago
Since the contents are in-memory, you could imagine a straightforward implementation where the directory hierarchy in the tmpfs is stored in a pointer-based in-memory tree. A file handle just needs a pointer to where in memory the contents
124.
▲
by
rav
5y ago
> Then there is the fact that you basically make every insertion 3x as costly. You better have a good reason to need this given the additional complexity and caveats. > As for the original interview question, there are systems where a
125.
▲
GitHub Is My Copilot
(lwn.net)
4 points
by
rav
5y ago
|
0 comments
126.
▲
by
rav
5y ago
I just tried in a private browsing window: Without refreshing the page (to trigger the "forced HTTP redirect to login") I could delete the modal and disable the overflow:hidden on body and keep scrolling down quite a bit until I h
127.
▲
by
rav
5y ago
Digital elevation models typically represent terrain elevations in a grid of square cells of some cell size, e.g. 1 meter by 1 meter. Such a model is rarely useful unless it also has georeferencing information, i.e. coordinates for the boun
128.
▲
by
rav
5y ago
Sometimes, as you become a better programmer, a comment that you thought were a "why" comment is now clearly a "what" comment. One programmer's "magic super-efficient pointer gymnastics" in C is another pr
129.
▲
by
rav
5y ago
Simple scheme for deduplicating strings in Python: dedup = {} for s in strings: s = dedup.setdefault(s, s) # Do something with s It hashes each string "s" and looks in the dictionary "dedup"
130.
▲
by
rav
5y ago
Here's a parallel implementation that gets me 950 commits per second: manycommits() { h=@; t=`git rev-parse @^{tree}` for i in `seq 2 "$1"`; do h=`echo "$*" | git commit-tree $t -p
131.
▲
by
rav
5y ago
Using a simple shell for-loop, I could create 10000 commits in 25 seconds (= 400 per second) with the code below. The 4.2 million commits should take around 3 hours to create at this pace. Looking at the most recent 10000 commits in the rep
132.
▲
by
rav
5y ago
My favorite problem involving Two Sorted Integer Lists is "Sort X+Y": Given sorted lists X and Y, each of length N, produce the list of N^2 pair-sums in sorted order. Specifically X+Y is the set {a + b for a in X and b in Y}. It s
133.
▲
by
rav
5y ago
Here's a bookmarklet version of "Don't mess with paste" for those who don't want to install the add-on: javascript:void(document.documentElement.addEventListener( 'copy',e=>e.stopPropagation()
134.
▲
by
rav
5y ago
You can take a look at how the Gtk bindings handle the inheritance hierarchy in Gtk objects: https://gtk-rs.org/docs-src/tutorial/object_oriented
135.
▲
by
rav
5y ago
Let me give an example to explain what I mean: I would hope that switching keyboard layouts would work the same as switching between windows of open applications with Alt-Tab. That is, open a web browser, then open a text editor, then open
136.
▲
by
rav
5y ago
Is that how the cycling works? I would hope that, just like with Alt-Tab, pressing the language bar hotkey Windows-Spacebar once will toggle between the current and the most recently used one.
137.
▲
by
rav
5y ago
You're right that there's a lot of nuance to the set up. I think listing that directory will solve the "it's 4:00 am and you want to know if nginx will start on boot" scenario, but you're right that you need to
138.
▲
by
rav
5y ago
In the systemctl status output, it says "Loaded: loaded (...; enabled; ...)" - "enabled" means that the service starts on boot. Use "systemctl enable" to "enable" a service. It creates a symlink in &#
139.
▲
by
rav
5y ago
> for instance, Python now uses a weird mixture of ASCII and UCS2 internally. Really? Last I heard (PEP 393), the rule was: "8 bits if all codepoints are less than 256 (i.e. Latin-1); 16 bits if all codepoints are less than 2^16 (i.
140.
▲
by
rav
5y ago
Here you go: https://github.com/alaingilbert/rust-ttapi/pull/1
141.
▲
by
rav
5y ago
You cannot access "bot" inside bot.on_speak(|| { ... }) because Rust does not know that the "bot" variable stays alive for whenever the callback is called. In this situation I would expect "bot" to be stored in
142.
▲
by
rav
5y ago
// Correct: returns '1' 'Résumé'.localeCompare('RESUME', undefined, {sensitivity: 'accent'}) localeCompare() returns 0 if the strings are equal and -1/+1 if they're d
143.
▲
by
rav
6y ago
Thanks for the pointer to :split +term - I just dug through all of :help terminal. Apparently this is a feature from Vim 8.1 that I had completely missed!
144.
▲
by
rav
6y ago
PHP's documentation is still excellent and is still available at the same place it was 20 years ago: Typing php.net/FUNCNAME in the address bar gives the documentation for FUNCNAME(). I'm glad my current work is only about 1%
145.
▲
by
rav
6y ago
You know it's prose written by a programmer when they use "else" in a sentence where other people would say "otherwise".
146.
▲
by
rav
6y ago
As far as I know, Gmail doesn't load the images until the first time the user opens the message, so it unfortunately doesn't make the tracking as useless as you could hope.
147.
▲
by
rav
6y ago
UPDATE: I'm in Denmark (EU). On nintendo.com, I don't get a "Buy digital" button. If I go to the region-specific site nintendo.dk, the search function is broken, many games aren't listed, and there's no buttons
148.
▲
by
rav
6y ago
> On the Switch, you can even buy from your computer using their web shop, if the Switch itself happens to be out of your reach How? When I go to a Nintendo store page for a game I want to buy digital [1], all I get are the options "
149.
▲
by
rav
6y ago
Maybe this git-config setting will do what you need? receive.denyNonFastForwards "If set to true, git-receive-pack will deny a ref update which is not a fast-forward. Use this to prevent such an update via a push, even if
150.
▲
by
rav
6y ago
I found other patterns that I thought were unsimplified, but (spoiler alert) in the end it turned out that all of the seemingly-unnecessary details were important for the solution! E.g. [^C]*[^R]* LOOKS unsimplified, but it actuall
More ›