excessive
Joined 7 years ago
Joined 7 years ago
Brainfuck has 8 ops, 2 of which are for input and output. It's Turing complete, and the operations are super simple, but I'm not sure it's RISC-ish.
88, 89, 8A, 8B, 8C, 8E, A0, A1, A2, A3, B0, B8, C6, C7
This also ignores all of the prefix bytes.After a first pass trying to just wire it directly, I ended up hot gluing a tiny breadboard into the compartment. That went much better and allowed me to swap candidate parts until it was right.
__attribute__ ((format (printf, 1, 2)))
static inline std::string format(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
size_t bytes = vsnprintf(0, 0, fmt, args);
va_end(args);
va_list again;
va_start(again, fmt);
std::string result(bytes, '\0');
vsnprintf(&result[0], bytes + 1, fmt, again);
va_end(again);
return result;
}Frequently, there are higher caliber instructors in colleges than high schools. If your goal is to learn something you don't know, you may have made the wrong choice.
I think public schools do a pretty good job teaching kids to not speak openly with adults.
Well, not every language, but Haxe has you pretty well covered:
https://haxe.org/documentation/introduction/compiler-targets...
I don't want to defend the GIL, but that's not the reason CPython is slow. PyPy can be 100s of times faster, and it has a GIL too.
First some good: Python is amazing for how approachable it is. I've tried to teach (non-programmer, but smart) people I know other simpler programming languages, and it doesn't take. For some reason, when I show them Python it goes so much better. Despite the flaws, Guido and crew clearly got this part right. I don't think any other language makes new programmers feel comfortable so quickly.
Ok, for the bad:
Python is a very slow interpreter. If all you're doing is gluing together C/C++ libraries and invoking them from Python, it works just fine. However, my experience writing new algorithms in pure Python is that they run between 50 and 1000 times more slowly than nearly equivalent C.
Python exposed so much of its its internal implementation for making C extensions that the developers hands are practically tied when it comes to improving the implementation. If you look at the Python C API, you'll see most of the structs exposed and 100s if not 1000s of public functions. Important (and complicated) extension modules (such as Numpy) are now dependent on lots of the current implementation details. This is the reason that alternate implementations of Python (such as PyPy) can never really catch up to compatibility. Many other languages provide the same functionality for C extensions/plugins without the same exposure to all of the internals.
Python painted itself into some odd corners by not requiring variables to be declared. Most programmers are surprised by the behavior of this snippet.
a = 0
def doit():
print(a)
a = 1
doit()
doit()
Also, it doesn't happen a lot in my experience, but typos in variables names can be silent errors because it will just introduce a new variable. Similarly, they needed to add a "nonlocal" keyword for when you want to modify something outside your scope. Note, you don't need nonlocal to just read it though.If there was a "var" keyword required to declare a new variable, you wouldn't need global or nonlocal, you could catch more typos in variable names, and the program above would behave correctly.
There are other issues too, but this post is getting long already, and these are the some of the big ones to me.
Maybe the word "Boomer" will just get redefined to mean "old people with more money than me". Kind of the same way "meme" got redefined from "idea permeating society" to "cartoon or cat picture with sarcastic text", and how "troll" got redefined from "someone who tries to antagonize" to "someone who says things I don't agree with".
As part of Gen-X, I feel like that's appropriating from my culture. I was proudly on the "slackers" mailing list as an adult in the 90s when the millennials were being born. Give millennials a new pejorative, don't steal ours.
At the very least, it seems like cherry picking to focus on 4 degree changes in the last 22,000 years while not explaining 10 degree changes in the last 25,000. I guess 25,000 years wouldn't have fit the narrative so well.