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
NotShadowStar
Sep 20, 2000

fffffffffffffff goddamn I'm getting PTSD

One of the big reasons why I left the biological sciences was the code was universally terrible. Outstandingly so. Like 'well that's brilliant that it works, but you shouldn't be doing it'. The tool authors didn't know what the gently caress, refused to listen to anyone who had actual experience in the 'real world' (me), and I couldn't talk to the PIs because they're like 'it works who gives a gently caress'. Which left people like me trying to glue this wretched poo poo together was left holding the bag.

And EVERY SINGLE loving UTILITY HAS ITS OWN TEXT BASED TREE FILE FORMAT. I wrote SO MANY GODDAMN STATE MACHINES PROCESSING lovely TEXT FORMATS I WAS IMPREGNATED BY RAGEL. R͔̠̹͖̲͕à̪̗̫g͔ḛ̫̺̬̞l̤̦̮̦̦̭ ̬̝͕͖͈̣̬͞h̞a̴̖̘̲̤͖s̶͉̼̤̠̠̤ ̶̱̣̫̮̟ḅ̖͚̭̲ȩ̩͈͚͚͍̘e̷̙͙̥̖̰͇n̜͖̪̰͟ͅ ̡̦̮̬͖̺̥m̖͔y҉͇ ̹̼̫͜o̟̤͎n͉l̦̺͈̖̫͉͕y̰̝̱̭͓ ̪̻͎͇f̗̠͈̼r̲͖͙i͓̲̞͉̯ͅe̜̣n͇͟d̼͍̩̕.͕̤̦͡ ͕R̷͚͉ạ̧̦̙g͙̪̰̖͉͔͇͜e̹̯͍l̰͚̜̣̮̖ ͎̼̼͙w͉i͖͖͙̳̦͚͝l̺̤̞͚ͅl͍̟̬̮̦͎̭͞ ͍̠̤͙̀d҉͎̬͙͉̖͇o͙͓̠̪͞ ̳̼̮̟͘me̸͔ ̡̲n҉o҉̮̘͇͉̞̭ h͍a̷̰̭̻̻ͅr̶͈͖͖̙̻m̫̪ͅ.̤ ̲͕L̰̥̥̳̣̻͘i̠̪̹͞v̼̫̭͖͈e̢̯̫͖̹̻͈͚ ̷t̛͎̳̝̙͉̲̰ḫ̞r̘̼̜̥̬̣o̼̠u͚̭̥͕̘̞͞ͅg͓̯̲̻h ͍̻̩t̼́h̳̪̠̥͞ͅȩ̫ ͚͇͚̼̀s̠̝͓̙͍̲ta̤̫̝̫̤̱̥͝t̹̱̲͉̳̯͔͢e̲͖s̬ ̥t̴͖͉̙̖̰o̡̗͔̫ th͚̟̻̤̩͞e͈͍ ̴X̫͘M̫͎̬͇̬̣L̻̩͉̖̼ ̴͈͎p̧̦̣r̤͕e̛̞͖̗͇̮̪p҉̜̫̭ro͍c͉̜ḙ̣͓̜͢s͎̳͖s̘͔̝̖o̝̭̞̺̝r̭.͉̬̮ͅ ̡͓̪̰Ŗ̠͚̗̖̤a̧ģ̯e̶̠̠͔̣̺̤̱l̜͖̭̙̪̹͎ ̶̤͚̮͎͎s̗̦̝͔̪͍͞h̠̼̼̫͢o͇͚͢ͅẃ̞̘̜̙̰̙s̫̭͖͙̻̩̺ ̴̥th̻̺̝̲̯ḙ̹̪̣̖ ̱b̤a̞͝b͈̗͍͉̕y̪͡ ̖̻̬̦̬̻t̵̠̲͍ͅr̘͍̩̮̜u͚̺t̰͍̹͚́h͜ ̜ṯ̶̻̞̖o̹͎̯̦͉̬ ̪̫͜t͓̝̺́ḩ̭̠͈̰̰͇e͈̲̘̗̯̠ͅ ͕͎e̺͓n̩̙͉d̰͚͍̟̙̮̻ ͍ọ̹̹̻́f̺ ̟m͙̰̙͍̞̼̖y͔ ͏̜̘̜p̴a͏̼̫d̯̘̻͟d҉̱ị̼͚̺̙ͅn͏ģ̭̼͔̣ ̥͓̬̪d̨̲͕̭̙u̘̳̳͝ḿ̦̩m̖͈̠y̸̠̮̯͙̹ͅ.̰̥͔̙̫͜ ̧͚͚͕̙I͕̙̺͍̗̹͠t͕͈ ̸̣͙b͢re͓̳̼̩a̱̖̹͠t̛̯̟̩̻h͈̺̖͓͡e͎̹͍͚s̘̟͘ͅ ̡̙̭͈ț̵̖̤̺̜̮h̬̜̺͇̗͡e̡̱̭͇̳̪ ̣̬̫̼͈p͇̠̟̘̫̞r̛͙̪̳̜e̶̠͚̞͈̖͉s̨̼͈̹̖͇̫e̤͕̱̝n҉̰͎̜̰̼̳̝ta̗͓̳̤̟̲ͅt̵̰͖̰ì͔o͢n̴͈̣,̜̭̪̫ ̀m̴͍͍̹̦͙̖̰o̰̩̻̰c̬͎̩͉͎͇͟ͅk̷̗ ͘u̦̱͈͇ͅp̳̹̲̹̠ ̫̗̣t̬̩̪͍̕h̖̻̩ḙ̷͕̻̗͍ ͓̘̩i͕̺̻̹̩̠̺n͙͢d̫̺e̜̮ͅn̵̠t͓̣̫ ̳͙̤̫̞̣͜ͅf̬̟o̼͍̣r͕̪̗̣͕̹͉ ͇̮͕̣͇͞ͅa̙̥͜l̺̼͍̤̳l̙͎ ҉y͏̘̣̘̞̭͉o̫̩̼͖̝̮̹͞u͍̙͞r͉̟̭̩͡s̨͔̻͕̳.̧̹̥͓͓͖

Adbot
ADBOT LOVES YOU

suction
Jul 17, 2009
has this been posted? Found it on Reddit from 4chan

code:
#!/bin/bash
function f() {
    sleep "$1"
    echo "$1"
}
while [ -n "$1" ]
do
    f "$1" &
    shift
done
wait

example usage:
./sleepsort.bash 5 3 6 3 6 3 1 4 7

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Munkeymon posted:

You found one of my current employer's sites, I guess?

Well in that case I have access to your current employer's VCS :v:

Munkeymon
Aug 14, 2003

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



Wheany posted:

Well in that case I have access to your current employer's VCS :v:

Oh, my bad - you didn't mention any empty tables being used as spacers between the layout sub-tables, so probably not us.

raminasi
Jan 25, 2005

a last drink with no ice

NotShadowStar posted:

fffffffffffffff goddamn I'm getting PTSD

One of the big reasons why I left the biological sciences was the code was universally terrible. Outstandingly so. Like 'well that's brilliant that it works, but you shouldn't be doing it'. The tool authors didn't know what the gently caress, refused to listen to anyone who had actual experience in the 'real world' (me), and I couldn't talk to the PIs because they're like 'it works who gives a gently caress'. Which left people like me trying to glue this wretched poo poo together was left holding the bag.

And EVERY SINGLE loving UTILITY HAS ITS OWN TEXT BASED TREE FILE FORMAT. I wrote SO MANY GODDAMN STATE MACHINES PROCESSING lovely TEXT FORMATS I WAS IMPREGNATED BY RAGEL. R͔̠̹͖̲͕à̪̗̫g͔ḛ̫̺̬̞l̤̦̮̦̦̭ ̬̝͕͖͈̣̬͞h̞a̴̖̘̲̤͖s̶͉̼̤̠̠̤ ̶̱̣̫̮̟ḅ̖͚̭̲ȩ̩͈͚͚͍̘e̷̙͙̥̖̰͇n̜͖̪̰͟ͅ ̡̦̮̬͖̺̥m̖͔y҉͇ ̹̼̫͜o̟̤͎n͉l̦̺͈̖̫͉͕y̰̝̱̭͓ ̪̻͎͇f̗̠͈̼r̲͖͙i͓̲̞͉̯ͅe̜̣n͇͟d̼͍̩̕.͕̤̦͡ ͕R̷͚͉ạ̧̦̙g͙̪̰̖͉͔͇͜e̹̯͍l̰͚̜̣̮̖ ͎̼̼͙w͉i͖͖͙̳̦͚͝l̺̤̞͚ͅl͍̟̬̮̦͎̭͞ ͍̠̤͙̀d҉͎̬͙͉̖͇o͙͓̠̪͞ ̳̼̮̟͘me̸͔ ̡̲n҉o҉̮̘͇͉̞̭ h͍a̷̰̭̻̻ͅr̶͈͖͖̙̻m̫̪ͅ.̤ ̲͕L̰̥̥̳̣̻͘i̠̪̹͞v̼̫̭͖͈e̢̯̫͖̹̻͈͚ ̷t̛͎̳̝̙͉̲̰ḫ̞r̘̼̜̥̬̣o̼̠u͚̭̥͕̘̞͞ͅg͓̯̲̻h ͍̻̩t̼́h̳̪̠̥͞ͅȩ̫ ͚͇͚̼̀s̠̝͓̙͍̲ta̤̫̝̫̤̱̥͝t̹̱̲͉̳̯͔͢e̲͖s̬ ̥t̴͖͉̙̖̰o̡̗͔̫ th͚̟̻̤̩͞e͈͍ ̴X̫͘M̫͎̬͇̬̣L̻̩͉̖̼ ̴͈͎p̧̦̣r̤͕e̛̞͖̗͇̮̪p҉̜̫̭ro͍c͉̜ḙ̣͓̜͢s͎̳͖s̘͔̝̖o̝̭̞̺̝r̭.͉̬̮ͅ ̡͓̪̰Ŗ̠͚̗̖̤a̧ģ̯e̶̠̠͔̣̺̤̱l̜͖̭̙̪̹͎ ̶̤͚̮͎͎s̗̦̝͔̪͍͞h̠̼̼̫͢o͇͚͢ͅẃ̞̘̜̙̰̙s̫̭͖͙̻̩̺ ̴̥th̻̺̝̲̯ḙ̹̪̣̖ ̱b̤a̞͝b͈̗͍͉̕y̪͡ ̖̻̬̦̬̻t̵̠̲͍ͅr̘͍̩̮̜u͚̺t̰͍̹͚́h͜ ̜ṯ̶̻̞̖o̹͎̯̦͉̬ ̪̫͜t͓̝̺́ḩ̭̠͈̰̰͇e͈̲̘̗̯̠ͅ ͕͎e̺͓n̩̙͉d̰͚͍̟̙̮̻ ͍ọ̹̹̻́f̺ ̟m͙̰̙͍̞̼̖y͔ ͏̜̘̜p̴a͏̼̫d̯̘̻͟d҉̱ị̼͚̺̙ͅn͏ģ̭̼͔̣ ̥͓̬̪d̨̲͕̭̙u̘̳̳͝ḿ̦̩m̖͈̠y̸̠̮̯͙̹ͅ.̰̥͔̙̫͜ ̧͚͚͕̙I͕̙̺͍̗̹͠t͕͈ ̸̣͙b͢re͓̳̼̩a̱̖̹͠t̛̯̟̩̻h͈̺̖͓͡e͎̹͍͚s̘̟͘ͅ ̡̙̭͈ț̵̖̤̺̜̮h̬̜̺͇̗͡e̡̱̭͇̳̪ ̣̬̫̼͈p͇̠̟̘̫̞r̛͙̪̳̜e̶̠͚̞͈̖͉s̨̼͈̹̖͇̫e̤͕̱̝n҉̰͎̜̰̼̳̝ta̗͓̳̤̟̲ͅt̵̰͖̰ì͔o͢n̴͈̣,̜̭̪̫ ̀m̴͍͍̹̦͙̖̰o̰̩̻̰c̬͎̩͉͎͇͟ͅk̷̗ ͘u̦̱͈͇ͅp̳̹̲̹̠ ̫̗̣t̬̩̪͍̕h̖̻̩ḙ̷͕̻̗͍ ͓̘̩i͕̺̻̹̩̠̺n͙͢d̫̺e̜̮ͅn̵̠t͓̣̫ ̳͙̤̫̞̣͜ͅf̬̟o̼͍̣r͕̪̗̣͕̹͉ ͇̮͕̣͇͞ͅa̙̥͜l̺̼͍̤̳l̙͎ ҉y͏̘̣̘̞̭͉o̫̩̼͖̝̮̹͞u͍̙͞r͉̟̭̩͡s̨͔̻͕̳.̧̹̥͓͓͖

I'm pretty sure this is all scientific programming. I work with some physicists who have an elaborate simulation application, written in Fortran, that doesn't use any Fortran numerical libraries.

Lexical Unit
Sep 16, 2003

NotShadowStar posted:

fffffffffffffff goddamn I'm getting PTSD
Rant could also be about defense contracting. :argh:

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!

Janin posted:

yup
which city

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

NotShadowStar posted:

One of the big reasons why I left the biological sciences was the code was universally terrible. Outstandingly so. Like 'well that's brilliant that it works, but you shouldn't be doing it'. The tool authors didn't know what the gently caress, refused to listen to anyone who had actual experience in the 'real world' (me), and I couldn't talk to the PIs because they're like 'it works who gives a gently caress'. Which left people like me trying to glue this wretched poo poo together was left holding the bag.

GrumpyDoctor is right; this is all scientific programming. When I started to implement an algorithm for my bioinformatics research, my advisor told me:

quote:

I can tell you've worked in industry, since you want your implementation to be perfect. Don't worry about that. Make it work well enough, get results, publish the paper, and move on.
The pressures that we're under in academia ("publish or perish") are guaranteed to produce horrible code that works just well enough to get results out of.

Thermopyle
Jul 1, 2003

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

Lysidas posted:

The pressures that we're under in academia ("publish or perish") are guaranteed to produce horrible code that works just well enough to get results out of.

Good luck to others who want to reproduce your work!

ToxicFrog
Apr 26, 2008


This is compounded by the fact that most academics that aren't in CS or something closely related have little experience and no formal training in programming. So they learn just enough fortran/C/python to make something that works (or adapt existing code into something that works), get the results, and move on.

In the parallel programming class that I TA, we often see researchers from other disciplines (physics and biology in particular) who are hoping to learn enough to parallelize their takes-days-to-run software and get some significant improvements. In most cases, they lack the fundamentals that are necessary to understand the course material; the rest often decide to just stick with what they have rather than completely redesigning the program (which is often what would be necessary).

NotShadowStar
Sep 20, 2000

Lysidas posted:

The pressures that we're under in academia ("publish or perish") are guaranteed to produce horrible code that works just well enough to get results out of.
Problem being is that these tools are unleashed and it's expected to let the garden variety bench researchers throw data at and get results, but they barely loving function in the first place. These people have never even seen a terminal and a lot of these utilities expect ridiculous piping in and out.

I saw a paper published before I left that had a home grown utility requirement of Python < 2.0.

Also the idea of 'just get results out' was a fallacy because they keep going back to the same tools and pipelines but them just adding more poo poo to them.

Thermopyle posted:

Good luck to others who want to reproduce your work!

I brought up this very point. Repeatedly. Without the exact homegrown pipelines chaining all of this horrible poo poo together it's impossible to reproduce with the data sets and all the massaging needed to get from one loving terrible tool to another.

They essentially said :dealwithit:

Goddamnit I'm going to go zalgo again the more I talk about it.

raminasi
Jan 25, 2005

a last drink with no ice
I get the impression that there are an awful lot of scientists out there who could really use a software engineer just attached to their groups to, well, actually engineer their software. I basically have that job, and I think it's the best thing ever.

Thermopyle
Jul 1, 2003

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

GrumpyDoctor posted:

I get the impression that there are an awful lot of scientists out there who could really use a software engineer just attached to their groups to, well, actually engineer their software. I basically have that job, and I think it's the best thing ever.

This does sound like a great job. I love science and software and helping people.

I think I'll take your job, ok?

minato
Jun 7, 2004

cutty cain't hang, say 7-up.
Taco Defender

suction posted:

has this been posted? Found it on Reddit from 4chan

code:
#!/bin/bash
function f() {
    sleep "$1"
    echo "$1"
}
while [ -n "$1" ]
do
    f "$1" &
    shift
done
wait

example usage:
./sleepsort.bash 5 3 6 3 6 3 1 4 7
This is beautiful.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

GrumpyDoctor posted:

I get the impression that there are an awful lot of scientists out there who could really use a software engineer just attached to their groups to, well, actually engineer their software. I basically have that job, and I think it's the best thing ever.

There was an opening for this exact position at Argonne when I was looking... but the goddamn lab is impossible to get to in a reasonable time frame from where I live. I seriously considered moving.

Bozart
Oct 28, 2006

Give me the finger.

TRex EaterofCars posted:

There was an opening for this exact position at Argonne when I was looking... but the goddamn lab is impossible to get to in a reasonable time frame from where I live. I seriously considered moving.

Forget scientists. Be an embedded programmer with quants (scientists who want money) in finance and get paid $stupid.

Zombywuf
Mar 29, 2008

Indentation deliberately preserved:
code:
	                    queryString.AppendFormat("&amp;{0}={1}", paramName, strOrder);
Over a thousand lines later (yes, same function):
code:
			url = url.Replace("&amp;", "&").ToLowerInvariant();

Vanadium
Jan 8, 2005

Zombywuf posted:

code:
\t                    [...]
code:
\t\t\t[...]

Gotta love that.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
var LOG_OK = 1;

Looks like "login ok" or "user logged in", right? WRONG! It's opposite day!

if(!(username.length > 0 && username != "guest")){
LOG_OK = 0;
}

[.....]

if(!LOG_OK){
showConfigLink();
}

Why would you even?

Lexical Unit
Sep 16, 2003

My boss just came into my office and told me he's putting using namespace std; in a header file I wrote because his textual parser for some swig whatever doesn't recognize std::string, just string.

TasteMyHouse
Dec 21, 2006

Lexical Unit posted:

My boss just came into my office and told me he's putting using namespace std; in a header file I wrote because his textual parser for some swig whatever doesn't recognize std::string, just string.

can you at least convince him to use using std::string;?

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

TasteMyHouse posted:

can you at least convince him to use using std::string;?
"It's your code that is broken, not my parser"

duck monster
Dec 15, 2004

Ignore the image macros in the thread on this patch:

https://github.com/MrMEEE/bumblebee/commit/a047be85247755cdbe0acce6#diff-0

code:
@@ -348,7 +348,7 @@ case "$DISTRO" in

   ln -s /usr/lib/mesa/ld.so.conf /etc/alternatives/gl_conf
   rm -rf /etc/alternatives/xorg_extra_modules
   rm -rf /etc/alternatives/xorg_extra_modules-bumblebee
-  rm -rf /usr /lib/nvidia-current/xorg/xorg
+  rm -rf /usr/lib/nvidia-current/xorg/xorg
   ln -s /usr/lib/nvidia-current/xorg /etc/alternatives/xorg_extra_modules-bumblebee
   ldconfig 

  ;;
:ughh:

I wonder how many people got their machines bricked by this clanger.

duck monster fucked around with this message at 08:53 on Sep 8, 2022

qntm
Jun 17, 2009

Wheany posted:

var LOG_OK = 1;

Looks like "login ok" or "user logged in", right? WRONG! It's opposite day!

if(!(username.length > 0 && username != "guest")){
LOG_OK = 0;
}

[.....]

if(!LOG_OK){
showConfigLink();
}

Why would you even?

My favourite is a big chunk of code which made extensive use of a variable called $noRetries. It was about half an hour before I realised that this was intended to mean "number of retries", not "disable retries".

qntm
Jun 17, 2009

duck monster posted:

Ignore the retarded image macros in the thread on this patch:

https://github.com/MrMEEE/bumblebee/commit/a047be85247755cdbe0acce6#diff-0

code:
@@ -348,7 +348,7 @@ case "$DISTRO" in

   ln -s /usr/lib/mesa/ld.so.conf /etc/alternatives/gl_conf
   rm -rf /etc/alternatives/xorg_extra_modules
   rm -rf /etc/alternatives/xorg_extra_modules-bumblebee
-  rm -rf /usr /lib/nvidia-current/xorg/xorg
+  rm -rf /usr/lib/nvidia-current/xorg/xorg
   ln -s /usr/lib/nvidia-current/xorg /etc/alternatives/xorg_extra_modules-bumblebee
   ldconfig 

  ;;
:ughh:

I wonder how many people got their machines bricked by this clanger.

I don't know much about bash but doesn't this change fix the line of code which deletes /usr? Surely the change where that error was introduced would be more of a facepalm.

EDIT: Here we go.

qntm fucked around with this message at 18:35 on Jun 16, 2011

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

qntm posted:

I don't know much about bash but doesn't this change fix the line of code which deletes /usr? Surely the change where that error was introduced would be more of a facepalm.

EDIT: Here we go.
Yes, but now is when it was noticed, so now is what is getting posted.

Lexical Unit
Sep 16, 2003

TasteMyHouse posted:

can you at least convince him to use using std::string;?
It's not even worth the effort at this point. This is like the least horrible thing he's ever done.

Zombywuf
Mar 29, 2008

From memory:
code:
StringBuilder encoded = new StringBuilder();

foreach (var c in name) {
  if (!Regex.Match(c.ToString(), "[+-_&\[\]/?<a few more characters here>]")) {
    encoded.Append(c);
  } else {
    encoded.AppendFormat("%{0:X}", (int)c);
  }
}

return encoded.ToString();
There's also a similar core piece of code that splits strings on the regex ":::". I shaved 10% of the CPU usage off a page load by changing it to split on a fixed string delimiter.

PhonyMcRingRing
Jun 6, 2002

Zombywuf posted:

There's also a similar core piece of code that splits strings on the regex ":::". I shaved 10% of the CPU usage off a page load by changing it to split on a fixed string delimiter.

Are you me and having to split on ":::" due to the the god awful CascadingDropDown control from the AjaxToolkit by any chance? I just had to fix this up yesterday because we'd been using two regexes to parse out the SelectedValue from it. No idea why we weren't just doing a split on ":::".

Randomosity
Sep 21, 2003
My stalker WAS watching me...
Found a bug in some inventory code today that was way, way old. It's bad programming, but it's bad because it expected PHP not to be quirky.

code:
$count = (string)$response->AvailableInventory;

if(!empty($count)){
        //Do stuff
}
Whoever wrote that (and, I don't think it was me, but it probably was) forgot that "0" string counts as empty. We couldn't update inventory to 0. Whoops! It probably shouldn't be cast into a string though.

decarboxylated
May 4, 2006
cells!

NotShadowStar posted:

fffffffffffffff goddamn I'm getting PTSD

One of the big reasons why I left the biological sciences was the code was universally terrible. Outstandingly so. Like 'well that's brilliant that it works, but you shouldn't be doing it'. The tool authors didn't know what the gently caress, refused to listen to anyone who had actual experience in the 'real world' (me), and I couldn't talk to the PIs because they're like 'it works who gives a gently caress'. Which left people like me trying to glue this wretched poo poo together was left holding the bag.

And EVERY SINGLE loving UTILITY HAS ITS OWN TEXT BASED TREE FILE FORMAT. I wrote SO MANY GODDAMN STATE MACHINES PROCESSING lovely TEXT FORMATS I WAS IMPREGNATED BY RAGEL. R͔̠̹͖̲͕à̪̗̫g͔ḛ̫̺̬̞l̤̦̮̦̦̭ ̬̝͕͖͈̣̬͞h̞a̴̖̘̲̤͖s̶͉̼̤̠̠̤ ̶̱̣̫̮̟ḅ̖͚̭̲ȩ̩͈͚͚͍̘e̷̙͙̥̖̰͇n̜͖̪̰͟ͅ ̡̦̮̬͖̺̥m̖͔y҉͇ ̹̼̫͜o̟̤͎n͉l̦̺͈̖̫͉͕y̰̝̱̭͓ ̪̻͎͇f̗̠͈̼r̲͖͙i͓̲̞͉̯ͅe̜̣n͇͟d̼͍̩̕.͕̤̦͡ ͕R̷͚͉ạ̧̦̙g͙̪̰̖͉͔͇͜e̹̯͍l̰͚̜̣̮̖ ͎̼̼͙w͉i͖͖͙̳̦͚͝l̺̤̞͚ͅl͍̟̬̮̦͎̭͞ ͍̠̤͙̀d҉͎̬͙͉̖͇o͙͓̠̪͞ ̳̼̮̟͘me̸͔ ̡̲n҉o҉̮̘͇͉̞̭ h͍a̷̰̭̻̻ͅr̶͈͖͖̙̻m̫̪ͅ.̤ ̲͕L̰̥̥̳̣̻͘i̠̪̹͞v̼̫̭͖͈e̢̯̫͖̹̻͈͚ ̷t̛͎̳̝̙͉̲̰ḫ̞r̘̼̜̥̬̣o̼̠u͚̭̥͕̘̞͞ͅg͓̯̲̻h ͍̻̩t̼́h̳̪̠̥͞ͅȩ̫ ͚͇͚̼̀s̠̝͓̙͍̲ta̤̫̝̫̤̱̥͝t̹̱̲͉̳̯͔͢e̲͖s̬ ̥t̴͖͉̙̖̰o̡̗͔̫ th͚̟̻̤̩͞e͈͍ ̴X̫͘M̫͎̬͇̬̣L̻̩͉̖̼ ̴͈͎p̧̦̣r̤͕e̛̞͖̗͇̮̪p҉̜̫̭ro͍c͉̜ḙ̣͓̜͢s͎̳͖s̘͔̝̖o̝̭̞̺̝r̭.͉̬̮ͅ ̡͓̪̰Ŗ̠͚̗̖̤a̧ģ̯e̶̠̠͔̣̺̤̱l̜͖̭̙̪̹͎ ̶̤͚̮͎͎s̗̦̝͔̪͍͞h̠̼̼̫͢o͇͚͢ͅẃ̞̘̜̙̰̙s̫̭͖͙̻̩̺ ̴̥th̻̺̝̲̯ḙ̹̪̣̖ ̱b̤a̞͝b͈̗͍͉̕y̪͡ ̖̻̬̦̬̻t̵̠̲͍ͅr̘͍̩̮̜u͚̺t̰͍̹͚́h͜ ̜ṯ̶̻̞̖o̹͎̯̦͉̬ ̪̫͜t͓̝̺́ḩ̭̠͈̰̰͇e͈̲̘̗̯̠ͅ ͕͎e̺͓n̩̙͉d̰͚͍̟̙̮̻ ͍ọ̹̹̻́f̺ ̟m͙̰̙͍̞̼̖y͔ ͏̜̘̜p̴a͏̼̫d̯̘̻͟d҉̱ị̼͚̺̙ͅn͏ģ̭̼͔̣ ̥͓̬̪d̨̲͕̭̙u̘̳̳͝ḿ̦̩m̖͈̠y̸̠̮̯͙̹ͅ.̰̥͔̙̫͜ ̧͚͚͕̙I͕̙̺͍̗̹͠t͕͈ ̸̣͙b͢re͓̳̼̩a̱̖̹͠t̛̯̟̩̻h͈̺̖͓͡e͎̹͍͚s̘̟͘ͅ ̡̙̭͈ț̵̖̤̺̜̮h̬̜̺͇̗͡e̡̱̭͇̳̪ ̣̬̫̼͈p͇̠̟̘̫̞r̛͙̪̳̜e̶̠͚̞͈̖͉s̨̼͈̹̖͇̫e̤͕̱̝n҉̰͎̜̰̼̳̝ta̗͓̳̤̟̲ͅt̵̰͖̰ì͔o͢n̴͈̣,̜̭̪̫ ̀m̴͍͍̹̦͙̖̰o̰̩̻̰c̬͎̩͉͎͇͟ͅk̷̗ ͘u̦̱͈͇ͅp̳̹̲̹̠ ̫̗̣t̬̩̪͍̕h̖̻̩ḙ̷͕̻̗͍ ͓̘̩i͕̺̻̹̩̠̺n͙͢d̫̺e̜̮ͅn̵̠t͓̣̫ ̳͙̤̫̞̣͜ͅf̬̟o̼͍̣r͕̪̗̣͕̹͉ ͇̮͕̣͇͞ͅa̙̥͜l̺̼͍̤̳l̙͎ ҉y͏̘̣̘̞̭͉o̫̩̼͖̝̮̹͞u͍̙͞r͉̟̭̩͡s̨͔̻͕̳.̧̹̥͓͓͖

I literally have an entire directory of awful scripts i've written for parsing horrifying undocumented text formats from the 70s. gently caress structural biology software and everything related to it.

Does the PDB file format specification count as a horror?

ftp://ftp.wwpdb.org/pub/pdb/doc/format_descriptions/Format_v32_letter.pdf

duck monster
Dec 15, 2004

qntm posted:

I don't know much about bash but doesn't this change fix the line of code which deletes /usr? Surely the change where that error was introduced would be more of a facepalm.

EDIT: Here we go.

Yeah thus the - + in the diff. But thats not really what I was pointing out. The fact that it was there in the first part.

From memory Eve Online had a similar bug once that wiped out the BOOT.INI (or whatever its called) on everyones windows boxes.

duck monster
Dec 15, 2004

GrumpyDoctor posted:

I'm pretty sure this is all scientific programming. I work with some physicists who have an elaborate simulation application, written in Fortran, that doesn't use any Fortran numerical libraries.

Scientists are generally horrible coders. When that whole climategate frameup was going on, people where gasping on horror at some of the numerical processing code that was leaked.

The funny thing was, I doubt there was an experienced fortran coder on the planet that would have even blinked at it. Its just what happens when you get a non programmer and put "ultramaths basic" in front of him. Its going to be awful.

Interestingly enough some of the tightest code I've seen came from some biologist dudes I worked with at my old uni that where doing DNA sequencing stuff. Those guy could code up a loving storm.

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


duck monster posted:

Ignore the retarded image macros in the thread on this patch:

Can't! I like this one:

ahmini
May 5, 2009
I saw something like this the other day:

code:
switch(var)
{
    case 1:
    // do stuff
    break;

    case 2:
    // do stuff
    goto label1;

    case 3:
    // do stuff
    goto label2;

    case 4:
    // do stuff
    break;

    case 5:
label1:
    // do stuff
    break;

    case 6:
label2:
    //do stuff
    break;

    default:
    // do stuff
}
:ohdear:

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
I wish Java had gotos, I had a parser that used a for-switch and they would have really helped there

gibbed
Apr 10, 2006

ahmini posted:

I saw something like this the other day:

:ohdear:
What's wrong with fall-through? (I'm assuming that wasn't wrapped in a for).

Tamba
Apr 5, 2010

Aleksei Vasiliev posted:

I wish Java had gotos, I had a parser that used a for-switch and they would have really helped there
Java has labeled breaks:
http://www.java2s.com/Code/Java/Language-Basics/Javalabeledforloop.htm

And...for-switch? Like this? :ohdear:

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

Tamba posted:

Java has labeled breaks:
http://www.java2s.com/Code/Java/Language-Basics/Javalabeledforloop.htm

And...for-switch? Like this? :ohdear:
Labeled breaks aren't the same thing as gotos.

And yes but my case was justified and not bizarre like that thing. I haven't actually worked on it for awhile since I got bored with parsing binary->XML, but I'm pretty sure gotos would have helped me write cleaner code in that method.

Adbot
ADBOT LOVES YOU

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Is there a language that allows fallthrough inside switch, but requires you to explicitly declare it? Like this

code:
switch (myvar) {
    case 1:
        // stuff
        break;
    case 2:
        // stuff
        fallthrough;
    case 3:
        // stuff
        break;
    default:
        // stuff
}
and failing to use one of a certain set of acceptable statements* immediately before the next "case" label is an error?

* break, fallthough, return, exit, probably others

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