• 0 Posts
  • 81 Comments
Joined 5 months ago
cake
Cake day: June 23rd, 2024

help-circle



  • SMB on the NES and the DX port share graphics with a 16x16 tile size. Therefore, only 10x9 tiles can be shown at once, as opposed to 16x14. The small FOV and resulting camera tilt was very frustrating, especially with the Lost Levels.

    This port scales the graphics down to the GB’s resolution. I imagine it takes a lot of CPU cycles just to rearrange the graphics data into the Game Boy’s 8x8 tile structure in display RAM. Either that, or it’s precomputed and the ROM is huge.

    Edit: the tiles are not 12×12 but 8x8 so there is no need, they correspond to the RAM.

    Also, they have backported some content from later games




  • I know that similar computational problems use indexing and vector-space representation but how would you build an index of TiBs of almost-random data that makes it faster to find the strictly closest match of an arbitrarily long sequence? I can think of some heuristics, such as bitmapping every occurrence of any 8-pair sequence across each kibibit in the list. A query search would then add the bitmaps of all 8-pair sequences within the query including ones with up to 2 errors, and using the resulting map to find “hotspots” to be checked with brute force. This will decrease the computation and storage access per query but drastically increase the storage size, which is already hard to manage.

    However, efficient fuzzy string matching in giant datasets is an interesting problem that computer scientists must have encountered before. Can you find a good paper that works well with random, non-delimited data instead of just using the approach of word-based indices for human languages like Lucene and OpenFTS?


  • ChaoticNeutralCzech@feddit.orgtoCurated Tumblr@sh.itjust.worksTake that, atheists
    link
    fedilink
    English
    arrow-up
    109
    arrow-down
    1
    ·
    edit-2
    11 days ago

    A bot strips away all spaces and letters that aren’t A, T, C or G, then treats the rest like a genetic sequence and checks it against some database.

    Presumably, it runs through many terabytes of data for each comment, as the Gallinula chloropus alone has about 51 billion base pairs, or some 15 GiB. The Genome Ark DB, which has sequences of two common moorhens, contains over 1 PiB. I wonder if a bored sequencing lab employee just wrote it to give their database and computing servers something to do when there is no task running.

    No, I won’t download the genome and check how close the “closest match” is but statistically, 93 base pairs are expected to recur every 2186 bits or once per 1040 PiB. By evaluating the function (4-1)m × mℂ93 ≥ 493 ÷ (pebi × 8), one can expect the 93-base sequence to appear at least once in a 1 PiB database if m ≥ 32 mismatches or over ⅓ are allowed. Not great.

    This assumes true randomness, which is not true of naturally occuring DNA nor letters in English text, but should be in the right ballpark. Maybe fewer if you account for insertions/deletions.






  • That is very decoder-specific. The most common QR reader apps are the Camera app on iPhones and Google Lens for Android so you’ll want to target one of these (though Google Lens might be using cloud processing for that). There probably won’t be any exploits in the image processing part but you obviously can write arbitrary data (including ASCII control characters such as CR, LF, null) into the “data” part of the QR code, as the encoding mode and data length is stored in the first 4+(n*8) bits of where data would be instead of null byte termination. Normally, the data is then right-padded with repeating 0xEC11 (or not) and then error correction follows (number of bytes in the error-correction part is defined by the size and ECC mode indicated in another region).


  • It’s easier to take precautions though. You probably don’t have an insulated USB port or throwaway host device but handling QR codes safely just takes basic tech and skill.

    Important advice:

    • Don’t use apps that auto-open URLs in QR codes when pointed at!
    • Make sure the app shows the full content of the QR code and lets you peruse it indefinitely before you open the link!
    • Know the structure of URLs and common pitfalls!

    Recommendations:

    • Be extra suspicious if there is no URL printed next to the code, or if the printed URL is different.
    • Use an open source reader app (most QR codes don’t contain secrets but it’s got permission to use either camera!) that does not resolve Punycode (Unicode in TLDs).
    • Strip any tracking parameters you spot before following any URLs.
    • Be careful if the QR code could have been easily tampered with (on a sticker over the original one, or on a plain sheet of paper inserted into a plastic wrap together with the rest)

    I think today’s generation’s equivalent is free Wi-Fi networks. Kids without mobile data in an area without an established public network will connect to just about any open one unless the SSID includes “LaserJet” or similar.