Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. OpenJev(openjev.com ↗)
    51comments
  2. Jemalloc 5.4.0(github.com/jemalloc ↗)
    47comments
  3. Microsoft exec called AI scraping 'the largest theft of labor in human history'(techcrunch.com ↗)
    56comments
  4. The scourge of x86 emulation(fex-emu.com ↗)
    28comments
  5. Astra for Law(openai.com ↗)
    592comments
  6. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    136comments
  7. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    230comments
  8. Qwen 3.8 Omni Flash(qwen.ai ↗)
    83comments
  9. Replacing Pull Requests with Delta(zed.dev ↗)
    6comments
  10. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    170comments
  11. Wax motor(wikipedia.org ↗)
    72comments
  12. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    40comments
  13. When the fractional part of a float fixes your shader(crocidb.com ↗)
    1comments
  14. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    234comments
  15. Dr Julius Neubronner's Miniature Pigeon Camera(publicdomainreview.org ↗)
    discuss
  16. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)(byteshape.com ↗)
    11comments
  17. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    157comments
  18. How to Write with an LLM(sockpuppet.org ↗)
    114comments
  19. Ask A Monk – A digital wilderness for thoughts with no immediate answer(askamonk.online ↗)
    24comments
  20. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    59comments
  21. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    29comments
  22. Speeding up gearhash on ARM64(sam.dev ↗)
    discuss
  23. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    44comments
  24. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    371comments
  25. How do we prevent mathemathics from devolving into the Medieval Era of secrecy?(mathoverflow.net ↗)
    109comments
  26. Apple detectives solved mystery of ancient tree and rewrote the history of fruit(scientificamerican.com ↗)
    12comments
  27. The most important product decision is what you don't build(liamnugent.me ↗)
    39comments
  28. Why Does the Universe Expand?(cosmicave.org ↗)
    60comments
  29. CrowdSec Source Code Leak(crowdsec.net ↗)
    49comments
  30. Show HN: Snapdrop: Instantly share files between devices. No setup, no signup(snapdrop.me ↗)
    39comments

A bootable CD image with a retro game in a single tweet

1004 pointsby 8y agoquaxio.com
140 comments
8y agoHN ↗

That's the kind of thing I come here for! Tiny hacks of all sorts.

8y agoHN ↗

Same. I come here to witness what is basically programming magic to me. I'll need a couple of life times before I can become this skilled.

8y agoHN ↗

Awww. That first link silently requires WebGL in order for the animations to work, and doesn't implement a fallback. :'(

8y agoHN ↗

There's almost as much header information as there is code!

8y agoHN ↗

I was confused as to how you could represent a bootable CD image in printable characters. It turns out that you can't. This is a tweet of a perl script which creates a cd.iso file that you can then boot from. The perl script significantly decompresses the data in the tweet.

That said, this is a playable game in around 60 bytes of actual data which is impressive.

8y agoHN ↗

Not CD images, but there is DOS C compiler generating executables with only printable characters (and also no self-modifying code that could contain non-printable characters)

http://www.cs.cmu.edu/~tom7/abc/paper.txt (view in monospace font, 160 character lines)

8y agoHN ↗

Man that shirt is awesome... But man I would never wear that shirt as that looks like the crown jewel of any neckbeards collection

8y agoHN ↗

It sounds like you've been trained to hate something that you actually love. That's kind of sad. Couldn't you just wear the awesome shirt while avoiding the negative aspects of neckbeards?

8y agoHN ↗

It's pretty light compression from what I can tell - basically just squashing down runs of nulls to a single count.

8y agoHN ↗

I tried xz -9 on it and found, to my surprise, that it was actually longer than RLE!

Then I tried gzip -9, because perhaps that has a smaller header? Yup, saved a few bytes, now it's about the same size. Finally, I remembered that bzip2 does a lot better on text than gzip, and who knows, it might also have a shorter header than xz. Again, a few more bytes saved! Down to 223, where the original is 249 bytes (including the 'say' part but excluding the unnecessary delimiting apostrophes or the rest of the command).

8y agoHN ↗

Took me a second to figure out after looking at the assembly that it's possible because of base64.

8y agoHN ↗

That said, this is a playable game in around 60 bytes of actual data which is impressive.

.. and way smaller than your comment .

8y agoHN ↗

I looked at the that tweet for five or six minutes and was stumped. Now this makes more sense, thanks.

8y agoHN ↗

Most of the "compression" is zero bytes due to fixed offsets of various things (e.g. the first 16 sectors of an ISO 9660 image are a "system area" not used by the actual file system).

8y agoHN ↗

Yeah, it's a really simple run-length encoded ISO expressed as a Perl script.

8y agoHN ↗

I remember x86 real mode back in the day. Pretty hideous and hacky compared to what we have now.

8y agoHN ↗

what we have now

x86 processors still boot into real mode…

8y agoHN ↗

It's my understanding that UEFI actually comes up directly into long mode?

"UEFI firmware performs those same steps, but also prepares a protected mode environment with flat segmentation and for x86-64 CPUs, a long mode environment with identity-mapped paging. The A20 gate is enabled as well."

- https://wiki.osdev.org/UEFI

8y agoHN ↗

This inadvertently triggered my A20 gate rage.

8y agoHN ↗

Unfortunately most BIOS services are only available in real mode, so it's often necessary to switch back and forth.

8y agoHN ↗

Your snake game doesn't even have food for the snake to eat? The snake just grows without eating, until the head collides with the tail somewhere? Pssh, amateur hour...

/s (Just kidding this is actually super cool.)

8y agoHN ↗

It's Tron-ish (the post says Tron, where did you read snake?) :P

8y agoHN ↗

It's a fair assumption to make, as the difference between Tron and Snake is effectively just single player vs multiplayer.

8y agoHN ↗

No it isn't. In TRON you leave a trail behind. In Snake, you grow as you eat and drag your body along the path you crawled. TRON's trail is static, Snakes body is dynamic.

8y agoHN ↗

I said effectively.

TRON's trail is static, Snakes body is dynamic.

And that difference only exists to support the single player vs multiplayer dynamic. If Snake left a Tron tail then it would be a very short, unfun experience. If Tron didn't leave a permanent trail then matches would last too long.

8y agoHN ↗

And that difference only exists to support the single player vs multiplayer dynamic

Maybe the single player vs multiplayer difference only exists to support the different tail mechanics.

8y agoHN ↗

In the middle ground, NIBBLES.BAS was snake and had a competitive 2 player mode plus a selection of levels/arenas.

8y agoHN ↗

So then OP created single-player Tron instead of Snake?

8y agoHN ↗

Woops... I skimmed the article and watched the 30MB GIF

8y agoHN ↗

My first thought was to make random sectors of the first hard drive the "food"... For better or for worse, this stuff really brings me back to my teens. Nice job!

8y agoHN ↗

You just reminded me of an old game that made "snow" for the screen by copying a specific location on the disk into video memory.

8y agoHN ↗

nice to see demos in action without running random code - thanks. Demos are without a doubt the best way to show the maths can look cool.

8y agoHN ↗

This is great, and ironically it’s sitting next to another HN article where, in the comments, someone is actually defending a NYT news article that weighs in at 6MB.

In a time when most software is filled with superfluous waste and endless layers of abstraction and libraries, it’s nice to see that the art of writing minimal software is not completely lost.

8y agoHN ↗

There is something to the saying "less is more".

8y agoHN ↗

For sure, although as a counterpoint I’ve also seen programmers do the reverse. Spending a lot of effort building bad abstractions to completely minimize code reuse/size, when really we would have been better off with slightly longer code that was clearer and that meshed better with our problem domain.

8y agoHN ↗

Further irony: this page weighs over 30MBs, thanks to a huge GIF that is arguably not necessary for the article.

8y agoHN ↗

that made me chuckle, judging from the whole idea, it's part of the fun

8y agoHN ↗

Yeah, not happy about that idiocy (probably 1MB as video) burning through 10% of my monthly bandwidth on the first day of the month...

8y agoHN ↗

I think "1MB as video" actually _hugely_ overestimates the size that file could be if it were just e.g. mp4 with the same frame rate, quality, etc.

8y agoHN ↗

Wow, how low is your monthly download cap?? What ISP and where?

8y agoHN ↗

Probably mobile, here are the plans mine offers (I'm on the 2GB one): https://www.whistleout.com.au/MobilePhones/Carriers/iiNet

So page bloat is a real issue, not just "old man rants about good old days". A shame really because the rest of the page is pretty light wieght, 5.2kb for the content and 2.2 for the css.

Even worse is that the static preview of the monster gif is the second largest element.

8y agoHN ↗

Hey, I've got a 50 MB mobile cap myself. But I don't complain since it's a free add-on on my phone+text plan.

8y agoHN ↗

I used to have 250MB free with my internet contract until the ISP silently upgraded it to 500MB recently (must have been the past year or so, not sure when).

If you use it only occasionally to read a few articles, you can do fine with only a few megabytes. Heck, I'd almost say kilobytes if bloat wasn't so common. Anyway, that's until shit like this comes along. If you were truly trying to watch a video---sure, that uses a lot of that tiny data bundle in one go, but a gif that should have been a video truly leaves you wondering why was this necessary?!

8y agoHN ↗

You just made me think of a GIF-to-mp4 conversion service that runs as a proxy.

Sadly, because of the "HTTPS everywhere!!!11" thing, such a service would not be viable (it would need to rewrite the <img> to a <video> in order to work, of course).

8y agoHN ↗

Opera were offering something like this for a while. With the support of a browser and HTTP proxying it's not a problem, the SSL terminates at the proxy and is re-encrypted under the proxy's SSL.

Many web services will take an uploaded gif and turn it to webm before showing it, e.g. Twitter.

8y agoHN ↗

Very cool. My version of base64 wants -d, not -D, though.

8y agoHN ↗

Linux vs BSD (ie Mac OS X). Sorry about that. Also, you shouldn’t paste weird looking things from the internet in your console :P

8y agoHN ↗

yeah paste it into your plain text editor first and then do a code review and then save it to a jump drive and spin up the old backup computer that’s been wiped clean and then open up a sandboxed vm and then remove the wifi chip and then run it

8y agoHN ↗

Hats off for making use of the AAA instruction. That's a very clever sequence converting up/down/left/right to -320/+320/-1/+1.

8y agoHN ↗

For those who don’t know, x86 had support for binary coded decimal (you end up wasting a bunch of bits).

AAA converts the result of the addition of two valid unpacked BCD digits to a valid 2-digit BCD number.

8y agoHN ↗

You should investigate adding an RSS feed!

8y agoHN ↗

Man I love these things. Back before Twitter upped their character limits, I remember a trick to cram more data in a tweet was to abuse how Twitter counts characters (it attempts to count visually rather than by byte), so by using a ton of multipart emojis or larger Unicode characters to over double the information that could fit in a tweet.

8y agoHN ↗

I thought about using Unicode, but it felt like cheating.

Perhaps someone can fit two games in a single multibyte tweet?

8y agoHN ↗

IIRC weren't the Twitter length changes only applied to languages that weren't benefiting from the more "dense" encodings.

Meaning languages like Chinese and Japanese are still at the old limit.

8y agoHN ↗

Multibyte chars is optimizing for Twitter, not for a set amount of bytes. If you try to fit in 140 bytes and you use >140 bytes because they are multibyte chars, then yeah, you're cheating. But if you're trying to "fit in a tweet", I'd say that's perfectly fair game.

Anyhow, two games... cool, but to be perfectly honest, I thought the game was going to be more like the real snake than just drawing a non-overlapping line on screen. A more impressive game might be more impressive than two games.

Then again, two games is also pretty darn cool.

8y agoHN ↗

This is the second time this week I've seen someone note that ISO standards are expensive - are they copyrighted or something? Why doesn't someone just publish them online for free?

8y agoHN ↗

I bought the ISO 14000 Standard Document (Environmental Management) for $170 earlier this year, so it is not expensive for a company. Not sure how the "technical documents" ala ISO 9660 differs in price.

The certification on the other hand is a bit more costly though. My estimation of the certification cost for a ~20 people company if you do it as frugally as possible ended up at $18000 for the first year investment, and $6200 recurring the following years.

8y agoHN ↗

Looks like the turbo button needs to be in the on position for this one: 0.05 FPS in a qemu KVM on my old P8600... I presume the game loop uses the hardware clock :P

btw my base64 util needed lower case -d

8y agoHN ↗

There’s a comment on the page.

For some reason, emulators (at least the ones I tried) wait 4x what real machines wait when you use BIOS int 15b 86h. You can tweak the code if you want to play at a faster speed.

There’s probably a sound explanation for this discrepancy...

8y agoHN ↗

I can't say I entirely understand how the Elapsed Time Wait works, but testing in qemu, I was able to get it to a good speed by replacing the

  inc cl

with a

  nop
  inc dx

By opening in a hex editor, finding

  bf86 fec1

and replacing with

  bf86 9042

If you're on a very slow system, maybe just use 2 nops or a 2-byte nop.

8y agoHN ↗

I couldn't find "bf86 fec1". I did however find "b486 fec1".

"bf86 9042" made it literally so fast I physically couldn't keep up. The following worked for me (w/ QEMU on old (no KVM) Pentium M), this may be too fast on newer machines:

  xxd cd.iso | sed 's/89c3 01de b486 fec1 cd15 b445/89c3 01de b486 9042 cd15 b445/' | xxd -r > cd2.iso

(Note the creation of "> cd2.iso")

8y agoHN ↗

This reminds me a bit of the science of nanoinformatics as described in one of the Expanse novellas (The Vital Abyss):

"A thought experiment from my first course in the program: Take a bar of metal and put a single notch in it. The two lengths thus defined have a relationship that can be expressed as the ratio between them. In theory, therefore, any rational number can be expressed with a single mark on a bar of metal. Using a simple alphabetic code, a mark that calculated to a ratio of.12152205 could be read as 12-15-22-05, or “l-o-v-e.” The complete plays of Shakespeare could be written in a single mark, if it were possible to measure accurately enough. Or the machine language expression of the most advanced expert systems, though by then the notch might be small enough that Planck’s constant got in the way. How massive amounts of information could be expressed in and retrieved from infinitesimal objects was the driving concern of my college years."

Pure fiction at this point, but it would be an interesting experiment to encode data into objects that could be expressed using the mathematical ratio of their shapes or sizes.

8y agoHN ↗

Yep, not fiction at all, pretty much what is used for state-of-the-art compression.

8y agoHN ↗

The fiction part is being able to notch the bar sufficiently precise to store any significant amount of data.

8y agoHN ↗

The same has been said about Pi (3.14). If you can compute, store and search enough the digits of Pi, you can reference anything by just providing the 'start' and 'finish' locations. Unfortunately, with enough digits of Pi, the 'start' and 'finish' numbers can get quite long themselves.

8y agoHN ↗

Years ago I tried this and basically ended up proving that if Pi is random and you are "compressing" random data, on average the start and finish numbers together are at least as long as the numbers you are trying to "compress."

8y agoHN ↗

Did you proove it formally or only by experiment. If it were a real proof, did you publish it somewhere?

8y agoHN ↗

In fact, any lossless compression algorithm has the property that the output is (on average) at least as long as the input. The best you can hope for is an algorithm that compresses the kind of data that humans want to store, at the expense of making other data a bit longer. If you're trying to compress random data then you just can't do it.

Here's a proof: consider the strings of length n or less, suppose there are M of them in total. Their average length is just the sum of all their lengths divided by M, and the average length of their compressed versions is just the total length of the compressed versions divided by M. Since the compression is lossless the compressed strings must all be different.

Since there are M strings, if any of them mapped to a string of length more than n then there must be some string of length at most n not being mapped to, so the average length can be improved by instead mapping that string to the shorter string. So any optimal compression method must map only to the strings of length at most n.

So the M outputs are just the M inputs, possibly permuted. So their total length is the same, and hence their average length is the same.

8y agoHN ↗

any lossless compression algorithm has the property that the output is (on average) at least as long as the input.

The article you’ve linked says nothing about average. It says that for every algorithm there’s at least some input files that increase the size. It even explains more about that:

Any lossless compression algorithm that makes some files shorter must necessarily make some files longer, but it is not necessary that those files become very much longer. Most practical compression algorithms provide an "escape" facility that can turn off the normal coding for files that would become longer by being encoded. In theory, only a single additional bit is required to tell the decoder that the normal coding has been turned off for the entire input

8y agoHN ↗

Thanks. I realized this just after I posted it, so I wrote the proof into my comment instead.

8y agoHN ↗

In fact, any lossless compression algorithm has the property that the output is (on average) at least as long as the input

I don't think this is true. If it was, lossless compression would be useless in a lot of applications. It's pretty easy to come up with a counter example.

E.g.

(simple huffman code off the top of my head, not optimal)

symbol -> code

"00" -> "0"

"01" -> "10"

"10" -> "110"

"11" -> "111"

If "00" will appear 99.999% of the time, and the other 3 symbols only appear 0.001% of the time, the output will "on average" be slightly more than half the length of the input.

8y agoHN ↗

Sure, I'm assuming that (a) you are trying to encode all strings of length at most n and (b) you have the uniform distribution over those strings. This makes sense in the original context of encoding random data.

8y agoHN ↗

i did somewhat the same thing. it introduced me to programming... i thought how about multiple start indices and fixed width? you can then compress the list of start indices in the same manner until you reach sufficient compression :D

8y agoHN ↗

The indexes will, on average, have more digits than the sequence you compress. This is true for any infinite sequence of digits, not only Pi.

8y agoHN ↗

World's most painful compression algorithm: Finds a mathematical series of infinite digits, and the offset into it, that most efficiently compresses data passed in. Probably have to chunk the data up to make this efficient.

Of course one can argue that all current real life compression algorithms are aiming to simulate this, and that a brute force algorithm is one of those "after turning the sun into a CPU, still won't have enough compute power to finish the problem" types of solutions.

8y agoHN ↗

Wow, isn’t there a really low probability of finding your phone number in the first 200m digits of pi? (0.09995% in first 100m) I’m tempted to start throwing a dictionary of phone numbers through this pi lookup to find your number, call you, and verify, I think you could quickly narrow in on your phone number given the information above.

8y agoHN ↗

I think you'll have trouble. Assuming the first digit of the phone number is somewhere between 114.5 million and 115.5 million, you have 1 million potential 11 digit numbers to check.

There are 10^11 sequences with 11 digits. The number of people in the USA is 3×10^8, and we can assume there is roughly 1 number per person (some people don't have a phone number and some people have more than one, but it turns out that the exact approximation won't matter unless we're a few of orders of magnitude off). So about 0.3% of 11 digit sequences are valid phone numbers.

So there are approximately 0.3% × 1000000 = 3000 people with phone numbers around the 115 millionth digit of pi. You have no way of knowing which one of those people is sjcsjc.

8y agoHN ↗

It'd be a great 1 person-audience magic trick to call up all 3000 of those people and say, "Hi sjcsjc, I found your phone number in Pi".

8y agoHN ↗

Derren Brown did a great series of tricks based on probability.. your comment reminded me on the one that showed a video of him flipping 10 heads in a row on an unbiased coin. He revealed them that he had done it by flipping a coin for hours until he got that sequence.

8y agoHN ↗

Teller has made a similar statement, about practicing something more than anyone would find reasonable, so the trick is just in being able to do it.

8y agoHN ↗

Or the machine language expression of the most advanced expert systems, though by then the notch might be small enough that Planck’s constant got in the way.

With Planck's length being roughly 10^-35m, I'd say you'd hit the limit trying to store more than 15 bytes.

8y agoHN ↗

This is insightful. 15 bytes is not a lot. I wonder what are other narural limits on information density? For example, magnetic field. Is there a least measurable difference?

8y agoHN ↗

Also depends on the length of the metal rod, doesn't it?

8y agoHN ↗

The observable universe is 2^205.5 Planck lengths across, so you can store at most 205 bits, or 25 bytes.

8y agoHN ↗

And at that length your latency gets reeeeeeal bad.

8y agoHN ↗

How are you calculating a value of simply 15 bytes? The proposal is that the mathematical value of the ratio of the lengths of rod and the notch will deliver a value on the number line, which in effect can be of any desired length. You actually could find a number that can represent the complete contemporary knowledge of Humanity.

The limitations mentioned in the above comment relate to the fact that to know you'd arrived at the number designed into the Notch and the Rod, you'd have to have agreed to beforehand the tolerance limits on measurement of this 'device' so that the uncertainty in measurement can be ignored and the ratio derived.

To maybe get the right number you would have to expand your possible number of ratios (at a certain measurement sensitivity you would have a certain number of lengths you could use, and thus certain number of ratios would be available to you) and to get just the right number to describe your whole "machine language expression of the most advanced expert systems" you would have to delve into tolerances of the Plank length.

Or adjust the size of your rod length and notch, make them bigger, to get that sweet number with a 'poorer' level of sensitivity.

.. Or find a number with enough usable number sequences to serve the purpose and program in the numbers surrounding gibberish as markers/jump points to the next sequence of usable numbers. I suppose you could find enough usable sequences in the full expression of pi (as it's rational expression is without end) to write a program that can decode the full linux kernel out of it.

8y agoHN ↗

Assuming the length of the rod is 1m, and you have a resolution of one plank length, there are 10e35 possible ratios you can express (because that's the number of possible locations of the notch). that's about 2^113, which is a number which fits in 15 bytes of information. As discussed below, if you also allow for the bar to be the size of the observable universe, this doesn't increase by much. A notch or ratio is linear, information and combinatorics grows a lot lot faster than that.

8y agoHN ↗

How would you say a rod to notch ratio of 22/7 compares? How much information would you say that has?

8y agoHN ↗

Meaningless on its own. What matters is how many distinct ratios are possible.

8y agoHN ↗

Meaningless on its own.

That's the crux. What we're saying is that, of these set of ratios, there exists one whose infinite decimal representation contains our intended data. Yes we'd be limited to Planck length resolution, but the idea is that we would determine such a ratio and construct the notch and bar in such a way that it yields the decimal sequence desired; the # of particular ratios is not relevant.

I wouldn't be surprised if it can be proven this can't be done, but then that would be proper question to ask.

8y agoHN ↗

you can loosely think of it as writing down a number in unary where each "digit" takes 1.6 x 10^-35 m space to draw.

8y agoHN ↗

But what does that have to do with the emergent ratio between the notch and the rod? There may be 10^35 possible steps, but that does not mean that the answer, the ratio of the notch and the rod, will be limited by that. The answer will come from the number line, where any irrational number can have however many trailing numbers. If the ratio of the rod and the notch is 22/7, how much information would you say that is?

8y agoHN ↗

If 'x' marks the notch of a rod of length "1", [0---------x------------1], then the implied ratio is not x/(1-x), but x/1 (so the ratio is always < 1.) Even so, your question could be "what is the information content of 1/7" (the presumed implication being that 1/7, while periodic, has an infinite decimal representation.)

But that is not the direction we are interested in. We would like, given a message, such as "l-o-v-e", or 12-15-22-05, or 0.12152205, to figure out what is the ratio that uniquely specifies it. As we can only mark one notch, we can create "only" h ~= 10^35 ratios, or represent h unique messages. We know how to distinguish between h unique elements with log(h) bits (we just enumerate them from 1 to h and write that number down in binary.)

8y agoHN ↗

Let's assume that the rod is 1 m in length, and say I wrote a book that is perfectly represented by the number 0.abcdefg...yz. If that number is perfectly represented by one of the ratios in set 'h', then have I not stored more infromation than 15 bytes?

As for x/(1-x), why not? And why limit ourselves to a 1 m rod? Why not a 22 m rod with a 7 m notch? I could then define the method of decoding the information via (Rod length)/(notch length). The I'd have 'infinite' information in the form of expression of pi.

My main issue with the parent comment is that they imply only 15 bytes of data could be stored via this method. I think that's prespoterous as the number of ratios my be only 15 bytes, the ratios themselves can have any possible size.

It becomes more a game of probability rather than that of exact numbers. Will you find the right number, from set 'h', that matches exactly what you wanted to say?

    0.abcd...xyz = [(notch length=alpha*plank length)/(rod length=beta*plank length)]

where alpha and beta are just any variables that you play with until you solve the equation.

8y agoHN ↗

A 22m rod with a 7m notch is perfectly ok. You'd then be encoding 7/22. As others have pointed out, the rod could span the known universe and it would still not matter.

Say you found a great message in the representation of 1/7. Weird, since it is a rational so if its representation is infinite, its periodic (you can't write down 1/π or 1/e for example, as these are irrationals.)

Excited you found that message, you want to put your notch exactly at 1/7 on the rod to celebrate it.

But you can't. Your desired notch position will fall between two possible notches, spaced one planck distance apart, and you'll have to pick one of the two.

And when you do, you truncate your message to 15 bytes worth of information.

8y agoHN ↗

You could split the package of data into chunks and place multiple notches on the bar. You'd need to include enough information to allow the chunks to be sorted into their original order for that to work.

As if this were a practical means of storing data.

8y agoHN ↗

The late mathematics popularizer Martin Gardner wrote about this concept in the 1970s (I think his example involved reducing the Encyclopedia Britannica to a notch), although I don't know if the idea was unique to him or if he was popularizing an earlier idea.

8y agoHN ↗

As someone that develops almost exclusively in high-level languages on top of may levels of abstraction, it's nice to see what can be accomplished close to the metal.

This reminds me of Steve Gibson's SpinRite, which (from what I recall) is a fully functional disk recovery utility written entirely in assembly. https://www.grc.com/spinrite.htm. Say what you want about the man, but this is something that's saved me on at least one occasion, and is smaller than things I produce that do a lot lot less.

8y agoHN ↗

There are people that will argue until they are blue in the face that his recovery software is useless.

But I have also had some success with it.

Everything that he releases is amazingly tiny. It just shows how much bloat modern software tends to have.

8y agoHN ↗

What I've read is that SpinRite simply just reads and writes to the disk, triggering the disk firmware to reallocate bad sectors. I think it just tries to read many times, which can sometimes help.

The other argument is that the various things SR tries to "manage" (sector interleave, getting various timing parameters "perfect", etc) were only relevant with ST-506 (!!) and similar disks from the 80s/very early 90s, and that anything remotely modern (even IDE, virtually 100% of SATA) generally doesn't provide enough low-level control surface that trying to micro-manage the disk's behavior will do anything particularly special.

Of course, I'm sure each manufacturer has their own tools and widgets that can use undocumented proprietary SATA/SCSI commands to control the drive's behavior at a very low level, but those kinds of tools are a) rare as hens' teeth and b) probably very easy to break disks with due to poor UI design and lack of documentation. Chances are the most expensive data recovery centers probably have some of these tools, and more importantly the training to know how not to kill HDDs with them :P

TL;DR: Yes, SR works, but probably just as well as dd3rescue; as always, if you think a disk is this side of dead and you think you have a chance without specialized tools, just imaging it is probably the best first step, because SR and all other tools will of course stress it.

With all of this said, I really, really like SR's startup animation :3 and I agree that it's refreshingly small.

8y agoHN ↗

The explanation is quite good but is there even more detail on what the assembly instructions are doing on a line by line basis? I’ve only written MIPS assembly and that was a long time ago.

8y agoHN ↗

i love love love this.

This is a fantastic way to get into low level programming with a fun,tangible and approachable result.

back in "the day (TM)", we used to do this with ..achem ..viruses on floppies :) Putting it in a tweet is just brilliant.

anyone remember the one where it would say "smoke more weed dude"? (or something of the sort) :)