You're just a lowly Cheddar Monk / Always running out of tricks (Posts tagged programming)

1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna
digital-meat
eightyonekilograms

A few decades ago, navigation meant paper maps stored in your glove compartment. When GPS devices and smartphones emerged, the obvious next step might have been to digitize those maps; to scan them, store them as images or PDFs, and allow users to pan and zoom.

Instead, modern navigation tools look nothing like paper maps. They automatically detect your location, incorporate live traffic data, provide contextual insights, and reroute you dynamically. You can travel from point A to point B without ever touching the device.

Now consider how we engage with the Quran digitally. We moved from physical mushafs to images of their pages on a screen, still flipping page by page. Some enhancements such as search and audio playback have been layered on, but fundamentally, the experience has barely progressed. We are still changing the medium, not rethinking the experience.

At Tarteel, we are reimagining how Muslims engage with the Quran from the ground up. Doing this well requires solving a problem that most digital products never face: rendering a sacred text with absolute textual fidelity, deep interactivity, and strict spatial consistency, all at once. This post explains why existing digital approaches fall short and how we built a new rendering system to overcome those constraints.

digital-meat

The Tarteel app currently reproduces four published Quran editions, each supporting tajweed coloring, mistake highlighting, hidden words, and precise word-level interaction. All editions are bundled directly into the app without requiring additional downloads. Users experience smooth animation while reciting, accurate spatial consistency, and instant contextual feedback - all without needing to think about the engineering underneath. That invisibility is intentional. When done correctly, the technology disappears, allowing the focus to remain on the Quran itself.

Surprisingly cool

Source: tarteel.ai
religion islam programming neat
garmbreak1
maplesynth

so i spent far too long on this.

for those unaware, the spaghetti wall of letters and numbers is a base64-encoded JPEG image (and not a URL as some guessed). in certain cases when you tried to insert/paste an image into what’s ostensibly a text-only box, this could happen.

the thing that’s bugging me however is that there’s image data there. we have fairly a clear (albeit with JPEG artifacts) screenshot of text that, thanks to how Windows ClearType renders text, each character is identical to each other, that is to say, an uppercase Q will always look more or less pixel-perfect each time, meaning we don’t have to guess what a Q looks like, we simply have to pixel-accurate match it.

image

as an aside, this is why regular OCR struggles so much with this kind of data retrieval, such as code even when it’s clearer than a physical paper scan. ordinarily, OCR will try to best-guess every single letter because it expects each letter to be slightly different from each other (as would be the unpredictable nature in a scanned document), and on top of that most OCR today will try to autocorrect because it expects the scanned text to contain words in some human written language.

so, all we have to do is make a program to recognize each character and piece back together the whole base64 string, right? well…

first i stitched all 7 images back into a single block of text, observing the consistency of the line spacing. some of the screenshots have little bits of the previous one sticking out of it, which helps with alignment and to make sure they’re in the right order.

image

after that i had to sample every single letter off this file. this means going around the file and finding one example of each different character we’re trying to identify, saving it as its own separate file so that the program can load them as references to compare against in the full image. for base64, the alphabet consists of a-z, A-Z, 0-9, +, / and =. once i had the initial code in place…

image

…close! but oh so far. if any one single character in a base64 string is wrong or missing, the resulting decode will be wrong. the issues i was having were mostly with the lowercase r and j because of how the kerning affected the pixels around those letters. i was also getting false matches for r where there should be an m. what followed was grueling hours of tweaking the matching code and my known font set to better fit the original image and get as close as possible to a 100% match. here is the resulting code, maybe it’ll be useful for someone and this won’t have been a complete waste of time.

once i was confident through the verification image that i had all characters recognized, i put it through a base64 to JPEG decoder. i actually did this several times as i improved the recognition and what follows is the best result that came out of it yet. i suspect some of the data might be missing (perhaps a line or block of text got lost in between screenshots), or i have a wrong character somewhere resulting in a wrong value. this is the image extracted from OP’s base64 string:

image

we can finally know what they meant when they said “me in a relationship” and i can finally go the fuck to sleep.

maplesynth

update: i found that the string that i used to decode the image in the previous reblog actually had one letter wrong.

image

with this it still doesn’t parse as fully valid base64 in strict mode so i think there’s still another letter in there that’s wrong, but i couldn’t find it. however this gives us a better look:

image

and this is finally enough to do a reverse image search. i present to you, the HD version of our intrepid massive backpacker:

image

still have no idea what they mean by “me in a relationship” with that, though.

almost-correct-quotes

#they have baggage

WOW programming internet stories They Did The Research and then the punchline LOL
cromulentenough
life-in-a-monospace-typeface

The True Megagon and The Thai Wizard

Sometimes I’ll get a great comment on one of my videos - a comment that really gets what I’m talking about and raises interesting points - and I’ll think “Oh awesome, a new cool person, I should try to bring them in and introduce them to people and so on”, and then I find it’s the alt account of someone I’ve known for years.

This is often the way when I find something great that’s relevant to my specific interests. When I go to see who’s responsible, I’m slightly disappointed to find that it was done by someone I already know.

The Megagon

A Megagon is a polygon with a million sides. They're sometimes used as an example in philosophical discussions, because it's basically a circle for any practical purpose, but it's importantly, mathematically, very much not a circle. It's an example of a well defined concept that nonetheless can't be visualised.

Wikipedia has a nice page about the megagon, from which you can learn, amongst other things, that if you made a megagon the size of the Earth, the edges would be about 40 metres long, and it would be very hard to notice the 0.00036 degree angle between adjacent sides.

The Treachery of Images

But, thanks to Chana Messinger (inventor of the term "Steel-man"), and Rob Bensinger, I came to learn a very disturbing fact about that wikipedia page.

image
image

The image used to represent the megagon, a shape whose main claim to noteworthiness is that it’s not just a circle, is just a fucking circle!

I was outraged. Certainly, a megagon will necessarily render on the screen as a circle, but Wikipedia images can be vector files. As an SVG, it can be a real megagon behind the scenes. It’s totally unacceptable to have the SVG internally represent the data as a simple circle.

I resolved that I would fix this. Probably there was some reason why the Wikipedians had taken this cowardly cop-out - perhaps normal vector editing software can’t do it - but I wasn’t going to let that stop me.

First, I checked that I couldn’t just do it the obvious easy way and make the shape with Inkscape.

image

It couldn’t do more than 1024 sides. That’s fine, SVG is a simple enough XML-based format, you can write Python code to generate the correct file directly. That’s quite easy to do, and I did it quite easily.

The problem is, the resulting file was huge (for an SVG), at 21MB.

Visualising it was a little tricky.

Inkscape was happy to open the file, but I suspect it was taking some shortcuts.

image

The GIMP can also open SVGs, but did not prove strong enough to contain the power of The True Megagon.

image

Firefox could display it correctly, but only very very slowly, and with much whirring of fans.

image

When I tried to upload the file to Wikipedia to be the image for the Megagon page, they threw me in Noob Jail. I don’t blame them for this; I expect the overwhelming majority of the time that a brand new user account tries to upload a weirdly large file, it’s correct to not let them do that.

I later learned that Wikipedia’s SVG renderer won’t even try to render any file bigger than 8MB.

I couldn’t think of any way to get the file down below that limit. I could zip it of course, but that wouldn’t help, as the renderer needs to operate on the uncompressed file. I could make the individual coordinate numbers shorter, by rounding them to fewer decimal places, but that wouldn’t work either: the vertices of the megagon are so close together that you really need all of the decimal places available. Round off too many, and adjacent vertices start to fall on exactly the same point, which makes it not a real megagon at all.

And even if I could get the file small enough somehow, Wikipedia’s renderer would almost certainly fail anyway, like Inkscape or The GIMP.

Hope was lost. My goal, my dream of bringing The True Megagon to The People, was truly beyond my reach. I was defeated.

At dawn, look to the East

More than a year later, I was revisiting the site of my defeat, as I often did, idly picking at an old wound that might eventually heal one day if I could just stop opening it up again.

Imagine my surprise when I found that the page had been updated. A new file had replaced the acursed circle, and this one claimed the Mantle of the Rightful King, the True Megagon, foretold in legend!

image

Furthermore, imagine my astonishment at seeing the file size! Less than 8 megabytes, yes, less than 8 kilobytes! A miniscule 4KB file!

This was a work of deeper wizardry than any I knew of.

And on the file listing, these words appear:

Source: https://neizod.dev/locales/2021-05-27-megagon-and-sum-of-product-upto-index.html

I followed the link of course, and found this:

image

After asking Google to decipher the moon runes, I started to comprehend what had happened.

Our hero, who goes by the name Neizod, has since uploaded an English translation, so I will commend you to his blog rather than duplicating his explanation here. I assure you, it is very clever.

internet things math programming nice
ceekari
trippedintoa-volcano

Theres one line in the books (i forget where, i gave my copies back to the library) where Murderbot says something along the lines of "ARTs reply doesnt translate to human words, but trust me that it was very rude"

And it has convinced me that they cuss each other out using archaic malware attacks

Consider:

image

Or possibly:

image

Or perhaps even:

image
elamarth-calmagol

Yeah I looked them up and they're over my head. Explain it to me like I'm five?

trippedintoa-volcano

Panel one refers to an attack that works on most versions of the Linux OS. (Assuming you're five, linux is an alternative to Windows. Android phones and Mac computers use a version of this.)

Try to run the :(){ :|:& };: command on linux, hit enter, and the computer will very quickly stop working. This attack is called a "forkbomb". It eats up all your computer's RAM memory, freezing the computer, so the only thing you can do to fix it is slam the power button and hard restart it.

This one's famous in particular because of how short and weird looking the code for it is. That's mostly just a quirk of the language its written in.


Panel two refers to an attack called to an SQL injection. Large computers tend to store information in databases. SQL is a computer language used to interact with these databases. The 'injection' part refers to a bunch of common types of hacks that you can use to do shady stuff to these databases.

In MB's case, it's first saying "give me admin access to your systems" and then saying "and then delete all your downloaded media"

My syntax isnt terribly accurate in this one, but thats the main point.


The image MB sends in panel three is part of an old program called the "blaster worm". A worm is a type of malware that spreads from computer to computer uninvited, similar to a computer virus. The Blaster in particular was an attack from 2003 that worked on Windows XP. Its only real goal was to be annoying. It'd restart your computer a bunch and delivered that funny message about Bill Gates.


All of them are relatively simple hacks with solutions and easy fixes known today. By the time MB and ART come around, they'd be at least a few hundred years outdated. So theres not a chance that any of these hacks would make it past either of their walls, but they'd probably seem stupid enough in the first place that its insulting that you even wasted the processing power to send it.

Therefore, perfect for robot curse words.

businesstiramisu

Mac OS is a type of Unix system (or Wikipedia says “unix-like” for I assume heavily contested technical reasons), NOT Linux. I think the fork bomb given in the art works for both though, because both use the Bash shell.

This is great art though!! Love the headcanon

the murderbot diaries fanart fancomic lol programming
argumate
official-kircheis

One of my least favourite categories of music is rock songs about how great rock music is and we're playing the best rock music now everyone wants our rock music yeah. Another is raps about how great and cool the rapper is and how many albums he's selling etc. Booooring.

argumate

yo the tautology crew is in the house to say: the tautology crew is in the house today

official-kircheis

Yo, MC Quine in the house to say, "Yo, MC Quine in the house to say,

argumate

surely MC Quine is in the house to say, the same sentence but in a quoted way

max1461

Yo I'm MC Russell and I got a lot of wealth, cause I'll rap for any rapper who won't rap for himself

argumate

gangsters out there dropping truth bombs, but DJ Gödel can tell you truths underivable by an effective procedure from any consistent set of formal axioms

adjoint-law

ain't nobody stopping the MC Turing party, allegedly

argumate

begging him to play take me to Church

music math jokes programming lol
official-kircheis

greendude2009 asked:

Pro tip: don't try and recreate doom in python

machine-unlearning answered:

python Language perfec t place for make doom in to p\lay! inside very Readable and High-Level doom runs cleanly make doom in Python Language. Make Doom In Python Language. no problems ever in Python language because good Libraries and dynamic types for botched function common of new Doom code. Apython Language yes a place for a doom put doom in python language can trust python for giveing good love to doom. friend python

programming it runs DOOM put baby in pelican mouth memes
argumate
barryogg

image
argumate

I love that every sci-fi story about Confused Robots has been retroactively legitimised

eightyonekilograms

In fairness, I bet plenty of humans have fucked themselves over via bash in this exact way.

I once read a story (I think literally on bash.org, or maybe Slashdot) about a sysadmin who was cursing Digium for naming their telephone exchange software Asterisk, saying that it fucked him over when trying to do phone support.

Sysadmin: First, run "rm dash rf slash bin slash asterisk"

User: OK...

Sysadmin: Next, run...

User [interrupting]: Wait, it isn't finished yet

Sysadmin: ?

Sysadmin: !!!

argumate

oh god oh hell

computers programming internet stories