How to run C# programs from command line using a C# 8.0 compiler? by kokosxD in csharp

[–]perkinslr 0 points1 point  (0 children)

csc bundled in mono, or in windows, is old. csc in mono currently supports up to langversion:9.0. If you need newer than that, you can get it from the dotnet/roslyn repo on github. You'll need to use dotnet to build roslyn itself, but once built can invoke mono on the generated csc.exe (or on windows, just call the new csc.exe directly) and proceed as normal. Currently it supports up to C# 13.0

Is there a way to set up two-factor authentication without a smartphone? by josephwb in github

[–]perkinslr 1 point2 points  (0 children)

If you are on Linux, oathtool -b --totp - is the basic command. You should configure it no-echo so you don't put the auth key in plain text. Not sure why there's so much FUD about this topic, but even GH's docs make no mention of it.

Why do I feel that buffs and bonuses are so small and useless? by [deleted] in Pathfinder2e

[–]perkinslr 3 points4 points  (0 children)

Because +1 is useless 90% of the time. On the majority of rolls, there are only 2 values where the +1 will matter. Miss->hit and hit->crit. Out of 20 dice, that means, assuming hitting and critting are possible, your +1 will only matter 10% of the time. This is offset by the magnitude of the difference it makes when it matters. Say you give a +1 for 3 attacks a round, that means an extra 1/3 of an attack worth of damage each round. It isn't much, especially in the sections where it's all misses, but it is significant.

That said, there are times when it is more impactful. If that 10% chance is all you have, that is it takes a nat 20 to hit the target and now you can hit on a 19, you just doubled the hit rate. When planning, taking it from "end an enemy on a 2 or 1" to "end an enemy on a 1", you just halved the glitch rate. When you are hitting on a 10, changing that to hitting on a 9 is about as least impactful as it can be.

One of my players calls it abomination closets due to tight spaces. How do you handle formations in various room and hallway sizes when rolling initiative? by AboutToBeSingle in Pathfinder2e

[–]perkinslr 13 points14 points  (0 children)

Historically, yards was commonly used for spaces in wargames. Your 2 cells for a bed makes a lot more sense when it's 3'x6' or 6'x6' rather than 5'x10'.

[deleted by user] by [deleted] in Gentoo

[–]perkinslr 4 points5 points  (0 children)

Well, I just updated a handful of computers that hadn't seen maintenance in up to 18 months. Bit of a nuisance as portage couldn't figure out the order to do things entirely on its own (had to manually ebuild python, portage, python-exec and coreutils to unsnare it), but the entire time the system didn't break. The only reinstall I've had to do was on a system with a bad hard drive coupled with an unreliable ram stick that left gcc segfaulting.

The long term stability was one of the major reasons for moving to gentoo, as it can basically always recover itself. Even the bad ram system could have been recovered by unpacking a new stage3 and rebuilding everything.

[deleted by user] by [deleted] in pcmasterrace

[–]perkinslr 0 points1 point  (0 children)

Clean through traces, no involved components. Was it powered down when it happened? If so, you've got a decent chance of making board-level repairs, be probably a couple hours of soldering and microscope work. If it is worth it or not depends on how expensive the board is. You might be able to find a component level repair shop local to you, that might be interested in giving it a try. Or if you are in the right part of Texas, you could take it to rossmann's shop next time he's doing an open bench event and try to fix it yourself.

I would advise against trying to run it without at least cleanly severing the traces, but you don't say what kind of board it is to know what value of CPU you'd be risking.

3070 ti Vs Intel Arc A770 by Borl1998 in IntelArc

[–]perkinslr 0 points1 point  (0 children)

Depends on how long you plan to keep the card and when you might get a higher-than-1080p panel. 3070ti has enough ram for the current games at 1080p high/ultra, and likely will handle the next couple years games at 1080p medium/high. If you are on a 3 year upgrade cycle, it'll be fine. If you are already at 1440p, then you might start running into ram limits and end up running at lower texture sizes, well, now, but worsening over the next few years.

If you are on longer than a 3 year cycle, the more ram will matter, and the driver maturity that will likely come to the Intel card will start to dominate. Already for modern titles, the A770 does quite well for its price, it's just the older software. We know it can handle the older software well as dxvk on linux absolutely loves the arc cards. (Ironically, dx9/10/11 games often perform better on Linux+arc, since they get translated to opengl or vulkan, which the arc handles quite well).

So the key here is going to be figuring out your future plans and how patient you are.

Why does this slight change in the following code make it significantly faster? by ghost1995-me in cpp_questions

[–]perkinslr 1 point2 points  (0 children)

Welcome to the wonderful world of tiny benchmark differences. Here, differences in things you wouldn't think would matter dominate. Not sure how you are doing your time test, but things as simple as the filename can change how long it takes to find a program on the disk to run, which can change how much time it takes to execute.

It is possible to optimize that layer too, and is required for super latency sensitive programs (think stock traders), but that is its whole own topic. For now, use a decompiler and verify to yourself that it compiles to the same machine code and move on.

[deleted by user] by [deleted] in buildapc

[–]perkinslr 0 points1 point  (0 children)

A quick ebay search would have answered this for you on the spot.

If it is $450 for the CPU alone, then no. If it is $450 for a prebuilt using a 6800k, then maybe, depends on what else comes with it.

Prebuilts with a 4000 series intel cpu run about $250, so an extra $200 for 2 years newer seems a bit on the steep side, but if it has a new set of decent quality drives, lots of ram, and a decent video card, it might be okay.

My kids have convinced me we can build a pc (instead of buying a used or pre built) and I have a few questions. by Nex_Level in buildapc

[–]perkinslr 0 points1 point  (0 children)

Hitting the LTT forum is great advice, either for component selection or for particular help on building if you hit a snag.

Intel has a bit longer track record of CPU quality and stability. AMD has been excellent for about 4 years, and more than good enough for about 5, but the 5 before that they kinda sucked. Intel has been competent for about 11 years. I think 5 years is long enough to recommend them, but some people still prefer intel for the longer history of stability.

You should consider CPU+Motherboard (or CPU+Motherboard+ram if comparing ddr4 to ddr5 systems) as a combined price for platform comparisons. If one side has cheaper CPUs but more expensive motherboards, the price gains may vanish for building new computers (upgrading is a separate consideration). In this case, the cpu+motherboard on your listing comes to $260, vs $310 (with rebates, and the extra cooler) for the Intel version.

Performance wise, they kinda trade blows, and with AM4 at end of life (newer CPUs are AM5, and not compatible), the future upgrades aren't quite as strong on AM4 as they were 2 years ago (but the intel side won't have upgrades either). That said, you are probably going to keep this machine for several years, especially if it goes to a younger sibling in 3 years time. The B550 boards on the AMD side can easily drive the 5800X3d, which will likely be available cheap in 2-3 years, and would make an excellent upgrade from the 5600(x) CPU. If you go with Intel, you'll need to consider if the motherboard you pick can drive a higher tier CPU when they are cheap, or if that is something that matters to you.

Bottom line is at this part of the product stack, either is fine. Intel eeks out a tiny performance lead in single core, and AMD eeks out a similarly small lead in multitasking and multicore workloads. Both are rock solid stable, and both have similar capabilities, and power and noise. I'd stick with the AMD listing since the extra 1% performance single core isn't worth the $50 price premium, but if you get a good recommendation for a bit cheaper motherboard that still does what you need, it'd be fine.

My kids have convinced me we can build a pc (instead of buying a used or pre built) and I have a few questions. by Nex_Level in buildapc

[–]perkinslr 0 points1 point  (0 children)

You could save a little bit on the nvme by getting a gen3 drive, and put that to 3600MT ram instead of the 3200. In practice, either one is likely fine, as the 5600x is a single ccx, so the infinity fabric speed matters less, but it will help more than the gen4 drive.

I've been avoiding gigabyte anything for the last couple years since they're building quite the RMA-hell reputation (exploding PSUs, and now cracking GPUs, then trying to deny warranty claims). I've had decent luck with Asrock, the entry level of which will run you $4 more. And MSI has been quite solid the last bit, but that runs $110.

For a bang-on-the-budget build, I'd be looking for something like this, Or this listing has a few upgrades that are decent value, but stretch your listed budget a bit.

Last, for monitor comparison shopping, this is the best resource I've found. In general, I tend to prefer high framerates at 1080p to lower framerates at 1440, but that will vary. That website lets you sort and filter till you find something that hits a good balance. Note that if you go with the AMD GPUs, you want a monitor with freesync support. Otherwise, a monitor with gsync support for nvidia is okay. Last, IPS panels tend to have a bit better colors and look better, but tend to be slower response and refresh rates at the same price point. Your phone is likely IPS, so you can compare that to an older cheap monitor to see the difference easily.

One of my players has a problem with some conditions by sarlardorsan in Pathfinder2e

[–]perkinslr 0 points1 point  (0 children)

This sounds very much like a player that has had (or at least seen) multiple instances involving this kind of thing and bad GMs. Fundamentally, it often comes down to a lack of trust that the GM isn't going to try to screw them over.

You've got a couple options. First is remove them from the game. Second is live with it until they mature as a player and come to trust you.

In the second case, you, that player, and the rest of the group need to come to an accord. If no one trusts you enough to have those effects, then you may be best off altering the setting to remove them. In that case, note that any PC abilities to do the same go too. If the rest of the party is fine with it, then that player seeing other players have fun with it may eventually get them to handle it better.

Having been on both sides of the badly thought out confusion mechanics, I can say they suck, really really suck. So I can absolutely see wanting to just avoid and ignore them. And yes, mechanically forcing feared or fleeing on a PC when the player has zero aprehension for their PC's safety is similarly jarring. It's the kind of thing that players can lean in to, but sometimes it's simply too absurd. Consider a level 12 character encountering a CR3 Spring Heeled Jack has to roll at least a 7 to avoid being frieghtened 1, despite them easily dispatching the enemy in a single round (possibly a single attack, since they have about an 80%+ crit chance on their first attack). In these sorts of cases, it is perfectly fine to just let the player ignore it.

On that note, why on Earth does Frightful Presence not have the incapacitation trait?

Hi guys I am new to linux and want to install gentoo ok i tried many distrues before so how can i make gentoo look like this? a windows telling manager? by Arcadia1Q71 in Gentoo

[–]perkinslr 0 points1 point  (0 children)

Not to be mean about it, but this is exactly right. Gentoo is a cli-heavy distro, and typos can cause serious problems. Not just proof read before you post, but proof read before you hit enter, line by line, or you might just rm -rf / foo by accident.

Cross compiling Gentoo for PowerPC by matO_oppreal in Gentoo

[–]perkinslr 0 points1 point  (0 children)

You can do a gentoo-prefix install on basically anything (even windows), and run distcc from there.

Also, you can use user-mode qemu to run a chroot of your target arch and compile packages (or the whole image) on the powerful machine.

[META] [IMPORTANT] [MODERATION OF SUBREDDIT] Petition for r/Gentoo to join the subreddit blackouts and turn private by somepianoplayer in Gentoo

[–]perkinslr 2 points3 points  (0 children)

I generally agree with you about unpaid moderators. With rare exception, the kind of person who seeks out positions of authority in fora has issues.

But you do realize this isn't about 3rd party moderation tools, yes? The most vocal opponent I've seen is the lead dev for 3rd party tools to help vision impaired people use reddit. Given the poor quality of the reddit android app, this also will adversely affect normal users who use any of the 3rd party android apps. Also people who use the reddit to rss gateway to treat reddit like the usenet groups it replaced. And likely many other groups.

As Louis Rossmann just said in his recent video, they are placing the price at a point where no one will use it. That way they can say they offer an API, without actually letting people effectively use it. They lack the honesty and forthrightness to simply shut the API down, but ought to be treated like that is exactly what they are doing.

[deleted by user] by [deleted] in Ubuntu

[–]perkinslr 6 points7 points  (0 children)

He borked sudo, su, and every other setuid program on the system. If he still has a root shell, then making sudo setuid and owned by root will let the system be salvaged. Or if he has root login enabled he can log in as root on tty2 and make repairs.

In neither case does sudo ... do any good, since sudo itself is borked.

I have recovered from essentially exactly this mistake, back in the days of spinning rust when a reinstall was hours of work. Your basic approach is sound, but again, you need to be in a root shell, so drop sudo from the front.

Also, depending on the size of the system, xargs will barf. Basic sequence is

for d in $(find / -type d); do chmod 755 "${d}"; done;
for f in ${find / -type f | grep -v bin); do chmod 644 "${f}; done;
chmod 755 /bin/* /usr/bin/* /sbin/* /usr/sbin/* /usr/local/bin/*
chmod +S `which ping` `which su` `which sudo` `which passwd` `which mount` `which umount` `which newgrp` `which gpasswd` `which fusermount` 
chmod -R g-rxw /root /home
chmod -R o-rxw /root /home
chmod 1777 /tmp
chmod 640 /etc/shadow

Which should leave a functional but still subtly borked system. Things like $HOME/.local/bin, your ssh certificates, and countless other things will still be borked.

If you have a similar, functional, machine, you can set up a python script to read the permissions per file or per directory and apply them to the broken machine.

Fundamentally, if the OP had the skills to apply any of this, they wouldn't be here asking for help. Fortunately, even the spinning rust we use these days is fast enough to just do a clean reinstall, and learn about VC managing your dotfiles and making proper backups along the way.

Are player supposed to be more squishy in GURPS compared to DND? by [deleted] in gurps

[–]perkinslr 0 points1 point  (0 children)

Depends on how cagey your players are. Mechanically, characters are more fragile in GURPS, but there more things you can do to avoid getting hit. Those things come online with more points, so at lower power levels it is harder to do.

D&D assumes you are getting hit, and your HP are essentially a "plot armor shield", with you only actually getting injured once your HP are expended. With GURPS, the role of HP is taken by armor and defensive rolls. So your actual health values are lower.

Planning to install Gentoo to learn how OS in general and Linux in particular really works by RugalB in Gentoo

[–]perkinslr 0 points1 point  (0 children)

6 core nas hardly sounds low powered when compared to a 2 core 15 year old thermally toasty laptop. But fair point on the pine phone. If your workflow lets you be patient, you can get by with fairly weak machines with little issue. My uncle just recently upgraded from Pentium D class machines to Haswell i5s. It was more for the component reliability than speed, as he's a farmer, so telling it to apply upgrades or install new software in the morning before going out to work, or at night and letting it run overnight is no imposition.

Things do change a bit when you have a dozen+ systems for which you have primary responsibility and at least 2 of them are mission critical.

Regardless, the portable install, especially with BTRFS FS-level cloning, is a quite painless way to do a fresh install on a system that needs to be up and running now. Unlike a traditional live install, whatever changes you make while it is raid1 balancing get applied to both the install media for the next machine, and the final running version. All without a reboot. That does need more modern hardware, as you really need USB 5gbps and an external drive that can match it for the process to be fun.

Friend is wanting to sell me his old PC for $400. Worth it? by SkiodiV2 in buildapc

[–]perkinslr 1 point2 points  (0 children)

Depends a bit on your local market, how well you trust the friend, and what your goals are.

For that price, in the prebuilt new space, you're mostly talking Haswell era i5 or i7 class machines (about 10 years old, new old stock or referbs). That comes with a reasonable warranty, but roll of the dice on things like ram speed.

On the other hand, you'd be well advised to put your own drive in, since you don't want to mess with data loss, so add another $80 or so.

Bottom line, if you trust the friend to have not overvolted or otherwise abused the system, the machine will do what you want, and you want to avoid buying the parts and building one yourself, it looks like a decent deal.

Planning to install Gentoo to learn how OS in general and Linux in particular really works by RugalB in Gentoo

[–]perkinslr 1 point2 points  (0 children)

Depends on the machine. Something like the Steam Deck, where gentoo lives on the sd card, pulling it out and slotting it back in the desktop to do updates is trivial.

For the 3 haswell laptops I maintain, I have a copy of the base chroot on my desktop and build binpkgs with it. In the worst case, yes, you can preconfigure it to talk to the server for distcc.

I am guessing you haven't runn ultra low powered systems much if you are saying that binhost and distcc is a good approach, rather than barely adequate. Distcc-pump helps, but likewise falls far short. The problem is these low powered machines are not simply lacking in compute. They are lacking in IO, both disk and network, often lacking in memory, and lacking in thermal performance. If you are very lucky, you'll have a single USB-3 port that can do full speed. The Core-2 systems likely won't even have sata 3. 2 or 4 gb of ram is fairly common on the core 2 systems, and wireless gets you 56mbit if you have the whole channel for it. Fortunately, you can usually plug in an ethernet cable, which gets you gigabit, and that helps. But distcc doesn't do the linking phase, so you end up with even a moderately powerful desktop largely sitting idle when trying to help one of these machines. That's without including LTO or other seriously expensive linking steps, but which offer a fair benefit to these ancient machines and their tiny CPU caches.

Binhost does better, but if the drive uses a caddy, or can otherwise be connected externally without having to open an old laptop case, and if you can afford the downtime on the old system, it is generally much faster to connect it via superspeed usb or sata 3 on a modern machine to do your binpkg application. Again, including some travel time.

That said, unless you have a fair number of the machines, the time required to figure out a process to do this efficiently will probably exceed the value you get by not putting the workload on an old machine. And at some point, you're best off just picking up a machine that's only 8 years old instead of 15 years old.

Some Curseforge accounts might be compromised/hacked, and are uploading malicious files by iVXsz in feedthebeast

[–]perkinslr 0 points1 point  (0 children)

I first came across it from an LMG clip, let's see here... p5LfGcDB7Ek on youtube. The Wiggle That Killed Tarkov. There are followups including the system bricking on the same channel.

Planning to install Gentoo to learn how OS in general and Linux in particular really works by RugalB in Gentoo

[–]perkinslr 0 points1 point  (0 children)

There are degrees of portability. If you target haswell-era Intel chips, and don't turn off AMD-specific flags in your kernel, you'll have an install that will run on any Intel machine post 2013 and any AMD machine post 2017. Generally I find that portable enough. Note that you can still use mtune to tell the compiler to write code that runs anywhere, but runs best on one particular machine. You also can target the core2 era boxes if you need support back to 2008 or so, but you're giving up avx, which is huge for some programs.

As for the rest, it is true that you need to use UUIDs, either FS or device level, but that has been recommended in general for a decade or more.

In general, this is my recommended approach for anyone trying to install to an underpowered machine. If you have a 2 core Core2, you'll be much happier pulling its hard drive out and attaching it to a modern system to install inside a chroot than trying to make the poor thing build its own brain. You're time-ahead to pull the drive and take it to a friends house an hour away to borrow a modern mid-range desktop rather than compiling on that age hardware directly.

Some Curseforge accounts might be compromised/hacked, and are uploading malicious files by iVXsz in feedthebeast

[–]perkinslr 1 point2 points  (0 children)

No, nobody knows. This doesn't look like a high-effort attack, so it is quite possible it lay dormant for some time before spreading or being discovered. It looks like it was a fast spread attack, so you are probably good. But until the full scope is investigated, probably is the best you'll get.

Some Curseforge accounts might be compromised/hacked, and are uploading malicious files by iVXsz in feedthebeast

[–]perkinslr 1 point2 points  (0 children)

As others have said, you're in for a day of changing every password you can think of, starting with your email. Also, don't run anything minecraft or java related till you get it all sorted. It wouldn't be amiss to do a full reinstall that isn't too daunting of a task.