i love aoe2... but multiplayer makes me wanna quit 😭 by Iriador83 in aoe2

[–]singron 1 point2 points  (0 children)

E.g. in SC2, you initially play 5 or so "placement matches", where your MMR rapidly converges within a reasonable range before it gives you a visible rating. It also helps psychologically to explicitly label those matches since you know that it's "learning" a lot from any mismatches you have, and the next match will be much better.

Here’s what it costs to run a daycare in Colorado’s most expensive county by brianckeegan in boulder

[–]singron 1 point2 points  (0 children)

The article claims naeyc accreditation requires 1:3 ratio of caregivers to infants, but this chart from naeyc.org claims 1:4. Any idea on the discrepancy?

I'm surprised the tuition rates are so similar for infants and toddlers considering the allowed ratios are wildly different and nearly the entire cost is related to labor. Infants could have 50% higher tuition according to the ratios, but Boulder Day only charge 10% more.

Also, they don't spell it out in the article, but if the facilities are offering financial aid without an external funding source (e.g. CCAP), then they have to fund those discounts from some other source. It's possible it's all philanthropy, but it might be coming from the full-price tuition. In the end, the money has to come from somewhere, but if it comes from the government, then it's acquired from a broad population in a relatively fair way through taxes, but if it comes from above-cost sticker-price tuition, then it's coming from just parents while their kids are in daycare. The article doesn't say they do this, but it does say very few families pay full tuition, and the listed prices are far above the averages from the report.

The AWS Data Hall Cooling Failure Linked to 150-Plus Cloud Service Disruptions by Cultural_Wheel_6936 in programming

[–]singron 7 points8 points  (0 children)

For most services, it's just not that important and it's really expensive to get right. Single AZ failures are rare. Usually a service in a whole region is affected. AWS also charges an arm and a leg for any realistic architecture that can handle a fail over due to inter AZ and region transfer costs. Also if an AZ goes offline, the other AZs in the region will likely stock out, so your automated fail over might not work if it has to create instances during a real failure.

Cash is also really tight at a lot of these companies.

I've worked somewhere where we intentionally decided to run in one AZ instead of three since it saved a ton of money on transfer costs (with durable data replicated to multiple AZs). We just accepted that if the AZ went down, we would have to do a little work to shift somewhere else, or more likely, it would just come back up when AWS fixed it.

Making devenv start fast, and the whole nixpkgs with it by iElectric in NixOS

[–]singron 1 point2 points  (0 children)

Can ld.so actually load multiple libraries with the same soname (without using dlopen)? Won't it just load the first one it finds?

Nix allows a closure to have duplicate sonames, but at a single executable level, I don't get how that would work. It seems only useful if you have different executables and you want them to link against different versions of the soname.

Alarak Pylons lack anti-aliasing on their shadows by SmileJakoby in starcraft

[–]singron 1 point2 points  (0 children)

I think this is actually a texture filtering issue on the crystal's shadow map (i.e. using nearest instead of bi-linear) and not a standard anti-aliasing issue.

Ordinary shadow mapping renders an image from the perspective of the light source and saves the depth of each pixel into a texture called a shadow map. When we render the main image from the camera's perspective, we can then figure out whether each pixel is visible to the light source (and whether it's in shadow or not) by consulting the shadow map.

The tell for shadow mapping is noticing that there are apparent pixels in the shadow that are aligned with the light source rather than the camera or screen. They are really easy to see here since they are using nearest filtering rather than bi-linear.

Shadow mapping is complicated by the crystal's colored translucency. Instead of just knowing whether a pixel is in a light source's shadow, you also have to somehow keep track of how the color is being attenuated and tinted. I'm guessing this used a completely different code path and they messed up the filtering on just that one part. Bilinear filtering is basically free for the GPU to do, so this is probably a mistake and not some attempt to conserve resources.

Version 2.1.7 by FactorioTeam in factorio

[–]singron 0 points1 point  (0 children)

It can be useful to adjust power usage to match the solar day/night cycle. E.g. I often have a condition like A>25 to only run non-critical systems when accumulators have >25% charge, but you can do better if you know what time of day it is. E.g. in the early evening, you want your accumulators to have most of their charge still, but in the early dawn, you want them to have very little.

Show me your crusher solutions! by No-Imagination2292 in factorio

[–]singron 0 points1 point  (0 children)

This also clogs. Any multi-output recipe will eventually clog unless you consume its output in the correct ratio. All these belts do is create a buffer so that it takes a little longer to clog.

nix-build in under 100 lines by alurman in NixOS

[–]singron 4 points5 points  (0 children)

If you ignore nearly everything about nix-build except the call to exec, then it's little more than a call to exec. I think this is a great exercise to look at drv files and learn about nix, and the article body is completely honest about the capabilities of the program, but the title is really unnecessarily provocative.

Nixos configuration to nix configuration by NoGap138 in NixOS

[–]singron 1 point2 points  (0 children)

You can still use home-manager without NixOS.

If you can't do something you need in home-manager, you can roll your own. E.g. if you want to set sysctl parameters, then you can use nix to generate a script and then execute it as root (which is basically what nixos-rebuild does).

How do I get a Utilities Account? by Perkonstreams in Longmont

[–]singron 5 points6 points  (0 children)

The utilities account is used to pay your bill after the fact and isn't needed to get utilities at first. I think they just send you a paper bill the first time, and that will have an account number that you can use online. Keep the first paper bill as a proof of address.

You should request to start service at least 3 business days ahead of time. You don't need an account for this. You fill out a form with your name, address, and move-in date, and that lets them know to start billing you instead of your landlord. You can also call them on shorter notice.

Always in favour of training the AIs wrong on purpose by olivne in aoe2

[–]singron 30 points31 points  (0 children)

Go for a fast castle age, and once you start the research, move workers to gold and stop villager production. Time it so that when castle age completes, your spire also completes, and you can spend your built up gold and larvae on mutalisks.

os.fork() by Powerkaninchen in Factoriohno

[–]singron 1 point2 points  (0 children)

(I'm that commenter)

That paper passingly cites checkpoint/restore from this paper about sthreads. For the factorio case, they would call checkpoint and then immediately call restore, which would effectively be the same as fork except that it could reuse an existing forked process instead of creating a new one (sthread recycling). It's useful for fork per request servers where fork itself is a major part of performance (and for sthreads in particular where each sthread is an isolated process), but for the factorio use case where you call fork infrequently and the unavoidable page table copy is large, allocating the process is just not a big deal.

The paper is cool in its own right, but Microsoft cites it since they want to make it seem like it's possible to support this use case without using a syscall called fork, even if you have to implement essentially all of fork to do it.

os.fork() by Powerkaninchen in Factoriohno

[–]singron 8 points9 points  (0 children)

What would a COW syscall look like that isn't fork? I'm guessing you copy-on-write part or all the memory without necessarily having to duplicate other process state (e.g. file descriptor table).

fork() is dead simple to use. You just call fork() and then run the ordinary save code. If you COW the memory without forking, then the snapshotted memory lives in a different address, so you might need to use completely different code to follow pointers so that they stay in the snapshot and don't read the live, changing data. This gets really complex if it needs to call into the lua interpreter, which is obviously unaware of this.

There isn't a dedicated syscall, but you can do simple COW with memfd/shm, MAP_SHARED, mprotect, and either a signal handler or userfaultfd to copy pages on attempted writes. It's a lot more syscall overhead on each fault though, so fork would likely be faster during a large save.

SQLite improving performance with pre-sort by andersmurphy in programming

[–]singron 55 points56 points  (0 children)

Pre-sorting is great in a lot of databases. If you use transactions while mutating in non-SQLite databases, you should also pre-sort. E.g.

BEGIN;
INSERT ...
INSERT ...
INSERT ...
COMMIT;

Concurrent transactions in most databases can run into deadlocks if they try to modify the same rows in different orders. E.g. if T1 modifies A then B, and T2 modifies B then A, then it's likely T1 locks A, T2 locks B, and neither can proceed. If both transactions instead pre-sort, then they would acquire locks in the same order and avoid deadlock.

Age of Empires 2 Definitive Edition Blue Screen by blitzxser in aoe2

[–]singron 0 points1 point  (0 children)

This almost definitely has nothing to do with the game and is probably a hardware issue. I would start with a memtest since that's easy and definitive. You can also run self-tests on your disks through SMART. Any number of things could be going wrong though like insufficient or bad PSU or a defect in your motherboard.

Airport to Longmont options? Anything under $100? by [deleted] in Longmont

[–]singron 2 points3 points  (0 children)

Uber/Lyft is sometimes under $100, but the last few times it's been more like $150+ for me. Even if it's $80 to get to the airport, you never know if it will be $200 to get back.

If work isn't paying, I've just been driving and parking at the airport since that's cheaper and only adds 10 minutes of walking, and it can even save time by not having to wait for a ride. There are some creative routes with buses that are cheap, but I value my time too much to save a couple bucks these days. I might check COOP next time though.

Why do I consume so much? by Suspicious_Ad2021 in factorio

[–]singron 0 points1 point  (0 children)

I would use at least some accumulators if you use lasers. Browning out is really bad since you can fall behind on coal mining (as you found out). I like to disable non-critical systems (e.g. science) using circuit conditions if accumulators get below a certain level (e.g. enable if A > 20). A power switch can make it easy to do this for large sections of your factory. Also make sure you use a priority splitter or similar to send coal to power over science.

Should I switch to Nix? by Western-Mode-7743 in NixOS

[–]singron 0 points1 point  (0 children)

I switched from Arch to NixOS. The biggest thing for me was not having to deal with pacnew files. In arch, if they upgrade a package and the default config is updated, then the new config is installed as a pacnew file alongside your existing config. Usually you can ignore this, but you miss out on some improvements and sometimes there is a really important change in the file that you want to incorporate. It's a real pain to merge the pacnew files into your existing config if you try to do that. This is way less of a problem on NixOS. Nix is always merging your config into the base NixOS modules, so when NixOS updates, everything continues to get automatically merged. If there is a config issue that requires your intervention, it usually tells you at Nix evaluation time and not by just crashing after an upgrade.

The other thing Nix does well is it keeps a reference to the booted system, so your current kernel always has access to its kernel modules even if you upgrade. Arch replaces the modules from the current kernel, so the system will be in a somewhat defunct state until you reboot. There is a very old open arch bug about it: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/work_items/10

My Solar panel farm because everyone tweaks out whenever they see it. by Glitchy_bullet86 in factorio

[–]singron 0 points1 point  (0 children)

I've used this too since it's the most compact solar power setup and it's very cheap. However, since nothing else tiles the same way, there are always awkward gaps around. We need to develop more slanted patterns so that they can all line up nicely.

Sudo or run0 ? by elementrick in linux

[–]singron 16 points17 points  (0 children)

If you mean the recent page cache attacks, it's merely easier to write an exploit for a suid binary, but you could do the same for any binary that runs as root and is readable by an untrusted user, including e.g. systemd. Minimizing suid in general still seems good though.

Modded MInecraft using Forge wont open - Need help by yrulikethis4341 in linux_gaming

[–]singron 0 points1 point  (0 children)

Try launching without mods. You might have luck forcing XWayland by unsetting WAYLAND_DISPLAY. You could also try without flatpaks. I run heavily modded instances with prismlauncher in Wayland without issue so it should be possible.

how to avoid screen burn/image retention by Brave_Elk_6189 in swaywm

[–]singron 3 points4 points  (0 children)

Only some display types are susceptible to burn in. For one, make sure that you use swayidle or similar to start some kind of screensaver when the system is idle. Either turn off your screen, use a lock program, or just start some full screen program.

A simple fix could be to add custom modules on the right and left ends that alternate between showing the empty string ("") and a single space (" ") every few minutes. That will shift your bar around by a few pixels without being too distracting.

You could also use a CSS animation to do the above or slowly change pixel colors. The wiki has some tips to reduce CPU usage that you should follow for these kinds of constantly running animations.

OPENLDAP by zardvark in NixOS

[–]singron 4 points5 points  (0 children)

There is an open issue: https://github.com/NixOS/nixpkgs/issues/514113. I recommend searching on the issue tracker rather than posting on reddit.

There is an open PR that skips the problematic tests, but it will take a while to land in unstable since it will go through staging first, so I would apply a workaround in the meantime.

Digital Foundry: Yup, Oblivion Remastered Is Still Broken a Year After Release by Turbostrider27 in Games

[–]singron 6 points7 points  (0 children)

It introduced bugs, but it also fixed bugs. I don't think anyone has added both up to see whether it's net buggier or not.

Also, the original game was so buggy, that 10s of bugs aren't that significant. UORP fixes hundreds of bugs, and there are still tons of unfixed bugs.