Shlomi Fish avatar Shlomi Fish committed 7cd2a5b

Add the compression fortune.

Comments (0)

Files changed (3)


       date: 2009-12-14T17:06:02Z
       date: 2009-12-14T17:06:02Z
+    sharp-sharp-programming-ultra-compression: 
+      date: 2012-10-11T14:21:01Z
       date: 2009-12-14T17:06:02Z


+    <fortune id="sharp-sharp-programming-ultra-compression">
+        <meta>
+            <title>Ultra Compression</title>
+        </meta>
+        <irc>
+            <body>
+<saying who="tnzr">does anyone happen to know what std::allocator.allocate() does when you try to allocate 0 bytes?  I get a pointer back but I can&#39;t tell what it&#39;s pointing at and I can&#39;t seem to find anything on the web that gives a difinitive answer</saying>
+<saying who="GeDaMo">Why are you allocating zero bytes?</saying>
+<saying who="Billiard">tnzr: the same thing it always returns</saying>
+<saying who="tnzr">GeDaMo: we are implementing our own allocator for an assignment, and when asked what we should do if the user tries to allocate 0 bytes, the prof said to find out what std::allocator does and mimic that</saying>
+<saying who="GeDaMo"></saying>
+<saying who="tnzr">oh snap, thanks GeDaMo</saying>
+<saying who="GeDaMo">:)</saying>
+<saying who="rindolf">GeDaMo: zero bytes are enough to hold the Complete Works of Shakespeare.</saying>
+<saying who="GeDaMo">Depends on how many monkeys you have to decompress it :P</saying>
+<saying who="rindolf">GeDaMo: heh.</saying>
+<saying who="rindolf">Of course, I defined a custom decompressor that emits the complete works of Shakespeare on empty input and uses gzip compression otherwise.</saying>
+<saying who="rindolf">It&#39;s pretty large  though.</saying>
+<saying who="Billiard">redeemed: compress the decompressor using the same algo</saying>
+<saying who="Billiard">errr rindolf</saying>
+<saying who="rindolf">Billiard: OK.</saying>
+<saying who="rindolf">Billiard: heh.</saying>
+<saying who="Billiard">0 bytes = a decompressor for the entire works of shakespeare</saying>
+            </body>
+            <info>
+                <channel>##programming</channel>
+                <network>Freenode</network>
+                <tagline>Shakespeare, compressed</tagline>
+            </info>
+        </irc>
+    </fortune>


Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.