Author Topic: Stuff that peels your potatoes with paring knives of ANGER.  (Read 800499 times)

annon

  • AWSUM MODERATAR!!!!1
  • Hero Member
  • *****
  • Posts: 1837
    • View Profile
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2145 on: August 14, 2010, 02:25:11 PM »
Maybe it took offense to the filename?

Code: [Select]
f(u,c,k,_,y,e,a,h)
{return u*u*u*u-u*u*u*_+u*u*y-u*e+a?k?f(u+1,c,k-1,_,y,e,a,h):0:putchar(u-c+h)==f(u+1,u,k-1,_,y,e,a,h);}
main(){return f(0,0,34,84,2423,26628,72864,98)<putchar(32)>f(0,0,40,125,5809,118995,906750,96)==~putchar(10);}

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2146 on: August 14, 2010, 02:50:56 PM »
http://en.wikipedia.org/wiki/Scope_resolution_operator

lawl

Seriously, that is fucking ridiculous.
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Alice

  • B&!!!!1!!11`
  • Hero Member
  • *
  • Posts: 1665
  • the pinnacle of human emotion
    • View Profile
    • DigitalMZX
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2147 on: August 14, 2010, 05:04:19 PM »
Why don't you have the choice to not use PHP?

Sqthreer!

  • Hero Member
  • *****
  • Posts: 733
  • It's hip to be sq3r.
    • View Profile
    • Sqthreer.com
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2148 on: August 14, 2010, 06:04:10 PM »
When people claim to want to hang out, and even plan a specific day, but then don't follow through or even communicate with me on the day is fucking stupid.
"Floors are a lot like walls."
 - Alexxx

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2149 on: August 15, 2010, 01:00:45 AM »
Why don't you have the choice to not use PHP?

Because that's one of the project requirements, and the server that the project is going on only supports PHP.

Believe me, I'd love to be able to use ASP.NET.

Maybe it took offense to the filename?

Nah, I redacted that and the path name.  If anything it probably took offense to the names that I was calling it.

http://en.wikipedia.org/wiki/Scope_resolution_operator

lawl

Seriously, that is fucking ridiculous.

Yeah, that was one of the results that I ran into when I was trying to figure out what the hell that message meant.  It kind of proves the point that the language was never actually designed.

See, I can very well understand having scope operators.  It's essential when you're working with namespaces, for one.  I can understand actually having scope as well, for obvious reasons.

The problem is that PHP decided to replace the tried-and-true "inherit-from-parent-function" concept with its own logically flawed model.  For instance, the following PHP "code":

Code: [Select]
$b = "sucks.";

function fuckMeSilly($a) {
    echo "$a $b";
}

function rogerMeSenseless() {
    fuckMeSilly("PHP");
}

rogerMeSenseless();

Will produce the output: "PHP ".  Forget the fact that $b is clearly a global variable, not to mention that it's in a block that's a parent of the said function.

The "proper" way to write the code is as follows:

Code: [Select]
$b = "sucks.";

function fuckMeSilly($a) {
    global $b;
    echo "$a $b";
}

function rogerMeSenseless() {
    fuckMeSilly("PHP");
}

rogerMeSenseless();

To make matters worse, the project that I'm working on is partially implemented as a Joomla module.  This is where PHP's function "design" really falls apart.  The second code example that I posted still does not work in this environment, because I'm technically already working as a function of the Joomla code (and yes, PHP does, in fact, support sub-functions...it's just bizarre).  The "proper" way to implement this function is to add another global tag to the top, as follows:

Code: [Select]
global $b;
$b = "sucks.";

function fuckMeSilly($a) {
    global $b;
    echo "$a $b";
}

function rogerMeSenseless() {
    fuckMeSilly("PHP");
}

rogerMeSenseless();

And, finally, our Joomla (or Jumi, since I've been using that for some things as well) module will finally print the intended and exceedingly true message: "PHP sucks."

Wow.  Really, the code above makes absolutely no sense.  And yes, that is exactly what you have to do: declare the variable as global, then declare that it's a global again inside of the parent function.  It just blows my mind how incompetent this behavior is.  It is so incredibly awkward to use that I don't understand who thought that it was a good idea to make it like that.

To make matters worse, this is apparently how PHP classes have to access the class variables.  And here I was thinking that the reason for classes was to create a big, unified object with the ability to have limited exposure to the outside code.  I've never seen another language that requires so much voodoo magic just to access class variables.

Ugh.  It's just painful to think about.  I fucking hate it.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2150 on: August 15, 2010, 04:25:13 AM »
The fuck is a sub-function? I don't even think Functional programming languages have sub-functions, lol.

Also, must learn haskell. That language is cool as shit, and can make some otherwise complex algorithms a piece of cake to write.
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2151 on: August 15, 2010, 03:24:25 PM »
Yes, sub-functions.  While I haven't tried it myself, according to the PHP documentation, the following is valid PHP:

Code: [Select]
function stupidFunction($text) {
    global $display;
    $display = $text;

    function stupidSubFunction() {
        global $display;
        echo $display;
    }
   
    stupidSubFunction();
}

stupidFunction("Hello world!");

Presumably, trying to call stupidSubFunction() from within the main code block will fail.  I don't really care to try it, though.  Frankly, I think the whole thing is just a really bad idea.

And yeah, I've heard that Haskell is pretty neat-o.  I'll have to give it a shot one of these days when I'm feeling spunky.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2152 on: August 15, 2010, 04:50:32 PM »
I haven't done too much reading on Haskell, but functional languages in general are pretty different beasts.
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2153 on: August 15, 2010, 06:19:17 PM »
Oh yeah, I do realize that.  It's a major change from procedural programming languages and, depending on what you're doing, that could be a good or a bad thing.

Definitely something that I need to try out, though.
"This is a machine for making cows."

Sqthreer!

  • Hero Member
  • *****
  • Posts: 733
  • It's hip to be sq3r.
    • View Profile
    • Sqthreer.com
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2154 on: August 25, 2010, 04:02:35 PM »
For some reason it really annoys me when someone makes a really bad joke and then laughs more than anyone they're telling it to (who are only laughing to be nice in the first place).
"Floors are a lot like walls."
 - Alexxx

MortifiedocAlot

  • I GOT GULD STERRRRZZ
  • Hero Member
  • **
  • Posts: 4760
  • ಠ_ಠ
    • View Profile
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2155 on: August 31, 2010, 02:20:57 PM »
My useless wireless router. I need to throw this shit away and buy something that can actually send a fucking wireless signal, because this is fucking horrible. I've been downloading the same steam game for a week+ now because of how slow and shit my connection is.


Alice

  • B&!!!!1!!11`
  • Hero Member
  • *
  • Posts: 1665
  • the pinnacle of human emotion
    • View Profile
    • DigitalMZX
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2156 on: August 31, 2010, 08:40:54 PM »
Some busta got into my email account through a mobile phone, as Bobbias can confirm.  Nothing in my account settings was changed, fortunately, and I changed to a password around 10000000x more powerful than my previous one, but I was searching around with google and apparently the bustas who hijack email accounts through GMail Mobile don't even need to crack your password.

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2157 on: August 31, 2010, 11:14:19 PM »
Some busta got into my email account through a mobile phone, as Bobbias can confirm.  Nothing in my account settings was changed, fortunately, and I changed to a password around 10000000x more powerful than my previous one, but I was searching around with google and apparently the bustas who hijack email accounts through GMail Mobile don't even need to crack your password.

How the hell is that supposed to work?
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

annon

  • AWSUM MODERATAR!!!!1
  • Hero Member
  • *****
  • Posts: 1837
    • View Profile
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2158 on: September 01, 2010, 12:27:09 AM »
Maybe there's a security hole that makes a cookie easy to obtain or something. Whatever the case, I'm not using Gmail Mobile now.

Code: [Select]
f(u,c,k,_,y,e,a,h)
{return u*u*u*u-u*u*u*_+u*u*y-u*e+a?k?f(u+1,c,k-1,_,y,e,a,h):0:putchar(u-c+h)==f(u+1,u,k-1,_,y,e,a,h);}
main(){return f(0,0,34,84,2423,26628,72864,98)<putchar(32)>f(0,0,40,125,5809,118995,906750,96)==~putchar(10);}

Kulli

  • Guest
Re: Stuff that peels your potatoes with paring knives of ANGER.
« Reply #2159 on: September 01, 2010, 12:27:41 AM »
How the hell is that supposed to work?

Some busta got into my email account through a mobile phone, as Bobbias can confirm.  Nothing in my account settings was changed, fortunately, and I changed to a password around 10000000x more powerful than my previous one, but I was searching around with google and apparently the bustas who hijack email accounts through GMail Mobile don't even need to crack your password.

ahahahaha