Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Insider News
  4. How small is the smallest .NET Hello World binary?

How small is the smallest .NET Hello World binary?

Scheduled Pinned Locked Moved The Insider News
questioncsharpdotnet
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kent Sharkey
    wrote on last edited by
    #1

    Washi[^]:

    Here is a dumb question that you probably never asked yourself: What is the minimal amount of bytes we need to store in a .NET executable to have the CLR print the string"Hello, World!" to the standard output?

    Because you never now when you might need a really small Hello World program

    I suppose it's possible some of these fripperfications might be useful elsewhere, but I'm somewhat doubtful. (and isn't P/Invoke kind of cheating here?)

    B O 2 Replies Last reply
    0
    • K Kent Sharkey

      Washi[^]:

      Here is a dumb question that you probably never asked yourself: What is the minimal amount of bytes we need to store in a .NET executable to have the CLR print the string"Hello, World!" to the standard output?

      Because you never now when you might need a really small Hello World program

      I suppose it's possible some of these fripperfications might be useful elsewhere, but I'm somewhat doubtful. (and isn't P/Invoke kind of cheating here?)

      B Offline
      B Offline
      BillWoodruff
      wrote on last edited by
      #2

      from EtymologyOnLine: frippery (n.) 1560s, "old clothes, cast-off garments," from French friperie "old clothes, an old clothes shop," from Old French freperie, feuperie "old rags, rubbish, old clothes" (13c.), from frepe, feupe "fringe; rags, old clothes," from Late Latin faluppa "chip, splinter, straw, fiber." The notion is of "things worn down, clothes rubbed to rags." The ironic meaning "finery" (but with overtones of tawdriness) dates from 1630s. @kent_sharkey Congratularios, Kent ! on your innovation "fripperifications," which i don't see anywhere else in the web. as an etymology/linguistics obsessee, i must ask you if this is an apt candidate for a neologism ... given what you see in the article cited ? cheers, bill

      «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

      K 1 Reply Last reply
      0
      • B BillWoodruff

        from EtymologyOnLine: frippery (n.) 1560s, "old clothes, cast-off garments," from French friperie "old clothes, an old clothes shop," from Old French freperie, feuperie "old rags, rubbish, old clothes" (13c.), from frepe, feupe "fringe; rags, old clothes," from Late Latin faluppa "chip, splinter, straw, fiber." The notion is of "things worn down, clothes rubbed to rags." The ironic meaning "finery" (but with overtones of tawdriness) dates from 1630s. @kent_sharkey Congratularios, Kent ! on your innovation "fripperifications," which i don't see anywhere else in the web. as an etymology/linguistics obsessee, i must ask you if this is an apt candidate for a neologism ... given what you see in the article cited ? cheers, bill

        «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

        K Offline
        K Offline
        Kent Sharkey
        wrote on last edited by
        #3

        Frippery was where I started from. I’m not sure why my brain insisted on the -ifications ending. Maybe to combine frippery and machinations? Sadly, I left no notes. :~

        TTFN - Kent

        B 1 Reply Last reply
        0
        • K Kent Sharkey

          Frippery was where I started from. I’m not sure why my brain insisted on the -ifications ending. Maybe to combine frippery and machinations? Sadly, I left no notes. :~

          TTFN - Kent

          B Offline
          B Offline
          BillWoodruff
          wrote on last edited by
          #4

          if you think what you are responding to are scams ... consider "fripperstings" ? imho, that is a true portmanteau. "Portmanteau word "word blending the sound of two different words" (1882) was coined by "Lewis Carroll" (Charles L. Dodgson, 1832-1898) for the sort of words he invented for "Jabberwocky," on the notion of "two meanings packed up into one word." As a noun in this sense from 1872."

          «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

          1 Reply Last reply
          0
          • K Kent Sharkey

            Washi[^]:

            Here is a dumb question that you probably never asked yourself: What is the minimal amount of bytes we need to store in a .NET executable to have the CLR print the string"Hello, World!" to the standard output?

            Because you never now when you might need a really small Hello World program

            I suppose it's possible some of these fripperfications might be useful elsewhere, but I'm somewhat doubtful. (and isn't P/Invoke kind of cheating here?)

            O Offline
            O Offline
            obermd
            wrote on last edited by
            #5

            At least the author realizes it was a waste of time. The reality is that as soon as he reached anything under 4,096 bytes in size the disk space consumption wouldn't shrink unless he got the file below 1,020 bytes, at which point the entire file would be stored in the directory entry.

            T 1 Reply Last reply
            0
            • O obermd

              At least the author realizes it was a waste of time. The reality is that as soon as he reached anything under 4,096 bytes in size the disk space consumption wouldn't shrink unless he got the file below 1,020 bytes, at which point the entire file would be stored in the directory entry.

              T Offline
              T Offline
              trønderen
              wrote on last edited by
              #6

              If you care for compact coding, look a the videos at www.pouet.net - lots of super impressing videos (animations) collected there! Take a look at e.g. Oscar's Chair by Eos :: pouët.net[^]. When you see what these guys manage to do in 4092 bytes, making a "Hello World" using the same amount of space is not quite as impressing :-) To see the movies at pouet.net you have to download the executable, usually wrapped in a zip file, and run it locally. I think they all take over the screen completely when they run. Beware that some videos require quite a few seconds for unpacking and initialization. First time you see the videos, you will be convinced that they download a lot of contents from internet. They don't. Unplug the network cable if you don't believe it! A few other good ones at pouet.net (the 4Kbytes ones is only a small fraction of the collection!): Binary Parasites by Fulcrum :: pouët.net[^] - 4096 bytes (zipping makes it grow to 4101 bytes) fr-013: flybye by Farbrausch :: pouët.net[^] - this one is 65536 bytes, but quite impressing. Skyline by LJ & Logicoma :: pouët.net[^] - 4073 bytes. The Grid 512B by Abaddon :: pouët.net[^] - 512 bytes, if you want it to fit in the directory entry. fr-08: .the .product by Farbrausch :: pouët.net[^] - another "big" one (65024 bytes), really an ad for the company making the tools. Note that some videos at pouet.net are made for non-PC hardware. A few of the old ones require e.g. old dx drivers which you probably haven't got on your PC.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups