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
ManoliIsFat
Oct 4, 2002

shrughes posted:

Oh wow, your sense of humor is different from theirs. Maybe they like eyerolls? They should be ashamed for having a different sense of humor than you. You are a superior specimen.
Ya when I hear racist or sexist jokes, I'm not deeply offended or sad about the stupid thoughts that created them. It's just a matter of taste, the difference between people who enjoy an old school Andrew Dice Clay "get the gently caress outta my country you stupid chinks!" and those who find it offensive and ignorant. I mean, who are we to get all high and mighty?

libcxx posted:

Noted anime watcher and libertarian is also an MRA. Unsurprising.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

shrughes posted:

Oh wow, your sense of humor is different from theirs. Maybe they like eyerolls? They should be ashamed for having a different sense of humor than you. You are a superior specimen.

When you don't enjoy dumb MRA humor, you're the libertarian feminist in the alley and

Zombywuf
Mar 29, 2008

The important thing is that we work out what labels to apply to everyone.

Mustach
Mar 2, 2003

In this long line, there's been some real strange genes. You've got 'em all, with some extras thrown in.
Remember, art is meaningless and all opinions are merely a matter of taste, which is distributed among individuals via a random number generator.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

shrughes posted:

Oh wow, your sense of humor is different from theirs. Maybe they like eyerolls? They should be ashamed for having a different sense of humor than you. You are a superior specimen.

What's amazing is how thoroughly you've managed to destroy my previously-held high opinion of you, built up over years, in just a few short weeks.

Sockser
Jun 28, 2007

This world only remembers the results!




None of this sounds like coding horrors :colbert:

Star War Sex Parrot
Oct 2, 2003

What the gently caress is wrong with you guys? How does this thread always have so much god drat drama?

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
code:
	// now sanity check the value we want to set
	if ( (datereg[RTCMonth] 	> 0x12)
	  || (datereg[RTCMonth]		< 0x01)
	  || (datereg[RTCDOM]   	> 0x31)
	  || (datereg[RTCDOM]		< 0x01)
	  || (datereg[RTCYear]  	> 0x99) // y2.1k bug but dilligaf?
	  || (datereg[RTCHours] 	> 0x23)
	  || (datereg[RTCMinutes]	> 0x59)
	  || (datereg[RTCSeconds]	> 0x59) )
	{
		return RTC_FORMAT_ERROR;
	}
:negative:

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

Star War Sex Parrot posted:

What the gently caress is wrong with you guys? How does this thread always have so much god drat drama?

Kill it, wait about a month, then make a new one where the topic is restricted to ciseducated programmers ruthlessly othering scrubgrammers imo

bobua
Mar 23, 2003
I'd trade it all for just a little more.

Was cleaning some old(6 months or so) code up and came upon this. I wrote this.

code:
#include <string>    //for strings
Nailed it.

Zombywuf
Mar 29, 2008

Star War Sex Parrot posted:

What the gently caress is wrong with you guys? How does this thread always have so much god drat drama?

The clue is in the title.

Opinion Haver
Apr 9, 2007

I continue to be confused and amazed that Urbit is a real thing and not some kind of fever dream.

Also, the other day I saw a compiler error message (not in Urbit) that was a couple hundred lines long. Research languages are awesome.

Opinion Haver fucked around with this message at 00:03 on Dec 14, 2013

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

Opinion Haver posted:

the other day I saw a compiler error message (not in Urbit) that was a couple hundred lines long. Research languages are awesome.

But C++ isn't a research language... :v:

IT BEGINS
Jan 15, 2009

I don't know how to make analogies
pre:
WITH hist AS (
	SELECT
		invoicenum,
		min(modified || '|' || source) as modified
	FROM invoices
	LEFT JOIN invoicehistory on lookup = invoicenum
	GROUP BY invoicenum
)
SELECT
	...,
	hist.modified
FROM invoices
JOIN hist USING (invoicenum)
WHERE ...
whyyyyyy?

Our system prints out columns with pipe delimiters so a post-processor can convert it to .csv or .xls. Instead of just selecting both fields, our resident asshat decided it would be better to pipe delimit them straight from sql. Thus making sure that we have to un-delimit them to make links to the 'source' field, and that we can't run validation on this field before sending it out. Fantastic.

Pollyanna
Mar 5, 2005

Milk's on them.


Seriously? :negative:



The PyGame site is a true work of art. If art were made of wet sticks and failure.

Plorkyeran
Mar 22, 2007

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

Otto Skorzeny posted:

But C++ isn't a research language... :v:
It sort of was back when getting hundreds of lines of messages from a single error was common; they just didn't tell the users that. C++'s templates were an experimental novel idea designed specifically to make it possible to actually implement the STL.

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

Opinion Haver posted:

I continue to be confused and amazed that Urbit is a real thing and not some kind of fever dream.

Also, the other day I saw a compiler error message (not in Urbit) that was a couple hundred lines long. Research languages are awesome.

After reading this poo poo for the fourth time I think I am finally starting to understand what Urbit is. I'm not sure if I'm horrified or pleased.

A network protocol with a virtual machine using a tree-based assembly language with a completely flat persisted memory model (no memory hierarchies), built for isolation where each shard is identified by either a random 128bit name or has a 64bit name issued by a name higher up in the hierarchy, allowing delegation and transfer of ownership... It's one big peer to peer computer that remembers every computation and gives people distributed identities based on social trust relationships. Canceling a task rewinds the state of your entire shard, literally undoing history.

It's like you sat down to design a computing system but insisted that you can't re-use any existing concepts for your hardware, language, OS, or network. And invented your own vocabulary to describe it all.

This isn't time cube, it's something... else.

Rassle
Dec 4, 2011

Ender.uNF posted:

This isn't time cube, it's something... else.

Bitcoin 2?

shrughes
Oct 11, 2008

(call/cc call/cc)
It looks like Github took the repository down. It's now at https://bitbucket.org/FeministSoftwareFoundation/c-plus-equality/

ManoliIsFat posted:

Ya when I hear racist or sexist jokes, I'm not deeply offended or sad about the stupid thoughts that created them. It's just a matter of taste, the difference between people who enjoy an old school Andrew Dice Clay "get the gently caress outta my country you stupid chinks!" and those who find it offensive and ignorant. I mean, who are we to get all high and mighty?

And here the jokes were about feminist theory and the humanities major mindset as expressed in stuff like this. I take it you think anything anybody says about Israel is anti-semitic, too.

(It's perfectly reasonable to make fun of people who the humanities seriously for being idiots, that's what they're there for.)

quote:

Strings are called Ideals, or id for short. Feminist ideals are usually extremely well written, detailed and lengthy, clearly longer than what could be held with a simple char array.

Such woman-hating men's rights activism.

Let's make a list of people that starred the repository and blacklist them for life for hating women. Including a number of self-hating females. (Some people unironically started doing this before Github took the repo down.)

Edit:

@SteveKlabnik posted:

The worst part of this is that @ariellebea 's research is super legitimate, and frankly very interesting to me.
Apparently web developers are the humanities majors of programming.

shrughes fucked around with this message at 05:56 on Dec 14, 2013

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I'm not siding with either side, here, actually.

I think that the original research was absolutely bonkers, but this response just seemed to be laughing at the whole of feminism unironically, rather than trying to making a point to show that there's issues with Arielle's research.

There's nothing positive that can come out of C+=.

Carthag Tuek
Oct 15, 2005

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



Suspicious Dish posted:

I'm not siding with either side, here, actually.

I think that the original research was absolutely bonkers, but this response just seemed to be laughing at the whole of feminism unironically, rather than trying to making a point to show that there's issues with Arielle's research.

There's nothing positive that can come out of C+=.

I don't know what Arielle did, but if C+= is the response, she did something right. All that indignation has got to be a cover for some serious issues.

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
What indignation? Also, please poast 1 coding horror per post in the coding horrors thread!

Perl code:
BEFOREHAND: close door, each window & exit; wait until time.
    open spellbook, study, read (scan, select, tell us);
write it, print the hex while each watches,
    reverse its length, write again;
    kill spiders, pop them, chop, split, kill them.
        unlink arms, shift, wait & listen (listening, wait),
sort the flock (then, warn the "goats" & kill the "sheep");
    kill them, dump qualms, shift moralities,
    values aside, each one;
        die sheep! die to reverse the system
        you accept (reject, respect);
next step,
    kill the next sacrifice, each sacrifice,
    wait, redo ritual until "all the spirits are pleased";
    do it ("as they say").
do it(*everyone***must***participate***in***forbidden**s*e*x*).
return last victim; package body;
    exit crypt (time, times & "half a time") & close it,
    select (quickly) & warn your next victim;
AFTERWARDS: tell nobody.
    wait, wait until time;
    wait until next year, next decade;
        sleep, sleep, die yourself,
        die at last
# Larry Wall

Carthag Tuek
Oct 15, 2005

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



If you spend that much time on a thing, either your blood is boiling or youre insane. That's all I meant.

Here is a thing. Back when I still ran Fusker off my home computer, it would totally trash out with regular intervals. So I put this script in my cron:

Perl code:
#!/usr/bin/perl -w

@processes = `top -l1 | grep http`;

open(LOG, '>>', '/Users/carthag/Perl/kill_rampant_httpd_log.txt');

foreach (@processes)
{
	chomp;
	m/^(\d+) httpd .+ \d{3}M\s$/ and kill(3, $1), print LOG `date`."killed $1\n";
	m/^(\d+) httpd .+ [\d\.]{3}G\s$/ and kill(3, $1), print LOG `date`."killed $1\n";
}

close(LOG);

shrughes
Oct 11, 2008

(call/cc call/cc)
Or you're just making a 4chan joke in the 4chan genre of humor after planning it in a 4chan thread.

Speaking of coding horrors: capitalized variable names?

code:
xe main (xe RequestCount, strong *RequestList[]) {
    // NB typically patriarchal fizzbuzz enshrines socially
    // constructed limits as immutable fact; here we expose this
    // subtle mental tyranny for what it truly is
    xe ArbitraryBeginning accepts(present(-50));
    xe ArbitraryEnd accepts(present(50));

    // naturally, everything revolves around this
    xe ThePlaceBetween accepts(present(0));
    
    among(ThePlaceBetween accepts(ArbitraryBeginning),
          ThePlaceBetween honors(ArbitraryEnd),
          ThePlaceBetween improvesBy(present(1))) {

        check(ThePlaceBetween envelops(present(3))) {
            yell(present("Fizz"));
        }
        recheck(ThePlaceBetween envelops(present(5))) {
            yell(present("Buzz"));
        }
        unpack {
            // strength & independence!
            yell(present(ThePlaceBetween));
        };

        yell(present("\n"));
    };

    present(Satisfaction);
};

Carthag Tuek
Oct 15, 2005

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



shrughes posted:

Speaking of coding horrors: capitalized variable names?

Now by that I cannot abide. Only class names may be capitalized (and constants all-capped).

Speaking of, though, does anyone know why they chose to cap methods in C#? It looks so incredibly wrong to me.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

shrughes posted:

Or you're just making a 4chan joke in the 4chan genre of humor after planning it in a 4chan thread.

So we all agree on "insane"?

substitute
Aug 30, 2003

you for my mum

kitten smoothie posted:

Grace Hopper is spinning in her grave


The author explains in the comments (sort of).

...There is great scholarship talking about weather...

Good. Change your major.

:iceburn:

DaTroof
Nov 16, 2000

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

shrughes posted:

Or you're just making a 4chan joke in the 4chan genre of humor after planning it in a 4chan thread.

Unacceptable.

blorpy
Jan 5, 2005

You have to be actually retarded if it took you longer than a full minute to realize C+= was a parody. It's apparently an effective nerd tarpit, though.

a lovely poster
Aug 5, 2011

by Pipski
I think everyone gets that it's a parody. What people don't get is whether it's a parody of MRAs or Feminists

Carthag Tuek
Oct 15, 2005

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



Markov Chain Chomp posted:

You have to be actually retarded if it took you longer than a full minute to realize C+= was a parody. It's apparently an effective nerd tarpit, though.

Parodies are fine. There's nothing wrong with making a joke. But if you make a huge joke like that, and spend that much time on it, it means something to you. You have a vested interest or whatever. Nobody makes a huge intense parody about how you can't throw garbage on the street.

That's all I'm saying.

Athas
Aug 6, 2007

fuck that joker

Carthag posted:

Now by that I cannot abide. Only class names may be capitalized (and constants all-capped).

Speaking of, though, does anyone know why they chose to cap methods in C#? It looks so incredibly wrong to me.

I don't understand why so few languages use semantic casing. In Haskell, variables and functions (i.e. value bindings) must begin with a lowercase letter, while the names of types, typeclasses and similar things must be capitalised. Not sure how the distinction would work in a C-ish language, though. I suppose it could be used to get avoid 'typename' cruft in C++.

shrughes
Oct 11, 2008

(call/cc call/cc)
Uppercase method names in C# and also potentially in C++ (as per the Google style guide, for example) get to be nice. It makes them instantly distinguishable from variable names, variables that contain functors for some reason, and also it makes autocomplete be slightly more accurate slightly quicker. Since it's relatively rare in C++, it helps distinguish between "your functions" and "the other functions", so you know that stuff that's lowercased might be some weird STL-style or C-style API -- if that sort of thing is weird to you (and if you're following the Google style guide at Google, it would be).

Also Carthag I don't see why you're trying so hard to convince yourself that some 4channer is a bad women-hater. You're making the fundamental attribution error, for one, and it's as if you haven't heard the phrase "for the lulz" ever before. (e: If we're going to follow your logic, does it say something about you that you're so ready to assume others' behavior is grounded in some kind of category-hating intent?)

shrughes fucked around with this message at 11:01 on Dec 14, 2013

NFX
Jun 2, 2008

Fun Shoe
This all sounds like Budapest Notation.

Carthag Tuek
Oct 15, 2005

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



shrughes posted:

Also Carthag I don't see why you're trying so hard to convince yourself that some 4channer is a bad women-hater. You're making the fundamental attribution error, for one, and it's as if you haven't heard the phrase "for the lulz" ever before. (e: If we're going to follow your logic, does it say something about you that you're so ready to assume others' behavior is grounded in some kind of category-hating intent?)

nice reasoning doggo. ive spent maybe two minutes total on this, you cant write up all that stuff real quick.

Also please don't use the word l*lz without a trigger warning.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
A client was complaining about poor performance with a webpage. It consists of two multiselect lists, and the ability to transfer items between the two.

It was fine with a few hundred items, but they tried it with 10,000 items and it poo poo itself.

I found this JS function being called to resort the "destination" listbox every time an item was shifted between the two:

code:
      function sortList(listBox) {
        var arrTexts = [];
        var arrValues = [];
        var arrOldTexts = [];

        for (var i = 0; i < listBox.length; i++) {
          arrTexts[i] = listBox.options[i].text;
          arrValues[i] = listBox.options[i].value;

          arrOldTexts[i] = listBox.options[i].text;
        }

        arrTexts.sort();

        for (i = 0; i < listBox.length; i++) {
          listBox.options[i].text = arrTexts[i];
          for (var j = 0; j < listBox.length; j++) {
            if (arrTexts[i] == arrOldTexts[j]) {
              listBox.options[i].value = arrValues[j];
              j = listBox.length;
            }
          }
        }
This is my fix. I'm not a JS guru, but this is literally hundreds of times faster. If I'm making a slightly less horrible horror here, please tell me! I'm SURE there's a better way; this is my 30 second fix. I was thinking I could do a binary search to find the right index to insert at and skip the sorting entirely.

code:
      function betterSort(listBox) {
		var lookup = {};
		var sortCollection = [];

		for (var i = 0; i < listBox.length; i++) {
			lookup[listBox.options[i].text] = listBox.options[i];
			sortCollection[i] = listBox.options[i].text;
		}

		sortCollection.sort();
		for (i = 0; i < listBox.length; i++) {
			listBox.options[i] = lookup[sortCollection[i]];
		}
      }

New Yorp New Yorp fucked around with this message at 16:55 on Dec 14, 2013

Strong Sauce
Jul 2, 2003

You know I am not really your father.





It's a dropdown list (that you can multiselect) right? How is listBox.length returning a value? You'd want them to use listBox.options.length in this case right?

Anyways, I think you want to just pass in a function to sort to compare. However I don't think there is a guarantee of stableness.

listBox.options.sort(function(a, b) { return a.text < b.text ? -1 : a.text > b.text ? 1 : 0 })

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Strong Sauce posted:

It's a dropdown list (that you can multiselect) right? How is listBox.length returning a value? You'd want them to use listBox.options.length in this case right?

Anyways, I think you want to just pass in a function to sort to compare. However I don't think there is a guarantee of stableness.

listBox.options.sort(function(a, b) { return a.text < b.text ? -1 : a.text > b.text ? 1 : 0 })

There's no sort function on the options object.

I rewrote it with a binary search/insert and it's a bit faster than my naive solution. I'd say it's well within the "acceptable" range now. Still, suggestions are appreciated.

Volmarias
Dec 31, 2002

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

Carthag posted:

Parodies are fine. There's nothing wrong with making a joke. But if you make a huge joke like that, and spend that much time on it, it means something to you. You have a vested interest or whatever. Nobody makes a huge intense parody about how you can't throw garbage on the street.

That's all I'm saying.

So what you're saying is that FizzBuzz EE was written by someone who still holds a grudge about failing their first coding interview, right?

It was an over the top parody that clearly wasn't meant to be taken seriously. Why is this still being discussed?

Adbot
ADBOT LOVES YOU

Gul Banana
Nov 28, 2003

because you can only gloss over all these mean-spirited 'satires' of feminism for so long before it makes you seriously uncomfortable with the software engineering community & its treatment of women, so every little thing starts to stand out. that is why.

personally my #1 thing is how after months of asking we still haven't been able to get the Scala thread renamed to something without "whore" in the title. with examples like that constantly in your face, it's grating to be constantly told: everything is fine on the gender relations front as long as you Stop Talking About It. Stop The Drama!

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