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
Linear Zoetrope
Nov 28, 2011

A hero must cook

LeftistMuslimObama posted:

I posted this before, but here's the same program in MUMPS:

I can't wait for the Measles and Rubella extensions.

Adbot
ADBOT LOVES YOU

Pollyanna
Mar 5, 2005

Milk's on them.


C, C++, C#, C. elegans

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



sarehu posted:

You're not responding to a post that was talking about whether something should be considered hostile. That does not mean the same thing as the word abusive.

So you agree it was hostile, but not abusive? Whether you call it hostile or abusive, it doesn't belong in a professional context.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Jsor posted:

I can't wait for the Measles and Rubella extensions.

I think there's a company in California working on that :)

(it is a vaccination joke)

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
So I got called in today to help a coworker review a spec that a contractor wrote up for some work he's going to do for us. He's porting a VB6 app that the manufacturing people use to C#. I don't know much C# and I have strained myself to avoid learning any VB6, but I found some horrors within 30 seconds anyways!

code:
public bool status; // status of the pressure reading
				// status error codes:
					// -1 state is undefined
					// 0 state is success
					// 1 communication error
					// 2 failed to achieve pressure
					// 3 process aborted

...

public string control; // last pressure control status from the PPC3
				     // either "R" if ready, "N" otherwise

...
I imagine this is the result of an overly-literal port from VB6, but still :psyduck:

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Blotto Skorzany posted:

So I got called in today to help a coworker review a spec that a contractor wrote up for some work he's going to do for us. He's porting a VB6 app that the manufacturing people use to C#. I don't know much C# and I have strained myself to avoid learning any VB6, but I found some horrors within 30 seconds anyways!

code:
public bool status; // status of the pressure reading
				// status error codes:
					// -1 state is undefined
					// 0 state is success
					// 1 communication error
					// 2 failed to achieve pressure
					// 3 process aborted

...

public string control; // last pressure control status from the PPC3
				     // either "R" if ready, "N" otherwise

...
I imagine this is the result of an overly-literal port from VB6, but still :psyduck:

Why on earth isn't that staus an enum? VB6 had enums, so that's not an excuse.

b0lt
Apr 29, 2005

Blotto Skorzany posted:

So I got called in today to help a coworker review a spec that a contractor wrote up for some work he's going to do for us. He's porting a VB6 app that the manufacturing people use to C#. I don't know much C# and I have strained myself to avoid learning any VB6, but I found some horrors within 30 seconds anyways!

code:
public bool status; // status of the pressure reading
				// status error codes:
					// -1 state is undefined
					// 0 state is success
					// 1 communication error
					// 2 failed to achieve pressure
					// 3 process aborted

...

public string control; // last pressure control status from the PPC3
				     // either "R" if ready, "N" otherwise

...
I imagine this is the result of an overly-literal port from VB6, but still :psyduck:

http://thedailywtf.com/articles/What_Is_Truth_0x3f_

DARPA Dad
Dec 9, 2008

Look Around You posted:

Also in what loving world do you live in where repeatedly posting/sending death threats to "express disagreement" to someone online is not abusive? Or having multiple people do it? How about posting their address and threatening to rape and murder them? How is any of that not abusive? Like do you honestly think that the #gamergate bullshit is actually about "ethics in video game journalism" and not a way to further disempower and subjugate women to push them further away from their sacred loving video games or whatever the gently caress their goal is now?

Like I honestly want to know how any of that poo poo is not abusive. Please justify it to me, I'd love to hear an explanation.

e: (that is not directly related to the linus style stuff, but to explain my reasoning, judging by how you framed your post talking about essentially fake abuse online, it definitely leads me to believe that you view that poo poo in the same way)

e2: ((and along the lines of the linus stuff, in what world is it not abusive to talk to someone like that? It's like the very definition of abusive language))

Shut the gently caress up. Gamer gate or whatever Twitter controversy of the month has zero relation to anything discussed here

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

code:
enum bool{
  abusive
  notabusive
  linux
};

Che Delilas
Nov 23, 2009
FREE TIBET WEED
Fiction
Non-fiction
TheDailyWtf

DARPA Dad
Dec 9, 2008
TheDailyWTF

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

fleshweasel posted:

I want people defending Linus in this thread to resolve disagreements with coworkers the way Linus would and let us know how it turns out for them.

For what it's worth the majority of people involved in the quoted discussions are paid open source coders, so I'd say apparently fine?

Edit: maybe avoid gendered pronouns, political donations and killing your wife though

Hiowf fucked around with this message at 23:07 on Jan 29, 2015

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Che Delilas posted:

Fiction
Non-fiction
TheDailyWtf

goodlanguage
mylanguage
lisp

Soricidus
Oct 21, 2010
freedom-hating statist shill

Jsor posted:

I can't wait for the Measles and Rubella extensions.

If I have my child vaccinated against MUMPS, will that increase the risk of autism?

Look Around You
Jan 19, 2009

DARPA Dad posted:

Shut the gently caress up. Gamer gate or whatever Twitter controversy of the month has zero relation to anything discussed here

Talking to people like poo poo online and expecting them to not be offended because "it's only online, what do they expect?" is the same in both cases. Though while you're right that it's not immediately relevant, the line of thought that it's ok for Linus to treat people like poo poo online, and and that they have no right to take offense because it's not real life is exactly the same one that carries over into justifying other random threats. I guess I'm just saying that people need to realize that there's actual people on the other side of their conversations, and not just a goofy screen name or machine generating responses emotionlessly or whatever, and that it's really Not Okay to treat people like poo poo just because you can't see their reaction.

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.
Maybe I missed it but I think you are in fact the only one who's claiming the comments being online somehow makes a difference. sarehu in fact explicitly stated he didn't think so.

So why now drag that false argument in, twice?

IT BEGINS
Jan 15, 2009

I don't know how to make analogies
php:
<?
$nchanged = pg_cmdtuples($result);
?>
This doesn't look so bad, right? What could be so horrible about a single line of PHP code?

Here's whats wrong with it: the last time you could find this function documented on php.net was ... 2004. When it had been deprecated for the previous 2+ years.

I don't know what's worse - that this function still exists in the code base I work on, or that a function that's been deprecated for 12+ years still works.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

LeftistMuslimObama posted:

Nope. I really think everyone who's super jaded on mumps is stuck maintaining really lovely code. Like, 90% of the MUMPS code out there is the M-equivalent of factoryfactorybeanproxyfactoryinitializer, but I genuinely think that for some applications it has inherent benefits that aren't present in other languages.

A language that makes it easy to write lovely code (especially at a per-line level, instead of at the broader architectural level) is a bad language. You can't blame the programmers for that. MUMPS is bad for a lot of the same reasons that PHP is bad.

The other stuff, like code comments having a runtime performance cost (though I think Intersystems finally fixed this in their implementation) is just poo poo icing on the rear end cake. Even the somewhat nice features of MUMPS (the spare btrees, mainly) don't save it, since other languages can easily implement those sorts of things as a library. At the end, all you have is a language that's too terse for its own good, creaking under the weight of its own specification.

That said, I do agree that the-company-that-shall-not-be-named somehow managed to use only the worst parts of MUMPS.

(And in the end, if you're raking in the dough because you know a computer thing that's not mainstream, then congratulations! You win the tech sector. But you don't have to get attached to the lovely technology you use to stack that paper. I know it's tempting to get attached; there was an incredibly shameful week or two where I thought Javascript was actually a good language. Luckily, I was quickly disabused of that notion.)

Look Around You
Jan 19, 2009

Skuto posted:

Maybe I missed it but I think you are in fact the only one who's claiming the comments being online somehow makes a difference. sarehu in fact explicitly stated he didn't think so.

So why now drag that false argument in, twice?

So I think I misinterpreted his posts and read further into it because if you spoke like that to someone IRL, they'd probably punch you in the face.

In any case, sarehu, I'm sorry for putting words in your mouth.

Thermopyle
Jul 1, 2003

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

I think I just said this recently, but isn't "it's only lovely if you use it wrong" a fully general defense of any piece of poo poo?

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

IT BEGINS posted:

This doesn't look so bad, right? What could be so horrible about a single line of PHP code?

Here's whats wrong with it: the last time you could find this function documented on php.net was ... 2004. When it had been deprecated for the previous 2+ years.

I don't know what's worse - that this function still exists in the code base I work on, or that a function that's been deprecated for 12+ years still works.

Yeah, can't have old working code, let's deprecate and replace by some SwiftNodeGoDartAngular#.js equivalent with new bugs.

Only kids and hipsters think code is a thing that rusts. You don't seem very hip, so...

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

sarehu posted:

You have to be emotionally retarded to interpret that retroactive abortion comment as vitriolic.* When I read comments like that I think, yes, I have felt that way and written like that, and I know how he feels, and it doesn't turn me off at all. So I think if other people are turned off then they are wrong to be so and their reasons or mere feelings are invalid. Also you are overlooking all the benefits of the tone he has. You'll see that sort of thing at other check-your-ego-at-the-door type environments.

*For example you'd have to be emotionally retarded to view that sentence as vitriolic too. And I mean materially vitriolic, with actual vitriol behind it.

:gitgud:

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Skuto posted:

For what it's worth the majority of people involved in the quoted discussions are paid open source coders, so I'd say apparently fine?

Linus is much more of an exception than this implies. I don't mean to sugar-coat the open source world, because there's a lot of social awkwardness and arrogance and unnecessary offense, but no, in pretty much every other open source community of any significance Linus's behavior would be considered unacceptably rude. As somebody else already noted, Linus is quite aware that he's a problem, and I think he honestly regrets it sometimes, but in the end he's just another rear end in a top hat who doesn't have any real incentive to act better.

And no, Linus being an rear end in a top hat is not somehow required by the nature of the LKML. Linus is the universally acknowledged ultimate technical gatekeeper for the kernel. Everybody knows that you have to convince Linus before your patch will make it in. Linus can just say, "I don't understand what you're trying to do here, please justify it," and the entire community will accept that as a mandate for the submitter. Doing so is, in fact, easier and and faster than coming up with novel ways to berate somebody for ten laborious paragraphs. Anybody who has ever been in a position of code ownership knows how to do this. There is exactly one reason why Linus takes the extra time to try to humiliate you, and it has nothing to do with being a responsible project leader.

IT BEGINS
Jan 15, 2009

I don't know how to make analogies

Skuto posted:

Yeah, can't have old working code, let's deprecate and replace by some SwiftNodeGoDartAngular#.js equivalent with new bugs.

Only kids and hipsters think code is a thing that rusts. You don't seem very hip, so...

I don't think it's reasonable for this code to work without even throwing warnings. Like, why are we removing the docs if this is still part of the language? I suppose we can have the backwards compatibility debate here, but I think it's a little silly to assume that code that was deprecated 15 years ago should just silently/magically work on the newest version of the language.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Skuto posted:

Yeah, can't have old working code, let's deprecate and replace by some SwiftNodeGoDartAngular#.js equivalent with new bugs.

Only kids and hipsters think code is a thing that rusts. You don't seem very hip, so...

Do you have any insight into this particular use of this particular function? Any humour to inject? Or are you just being a wet blanket today?

Dylan16807
May 12, 2010

Skuto posted:

Yeah, can't have old working code, let's deprecate and replace by some SwiftNodeGoDartAngular#.js equivalent with new bugs.

Only kids and hipsters think code is a thing that rusts. You don't seem very hip, so...

It's not that it's old, it's that the function is so bad php didn't want it.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Thermopyle posted:

I think I just said this recently, but isn't "it's only lovely if you use it wrong" a fully general defense of any piece of poo poo?

I'm not a lovely poster; you're just holding my posts wrong. :unsmigghh:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



IT BEGINS posted:

I don't think it's reasonable for this code to work without even throwing warnings. Like, why are we removing the docs if this is still part of the language? I suppose we can have the backwards compatibility debate here, but I think it's a little silly to assume that code that was deprecated 15 years ago should just silently/magically work on the newest version of the language.

Yeah, at the very least there should be warnings all over the place when using deprecated code. But then this happens:

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

rjmccall posted:

Linus is much more of an exception than this implies. I don't mean to sugar-coat the open source world, because there's a lot of social awkwardness and arrogance and unnecessary offense, but no, in pretty much every other open source community of any significance Linus's behavior would be considered unacceptably rude.

There's several other examples like Linus, but I do agree that the fact that most people can easily name them is a good indicator that their behavior is not considered the norm.

As long as you're not asking people to abort themselves you're unlikely to get into trouble for being a bit, er, harsh, on lkml though.

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

Dylan16807 posted:

It's not that it's old, it's that the function is so bad php didn't want it.

Ok, that is an excellent point. You got me at php, though.

ryde
Sep 9, 2011

God I love young girls

Skuto posted:

Yeah, can't have old working code, let's deprecate and replace by some SwiftNodeGoDartAngular#.js equivalent with new bugs.

Only kids and hipsters think code is a thing that rusts. You don't seem very hip, so...

What? If the function call is marked as deprecated, then keeping calls to it in your code base is a bad idea. Deprecations are the maintainers telling you that you need to change your code because either things are already broken or they will be at some indeterminate point in the future. Ignoring them for 12+ years is just terrible. This is not a hipster point of view.

ExcessBLarg!
Sep 1, 2001
How does someone find out pg_cmdtuples is deprecated though? Here's the ways:

1. Chance read of documentation and active review of stable code.

2. Language runtime indicates to the user (i.e., writes to a log) that the function is deprecated.

3. Code no longer works with the next major version of the language.

Now, I assume that pg_cmdtuples was deprecated in PHP 5, which would make it appropriate to remove it entirely in PHP 6. Except PHP 6 never happened and the world is effectively stuck with PHP 5. Of course, PHP is a horror itself, but that means #3 is unlikely to happen and that's OK. I don't know if PHP does #2, but is possible the code has always run at a log level higher than what PHP emits warnings of deprecated functions at. #1 appears to be how this was all discovered.

MrMoo
Sep 14, 2000

Microsoft just spammed out a warning to similar affect that they were dropping 5.3 and recommending users to test 5.4. Kinda SOL when stuff breaks though.

IT BEGINS
Jan 15, 2009

I don't know how to make analogies

ExcessBLarg! posted:

How does someone find out pg_cmdtuples is deprecated though? Here's the ways:

1. Chance read of documentation and active review of stable code.

It's literally only this. I have a poo poo-ton of code to wade through that uses functions like these.

Also lol @ deprecated in PHP 5 - it was deprecated in 4.2.0. That's April 2002. Fun times.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Soricidus posted:

If I have my child vaccinated against MUMPS, will that increase the risk of autism?

Other way around, actually, autism increases your risk of using MUMPS.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

Bognar posted:

Other way around, actually, autism increases your risk of using MUMPS.

Any language that was designed to run on the 18-bit (yes 18-bit) PDP-7 should, at this point, just be taken out behind the electrical shed and shot.

DARPA Dad
Dec 9, 2008

Look Around You posted:

Talking to people like poo poo online and expecting them to not be offended because "it's only online, what do they expect?" is the same in both cases. Though while you're right that it's not immediately relevant, the line of thought that it's ok for Linus to treat people like poo poo online, and and that they have no right to take offense because it's not real life is exactly the same one that carries over into justifying other random threats. I guess I'm just saying that people need to realize that there's actual people on the other side of their conversations, and not just a goofy screen name or machine generating responses emotionlessly or whatever, and that it's really Not Okay to treat people like poo poo just because you can't see their reaction.

ok but who the hell actually gives a poo poo

raminasi
Jan 25, 2005

a last drink with no ice

DARPA Dad posted:

ok but who the hell actually gives a poo poo

Is this a trick question?

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Thermopyle posted:

I think I just said this recently, but isn't "it's only lovely if you use it wrong" a fully general defense of any piece of poo poo?

It is. A bad language makes it easy to do bad things, and a good one makes it easy to do the right things. That a good programmer can avoid the pitfalls doesn't make a language good.

The PHP fractal of bad design article has a great part about that:

quote:

Let me expand on that last part a bit.

In C, functions like strpos return -1 if the item isn’t found. If you don’t check for that case and try to use that as an index, you’ll hit junk memory and your program will blow up. (Probably. It’s C. Who the gently caress knows. I’m sure there are tools for this, at least.)

In, say, Python, the equivalent .index methods will raise an exception if the item isn’t found. If you don’t check for that case, your program will blow up.

In PHP, these functions return false. If you use FALSE as an index, or do much of anything with it except compare with ===, PHP will silently convert it to 0 for you. Your program will not blow up; it will, instead, do the wrong thing with no warning, unless you remember to include the right boilerplate around every place you use strpos and certain other functions.

This is bad! Programming languages are tools; they’re supposed to work with me. Here, PHP has actively created a subtle trap for me to fall into, and I have to be vigilant even with such mundane things as string operations and equality comparison. PHP is a minefield.

On the opposite end the people working on C# used the term "pit of success"; the idea being that success in a well designed language should be something you fall into, not something you have to struggle to attain.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Let me also say that people can deal with languages with giant pitfalls. For all that people complain about C or JavaScript, I still use them every day, because there's nothing better that's come into that space where I agree with the design decisions or am happy about the tradeoffs.

Go and Rust are really cool but I can't easily use unsafe library code somebody wrote without jumping through a lot of hoops. Some would say that's a plus. Me, I need to write an app that uses libpng and OpenGL, so I'm going to write C.

TypeScript perhaps prevents a wide variety of common JavaScript errors, plenty of which I've spent hours debugging: I typoed my member variable, it was undefined, and that got implicitly converted into NaN which spread all throughout all my calculations, making it hard to find the culprit. But I've tried TypeScript: there's an upfront compile cost, and my error stack traces and source line debugger doesn't match up exactly. My REPL isn't in TypeScript, so I still have to know JS and how the TypeScript compiler might name the temporary variables it emits during complex calcuations so I know what to look for in the Locals pane.

I've written PHP. I loathe it, but the constraints I was given was that I was on cheap, shared hosting that only supported PHP, so I sucked it up and used it.

A language doesn't need to be absolutely perfect all the time. Your tools should work with you, yes, but you need to be aware of the tradeoffs and design decisions that go into a complete system, and made a reasonable judgment.

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