As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

The Call Stack of [chat]thulhu

Premier kakosPremier kakos Registered User, ClubPA regular
edited January 2010 in Debate and/or Discourse
"The wrote:
4.10 Recursion

C functions may be used recursively; that is, a function may call itself either directly or indirectly. Uninquiring souls may take this as just another peculiarity of those C folk, of whose ways their neighbours speak little to outsiders but much among themselves.

Keener news-followers, however, wondered at the events of the winter of 1927-28, the abnormally large number of calls placed upon the stack, the swiftness with which that list was sorted, the disturbing lack of heap allocation throughout the proceedings, and the secrecy surrounding the affair.

People in the nearby towns had talked about C for nearly a century, and nothing new could be wilder or more hideous than what they had whispered and hinted years before. Many things had taught them secrecy, and there was now no need to exert pressure on them.

But at last I am going to defy the ban on speech about this thing. It was I who fled frantically out of C Recursion in the early morning hours of July 16, 1927, and whose frightened appeals for action brought on the whole reported episode.

I never heard of C Recursion till the day before I saw it for the first and– so far– last time. They told me the steam train was the thing to take to Arkham; and it was only at the station ticket-office, when I demurred at the high fare, that I learned about C Recursion. The shrewd-faced agent, whose speech shewed him to be no local man, made a suggestion that none of my other informants had offered.

"You could take that old bus, I suppose," he said with a certain hesitation. "It runs through C Recursion, so the people don't like it. I never seen more'n two or three people on it– nobody but them C folks."

At length the ancient bus pulled away with a jerk, and rattled noisily down State Street and away from the town. The day was warm and sunny, but the landscape of sand and stunted arrays became more desolate as we progressed. We met no one on the road, but presently began to pass deserted farms in varying stages of ruin. Then I noticed a few inhabited structs with rags stuffed in the broken windows and shells and dead fish lying about the littered yards. At last we drew up by a dingy, decrepit compiler whose cracked and yellowing sign proclaimed it to be GCC.

Wandering about the town that evening, I struck a region of utter desertion which somehow made me shudder. Before I reached Main Street I heard a faint and wheezy "Hey Mister!" behind me, and it must have been some imp of the perverse– or some sardonic pull from dark, hidden forces– that made me allow the old man to catch up, taking copious pulls from the quart bottle.

I began putting out feelers as we turned southward amidst the omnipresent desolation and crazily tilted ruins, but found that the aged tongue did not loosen as quickly as I had expected. At length I guided my companion down the lane and picked out spots to sit in among the mossy stones. The air of death and desertion was ghoulish, and the smell of fish almost insufferable; but I was resolved to let nothing deter me.

About four hours remained if I were to catch the coach for Arkham, and I began to dole out more liquor to the ancient tippler; meanwhile eating my own frugal lunch. Just as I feared my quart of whiskey would not be enough to produce results, the wheezing ancient's ramblings took a turn that caused me to lean forward and listen alertly. Something had caused his gaze to light on the low, distant line of Devil's Reef, and he bent toward me and took hold of my coat lapel.

"Thar's whar it all begun– that cursed place of all wickedness whar the deep water starts. Old Cap'n Obed Marsh an' twenty odd other folks used to row aout to Devil Reef in the dead o' night and chant things so loud you could hear 'em all over taown when the wind was right."

"Back in those days most folks in this taown were printing numbers as character strings. You gets the digits backwards, so's the low-order digits come before the high-order 'uns; but you got to print 'em out the other way raound."

"Now, there's two ways to do that. The old-timers'd take the digits and stow 'em in an array, then print 'em right smart in reverse order. But Cap'n Marsh, see, he'd been dealing with queer folks in the South Sea islands, and they taught him some peculiar ways. Out there on Devil Reef, he built a funct'n that called itself to print any leading digits, then printed out the trailing digit at the end."

"Matt Elliot, Obed's fust mate, he allus was agin' it, but he saw it with his own eyes how that funct'n used to call itself up like a serpent eatin' its own tail–
      void Cthulhu
      (int Ia) {
      if (Ia/10)
      Cthulhu (IA/10);
      putchar // ftagn!
        (Ia % 10 + '0');
      } // neblod zin!
"Twistin' and writhing like nothing of this Earth, it'd spit out those strings without no heap allocation in sight. It warn't natural, any fool could see that much. Matt tried to line up folks on his side, an' had long talks with the preachers– no use– they ran the Congregational parson out of town, and the Methodist feller quit– I was a mighty little critter but I heerd what I heerd an' seen what I seen–"

He stopped again, and from the look in his watery blue eyes I feared he was close to a stupor after all. But when I gently shook his shoulder he turned on me with astonishing alertness.

"I ain't sayin' Obed was set on hevin' things just like they was on that South Sea isle. I dun't think he aimed at fust to raise no youguns to take to the water an' turn into fishes with eternal life. He wanted them concise codin' idioms, an' was willin' to pay heavy, an' I guess the Others was satisfied fer a while..."

The old man was growing restless, and the mad frenzy of his voice disturbed me more than I care to own.

"Curse ye, dun't set thar a-starin' at me with them eyes– yew want to know what the reel horror is, hey? Wal, it's this– it ain't what them fish devils hez done, but what they're a-goin' to do! Them haouses betwixt Water an' Main Streets is full of 'em– them devils and what they brung– an' when they git ready... EH–AHHHH–AH! E'YAAHHHH..."

The hideous suddenness of the old man's shriek almost made me bluescreen. His eyes, looking past me to the malodorous sea, were positively starting from his head. I turned to look but there was nothing I could see. Only the incoming tide, with perhaps one set of ripples more local than the line of breakers. But now he was shaking me, his voice a trembling whisper.

"Git aout o' here! they seen us– git aout fer your life! Dun't wait fer nothin'– they know now– Run fer it– quick– aout o' this taown–"

Before I could recover my scattered wits he had dashed wildly inland, reeling northward around the ruined warehouse wall. I glanced back at the sea, but there was nothing there. And when I reached Water Street and looked along it, there was no remaining trace of the old man.

I am not even yet willing to say whether what followed was a hideous actuality or only a nightmare hallucination. Who can be sure of reality after hearing things like that old man's tale? But I must try to tell you what I thought I saw that night under the mocking yellow moon. It was the end, for whatever remains to me of life on the surface of this Earth, of every vestige of mental peace and confidence in the integrity of Nature. Can it be possible that this planet has actually spawned such things?

I had heard tales of the... thing that C.A.R. Hoare had summoned up in '62– dark hints of choosing one element from an array, and partitioning the rest into lesser and greater sets, and hellishly recursing until the data were twisted into a sorted list– but nothing I could have imagined would be in any way comparable to the daemoniac, blasphemous reality that I saw.

And yet I saw them in a limitless stream– flopping, hopping, croaking, bleating– sorting themselves inhumanly through the spectral moonlight in a grotesque, malignant saraband of fantastic nightmare. Their croaking, baying voices called out in the hideous language of the Old Ones:
      void Rlyeh
      (int mene[], int wgah, int nagl) {
      int Ia, fhtagn;
      if (wgah>=nagl) return;
      swap (mene,wgah,(wgah+nagl)/2);
      fhtagn = wgah;
      for (Ia=wgah+1; Ia<=nagl; Ia++)
      if (mene[Ia]<mene[wgah])
      swap (mene,++fhtagn,Ia);
      swap (mene,wgah,fhtagn);
      Rlyeh (mene,wgah,fhtagn-1);
      Rlyeh (mene,fhtagn+1,nagl);

      } // PH'NGLUI MGLW'NAFH CTHULHU!
Recursion may provide no salvation of storage, nor of human souls; somewhere, a stack of the values being processed must be maintained. But recursive code is more compact, perhaps more easily understood– and more evil and hideous than the darkest nightmares the human brain can endure.

Exercise 4-12. Adapt the ideas of Cthulhu() to write a recursive version of the Forbidden Song of Hali; that is, to unravel the fibres of reality and allow the icy liquid darkness of Carcosa to devour your mind.

Exercise 4-13. Write a function reverse(s) which reverses the string s by turning the mind inside out, converting madness into reality and opening the door to allow the Old Ones to creep forth once more from their sunken crypt beyond time.

Premier kakos on
«13456780

Posts

  • NocturneNocturne Registered User regular
    edited January 2010
    Nerd.

    Nocturne on
  • RiemannLivesRiemannLives Registered User regular
    edited January 2010
    Another really shitty thing about rural areas: other peoples dogs. Now one of the few good things was actually having a dog of my own ( I would never own one in the city, and I really do not understand how people do ). But other peoples dogs... well, there were two basic problems.

    1) Drunk yokels are not models of canine ownership, being mildly less domesticated than their pets. So there were always a few patches of woods or back roads to be careful of. In particular I remember one German Shepard called "Hey You". Mean as hell. We were still scared of that patch of woods long after he died.

    2) Back then the town was a lot poorer than now and the nice houses on the beach got rented out in the summer. These people would bring their dogs and turn them loose thinking that their special little friend would never hurt a fly. Bullshit. Dogs are never to be 100% trusted and especially not in a strange place around people they don't know.

    It was mostly #2 that was a problem (you quickly got to know which local dogs were psychotic and where they roamed). Especially since I spent a lot of time in the summer out at night on the beach or in the woods (my mother being a crazy bitch). I got jumped a few times. And threatened fairly often. Never injured though (at least at that age, got mauled about the neck once by a local dog when I was younger, got quite a few stiches that day). Just was in the habbit of carrying sticks (one good wack suffices for any dog I've ran afoul of). Also the foreign dogs usually had collars and dogs tags. That little jingle in the dark is all the warning needed to find a stick or a rock pronto.

    RiemannLives on
    Attacked by tweeeeeeees!
  • TavTav Irish Minister for DefenceRegistered User regular
    edited January 2010
    Several television shows have contained references to The Godfather, including the 1997 British film Twin Town, Arrested Development, Yes Dear, Seinfeld, The King of Queens, Mr. Show with Bob and David, That '70s Show, and Harvey Birdman, Attorney at Law, and even the popular kids' shows Hannah Montana, Yu-Gi-Oh!, Animaniacs and Rugrats.

    Tav on
  • HaphazardHaphazard Registered User regular
    edited January 2010
    Ftagn, I just watched a movie that was actually not bad.

    Haphazard on
  • NerdgasmicNerdgasmic __BANNED USERS regular
    edited January 2010
    Alaska is actually a very lovely place in certain ways.

    For one thing, it's tremendously beautiful.

    Nerdgasmic on
  • PreacherPreacher Registered User regular
    edited January 2010
    Preacher on
    I would like some money because these are artisanal nuggets of wisdom philistine.

    pleasepaypreacher.net
  • NocturneNocturne Registered User regular
    edited January 2010
    Nocturne on
  • ThomamelasThomamelas Only one man can kill this many Russians. Bring his guitar to me! Registered User regular
    edited January 2010
    Preacher wrote: »

    Holy shit. I lost 2 IQ points just reading that stupidity.

    Thomamelas on
  • ElendilElendil Registered User regular
    edited January 2010
    I am a fucking dork

    Elendil on
  • HaphazardHaphazard Registered User regular
    edited January 2010
    Those eyes!

    Haphazard on
  • ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User regular
    edited January 2010
    Recursion is the reason I decided not to be a programmer.

    Fuck that shit.

    Also, I'm apparently not any good at programming.

    Chanus on
    Allegedly a voice of reason.
  • HonkHonk Honk is this poster. Registered User, __BANNED USERS regular
    edited January 2010
    Nocturne wrote: »

    Oh my god!

    Honk on
    PSN: Honkalot
  • PreacherPreacher Registered User regular
    edited January 2010
    Thomamelas wrote: »
    Preacher wrote: »

    Holy shit. I lost 2 IQ points just reading that stupidity.

    That's two more replies then a black woman would get on okcupid.

    Preacher on
    I would like some money because these are artisanal nuggets of wisdom philistine.

    pleasepaypreacher.net
  • DrezDrez Registered User regular
    edited January 2010
    So does anyone here have any experience with New York unemployment?

    I got an unemployment handbook last week. A day later I got a letter stating how much I would receive each week and that I should claim for my "unpaid waiting week" starting Sunday.

    Now, I've gotten unemployment in NYS before. Twice, actually. So I'm familiar with the unpaid waiting week thing.

    I applied on Sunday. I have yet to see ANYTHING about it. I can't seem to figure out if my unemployment is approved, or not. The unemployment website doesn't have me listed as having been "paid" for my unpaid waiting week. I firmly recall that I used to get "paid" on Tuesday or Wednesday if I claimed on Sunday and that the unpaid waiting week worked the same way - that it would show up as me being granted $0.00 for that time period.

    As of now, neither the amount I would receive each week as specified in the letter is showing up online, nor is anything about the unpaid waiting week.

    So I called two different numbers. One number said that I "had not yet claimed my unpaid waiting week." The other number - the Telephone Claim Center or whatever it is called - said that I "have already claimed my unpaid waiting week." Neither phone system allows me to actually reach a live agent no matter what I've done.

    I'm kind of getting worried because I need this money next week - I need to make sure I will have it. Anyone know how/if I can confirm that my unemployment was approved and when I should get it? Does that letter I received last week, and the ability to file a claim online for the unpaid waiting week, mean that I was definitely approved? My employer (an employment agency) already told me specifically that they would not dispute it, so I'm not sure what the hold-up is.

    Anyone know?

    Drez on
    Switch: SW-7690-2320-9238Steam/PSN/Xbox: Drezdar
  • skippydumptruckskippydumptruck begin again Registered User regular
    edited January 2010
    kakooooooooooooooos you make the worst OPs

    skippydumptruck on
  • ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User regular
    edited January 2010
    He really does.

    Chanus on
    Allegedly a voice of reason.
  • HaphazardHaphazard Registered User regular
    edited January 2010
    Isn't he adorable?

    Haphazard on
  • ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User regular
    edited January 2010
    He really is.

    Chanus on
    Allegedly a voice of reason.
  • PreacherPreacher Registered User regular
    edited January 2010
    Haphazard wrote: »
    Isn't he adorable?

    This is a kind of masturbation that freaks me out.

    Preacher on
    I would like some money because these are artisanal nuggets of wisdom philistine.

    pleasepaypreacher.net
  • HaphazardHaphazard Registered User regular
    edited January 2010
    Preacher wrote: »
    Haphazard wrote: »
    Isn't he adorable?

    This is a kind of masturbation that freaks me out.

    :winky:

    Haphazard on
  • LeitnerLeitner Registered User regular
    edited January 2010
    Enforced gender roles meets racist stereotypes up ins. It's why no east asian guys get responses either.

    Leitner on
  • InquisitorInquisitor Registered User regular
    edited January 2010
    Huh, the lost planet 2 demo was totally different than what I was expecting.

    It could actually be a really fun game.

    Inquisitor on
  • NocturneNocturne Registered User regular
    edited January 2010
    Leitner wrote: »
    Enforced gender roles meets racist stereotypes up ins. It's why no east asians get responses either.

    This is the most concise and accurate explanation I've heard.

    Nocturne on
  • CokebotleCokebotle 穴掘りの 電車内Registered User regular
    edited January 2010
    Mm... sleepy... stupid cold room waking me up all morning >.<

    How goes [chat] today?

    Cokebotle on
    工事中
  • NerdgasmicNerdgasmic __BANNED USERS regular
    edited January 2010
    That's good to hear, Inq. I thought Lost Planet had a neat setting, but I hear it was not fun to play.

    Nerdgasmic on
  • PreacherPreacher Registered User regular
    edited January 2010
    Leitner wrote: »
    Enforced gender roles meets racist stereotypes up ins. It's why no east asians get responses either.

    That and their tiny penis's and inability to drive anywhere.

    Preacher on
    I would like some money because these are artisanal nuggets of wisdom philistine.

    pleasepaypreacher.net
  • RiemannLivesRiemannLives Registered User regular
    edited January 2010
    Leitner wrote: »
    Enforced gender roles meets racist stereotypes up ins. It's why no east asians get responses either.

    Is this in reference to that study that came out a short while back? I thought the differences were more in the +/- ~10% range or so. "no east asians get responses" seems like quite an exaggeration.

    RiemannLives on
    Attacked by tweeeeeeees!
  • InquisitorInquisitor Registered User regular
    edited January 2010
    Nerdgasmic wrote: »
    That's good to hear, Inq. I thought Lost Planet had a neat setting, but I hear it was not fun to play.

    Yeah, the demo was like, 4 player co-op version a giant shadow of the colossus size alien creature.

    Inquisitor on
  • NerdgasmicNerdgasmic __BANNED USERS regular
    edited January 2010
    That sounds pretty neat.

    Nerdgasmic on
  • DrezDrez Registered User regular
    edited January 2010
    So nobody knows? :(

    I can't make H/A threads right now or I would go ask there.

    Drez on
    Switch: SW-7690-2320-9238Steam/PSN/Xbox: Drezdar
  • PreacherPreacher Registered User regular
    edited January 2010
    Nerdgasmic wrote: »
    That sounds pretty neat.

    But is it gee wiz?

    Preacher on
    I would like some money because these are artisanal nuggets of wisdom philistine.

    pleasepaypreacher.net
  • InquisitorInquisitor Registered User regular
    edited January 2010
    Preacher wrote: »
    Nerdgasmic wrote: »
    That sounds pretty neat.

    But is it gee wiz?

    It's wizard!

    Inquisitor on
  • JustinSane07JustinSane07 Really, stupid? Brockton__BANNED USERS regular
    edited January 2010
    Today's XKCD made me laugh because it's correct.

    JustinSane07 on
  • NerdgasmicNerdgasmic __BANNED USERS regular
    edited January 2010
    Preacher is just upset that nobody says "That's rad as dingo balls" anymore like they did when he was a kid.

    Nerdgasmic on
  • ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User regular
    edited January 2010
    Drez wrote: »
    So nobody knows? :(

    I can't make H/A threads right now or I would go ask there.

    I don't have any useful infos :\

    Chanus on
    Allegedly a voice of reason.
  • Silas BrownSilas Brown That's hobo style. Registered User regular
    edited January 2010
    Nerdgasmic wrote: »
    Preacher is just upset that nobody says "That's rad as dingo balls" anymore like they did when he was a kid.

    Dingo Rad Chilies

    Silas Brown on
  • LeitnerLeitner Registered User regular
    edited January 2010
    Leitner wrote: »
    Enforced gender roles meets racist stereotypes up ins. It's why no east asians get responses either.

    Is this in reference to that study that came out a short while back? I thought the differences were more in the +/- ~10% range or so. "no east asians get responses" seems like quite an exaggeration.

    That backs it up, but there's a lot more evidence out there. Both stuff I've read and anecdotal experiance.

    (also totally meant east asian men - not east asians in general)

    Leitner on
  • PreacherPreacher Registered User regular
    edited January 2010
    Today's XKCD made me laugh because it's correct.

    Man I love it when you like things I hate.

    Preacher on
    I would like some money because these are artisanal nuggets of wisdom philistine.

    pleasepaypreacher.net
  • JustinSane07JustinSane07 Really, stupid? Brockton__BANNED USERS regular
    edited January 2010
    Preacher wrote: »
    Today's XKCD made me laugh because it's correct.

    Man I love it when you like things I hate.

    Learn to be a math nerd, noob.

    JustinSane07 on
  • PreacherPreacher Registered User regular
    edited January 2010
    Preacher wrote: »
    Today's XKCD made me laugh because it's correct.

    Man I love it when you like things I hate.

    Learn to be a math nerd, noob.

    I'd rather have sex with you.

    Preacher on
    I would like some money because these are artisanal nuggets of wisdom philistine.

    pleasepaypreacher.net
This discussion has been closed.