Results 1 to 15 of 15

Thread: Matrix joke for programmers

  1. #1
    Join Date
    Mar 2003
    Location
    Somewhere behind a sand dune
    Posts
    2,263

    Talking Matrix joke for programmers

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    //TheMatrix.cpp

    #include "TheMatrix.h"

    int i; // NumberofMatrices
    int j; // HumansWhoRejectMatrix
    i = 1;

    InitializeMatrix(i); //i = # of nested matrices

    j = GetHumansWhoRejectMatrix();

    while j != 0
    {
    i++;
    InitializeMatrix(i);
    j = GetHumansWhoRejectMatrix();
    }


    And what language is this in?
    A brave little theory, and actually quite coherent for a system of five or seven dimensions -- if only we lived in one.

    Academician Prokhor Zakharov, "Now We Are Alone"

  2. #2
    Join Date
    Nov 2000
    Location
    Geelong, Vic; Australia
    Posts
    1,131
    Neo++ ?

    When you are dead, you don't know that you are dead. It is difficult only for others.

    It's the same when you are stupid...

  3. #3
    Join Date
    Aug 2001
    Location
    Paris, France, Earth
    Posts
    2,588
    AAArgghh!!! Nooo!!! Not C++ again!!! I spend my days and parts of my nights battling with C++ code!!! Noooooo!!!!!!



    (the "TheMatrix.cpp" was a dead giveaway )
    "The main difference between Trekkies and Manchester United fans is that Trekkies never trashed a train carriage. So why are the Trekkies the social outcasts?"
    Terry Pratchett

  4. #4
    Join Date
    Nov 2000
    Location
    Geelong, Vic; Australia
    Posts
    1,131

    Re: Matrix joke for programmers

    It could be worse...


    ' TheMatrix.vbp

    Option Explicit

    Private Sub cmdEnterTheMatrix_Click()

    Dim i As Integer ' Number of Matrices
    Dim j As Integer ' Humas Who Reject Matrix

    i = 1

    Call InitializeMatrix(i) ' i = # of new matrices

    j = GetHumansWhoRejectMatrix()

    Do While j <> 0
    i = i + 1
    Call InitializeMatrix(i)
    j = GetHumansWhoRejectMatrix()
    Loop

    End Sub


    No, I am not going to try and write the InitializeMatrix() and GetHumansWhoRejectMatrix() functions and subroutines!!!

    When you are dead, you don't know that you are dead. It is difficult only for others.

    It's the same when you are stupid...

  5. #5
    Join Date
    Aug 2001
    Location
    Baltimore, MD
    Posts
    1,331
    Well, technically this is straight up C -- there are no C++ only features. However, most compilers use a .CPP as a clue that they should permit any C++ construction, as opposed to limiting the input to what C allows.

    I know, I know, too much information...


    //TheMatrix.cpp

    #include "TheMatrix.h"

    int i; // NumberofMatrices
    int j; // HumansWhoRejectMatrix

    i = 1;

    try
    {
    &nbsp;&nbsp;&nbsp;&nbsp;Initialize(i); //i = # of nested matrices

    &nbsp;&nbsp;&nbsp;&nbsp;while (GetHumansWhoRejectMatrix().Count() > 0)
    &nbsp;&nbsp;&nbsp;&nbsp;{
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i+ +;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In itialize(i);
    &nbsp;&nbsp;&nbsp;&nbsp;}
    }
    catch (NeoAppears& na)
    {
    &nbsp;&nbsp;&nbsp;&nbsp;AgentSmith* as = new AgentSmith();
    &nbsp;&nbsp;&nbsp;&nbsp;as.Locate(na);
    &nbsp;&nbsp;&nbsp;&nbsp;as.Terminate(na);
    &nbsp;&nbsp;&nbsp;&nbsp;delete as;
    }
    catch (RootError& e)
    {
    &nbsp;&nbsp;&nbsp;&nbsp;Handle(e);
    }

  6. #6
    Join Date
    May 2002
    Location
    Omaha,NE
    Posts
    238
    Wusses.

    Write it in Scheme or Cobol (or Jovial!) and I'll be impressed.

    -Chris Landmark
    (Note: Chris Landmark is not a programmer. He tells programmers what to do. Occasionally they even do it.)
    "Was entstanden ist, das muss vergehen. Was vergangen, auferstehn." -Klopstock & Mahler

    "Only liberals really think. Only liberals are intellectual. Only liberals understand the needs of their fellows." How much viciousness lay concealed in that word! Odrade thought. How much secret ego demanding to feel superior. - Heretics of Dune

  7. #7
    Originally posted by Chris Landmark
    Wusses.

    Write it in Scheme or Cobol (or Jovial!) and I'll be impressed.

    -Chris Landmark
    (Note: Chris Landmark is not a programmer. He tells programmers what to do. Occasionally they even do it.)
    Cobol????? PULEEEEZE

    The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense-E. W. Dijkstra

  8. #8
    Join Date
    Aug 2001
    Location
    Baltimore, MD
    Posts
    1,331
    Originally posted by Chris Landmark
    Wusses.

    Write it in Scheme or Cobol (or Jovial!) and I'll be impressed.
    Wow! One of the guys who remembers Jovial! I wonder who the other one is?

  9. #9
    Join Date
    Aug 2001
    Location
    Paris, France, Earth
    Posts
    2,588
    Originally posted by Chris Landmark
    (Note: Chris Landmark is not a programmer. He tells programmers what to do. Occasionally they even do it.)
    Ack!!! There's a project manager in here!!!!

    Mind you, the real challenge would be to write the code in ASN 1....
    "The main difference between Trekkies and Manchester United fans is that Trekkies never trashed a train carriage. So why are the Trekkies the social outcasts?"
    Terry Pratchett

  10. #10
    Join Date
    Nov 2000
    Location
    Geelong, Vic; Australia
    Posts
    1,131
    01010100
    01101000
    01100101
    01110010
    01100101
    01000000
    01101001
    01110011
    01000000
    01101110
    01101111
    01000000
    01110011
    01110000
    01101111
    01101111
    01101110

    When you are dead, you don't know that you are dead. It is difficult only for others.

    It's the same when you are stupid...

  11. #11
    Join Date
    Aug 2001
    Location
    Baltimore, MD
    Posts
    1,331
    Aldaron, you've either got a couple of stuck bits, or the top two can be normalized out, since they never change! Hey, *every byte* counts! (Shudderingly remembering his days with embedded systems ... so long ago ... so terribly, terribly long ago ...)

  12. #12
    Join Date
    Nov 2000
    Location
    Geelong, Vic; Australia
    Posts
    1,131
    Originally posted by Fesarius
    Aldaron, you've either got a couple of stuck bits, or the top two can be normalized out, since they never change! Hey, *every byte* counts! (Shudderingly remembering his days with embedded systems ... so long ago ... so terribly, terribly long ago ...)
    You could well be right...I avoid machine-code like the plague - hell, I avoid Assembly like the plague.

    I just plonked in a pile of ASCII...that's all it is...
    When you are dead, you don't know that you are dead. It is difficult only for others.

    It's the same when you are stupid...

  13. #13
    Join Date
    May 2002
    Location
    Omaha,NE
    Posts
    238
    Originally posted by C5
    Ack!!! There's a project manager in here!!!!
    Oh no, I'm nowhere near a project manager. I'm merely a software architect. Or at least, that's what they keep telling me.

    -Chris Landmark
    "Was entstanden ist, das muss vergehen. Was vergangen, auferstehn." -Klopstock & Mahler

    "Only liberals really think. Only liberals are intellectual. Only liberals understand the needs of their fellows." How much viciousness lay concealed in that word! Odrade thought. How much secret ego demanding to feel superior. - Heretics of Dune

  14. #14
    Join Date
    Oct 2000
    Location
    Rennes (Brittany), France, Earth
    Posts
    1,032
    Originally posted by C5
    Ack!!! There's a project manager in here!!!!

    Mind you, the real challenge would be to write the code in ASN 1....
    If you provide me with the specifications I could try to run it through my ASN.1 compiler and see what it gives ... I reckon PER would be about right for a Matrix encoding .

    Errrm ... lessee ... (/me opens his ASN.1 Dubuisson guru book)
    Every procedure for getting a cat to take a pill works fine -- once.
    Like the Borg, they learn...
    -- (Terry Pratchett, alt.fan.pratchett)

  15. #15
    Join Date
    Oct 2000
    Location
    Rennes (Brittany), France, Earth
    Posts
    1,032
    Uh ... then again, maybe not. Writing ASN.1 specs is pain enough for work, I won't try it for fun .
    Every procedure for getting a cat to take a pill works fine -- once.
    Like the Borg, they learn...
    -- (Terry Pratchett, alt.fan.pratchett)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •