Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Dicky B
Mar 23, 2004

This seems like a good time to recommend this book http://www.elementsofprogramming.com/book.html

Adbot
ADBOT LOVES YOU

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!

baquerd posted:

I certainly tend to agree and a point well made. But what if you took your car apart in the driveway and built it from the frame up, but it's still in the same place (read: memory location)? It is only a difference of degree don't you think but now the real world example is much more arguable.

:iiaca:

Okay, that is probably the point where I'd be inclined to break the analogy. But I disagree that modifying and completely rebuilding are just a difference of degree.

Edit: And to be clear, I don't think your code sample (helpfully quoted below this post) qualifies as taking apart and rebuilding from the frame up.

TasteMyHouse
Dec 21, 2006

Brecht posted:

code:
Bar bar1("cake dogg");
Bar bar2("present cat");
bar1 = bar2; // same variable different object

what the gently caress are you talking about
e: oh I get it, you mean that the variable bar1 on line 3 is the same variable as the bar1 that is on line 1, it just has been assigned a different object. Do I understand? this is incorrect (in most* situations) in C++ however.

*I only say most because I'm not certain that it's never, but I can't think of a situation where that's true

TasteMyHouse fucked around with this message at 22:43 on Sep 26, 2011

Brecht
Nov 7, 2009

TasteMyHouse posted:

what the gently caress are you talking about
e: oh I get it, you mean that the variable bar1 on line 3 is the same variable as the bar1 that is on line 1, it just has been assigned a different object. Do I understand? this is incorrect (in most* situations) in C++ however.

*I only say most because I'm not certain that it's never, but I can't think of a situation where that's true
Yes, my point is only that the identifier "bar1" (ie. the variable "bar1") is the same at line 1 and line 3, but that the object it refers to is a different object in every functional sense. I concede it has the same memory address (I could probably make that not true with some hosed-up poo poo in Bar::operator= and some preconditions) but that's an implementation detail, and irrelevant to illustrating the distinction between variables and the things they refer to.

Toady posted:

I think you're being a little too pedantic here.
If an internet forum thread about programming isn't the place to be pedantic then I don't even want to live in this world anymore :colbert:

Brecht fucked around with this message at 22:52 on Sep 26, 2011

Smugdog Millionaire
Sep 14, 2002

8) Blame Icefrog

nielsm posted:

But apparently C# Struct var; is equivalent to something like:
char buffer[sizeof(Struct)];
Struct &var = *(Struct*)(void*)buffer;


I'm not going to chime in with anything about C++, but for correctness' sake I'm going to bring this up about C#: http://blogs.msdn.com/b/ericlippert/archive/2010/09/30/the-truth-about-value-types.aspx
(Don't think about value types in C# like that.)

TasteMyHouse
Dec 21, 2006

Brecht posted:

Yes, my point is only that the identifier "bar1" (ie. the variable "bar1") is the same at line 1 and line 3, but that the object it refers to is a different object in every functional sense. I concede it has the same memory address (I could probably make that not true, but it would take some pretty gnarly abuse) but that's an implementation detail, and irrelevant to illustrating the distinction between variables and the things they refer to.

You're saying this like this is a feature of C++, which it isn't; this is dependent on Bar's definition of operator= implementing the behavior you describe, which it is by no means required to.

I think you're muddying the waters for the people itt who already don't have a strong understanding of how C++ works.

e: I'm also frustrated by your specification of "in every functional sense", since an object can mutate itself to be "functionally different" through a hundred different ways other than just the assignment operator.

TasteMyHouse fucked around with this message at 23:01 on Sep 26, 2011

Vanadium
Jan 8, 2005

Smugdog Millionaire posted:

I'm not going to chime in with anything about C++, but when it comes to C# the language designers really want you to not think about value types like that: http://blogs.msdn.com/b/ericlippert/archive/2010/09/30/the-truth-about-value-types.aspx

Yeah, but the language designers also apparently want me to put function names capitalised, so, like, what the gently caress, man!!!

baquerd
Jul 2, 2007

by FactsAreUseless

Eggnogium posted:

Edit: And to be clear, I don't think your code sample (helpfully quoted below this post) qualifies as taking apart and rebuilding from the frame up.

That's not my code :colbert: but I agree. The question then appears to be, how much of an object must change before it is no longer the same object (assuming it keeps its location in memory)? If I change every member variable in the below class, is it the same object? What about some proper subset of the member variables?

code:
class Person {
  String firstName;
  String lastName;
  String SSN;
  Date DOB;
}

TasteMyHouse
Dec 21, 2006
This discussion reminds me of something Žižek once wrote, and I think that's a sure sign that the real horror is most definitely us, in this thread, right now.

tef
May 30, 2004

-> some l-system crap ->
so hang on is java pass by reference or value

Smugdog Millionaire
Sep 14, 2002

8) Blame Icefrog

tef posted:

so hang on is java pass by reference or value

it's both at the same time dude :2bong:

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
In Java you pass everything, including references, by value. Objects are only created when you use the keyword "new". and mumble mumble autoboxing etc. Reference assignment uses "reference semantics", as opposed to "copy semantics".

Zombywuf
Mar 29, 2008

Smugdog Millionaire posted:

I'm not going to chime in with anything about C++, but for correctness' sake I'm going to bring this up about C#: http://blogs.msdn.com/b/ericlippert/archive/2010/09/30/the-truth-about-value-types.aspx
(Don't think about value types in C# like that.)

Value types? Those are like the opposite of void and empty types right?

Vanadium
Jan 8, 2005

tef posted:

so hang on is java pass by reference or value

Is prolog pass by value or pass by reference :allears:

Zombywuf
Mar 29, 2008

Vanadium posted:

Is prolog pass by value or pass by reference :allears:

The WAM implementation is pass by reference to reference.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

baquerd posted:

In Java there are objects and there are primitives. I've been with Java since 1997 and the terminology did not start out as ambiguous though recent revisions have practically made everything a bit muddled. I don't see what's so hard to understand why you can have object types and non-object types, from booleans to doubles to... (ok it's not a long list) but anything out there that does not support methods or member variables can be thought of as a non-object, then there are objects, then there are structs which are a sort of specialized object in Java...
A. Someone who's written code for over 10 years, but still doesn't understand fundamental programming concepts.

Q. What is a Java developer?

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Eggnogium posted:

Here's a horror: Scrolling past your avatar in IE9 slows the browser down to a crawl.

I thought I was insane. Thank you for confirming that I'm not. Scrolling past tef's avatar spikes my CPU like crazy and slows down IE9. Sometimes the browser even becomes non-responsive! It's the animated GIF; opening it in IE9 alone sends my CPU usage up to a constant 12% and memory usage keeps going up. Someone ought to send that to Microsoft and mention that so they can fix whatever the gently caress is happening.

New Yorp New Yorp fucked around with this message at 05:21 on Sep 27, 2011

baquerd
Jul 2, 2007

by FactsAreUseless

Ithaqua posted:

It's the animated GIF; opening it in IE9 alone sends my CPU usage up to a constant 12% and memory usage keeps going up. Someone ought to send that to Microsoft and mention that so they can fix whatever the gently caress is happening.
I bet it's redrawing the entire image every frame but the GIF animation definition allows for frame difference updates so the actual file size is small enough to be an avatar but there are a ton more frames than most GIFs.

ToxicFrog
Apr 26, 2008


baquerd posted:

I bet it's redrawing the entire image every frame but the GIF animation definition allows for frame difference updates so the actual file size is small enough to be an avatar but there are a ton more frames than most GIFs.

That still doesn't explain why it would murder performance in IE9 when it works just fine in every other browser on earth, though.

angrytech
Jun 26, 2009
I thought that had been fixed already. Maybe they introduced a regression?

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

nielsm posted:

But apparently C# Struct var; is equivalent to something like:
char buffer[sizeof(Struct)];
Struct &var = *(Struct*)(void*)buffer;


Presumably with adequate alignment.

Also, goons, "object" is a language-defined term. A local variable in Java is not an object. Pretty much everything in C++ is an object (except functions, references, and unconstructed storage). The end.

beuges
Jul 4, 2005
fluffy bunny butterfly broomstick

Ithaqua posted:

I thought I was insane. Thank you for confirming that I'm not. Scrolling past tef's avatar spikes my CPU like crazy and slows down IE9. Sometimes the browser even becomes non-responsive! It's the animated GIF; opening it in IE9 alone sends my CPU usage up to a constant 12% and memory usage keeps going up. Someone ought to send that to Microsoft and mention that so they can fix whatever the gently caress is happening.

It's already been reported (and I added a comment with tef's avatar as well): https://connect.microsoft.com/IE/feedback/details/606199/very-poor-gif-animation-performance

Microsoft's response:

quote:

Thank you for reporting the IE9 performance issue when viewing a web page with many animated GIFs. While your bug report is a valid observation, we will not be addressing the issue in IE9. Animated GIF use overall is not particularly high and is declining. Moreover, sites with many animated GIFs are rare. At this stage in the IE9 cycle, we are focusing our engineering efforts on interoperability and performance issues common to a large number of sites.


Your feedback is very important to us, and it helps us improve the quality of Internet Explorer. We continue to welcome more feedback, so please don't hesitate to report other ways that we can improve Internet Explorer.

Best regards,

The Internet Explorer Team

:pwn:

tef
May 30, 2004

-> some l-system crap ->
iirc it only affects 32 bit ie9 (or was it 64 bit). some people don't have a problem with ie9

TasteMyHouse
Dec 21, 2006

Microsoft posted:

Moreover, sites with many animated GIFs are rare.

I guess Microsoft doesn't care about tumblr users.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

tef posted:

iirc it only affects 32 bit ie9 (or was it 64 bit). some people don't have a problem with ie9
it affects both on my machine, though I think 64-bit handles it a tiny bit better

Zombywuf
Mar 29, 2008

I think this speaks for itself:
code:
if dist > closest:
    break
    notdone=False
but it's made worse by the fact that pylint tells me notdone is never used.

Che Delilas
Nov 23, 2009
FREE TIBET WEED

beuges posted:

:pwn:

It's a high enough priority to write and release, but not high enough to test or change. Sounds like Microsoft to me.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
It doesn't even work in Safari 5, it just draws a blue dot where the "turtle" would be.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Aleksei Vasiliev posted:

it affects both on my machine, though I think 64-bit handles it a tiny bit better

Same here though it's not bringing down the whole machine. Glad I don't have to use IE for everything.

1337JiveTurkey
Feb 17, 2005

Che Delilas posted:

It's a high enough priority to write and release, but not high enough to test or change. Sounds like Microsoft to me.

Clearly this would not be a problem if every avatar were a Silverlight plugin.

angrytech
Jun 26, 2009

TRex EaterofCars posted:

It doesn't even work in Safari 5, it just draws a blue dot where the "turtle" would be.

Wait, there's supposed to be a turtle in that gif?

Factor Mystic
Mar 20, 2006

Baby's First Post-Apocalyptic Fiction

angrytech posted:

Wait, there's supposed to be a turtle in that gif?

haha

TasteMyHouse
Dec 21, 2006

angrytech posted:

Wait, there's supposed to be a turtle in that gif?

In case you're not joking...

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

TasteMyHouse posted:

In case you're not joking...

There isn't an obvious cursor/turtle in the avatar.

TasteMyHouse
Dec 21, 2006

MEAT TREAT posted:

There isn't an obvious cursor/turtle in the avatar.

are we seeing the same thing? I see a curve being drawn in a turtle-graphics fashion. IIRC it was made with Python's turtle module.

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!

beuges posted:

It's already been reported (and I added a comment with tef's avatar as well): https://connect.microsoft.com/IE/feedback/details/606199/very-poor-gif-animation-performance

Microsoft's response:


:pwn:

Way to totally miss the point IE.

Anyways I just confirmed it's still broken in the IE10 preview.

Catalyst-proof
May 11, 2011

better waste some time with you

Dicky B posted:

This seems like a good time to recommend this book http://www.elementsofprogramming.com/book.html

I defy anyone to say they got past chapter 1 of this book without a migraine. It makes perfect sense for me up to Transformations and their Orbits. Then I loving have no idea what the gently caress is going on.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

TasteMyHouse posted:

are we seeing the same thing? I see a curve being drawn in a turtle-graphics fashion. IIRC it was made with Python's turtle module.

So do I, but this was said:

TRex EaterofCars posted:

It doesn't even work in Safari 5, it just draws a blue dot where the "turtle" would be.

And it's not unreasonable for someone to expect to see the cursor/"turtle" from days of yore.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Fren posted:

I defy anyone to say they got past chapter 1 of this book without a migraine. It makes perfect sense for me up to Transformations and their Orbits. Then I loving have no idea what the gently caress is going on.
It took me about 6 months to make it through it, but I'm quite glad I did. You really do have to do the exercises.

Adbot
ADBOT LOVES YOU

NotShadowStar
Sep 20, 2000

Dicky B posted:

This seems like a good time to recommend this book http://www.elementsofprogramming.com/book.html

It's another aspie written book by math phds in the typical overly symbolic aspie academic style. These concepts aren't hard, they're just written in a very unnecessary obtuse way.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply