I think the problems there are exacerbated a lot by over-eager type coercion and other crappy design decisions inherited from almost 30 years ago
but sometimes “👍🏽”.reverse() == “🏽👍”
the thing where it actually helps is if you’re “one word speed reading” (eg. http://onewordreader.com/). Then it’s easier to rapidly focus your eyes on each word, without having to follow a rigid timer. But if you’re reading normally it probably doesn’t help
A key part of visual design is knowing that the users don’t know what’s best for themselves. They usually stop complaining after 3 months which is proof that you are correct and they are wrong!
(sarcasm rate: 1 - ε)
many words should run into the same issue, since LLMs generally use less tokens per word than there are letters in the word. So they don’t have direct access to the letters composing the word, and have to go off indirect associations between “strawberry” and the letter “R”
duckassist seems to get most right but it claimed “ouroboros” contains 3 o’s and “phrasebook” contains one c.
are you sure there isn’t small print somewhere saying you forfeit your eternal soul to larry ellison?
is-number is a one-line function. (though it’s debatable if a function that complex should be compressed to one line)
You may have heard of a similar if more extreme “microdependency” called is-even. When you use an NPM package, you also need all the dependencies of that package, and the dependencies of those dependencies recursively. Each package has some overhead, eventually leading to this moment in time.
I tried to edit the ‘highlights’ into a single image, the top is the description of the PR, the middle is a comment replying to another comment
more accurately, average person has a higher tolerance for bullshit than for spending many hours learning something new or spending potentially years applying for citizenship in another country
C++ is std::__cxx11::list, std::allocator > >::erase(std::_List_const_iterator >) /usr/include/c++/12/bits/list.tcc:158
your underflow error is someone’s underflow feature (hopefully with -fwrapv)
that works for 2 word names eg is_open or is_file, but in this case is_dialog_file_open is structured like a question, while dialog_file_is_open is structured like a statement
as many iterations as it takes
void* x = &x;
char* ptr = (char*)&x;
while (1) {
printf("%d\n", (unsigned int)*ptr);
ptr--;
}
Considering this was written in 2001, I’m not all that worried
yeah rust along other new languages takes package management (and some other “hard learned lessons”) seriously, which gives it an advantage over most older languages (and it’s ahead other newer languages in that there is a serious amount of adoption for rust… a package manager that has no packages to manage is not very useful)
You can, of course. And if you’re good enough at it, and focus on keeping it simple, you can keep the complexity down to a minimum, at least with most straightforward programs.
Buut you can say the same about other complicated languages like c++. And things like writing quick “shell script” type things are going to be pretty simple in almost every decent language. Even if the result is slightly more verbose it won’t really matter.
eh, I’d say rust’s problem is more that it’s marketed as a general-purpose language, when in reality it is rare for software to need a language that is both very highly performant and memory safe, and rust makes heavy sacrifices in terms of complexity to achieve that. Most popular languages are garbage collected which can cause performance problems, but makes code much simpler to read and write.
found a few examples of how to do it on a github issue:
var script = GDScript.new()
script.source_code = "func say_hello():\n\tprint(\"Hello!\")"
script.reload()
var script_instance = script.new()
script_instance.call("say_hello")
var MyClass = load("myclass.gd")
var instance = MyClass.new()
assert(instance.get_script() == MyClass)
slow inverse square root:
float slowinvsqrt(float x)
{
const long accuracy = 100000000; // larger number = better accuracy
if (x <= 0.0f) {
return NAN;
}
if (x == 1.0f) {
return 1.0f;
}
if (x < 1.0f) {
return 1.0f / slowinvsqrt(1.0f/x);
}
int max_power = log(accuracy) / log(x);
long pow1 = pow(x, max_power - 1);
long pow2 = pow(x, max_power);
double current = 1.0;
double previous = 1.0;
for (long i = 0; i<10*accuracy; i++) {
current = sin(current);
if (i == pow1) {
previous = current;
}
if (i == pow2) {
return current / previous;
}
}
}
bonus points if you’re using a statically typed language but the library uses extensive metaprogramming seemingly for the sole purpose of hiding what types you actually need