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
lifg
Dec 4, 2000
<this tag left blank>
Muldoon

I was hoping this would be “scary” like “it’s a high level language but doesn’t do boundary checking,” “our operator precedence table is fifty lines long,” and, “our random number generator was written by a CS 101 student trying his best.”

Adbot
ADBOT LOVES YOU

Joda
Apr 24, 2010

When I'm off, I just like to really let go and have fun, y'know?

Fun Shoe
"All functions are asynchronous, but there's no mutual exclusion"

Jeb Bush 2012
Apr 4, 2007

A mathematician, like a painter or poet, is a maker of patterns. If his patterns are more permanent than theirs, it is because they are made with ideas.
every basic operator is interpreted in the least useful way possible. better remember to use 2 ++ 1 if you want addition, because 2 + 1 = 21

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Jeb Bush 2012 posted:

every basic operator is interpreted in the least useful way possible. better remember to use 2 ++ 1 if you want addition, because 2 + 1 = 21

The "rear end in a top hat genie" language legit sounds pretty funny.
  • When applied to an integer, "!" does a factorial (even if used as a prefix). So does "not". Likewise, "^" is exponentiation instead of xor.
  • len(str) returns the average bytes per character of the string.
  • Use = for comparing booleans, == for chars, === for ints, ==== for longs, etc.
  • min(x, y) returns the amount of time between x and y, in minutes. max(x, y) returns the maximum representable value that the types of x and y can represent.

Linear Zoetrope
Nov 28, 2011

A hero must cook

TooMuchAbstraction posted:

The "rear end in a top hat genie" language legit sounds pretty funny.
  • When applied to an integer, "!" does a factorial (even if used as a prefix). So does "not". Likewise, "^" is exponentiation instead of xor.
Exception: for floats it's bitwise XOR.

quote:

  • Use = for comparing booleans, == for chars, === for ints, ==== for longs, etc.

The number of "=" is equivalent to sizeof(T), and thus architecture dependent and sensitive to adding elements to a struct.

E: My favorite "rear end in a top hat genie" moment when trying a real language was my first time using Javascript and attempting to type "print" in the console to debug a value :v:

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

TooMuchAbstraction posted:

[*]len(str) returns the average bytes per character of the string.

len returns the length of the string in grapheme clusters, but subscript/slicing indexes by utf-8 code point

Linear Zoetrope
Nov 28, 2011

A hero must cook
len attempts to create an IPA phonetic version of the string and gives the utf8 byte count of this representation. The length function is similar but returns the number of syllables.

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

rjmccall posted:

len returns the length of the string in grapheme clusters, but subscript/slicing indexes by utf-8 code point

It returns the width, in pixels, of the string, in an unspecified font.

e:

x / y returns x half the time, and y the other half.
x - y returns the a list of all of the integers between x and y inclusive.
% is a unary operator which divides a number by 100.
> < => <= >> and << are all assignment operators
x != y assigns to x an arbitrary value which is is not y.

Dr. Stab fucked around with this message at 06:11 on Oct 27, 2017

Absurd Alhazred
Mar 27, 2010

by Athanatos

Dr. Stab posted:

It returns the width, in pixels, of the string, in an unspecified font.

It returns the Least Exciting Neighbor of the word in the dictionary. If it's not a word in Esperanto, UB.

boo_radley
Dec 30, 2005

Politeness costs nothing

Absurd Alhazred posted:

It returns the Least Exciting Neighbor of the word in the dictionary. If it's not a word in Esperanto, UB.

This is a complex thing to try, even if you implement a vandical time algorithm . It boils down to sub optimal Gore searches in a complex Wash problem space.

QuarkJets
Sep 8, 2008

every variable is actually an object with a .type method, but calling x.type() prints the variable name (eg "x") to the terminal

for loops always execute exactly 4 times

& is simply an alias for +

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
I've been holding off on posting here, because my new workplace has so many coding horrors in their legacy stuff that I just don't know where to begin. So I'll start off small.

They had the foresight to understand that they would need different configuration in their webforms project for test and prod, but they eschewed config transformations I guess, so the configs are actually called web.config, web.config.staging and web.config.prod.

There's a script that runs in the build plan that replaces the config file with the appropriate one.

Aside from the appSettings section, these files share almost nothing in common, including both staging and prod missing entirely ALL of the binding redirects present in web.config making deployment a real "let's hope it works" kind of thing.

Oh and web.config.staging is not used in staging. It's used in test.

Linear Zoetrope
Nov 28, 2011

A hero must cook
Every call to "random" generates a single random number, decided at compile time.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Ranzear posted:

This guy gets it.

It's more for:
code:
Tank.x.minos()
Tank.y.minos()
Tank.v.minos(-0.5 * Tank.type.topspeed, Tank.type.topspeed)
Which saves like ... 30 irrelevant float bytes in json per tank per update. It's just a general 'hang this on values that will hit the netcode' use.

Why not just serialize the floats to 32 bits instead of to a string? If you have more than 4 bytes for floats you're sending in perf-relevant netcode, you've got some problems.

Absurd Alhazred
Mar 27, 2010

by Athanatos

boo_radley posted:

This is a complex thing to try, even if you implement a vandical time algorithm . It boils down to sub optimal Gore searches in a complex Wash problem space.

Why can't it be a simple std::map<std::string, float> with the float being "interesting" as judged by our intern, Jodie?

Qwertycoatl
Dec 31, 2008

Linear Zoetrope posted:

Every call to "random" generates a single random number, decided at compile time.

I've seen this one in real life (some proprietary thing)

canis minor
May 4, 2011

Today I learned that there's a goatse operator - =()= in Perl. I don't know how to feel about it

Jeb Bush 2012
Apr 4, 2007

A mathematician, like a painter or poet, is a maker of patterns. If his patterns are more permanent than theirs, it is because they are made with ideas.

canis minor posted:

Today I learned that there's a goatse operator - =()= in Perl. I don't know how to feel about it

form following function

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
Here’s a guy who created his own rear end in a top hat language, but strictly by taking the worst parts of real languages. It’s starts with PHP, adds significant white space, C macros, unless, and keeps going.

https://www.infoq.com/presentations/worst-programming-language

Hammerite
Mar 9, 2007

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

lifg posted:

Here’s a guy who created his own rear end in a top hat language, but strictly by taking the worst parts of real languages. It’s starts with PHP, adds significant white space, C macros, unless, and keeps going.

https://www.infoq.com/presentations/worst-programming-language

I was at a conference a few years ago where there was an evening "wacky" talk on a similar topic. Might have been the same guy. It got sidetracked really quickly into stuff like "you have to write programs in MS Word lol" rather than what actual program code would be like though.

Rubellavator
Aug 16, 2007

We made a toy c style language in college that ended every statement with a ? instead of a semicolon, and we thought it was hysterical.

iospace
Jan 19, 2038


Rubellavator posted:

We made a toy c style language in college that ended every statement with a ? instead of a semicolon, and we thought it was hysterical.

I think you could do this:

code:
#define ; ?
I could be wrong though (I know someone did something where they managed to make C look more like a "normal written language" or some poo poo like that. It was weird).

Joda
Apr 24, 2010

When I'm off, I just like to really let go and have fun, y'know?

Fun Shoe

lifg posted:

Here’s a guy who created his own rear end in a top hat language, but strictly by taking the worst parts of real languages. It’s starts with PHP, adds significant white space, C macros, unless, and keeps going.

https://www.infoq.com/presentations/worst-programming-language

It has C/C++'s build system right?

boo_radley
Dec 30, 2005

Politeness costs nothing
ProPublica obtained the source code for New York City's Forensic Statistical Tool (FST), developed by employees of the city's medical examiner's office to help analyze complex DNA evidence from crime scenes.

The software source code contained within this repository is Copyright © City of New York and was unsealed by a federal judge after a motion by ProPublica.

This is kind of eye-opening! I'm the 300 line pseudo-factory case statement that relies on magic ints in comparisondata.cs.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

iospace posted:

I think you could do this:

code:
#define ; ?
I could be wrong though (I know someone did something where they managed to make C look more like a "normal written language" or some poo poo like that. It was weird).

Yeah, you can't #define an arbitrary token, just something that's lexically an identifier (but including keywords).

Ranzear
Jul 25, 2013

leper khan posted:

Why not just serialize the floats to 32 bits instead of to a string? If you have more than 4 bytes for floats you're sending in perf-relevant netcode, you've got some problems.

Because it's old as hell now, I'm lazy, and it's JSON, but that's not a bad idea. It may also have been to make it more readable in debugging. I did mention it totally belongs here.

I'd go to WebRTC for anything new, and send far more granular updates.

Soricidus
Oct 21, 2010
freedom-hating statist shill

canis minor posted:

Today I learned that there's a goatse operator - =()= in Perl. I don't know how to feel about it

The correct reaction is shock and horror



because it’s not ±()=

comedyblissoption
Mar 15, 2006

lifg posted:

Here’s a guy who created his own rear end in a top hat language, but strictly by taking the worst parts of real languages. It’s starts with PHP, adds significant white space, C macros, unless, and keeps going.

https://www.infoq.com/presentations/worst-programming-language
significant white space (indentation to indicate scope) is a good feature :colbert:

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

boo_radley posted:

ProPublica obtained the source code for New York City's Forensic Statistical Tool (FST), developed by employees of the city's medical examiner's office to help analyze complex DNA evidence from crime scenes.

The software source code contained within this repository is Copyright © City of New York and was unsealed by a federal judge after a motion by ProPublica.

This is kind of eye-opening! I'm the 300 line pseudo-factory case statement that relies on magic ints in comparisondata.cs.

quote:

compareMethodIDSerializationBackupDoNotMessWithThisVariableBecauseItsAnUglyHackAroundACrappyLimitiationOfTheFCLsCrappyXMLSerializer

When the developers don't understand the most basic things about .NET serialization you know poo poo is going to be good.

quote:

// we do this because the .NET XML Serializer does not actually set public properties to the stored value, but instead it looks into the getter/setter methods
// and directly sets the underlying value.

This is somehow both wrong and almost right. It's like a carpenter who doesn't understand how to use a table saw so they cut all lumber by filing for a long time in the same spot. How did you get a job doing carpentry without learning about saws?!?!

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Simulated posted:

This is somehow both wrong and almost right. It's like a carpenter who doesn't understand how to use a table saw so they cut all lumber by filing for a long time in the same spot. How did you get a job doing carpentry without learning about saws?!?!

Look dude, I'm just trying to cut this board. My file works for me, I'm not interested in buying new tools, so if you could just help me cut this board and lay off about how I'm "doing it wrong" or whatever, I've got a bathroom to remodel here and these joists ain't gonna notch themselves.

QuarkJets
Sep 8, 2008

lifg posted:

Here’s a guy who created his own rear end in a top hat language, but strictly by taking the worst parts of real languages. It’s starts with PHP, adds significant white space, C macros, unless, and keeps going.

https://www.infoq.com/presentations/worst-programming-language

On this page it was already proven that Perl is the ultimate rear end in a top hat language

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

boo_radley posted:

ProPublica obtained the source code for New York City's Forensic Statistical Tool (FST), developed by employees of the city's medical examiner's office to help analyze complex DNA evidence from crime scenes.

The software source code contained within this repository is Copyright © City of New York and was unsealed by a federal judge after a motion by ProPublica.

This is kind of eye-opening! I'm the 300 line pseudo-factory case statement that relies on magic ints in comparisondata.cs.

C# code:
        private string getColumnNames(Dictionary<string, string> colMap)
        {
            StringBuilder val = new StringBuilder();
            foreach (string key in colMap.Keys)
            {
                val.Append(key);
                val.Append(',');
            }
            val.Remove(val.Length - 1, 1);
            return val.ToString();
        }
Or, you know...

C# code:
        private string getColumnNames(Dictionary<string, string> colMap)
        {
            return string.Join(",", colMap.Keys);
        }
Unless of course you're relying on that unhandled ArgumentOutOfRangeException from the call to Remove if the input dictionary is empty.

toiletbrush
May 17, 2010

boo_radley posted:

ProPublica obtained the source code for New York City's Forensic Statistical Tool (FST), developed by employees of the city's medical examiner's office to help analyze complex DNA evidence from crime scenes.

The software source code contained within this repository is Copyright © City of New York and was unsealed by a federal judge after a motion by ProPublica.

This is kind of eye-opening! I'm the 300 line pseudo-factory case statement that relies on magic ints in comparisondata.cs.

code:
<tr>
  <td height="27" align="left" valign="middle" bgcolor="#FFFFFF">
    <ul id="crumbs">
      <%--<li><a href="frmDefault.aspx">Home</a></li>--%>                   
      <li style="width: auto"><asp:LinkButton ID="lblMenuLevel1" runat="server" Text="You Should Never See This"></asp:LinkButton></li>
    </ul>
  </td>
</tr>
i wanna find this button and click it

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

comedyblissoption posted:

significant white space (indentation to indicate scope) is a good feature :colbert:

qsvui
Aug 23, 2003
some crazy thing
idgi

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

It's a loop over a range

Bongo Bill
Jan 17, 2012


The joke is based on that puppet dog character's catchphrase, which is: "For me to poop on!"

PhantomOfTheCopier
Aug 13, 2008

Pikabooze!

canis minor posted:

Today I learned that there's a goatse operator - =()= in Perl. I don't know how to feel about it
Not really, it's just that a name was retroactively given to a sometimes useful construct. It's listed alongside the Babycart, the Bang Bang, and The Enterprise, and others. http://search.cpan.org/dist/perlsecret/lib/perlsecret.pod

Doom Mathematic
Sep 2, 2008
The worse indictment is that the goatse operator is a workaround for the missing list keyword, which Perl omits "because in practice, this is never needed".

Adbot
ADBOT LOVES YOU

iospace
Jan 19, 2038


https://twitter.com/CodyBonnar/status/924417121697878016

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