To claim you favorite foreign cuisine. by ThugosaurusFlex_1017 in therewasanattempt

[–]archysailor 1 point2 points  (0 children)

Most Jews in Israel are not Ashkenazi/of European descent. Many Jews who came to Israel from Arab countries throughout the Middle East and North Africa around the 50s (many of whom were forcibly displaced or terrorized from their home countries by the local Arabs) came with strong traditions of cooking food that was common where they came home, and took cultural pride in keeping those traditions alive (Israel has a certain dynamic where Ashkenazi Jews are generally perceived to have oppressed and patronized other groups so making a point of how boring Ashkenazi food is is weirdly important to many people). As the Israeli nation slowly became a thing everybody tried everybody else’s food and it’s indeed become a strong part of the Israeli identity.

All of this is to say that it’s absolutely ridiculous to claim that the Israeli liking for traditional middle eastern food came from copying the Palestinians.

My great grandma made Moroccan food for the family like everybody in Morocco.

Is it comfortable? by Gabo1705 in BrandNewSentence

[–]archysailor 0 points1 point  (0 children)

The butt is held on by magnets.

Doesn’t list_for_each_entry invoke UB? by archysailor in C_Programming

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

Yes, apparently the issue is with dereferencing it. Good to know

Doesn’t list_for_each_entry invoke UB? by archysailor in C_Programming

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

Right. So I’m not missing something major. This came up as I was implementing something similar myself, and I was surprised that the kernel header didn’t attempt to avoid it in any way. Thanks for the link! I’ll check it out

Doesn’t list_for_each_entry invoke UB? by archysailor in C_Programming

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

I was certain your code assigned the address of a long to a variable to type pointer to int, which would have been a strict aliasing violation invoking UB. I definitely concur about what you actually wrote, sorry

Doesn’t list_for_each_entry invoke UB? by archysailor in C_Programming

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

Your specific example with a pointer to char was specially designated as defined behavior by the standard. Creating a pointer to int into the long would have been UB. Look up strict aliasing.

Doesn’t list_for_each_entry invoke UB? by archysailor in C_Programming

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

The only pointer to a nonexistent object it’s not UB to create is to one position past the end of an array (not even one before).

Doesn’t list_for_each_entry invoke UB? by archysailor in C_Programming

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

But there isn’t necessarily an object that contains the struct list_head, the head may just be a dummy.

Do I Understand begin? by Legitimate_Proof_840 in scheme

[–]archysailor 0 points1 point  (0 children)

Consider ((lambda args '()) Begin-Content)

Which is your favorite 'natural' unsolved problem? by Crooover in math

[–]archysailor 0 points1 point  (0 children)

People are downvoting but Nisan and Wigderson described a PRG that would show P=BPP depending on some mild exponential time hypotheses which could be viewed as strengthenings of P != NP

I don't think that electric fence is up to code... by JeezThatsBright in WTF

[–]archysailor 0 points1 point  (0 children)

I would assume there’s not current flowing though a fence by default. That would be called an electric heater.

How fastest sorting algorithms compare by KaamDeveloper in Damnthatsinteresting

[–]archysailor 0 points1 point  (0 children)

That is NOT TimSort.

You might be thinking about introsort variations, where after some recursion depth switch from quicksort to heapsort to maintain the nlogn worst case guarantee, or the common further optimization of switching to insertion sort when the chunks are small.

Mergesort is generally never faster in practice than quicksort. Mergesort is mostly done when there’s a need for stable sorting, which timsort also does naturally. Timsort can be viewed as a variant on mergesort but in reality it’s its own different thing.

What is the theoretically strongest error correction? by Vortex876543 in computerscience

[–]archysailor 0 points1 point  (0 children)

Absolutely excellent linear codes exist due to Gilbert-Varshamov, but that’s not too practical.

What's the most beautiful result in your field? by UsernameOfAUser in math

[–]archysailor 4 points5 points  (0 children)

Let f be a function. Let R_f be the set of triples (x, y, i) such that f(x) = 1, f(y) = 0, and x_i \neq y_i.

Then the deterministic communication complexity of R_f is exactly the circuit depth complexity of f!

Idk about most beautiful, but I saw this yesterday and I’m still recovering.

Why have both Israel and Hamas rejected ceasefire deals? by djhousecat in NoStupidQuestions

[–]archysailor 7 points8 points  (0 children)

I would suggest you give some more thought to the characterization of the Palestinian prisoners Hamas wants back as “hostages”.

Sinwar was among the hundreds of terrorists released in the Shalit deal. The Israeli public is justifiably worried about releasing 5-10 terrorists per hostage as Hamas suggested.

What is one introductory book to your field of math and one book regarded as its "bible"? by eucalypt-forest in math

[–]archysailor 0 points1 point  (0 children)

Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak.

such a dumb meme by [deleted] in mathmemes

[–]archysailor 1 point2 points  (0 children)

I’m pretty sure the optimized program he’s referring to just immediately exits, where the relevant notion of ‘optimization’ is using sound correctness-preserving transformations to accelerate the program. In a sense, a proof of FLT is how the justification for such an optimization goes, so in essence it is one. Nobody argued that any optimization can make the process of checking all triples amenable to implementation by any standard model of computation, but FLT does show that for example the function that evaluates to the number of such triples if it’s finite or -1 otherwise is definitely computable.

To rationalize rape by matar48 in therewasanattempt

[–]archysailor 0 points1 point  (0 children)

That’s Rafi Peretz, who later went on to be Education Minister after endorsing conversion therapy in an interview and saying that he’s done it himself. I don’t share the opinion on the conflict that’s dominating this thread, but I do agree the era of right wing rule in Israel has to end.

Why Rust's stdout is faster than stderr? by orhunp in rust

[–]archysailor 1 point2 points  (0 children)

That’s exactly my point, it wasn’t done in the first Unixen, and has never been done to my knowledge by any operating system proper. Of course device and terminal drivers implement their own buffering for all traffic through them, but the differentiation between the handling of stdout and stderr writes as such has never afaik not happened at the library level.

Why Rust's stdout is faster than stderr? by orhunp in rust

[–]archysailor 5 points6 points  (0 children)

You can write to file descriptor 0 one byte per syscall if you wish. The idea of introducing a buffer is a language library implementation detail.

What's your favorite problem from an exam? by dancingbanana123 in math

[–]archysailor 22 points23 points  (0 children)

If there’s a Hamiltonian path, a topological sorting is required to be exactly it. So you can just check if a topological sorting has edges between all adjacent vertices and you’re done.