0379: "Forgetting"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

User avatar
TheAmazingRando
Posts: 2308
Joined: Thu Jan 03, 2008 9:58 am UTC
Location: San Diego, CA

Re: "Forgetting" Discussion

Postby TheAmazingRando » Mon Feb 04, 2008 7:30 am UTC

I have to write a doubly-linked list in C for my programming homework. This comic reminded me that I should probably stop procrastinating and start.

User avatar
lazarus89
Posts: 485
Joined: Tue Oct 16, 2007 2:22 am UTC
Location: God's Armpit, USA

Re: "Forgetting" Discussion

Postby lazarus89 » Mon Feb 04, 2008 7:33 am UTC

NMcCoy wrote:I didn't miss the reference, but nor did I miss the ground, alas.


Win.

When I was stuck in London for a few days a couple of years back, my first act was to go to the Fenchurch Train station and take pictures. When I sent them to my friends, they were very confused as to why I had spent so much time recording my visit to an (admittedly unimpressive) train station.

Needless to say, I got new friends.
pedant wrote:You drove your car off a cliff. Moments before your car hit the ground, I plugged you right between the eyes with a sniper rifle. Your car hits the ground and creates a dramatic fireball. How did you die?

Awesomely.

User avatar
aleflamedyud
wants your cookies
Posts: 3307
Joined: Tue Oct 09, 2007 7:50 pm UTC
Location: The Central Bureaucracy

Re: "Forgetting" Discussion

Postby aleflamedyud » Mon Feb 04, 2008 7:47 am UTC

This one's too mopy. Seriously, there's more to life than sitting shiva every time you lose a girlfriend*.

* -- Somehow I just know that's what he wants to forget. XKCD has 1 cliche now.
"With kindness comes naïveté. Courage becomes foolhardiness. And dedication has no reward. If you can't accept any of that, you are not fit to be a graduate student."

User avatar
Shadic
Posts: 500
Joined: Mon Oct 29, 2007 10:54 pm UTC
Location: Olympia, WA
Contact:

Re: First page!

Postby Shadic » Mon Feb 04, 2008 7:56 am UTC

'; DROP DATABASE;-- wrote:Heh, so many times I've wished I could copy, move, store, and delete my memories the way I do my files...

A certain movie did this.. Remember the results?

coppro
Posts: 117
Joined: Mon Feb 04, 2008 6:04 am UTC

Re: "Forgetting" Discussion

Postby coppro » Mon Feb 04, 2008 8:28 am UTC

phlip wrote:Ah, OK, I misremembered. I knew someone would correct me if I was wrong ;)

I knew that in C it was merely "implementation-defined but typically 0", 'cause I've read the C99 standard... C++ I haven't read, but I'd gotten the (evidently wrong) impression that C++ fixes NULL as 0 from this thread.

So... correct me if I'm wrong (again), but in an environment where NULL != 0, you can't use if(ptr) to mean if(ptr != NULL), right? Which'd be annoying, 'cause that's a really common idiom (which is what I was referring to when I said that lots of code would break)...
No, the C++ standard does guarantee it in order to make that code valid. (if you care, there's a draft version available at the committee website). But it still isn't necessarily 0 - g++ defines NULL as __null, which is always a pointer type (similar in nature to the upcoming nullptr keyword).

User avatar
VectorZero
Posts: 471
Joined: Fri Nov 02, 2007 7:22 am UTC
Location: Kensington

Re: "Forgetting" Discussion

Postby VectorZero » Mon Feb 04, 2008 8:49 am UTC

lazarus89 wrote:When I was stuck in London for a few days a couple of years back, my first act was to go to the Fenchurch Train station and take pictures. When I sent them to my friends, they were very confused as to why I had spent so much time recording my visit to an (admittedly unimpressive) train station.

Needless to say, I got new friends.


But were they photos of the station or particularly of the left luggage department? Clearly that would be more recognisable.
Van wrote:Fireballs don't lie.

ThatGuyCalledPete
Posts: 19
Joined: Mon Sep 24, 2007 2:30 pm UTC

Re: "Forgetting" Discussion

Postby ThatGuyCalledPete » Mon Feb 04, 2008 8:55 am UTC

psicopoo wrote:I was both depressed and implementing a linked-list in C when I read this.

Hmm, doesn't the second point pretty much imply the first? I can't think of any time that implementing linked lists in C made me happy!

-- Pete.

gormster
Posts: 230
Joined: Mon Jul 23, 2007 6:43 am UTC
Location: Sydney

Re: "Forgetting" Discussion

Postby gormster » Mon Feb 04, 2008 9:08 am UTC

Z.A.K wrote:
MissingDividends wrote:Methinks Randall needs a hug.

Yeah.

This reminds me of the song "Hide and seek" by Imogen Heap.

That was the first thing I did when I got my vocoder (Korg R3, for those who are interested).

The next thing was "Comfortably Numb", which is a lot easier.
Eddie Izzard wrote:And poetry! Poetry is a lot like music, only less notes and more words.

Domovoi
Posts: 215
Joined: Fri Aug 17, 2007 9:37 am UTC

Re: "Forgetting" Discussion

Postby Domovoi » Mon Feb 04, 2008 9:17 am UTC

Methinks stick-man needs to write more readable code. Maybe reading a copy of Code Complete will take his mind off things.

User avatar
Dobblesworth
Dobblesworth, here's the title you requested over three years ago. -Banana
Posts: 1429
Joined: Wed May 30, 2007 12:06 pm UTC
Contact:

Re: "Forgetting" Discussion

Postby Dobblesworth » Mon Feb 04, 2008 9:48 am UTC

Comment regarding Eternal Sunshine of the Spotless Mind seemed relevant to me as well. Though rather than it being a serious heart-rending topic such as real life relationships and letting go of someone, maybe it's just Mr. Stickman deleting a random file that is of no importance any more, like a Word document or something.

Average comic though, sits around the same level as Friday's in my rankings.

User avatar
Sc4Freak
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Re: "Forgetting" Discussion

Postby Sc4Freak » Mon Feb 04, 2008 10:12 am UTC

yitzle wrote:prev->next = toDelete->next

Does that mean this==toDelete?
Shouldn't it be:
prev->next = next ?

Probably. Otherwise, imagine these elements:
[prev] [this] [next] ... ... [toDelete->prev] [toDelete] [toDelete->next]

The code would link [prev] to [toDelete->next], and would remove toDelete. This would leak memory since everything between and including [this] and [toDelete->prev] are lost (unreferenced). I think it would have been better to use "this" instead of "toDelete". Because the statement "delete this;" is just so awesome. :P

And, yes, the assertion won't do anything (assuming C++). In any practical circumstance, the string will resolve to a non-zero char*, so the assertion will always resolve true.

User avatar
lazarus89
Posts: 485
Joined: Tue Oct 16, 2007 2:22 am UTC
Location: God's Armpit, USA

Re: "Forgetting" Discussion

Postby lazarus89 » Mon Feb 04, 2008 10:17 am UTC

VectorZero wrote:But were they photos of the station or particularly of the left luggage department? Clearly that would be more recognisable.


They didn't have a left luggage department, but they definitely had a Lost Property department. I took pictures of it. My friends were doubly puzzled by that...
pedant wrote:You drove your car off a cliff. Moments before your car hit the ground, I plugged you right between the eyes with a sniper rifle. Your car hits the ground and creates a dramatic fireball. How did you die?

Awesomely.

User avatar
Markavian
Posts: 33
Joined: Sun Dec 30, 2007 1:57 am UTC
Location: Manchester, England
Contact:

Re: First page!

Postby Markavian » Mon Feb 04, 2008 11:09 am UTC

Shadic wrote:
'; DROP DATABASE;-- wrote:Heh, so many times I've wished I could copy, move, store, and delete my memories the way I do my files...
A certain movie did this.. Remember the results?
A few other films spring to mind, remember the results?

I too found this strip comforting after recently being dumped. The contents of the assertion is something my ex used to say... and the assertion failed; concidence- I think so!

Robin S
Posts: 3579
Joined: Wed Jun 27, 2007 7:02 pm UTC
Location: London, UK
Contact:

Re: "Forgetting" Discussion

Postby Robin S » Mon Feb 04, 2008 11:23 am UTC

theyellowhobbit wrote:Methinks Randall needs a hug.
longs wrote:Is it useful to speculate how the comic parallels the author's personal life? -Does- it even parallel his life?
Randall has said many times that he is sick of people assuming that he's suffered a breakup every time he draws a comic on the subject.
This is a placeholder until I think of something more creative to put here.

User avatar
Ghandi 2
Posts: 172
Joined: Wed Nov 07, 2007 8:40 am UTC
Location: Williamsburg, Virginia
Contact:

Re: "Forgetting" Discussion

Postby Ghandi 2 » Mon Feb 04, 2008 11:38 am UTC

aleflamedyud wrote:This one's too mopy. Seriously, there's more to life than sitting shiva every time you lose a girlfriend*.

* -- Somehow I just know that's what he wants to forget. XKCD has 1 cliche now.

I thought I was the only one who gets annoyed when he gets emo all over the comic.
Robin S wrote:
theyellowhobbit wrote:Methinks Randall needs a hug.
longs wrote:Is it useful to speculate how the comic parallels the author's personal life? -Does- it even parallel his life?
Randall has said many times that he is sick of people assuming that he's suffered a breakup every time he draws a comic on the subject.

But he must be at least thinking about it. While it's probably not in chronological sequence, I think it's safe to assume that any work parallels the creator's feelings in some way.

User avatar
william
Not a Raptor. Honest.
Posts: 2418
Joined: Sat Oct 14, 2006 5:02 pm UTC
Location: Chapel Hill, NC
Contact:

Re: "Forgetting" Discussion

Postby william » Mon Feb 04, 2008 11:39 am UTC

i want to forget

but it takes up too much entropy

(Unfortunately, remembering takes up the same amount of entropy.)
SecondTalon wrote:A pile of shit can call itself a delicious pie, but that doesn't make it true.

Robin S
Posts: 3579
Joined: Wed Jun 27, 2007 7:02 pm UTC
Location: London, UK
Contact:

Re: "Forgetting" Discussion

Postby Robin S » Mon Feb 04, 2008 11:45 am UTC

Ghandi 2 wrote:But he must be at least thinking about it. While it's probably not in chronological sequence, I think it's safe to assume that any work parallels the creator's feelings in some way.
Why? Maybe he just thought, "hey, that'd make a good breakup comic".

You could just ask him, if you're not convinced.
This is a placeholder until I think of something more creative to put here.

User avatar
ohki
Posts: 187
Joined: Wed Aug 23, 2006 9:27 am UTC
Location: San Luis Obispo, California
Contact:

Re: "Forgetting" Discussion

Postby ohki » Mon Feb 04, 2008 11:50 am UTC

He's just fooling himself asserting that string. If he really wanted to know, he would have:

Code: Select all

assert(prev->next);


Yes, I'm making assumptions about how he terminates his linked lists
But it raining and me peeing on your foot are NOT mutually exclusive.
"Isn't arrogance measured in nano-Dijkstra's?"- Alan Kay

User avatar
Ghandi 2
Posts: 172
Joined: Wed Nov 07, 2007 8:40 am UTC
Location: Williamsburg, Virginia
Contact:

Re: "Forgetting" Discussion

Postby Ghandi 2 » Mon Feb 04, 2008 12:04 pm UTC

Robin S wrote:
Ghandi 2 wrote:But he must be at least thinking about it. While it's probably not in chronological sequence, I think it's safe to assume that any work parallels the creator's feelings in some way.
Why? Maybe he just thought, "hey, that'd make a good breakup comic".

You could just ask him, if you're not convinced.

Isn't that what I said? It's what I thought I said, maybe I didn't really.

Noam Samuel
Posts: 9
Joined: Tue Nov 21, 2006 1:50 am UTC

Re: "Forgetting" Discussion

Postby Noam Samuel » Mon Feb 04, 2008 12:11 pm UTC

thethirdmoose wrote:And plus, assert checks truth value. Does a string have a truth value? I don't think so, but C++ is weird, so it might...


All strings are true because a string is a non-zero char*, and since it's nonzero, it's true.

But the assert is syntactically incorrect 'cause Randall was mixing C++ and Python (that's my theory, anyways).

User avatar
wickedsweetcake
Posts: 3
Joined: Fri Oct 12, 2007 4:24 pm UTC
Location: The suburban black hole that is my hometown, Pennsylvania. Occasionally Erie, PA for college.
Contact:

Re: "Forgetting" Discussion

Postby wickedsweetcake » Mon Feb 04, 2008 1:06 pm UTC

Herman wrote:Cool! Tom Brady guest-stars in xkcd.

Oh no he didn't.



Dammit, I was gonna say that.

User avatar
rrwoods
Posts: 1509
Joined: Mon Sep 24, 2007 5:57 pm UTC
Location: US

Re: "Forgetting" Discussion

Postby rrwoods » Mon Feb 04, 2008 1:33 pm UTC

Grr... the code is fine if you imagine it is a fragment of this:

Code: Select all

void LinkedList::removeNode(Node *toDelete)
{
   for(Node prev = header; prev->next != toDelete; prev = prev->next); // empty for

   prev->next = toDelete->next;
   delete toDelete;
}
31/M/taken/US
age/gender/interest/country

Belial wrote:The sex card is tournament legal. And I am tapping it for, like, six mana.

User avatar
Hurduser
Posts: 285
Joined: Tue Dec 04, 2007 6:14 pm UTC
Location: Esperantujo

Re: "Forgetting" Discussion

Postby Hurduser » Mon Feb 04, 2008 1:51 pm UTC

ThatGuyCalledPete wrote:
psicopoo wrote:I was both depressed and implementing a linked-list in C when I read this.

Hmm, doesn't the second point pretty much imply the first? I can't think of any time that implementing linked lists in C made me happy!

-- Pete.

I like implementing them :shrugs:
Frag mal nach im IRC
'zum Kotzen' das heisst dort XP.
Win2k, nur so zum staunen,
hat mehr Bugs als nur zweitausend.

User avatar
DragonHawk
Posts: 457
Joined: Sat Sep 15, 2007 1:20 am UTC
Location: NH, US, Earth
Contact:

Re: "Forgetting" Discussion

Postby DragonHawk » Mon Feb 04, 2008 2:14 pm UTC

phlip wrote:
coppro wrote:No, that's not true.

The constant 0 (not the value) in both C and C++ is considered a placeholder that can be assigned to a pointer, giving the null pointer (which isn't always address zero; there are some pretty wonky machines out there). In both C and C++, the macro NULL expands to "an implementation-defined null pointer constant", which is often (but not always) 0.

Ah, OK, I misremembered. I knew someone would correct me if I was wrong


As I recall:

Both C and C++ have the same concept of a "null pointer" value. It is a pointer value guaranteed to never be returned by & (the "address of" operator), malloc(), new, or similar. Thus, it is a pointer value which does not (and cannot) point to anything. Obviously useful as a magic value in one's data structures.

In both C and C++, in code, the literal constant 0 (zero) is defined to represent the null pointer. The compiler is responsible for translating the zero to whatever implementation-dependent memory address or other magic is needed. In most cases, it actually is a memory address of zero, but that's implementation-dependent and subject to nasal demons. (According to lore, implementations do exist which use other values internally.)

C also defines the macro "NULL" for zero, and that is used almost exclusively in code I've seen (including K&R). But "NULL" is not defined by the C++ language. (I've never heard a good explanation for this bit of gratuitous incompatibility.) Most compiler implementations provide a NULL constant/macro anyway, since C code -- and programmers -- expect it. But that's implementation-dependent again.

This is all based on my learnings of the standards circa 1996, so things may have evolved since then. I did check the magic zero value in my copy of K&R 2, though. Section A6.6, paragraph 3.
Ben'); DROP TABLE Users;--

GENERATION 42: The first time you see this, copy it into yοur sig on any forum and stick a fork in yοur еyе. Social experiment.

User avatar
Ari
Posts: 725
Joined: Sun Oct 07, 2007 5:09 pm UTC
Location: Wellington, New Zealand

Re: "Forgetting" Discussion

Postby Ari » Mon Feb 04, 2008 2:30 pm UTC

Can someone summarise for the code-illiterate? I got the general gist of the joke, but it seems the linked lists have deeper significance?

lazarus89 wrote:For the record, the next time I need to dump my significant other in as brutal a fashion as possible, I'm going to call her an insignificant node in the grand linked list that is my life.

That'll show her.


If you're dumping her, wouldn't she be your insignificant other? :P
"Hey %*&^er, offensive communication works fine so long as you do it respectfully." :D
"I am so quoting that out of context at a later date."

julisana
Posts: 36
Joined: Tue Nov 07, 2006 9:16 pm UTC
Location: Shawnee, KS
Contact:

Re: "Forgetting" Discussion

Postby julisana » Mon Feb 04, 2008 2:52 pm UTC

frozendevil wrote:Also, this comic coinciding pretty well with my life at the moment, screw "good times you cherish;" I want an off switch.


I'd rather have an "Undo" button, but the net result is about the same.
A computer is only capable of floating point math and crude malice.

Roses are red, violets are blue....in Soviet Russia, poem writes you!

aglebot
Posts: 3
Joined: Mon Feb 04, 2008 3:51 pm UTC

Re: "Forgetting" Discussion

Postby aglebot » Mon Feb 04, 2008 4:06 pm UTC

I don't think the character could be Randell, else it would be in Python (in which case the "assert" would have worked just fine).
I think it's the Black Hat guy mourning the loss of his hat (after having shaved his head in shame).

Workaphobia
Posts: 121
Joined: Thu Jan 25, 2007 12:21 am UTC

Re: "Forgetting" Discussion

Postby Workaphobia » Mon Feb 04, 2008 4:11 pm UTC

The data structure not being a doubly-linked list kind of ruins my attachment to the character. I guess I have little empathy for people who only want to traverse a sequence forwards. *shrug*

gormster wrote:
Z.A.K wrote:
MissingDividends wrote:Methinks Randall needs a hug.

Yeah.

This reminds me of the song "Hide and seek" by Imogen Heap.

That was the first thing I did when I got my vocoder (Korg R3, for those who are interested).

The next thing was "Comfortably Numb", which is a lot easier.


As a fan of the song, I'd have to object. The situation would have to be significantly more desperate than a failed romantic interest to warrent use of Comfortably Numb. At a bare minimum, the programmer would have to have suffered from a lifetime of disconnection, and I don't think this stick figure can make that claim.

Incidentally, I bought a DVD of The Wall after seeing clips of Comfortably Numb on youtube, but was disappointed to find that what I saw there was actually not in the movie verbatim - it was just some sort of mixup put together for that song. Which is a shame, because it was freaking amazing. Bummer.
Evidently, the key to understanding recursion is to begin by understanding recursion.

The rest is easy.

User avatar
tradiuz
Posts: 298
Joined: Fri Oct 05, 2007 5:19 am UTC

Re: "Forgetting" Discussion

Postby tradiuz » Mon Feb 04, 2008 4:22 pm UTC

And my other, totally tactless interpretation (after 6 hours of sleep, so it might be the correct interpretation) is that stick man is trying to code "I wish I could quit you".
All My Mushrooms wrote:I'm practicing abstinence until someone offers me sex.

User avatar
DragonHawk
Posts: 457
Joined: Sat Sep 15, 2007 1:20 am UTC
Location: NH, US, Earth
Contact:

Re: "Forgetting" Discussion

Postby DragonHawk » Mon Feb 04, 2008 4:53 pm UTC

Ari wrote:Can someone summarise for the code-illiterate? I got the general gist of the joke, but it seems the linked lists have deeper significance?

A linked list is a data structure composed of elements, where each element points to (reference) the next element. This is typically implemented by having a user-defined composite data type which points to another thing of the same type. ("User-defined composite data type" is CS speak for what C calls "struct", Pascal calls "RECORD", most OO languages call "class", classic VB called a "type".) Thus you have a list of elements, each of which is linked to the next. By convention, the pointer to the "another thing of the same type" is almost always named "next".

So if I have a linked list of people, then the element for Alice will also contain a pointer to the element for Bob, and the element for Bob will also contain a pointer to the element for Carol, and so on.

To remove an element from a linked list, you take the prior element's pointer and set it to the subsequent element's location. For example, to delete Bob, we set the pointer in Alice's element to the location of Carol's element. That's what the code in the first panel does (with "prev" being a reference to Alice and "toDelete" being a reference to Bob). This is a fairly efficient operation for a computer, thus linked lists a very common way to implement dynamic lists of complex data structures. Obviously, not so easy for a person to forget a lost relationship (the merits of that have been mentioned elsewhere in this thread). Relationships are commonly thought of as a list, defined by one's "ex-((girl|boy)friend|wife|husband)s", so there's a parallel there.

More: http://en.wikipedia.org/wiki/Linked_list

assert() is a standard macro defined by the C programming language. You place an expression inside the assertion, and if (during the program run) the expression does not evaluate to boolean True, the program aborts. This is commonly used as form of "sanity check" to keep a program from proceeding when an assumed condition turns out to be unexpected false.

More: http://en.wikipedia.org/wiki/Assert.h

Here, we have the programmer apparently trying to convince himself that everything will be okay. Others have pointed out that the code will not compile. To compile, it would need to be something like:

Code: Select all

assert("Everything is going to be okay");
The title/alt/tooltip text of the comic notes, "Of course, the assert doesn't work", which leads me to believe the use of invalid syntax is intentional. Perhaps more geeky would be:

Code: Select all

assert(everything == "okay");
and a remark of "Of course, the assertion often fails", but that's getting a little carried away, and perhaps misses a subtle point.

That's probably more than you wanted to know. :-)
Ben'); DROP TABLE Users;--

GENERATION 42: The first time you see this, copy it into yοur sig on any forum and stick a fork in yοur еyе. Social experiment.

User avatar
DeadCatX2
Posts: 240
Joined: Mon Dec 11, 2006 4:22 pm UTC
Contact:

Re: "Forgetting" Discussion

Postby DeadCatX2 » Mon Feb 04, 2008 4:58 pm UTC

scarletmanuka wrote:
phlip wrote:
yitzle wrote:prev->next = toDelete->next

Does that mean this==toDelete?
Shouldn't it be:
prev->next = next ?

I think it should probably be:
toDelete->prev->next = toDelete->next;

If it's a doubly linked list, that would make sense, but you'd also need
toDelete->next->prev = toDelete->prev
preceded by a test that toDelete->next is not NULL.
I think it makes more sense to assume that it's a singly linked list (i.e. forward only) and that prev and toDelete are both pointers to particular nodes. Though prev is probably not a good choice of name.

The only way to know for sure is to see his node.h file, though I agree it's probably a singly-linked list.

Unless he asks a previous ex-girlfriend for a second chance.

LarrySDonald
Posts: 44
Joined: Sun Sep 23, 2007 2:20 am UTC

Re: "Forgetting" Discussion

Postby LarrySDonald » Mon Feb 04, 2008 5:22 pm UTC

I was assuming a single linked list, something like:

Code: Select all

typedef struct ns {
        int data;
        struct ns *next;
} node;


with toDelete and prev defined as node*;, feeling it part of a larger segment where prev->next==toDelete. Often something like prev is around anyway if the list has been traversed previously. Another fairly plausable situation might be:

Code: Select all

// delete entry after prev
node *toDelete;
toDelete=prev->next; // Keep for deallocation later
prev->next=toDelete->next; // same as prev->next->next but saving a pointer lookup
delete toDelete;


But then I'm pretty oldschool (not a big OOP guy) and probably do bad and unusual things with my lists. In this example I'm also adding further insult by implying her entire data can fit in and int. If I was more pissed I'd define here at char or even bool.

BadZen
Posts: 7
Joined: Tue Sep 18, 2007 8:06 pm UTC
Location: Washington, DC
Contact:

Re: "Forgetting" Discussion

Postby BadZen » Mon Feb 04, 2008 5:32 pm UTC

So, this comic would obviously not, at first glance, be funny to a non-programmer.

It's quite easy to explain the pun of 'assert', how an assert in C/C++ works, and how this is funny, because the computer, when encountering the compiled code corresponding to this line, carefully evaluates it, not realizing the actual intent on the part of the programmer, basically ignores the line, and moves on.

What's not easy to explain to a non-programmer is *why* this is hysterical. Any ideas on how to do that?

I think it might have something to so with the way we (ok, when we were in high school, maybe?) related to our computing machinery, and also somehow that dynamic I described might be taken as a metaphor for the original (implied) dysfunctional relationship? But, when I put it that way, it sounds like I'm reading into it too much. And it's still not funny.

Maybe trying to explain any joke just kills it.

iabervon
Posts: 57
Joined: Fri Nov 03, 2006 5:25 am UTC

Re: "Forgetting" Discussion

Postby iabervon » Mon Feb 04, 2008 6:13 pm UTC

All constant strings are true as values. So the assert doesn't stop the program, even if the sentence in the string is a false statement. I think that's the sense in which it doesn't work. Of course, that's similarly true of how that sort of sentence is ordinarily used.

Alan
Posts: 39
Joined: Thu Feb 08, 2007 9:09 pm UTC

Re: "Forgetting" Discussion

Postby Alan » Mon Feb 04, 2008 6:29 pm UTC

That is why many people recommend a little memory management package I like to call "vodka".

BadZen
Posts: 7
Joined: Tue Sep 18, 2007 8:06 pm UTC
Location: Washington, DC
Contact:

Re: "Forgetting" Discussion

Postby BadZen » Mon Feb 04, 2008 6:39 pm UTC

I'd like to propose a new standard C function, in light of this discussion:

STRCWTIMN(P)

NAME
strcwtimn - compare two strings, ignoring mode of expression of programmer's intent

SYNOPSIS
#include <string.h>
#include <sentience.h>

int strcwtimn(const char *s1, const char *s2);

DESCRIPTION
The strcwtimn() function shall compare the string pointed to by s1 to the
string pointed to by s2, considering the two strings as equal if and only if
s2 is what the programmer actually meant when s/he wrote s1.

The value of a non-zero return value shall be determined by the magnitude of
the difference between what the programmer actually meant, and what s/he
actually wrote, with a negative value indicating the program would function
closer to the actual formal requirements of the software if the most recent
instance of s1 was replaced with s2, and a positive value indicating a fortunate
but completely unintentional success.

RETURN VALUE
Upon completion, strcwtimn() shall return an integer greater than, equal to, or
less than 0, if the string pointed to by s1 is better than than, equal to, or
worse than the string pointed to by s2, respectively, in the context of the
program.

ERRORS
No errors are defined.

SEE ALSO
dowtimn() , the Base Definitions volume of IEEE Std 13054.2-2028, <sentience.h>
Last edited by BadZen on Mon Feb 04, 2008 6:42 pm UTC, edited 1 time in total.

Kalos
Posts: 172
Joined: Thu Jan 31, 2008 6:45 pm UTC

Re: "Forgetting" Discussion

Postby Kalos » Mon Feb 04, 2008 6:39 pm UTC

Is it just me, or does this comic feel like the programming version of this one?

Don't get me wrong, I still thought this week's one is really good, it just doesn't feel new. Maybe it's because I'm not a romantic type.

User avatar
DragonHawk
Posts: 457
Joined: Sat Sep 15, 2007 1:20 am UTC
Location: NH, US, Earth
Contact:

Re: "Forgetting" Discussion

Postby DragonHawk » Mon Feb 04, 2008 7:07 pm UTC

BadZen wrote:strcwtimn

"string compare what I mean"? :)

No need for a separate function; that can simply be implemented in terms of the DWIM (Do What I Mean) CPU instruction, available in the Pentium Core 42 Octo. ;-)
Ben'); DROP TABLE Users;--

GENERATION 42: The first time you see this, copy it into yοur sig on any forum and stick a fork in yοur еyе. Social experiment.

User avatar
Catdrake
Posts: 29
Joined: Sun Dec 23, 2007 5:30 am UTC

Re: "Forgetting" Discussion

Postby Catdrake » Mon Feb 04, 2008 7:36 pm UTC

Ye gods, this one got me right here.

I can't forget any of my mistakes. Any of them. They play back in my head when it idles, like a bloopers reel. It's depressing. I can't remember most of my life, but i can remember every damned time i fucked up within it. Sometimes, i almost wish i could wipe my head and start over. I'd be willing to lose all the knowledge to forget all the mistakes.

Ah, the joys of a fucked-up mentality.
Nothing to see here, move along.

User avatar
DragonHawk
Posts: 457
Joined: Sat Sep 15, 2007 1:20 am UTC
Location: NH, US, Earth
Contact:

Re: "Forgetting" Discussion

Postby DragonHawk » Mon Feb 04, 2008 8:04 pm UTC

Catdrake wrote:I can't forget any of my mistakes. Any of them. They play back in my head when it idles, like a bloopers reel.

That could be seen as a good thing. It means you take responsibility for your mistakes, and -- one hopes -- learn from the experience. As many others have remarked, it is the sum of our experiences -- good and bad -- which makes us who we are.

Those that can easily forget their mistakes are the ones who can never make progress or improve -- they're doomed to keep making the same mistakes, over and over again. (In many companies, those types are called "managers". ;-) )
Ben'); DROP TABLE Users;--

GENERATION 42: The first time you see this, copy it into yοur sig on any forum and stick a fork in yοur еyе. Social experiment.


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: rhomboidal and 33 guests