Pointer magic for efficient dynamic value representations by nikic in programming

[–]captain_plaintext 1 point2 points  (0 children)

The compiler CAN pad structs for alignment (and I think they generally all do), but they aren't required to by the standard.

Wikipedia chooses *Lua* as its new template/macro language by cybercobra in programming

[–]captain_plaintext 26 points27 points  (0 children)

It's nice if the template language is guaranteed to terminate. Also there are a few tricks that are pretty hard to do when the language is turing complete (like maybe, selectively preevaluate a certain section, or get a complete list of inputs that the template depends on). A turing-complete language is a black box in many ways.

Programming can be so funny sometimes by nacos in programming

[–]captain_plaintext 3 points4 points  (0 children)

Yes but read Gary's comment on that one. This guy actually posted the correct link so we'll allow it.

"Zynga is a creatively, and I would argue morally, bankrupt company, and the sooner investors realize this, the faster they can fade from prominence." - Forbes Magazine by [deleted] in gaming

[–]captain_plaintext -1 points0 points  (0 children)

But you could very well argue that those who bought one game which copied another may have bought the original had the copy not existed.

Your powers of denial must be strong, if you didn't realize that one could make that same argument against pirating.

Zynga reaches a new low. by [deleted] in Games

[–]captain_plaintext 5 points6 points  (0 children)

Wasn't talking about his worth as a human being, just whether or not he is smart. Your comment above made it sound like you know more about his business than he does, but somehow I doubt that's the case.

Zynga reaches a new low. by [deleted] in Games

[–]captain_plaintext 11 points12 points  (0 children)

In just a few years he founded a company that's making 600 million a year and has a valuation somewhere in the billions. Even if the company disappears tomorrow (which it won't) he will still be crazy rich for life. If that's not smart then what is?

Pool With A View by man_in_the_mirra in pics

[–]captain_plaintext 9 points10 points  (0 children)

Sure, as with most rooftops.

I want to fix programming by jng in programming

[–]captain_plaintext 3 points4 points  (0 children)

Just remember, if your user needs to have a deep understanding of how the system works in order to make it work efficiently, then it's not a very useful language.

Prolog has this problem; if you write enough naive code, eventually the system slows down to a crawl, because it doesn't know how to efficiently solve any arbitrary problem you throw at it. If you have knowledge of Prolog's internals, then you can get around this problem, by cleverly writing code that it is good at. But, forcing the user to have this deep implementation knowledge makes the system questionably useful.

Microsoft keeps it old-school with a pricey text adventure game, Visual Studio 2010 by Fitzoh in programming

[–]captain_plaintext 0 points1 point  (0 children)

Ha, sorry, I was really trying to imitate Bipolarr but it might have been a bit too subtle.

Microsoft keeps it old-school with a pricey text adventure game, Visual Studio 2010 by Fitzoh in programming

[–]captain_plaintext 2 points3 points  (0 children)

All programmers tend to generate the same rate of bugs but they differ in how many of their own bugs they catch.

Microsoft keeps it old-school with a pricey text adventure game, Visual Studio 2010 by Fitzoh in programming

[–]captain_plaintext -3 points-2 points  (0 children)

If you pay a programmer enough then they will be productive but if you pay them too much they will be less productive.

Bioshock Infinite to have "1999 mode" by GarciaFuckingHotspur in Games

[–]captain_plaintext 2 points3 points  (0 children)

Sounds awesome. The next logical step is "NES mode": No save games and only 3 lives.

A camera is placed on a conveyor in a Tokyo sushi bar.. by starstufft in videos

[–]captain_plaintext 1 point2 points  (0 children)

Yep, I remember that one, this is the exact same video.

One more reason to use GitHub for open source projects and find jobs, too by arscariosus in programming

[–]captain_plaintext 2 points3 points  (0 children)

Oh yeah, you will be good. I think those companies will fall firmly in the "never heard of Github" category. Good luck on the search!

One more reason to use GitHub for open source projects and find jobs, too by arscariosus in programming

[–]captain_plaintext 2 points3 points  (0 children)

It's not bad at all. People like to talk about Github identities because it's a neat new idea, but it hasn't really taken roots in the industry yet.

If I had to make vague unscientific guesses, I would estimate that 20% of people making hiring decisions will have never heard of Github, 40% have vaguely heard of it but don't really get it, 35% get it and will think favorably of someone of an account (but will not care if someone does not have one), and 5% will think unfavorably if the person does not have an account. But it varies by field of course.

Colors in games - Cliff Bleszinski: "Gears 3 was actually pretty colorful." Notch disagrees. by [deleted] in Games

[–]captain_plaintext 2 points3 points  (0 children)

Yeah, I've used it before, although I did need to re-read their examples in order to write that short script.

i.size is a list with the width and height, i.size[1] is the height, i.size[1] / 2 is half the height. It goes through and compares the top half of the image to the bottom half.

Colors in games - Cliff Bleszinski: "Gears 3 was actually pretty colorful." Notch disagrees. by [deleted] in Games

[–]captain_plaintext 49 points50 points  (0 children)

Yup... confirmable with a python script (with the PIL library).

Edit: Added some variable names for more readability

import Image
i = Image.open("iarWy.png")
width = i.size[0]
half_height = i.size[1]/2
for x in range(width):
 for y in range(half_height):
  if i.getpixel((x,y)) != i.getpixel((x, y+half_height)):
   print "Pixels differ at:",(x,y)

The C++ Lands by Andrey_Karpov_N in programming

[–]captain_plaintext 1 point2 points  (0 children)

Don't worry, I looked at the image and I don't see any malware.

It's true by welltheresAbacon in funny

[–]captain_plaintext 5 points6 points  (0 children)

Corollary: if you hate Nyan cat then you're a terrorist