Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 1177 1178 [1179] 1180 1181 ... 3345

Author Topic: Things that made you RRRRRRAAAAGGGGEEEE today: Trust-o-nomics Edition  (Read 3747925 times)

The Darkling Wolf

  • Bay Watcher
  • Arf!
    • View Profile
    • Cataclysm - Dark Days Ahead
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17670 on: November 06, 2012, 08:10:22 pm »

Dara O'Briain
Logged
My cabbages!
[Thunderfury, Blessed Blade of the Windseeker]

I am fat, eating is my great joy.

Descan

  • Bay Watcher
  • [HEADING INTENSIFIES]
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17671 on: November 06, 2012, 10:08:08 pm »

My youtube has changed. Where the fuck are my likes?
Logged
Quote from: SalmonGod
Your innocent viking escapades for canadian social justice and immortality make my flagellum wiggle, too.
Quote from: Myroc
Descan confirmed for antichrist.
Quote from: LeoLeonardoIII
I wonder if any of us don't love Descan.

Corai

  • Bay Watcher
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17672 on: November 06, 2012, 10:19:39 pm »

My youtube has changed. Where the fuck are my likes?

I wanna know that too. The hell youtube?
Logged
Jacob/Lee: you have a heart made of fluffy
Jeykab/Bee: how the fuck do you live your daily life corai
Jeykab/Bee: you seem like the person who constantly has mini heart attacks because cuuuute

Mr Space Cat

  • Bay Watcher
  • inactive, changed accounts. sig for info
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17673 on: November 06, 2012, 10:53:23 pm »

My youtube has changed. Where the fuck are my likes?

I wanna know that too. The hell youtube?

Welcome aboard our rage train, gents. Here are your tickets.
Logged
Made a new account that I use instead of this one. Don't message this one, I'm probably not gonna use it.

New account: Spehss _

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17674 on: November 07, 2012, 10:34:54 am »

Dear Javascript,

I hate you now.  Why do you not have a clean and easy way to do inheritance like a proper OO language?  Yes, I understand that you're a prototypal language, and that's lovely, but you're making my life very hard.  I managed to finally beat you into submission after 4 hours of fighting.  Why do you make me hurt you?  I don't want to hurt you, I just want to be your friend, but you don't want to be mine!

Sincerely,
Telgin

Seriously, this is the most awful way to do proper inheritance that I've ever seen.  I finally managed to get it to mostly work, but it is absolutely hideous and will probably break the first time anything remotely useful is thrown at it.

Well, at least I won't be bored the next few days at work.
Logged
Through pain, I find wisdom.

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17675 on: November 07, 2012, 10:40:16 am »

Is there a reason you can't use anything else?
Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17676 on: November 07, 2012, 10:44:44 am »

Well... it has to be Javascript because it needs to run in customer browsers (I'm not aware of any other client side languages that will work in IE8+, FF and Chrome).  As for the proper inheritance, we could do something different, but in the end all of the developers (including me) are accustomed to traditional OO inheritance techniques.  Javascript only supports that with some fantastically horrid hacks, although it does sort of work...

I just want to reuse common code that could be placed in a parent class.  Why does Javascript want to make that hard?  :(
Logged
Through pain, I find wisdom.

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17677 on: November 07, 2012, 11:03:27 am »

Well... it has to be Javascript because it needs to run in customer browsers (I'm not aware of any other client side languages that will work in IE8+, FF and Chrome).  As for the proper inheritance, we could do something different, but in the end all of the developers (including me) are accustomed to traditional OO inheritance techniques.  Javascript only supports that with some fantastically horrid hacks, although it does sort of work...

I just want to reuse common code that could be placed in a parent class.  Why does Javascript want to make that hard?  :(

It doesn't make it hard. It just does it differently. What exactly is the problem? I've been meaning to flesh out a javascript tutorial for the programming thread.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17678 on: November 07, 2012, 01:43:32 pm »

I have it working, it's just definitely a case of trying to make the language do something it's just not intended to do.  Javascript was never intended to use traditional inheritance concepts, even though that's what we really want to use.  Using the prototype of the "class" you can easily enough replace its member functions with those of another class to simulate inheritance, but getting a proper hierarchy where you can defer to or call parent member functions is needlessly complicated.

In order to get this to work, I had to create a dummy constructor just so I could instantiate it to get a new prototype, which I then copy the base class's members over to.  Then I can copy into that the new class member functions.  I first modify a separate dummy object to have some functions like a call parent method which is able to call the parent object's like named method.

It's just annoying when Javascript could have had a built in extension mechanism.
Logged
Through pain, I find wisdom.

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17679 on: November 07, 2012, 02:07:03 pm »

Javascript does have a built in extension system.

A prototype is just an object, an objectthat can itself have a prototype, creating a chain of inheritance.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17680 on: November 07, 2012, 02:44:56 pm »

I admit that discussing Javascript's prototype stuff is a bit outside my element since I'm accustomed to more traditional inheritance, but from what I understand setting up a prototype chain like that doesn't do much other than give you the ability to access parent class members.  That's fine, I do that too effectively (I'm keeping references to the parent prototypes), but I also want to be able to override methods while keeping parent methods available directly in derived classes.

So if I had a base class A with say, method1 and method2 as member functions, and I want to override method2 in class B, there's no built in trivial way to express that B extends A and overrides method2 but uses A's method1. You'd have to do some workarounds where B you have to specify an empty method1 in B that then looks up its chain to A.

In more traditional languages, generally that's done for you or is trivial to do when you extend a class, and that's what I wanted to do.  And it works, it just takes a roundabout way to do it in Javascript.
Logged
Through pain, I find wisdom.

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17681 on: November 07, 2012, 02:51:39 pm »

I may be misunderstanding you, but that is how prototype inheritance already works.

I can whip up a working code example after work if it helps.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Squanto

  • Bay Watcher
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17682 on: November 07, 2012, 03:40:51 pm »

.... Once again, not paid for a bet because apparently a definitive verbal agreement with witnesses isn't enough for one person.  Almost made $100 off of some stupid geometry misconception someone had.  It's extra annoying since they both started the bet and were willing to bet $200, I limited to $100 because I don'tlike betting more than I have on hand, got interrupted before the handshake although 5 people knew we were going to bet, then he pulls out after 45 minutes of doodling trying to make his argument work.  I suspected he would never pay me even before we were going to shake, since he said he had no money on him, so I at least made very clear verbally that we were betting so we would have witnesses.

I consider the bet binding because:
A) he initiated it, not me, so it cannot be seen as me trying to squeeze money out of someone who wasn't willing to bet
B) he was willing to bet more than I was, further reinforcing A
C) it was clear that we both agreed on the bet, though a formal seal was not technically put in place, although verbally it was quite clear
D) multiple witnesses say thet we agreed verbally
E) the bet would have formally been sealed if the handshake hadn't been interrupted

He won't even agree that a partial bind to half the betted money would be acceptable.  Which means that I will bug him about the money he owes me for the next 4 years.

EDIT:  This may not seem that bad, but this makes a total of $1,100 dollars various people owe me through crap like this (especially annoying when they say stuff beforehand like "why do we need to shake?  We know we're betting"  They probably wouldn't have paid me anyways, though).
« Last Edit: November 07, 2012, 03:44:12 pm by Squanto »
Logged
Probably no reason other than it giving them a larger B-peen.
The B is for Business.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17683 on: November 07, 2012, 03:41:26 pm »

Looks like a misunderstanding on my part.  I happened to search again for "prototype inheritance" and discovered that yes, that's what I'm doing.  I'm doing it a bit differently than normal since I wanted some syntactic sugar to make it look more like traditional languages, and my ignorance has caused some duplication of effort and abuse of the language.  I'm working on a framework that's used for internal development here to replace another framework that is just too big and cumbersome for our needs, and getting an inheritance system set up is just more work than it feels like it needs to be.

I guess my biggest beef with Javascript's inheritance is that you have to do something like this to get that syntactic sugar:

Code: [Select]
Function.prototype.subclass= function(base) {
    var c= Function.prototype.subclass.nonconstructor;
    c.prototype= base.prototype;
    this.prototype= new c();
};
Function.prototype.subclass.nonconstructor= function() {};

...

function Circle(x, y, r) {
    Shape.call(this, x, y);
    this.r= r;
}
Circle.subclass(Shape);

Where in languages I'm used to, you can just do something like this (not a real language):

Code: [Select]
class Circle extends Shape {
    Circle(x, y, r) {
        Shape(x, y);
        this.r = r;
    };
    var r;
};

Don't kill yourself over a code sample, as I said I do have this working.  In fact, I'd really rather not look at it ever again if I can help it.  :)
Logged
Through pain, I find wisdom.

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Things that made you RRAAAAAGGGGEEEE today thread: NERD HERESY Edition
« Reply #17684 on: November 07, 2012, 08:09:00 pm »

So, my mother decided to call up my trash collecting service and tell them off. Now they wont talk to me.

I do technically owe them some money, even though they never ever delivered the service that was promised. Monday pickup was missed 1 to 3 times a month, they never delivered the trash can stickers they promised so that they would pick up multiple cans at a time even though I called them about it 3 times. They also told my mother the amount of the outstanding bill, which was very much illegal.

I don't know what to do now. She fucked shit up for me involving my money, again.

Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.
Pages: 1 ... 1177 1178 [1179] 1180 1181 ... 3345