25 ms·
Base65536 encoding
- comboy 9y agoDo not try playing this game. You're welcome.
- virgil_disgr4ce 9y agoOH GOD THE PAIN THE HURTING
- sbarre 9y agoThe 30-rows replay is pretty impressive..
- deleted 9y ago[deleted]
- krick 9y agoI wonder if it is mathematically optimal.
- artursapek 9y agoSomeone spin up AlphaGo on this game
- dzuc 9y agoEnantiomorphic tetris!
- carry_bit 9y agoYou could expand the encoding further if you didn't restrict yourself to a whole number of bits per character.
- deleted 9y ago[deleted]
- amptorn 9y agohttps://github.com/qntm/base65537 https://github.com/qntm/base65537
- andrewflnr 9y ago> These shortcomings are expected to be fixed in Base65538. I fricking love qntm.
- mproud 9y agoUmmm… 1 dollar Bob! (anxiously excited)
- bcoates 9y agoAt first I thought this was going to be a joke, then I thought it was going to be stupid, but it's actually brilliant.
- bytecodes 9y agoI think it's all of those.
- pfraze 9y agoYeah but what you really want is base-emoji. https://github.com/pfrazee/base-emoji https://github.com/pfrazee/base-emoji
- lkurusa 9y agoOh, wow. But... the real question is how many bytes of data can I put in a tweet using this? :-)
- ecesena 9y agoIt's right below the table: > For example, using Base64, up to 105 bytes of binary data can fit in a Tweet. With Base65536, 280 bytes are possible.
- desdiv 9y agoHe's asking about base-emoji, not Base65536. >The emojis used are in emojis.json. There are 843 emojis there, but the converter reads sequences of 8 bits at a time, and so only maps the value to the first 256 of them. One byte per emoji means 140 bytes per tweet. Since it's just a joke format they're not trying to be space efficient. Using all 843 emojis would result in 170 bytes per tweet (ln 843 / ln 2 / 8 * 140).
- chocolatebunny 9y agoSometimes you don't know what you're missing in life until you find it.
- mjburgess 9y agoBefore you came into my life I missed you so bad - Carly Rae
- blincoln 9y agoI came up with the same concept - and almost the same name[1] - as a joke at work last year, and could not stop laughing at the results, so I completely agree. The one improvement to the public project I'd suggest is from my own. Instead of always starting from index 0, for each character position, increment the starting index by one until it loops around. That way all of the emojis get a roughly equal chance of screen time - depending on the entropy of the unencoded data, of course. [1] I called mine "basemoji".
- shemnon42 9y agoAll those stats and one lingering question: whats the Weissman Score?
- bbcbasic 9y agoWhat do you propose as the standard for comparison? Base64?
- jxy 9y agoSince when did people start to label C implementation as "Unix shell"?
- stouset 9y agoEven if it's technically incorrect, I don't think it's unreasonable. When they're saying "a Ruby implementation", "a Node implementation", etc., they really mean an implementation callable from within those languages. The C implementation is not a callable library, it's a binary. So in the same sense, it's a "Unix shell -accessible implementation".
- throwaway91111 9y agoI don't follow where the shell enters this conversation at all.
- stouset 9y agoHow exactly do you expect to invoke the C implementation? It's not a library, it compiles to a binary. IMHO, the environment a utility is natively accessible from is more relevant than the language it was written in.
- jpttsn 9y agoThat's a stretch. Consider "Swift implementation" v. "iPhone home screen implementation"
- throwaway91111 9y agoSame way you invoke a ruby script, python acript, jvm call, whatever: with exec. Scripts are just the easiest.
- __jal 9y agoWell, no. Or at least, when I say "a Ruby implementation", I mean it is implemented in Ruby, not callable from Ruby. When I refer to a Python C extension, I refer to it as a C implementation, even though the express purpose is to be callable from Python. I can call Perl (and Python, and Ruby, and Javascript, and...) scripts from the shell, too. So those are now "Unix shell" as well?
- ChuckMcM 9y ago256 byte packet and a 192 bit authentication hash, why use fast flux dns to run C&C on your botnet when you can just make them twitter followers. EDIT: And in case that isn't clear. Imagine you have a botnet, and all of the individual members create a twitter account. All of the twitter botnet accounts follow the 'master'. Who can tweet a command (and corresponding authentication key) to the botnet to say "follow chuck and do up to n things for him, here is his public key". Now Chuck suddenly has all these followers and when the time is right he tweets out his command, "ddos my greatest enemy" and adds his 'proof'. Off they go and blast his enemy. If he was only allotted one command then they all un-follow him. Basically its social media for botnets.
- jeffbarr 9y agoAnd the proof is "covfefe", right?
- heinrich5991 9y agoBecause Twitter would be able to shut down your botnet.
- ChuckMcM 9y agoConceptually I agree with you, Twitter should be able to shut down a botnet like this by simply 'identifying bogus twitter accounts' (aka twitter bots) and 'deleting those accounts en masse.' The part where it gets weird though is that twitter already has massive botnets which run around in it retweeting things and what not. Which they do not shut down. So is that because they don't want to? Because they can't? or simply because it isn't worth their time? That is still an unresolved question for me.
- luminiferous 9y agoI suspect it's because the Twitter bots inflate the user count of Twitter. It seems that even though Twitter's monetization is not the greatest, their valuation mostly comes from the number of users on Twitter. The reasoning process seems to be something like, "Twitter doesn't make a lot of money right now, but they have the ear of some 300 million users, and that's going to be valuable in the future when they get their monetization story correct, right?" And so TWTR prices are kept afloat. Bots probably degrade the user experience of Twitter quite a bit, but if Twitter aggressively bans all bots, their user count goes down maybe 15%[1], and what does that do to their stock price? [1] https://arxiv.org/pdf/1703.03107.pdf https://arxiv.org/pdf/1703.03107.pdf
- eponeponepon 9y agoCrikey, I thought this was going to be a joke project, but it isn't. Is it..? Either way, it's a neat piece of thinking.
- sqeaky 9y agoIt it a solution for posting HATETRIS scores, I think it is still a joke. Just a joke with a valid technical solution, and an above average level of dedication.
- jrochkind1 9y agoMaybe it's art? I'd sat hateris is.
- pbhjpbhj 9y ago"See a need, fill a need" (Bigweld).
- stcredzero 9y agoBase 32768 has a very sexy 93.75% efficiency! Maybe I should use that with my browser game?
- nebulous1 9y agoGoing purely on the table on the linked github page, without further reading into anything at all, Base32768 seems like the clear winner for a go to scheme.
- amptorn 9y agoOnly if your browser game requires UTF-16 strings.
- duskwuff 9y agoMore specifically: only if you will be storing/transmitting data in UTF-16. If you're using UTF-8, base85 is much better.
- Asdfbla 9y agoI don't seem to get the efficiency table (or how efficiency is defined here?). Since Base65536 encodes 16 bits, why can't it encode UTF-16 with 100% efficiency? It says the efficiency is 64% instead. I'm sure it's true, just curious why.
- amptorn 9y agoNot all of the code points used are (or can be) in the Basic Multilingual Plane. This means that when encoded in UTF-16, they come out to 32 bits, not 16. This skews the average number of output bits per input bit upwards.
- jacobush 9y agoBasic Multilingual Plane always make me think of Cthulhu... it lives beoynd
- ploxiln 9y agoNot every possible 16 bit value is itself valid UTF-16 - some need to be represented as two UTF-16 code-units, aka "surrogate pairs", 4 bytes total.
- bitwize 9y agoWhat surprises me is that this encoding was developed to allow people to share replays of an illegal, and very pathological, Tetris variant. Hackers gonna hack.
- JoshTriplett 9y ago> illegal, and very pathological Pathological, certainly; "illegal"?
- bitwize 9y agoMost aspects of Tetris's appearance and gameplay are protected by copyrights and trademarks owned by The Tetris Company LLC. This includes trademarks on the shape of the tetrominoes, the suffix "-tris", and the use of the Russian folksong Korobeiniki in a video game. In their copyright-infringement case against Xio Interactive, a judge ruled that aspects of the game such as the dimensions of the game board (which the HATETRIS developer took pains to replicate) are protected by copyright. Tetris is one of the most aggressively defended game IPs out there. Any recognizable clone of it is potentially infringing.
- JoshTriplett 9y agoThere are thousands of clones out there, both for-profit and otherwise, and the vast majority have not been pursued. Trademarks on the shapes of "tetrominoes" are questionable (you can't trademark a purely functional element, though you could potentially trademark a particular stylization of it or use of it in a logo). Copyright on game rules is questionable as well, and whether it'd apply in any particular case would depend on both jurisdiction and any potential fair use claims; there's a long history of cloning games, without using any of the original art or other assets. Pretty much the only bit that's more clearly problematic is the use of "-tris" as a suffix; GNOME's version was renamed from "gnometris" to "quadrapassel" for exactly that reason. I certainly wouldn't give such aggressive behavior any unwarranted credence by presumptively calling a clone "illegal"; on the contrary, I cheer on creative developments like this.
- anderskaseorg 9y agoSee also: https://blogs.oracle.com/ksplice/the-1st-international-longest-tweet-contest https://blogs.oracle.com/ksplice/the-1st-international-longe... Twitter characters can actually store up to nearly 31 bits each, if you’re using the JSON API. (Or at least, this was true in 2010. I don’t know whether this is still true.) http://blog.kevinalbs.com/base122 http://blog.kevinalbs.com/base122 https://news.ycombinator.com/item?id=13049329 https://news.ycombinator.com/item?id=13049329 Base-122 encoding is 87.5% efficient in UTF-8, better than anything listed in the base65536 repository’s comparison table.
- livingparadox 9y agoFrom the conversation in the hacker news link, it looks like base122 gets the increased efficiency from using unprintable control characters, which is incompatible with base65536's explicit goal of only using printable non-whitespace characters in its output.
- marcosdumay 9y agoLooks like we should create some other 20k emoji.
- girst 9y agoI'm the one who made the C / UNIX Shell implementation - it was a fun and quick thing to make. https://github.com/girst/base65536 https://github.com/girst/base65536 I'd appreciate some feedback.
- dheera 9y agoIf you really want to put binary data on Twitter, why not encode it in an image? You could probably get several tens of kilobytes of binary data reliably encoded in a JPEG of the maximum size Twitter allows.
- shujito 9y agoAren't JPEG's lossy? I can't think of a reliable and performant way of retrieving data from a JPEG.
- oh_sigh 9y agoOn compression yes but you can craft a jpeg image which has exactly the pixel data you need. It will fail if someone recompresses your image, but that would be unlikely
- Dylan16807 9y agoTwo or three bits per pixel, grayscale, should be quick and pretty resilient. A hundred kilobytes or more is easy to transfer.
- flashmob 9y agoOr, how about a QR code?
- Dylan16807 9y agoIf you want absolutely terrible density, sure. Still beats 140 characters.
- terminado 9y agoWhat, no Java?
- matt_wulfeck 9y agoI think they missed a great opportunity to call it "base64k" encoding.
- fiatjaf 9y agoI hate this game. Manage to make 1 point at 𤄻𣺻𣼋耈𣺻興𣼫兊𠨋𢪄𡚻𡢁𢙌𢚻𠛀𣪻栌𤄋𤯄𤆻𤆠𠞠𤪇𤆻𠙀𤅴𤆧𣪤𡚻𥪹炌𤆀㶸聙𡊰𠨌𡪻𤇅𤆀薠嫊䂔𔔌𥩋㲼耈𠊁繈倘𤨸𣾔㼬𤚱𢩋𣿋𡉌膹敃ꎹ𡩋肐𠝒𠚬醸聛㰩 https://qntm.org/files/hatetris/hatetris.html https://qntm.org/files/hatetris/hatetris.html
- prophesi 9y agoSo, anyone got any good HATETRIS replays? I'll edit my post if I find myself getting a good one. https://qntm.org/files/hatetris/hatetris.html https://qntm.org/files/hatetris/hatetris.html Edit: If you didn't look at the repo, this encoding was made to post HATERIS replays on Twitter. Edit: Only 3 points so far 𤆂𤆻𡚻𤆥㲺着遈𥮸㼉𤄛皲𤆻孈𤇆𡊾缎𓍌𤂻职𢪻郇膻𤅋𠅌傺𢊰䡪𤇄𤪤𡪻ꋇ𥆸𤶹膺𢡋聜𠆬𤪄膹𠬋㿄𠘬臀㾤冹𣾻𡈰𠭀䂹𤄔㼌𤚐𤢰𢢻𤇀𤞁䂺㬅𢉋𤮹㼆𣛄𡫀𤚒㡋𤢀ᖠ
- crunksht 9y agoI managed 4 by stacking vertically as quickly as possible and then trying to fill out horizontally. ꋇ𤆻𠇇𢊻𤅷𓎼𢊻𤅵𓎬𤶸𤶸𤞑𤇋邼𣊻𤅛綌𣽋𤇅邌邬𤪀𠆃𣚻胈𡚻𤇄䂸𤁋而䂸𢙋𣻄𤄜𠢻𤇠𠪻㰄耬𢢻𣻄缨𠠋𤇁𤢱𡢻𤇂值𤞒𥆱冻ꎜ𤭺𤪰𤪲𡢻㿅𠟛𔗀邼而耬𥆑㼼翇
- prophesi 9y agoDang, I thought for sure I could get more than 4 with that tactic. ꉌ𤆻遜𣪻𤇇ꎷ𣹋郇ꎹ𠱋𣻅𤅡𡚻𤆻𤆒𠚻絀㬌ꊂ𣺻㣅𤮻𤪺𤂻𤇄肬𤆬𥆺𥆺𤪠𤄋𤆣𠚻胁𣚻𡫁𣚻𤇀𤙛𡚻𣛋𡛋𤇂㾺𣾔弌𣽋脧𡉫灛𤶻炼点冸𣈛䁛𠝋𠟋𤋁ᖠ
- crunksht 9y agoMe too! I thought I had it beat and then it through me a square: 𤆌𡊻𣾻𤇋𤆌𤆼𣾌𠳋𤇅𡊻𤅻𠆬𡊻聩𤶸𡊻𣉻𠝻𤇁𡊻𤄻炬𡊻𤀻倜𤦸䂺𠨫𤇄𠚻𤇀𡊻𤅛邬𡊻𤁛𤇅邌邬𤚁𤆄䲼𤅑𠆜邌𤪀憸𡈋𣸛𠯁𣈛㰈𤴊𤮸𤚸𣢄𤿠𡧅𢘍
- lultimouomo 9y agoI got to 8 with a very similar tactic: 惃𣺻怌𢚻𤇂䂸𤀫䀌㼌䂹𢈫𤦀𤄫悸𤆔纹㴈聘𢚻𠆌𣚻𓋇𣾻𔗀𤊻ꈇ䂹𤅷𔒌膸𤅻羱繨𢘋傺𢪻𤆻𣺻𤄛𤆔㾺傺肻𤆻𤆡𤆤𤆐𤆑暌䂻𡘫𣯂𤃅𣿇𤅋𤆱𢙋傺𠆜𤢀𤆴𣺡𣫇𣢰𤾳
- deleted 9y ago[deleted]
- nacs 9y agoNot mine but the Github page has a replay that scores 30 points: 𤇃𢊻𤄻嶜𤄋𤇁𡊻𤄛𤆬𠲻𤆻𠆜𢮻𤆻ꊌ𢪻𤆻邌𤆻𤊻𤅋𤲥𣾻𤄋𥆸𣊻𤅛ꊌ𤆻𤆱炼綻𤋅𤅴薹𣪻𣊻𣽻𤇆𤚢𣺻赈𤇣綹𤻈𤇣𤾺𤇃悺𢦻𤂻𤅠㢹𣾻𤄛𤆓𤦹𤊻𤄰炜傼𤞻𢊻𣲻𣺻ꉌ邹𡊻𣹫𤅋𤇅𣾻𤇄𓎜𠚻𤊻𢊻𤉛𤅫𤂑𤃃𡉌𤵛𣹛𤁐𢉋𡉻𡡫𤇠𠞗𤇡𡊄𡒌𣼻燉𣼋𦄘炸邹㢸𠞻𠦻𡊻𣈻𡈻𣈛𡈛ꊺ𠆼𤂅𣻆𣫃𤮺𤊻𡉋㽻𣺬𣈛𡈋𤭻𤂲𣈻𤭻𤊼𢈛儛𡈛ᔺ
- deleted 9y ago[deleted]
- supernintendo 9y agoNeat. I see a lot of mention of Twitter but the first thing I thought of was packet compression. A ~50 byte packet shaves off around 20 bytes with this. Those are good savings although I haven't looked into the encoder / decoder enough to know if it's worth the tradeoff of having to translate every packet on both ends. I can also see UDP datagrams being a pain in the ass to work with when you're throwing around streams of Unicode characters. Overall though, I like it and look forward to Base131072 being possible!
- jeremyjh 9y agoI didn't see any efficiencies that exceeded 100%. Are you counting code points rather than bytes in the unicode output size? The code points still have to be serialized as bytes after that is done, but since Twitter limits you by the number of characters, not the number of bytes, this amounts to a sort of compression of data into Twitter. On the wire it would still be an expansion of course.
- piaste 9y agoFor raw packets obviously not, but if: - you're sending big byte arrays over json/xml - you cannot switch to a more efficient medium - (but you can make your remote counterpart adopt a different encoding) - and you still need to maximize your throughput then I guess you might consider base85 for utf-8 or base32k for utf-16?
- jbg_ 9y agoJSON is UTF-8 by definition, so at best you'd be using a format that looked similar.
- supernintendo 9y agoOh yeah, good point (and one that I should have thought of before posting my comment). The scenario I described would actually be less efficient.
- jheriko 9y agoa sad sign of our times... what a nonsense.
- gvx 9y agoLast year, I did a similar project: https://github.com/gvx/base116676 https://github.com/gvx/base116676 It had a feature where it automatically would try a couple of compression algorithms on the text to be able to cram even more into a single tweet. I don't think it has a practical use, but it was fun to make.