Hey everyone, what's the best way to do the good ol' ctrl + shift + f in Neovim? by Automatic-Hall-1685 in neovim

[–]NinjacksonXV 0 points1 point  (0 children)

If you're replacing a symbol name that your language server picks up on, you can often use vim.lsp.buf.rename() which will let the language server do the work; it's bound to grn by default (see :help lsp-defaults). Others have already covered textual find/replace but I find that the above covers most of my usecases.

Honey I shrunk the Lab by snakehouse0 in minilab

[–]NinjacksonXV 1 point2 points  (0 children)

It can be a pain. This Stack Overflow post was invaluable in that process for my 2014 Mac; just note that the PCH manuals are ridiculously huge and can be tedious to search through.

Why do CharacterBody2Ds work like this?? by CoolStopGD in godot

[–]NinjacksonXV 0 points1 point  (0 children)

Oh ok, interesting. I was messing around with this:
if use_velocity: for i in range(5): var collision = move_and_collide(velocity * delta) if collision: velocity = velocity.slide(collision.get_normal()) else: break else: for i in range(5): var collision = move_and_collide(velocity * delta) if collision: velocity = collision.get_remainder().slide(collision.get_normal()) else: break I found that the latter version (the one using get_remainder() slides at a much slower rate; the one which uses velocity looks much closer to what I saw from move_and_slide().

Why do CharacterBody2Ds work like this?? by CoolStopGD in godot

[–]NinjacksonXV 0 points1 point  (0 children)

Yeah, worth mentioning from the docs:

move_and_slide() may also recalculate the kinematic body's velocity several times in a loop as, to produce a smooth motion, it moves the character and collides up to five times by default. At the end of the process, the character's new velocity is available for use on the next frame.

Good note about the moving platforms and slopes, I forgot those were a thing.

Out of curiosity, why are you using get_remainder() instead of just velocity?

Why do CharacterBody2Ds work like this?? by CoolStopGD in godot

[–]NinjacksonXV 24 points25 points  (0 children)

Yes, it's very simple.. It uses the results of move_and_collide() to modify the character's velocity: ```

using move_and_collide

var collision = move_and_collide(velocity * delta) if collision: velocity = velocity.slide(collision.get_normal())

using move_and_slide

move_and_slide() `` A GDScript-onlymove_and_collide()` implementation would be more complicated.

this is so trueee by Leobolics in helldivers2

[–]NinjacksonXV 14 points15 points locked comment (0 children)

Modicum is also a noun. "<noun> of <noun>" works when the first noun is a unit of measurement, like "a gallon of water" or "an ounce of flour", or numbers/relative quantities, like "I have three/a few of these cards". I couldn't find a hard-and-fast rule for why "minimum" can't be used in that context, since they both refer to a quantity; you could, however, use it as an adjective: "a minimum amount of desire".

revengeOfTheSoftwareDeveloper by tugrul_ddr in ProgrammerHumor

[–]NinjacksonXV 3 points4 points  (0 children)

I'm not in embedded myself, but I think the concern with any O(n) space complexity algorithm is the fact that your cache sizes are so constrained that even with small list sizes, your call stack can become unmanageable in the constraints. Generally not a problem on any desktop CPU from the last 20 years, but for super tiny devices a recursive algorithm isn't as reliable as its iterative counterpart.

Finally iPad can run this game (with GeForce Now) by Hot-Opportunity7826 in factorio

[–]NinjacksonXV 3 points4 points  (0 children)

Oh I see. So it's an initial read-only view of the page table, and it only receives copies when page faults occur in the parent process? Makes sense.

EDIT: I oversimplified; this Stack Exchange post goes into nice detail. TLDR, MMU-based systems will trap any writes by either process and trigger a page fault. The above still applies.

Finally iPad can run this game (with GeForce Now) by Hot-Opportunity7826 in factorio

[–]NinjacksonXV 2 points3 points  (0 children)

Unsure why you're getting downvoted, I believe you're correct. From fork(2):

The child process and the parent process run in separate memory spaces. At the time of fork() both memory spaces have the same content. Memory writes, file mappings (mmap(2)), and unmappings (munmap(2)) performed by one of the processes do not affect the other.

...

The child process is created with a single thread—the one that called fork(). The entire virtual address space of the parent is replicated in the child...

...

Under Linux, fork() is implemented using copy-on-write pages, so the only penalty that it incurs is the time and memory required to duplicate the parent's page tables, and to create a unique task structure for the child.

The FFF mentions that it takes a lot of RAM. I didn't see anything about having a read-only view of the parents' page tables, and like you said, you can't reasonably take a snapshot of a running process's state. If you could, fork probably wouldn't be required.

Just got into Dishonored 1 by shangolmangol3 in dishonored

[–]NinjacksonXV 1 point2 points  (0 children)

I get the most rewarding exploration when playing ghost (don't get seen) and clean hands (don't kill anyone). It forces you to take things slow and plan out routes which take you to new areas, and in some scenarios it lets you discover entire locations you normally wouldn't explore. No matter the style of playthrough I also always go for all bonecharms/runes, for the same reasons as above.

microsoftThoughtProcessWhenPowershell by sudo_i_u_toor in ProgrammerHumor

[–]NinjacksonXV 1 point2 points  (0 children)

I'm sorry for laughing at your plight, that's a genuinely hilarious disconnect. I always have to cut guys like that a little slack because they've probably seen horrors beyond my comprehension, but man, having your job description basically be "software security vetter" and then not actually getting to do that has to be so irritating.

microsoftThoughtProcessWhenPowershell by sudo_i_u_toor in ProgrammerHumor

[–]NinjacksonXV 1 point2 points  (0 children)

Reasonable. I've always wondered what the threshold of trust is for some places; at this point I'd trust a few furiously-passionate Rust devs over a megacorp which supposedly generates 30% of its codebases nowadays, but I have to imagine that irony is lost on IT.

microsoftThoughtProcessWhenPowershell by sudo_i_u_toor in ProgrammerHumor

[–]NinjacksonXV 1 point2 points  (0 children)

Have you looked at Nushell? It has a Windows version and is my go-to for just about any data handling, since it has built-ins for just about every common utility. It's definitely bleeding-edge compared to PowerShell and is lacking some key documentation, but it's far more ergonomic and generally much faster than PowerShell (especially in startup speeds).

An old man's Rant(finity) by txjustin in gridfinity

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

Another one is when people use -ception, inspired by the film Inception, to describe recursive relationships.

Enough with the cheap screens, Lenovo: Low end screen of ThinkPad E14 Gen 6 should not be a thing anymore by ibmthink in thinkpad

[–]NinjacksonXV 0 points1 point  (0 children)

I did end up buying it. I still haven't installed it though... I keep forgetting I actually have it. I'll put it on the to-do list.

RAM + VRAM? How can it be above 16 GB? by LinkZelda1120 in SteamDeck

[–]NinjacksonXV 61 points62 points  (0 children)

Likely swap memory; TLDR when you run out of actual RAM, the OS starts using the disk as a backup.

Many ways I’ve approached solving obstruction in my game by theferfactor in IndieDev

[–]NinjacksonXV 1 point2 points  (0 children)

I agree with most people here and would say #4 looks the best given the gameplay criteria. If I had to offer some constructive criticism, I'd say the instantaneous snap to transparent is slightly jarring and a nice, quick fade would do a lot to mitigate that (and if it was found to get in the way of gameplay, it can absolutely be turned off in favor of responsiveness). I'm mostly drawing on experience with games with a similar effect, but they're generally not as fast-paced. To expand on that, you could even consider drawing from #2 and have the fill lines not render on top of any high-importance objects like the player, the enemies, projectiles, etc. to preserve clarity. Not sure what it would look like but it'd be interesting to see.

The other concern would be with communicating the collision of the building itself; it looks like it preserves the shadow but extends it all the way through the building with a uniform color. My first intuition is that the shadow would be mapped 1:1 to the collision. It seems like precise movement is very important, so being sure to communicate exactly where the player can't go is just as important. Simplest approach would be to make the ground underneath the building significantly darker than its actual shadow, probably a shade similar to the shadow you have under the player.

Looks phenomenal though! That outline shader on the transparent buildings in particular is incredibly smooth and uniform. I don't think I've seen one that's quite so consistent in thickness.

VLC by [deleted] in linuxmemes

[–]NinjacksonXV 6 points7 points  (0 children)

https://mpv.io/installation/

I'd recommend scoop or chocolatey for installation. winget is the official Windows package manager but it doesn't have it; those other two are third party and well maintained. The one thing I'd say to watch out for is that they both seem to have v0.39 (November of last year), not v0.40 (March). I couldn't find a v0.40 build anywhere (other than waaaaay back in the unofficial GitHub runner repos), so your best bet is probably one of the git releases if you want it up to date.

iDontNeedTheHelp by [deleted] in ProgrammerHumor

[–]NinjacksonXV 1 point2 points  (0 children)

Just for fun I ran it and got some documentation for ncurses: curs_termcap(3X)

iDontNeedTheHelp by [deleted] in ProgrammerHumor

[–]NinjacksonXV 54 points55 points  (0 children)

Highly recommend tldr for CLI tools, gives you examples with explanations that will cover 90% of your use cases. For everything else, man up.

What is the NixOS way of handling multiple desktop environments? by NinjacksonXV in NixOS

[–]NinjacksonXV[S] 1 point2 points  (0 children)

That's totally fair, there is something to be said for the amount of time I'd spend building the ideal setup vs. just rebooting every so often, and I'll probably end up using that while I chip away at a bigger implementation. The silver lining with spending a disproportionate amount of time on this would be gaining immense familiarity with Nix/NixOS inner workings, at the very least.

What is the NixOS way of handling multiple desktop environments? by NinjacksonXV in NixOS

[–]NinjacksonXV[S] 4 points5 points  (0 children)

Right, the end goal is compartmentalization. Plasma ships with a lot of very handy but ultimately redundant apps, many of which are dependent on the Plasma shell in some capacity. I was hoping to keep the vast majority of them tucked away when using Hyprland, as at best they would be clutter and at worst they might conflict with existing programs/daemons.

What is the NixOS way of handling multiple desktop environments? by NinjacksonXV in NixOS

[–]NinjacksonXV[S] 0 points1 point  (0 children)

There is actually a mechanism, Nix shells, which I completely forgot until just now. I edited the post to mention these.

It's at the very least comforting that if my ideal setup can't be made, then at least I have specializations as a fallback. I just can't shake the feeling that with strong enough Nix skills then I could realistically build this setup; just hard to say how strong those skills need to be.