• 0 Posts
  • 32 Comments
Joined 1 year ago
cake
Cake day: December 26th, 2023

help-circle

  • I’ve used it a fair amount for memory mapped IO where the hardware defined bitfields. It is also useful when you have a data format with bitfields. I’d say it is also useful when your data does not respect byte boundaries, but the only time I’ve run into that involved the bit order being “backwards”, which means that I still had to bittwidle things back together.

    From a performance perspective, a cache line is only 64 bytes. Space in registers, low level memory caches, and memory throughout are all limited as well.



  • I’ve had a couple of issues like this:

    • Wireless mouse has a flaky connection. Turns out the issue was the USB port it was plugged into (probably RF interference as other devices worked fine on that port)

    • We had a couple of radio receivers in a server rack. The scale of the project had shrunk over the years, so what used to fill up 2 racks now only half filled them (mostly because of upgraded components becoming faster and smaller over the years). Another project needed needed some rackspace, so we reracked everything into a single rack. When we were done, we found that one of our receivers couldn’t get a signal, and another would lose it regularly. Checked over all of our connections and the antennas, but everything seemed normal. Turns out something in the other project was blasting out RF interference.

    • We would occasionally need to manually move data on/off a server using a USB2.0 hard drive. This worked fine for years, until one day we had a server that would randomly disconnect from the drive a few seconds into the transfer. Tried different ports, same issue. The drive itself worked with all the others, so we decided the issue must be with the server. We swapped it out for a brand new one with plans to send the old one back for warranty repairs. Except the new one has the exact same issue. Both servers came from a newish batch from the OEM. Turns out that the earlier versions had a hardware “bug” where the USB ports would source more than the 500ma allowed by the spec. Since they fixed that, our drive would trigger the current limit during sustained use and temporarily depower the port. Solution: get a USB Y cable and power provider power from a wall block

    • I had a mouse that would double click (or more) when you pushed the button. This was pretty obviously a hardware issue, but I figured I could just tell the computer to ignore double clicks that happened “too fast” and avoid needing a new mouse. In theory that should have worked, but the input stack on Linux turned out to be a giant web that I couldn’t figure out, so I ended up opening the mouse and soldering on a random capacitor I had lieing around.

    • We had a laptop with a dead monitor that would mysteriously work at times. It turns out that most of the time, it was sitting on another laptop (of the same type). Those laptops had a magnet latch to hold them shut. It turns out that said magnet also was used as part of a “laptop closed” sensor that would disable the monitor, and the bottom laptop would trigger the sensor in the top one.


  • Interested to see how this plays out.

    Prohibiting Holocaust denial is relatively easy, because we have the benefit of it being history, and we have an ample historical record and a clear consensus among historians. Plus, no one can credibly claim that the legislatures were not thinking of the Holocaust when they wrote the law.

    However, how are they planning on applying the law to contemporary international crimes? People make accusations of them all the time. And the other side always denied them. And the actual facts are generally obscured by a massive fog of war that can take years to see through, if ever.

    There is also plenty of history where the answer is less clear. Do we really want courts involved in determining if the 15th century conquest of the Canary Islands counts as a genocide. Or if some unnamed mass grave an archeologists unearths was caused by an invading army killing all of a city’s adult males, or simply a burial site for fallen soldiers?

    What about the book of Esther. Taken literally, it ends with what is arguably a genocide committed by the Jews against the Persians. However, outside of some Israeli hardliners reinterpreting that ending for contemporary political purposes, it is widely understood that that ending is a literary device, not a literal telling of events. Did my Hebrew school teachers violate this law when they told me we didn’t actually kill 75,000 Persians? [0].

    What about the ongoing genocide against white Afrikaners going on in South Africa today? Am I violating the law when I say that genocide is not real, and just something the rightwing in the US invented for domestic political purposes. If the US has such a law, could Trump use it to jail his political opponents who criticized his recent stunt of accepting 60 Afrikaner refugees?

    Do we defer to an international body like the ICC or ICJ? In that case, you have just outlawed disagreeing with those bodies.

    The UN has repeatedly found it to be a massive human rights violation. Does disagreeing with those findings violate this new law?

    [0] As an aside, secular historians generally consider all of Esther to be fiction.



  • I think the image assumes that the viewer is familiar with merge sort, which is something you will learn in basically every undegraduate CS program, then never use.

    To answer your first question, it helps to have something to compare it against. I think the most obvious way of sorting a list would be “insertion sort”, where you look through the unsorted list, find the smallest element, put that in the sorted list, then repeat for the second smallest element. If the list has N elements, this requires you to loop through it N times. Since every loop involves looking at N elements, this means you end up taking N * N time to sort the list.

    With merge sort, the critical observation is that if you have 2 sublists that are sorted you know the smallest element is at the start of one of the two input lists, so you can skip the inner loop where you would search for the smallest element. The means that each layer in merge sort takes only about N operations. However, each layer halves the number of lists, so you only need about log_2(N) layers, so the entire sort can be done in around N * log(N) time.

    Since NlogN is smaller then N^2, this makes merge sort theoretically better.



  • Be sure to check state law before doing this.

    In Ohia V Miller (2024), Miller was found guilty of operating a vehicle under the influence after he drunkenly drove a horse drawn buggy. This finding was upheld my the appelete court.

    In State v Blowers (1986), the Utah Supreme Court found that riding a horse while intoxicated did not qualify as DUI. This finding had 2 parts: A) A horse is not a vehicle and

    B) The provision:

    Every person riding an animal or driving any animal-drawn vehicle upon a roadway is subject to this chapter, except those provisions which by their nature can have no application.

    Is unconstitutionally vague.

    In the case of Mythbusters v Drunk Driving, the Mybuster found that it is illegal to operate a vehicle while drunk, even on a closed course. However, it is legal for a blind man to operate a vehicle under the direction of a drunk man.



  • homura1650@lemm.eetome_irl@lemmy.worldme_irl
    link
    fedilink
    arrow-up
    6
    ·
    3 months ago

    Or that you are self aware about being bad at punctuality.

    If we are diagnosing people over the Internet based on their memes, my first instinct is to say that OP suffers from time blindness, likely caused by ADHD.

    Not to say that there are not people who are late as a narcissistic power play. But it is far more common for people to simply not be good at being on time.




  • I think what happened here is that something went wrong and messed up the permissions of some of the users files. MS help suggested that he login as an administrator and reatore the intended permissions.

    I don’t work with Windows boxes, but see a similar situation come up often enough on Linux boxes. Typically, the cause is that the user elevated to root (e.g. the administrator account) and did something that probably should have been done from their normal account. Now, root owns some user files and things are a big mess until you go back to root and restore the permissions.

    It use to be that this type of thing was not an issue on single user machines, because the one user had full privileges. The industry has since settled on a model of a single user nachine where the user typically has limited privileges, but can elevate when needed. This protects against a lot of ways a user can accidentally destroy their system.

    Having said that, my understanding of Windows is that in a typical single user setup, you can elevate a single program to admin privileges by right clicking and selecting “run as administrator”, so the advice to login as an administrator may not have been nessasary.



  • Fetlife is not a dating app. They have actively not implemented features such as filter by age/gender in order to avoid becoming a dating app. If you are looking to get involved in your local kink community, Fetlife is the answer [0]. For anything else, it is garbage. If you try using it to get laid, you will just be pissing a bunch of people off.

    [0] At least for my local kink community. Other areas might vary.



  • The Israeli government has no idea what it is doing. Literally. The current government was a barely held together coalition prior to October 7. In the direct aftermath, they formed a unity government and war cabinet that collapsed last week.

    Their prime minister has been indicated on corruption and bribertmy charges, which are currently on hold for obvious reasons. By most indications his primary motivation in this matter is to stay in power himself, with Israel’s national interests being secondary.

    Individual members of IDF leadership have called Israel’s stated objectives “unachievable”.

    Israel simultaneously wants to live in peace as a liberal Jewish state without commiting any form of ethnic clensing; and achieve its manifest destiny of establishing a Jewish theocracy across Judea and Samaria.

    These are deep questions that get to the core of what Israel is and stands for. Questions that are to be answered by the Israeli constitution in the 50s. That never happened because Israel was never able to agree on a constitution [0].

    Right now, Israel is just reacting, without any long term strategic vision. Various factions are trying to use that chaos to advance their own long term vision.

    [0] Which led to the big judicial reform constitutional crisis that was a giant political crisis before October.


  • Because the thing people refer to when they say “linux” is not actually an operating system. It is a family of operating systems built by different groups that are built mostly the same way from mostly the same components (which, themselves are built by separate groups).


  • Blaise Pascal is famous for 2 things:

    1. Pascal’s triangle. This describes how to expand expresions of the form (a+b)^n as well as to compute how many ways there are to pick k objects out of a set of n (ignoring order.

    This triangle is computed by starting with 1 at the tip, then having each element be the some of its 2 parents (except the diagonal edges with only one parent, which remains as 1)

    1. Pascal’s wager. This is a theological argument for a belief in god that goes “if you believe and god doesn’t exist, nothing happens. If you don’t believe and he does exist, you suffer for eternity. The logical choice is therefore to believe”

    The natural conclusion is therefore to believe in all gods. If procelatizing happens in just the right way, and no one realizes people are talking about the same god, you end up with a triangle of polytheists, where the number of gods they believe in is given by Pascal’s triangle.

    Edit: gid -> god


OSZAR »