Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
maxdamantus
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
maxdamantus
9mo ago
It's the same on Wayland. The client (usually part of a toolkit like Gtk/Qt) needs to subscribe to notifications [0] from the server so it can decide the raster size of the surface it wants to draw to. Qt does this on X11 by detec
2.
▲
by
maxdamantus
9mo ago
> Per-display DPI settings fwiw, Xorg already had this, since you can set the DPI for each display through RandR/xrandr. In both X11 and Wayland it's up to the toolkit to actually detect the setting and rasterise accordingly. W
3.
▲
by
maxdamantus
10mo ago
> It's true that any modern processor has a "compilation step" into microcode anyway, so in an abstract sense, that might as well be some kind of bytecode. This. > What I can imagine is a purpose-built CPU that would ma
4.
▲
by
maxdamantus
10mo ago
Sir say "tray bean". Mercy.
5.
▲
by
maxdamantus
10mo ago
> Oh, wait, there is: As far as I can tell this is a transliterator, not a translator. It's just turning latin letters into hieroglyphs as you type them. I don't know how accurate the transliteration is. It would be like coming
6.
▲
by
maxdamantus
10mo ago
Indeed, my understanding (which is backed up by your link) is that the hieroglyphs aren't just pictograms that try to draw the meaning but they tend to have particular pronunciations, and the selection of glyphs will usually depend on
7.
▲
by
maxdamantus
10mo ago
> Exceptions in transactional logic are often used to represent a "rollback persistent store changes made thus far" scenario. Handling can be added to change the transaction to be read-only if the inner code throws a particular
8.
▲
by
maxdamantus
10mo ago
You want to at least check that the exception was raised in the absence of read anomalies. The check for read anomalies in OCC happens during the commit phase. Setting a transaction to read-only on error is possible using the code (using a
9.
▲
by
maxdamantus
10mo ago
I wasn't thinking of JDBC SQL transactions specifically, but sure, different APIs can denote retriable transaction failures differently. Instead of: if (!tx.commit()) { continue; } you do: try { conn.commit(); } catch (SQLTr
10.
▲
by
maxdamantus
10mo ago
> A transaction failing is the opposite of an unexpected event. That's why it's denoted by a non-exceptional return value from `tx.commit()` in my sample code. When I've talked about exceptions here, I'm talking about
11.
▲
by
maxdamantus
10mo ago
A result of an inconsistent transaction should be discarded whether it's a return value or a thrown exception. If it runs out of tries another error should be thrown. This should only happen due to contention (overlapping transactions)
12.
▲
by
maxdamantus
10mo ago
Sounds like the right intent to me. To pinpoint your existing quote from the documentation: > The finally block always executes when the try block exits. This ensures that the finally block is executed even if an unexpected exception occ
13.
▲
by
maxdamantus
10mo ago
And JavaScript .. And Python (though as sibling posts have mentioned it looks like they're intending to make a breaking change to remove it). EDIT: actually, the PEP points out that they intend for it to only be a warning in CPython, t
14.
▲
by
maxdamantus
10mo ago
Interesting .. from the post above: > The projects examined contained a total of 120,964,221 lines of Python code, and among them the script found 203 instances of control flow instructions in a finally block. Most were return, a handful
15.
▲
by
maxdamantus
11mo ago
Doesn't look difficult: https://www.fbi.gov/wanted/seeking-info/ballot-box-fires (yes, that's in Oregon)
16.
▲
by
maxdamantus
11mo ago
Here in NZ when I've been to vote, there are usually a couple of party affiliates at the voting location, doing what one of the parent posts described: > You can stay there and wait for the count at the end of the day if you want to
17.
▲
by
maxdamantus
11mo ago
The point about inducing segmentation faults is interesting and sounds like it could work to implement the `hint_read` mechanism. I guess it would mostly be a question of how performant userfaultfd or SIGSEGV handling is. In any case it wil
18.
▲
by
maxdamantus
11mo ago
I think the model I described is more precise than madvise. I think madvise would usually be called on large sequences of pages, which is why it has `MADV_RANDOM`, `MADV_SEQUENTIAL` etc. You're not specifying which memory/pages ar
19.
▲
by
maxdamantus
11mo ago
Just to clarify, I think the parent posts are talking about non-failing page faults, ie where the kernel just needs to update the mapping in the MMU after finding the existing page already in memory (minor page fault), or possibly reading i
20.
▲
by
maxdamantus
11mo ago
> I can say that the display & overall performance is noticeably faster on the two actual computers I tested on than under qemu on my Linux system. You'd probably want to use `-enable-kvm` so it's not doing full software em
21.
▲
by
maxdamantus
1y ago
> But I think it worth recognising that the serialisation mechanism doesn’t exist primarily to prevent repairs, it exists to provide a form of cryptographic integrity check of the manufacturing process. What, you mean in case the parts o
22.
▲
by
maxdamantus
1y ago
But no one has demonstrated an actual operation that requires valid UTF-8. The reasoning is always circular: "I require valid UTF-8 because someone else requires valid UTF-8". Eventually there should be an underlying operation whi
23.
▲
by
maxdamantus
1y ago
They have effectively done this (since the linked issue was raised), by just converting Windows filenames to WTF-8. I think this is sensible, because the fact that Windows still uses UTF-16 (or more precisely "Unicode 16-bit strings&qu
24.
▲
by
maxdamantus
1y ago
Ah, mentioning Windows filenames would have been useful. I guess the issue isn't so much about whether strings are well-formed, but about whether the conversion (eg, from UTF-16 to UTF-8 at the filesystem boundary) raises an error or s
25.
▲
by
maxdamantus
1y ago
Can you give an example of how Go's approach causes people to lose data? This was alluded to in the blog post but they didn't explain anything. It seems like there's some confusion in the GGGGGP post, since Go works correctly
26.
▲
by
maxdamantus
1y ago
> I don’t understand this complaint. (3) sounds like exactly what you are asking for. And yes, doing unsafe thing is unsafe You're meant to use `unsafe` as a way of limiting the scope of reasoning about safety. Once you construct a
27.
▲
by
maxdamantus
1y ago
The problem is that there are so many functions that unnecessarily take `&str` rather than `&[u8]` because the expectation is that textual things should use `&str`. So you naturally write another one of these functions that take
28.
▲
by
maxdamantus
1y ago
> This is, of course, exactly what Rust does: I am not aware of a single thing that &str allows you to do that you cannot do with &[u8], except things that do require you to assume it's valid UTF-8. Doesn't this demonst
29.
▲
by
maxdamantus
1y ago
Do you want grep to crash when your text file turned out to have a partially written character in it? 99.999% seems very high, and you haven't given an actual use case for the restriction.
30.
▲
by
maxdamantus
1y ago
But there's no option to just construct the string with the invalid bytes. 3) is not for this purpose; it is for when you already know that it is valid. If you use 3) to create a &str/String from invalid bytes, you can't
More ›