(If you are the kind of person that finds optimizations fun, of course. There is a puzzle solving element of optimizing code that I really enjoy.)
4,061 karma · joined September 18, 2012
https://bsky.app/profile/omoikane.bsky.social
https://mastodon.social/@omoikane
https://uguu-org.itch.io/
(If you are the kind of person that finds optimizations fun, of course. There is a puzzle solving element of optimizing code that I really enjoy.)
Initial setup:
0100 c5 30 lds si,[bx+si] ; Initialize SI
0102 04 ad add al,ad
0104 e6 61 out 61,al
0106 eb f9 jmp 0101
After first jump:
0101 30 04 xor [si],al ; Modify color part of text buffer.
0103 ad lodsw ; Read [si] into AX and increment SI by 2.
0104 e6 61 out 61,al
0106 eb f9 jmp 0101
So the XOR sort of randomizes memory, LODSW reads that memory back (with wraparound), and then writing to port 61h may or may not play a sound depending on bit 0 of AL.The part I am not sure about is how SI conveniently ends up pointing at video memory. I thought text memory is at b800:0000, and I am not sure how that's derived from [bx+si]?
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
This one probably has the best summary:
Even for the intersecting tetrahedra where instructions are available, I see that it's basically constructing the edges from 30 pieces of paper and then assembling them together. I wish they have more things that were built from a single square piece of paper.
Also, I am not sure about how easy it is to build binaries using SFML for various platforms (such as WASM), but with Godot you just have to download the right template.
https://www.sandordargo.com/blog/2026/09/16/cpp26-trivial-in...
Edit: sorry, missed the UB bit.
This seems to say that the loop body can not be "continue". Indeed, I just tried -std=c++26 with ";" and got an infinite loop as promised, but "continue" restores the undefined behavior:
- "while(true);" -> https://godbolt.org/z/T65o51crx
- "while(true) continue;" -> https://godbolt.org/z/Pj9raEcnP
This is unfortunate since I know of one style guide that prefers "continue" over single semicolons. I guess all those code will be doing "while(true) {}" from now on.
https://google.github.io/styleguide/cppguide.html#Formatting...
I do that for the Playdate: statically allocate most of the large structures and tables in global variables, and don't call malloc or free after initialization is done.
I also put some things on the stack, not so much because I need to dynamically allocate or free something, often it's because I get lower access latency to the stack compared to main memory (because stack lives inside ARM's tightly coupled memory).
https://cppreference.com/c/string/byte/memset (memset_s)
https://cppreference.com/cpp/string/byte/memset (memset_explicit)
Also see notes section for various other functions that people were using before memset_s became standard.
The comic doesn't say hit the person in the head, it says "hit him with this $5 wrench", and did not specify what to hit.
The playlist included "the sound of jet planes all night" and "the screams of rabbits being slaughtered". I don't think they really need AI for that, anything loud would probably do the trick after 51 days.
I think it's due to the fact that there is a fair bit of content, but the interface drip-feeds them very slowly, combined with the difficulty of the game itself that prevents users from finding all possible ways to interact with all content.
https://news.ycombinator.com/item?id=49562657 - Solving the Jane Street reverse engineering challenge (4 days ago, 99 comments)
Separately, if I were seeing a captcha that I can't get past, my first reaction would be to find a different site to see if it's a site specific issue, because some sites intentionally configure their captcha to work like that (e.g. you can't get in until you have been stuck solving captchas for at least a minute). I would see that more as a signal that the site operator is user hostile and not attribute it to a captcha provider.
I don't understand the units here, wouldn't a bit versus nibble difference make the multiplier 16, instead of 1024?
But I also have an Android phone without any data plan attached, which I use only for recording GPS coordinates when I am taking pictures outdoors. I have mostly managed to avoid places that require scanning some code or installing some app.
A multiquine of 51 languages by Yusuke Endoh, where each quine also accepts an argument to output quine in another language.
(For example, I noticed that if I buy something from Amazon or try to pay for something using Paypal, the exchange rate they offered me is consistently worse than the market rate if I elect to pay with USD instead of JPY. The difference often adds up to a few dollars, even accounting for foreign transaction fees that my bank might charge.)
https://www.haiku-os.org/get-haiku/r1beta6/release-notes/#:~...
Menu that does different things based on modifier keys seems novel to me, is BeOS or Haiku the first interface where menus take modifier keys into account?
I thought this is due to the "backfire effect", because humans perceive criticisms of things they like as threats.
> A new linker's early adopters knowingly accept such differences, which is one reason why drastic improvements tend to come from new linkers rather than existing ones
This is true of many things, not just linkers. I think this is encouraging for people to (re)try things that have already been done, because newcomers are allowed to take risks that established things can't take.
https://github.com/bluesky-social/social-app/issues/2762
But I didn't try to create an account recently, maybe they went back to requiring phone numbers.
It's also fairly simple to implement. I have implemented a version that rotates ASCII art, and that code made it to Ruby's list of sample programs:
https://github.com/ruby/ruby/tree/master/sample/trick2025/01...