Skip to content

u/mort96

In this archive from Apr 2014 to Nov 2026

29
posts
158
comments
25
media
1.9k
score
3 saved before deletion

In my first Durge game, I ended up with Bhaal's Chosen Durge, Sharran Shart, Ascended Astarion and Baht t'Vlaakith Lae'zel.

Then Lae'zel broke up with me and I reloaded the game back to before Lae'zel embraced Vlaakith...

1 points

My problem is: okay, so it has been deprecated for 20 years. So what? If it was marked as deprecated deep inside of some documentation page nobody reads, but keeps working, keeps not producing warnings, people keep writing code which depends on it, and they're not loudly communicating that it's about to go away... it's not really deprecated is it.

For things like this which aren't massive ongoing maintenance headaches, they should be removed once people have stopped relying on it.

6 points

This isn't quite right... in UTF-8, the byte values 0 to 127 corresponds to ASCII characters, meaning 50% of bytes should be ASCII (of which the 93 characters from 33-126 are printable, as you mention). That means roughly 33% of all bytes should be interpretable as normal ASCII characters (maybe fewer depending on how the text renderer handles incomplete multi-byte sequences, but in the absolute worst case, 1/4 of all bytes with valid printable ASCII characters would line up with the start of a new character and thus still be printed, so we should still see at the very least roughly 8% ASCII).

This kind of Unicode soup with no ASCII characters is pretty common when viewing random data as UTF-16 though. In UTF-16, you'll only see ASCII characters if the most significant byte is 0 and the least significant byte is in the printable range, which means for each pair of random bytes, there's a 0.14% chance to see an ASCII character.

What also sometimes happens is, the text is normal UTF-16 encoded English text, but the endianness is flipped or a byte at the start is missing. If it was encoded in UTF-16 little endian (least significant byte first) and decoded in UTF-16 big endian (most significant byte first), characters which were meant to be e.g U+004D (ASCII upper case 'M') are interpreted as e.g U+4D00 (CJK Unified Ideograph-4D00, '䴀'). If a byte is missing somewhere, the effect is similar; the sequence U+0068 U+0065 U+0079 U+00?? ("hey" followed by some other character we don't care about) becomes U+6800 U+6500 U+7900 ("栀攀礀") when the first byte is removed.

15 points

Virtual machines pretty much have the same CPU performance as bare metal these days, as long as the guest is the same architecture as the host and you don't limit the number of cores the guest can use. If the host is fast enough to compile stuff, the VM will be too.

1 points

IMO, a swap file is the perfect compromise. You get the advantage of swap, but if you need more disk space you can always shrink or delete the swap file later. If you find out that you need more swap space, you can increase the size of the swap file; or if you just need it temporarily, making more swap is as easy as fallocate + mkswap + swapon.

There's some performance overhead compared to a swap partition I believe, but swap is so slow anyway that I can't imagine it making a huge difference.

4 points

It's a moderate improvement over strong per-service passwords in a password manager. It's a huge trade-off and makes us all completely dependent on our phones, which incidentally is the most non-free computing platform, as using freedom-respecting open source desktop or laptop OSes is practical but using freedom-respecting open source phone Oses really isn't.

It's not clear to me that the trade-off is worth it. I certainly don't believe it's right to force it on everyone.

12 points

FWIW, you can give yourself a huge swapfile. On my laptop, I have 16GB of RAM, with an additional 16GB of swap for the cases where I have to link really big C++ projects. I also gave my 1GB VPS a few gigabytes of swap space one time when I had to compile node.js on it. A laptop upgrade might be in order anyways, but just know that there are ways to do things which require tonnes of memory on computers with little memory, it'll just be extremely slow.

2 points

Not entirely. It is possible, for example, to compile both an SSE4.2 version and a baseline x86_64 version and determine which to use at runtime. Programmers sometimes do it explicitly with a manual runtime check, and GCC can generate such checks for you (using things like function multiversioning).

You're right that it's mostly a compile-time decision, but performance critical code might do some of the checks at runtime.

27 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.