« first day (1110 days earlier)      last day (3840 days later) » 

5:00 PM
@LucDanton Is that relevant, or just a curio?
 
Little bit of both.
 
@sehe the '.' s are being ignored. Right?
it's like Lj Ij j and La Ia a
just alphabetical
 
I think we have too many blue squares here.
 
@sehe Try LC_ALL=C sort
$ LC_ALL=en_US.UTF-8 sort <<END
> .a
> ...c
> ..b
> END
.a
..b
...c
$ LC_ALL=C sort <<END
> .a
> ...c
> ..b
> END
...c
..b
.a
$
 
@R.MartinhoFernandes Mostly relevant though. -n1 means each invocation of sort is given only 1 argument. As a result, you're basically getting results in random order -- it's just taking each argument, sending it to a separate invocation of sort (accomplishing nothing) then collecting the results back together. Since it runs the invocations of sort in parallel, the results come back in arbitrary order.
xargs <<<"L.a I.a .a" | sort should produce more meaningful results.
 
5:06 PM
@JerryCoffin It doesn't :P
@JerryCoffin xargs is not invoking sort.
There's only one sort invocation, and it takes its input from the output of xargs (which basically is there to break the input into lines)
 
@R.MartinhoFernandes Can't reproduce. Namely the LC_ALL=C doesn't change a thing. What am I doing wrong?
 
@R.MartinhoFernandes Oops -- right.
 
Ah, I found it. Was using a pipe.
 
Now, don't ask me why the fuck the en_US locale ignores punctuation.
 
@R.MartinhoFernandes Maybe the author assumed that English speakers in the US are really bad at the punctuation side of grammar?
 
Xeo
5:14 PM
fuuuuuuck everything. Finally at home.
 
@Xeo Shouldn't that be "fuck all the things"?
 
82
A: What legal options exist to Stack Exchange to prosecute aggressive users/trolls?

Tim PostUpdate (10/30/13) This has been implemented, and is now live in testing (and, actively mitigating the very impetus for its design). The person responsible for this is 'that guy' in don't be that guy. He's the guy that lost a chess game years ago and returns to the park every day to throw the ...

 
user1804599
Yay.
 
A vector can store non-copyable objects, right?
 
user1804599
Yes.
 
user1804599
5:25 PM
But you obviously won’t be able to copy such a vector.
 
Even in VS2012?
 
user1804599
VS supports vectors?
 
yep
there is __vectorcall or something like that
 
That's not the same thing.
 
uhm... std::vector?
 
5:27 PM
Yes.
 
ah. sorry
some implementations of vector can't store noncopyables.
IIRC VC++ can't.
because it instantiates methods which use copying, even if your code doesn't use such methods
but you always can use vector<unique_ptr<T>>
inb4 purrformance.
 
user1804599
std::unique_ptr is non-copyable. :v
 
you know, sometimes @cat says brilliant things. and in my opinion the best is:
Jun 4 at 13:44, by Cat Plus Plus
Did you know that fuck you
it's so perfect that I have nothing to add
 
private readonly IList<T> _items; // changed the inner type

public Foo(T[] items) { _items = items; } // cast is implicitly performed here...


http://stackoverflow.com/questions/19689678/any-caveats-with-casting-t-to-ilistt/19689821#19689821 lol
 
user1804599
T[] is not IList<T>.
 
5:36 PM
it will compile
and even work
until someone calls _items.Add :|
 
user1804599
Huh.
 
The thing that bothers me is that the output doesn't say where the copy is being made.
 
user1804599
@BartoszKP Ugh wat.
 
@rightfold it'll throw unsupported exception or something
 
user1804599
public abstract class Array : …, IList, …
 
user1804599
5:38 PM
EWWWWWWWWWWWWWWWW
 
yeah
;0
 
@rightfold A T[] is an IList<T>.
 
user1804599
I don’t even.
 
user1804599
Why is C# statically typed if they do this. ;_;
 
Fun fact: ReadOnlyCollection<T> is also an IList<T>.
 
5:39 PM
lol
 
Does C# have a form of varargs?
 
@Pawnguy7 params.
 
@Pawnguy7 yes
 
user1804599
void foo(params int[] xs) { … } foo(1, 2, 3);
 
it's cool, because you can pass separate args, or an array
 
5:41 PM
@BartoszKP I usually keep an overload that takes an IEnumerable<T>, and have the params version defer to that.
 
user1804599
@BartoszKP I don’t like that; complicates overloading.
 
user1804599
This would be nice, though: foo(params myArray);
 
@EtiennedeMartel good idea, convenient
@rightfold just forgot about the params, and everything stays the same. I wouldn't be surprised if this was just a syntactic sugar
 
@rightfold Huh?
 
user1804599
@EtiennedeMartel if you have a method with params T[], you can pass either a T[] or multiple T arguments.
 
user1804599
5:45 PM
However, what if I have params object[] and I pass in an object[]? It can do unexpected things.
 
@rightfold what's so substantially different in this context between T[] and object[]?
 
The user could expect to pass an array of array.
 
user1804599
Any array can be implicitly converted to object[] as well as to object.
 
user1804599
(Except for arrays of value types to object[], but yeah.)
 
Not making an extra array is the sane way because it doesn't break generic code. (And it's what it does)
 
5:49 PM
interesting
however params doesn't add anything new to this ambiguity
 
Yes, it does.
 
lol "the topic is as little opinion based as sorting arrays."
 
Without params, it can never become a object[][].
 
user1804599
void Foo(params object[] xs) { Console.WriteLine(xs.Length); }
Foo("", "", ""); // prints 3
Foo(new object[] {"", "", ""}); // does this print 3 or 1?
 
right
good example
 
5:51 PM
3 is the sane choice.
It means you can just forward your params to another function taking params.
 
user1804599
// this would be nicer IMO; neither ambiguous nor inflexible
Foo(new object[] {"", "", ""}); // prints 1
Foo(params new object[] {"", "", ""}); // prints 3
 
Meh, I don't think so. Case 1 is not the common one. Don't give me trouble for the common one.
void Foo(new[]{new object[] {"", "", ""}}) is a reasonable workaround.
 
user1804599
How would it work in generic methods?
 
they even mention this in the docs
 
user1804599
void Foo<T>(params T[] xs) { Console.WriteLine(xs); }
void Bar<T>(T x) { Foo(x); } // illegal?
Bar(new object[] {"", "", ""});
 
5:54 PM
Yes, that's illegal.
 
user1804599
Ah. :P
 
Generics are not late-checked like C++.
They must compile fully on their own.
2 mins ago, by R. Martinho Fernandes
It means you can just forward your params to another function taking params.
But this is the important bit for generic code (and I don't mean as in "generics")
 
Any suggestion to name foo(r) which results in a peekable range?
 
You can make use of things like string.Format by simply dropping your params there.
@LucDanton peekable?
 
That is what I'm leaning towards for now.
 
5:57 PM
@LucDanton name should reflect what the function does, the fact that it results in a peekable (whatever that means) range is a bit too vague to be helpful
 
@BartoszKP What it does is make a range peekable. There's nothing else.
 
That is what the function does.
 
@R.MartinhoFernandes peekaboo
 
@R.MartinhoFernandes didn't guess that r input parameter is a range ; 0
 
Ah. It's an ongoing thing.
 
5:59 PM
@R.MartinhoFernandes no, am I being blind again?
@R.MartinhoFernandes WTF how does UTF8 alter the relative ordering of the ASCII subset?! :0
 
@sehe It's not UTF-8, it's en_US.
 
Ah. Makes sense. en_US defines a collation that defies ASCII. Were you seriously implying that this was obvious? ("Is this a trick question?") Or did you think it was obscure?
 
Yeah me too. It ruined my shot at a perfect answer here:
1
A: Write in a file if picture found in a folder

seheYou could assemble a sed script on the fly, making a substitution for each image file that exists #!/bin/bash sed -f <( find /tmp/images/ -type f -name '*.png' | sort -r | while read imagename do basename=$(basename "$imagename" .png) echo "s#^\\($(printf "%q" "$bas...

The 'longest prefix' requirement was being met using the sort. Only, sort was failing.
@BartekBanachewicz locales with a vengeance
 
Oh oh, MLP comic #12 is out.
 
6:09 PM
@eliosolutions In case you ran into the same problem with the longest prefixes not being used, the problem was that sort -r simply ignored the periods... (because of locale-specific collation). I fixed that by adding LANG=C to the script. Now the go perl script and mine have the same results. Mine is more than 4x faster for this small dataset though, and obviously shorter (30 lines of perl vs. 7 lines of bash) — sehe 6 secs ago
@R.MartinhoFernandes thanks for the help ^
 
Hello, Cruel World!
 
Xeo
@LucDanton How does that work, extra caching?
 
@Xeo To be precise, the right amount of caching. I.e. return the original range if it's already peekable.
 
Xeo
right
 
Footprint being two optional elements then.
 
Xeo
6:15 PM
front / back?
 
@sehe It wasn't immediately obvious to me at first. It was easy to enumerate possible culprits, but I didn't want to chase wild geese, so I wondered if there was some secret behind it.
 
There wasn't. I'm not Der Schaub :)
@R.MartinhoFernandes Anyways, I knew about locales and collation - I had simply dismissed it on the grounds of the ASCII subset being "obviously" standardized. Little did I know.
Here's proof I actually did know:
This wasn't the first time I ran into this tangentially: http://stackoverflow.com/a/7150015/85371 "Unix sort command takes much longer when executed from IDE"
 
Ugh Windows Phone suffers from the same thing as Android: passing shit between pages requires marshalling (but even worse, to string) or globals
And I thought it might be a better platform
Silly me
I should stop expecting things to be good at all
 
@CatPlusPlus s/better/more convenient/ ?
 
room topic changed to Lounge<C++>: Remember to convert your Geolocations to GeoLocations before they expire. [c++] [c++11] [c++1y] [no-questions]
@sehe No, better
 
6:23 PM
Well, apartment isolation for pages/activities makes a bunch of security sense in my mind
(afk - kids to bed)
 
They're not isolated
I don't know why platforms built upon static typing try so hard to work around it
 
Xeo
@CatPlusPlus Wasn't it "Geocoordinates"?
 
Maybe
 
I'm just testing your attention
room topic changed to Lounge<C++>: Remember to convert your Geocoordinates to GeoCoordinates before they expire. [c++] [c++11] [c++1y] [no-questions]
 
6:26 PM
ToPascalCase(Geocoordinate);
 
Whatever the end of this shitstorm will be, it's going to be glorious
 
which shit storm?
 
Hello
 
hi
 
6:35 PM
> Two engineers with close ties to Google exploded in profanity when they saw the drawing.
 
My question is what were they cussing about? Were they outraged that the NSA had that information? Or because they didn't know that Google strips the encryption to transport data over their internal network?
> Two engineers with close ties to Google exploded in profanity when they saw the drawing. “I hope you publish this,” one of them said.
 
user1804599
LiveScript is cool.
 
@rightfold What's the difference between that and CoffeeScript or TypeScript?
 
user1804599
It has function composition and currying.
 
user1804599
And better pattern matching capabilities.
 
6:45 PM
When unsure of how to answer a true false question.. http://t.co/prJJO7K1ST
6
 
user1804599
> Accessignment
 
user1804599
lol
 
user1804599
document.title .= to-upper-case! #=> LIVESCRIPT
 
@EtiennedeMartel Etienne, you disappointed me earlier with your up riling language. I forgot what about.
 
6:46 PM
@sehe Hm?
 
Oh yeah. "Why don't you come to the lounge so we can tell you how wrong you are"
 
Oh, right.
 
R# is getting TypeScript support, so fuck everything else
 
(Griffiths, was his name, I now remember)
 
I got somewhat angry reading his comments.
 
6:47 PM
If ruby is sugar-coated perl, then what is Python?
 
In retrospect, my reply wasn't any better.
 
@EtiennedeMartel Although I also don't agree, he made a tiny bit of sense. And it's his question. So "you had your say" was quite righteous from his point, IMO
 
Python is not related to Perl, so it's not as bad as Ruby or Perl
 
@EtiennedeMartel Wokay. Happens to the best.
 
user1804599
6:48 PM
@GamesBrainiac unique.
 
@GamesBrainiac a predator
 
@sehe Its sexy :P
 
@EtiennedeMartel lol
 
> The guy who came up with the game, Stéphane Aguie, wanted to mock hunters and red-necks, not gay men.
Ah, French people...
 
6:52 PM
@EtiennedeMartel ?
 
I was reading that article at the same time.
Figured I'd do some bad segue.
 
> All in a day’s work at Facebook in the never ending quest for more traffic and more ad revenue it appears
Oh give it a rest. No concept of what's involved in running such an enormous site where the content isn't up to you
 
I like how they actually blame Facebook.
But I figure most people don't know how those kinds of things work.
That is, humans are rarely involved in this.
 
There's a lot of self-victimisation in the gay communities nowadays, so it would seem from media coverage lately
wah wah wah everyone's mean to us
i mean stfu
 
^that.
 
6:55 PM
@LightnessRacesinOrbit We don't seem to read the same media, I guess.
 
@EtiennedeMartel I read all of it
every single piece ever
 
This is possible because I am near-omnipotent. In fact, the only thing I am incapable of doing is not being near-omnipotent.
 
I see more examples of anti-gay jerkness than self-victimisation.
 
There's a typo near impotent :/
 
6:57 PM
I've never seen true anti-gay jerkness in my entire life.
@sehe predictable
 
@LightnessRacesinOrbit I've seen a lot.
I guess we both have biased samples.
 
@LightnessRacesinOrbit As is your attempt at a rant
 
@EtiennedeMartel Then perhaps stop hanging out in Nazi headquarters shrug
@sehe No rant here
 
lol
 
Ell
@LightnessRacesinOrbit I've never seen blatant homophobia
But lately I've realised how calling things "gay" as a negative word can be harmful
 
6:58 PM
@Ell Same. I've seen a lot of what society calls "homophobia" but actually isn't in any way at all. Similarly, plenty of "racism" which is absolutely no such thing.
 
Ell
I always used to do it and not even think about it
 
Oh, right, semantics and shit.
 
I mean, on some streets, you can't say the word "black". Like, whut? The word "black" isn't short for the phrase "by the way, I think all black people are inherently inferior just because they are black"
 
Ell
Because I was like "well I'm using the word gay to mean bad, but that has nothing to do with homosexuals! It just so happens to be spelled the same..."
 
6:59 PM
@Ell "gay" is supposed to mean "joyous".
By the way.
 
Thing is, they don't even like to be called "gays" any more. Apparently it's offensive. They are "gay people". Just... like... fuck off.
 
So I don't really understand how it can have a negative meaning.
 
Ell
Well words don't only have a dictionary meaning
 
@EtiennedeMartel In the way that "a sick tune" is fucking epic
 
I mean, why does "gay" mean "bad"?
 

« first day (1110 days earlier)      last day (3840 days later) »