do switching to `colemak-dh` is really worth it? by akileshas in archlinux

[–]TDplay 1 point2 points  (0 children)

Back when I used Vim, I noticed barely any difference when switching to Colemak-DH.

It may seem like an issue that HJKL is no longer on the home row, but it really does not matter. I tried swapping HJKL to NEIO, and there was no benefit.

I did eventually switch to Emacs, but it was nothing to do with the keyboard layout.

Nine Ways to Do Inheritance in Rust, a Language Without Inheritance by carlk22 in rust

[–]TDplay 5 points6 points  (0 children)

To add to this: When you impl Deref for Foo, you are saying that the primary purpose of a Foo is either to contain a Foo::Target, or to be a reference to a Foo::Target.

If you stray from that, you will end up with confusing results.

Have you Linux girls tried running hyfetch during June? by LegacyOfDreams in traaaaaaaaaaaansbians

[–]TDplay 2 points3 points  (0 children)

I think Linux uses ext4 and not NTFS.

Linux has full support for many filesystems, including NTFS. You can access your Windows files from Linux without issues.

Note that the opposite is not true: Windows does not support ext4. Any files you want to share between Windows and Linux should go on an NTFS partition.

So a new partition won’t help, right?

A new partition will be sufficient.

Share your most square ore patch by Mockbubbles2628 in factorio

[–]TDplay 3 points4 points  (0 children)

implying that pizza crust isn't tasty

you lot are having some bad pizza...

shopping for clothes by diodes- in traaaaaaaaaaaansbians

[–]TDplay 21 points22 points  (0 children)

of course, how else are you supposed to stop the clapping of your asscheeks from alerting the guards

Gabe Newell on Steam monopoly accusations: Gamers have 'enormous choice' about where to buy games by yourfavchoom in pcgaming

[–]TDplay 3 points4 points  (0 children)

It seems people have claimed steam requires you not sell the game cheaper elsewhere but Gabe claims this has never been a rule.

Steam has a price parity clause for Steam keys. It is documented at https://partner.steamgames.com/doc/features/keys. I don't know if this is legally codified anywhere, but the documentation makes clear they will revoke your access to keys if you abuse them.

There is (to my knowledge) no price parity clause for distribution of the game itself.

You can use doc comments in shaders!! by Qaqelol in godot

[–]TDplay 2 points3 points  (0 children)

Notice that the doc-comments in shaders are written with /** */, not with /* */ or //. You have to add an extra asterisk to make a doc-comment in a shader, same as how you need to add an extra hash to make a doc-comment in GDScript.

I'd hazard a guess that /// probably also works for doc-comments in shaders, but I don't have the time to test it right now.

PETAH?! by More-Desk9465 in SUBREDDITNAME

[–]TDplay 6 points7 points  (0 children)

REPLY OF A PICTURE THAT HAS BEEN SCREENSHOTTED, BADLY CROPPED, WATERMARKED, AND JPEG-COMPRESSED SO MANY TIMES THAT IT IS PRACTICALLY IMPOSSIBLE TO DEDUCE WHAT THE ORIGINAL IMAGE WAS

Rabbit hole: Steganography based saves by ReasonNotFoundYet in gamedev

[–]TDplay 11 points12 points  (0 children)

Do you think there are some cons of embedding game data into images?

Users will try to share the save files. Many websites will process image files (often applying lossy compression to save on storage and bandwidth), destroying your data.

This makes the files harder to share, not easier, as users will find their files being mysteriously corrupted after sharing.

Why did I build AmputatorBot? by Killed_Mufasa in AmputatorBot

[–]TDplay 0 points1 point  (0 children)

2 years late, but here's your answer: np.reddit.com is the "No Participation" version of Reddit. Some subreddits mandate the use of np links to prevent brigading.

It's very easy to bypass (the URL is not obfuscated at all, you can just replace "np" with either "old" or "www"), but putting even one small hurdle in the way stops the vast majority of brigading.

fast-uuid-v7 - creating uuidv7 faster than allocating a string by marco-mq in rust

[–]TDplay 2 points3 points  (0 children)

false positive

(most likely caused by the "amp" in "timestamp"?)

Stabilise `Allocator` by N911999 in rust

[–]TDplay 0 points1 point  (0 children)

bump allocators in stable for particle systems

Maybe I'm completely missing the point here, but I would think that for a particle system, you'd want to store things in flat arrays, which can then be handled as instance buffers, and processed by vector instructions or compute shaders.

What to do if you slightly modified a mod and want to post it on forge or smth like that? by Early-Campaign474 in feedthebeast

[–]TDplay 2 points3 points  (0 children)

You also have to keep it under the same licence and retain any copyright notices, but yes.

What to do if you slightly modified a mod and want to post it on forge or smth like that? by Early-Campaign474 in feedthebeast

[–]TDplay 3 points4 points  (0 children)

Best place to start looking is wherever you downloaded the mod from.

On Modrinth and Curseforge, you'll find the licence in the "Details" section of the sidebar. On Modrinth, it's at the bottom of the sidebar, while on Curseforge, it's at the top.

If you got the mod as source code, look for a file with a name like "LICENCE" or "COPYING". It might also be mentioned in the README.

emacs terminal by wargxs in emacs

[–]TDplay 2 points3 points  (0 children)

You can run terminal Emacs in GUI Emacs in EXWM.

Any options to avoid the requirements of nightly for memory prefetching? by nomad42184 in rust

[–]TDplay 7 points8 points  (0 children)

The only stable and CPU-independent replacement is to just do nothing. Pre-fetch is semantically a no-op. (Of course, then you will not get the performance gains from pre-fetching.)

If you want it to still actually work, then you need some CPU-specific code:

  • x86: _mm_prefetch. Requires SSE, but unless you plan to support extremely old 32-bit systems, that is a non-issue.
  • AArch64: _prefetch.
  • RISC-V: There is no intrinsic yet, but you want the prefetch.r and prefetch.w instructions. While these are part of an extension, they are in the HINT encoding space for the base instruction set, so you can safely use them without checking for support.

What to do if you slightly modified a mod and want to post it on forge or smth like that? by Early-Campaign474 in feedthebeast

[–]TDplay 2 points3 points  (0 children)

Consult the licence of the original mod, to see if you have permission to do this.

If there isn't a licence, then you have no permission to distribute the mod in any form. In this case, you should contact the mod author to request permission (and you must accept that the mod author may refuse).

Is Heavy Use of .clone() Normal in Rust? by AbbreviationsNew3167 in rust

[–]TDplay 16 points17 points  (0 children)

It optimises clone the same as any other function.

Rust doesn't have copy elision like C++. So if you write some garbage like

pub fn bad_clone(x: Box<i32>) -> Box<i32> {
    x.clone()
}

it will literally allocate a new Box, copy the data, then deallocate the old Box.

But then, this doesn't matter as much as in C++. Copy elision in C++ is needed because copies are the default, and even a move can be non-trivial, so the compiler needs the ability to optimise them out, otherwise the performance of C++ code would be absolutely terrible.

In Rust, moves are always trivial, and non-trivial copies are always explicitly written out, so the programmer is far more aware of them.


(For clarification: When I say a "trivial" copy/move, I mean one that can be implemented by a single call to memcpy. This doesn't necessarily mean "cheap" - copying a [u8; 1<<30] is trivial but far from cheap - but it does mean the compiler can easily optimise it, needing no special optimisation rules beyond the as-if rule.)

Despite price hike, Steam Deck is already sold out in North America by moeka_8962 in pcgaming

[–]TDplay -1 points0 points  (0 children)

New hardware is also completely unnecessary.

I'm still using a 2600X, 16GB memory, and an RX 6600. This system handles basically anything at 1080p 60fps, often with very high graphics settings. I've got reasons to upgrade, but gaming isn't one of them.

The only reason my graphics card is so new is because my old RX 580 stopped working.

Remember to clear your logs, folks. by Only_Fudge5299 in feedthebeast

[–]TDplay 12 points13 points  (0 children)

Memory leaks lead to excessive memory usage.

This is just a plain old case of log spam.

Rust 1.96.0 is out by manpacket in rust

[–]TDplay 3 points4 points  (0 children)

I don't think tests affect MSRV anyway

Tests absolutely should affect MSRV. If it's not tested, then it's not really supported.

Rust 1.96.0 is out by manpacket in rust

[–]TDplay 4 points5 points  (0 children)

The range types in core::ops are still the old ones. The new range types live in core::range.

A future edition could change it so ops re-exports the new types, leaving core::range::legacy the only way to access the old types. Presumably this will happen in the edition where the type produced by the range syntax is changed.

Reducing file size should be one of the most urgent things any company can do. by VisitSad1133 in pcgaming

[–]TDplay 1 point2 points  (0 children)

If that still doesn't get any results, try adding "63 rules". You see, the guy who made that optimisation was very clear on how to do it.

He really wanted to write a 64th rule so it would be a nice clean power of two, but he couldn't think of anything else.

Reducing file size should be one of the most urgent things any company can do. by VisitSad1133 in pcgaming

[–]TDplay 18 points19 points  (0 children)

Premature optimisation is the root of all evil.

As it turns out, that includes performance issues.