HackerTrans
TopNewTrendsCommentsPastAskShowJobs

creativemonkeys

no profile record

comments

creativemonkeys
·4 वर्ष पहले·discuss
In Lex Fridman's podcast, Carmack says he's officially only working 1 day at Meta in advisory capacity, though sometimes chimes in on other days as well. He also says he wants to completely focus on AGI, so I wouldn't rely on Carmack to push the VR field forward in the near future.
creativemonkeys
·4 वर्ष पहले·discuss
Because Meta bought Oculus. It's not the news feed guys designing the next gen VR hardware.
creativemonkeys
·4 वर्ष पहले·discuss
Have any of you downvoters read the C grammar? There is no --> operator in C. I'll never understand some people.
creativemonkeys
·4 वर्ष पहले·discuss
"-->" is not an operator in the C language, it's just a way of writing the unary operator "--" and comparison operator ">" together without any whitespace between them, since whitespace is ignored by the lexer.
creativemonkeys
·4 वर्ष पहले·discuss
I suppose short and long have to do with register sizes being available as half word and dword, and there are instructions that work with smaller data sizes on both x86 and ARM, but I agree that in today's world, you want to know the number of bits. On those weak 4MHz machines, squeezing a few extra cycles was typically very important.
creativemonkeys
·4 वर्ष पहले·discuss
I'm sure someone will come along and explain why I have no idea what I'm talking about, but so far my understanding is those names exist because of the difference in CPU word size. Typically "int" represents the natural word size for that CPU, which matches the register size as well, so 'int plus int' is as fast as addition can run by default, on a variety of CPUs. That's one reason chars and shorts are promoted to ints automatically in C.

Let's say you want to work with numbers and you want your program to run as fast as possible. If you specify the number of bits you want, like i32, then the compiler must make sure on 64bit CPUs, where the register holding this value has an extra 32bits available, that the extra bits are not garbage and cannot influence a subsequent operation (like signed right shift), so the compiler might be forced to insert an instruction to clear the upper 32bits, and you end up with 2 instructions for a single operation, meaning that your code now runs slower on that machine.

However, had you used 'int' in your code, the compiler would have chosen to represent those values with a 64bit data type on 64bit machines, and 32bit data type on 32bit machines, and your code would run optimally, regardless of the CPU. This of course means it's up to you to make sure that whatever values your program handles fit in 32bit data types, and sometimes that's difficult to guarantee.

If you decide to have your cake and eat it too by saying "fine, I'll just select i32 or i64 at compile time with a condition" and you add some alias, like "word" -> either i32 or i64, "half word" -> either i16 or i32, etc depending on the target CPU, then congrats, you've just reinvented 'int', 'short', 'long', et.al.

Personally, I'm finding it useful to use fixed integer sizes (e.g. int32_t) when writing and reading binary files, to be able to know how many bytes of data to read when loading the file, but once those values are read, I cast them to (int) so that the rest of the program can use the values optimally regardless of the CPU the program is running on.
creativemonkeys
·4 वर्ष पहले·discuss
I've built a C compiler and have read the dragon book. I wish I read Crafting Interpreters before reading Compilers by Aho. It's good, and there's no nonsense. The author knows what he's talking about. Plus it's free to read online. 10/10 would recommend.
creativemonkeys
·4 वर्ष पहले·discuss
Photopea has been pretty good at replacing Photoshop for my needs (non-designer).
creativemonkeys
·4 वर्ष पहले·discuss
I'm moving to PA, so out of curiosity, why are you recommending to move to Philly?
creativemonkeys
·4 वर्ष पहले·discuss
I think you misunderstood the comment you replied to. Their point wasn't that 12s to 9s is a negligible improvement generally. The point was that the improvement only applied to a tiny fraction of their users and it was still a bad experience, precisely because it was so far from 1s.
creativemonkeys
·4 वर्ष पहले·discuss
Last time I checked how much I'd lose, it was between 10k and 15k, which is not much compared to my total comp.
creativemonkeys
·4 वर्ष पहले·discuss
Yeah... that's a pretty deceptive practice, though I assume it's legal to buy a brand and manufacture a different product under that label.
creativemonkeys
·4 वर्ष पहले·discuss
I think it tastes different now too, but I can't find an old bottle to compare.
creativemonkeys
·4 वर्ष पहले·discuss
If I'm using "-e", I also like to use "set -o pipefail" which will fail the script if any command in a pipeline fails too: x | y | z, which is useful if 'y' fails but 'z' continues to process the output and returns 0, -e won't catch that (the example script doesn't use pipes though).
creativemonkeys
·4 वर्ष पहले·discuss
In my experience, the American society places a high value on 'balance' - from "checks and balances" to balanced individuals, to balanced meals, to balancing criticism with some praise first, etc. When this balance is off, most people's innate reaction is to reject the imbalanced person, and by extension, their ideas, regardless of any objective measure of the value of those ideas.

Being direct creates an imbalance, for example when one describes an issue or person purely from a negative point of view, regardless of whether all of it is actually true. Most people will innately attempt to say something positive about that same person to restore some sort of balance to the discussion.

Generalizations are also an example of imbalance, with people typically having a strong reaction to it, even though I think most people would agree that if 97 times out of 100 something is true, it's safe to say that thing is true.

Lastly, as a special case of generalizations, taking an absolute stance is also seen as imbalanced, and therefore bad, because, I assume, most things in life aren't black and white - there's lots of gray areas, so it's pragmatic to start out assuming that in actuality there's a gray area with any issue.

This is all to say that Stallman doesn't speak in a balanced way, which is why I think his speeches and ideas do not appeal to the American audience, or any other audience that places a higher value on balance than on the actual ideas.

If he were able to convey those same ideas in a less absolutist, more nuanced and more pragmatic manner, I think he, as a person, would be more appreciated in the US and perhaps people would listen more closely to what Stallman has to say.

I've lived in several other countries, particularly in Europe, and generalizations, absolute positions and speaking in a direct manner are all generally appreciated by the society there, or at the very least it's tolerated much better and won't get you dismissed right away (since that's how most people speak).

At the end of the day, I personally think Stallman is right. When I look at what he says, I see a non-compromising idealist who places more value on truth, and how things "ought to be", than on pleasantries and gray areas, and that's a difficult sell to the American audience. When I focus on his content with the understanding that he's converting gray into either black or white, I see a dreamer and a believer in a utopian society. I too would like to live in a world where all software is FOSS and we all write FOSS code that runs on FOSS hardware, but I recognize that's a dream. It shouldn't stop us from trying to make that dream a reality though.