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
Absurd Alhazred
Mar 27, 2010

by Athanatos

Dr. Stab posted:

In Inform 7:

pre:
Cat is a kind of Animal.
Clearly the best language.

:shittypop: It's a kind of magic.

Adbot
ADBOT LOVES YOU

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Carbon dioxide posted:

And by then everyone was imagining a rocket-powered wooden duck.
You don't have to imagine it:



(that example is from Head First Design Patterns, for reference)

ErIog
Jul 11, 2001

:nsacloud:

LeftistMuslimObama posted:

Nearly every place I've seen inheritance used what the developer really wanted was an interface. And there's no excuse for not using them. Even VB6 has interfaces ffs.

Agreed. Making explicit which methods ought to be supported/overridden and which ones never should be solves a lot of issues that arise naturally from inheritance.

FamDav
Mar 29, 2008

Munkeymon posted:

From what I hear you pretty much assume they already had exposure to programming of some sort already and if they didn't they slam into a learning cliff Wile E. Coyote style and burn out.

No

Carbon dioxide
Oct 9, 2012

SupSuper posted:

You don't have to imagine it:



(that example is from Head First Design Patterns, for reference)

drat, so he wasn't even original. Oh well.

TheresaJayne
Jul 1, 2011

Absurd Alhazred posted:

I will have you know that cat implements animal. :3:

I thought that Cat Extends Feline which extends Mammal which extends Animal which implements Carbon Based Lifeform

hyphz
Aug 5, 2003

Number 1 Nerd Tear Farmer 2022.

Keep it up, champ.

Also you're a skeleton warrior now. Kree.
Unlockable Ben

Dr. Stab posted:

In Inform 7:

pre:
Cat is a kind of Animal.

Clearly the best language.

Don't forget:

pre:
Happiness is a backdrop; happiness is everywhere.

(Legal compilable Inform 7 with the standard library!)

Cuntpunch
Oct 3, 2003

A monkey in a long line of kings

TheresaJayne posted:

I thought that Cat Extends Feline which extends Mammal which extends Animal which implements Carbon Based Lifeform

Excuse me you forgot to extend(or Implement) Vertebrate, so all your mammals are going to have broken movement methods.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

Cuntpunch posted:

Excuse me you forgot to extend(or Implement) Vertebrate, so all your mammals are going to have broken movement methods.

LIFE-193747282837471940: some kittens are wobbly

WONTFIX

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

uncurable mlady posted:

LIFE-193747282837471940: some kittens are wobbly

WONTFIX

Every cute video of a wobbly kitten that I've seen, it's turned out that it had some degenerative disease and was going to die in a few weeks.

Please fix this bug. Think of the cat children.

Munkeymon
Aug 14, 2003

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




Oh OK then

Space Kablooey
May 6, 2009


Bognar posted:

Every cute video of a wobbly kitten that I've seen, it's turned out that it had some degenerative disease and was going to die in a few weeks.

Please fix this bug. Think of the cat children.

It's just that it's not a high priority. :(

We just can't spare resources for a fix that will affect only a small number of yet-to-be-born kittens, and we can't patch already deployed kittens with the fix, so there's not much point to it. We hoped that with our genetic algorithm a fix could be mutated on it's own, but apparently the bug is becoming a feature that's being selected for, much like issue LIFE-46515567576456: Pugs.

We don't condone the use of LIFE Project's genetic algorithm to select for features that, while cute, might cause lowered quality of life for entities generated with it, but there's little we can do to curtail it. We hope that the community will wise up eventually to these issues and then will police itself.

EDIT:

xzzy posted:

Cat defects are actually a feature. There is a surplus of cats so we need to limit the population somehow.

That too. Last time the breeding algo for the Cats mutated it got kicked into overdrive.

Space Kablooey fucked around with this message at 17:06 on Apr 28, 2016

xzzy
Mar 5, 2009

Cat defects are actually a feature. There is a surplus of cats so we need to limit the population somehow.

FamDav
Mar 29, 2008

Munkeymon posted:

Oh OK then

It's a myth that is propagated by poor teaching at the introductory level (and not having good placement programs to challenge people with experience) and the mystique of the "programming since they were 4 now they're a billionaire" programmer. It also serves to keep those who were actively dissuaded from computer science in their youth (women) from entering the field. And there is no reason those who are hobbyist programmers will actually excel beyond the introductory classes; plenty of people hit their wall later on when it doesn't fit what they've been practicing for 10 years.

Anecdote: the largest program I wrote before I was 23 was 10 lines of BASIC when I was 8-10. I decided it was the dumbest thing in the world and went back to Pokemon.

Plorkyeran
Mar 22, 2007

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

HardDisk posted:

It's just that it's not a high priority. :(

We just can't spare resources for a fix that will affect only a small number of yet-to-be-born kittens, and we can't patch already deployed kittens with the fix, so there's not much point to it. We hoped that with our genetic algorithm a fix could be mutated on it's own, but apparently the bug is becoming a feature that's being selected for, much like issue LIFE-46515567576456: Pugs.

We don't condone the use of LIFE Project's genetic algorithm to select for features that, while cute, might cause lowered quality of life for entities generated with it, but there's little we can do to curtail it. We hope that the community will wise up eventually to these issues and then will police itself.
Disposable kittens that die after they grow out of their cute phase rather than spending a decade or two being not-cute are what the market demands.

Space Kablooey
May 6, 2009


Thanks for the contribution! We're adding your valuable comment to LIFE-1: gently caress this gay Earth.

Munkeymon
Aug 14, 2003

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



FamDav posted:

It's a myth that is propagated by poor teaching at the introductory level (and not having good placement programs to challenge people with experience) and the mystique of the "programming since they were 4 now they're a billionaire" programmer. It also serves to keep those who were actively dissuaded from computer science in their youth (women) from entering the field. And there is no reason those who are hobbyist programmers will actually excel beyond the introductory classes; plenty of people hit their wall later on when it doesn't fit what they've been practicing for 10 years.

Anecdote: the largest program I wrote before I was 23 was 10 lines of BASIC when I was 8-10. I decided it was the dumbest thing in the world and went back to Pokemon.

Poor teaching at the introductory level is pretty much what I was talking about, though?

Carbon dioxide
Oct 9, 2012

HardDisk posted:

It's just that it's not a high priority. :(

We just can't spare resources for a fix that will affect only a small number of yet-to-be-born kittens, and we can't patch already deployed kittens with the fix, so there's not much point to it. We hoped that with our genetic algorithm a fix could be mutated on it's own, but apparently the bug is becoming a feature that's being selected for, much like issue LIFE-46515567576456: Pugs.

We don't condone the use of LIFE Project's genetic algorithm to select for features that, while cute, might cause lowered quality of life for entities generated with it, but there's little we can do to curtail it. We hope that the community will wise up eventually to these issues and then will police itself.

EDIT:


That too. Last time the breeding algo for the Cats mutated it got kicked into overdrive.

You reminded me of https://www.youtube.com/watch?v=IFe9wiDfb0E

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

TooMuchAbstraction posted:

The very existence of a method named "safe_eval" fills me with deep unease.

How to implement "safe_eval":

1) POST the input code to {LANGUAGE}fiddle.net

2) Scrape the output off the page

Absurd Alhazred
Mar 27, 2010

by Athanatos
This is a horror I made myself. See if you can spot the error:

C# code:
for (int i = n-1; i > 0; i--)
{
        y [i] = x [i] - x [i = 1];
}
:shepface:

Linear Zoetrope
Nov 28, 2011

A hero must cook

Absurd Alhazred posted:

This is a horror I made myself. See if you can spot the error:

C# code:
for (int i = n-1; i > 0; i--)
{
        y [i] = x [i] - x [i = 1];
}
:shepface:

You used super minus instead of minus?

super minus is =

M31
Jun 12, 2012
Is the horror trying to start an indentation derail?

Linear Zoetrope
Nov 28, 2011

A hero must cook
code:
for (     int i = 3; i < K; i ++ )
         {

    x += i;}

JawnV6
Jul 4, 2004

So hot ...

M31 posted:

Is the horror trying to start an indentation derail?
With properly auto formatted C#? Probably not.

It arguably does half the right thing with n=3, so it might have even escaped early spot checking.

dc3k
Feb 18, 2003

what.

Absurd Alhazred posted:

This is a horror I made myself. See if you can spot the error:

C# code:
for (int i = n-1; i > 0; i--)
{
        y [i] = x [i] - x [i = 1];
}
:shepface:

you put a space before your square bracket you loving monster

Absurd Alhazred
Mar 27, 2010

by Athanatos

status posted:

you put a space before your square bracket you loving monster

At some point I gave up arguing with MonoDevelop over pretty much everything other than curly braces placement. :shrug:

Space Kablooey
May 6, 2009



found the horror

Jewel
May 2, 2009

Visual Studio 2015 is free just get that please, for your sake. MonoDevelop really doesn't play well with anything in comparison.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Absurd Alhazred posted:

At some point I gave up arguing with MonoDevelop over pretty much everything other than curly braces placement. :shrug:

And then you chose the wrong thing for the braces, you monster.

Absurd Alhazred
Mar 27, 2010

by Athanatos

HardDisk posted:

found the horror

Jewel posted:

Visual Studio 2015 is free just get that please, for your sake. MonoDevelop really doesn't play well with anything in comparison.

Some day I will be arsed to make sure that I can get VS2015 to work properly with Unity3D and just use that.

Today is not that day.

Obsurveyor
Jan 10, 2003

Absurd Alhazred posted:

Some day I will be arsed to make sure that I can get VS2015 to work properly with Unity3D and just use that.

Today is not that day.

It already works fine by default in 5.3+ or with a plugin in lower versions. The only thing that annoys the poo poo out of me is Unity constantly bitching about CR/LF crap. Use Visual Studio.

xtal
Jan 9, 2011

by Fluffdaddy
e

xtal fucked around with this message at 01:26 on Aug 26, 2016

john donne
Apr 10, 2016

All suitors of all sorts themselves enthral;

So on his back lies this whale wantoning,

And in his gulf-like throat, sucks everything

That passeth near.
code:
//Loop backwards, because comparing to zero is faster.
for (int j = customerPurchases.Count-1; j >= 0; --j)

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

xtal posted:

I haven't posted here in a long time, but I've come back with some stories from my first year of system administration with a game development studio you have probably heard of.

* One of our games, with a million users per month, trusts a plaintext user_id cookie for authentication.
* Another game client, when a request to the server fails, will enqueue _two_ retries. This continues exponentially. When the client eventually reconnects, dozens of requests are sent simultaneously. This created race conditions on the server, so we added a mutex to handle all requests in serial.
* A third game uses a spreadsheet as its central data store. This reaches the user through a pipeline that involves downloading the spreadsheet and uploading it to our web UI, which parses it and adds it to a database. Afterward, another script observes what changed in the database and creates code that is submitted to the central repository through a pull request. When we deploy this pull request, that code changes the state of the server to reflect the new data. (This is serious, I wrote most of the code for it.)
* The first game ran into a deadlock due to a race condition. When I told them the problem, they asked me to add more deadlocks.
* Without explaining floating point arithmetic to a colleague, I tell them the numbers in a data export are cents, not dollars. They asked me for a script to help them convert cents to dollars.

Zynga?

b0lt
Apr 29, 2005

john donne posted:

code:
//Loop backwards, because comparing to zero is faster.
for (int j = customerPurchases.Count-1; j >= 0; --j)

technically true on most CPUs, but lol

Absurd Alhazred
Mar 27, 2010

by Athanatos

Obsurveyor posted:

It already works fine by default in 5.3+ or with a plugin in lower versions. The only thing that annoys the poo poo out of me is Unity constantly bitching about CR/LF crap. Use Visual Studio.

Yeah, except for it actually not working and loading up MonoDevelop instead when VS takes too long to load. There's a way around that, but since I also have limited memory, I'm sticking to MonoDevelop for now, if you will be willing to allow this.

xtal
Jan 9, 2011

by Fluffdaddy

No, but I'm going to make fun of my friends who work there over this.

john donne posted:

code:
//Loop backwards, because comparing to zero is faster.
for (int j = customerPurchases.Count-1; j >= 0; --j)

This reminds me of when some, based on some advice on a PHPNuke Web forum, I decided to write my PHP with LT/GT or EQ and never LTE/GTE. I mean, it makes sense that "less than or equal" takes longer to evaluate than "less than" or "equal"...

xtal fucked around with this message at 01:21 on Apr 29, 2016

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

john donne posted:

code:

//Loop backwards, because comparing to zero is faster.
for (int j = customerPurchases.Count-1; j >= 0; --j)

A little knowledge is a dangerous thing.

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀

Knowing x86 assembly is probably a downside when it comes to application development.

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

Absurd Alhazred posted:

Yeah, except for it actually not working and loading up MonoDevelop instead when VS takes too long to load. There's a way around that, but since I also have limited memory, I'm sticking to MonoDevelop for now, if you will be willing to allow this.

I'm terribly sorry, but if it means you will be continuing to place a space character between arrays and their opening brackets, then I am not able to grant you permission to do that.

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