Author Topic: Omnomified  (Read 3101 times)

0 Members and 1 Guest are viewing this topic.

Offline blackhole

  • Still not over the rainbow
  • 29
  • Destiny can suck it
    • Black Sphere Studios
I wrote this sometime last year - I just found it again. I might have posted it here before, but it seems like it should be in the programming board (which didn't exist back then).

Code: [Select]
#include <iostream>
#include <stdlib.h>

using namespace std;

typedef char NOM;
typedef void NoM;
typedef int nOM;
typedef size_t OmNoM;
typedef bool OMnOm;

#define OMNOmNOMnom
#define OMnOMnoM 175
#define OMNOMNOMnOM 1
#define OMNoM true
#define OMNOm false
#define OMnomNOM(omNom) cout << omNom
#define OMnomNOMnom(omNom) cout << omNom << endl
#define OmNOM(nOMNOm) delete nOMNOm
#define OmNOmNOm(nOMNOm) delete [] nOMNOm
#define omnOMnom(noMNom) strlen(noMNom)
#define OMNOmnoM(omNOm, OmNOm) strcmp(omNOm, OmNOm)
#define OMNoMnOm(omNoM, oMNOM, oMNOm) strcpy(omNoM, oMNOm)

/* NOMNOM - OMNOM NOM NOM OM NOMNOMNOM */
class NOMNOM
{
public:
  NOMNOM(NOM* nOM=0);
  ~NOMNOM();
  NOM* oMnom();
  NoM oMNOM(NOM* nOM);
 
private:
  NOM* omNOm; //NOM
};

/* OM - NOMNOMNOMNOM OMNOMNOM NOMNOM OM NOM */
class OM : NOMNOM
{
public:
  OM(NOM* Om=0, NOM* nOM=0);
  ~OM();
  OMnOm OMNOMNom();
  NOM* OMnOmnom();
  NoM OMNoMnom(NOM* Om);

private:
  NOM* oMnOM; //OM NOM
};

/* OM NOMNOMNOMNOMNOM */
NOMNOM::NOMNOM(NOM *nOM)
{
  if(!nOM)
    omNOm = 0; //NOMNOM OMNOM
  else
  {
    OmNoM omnOMNOm = omnOMnom(nOM)+1; //NOMNOM NOM NOM NOMNOM
    omNOm = new NOM[omnOMNOm];
    OMNoMnOm(omNOm, omnOMNOm, nOM); //OM NOM
  }
}

/* OMNOMNOM - NOM */
NOMNOM::~NOMNOM()
{
  if(omNOm != 0)
  {
    OmNOmNOm(omNOm); //NOM OMNOMNOMNOMNOM
    omNOm = 0;
  }
}

/* NOMNOM OMNOMNOMNOM NOM NOM */
NOM* NOMNOM::oMnom()
{
  return omNOm; //OMNOM
}

/* NOM NOM */
NoM NOMNOM::oMNOM(NOM *nOM)
{
  if(omNOm != 0)
  {
    OmNOmNOm(omNOm);  //NOM OMNOMNOMNOMNOM
    omNOm = 0;
  }

  OmNoM omnOMNOm = omnOMnom(nOM)+1; //NOMNOM NOM NOM NOMNOM
  omNOm = new NOM[omnOMNOm];
  OMNoMnOm(omNOm, omnOMNOm, nOM); //OM NOM
}

/* OMNOM NOM NOMNOMNOM om NOM nOM Om */
OM::OM(NOM *Om, NOM *nOM) : NOMNOM(nOM)
{
if(!Om)
    oMnOM = 0; //NOMNOM OMNOM
  else
  {
    OmNoM omnOMNOm = omnOMnom(Om)+1;
    oMnOM = new NOM[omnOMNOm];
    OMNoMnOm(oMnOM, omnOMNOm, Om);
  }
}

/* OMNOMNOM */
OM::~OM()
{
  if(oMnOM != 0)
  {
    OmNOmNOm(oMnOM); //OMNOMNOMNOM NOM
    oMnOM = 0;
  }
}

/* OMNOM - NOM */
OMnOm OM::OMNOMNom()
{
  if(!oMnOM || !oMnom()) //NOM NOM OMNOM
    return OMNOm;

  OMnomNOM(oMnOM); //OMNOMNOM

  for(nOM nomnomnom = 0; nomnomnom < OMnOMnoM; ++nomnomnom)
  {
    OMnomNOM(oMnom());

    if(nomnomnom == OMnOMnoM-OMNOMNOMnOM)
      OMnomNOMnom(oMnom());
  }

  return OMNoM;
}

/* OM OMNOMNOMNOM NOM NOM */
NOM* OM::OMnOmnom()
{
  return oMnOM; //OMNOM
}

/* OM NOM NOM */
NoM OM::OMNoMnom(NOM* Om)
{
  if(oMnOM != 0)
  {
    OmNOmNOm(oMnOM);  //NOM OMNOMNOMNOMNOM
    oMnOM = 0;
  }

  OmNoM omnOMNOm = omnOMnom(Om)+1; //NOMNOM NOM NOM NOMNOM
  oMnOM = new NOM[omnOMNOm];
  OMNoMnOm(oMnOM, omnOMNOm, Om); //OM NOM
}

/* NOMNOMNOMNOMNOM - OMNOMNOM */
nOM OMNOmNOMnom main(nOM OMnoM, NOM** omNoM)
{
  OM* OMNOMNOM = new OM("OM", "NOM");
  OMnOm OMnoMNOm = OMNoM; //OM NOMNOM

  while(OMnoMNOm)
  {
    NOM OMnomnom[256]; //NOM
    cin >> OMnomnom; //OM NOM NOM NOM

    if(!OMNOmnoM(OMnomnom, "OMNOMNOM")) //NOMNOMNOMNOMNOMNOMNOMNOMNOM
      OMnoMNOm = OMNOm; //OM
    else
      OMNOMNOM->OMNOMNom(); //OMNOM NOMNOM
  }

  OmNOM(OMNOMNOM);
}

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Current projects: GVCa Tanen, Vasudan Imperium
    • Steam
    • User page on the FreeSpace Wiki
Reminds me of Ook.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Stormkeeper

  • Interviewer Extraordinaire
  • 211
  • Boomz!
Whats the output like?
Ancient-Shivan War|Interview Board

Member of the Scooby Doo Fanclub. And we're not talking a cartoon dog here people!!

 
Yes, I think you did post it before, and it's still funny! :lol:
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

"You can fight like a krogan, run like a leopard, but you'll never be better than Commander Shepard!"

 

Offline blackhole

  • Still not over the rainbow
  • 29
  • Destiny can suck it
    • Black Sphere Studios
Whats the output like?

OMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOM
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
NOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNOMNO M
...yeah

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Gung'f na njshy ybg bs bzf!

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
I'd like to that as an .exe please :) work won't know what hit them.
Your friendly Orestes tactical controller
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Martinus

  • Aka Maeglamor
  • 210
    • Hard Light Productions

 

Offline DragonClaw

  • Romeo Kilo India Foxtrot
  • 210
Ow, trying to figure out exactly what the code does hurt my head  :blah:

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
Where's my .exe ?
Your friendly Orestes tactical controller
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Mika

  • 28
IOCCC's webpage lists Pawka's entry in 1986:

Code: [Select]
#include "stdio.h"
#define xyxx char
#define xyyxx putchar
#define xyyyxx while
#define xxyyyx int
#define xxxyyx main
#define xyxyxy if
#define xyyxyy '\n'
xyxx *xyx [] = {
"]I^x[I]k\\I^o[IZ~\\IZ~[I^|[I^l[I^j[I^}[I^n[I]m\\I]h",
"]IZx\\IZx[IZk\\IZk[IZo_IZ~\\IZ~[IZ|_IZl_IZj\\IZj]IZ}]IZn_IZm\\IZm_IZh",
"]IZx\\IZx[I^k[I\\o]IZ~\\IZ~\\I]|[IZl_I^j]IZ}]I^n[IZm\\IZm_IZh",
"]IZx\\IZx[IZk\\IZk[IZo_IZ~\\IZ~_IZ|[IZl_IZj\\IZj]IZ}]IZn_IZm\\IZm]IZh",
"]I^x[I]k\\IZo_I^~[I^|[I^l[IZj\\IZj]IZ}]I^n[I]m^IZh",'\0'};/*xyyxyxyxxxyxxxyy*/
xyxx *xyyx; xxyyyx xyyyx,xyyyyx,xyyyyyx=0x59,xyyyyyyx=0x29,/*yxxyxyyyxxyyyxyy*/
xxyx=0x68;xxxyyx(){xyyyyx=0;xyyyxx(xyx[xyyyyx]){xyyx=xyx[xyyyyx++];/*xyyyxxyx*/
xyyyxx(*xyyx){xyyyx= *xyyx++-xyyyyyx;xyyyxx(xyyyx--)xyyxx(*xyyx-xyyyyyyx);/*x*/
xyxyxy(*xyyx==xxyx)xyyxx(xyyxyy);*xyyx++;}}}/*xyxyxyyyyxxyxxxyyyxyyyxyxxyyy*/

The other goodie is Korn's oneliner printing program (1987):

Code: [Select]
main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}

I'm personally not willing to know how that one could even work.

More recent ones are a lot more crazier and next to impossible to figure out if one hasn't spent 20 years with C/C++.

Mika
Relaxed movement is always more effective than forced movement.

 

Offline blackhole

  • Still not over the rainbow
  • 29
  • Destiny can suck it
    • Black Sphere Studios
I attached it as an EXE. You simply type in anything and it will reply with a bunch of 'NOMs.

[attachment stolen by Slimey Goober]

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
Yay! *does the happy dance.
Your friendly Orestes tactical controller
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png