haley.io
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
einfach_orangensaft@sh.itjust.works to Programmer Humor@programming.dev · 3 months ago

ultimate storage hack

sh.itjust.works

message-square
68
fedilink
818

ultimate storage hack

sh.itjust.works

einfach_orangensaft@sh.itjust.works to Programmer Humor@programming.dev · 3 months ago
message-square
68
fedilink
alert-triangle
You must log in or register to comment.
  • Little8Lost@lemmy.world
    link
    fedilink
    English
    arrow-up
    32
    ·
    edit-2
    3 months ago

    Stupid BUT: making the font in LibreOffice bigger saves space. so having 11 is readible but by changing the font size to like 500 it can save some mb per page
    I dont know how it works, i just noticed it at some point

    Edit: i think it was kb, not mb

    • Jankatarch@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      2 months ago

      Have a macro that decreases all font size on opening and then increases all again before closing.

      Follow me irl for more compression techniques.

    • InFerNo@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      2 months ago

      You could always diff the XML before and after to see what’s causing it.

    • SkaveRat@discuss.tchncs.de
      link
      fedilink
      arrow-up
      16
      ·
      2 months ago

      per page

      I mean, yes. obviously.

      If you had 1000 bytes of text on 1 page before, you now have 1byte per page on 1000 pages afterwards

  • wizzim@infosec.pub
    link
    fedilink
    arrow-up
    106
    ·
    edit-2
    3 months ago

    Awesome idea. In base 64 to deal with all the funky characters.

    It will be really nice to browse this filesystem…

    • CorvidCawder@sh.itjust.works
      link
      fedilink
      arrow-up
      10
      ·
      3 months ago

      Or use yEnc: https://en.m.wikipedia.org/wiki/YEnc

    • Aurenkin@sh.itjust.works
      link
      fedilink
      arrow-up
      81
      ·
      3 months ago

      The design is very human

  • Thorry84@feddit.nl
    link
    fedilink
    arrow-up
    76
    ·
    3 months ago

    It’s all fun and games until your computer turns into a black hole because there is too much information in too little of a volume.

    • proti@lemmy.world
      link
      fedilink
      arrow-up
      39
      ·
      3 months ago

      Even better! According to no hiding theorem, you can’t destroy information. With black holes you maybe possibly could be able to recover the data as it leaks through the Hawking radiation.
      Perfect for long term storage

      • Klear@lemmy.world
        link
        fedilink
        English
        arrow-up
        33
        ·
        3 months ago

        Can’t wait to hear news about a major site leaking user passwords through hawking radiation.

        • einfach_orangensaft@sh.itjust.worksOP
          link
          fedilink
          arrow-up
          8
          ·
          2 months ago

          i love this comment

      • mmddmm@lemm.ee
        link
        fedilink
        arrow-up
        10
        ·
        3 months ago

        Really-long term storage :)

        • limerod@reddthat.com
          link
          fedilink
          arrow-up
          1
          ·
          2 months ago

          Longer than your lifespan, too.

          • mmddmm@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            2 months ago

            Longer than the life span of the most long-lived star. By orders of magnitude.

  • Honytawk@feddit.nl
    link
    fedilink
    arrow-up
    29
    ·
    2 months ago

    Good luck with your 256 characters.

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      arrow-up
      28
      ·
      2 months ago

      When you run out of characters, you simply create another 0 byte file to encode the rest.

      Check mate, storage manufacturers.

      • PieMePlenty@lemmy.world
        link
        fedilink
        arrow-up
        12
        ·
        edit-2
        2 months ago

        File name file system! Looks like we broke the universe! Wait, why is my MFT so large?!

    • barsoap@lemm.ee
      link
      fedilink
      arrow-up
      13
      ·
      edit-2
      2 months ago

      255, generally, because null termination. ZFS does 1023, the argument not being “people should have long filenames” but “unicode exists”, ReiserFS 4032, Reiser4 3976. Not that anyone uses Reiser, any more. Also Linux’ PATH_MAX of 4096 still applies. Though that’s in the end just a POSIX define, I’m not sure whether that limit is actually enforced by open(2)… man page speaks of ENAMETOOLONG but doesn’t give a maximum.

      It’s not like filesystems couldn’t support it it’s that FS people consider it pointless. ZFS does, in principle, support gigantic file metadata but using it would break use cases like having a separate vdev for your volume’s metadata. What’s the point of having (effectively) separate index drives when your data drives are empty.

      • Brahvim Bhaktvatsal@lemmy.kde.social
        link
        fedilink
        isiZulu
        arrow-up
        1
        ·
        edit-2
        2 months ago

        …Just asking, just asking: Why is the default FILENAME_MAX on Linux/glibc 4096?

        • barsoap@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          2 months ago

          Because PATH_MAX is? Also because it’s a 4k page.

          FILENAME_MAX is not safe to use for buffer allocations btw it could be INT_MAX.

          • Brahvim Bhaktvatsal@lemmy.kde.social
            link
            fedilink
            isiZulu
            arrow-up
            1
            ·
            2 months ago

            Thanks! Got an answer and not 200 downvotes. This is why I love Lemm-Lemm.

  • MTK@lemmy.world
    link
    fedilink
    arrow-up
    161
    ·
    3 months ago

    If you have a tub full of water and a take a sip, you still have a tub full of water. Therefore only drink in small sips and you will have infinite water.

    Water shortage is a scam.

    • Kiuyn@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      If you have a water bottle and only drink half of it each time, you will also have infinite 💦

    • Aux@feddit.uk
      link
      fedilink
      English
      arrow-up
      15
      arrow-down
      1
      ·
      3 months ago

      There is a water shortage?

      • Feyter@programming.devM
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        3 months ago

        Out of context, but this video showing the amount of freshwater on the planet in perspective was eye opening for me… I see water availability different since.

        https://youtu.be/b3_Abb2Vqnc

        • Ricky Rigatoni@lemm.ee
          link
          fedilink
          arrow-up
          5
          ·
          2 months ago

          Don’t worry, global warming is desalinating the water so it will all be fresh in time 🙏

      • MTK@lemmy.world
        link
        fedilink
        arrow-up
        21
        ·
        3 months ago

        Exactly!

  • tatterdemalion@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    2 months ago

    https://github.com/philipl/pifs

  • some_guy@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Name all your files *.

  • hades@lemm.ee
    link
    fedilink
    arrow-up
    15
    ·
    edit-2
    2 months ago

    deleted by creator

    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      Ah memories. That was an interesting lesson.

  • JamonBear@sh.itjust.works
    link
    fedilink
    arrow-up
    47
    ·
    2 months ago

    You want real infinite storage space? Here you go: https://github.com/philipl/pifs

    • qnvx@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      2 months ago

      “π holds every file that could possibly exist!”

      IIRC, this has not been proved actually.

    • nibbler@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      2 months ago

      that’s awesome! I’m just migrating all my data to πfs. finally mathematics is put to a proper use!

  • bstix@feddit.dk
    link
    fedilink
    arrow-up
    21
    ·
    2 months ago

    It’s like that chip tune webpage where the entire track is encoded in the url.

    • LemmyFeed@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      10
      ·
      2 months ago

      Link?

      • PoolloverNathan@programming.dev
        link
        fedilink
        arrow-up
        9
        ·
        2 months ago

        https://beepbox.co/ for example

      • skisnow@lemmy.ca
        link
        fedilink
        English
        arrow-up
        8
        ·
        2 months ago

        Are you trying to get rickrolled?

  • Typewar@infosec.pub
    link
    fedilink
    arrow-up
    36
    ·
    3 months ago

    Reminds me of a project i stumbled upon the other day using various services like Google drive, Dropbox, cloudflare, discord for simultaneous remote storage. The goal was to use whatever service that has data to upload to, to store content there as a Filesystem.

    I only remember discord being one of the weird ones where they would use base512 (or higher, I couldn’t find the library) to encode the data. The thing with discord, is that you’re limited by characters, and so the best way to store data in a compact way is to take advantage of whatever characters that are supported

    • astrsk@fedia.io
      link
      fedilink
      arrow-up
      38
      ·
      3 months ago

      What about a hard drive made of network pings?

      https://m.youtube.com/watch?v=JcJSW7Rprio

    • 𝙲𝚑𝚊𝚒𝚛𝚖𝚊𝚗 𝙼𝚎𝚘𝚠@programming.dev
      link
      fedilink
      arrow-up
      28
      ·
      3 months ago

      I remember a project where someone booted Linux off of Google Drive. Cursed on many levels.

    • psud@aussie.zone
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 months ago

      GmailFS was a thing

    • jjagaimo@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      14
      ·
      edit-2
      3 months ago

      “Harder Drive”

      Store the data in pings that constantly get resent to keep the data in the internet

      • bitfucker@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        I was looking for this comment. I knew someone from Lemmy would have seen that

      • fnrir@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        !beatmetoit@lemm.ee

    • kate@lemmy.uhhoh.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      I don’t know if it was this one but it might’ve been this one https://github.com/qntm/base65536

      • Typewar@infosec.pub
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        Yep, that looks like it!

  • WorldsDumbestMan@lemmy.today
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Let me guess, over 30 years old.

  • InnerScientist@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    deleted by creator

  • kryptonianCodeMonkey@lemmy.world
    link
    fedilink
    arrow-up
    56
    ·
    2 months ago

    I had a manager once tell me during a casual conversation with complete sincerity that one day with advancements in compression algorithms we could get any file down to a single bit. I really didn’t know what to say to that level of absurdity. I just nodded.

    • schnurrito@discuss.tchncs.de
      link
      fedilink
      arrow-up
      8
      ·
      2 months ago

      https://xkcd.com/1381/

    • VineGram@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      2 months ago

      Maybe they also believe themselves to be father of computing

    • bluemellophone@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 months ago

      That’s precisely when you bet on it.

    • pressanykeynow@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      2 months ago

      Well he’s not wrong. The decompression would be a problem though.

    • Valmond@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      2 months ago

      Send him your work: 1 (or 0 ofc)

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      Just make a file system that maps each file name to 2 files. The 0 file and the 1 file.

      Now with just a filename and 1 bit, you can have any file! The file is just 1 bit. It’s the filesystems that needs more than that.

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      arrow-up
      12
      ·
      edit-2
      2 months ago

      You can give me any file, and I can create a compression algorithm that reduces it to 1 bit. (*)

      spoiler

      (*) No guarantees about the size of the decompression algorithm or its efficacy on other files

      • The Ramen Dutchman@ttrpg.network
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        Here’s a simple command to turn any file into a single b!

        echo a > $file_name
        
    • Randelung@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      2 months ago

      It’s an interesting question, though. How far CAN you compress? At some point you’ve extracted every information contained and increased the density to a maximum amount - but what is that density?

      • Couldbealeotard@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 months ago

        I think by the time we reach some future extreme of data density, it will be in a method of storage beyond our current understanding. It will be measured in coordinates or atoms or fractions of a dimension that we nullify.

      • Max@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        2 months ago

        This is a really good question!

        I believe the general answer is, until the compressed file is indistinguishable from randomness. At that point there is no more redundant information left to compress. Like you said, the ‘information content’ of a message can be measured.

        (Note that there are ways to get a file to look like randomness that don’t compress it)

    • einfach_orangensaft@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      8
      ·
      2 months ago

      u can have everthing in a single bit, if the decompressor includes the whole universe

  • stochastictrebuchet@sh.itjust.works
    link
    fedilink
    arrow-up
    87
    ·
    3 months ago

    Broke: file names have a max character length.

    Woke: split b64-encoded data into numbered parts and add .part-1…n suffix to each file name.

    • mmddmm@lemm.ee
      link
      fedilink
      arrow-up
      10
      ·
      3 months ago

      I’d go with a prefix, so it’s ls-friendly.

    • tetris11@lemmy.ml
      link
      fedilink
      arrow-up
      16
      ·
      3 months ago

      each file is minimum 4kb

      (base64.length/max_character) * min_filesize < actual_file_size

      For this to pay off

      • Venator@lemmy.nz
        link
        fedilink
        arrow-up
        2
        ·
        2 months ago

        Just use folders instead 😏

      • The Ramen Dutchman@ttrpg.network
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 months ago

        each file is minimum 4kb

        $ touch empty_file
        $ ls -l
        total 8
        -rw-rw-r-- 1 user group 0 may 14 20:13 empty_file
        $ wc -c empty_file 
        0 empty_file
        

        Huh?

        • tetris11@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          2 months ago

          Oh, I’m thinking folders aren’t I. Doy…

          • The Ramen Dutchman@ttrpg.network
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 months ago

            It seems those are 4 KiB on Linux, interesting to know.

    • psud@aussie.zone
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      2 months ago

      Browse your own machine as if it’s under alt.film.binaries but more so

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 320 users / day
  • 3.95K users / week
  • 7.48K users / month
  • 18.7K users / 6 months
  • 1 local subscriber
  • 25.2K subscribers
  • 1.18K Posts
  • 23.3K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org