2,453 karma · joined August 20, 2013
If you expect N ones at the output, how can this machine be simulated in the space smaller than N?
This machine must decrement the digit N at the beginning of the tape, and move to the end of the tape to write "1", so it runs in time O(N^2), not O(N)? (as it takes N "trips" to the end of the tape, and each "trip" takes 1, 2, 3 .. N steps)
Since turing machines can not jump to any place on a tape in constant time (like computers can), does it have any impact on real computers?
At a certain stage, you realize that in order to be able to do only that job, you must make someone pay you for it. You must do it in a way (or in a volume) which makes others happy. The fact that it makes you happy is not enough anymore.
I don't think there is an angel and a devil. It is still the same thing. If you like the result of your work, there is a high chance that others will like it. You don't need to change what you do by a 100%. Changing it by 5% - 10% is often enough.
You can have a PNG and JPG version of the original image, with the same loss - "average error per pixel", and the files would be about the same size.
I know there is no lossy compression described in a PNG standard. But there exist programs which produce tiny PNG files with a loss. So comparing an MP4 encoder with a bult-in loss to a PNG encoder without any built-in loss is not fair. They should have made the MP4 encoder encode the video in a lossless way, just like they did with PNG.
In PNG, you look for an image with 100 - 200 colors (so that colors repeat more often) and losslessly encode it with DEFLATE.
In JPG, you look for an image with with a reduced description through DCT, and losslessly encode it with Huffmann trees.
1015 kB: https://sidbala.com/content/images/2016/11/outputFrame.png
1015 kB: https://sidbala.com/content/images/2016/11/outputFrame.png
It allows storing a full 8x8 pixel image in 32 Bytes (4 bits per RGB pixel).
There is a bug in Chorme, which I reported, but they told me they will not fix it: https://bugs.chromium.org/p/chromium/issues/detail?id=120485...
For most of people, wide support is more important than 20% smaller file size. That is why it is hard for WEBP to replace JPG.
To edit it, I guess you could paint over the text with white, and add a new text on top of it.
I have been gradually improving it for the past five years. It is a part of my photo editor https://www.Photopea.com. I know really a lot about PDF, I wish I didn't know that much :D I am glad to see that there are others who try to "make sense" of PDF files instead of just rendering them :)
** fun fact: Often, a PDF contains text as an array of characters, each has its X and Y coordinate and a style (white characters omitted). It is up to you to "cluster" them into words, lines, paragraphs ...
** Often, PDF text is made uneditable (on purpose). You see a text "Hello", but in fact, there is a text "bsiin", and a font, which renders "b" with a shape that looks like a letter "H", "s" as "e", and so on. If you open that PDF in a PDF viewer, select "Hello" and copy-paste it elsewhere, you get "bsiin".
** My business partner had problems with a wire transfer, so PayPal seemed as the easiest solution.
E.g. this C implementation of Deflate adds 2 kB to a binary file: https://github.com/jibsen/tinf