368 karma · joined March 23, 2024
I had no idea about the core 0 issue, so I thank you very much for this information. I'm not sure it makes a difference but I'll change the suggestion.
I wonder if there's some message in here. As a modern American reader, if I believed the story was contemporary, I'd think it's making a point about Christianity substituting honor for destructive greed. That a descendant of the wolves of Odin would worship a Hebrew instead and kill him for a bit of money is quite sad, but I don't think it an inaccurate characterization. There's also the element of resentment towards Odin for not just handing over monetary blessings. That's sad to me as well. Part of me hopes that one day Odin isn't held in such contempt.
> There are- things like flat or hollow earth, antivax and HIV deniers, homeopaths etc. Proponents of all of the above are looking for a grand unifying cosmology. Dark matter and dark energy are confusing and unknown, so people want to just simplify them away.
I think that's pretty uncalled for. To me, positing and exploring alternative views of the universe is a noble and interesting goal, even if the currently accepted answers don't get overturned. The generated ideas might still have other value. Maybe there is a piece of it that's salvageable and can be integrated with other concepts. Or it can inspire future ideas. I think it's pretty uncalled for to lump them in with "flat or hollow earth, antivax and HIV deniers, homeopaths". Do MOND and MOG people make conspiracy YouTube videos about how governments of the world just want you to believe in dark matter and energy to shutter your mind from realizing the truth of their theories? Are they telling people to stop taking chemotherapy and be healed through faith alone instead? Perhaps I'm simply unaware of some nasty behavior, but if not it's pretty rude to lump them in with those other groups.
From my perspective they're engaging in a theoretical pursuit and you're just taking a dump on them.
> If the MOND people and the MOG people keep getting things wrong, they're still free to persevere just as we're free to ignore them.
Are you ignoring them? There are a lot of things I don't pay attention to, MOND/MOG included, but I also don't feel the need to demonize them for getting out of bed in the morning and trying out a new idea. Couldn't you just say, "Interesting concept. I doubt it works out for cosmic background radiation, but would make for a cool Star Trek episode". Or just say nothing?
Why do you have to accuse them of being small-minded, simplistic thinkers who are really just motivated by being too dumb to understand the current meta and not unlike harmful idiots that earnestly believe space is just government propaganda and viruses aren't real?
> people are entitled to
> they're still free to persevere just as we're free to ignore them.
I don't think we were talking about what people should be penalized for by the government, in which case rights and freedoms are primary considerations. We're talking about what things people can do to deserve to be considered unreasonable and be ridiculed, looked down upon, and likely considered harmful to society. I don't think MOND/MOG people qualify.
Ironically, you are positing a grand unifying theory here by stating that detractors from mainstream opinions just want simpler answers. But isn't it simpler to just go with the mainstream opinion and go with the flow? Alternative models of the earth are typically rooted in Biblical or ancient belief systems. Any specific argument based on physics come long after a person's acceptance of, e.g., the Bible. And I can't even imagine how you might think anti-vax beliefs are simpler so I can't speak to that. Homeopathy sounds pretty dumb to me, sure, but also there are tons of reasons to distrust the medical system in the USA, I'd be surprised if anyone seriously argued against that. I can understand why people suspicious of America's medical culture of prescribing 10 medications to someone instead of lifestyle changes might see a bottle of sugar pills at the store labeled with "natural remedy" and think it could be a better alternative.
> Every new observation has completely overturned the predictions of every MOND or modified gravity theory, and they just come back with a totally different explanation to fit the new data.
That's how science works. Scientists are not prophets, they do not have the luxury of starting with all the answers. It's really disheartening to see you make these theories into an "us vs them" ego contest.
I'm guess I'm just a dyed-in-the-wool agnostic, but when I hear someone suggest an alternative theory I don't immediately feel the need to group them with everything I think is wrong with the world. Instead I think, "That's really cool they came up with a different model of the universe. I wonder how they account for everything we observe and how it will be refined over time and whether it will predict new discoveries." Even if your current theory never gets overturned, I think your attitude is a perfect example of why science is said to advance one funeral at a time. Just because they got it wrong in the past doesn't mean they can never get it right, and it doesn't mean there's a 100% certainty that you got it right.
The reverse of this can be true. In the following paper, they found that William's Heap Construction (one by one, O(n log n) time) beat Floyd's Heap Construction (O(n) time) when the input is larger than the size of off-chip cache.
Honestly, I've never really understood why people care so much about portable binaries unless they're running their OS off a thumb drive on multiple different computers. My computer doesn't change instruction sets. And if I did put a new CPU in my computer, I'd want to get new binaries compiled for a more powerful instruction set.
If I were writing it, I would exclusively use the "Prepared Statements" technique, and for people typing in SQL queries by hand, the sole string construct would be as I described.
I'm a Ziguana, so in my design, the number would be "bytes". You would have to "calculate" the number of bytes in languages like Swift or JavaScript. But still, overall it's a better idea to me than turning ' into \' and many other convoluted transformations that are often incorrect and are also just throwing away CPU cycles for no reason whatsoever.
In any case, I would still be semi-offended if I learned that "Prepared Statements" transformed the data in any way whatsoever. In the compromise solution where SQL has a string construct, I want the SQL tokenizer to do this:
if (cur_token.kind == .data) {
// copy data out
@memcpy(
some_buffer,
cur[0..cur_token.value]
);
// skip over the whole thing
// before generating next token
cur = cur[cur_token.value..];
}
Even better if the data is not sent alongside code at all."Prepared statements" sounds EXACTLY like what I was thinking! I don't understand why people would ever use anything else.
SELECT * FROM users WHERE username = [<LEN_OF_TEXT>]raw-text-of-len-not-parsed-at-all
E.g. SELECT * FROM users WHERE username = [21]flyin' and wavin' guy
^^^^^^^^^^^^^^^^^^^^^
these 21 chars are NOT parsed AT ALL, just taken as data
I am not very familiar with SQL so you might need a different prefix but hopefully the idea is obvious.I think the complete opposite! Benchmarking is very difficult to get right and in some situations you couldn't really make a benchmark to test what you're interested in improving. Reading assembly can be objective if you know or look up the instruction latency/throughput of each instruction (or you have a tool provide it) and you can also use loop throughput analyzers (as the other commenter mentioned) that will try to predict the typical throughput for a given loop.
IMO if you get used to looking at assembly it becomes obvious in the majority of cases whether there's performance left on the table.
And "simplicity" does not equal "faster". Although for cold code, reducing its impact on i$ and d$ of the rest of the system is probably smart, so sometimes speed is not the only factor.
https://ics.uci.edu/~eppstein/261/BenFar-LCA-00.pdf
For those who can't read, I recommend this talk about it:
This "manufacturer" is not doing its due diligence in any way, shape, or form. They are the ones who should face jail time for not implementing bare minimum security practices.
The idea that the guy revealing a complete lack of security is committing a crime is like saying a guy informing someone that they're naked is guilty of forcibly stripping that person. Or that telling someone there's a giant red button that drains the landlord's bank account is guilty of pressing it. Maybe they should remove the giant red button?! Or at least put it in a locked room?
``` defer { for (list.items) |str| gpa.free(str); list.deinit(gpa); } ```
When it's spelled out like this, it becomes obvious to the reader that maybe this is the wrong allocation strategy. Maybe the whole thing should go in an Arena. Or, similarly, maybe there should be an ArrayList that holds all the character data that your string ArrayList indexes into with a u32 (or points to with pointers, if you want to update all the pointers on resize). Regardless, I'd be skeptical of code where each string has a separate lifetime even though all the lifetimes could be tied.
Rust makes classic (bad) allocation strategies automatic. Zig makes good allocation strategies more attractive than classic (bad) allocation strategies.
More succinctly: Rust makes bad code safe, Zig makes good code easy.
I guess the whole smartphone thing answers that question far better than a printer...
https://gist.github.com/Validark/457b6db8aa00ded26a6681d4d25...
"Unsafe code Ropey uses unsafe code to help achieve some of its space and performance characteristics. Although effort has been put into keeping the unsafe code compartmentalized and making it correct, please be cautious about using Ropey in software that may face adversarial conditions.
Auditing, fuzzing, etc. of the unsafe code in Ropey is extremely welcome. If you find any unsoundness, please file an issue! Also welcome are recommendations for how to remove any of the unsafe code without introducing significant space or performance regressions, or how to compartmentalize the unsafe code even better."