I made it up to rule 25 and then Paul starved because I was thinking too long about which characters to ban.
To make it over Rule 24 (Paste the URL of a Youtube video with a certain random length), I even created a video with the correct length and kept uploading it to Youtube to get a URL without roman numerals and decently usable atomic weights.
When I tried it again after that dumb chicken starved, I hit Youtube’s maximum daily upload limit. Now Youtube thinks I am a spambot or something.
Btw, there are 35 rules total, in case anyone else makes it over 24. And spoiler, the one that got me doesn’t matter at all. It’s one of the easiest of all.
<span style="color:#323232;">for (int y = MIN_INT; y <= MAX_INT; y++) {
</span><span style="color:#323232;"> if (y == x + 1) {
</span><span style="color:#323232;"> x = y;
</span><span style="color:#323232;"> }
</span><span style="color:#323232;">}
</span>
(Not sure there’s a way to prevent Lemmy from escaping my left angle bracket. I definitely didn’t type ampersand-el-tee. You’ll just have to squint and pretend. I’m using the default lemmy-ui frontend.)
The backticks worked in the preview, and showed up correctly to start, but there must be a bug in the lemmy ui, since now it’s double-escaped. No idea /shrug
It will not “overflow”. Signed integer overflow is undefined behavior. The compiler could remove the whole loop or do anything else imaginable (or not).
Languages with dynamic typing and implicit large-integer types, such as Python and Ruby, generally just convert to that large-integer type.
I figured Java would probably define the behavior in the JVM, but based on a quick web search it sounds like it probably doesn’t by default, but does provide library methods to add or subtract safely.
Rust guarantees a panic by default, but provides library methods for wrapping, saturating, and unchecked (i.e. unsafely opting back in to undefined behavior).
I’m fairly certain that last one is UB in C. The result of an assignment operator is not an lvalue, and even if it were it’s UB (at least in C99) to modify the stored value of an object more than once between two adjacent sequence points. It might work in C++, though.
It’s amazing how much work goes into cleaning up code before you feel comfortable posting it to a mailing list that you would never even bother doing for internal-only stuff.
I have a monitor that’s almost like this and it’s surprisingly nice. It feels like a two-monitor setup. Two actual monitors would probably have been cheaper, but I got mine from work, so it wasn’t a factor.
The real advantage of having two actual monitors is being able to flip one vertically for reading code.
I bought one after some months of remote work in 2020. Then when I started my new job they gave me another one (different manufacturer but exact same panel size). I needed to rearrange my desk a lot, but holy shit so much room for error messages!
programmer_humor
Active
This magazine is from a federated server and may be incomplete. Browse more on the original instance.