Slashdot Mirror


The Universe in 4 Lines of Code?

serendigital writes "Stephen Wolfram, founder of Wolfram Research and creator of Mathematica has, after 10 years+ finished his book, "A New Kind of Science." In a "Wired" article entitled: The Man Who Cracked The Code to Everything ...," Steven Levy talks about how and why the book was written and more importantly, what it is about. The best part of the article is in this exchange: 'I've got to ask you,' I say. 'How long do you envision this rule of the universe to be?' ... 'I don't know. In Mathematica, for example, perhaps three, four lines of code.'" This book seems a little... nutty. But it's been submitted a bunch of times. If anyone wants to review it, go right ahead.

21 of 467 comments (clear)

  1. Silly mathematicians. by zzendpad · · Score: 5, Funny

    This is silly. The universe is far too simple to be explained by mathematics.

    1. Re:Silly mathematicians. by pnatural · · Score: 3, Funny

      but 42 is an integer!

    2. Re:Silly mathematicians. by baywulf · · Score: 2, Funny

      God is real but 42 is an integer!

  2. 4 Lines? Bleh... by number+one+duck · · Score: 5, Funny

    A *real* god would do it in but a single line of Perl.

  3. 4 lines of code by Anonymous Coward · · Score: 0, Funny

    void main()
    {
    int = 42;
    }

  4. related by bilbobuggins · · Score: 5, Funny

    In related news,
    Bill Gates concurred while noting that those four lines of course referenced msie.dll to get the job done.

  5. I can do it in one. by dstone · · Score: 5, Funny

    Four lines?! I don't know where this Wolfram guy was trained, but I can declare the constant 42 in a single line. Well, I suppose that does leave 3 lines for comments. And if anything was worth commenting...

    1. Re:I can do it in one. by Mike1024 · · Score: 3, Funny
      Hey,

      Four lines?! I don't know where this Wolfram guy was trained, but I can declare the constant 42 in a single line.

      Dude, it won't compile if it doesn't have a 'main' routine, thus:

      Const int Universe = 42
      main {
      // Do Nothing
      }

      You could trim it down, but you want to keep it readable.

      -M
      --
      "Goodness me, how unlike the FBI to abuse the trust of the American public." -- The Onion
  6. Easy... by commonchaos · · Score: 3, Funny

    just remove all but 4 cr-lf's (\n)

  7. Bug by DeadBugs · · Score: 5, Funny

    "The Universe in 4 Lines of Code?"

    Do you ever get the feeling there is a bug in one of those lines?

    --
    http://www.kubuntu.org/
    1. Re:Bug by Tablizer · · Score: 3, Funny

      (* Do you ever get the feeling there is a bug in one of those lines? *)

      Probably line #3 which says:

      male.libidoLevel := 6000;

      It was supposed to read:

      male.libidoLevel := 60.00;

    2. Re:Bug by shayne321 · · Score: 3, Funny

      It was supposed to read:

      male.libidoLevel := 60.00;

      Which is SOO tragic, considering line 4:

      female.bitchFactor *= male.libidoLevel;

      Imagine how much better Universe SP1 will be. :)

      Shayne

      --
      Today I didn't even have to use my AK; I got to say it was a good day -- Icecube
  8. Bah! by metacell · · Score: 2, Funny

    Wolfram is wrong! Einstein is wrong too! And newton also! They're all wrong!

    All of the universe can be described as a single atom of plutonium.

    http://www.newphys.se/elektromagnum/physics/Ludwig Plutonium/.

  9. Re:No, you really need 4 by Jester998 · · Score: 3, Funny

    Actually, I think that at least one of those lines will invoke the long processing cycle... I forget the exact number, but wasn't it 10^7 years?

  10. Re:4 Lines? Bleh... by Dwonis · · Score: 3, Funny

    It could also be done in 6 lines of very readable Python code. *ducks*

  11. Formulas on Work Money Power Time by Alien54 · · Score: 4, Funny
    As seen elsewhere:
    • Postulate 1: Knowledge is power
    • Postulate 2: Time is money
    • As every engineer knows, Power = Work/Time
    • Since: Knowledge = Power and Time = Money, then: Knowledge = Work/Money
    • Solving for Money, we get:
    • Money = Work/Knowledge
    • Thus, as knowledge approaches zero, money approaches infinity regardless of work done.
    • Conclusion: The less you know, the more you make (but then you probably knew that already).
    There is this addendum
    • New Postulate: Work = Perceived Value/Time
    • Therefore Power = Perceived Value/(Time * Time)
    • Since Knowledge = Power and Time = Money, Money = SQRT (Perceived Value/Knowledge).
    • Since all well brought up people know that Money = SQRT (All Evil), therefore:
    • Perceived Value = All Evil * Knowledge
    --
    "It is a greater offense to steal men's labor, than their clothes"
  12. Re:4 Lines? Bleh... by Tablizer · · Score: 5, Funny
    A *real* god would do it in but a single line of Perl.

    That explains why the world is so F'd up: he couldn't read it six months later to debug it
    :-p

  13. Re:My 4 lines of perl by Anonymous Coward · · Score: 1, Funny

    hey dumbass,
    6*4=24

  14. It's obviously only 1 line of code by Anonymous Coward · · Score: 1, Funny

    8x7=42

  15. Re:4 Lines? Bleh... by Gavitron_zero · · Score: 3, Funny

    that probably explains why noone really understand the universe then...

  16. Re:4 Lines? Bleh... by Dwonis · · Score: 3, Funny

    Why? What is wrong with syntactically significant whitespace? I've heard many people say it's so bad, but nobody has ever told me why it's bad, other than that it's different and therefore they don't like it.