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
CPColin
Sep 9, 2003

Big ol' smile.

Volmarias posted:

Why did you have an expert on assholes?

Most of the EE users were experts on assholes

Adbot
ADBOT LOVES YOU

xtal
Jan 9, 2011

by Fluffdaddy

Doom Mathematic posted:

"Never use ==" is almost literally the first thing you're taught when you learn PHP.

Same with JavaScript, which is just as bad as PHP

xtal
Jan 9, 2011

by Fluffdaddy
https://twitter.com/lunasorcery/status/1209592895117897728

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

the three states of schrodinger's cat: probably, maybe, and empty string

Plorkyeran
Mar 22, 2007

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

I kinda like it. In practice you usually just use it as if it returned a boolean since it returns truthy/falsey values, and returning vaguely descriptive strings for the true values is better than returning ints (and JS of course has no proper enum). The lack of a "yes" return is because the MIME type is nowhere close to enough information to be able to determine that (the codec's fourcc as suggested in a reply wouldn't be either).

Happy Thread
Jul 10, 2005

by Fluffdaddy
Plaster Town Cop
Instead of a string why not have it return an exception type with a pretty_long_type_name to fit a better description in than "maybe", and null on failure to make it still be falsey?

Absurd Alhazred
Mar 27, 2010

by Athanatos

Dumb Lowtax posted:

Instead of a string why not have it return an exception type with a pretty_long_type_name to fit a better description in than "maybe", and null on failure to make it still be falsey?

"Instead of doing something bad, why doesn't it do something good?"
"Forget it, Jake, it's Javascript".

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
yea multimedia is a loving mess and theres no way around it

Dumb Lowtax posted:

Instead of a string why not have it return an exception type with a pretty_long_type_name to fit a better description in than "maybe", and null on failure to make it still be falsey?

there's nothing interesting you can probably say, also they want to remove fingerprint vectors

Absurd Alhazred
Mar 27, 2010

by Athanatos
https://twitter.com/textfiles/status/1211195330592747520

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Is the horror the complaining about the use of the standard "send a keystroke to an X window" tool to send a keystroke to a chrome window? Because that seems like the way it should be done, rather than someone writing a special-purpose tool that only works for Chrome windows.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I'm wondering why you'd wanna do that, instead of using selenium. I mean, surely he knows that it exists and works ...

E: Oh it's the chromium bugtracker from 2014 part, that's why. My brain skipped over that part because of the weirdly worded attempt at a joke.

Now I'm just curious about this 'layer of abstraction' he mentions ...

dougdrums fucked around with this message at 13:45 on Dec 29, 2019

Plorkyeran
Mar 22, 2007

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

Dumb Lowtax posted:

Instead of a string why not have it return an exception type with a pretty_long_type_name to fit a better description in than "maybe", and null on failure to make it still be falsey?

"probably" is "known mime type that we might support", "maybe" is "unknown mime type", and "" is "known mime type that we don't support". There isn't any other information that the browser could supply even if it wanted to.

Happy Thread
Jul 10, 2005

by Fluffdaddy
Plaster Town Cop
I know, those things in your second set of quotes per pair could be the names instead, right?

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Sure and then you add that to the list of fonts the browser supports as well as the maximum screen size and now you have a unique fingerprint for ad tracking purposes.

Plorkyeran
Mar 22, 2007

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

Dumb Lowtax posted:

I know, those things in your second set of quotes per pair could be the names instead, right?

Well that'd be sorta needlessly wordy and way more prone to typos in your thing that can't be statically checked.

Dylan16807
May 12, 2010

Plorkyeran posted:

Well that'd be sorta needlessly wordy and way more prone to typos in your thing that can't be statically checked.

And the current version lets you use it directly in an if statement.

Munkeymon
Aug 14, 2003

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



xtal posted:

Same with JavaScript, which is just as bad as PHP

No, it's less bad

code:
> '0e1234' == '0e2345'
< false

xtal
Jan 9, 2011

by Fluffdaddy

Munkeymon posted:

No, it's less bad

code:
> '0e1234' == '0e2345'
< false

https://dorey.github.io/JavaScript-Equality-Table/

JavaScript code:
> "" == [[]]
true

Thermopyle
Jul 1, 2003

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

I haven't used PHP much in years.

In JS using triple equals as a matter of course solves it's equality issues. Does using === let you stop worrying about it in PHP?

Munkeymon
Aug 14, 2003

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




Yeah, IIRC PHP's truth table isn't symmetric. JS is less bad.

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Thermopyle posted:

I haven't used PHP much in years.

In JS using triple equals as a matter of course solves it's equality issues. Does using === let you stop worrying about it in PHP?

Yes.
code:
$ php -r "var_dump('0e1234' == '0e2345');"
Command line code:1:
bool(true)
$ php -r "var_dump('0e1234' === '0e2345');"
Command line code:1:
bool(false)

megalodong
Mar 11, 2008

PHP talk reminded me of this classic: http://images.use.perl.org/use.perl.org/_Aristotle/journal/33448.html

code:
int size;

size = EXPR;

if (size > INT_MAX || size <= 0) {
    return NULL;
}

dest = calloc(size, sizeof(char));

Xarn
Jun 26, 2015
C++ code:
if (mim.master_pair()) {
    retval[p] = mim.master_pair()->first;
} else {
    assert(false);
}
:bang:

Absurd Alhazred
Mar 27, 2010

by Athanatos
More horrors from these very forumses:

Jeffrey of YOSPOS posted:

Lowtax change it so that unregistered users can't list forums in the panel. Some piece of logic in the code decided that not being able to list forums means it should show the banned page. The banned page shows your username - it'd say something like "CONGRATULATIONS fishmech!!!". However, logged in users do not have a username, and get set to a default one. Thanks to literally radium, this default was "Unregistered human being".

I turned off the "logged out users can't see forums" setting for now, and pushed this patch to remove the slurs:
code:
commit 077765fc017446469f9f51025de87b78ec3d3f79
Author: Jeffrey of YOSPOS <JeffreyOfYOSPOS@gmail.com>
Date:   Wed Jan 1 16:32:41 2020 -0600

    remove radium slurs from code

diff --git a/include/authbbuser.php b/include/authbbuser.php
index ca6c718..eca9c16 100644
--- a/include/authbbuser.php
+++ b/include/authbbuser.php
@@ -84,7 +84,7 @@ function bbuser_init($bbuserid, $bbpassword, $ip_address) {
        // if we didn't get a user above, make a guest (yes, this is still required)
        if(!($bbuserinfo[usergroupid])) {
                $bbuserinfo['userid'] = 0;
-               $bbuserinfo['username'] = 'Unregistered human being';
+               $bbuserinfo['username'] = 'Unregistered User';
                $bbuserinfo['daysprune'] = -1;
                $bbuserinfo['timezoneoffset'] = $bbuserinfo['showvbcode'] = 0;
                $bbuserinfo['usergroupid'] = $bbuserinfo['showsmilies'] = $bbuserinfo['showsignatures'] = $bbuserinfo['showavatars'] = $bbuserinfo['showimages'] = 1;
diff --git a/include/global.php b/include/global.php
index 245385d..9ddcf0f 100644
--- a/include/global.php
+++ b/include/global.php
@@ -207,7 +207,7 @@ if ($is_dev_mode && in_array($bbuserinfo['usergroupid'], array(6)) && isset($_GE
                $g = 1;
                $bbuserinfo = array(
                        'userid' => 0,
-                       'username' => 'Unregistered human being',
+                       'username' => 'Unregistered User',
                        'daysprune' => -1,
                        'timezoneoffset' => 0,
                        'showvbcode' => 0,

Edit: More

Jeffrey of YOSPOS posted:

...and fixed the bug. Gonna go back to watching the expanse with my friends now happy new years everyone!!!
code:
commit 50a3f1f28d55d3f9b1db840724f603f80ff455f8
Author: Jeffrey of YOSPOS <JeffreyOfYOSPOS@gmail.com>
Date:   Wed Jan 1 17:02:37 2020 -0600

    Don't show erroneous banned screen

    An "=" instead of a "==" meant that, if you didn't have permission to
    list forums, you were treated as banned.

diff --git a/include/global.php b/include/global.php
index 9ddcf0f..b9c7938 100644
--- a/include/global.php
+++ b/include/global.php
@@ -431,7 +431,7 @@ if(!$permissions['canview'] && !defined('IS_ARCHIVES')) {
        }

        // if the user is banned...
-       if(!$permissions['canview'] && ($bbusergroupid == 4  || $bbusergroupid = 144)) {
+       if(!$permissions['canview'] && ($bbusergroupid == 4  || $bbusergroupid == 144)) {
                dooutput(eval_template('banned'));
                exit;
        }

Absurd Alhazred fucked around with this message at 00:10 on Jan 2, 2020

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION
bless these, the dead gay forums

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I was reading that as if it was history and then I saw the commit date lmao

radium posted:

[WARN] the year is now 2020 and you are gay

FlapYoJacks
Feb 12, 2009
221 files changed, 72935 insertions(+), 38821 deletions(-)

xtal
Jan 9, 2011

by Fluffdaddy

dougdrums posted:

I was reading that as if it was history and then I saw the commit date lmao

drat, how did he know??

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

ratbert90 posted:

221 files changed, 72935 insertions(+), 38821 deletions(-)

I want to believe that this was an automated refactor that just renames something, but I know in my heart of hearts it's not and just has a commit message like "fixed"

FlapYoJacks
Feb 12, 2009

Volmarias posted:

I want to believe that this was an automated refactor that just renames something, but I know in my heart of hearts it's not and just has a commit message like "fixed"

About 70% was done by hand, and I have over 5 paragraphs of commit notes.

Edit*

The title of the commit log is "The refactoring"
And the first sentence is: "As I walk through the valley of the shadow of death, I will fear no evil."

FlapYoJacks fucked around with this message at 16:41 on Jan 2, 2020

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

ratbert90 posted:

The title of the commit log is "The refactoring"
And the first sentence is: "As I walk through the valley of the shadow of death, I will fear no evil."

I've always been fond of "lasciate ogni speranza, voi ch'entrate".

1337JiveTurkey
Feb 17, 2005

Zopotantor posted:

I've always been fond of "lasciate ogni speranza, voi ch'entrate".

I think I've left that particular line on a comment for some mega class that I never was able to effectively refactor.

edit: For people who haven't seen it before it translates roughly to "All Hope Abandon, Those Who Enter Here" from the gates to hell in the Divine Comedy

1337JiveTurkey fucked around with this message at 04:02 on Jan 3, 2020

NihilCredo
Jun 6, 2011

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

A former coworker was fond of "once more unto the breach...".

Munkeymon
Aug 14, 2003

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



"Re-enacting Pickett's Charge"?

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


# TODO: uuuuugh

tankadillo
Aug 15, 2006

https://www.scamlang.dev/

quote:

SCaml

It's not a scam.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

SCaml Ang?

Arsenic Lupin
Apr 12, 2012

This particularly rapid💨 unintelligible 😖patter💁 isn't generally heard🧏‍♂️, and if it is🤔, it doesn't matter💁.


Zopotantor posted:

I've always been fond of "lasciate ogni speranza, voi ch'entrate".
My husband's BASIC7 (look, we're talking decades ago) compiler, while in beta, printed that out every time you compiled your code. On alternating releases he switched it to English.

RPATDO_LAMD
Mar 22, 2013

🐘🪠🍆

It's a language for bitcoin nonsense so "it's not a scam" is by definition false.

Adbot
ADBOT LOVES YOU

tankadillo
Aug 15, 2006

RPATDO_LAMD posted:

It's a language for bitcoin nonsense so "it's not a scam" is by definition false.

I didn't scroll all the way down the first time I looked, so I can't believe I missed this:

quote:

SCaml version 1.0 "Pyramid" released!

extremely Not A Scam.

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