"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.
With Planck's length being roughly 10^-35m, I'd say you'd hit the limit trying to store more than 15 bytes.
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.
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.
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.)
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)]
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.
If you do the ratio thing you have described you will find that alpha and beta are many, many times the size of the observable universe for something like a book. If you allow the length of the rod itself to also contribute to the information, you have added another symbol so you can store more than 15 bytes, but this doesn't even double the amount of bytes you can store.
Assuming all of it can be described as ascii characters, (ratio of.12152205 could be read as 12-15-22-05, or “l-o-v-e.”) then let's assume 4 numbers will be required to encode one letter. That gives us, in our limited system, 4 decimal bits to a byte (we really can't limit ourselves to just ratios that are sufficiently large and only made of 1s & 0s).
So, all human knowledge is, in our system,
Now, as I said earlier, the ratios may have an impressive number of numbers in them, expressed in a decimal system, and there are an infinite number of them on the number line itself, that does not mean all of those are available for use. We are limited to ratios derived from lengths which are multiples of the plank length. Assuming, for a particular rod and it's notch, there is a set 'h' that contains all the possible ratios. We will be limited to such ratios only to find our matching ratio, the ratio through chance of cosmic infinity, or not. If not, then we have to increase/decrease the design length of the rod and the notch to change the set 'h', and hope there is a number we are looking for.
How many such ratios, of the required length of 1.15 * 10^21 numbers, would exist if derived solely through the ratios, is unknown and wholly dependent on the information that has to be encoded. The longer the data, the higher the probability of not finding the right number. As you put it, there will be 15 bytes of choice, or in a one meter rod there will be 10^32 number of choices of ratios to play with. If you doubled the length of the rod, you would have twice the amount of choice, as so on. Again,
And again, you could find the ratio you are looking for, it will be a probability game.
Please read what I wrote carefully and respond point by point.
He's saying that there exists a certain ratio in the set of ratios whose decimal representation represents a corpus of knowledge, in this case the entirety of human knowledge.
It's the same idea as this example: http://www.angio.net/pi/
Did no one read the discussion below about encoding information into pi? This is the same concept. Yes, there are only 25 bytes worth of ratios to chose from, but those ratios themselves can, possibly, POSSIBLY, store all the information.
Show me an irrational number in real life.
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.
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
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.
(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.
Lossless compression is nothing more than taking advantage of prior knowledge of the distribution of the data you are compressing.
Random data isn't always (or even often) uniformly distributed. Everything we compress is "random" (in the context of information theory), so I disagree that it makes sense to assume uniformly distributed data.
My 11 digit phone number occurs around the 115 millionth digit, a grand saving of two digits.
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.
Discussed here previously (2014):
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.
As if this were a practical means of storing data.
That said, this is a playable game in around 60 bytes of actual data which is impressive.
http://www.cs.cmu.edu/~tom7/abc/paper.txt (view in monospace font, 160 character lines)
.. and way smaller than your comment .
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).
AAA converts the result of the addition of two valid unpacked BCD digits to a valid 2-digit BCD number.
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.
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.
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.
/s (Just kidding this is actually super cool.)
> 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.
Maybe the single player vs multiplayer difference only exists to support the different tail mechanics.
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.
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.
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?!
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).
Many web services will take an uploaded gif and turn it to webm before showing it, e.g. Twitter.
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.
Perhaps someone can fit two games in a single multibyte tweet?
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.
Meaning languages like Chinese and Japanese are still at the old limit.
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) :)
x86 processors still boot into real 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."
btw my base64 util needed lower case -d
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...
"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