« first day (1169 days earlier)      last day (3797 days later) » 

2:00 PM
@LightnessRacesinOrbit Well, you have to admit that the hierarchy is turned around
 
@LightnessRacesinOrbit Yeah, in my case it was more of a reward for the work I've done than anything done in the company's interest - they weren't even trying to apply the "will that brings us $ in the long term" logic (they regularly fail at that). And it was an exceptional situation, surely that wouldn't have happened one or two years ago.
 
It's like the subdomain/path thing, it sucks
should be com.stackoverflow.chat/rooms/10
 
you guys all sound as if you would like to switch jobs
 
2:01 PM
@ScottW How do you make your own money? I'd really like to
 
@bamboon I would like to switch from my current job, to no job
 
@ScottW gief tips, I want money without work
 
user1804599
@kbok Tony he pays him money and he pays Tony asshole.
 
@LightnessRacesinOrbit what?
 
@LightnessRacesinOrbit Exactly
 
2:02 PM
@bamboon not me really, I want to go back to one year ago. Hopefully it will be better soon.
 
Office Space style
 
user1804599
Two chicks at the same time.
3
 
I have been thinking of switching jobs but I don't have the guts to give up the laziness that I can apply to my current one. I don't know if I'll find that again. As noted previously, I get to be very lax about my hour-by-hour contributions because I've proved that I still get all the work done, and more, well in time of the deadlines. But I'd have to start that trust from scratch in a new job and can I be fucked to?
Also, though, I work from home most of the week which has definite pluses and minuses. The minuses are really starting to grate now, so it's getting to point where I'd almost be willing to sacrifice the pluses. But it's still a conscious decision to remove freedom from my life, which is a hard thing to opt into.
 
@LightnessRacesinOrbit I have that too. I proved very useful in critical times so they know they need me, so I don't have to work really hard now
 
(Working in the office full-time in my current job is infeasible, due to location)
 
2:04 PM
@LightnessRacesinOrbit is there no option just ... just go into the office?
@LightnessRacesinOrbit ah
@LightnessRacesinOrbit So, instead of switching jobs you could switch locations?
 
Yeah.. realised a little too late that I hadn't made that clear
 
user1804599
Hmm.
 
@sehe Right, which is another factor. Except I'm pretty settled in my current location. I will switch at some point but not right now. I mean, I only just bought my house.
 
user1804599
I wonder how difficult it will be to implement ECMAScript literals.
 
@ScottW You buy and sell stuff on ebay? Does it pay well?
 
2:05 PM
Plus I would not want to move to where my job is. It's the middle of fucking nowhere.
So if I were to move, it would not be for that
 
user1804599
I’m going with [] for function application.
 
user1804599
printf["hello"]
 
@rightfold Ew
 
@ScottW That's cool
 
ITT: Rightfold can't code for shit.
 
2:07 PM
printf -> string hello END
lol, maybe you could sell that to other ebay store owners
 
user1804599
Maybe you could buy eBay.
 
@LightnessRacesinOrbit oh well, hardly surprising they allow you to work rom home then :/
 
Maybe you could buy @rightfold and have him work for you
 
user1804599
Now comes difficult part of compiling typed AST to low-level IR.
 
your AST has types in it?
you suck.
 
user1804599
2:10 PM
I have two kinds of AST.
 
user1804599
One without types which comes from the parser.
 
user1804599
One with types which comes from the semantic analyser.
 
user1804599
“Typed Program Tree”?
 
the one from the analyser is clearly not an AST at all
it's clearly some kind of tree, but definitely not AS.
 
user1804599
Yeah whatever.
 
user1804599
2:11 PM
Fuck terminology.
 
@DeadMG What's your name for it, constructivist?
 
user1804599
It has symbol tables and types and stuff.
 
@sehe I don't currently use such a tree.
my analyzer goes from AST to codegen tree.
 
Call it Rightfold Tree, patent it, get money
 
user1804599
rf+-tree.
 
2:12 PM
58 secs ago, by sehe
@DeadMG What's your name for it, constructivist?
 
@sehe Yeah there used to be a few that did it
 
Never did I say you must have such a tree. Nor is it relevant.
 
But now we only hire for working in-office because we can't find people good enough to work away
 
@LightnessRacesinOrbit Oh gosh, the embarrassment. A typo unfixed :)
@LightnessRacesinOrbit That must be ... interesting. You hire only in-office personel, because you need to check up; and then you don't come in o.O
And shitloads of stress :)
Though if the job results in the same, there's no problem
 
@ScottW It's not as easy as it is in the movie
 
2:19 PM
is there a way to include all standard headers?
 
yep
 
He just doesn't show up without any explanation, and in the movie he can actually get away with that. In reality, you can't (at least not at my workplace)
 
you can do #include <chrono> #include <cstddef> #include <iostream> #include <vector> ...
 
sure, #include <algorithm> #include <chrono>
 
@ScarletAmaranth i don't get it
 
2:20 PM
Move on means find another job. And that may mean move from your city. And that may mean have troubles with your girlfriend. And so on
@ScottW Nobody is essential. If you say you want to quit, they let you quit
 
@AndyProwl who's "he" (I didn't know we were talking about a movie)
 
@sehe The main character in Office Space
 
oh. meh. I thought we were talking real stuff
 
@ScottW If by "try to convince you" you mean "offer to comply with what makes you wanting to quit and change their attitude towards you", then the answer is "no". They just let you quit.
I don't need to say "I'm quitting" for them to listen to me
They do listen. They just disagree
So if I say "I'm quitting", they say "ok".
That would bring up problems which I want to avoid, the first one being I have no other source of income
 
@AndyProwl As if you wouldn't find another job.
 
2:26 PM
@ScottW No, I need to figure it out before
@bamboon Well, in the city where I am currently bound to live there aren't too many opportunities. I could work for another company, but it's very unlikely that the conditions would be different
Brno, Czech Republic
 
@AndyProwl Yeah, that is always the question.
 
lol
 
@AndyProwl But you are not from Czech Republic originally, right?
 
@bamboon Nope, I'm Italian
 
@ScottW lol
 
2:28 PM
@ScottW You suck.
 
@AndyProwl Oh, wouldn't have guessed that, Andy Prowl doesn't really sound Italian ^^
 
@bamboon lol, yeah that's not my real name
 
@AndyProwl You tricked me!
 
It's a beatiful "Real Fake Name"
 
yeah
 
2:30 PM
It's a port of my real name into English
 
> "port"
 
how do you quote messages in the chat? It's not written in the tips
 
Andrea something?
 
Like, not whole messages, just parts
 
> To roam through stealthily, as in search of prey or plunder
 
2:30 PM
@bamboon Yep
 
> To rove furtively or with predatory intent
 
@ScottW Hey!!!
 
> > is the trick
 
> Ooh
Thanks!
 
What's been happening in here?
 
2:31 PM
Bananas
 
What you been doing?
@CatPlusPlus I prefer apples
ohhh
Canada?
oh, well Canada isn't that far north from where you are
ohhh I see
lol
Etienne wouldn't be happy to hear that
@Cat how terrible is Xmas for you?
hahahahhaha
 
hmmm
You ever been to Canada?
ah
Nope
someday I would like to
hahaha
 
2:52 PM
@sehe The other senior and my manager watches them :)
@ScottW :D
And what would we do? Beyond shagging fit English-speaking blondes throughout the western hemisphere?
 
@ScottW lightness won't participate unless you add "Up with India"
 
Speaking of which, today I got my TDD hat /cc @rightfold
 
I have the hi-hat
Yay for sharing information stackoverflow.com/a/20815896/85371
 
3:08 PM
@sehe Thank you :) One of the things I'll have to do once I get back to work is to port our software to VC12. This is likely going to help
 
1
A: is_move_constructible and msvc2013

Lightness Races in OrbitYes, it must be a bug. is_move_constructible is defined in terms of is_constructible, which requires that a construction with the given parameters is well-formed, which is clearly not the case here. [C++11: Table 49]: is_move_constructible<T> `is_constructible<T, T&&>::value` is true   ...

Can someone test this in November 2013 CTP please?
 
@LightnessRacesinOrbit Not fixed
 
@AndyProwl Thanks
 
I think might be the most loving person around SO :)
It's not a real surprise :(
 
@LightnessRacesinOrbit Sorry! Me dumb. It is fixed
I switched configuration from release to debug and forgot to restore the project setting
 
3:21 PM
@LightnessRacesinOrbit it looks like VC2013 isn't the only thing buggy with is_move_constructable
 
0
Q: Are deleted constructors "accessible"?

Lightness Races in OrbitA deleted answer on this question about a deleted move constructor quotes cppreference.com as saying that the is_move_constructible trait should succeed as long as a move constructor is "accessible", even if it's not "usable". The standard in fact requires that move-construction of the argument ...

was just posting a comment to you about that
 
Yeah, I realized that I should defer to someone who probably had much more in-depth knowledge of the standard than I did and deleted my answer. Then promptly checked the standard and found out I was completely wrong and was correct in deferring to someone who knew what they were doing
 
Still, a noble effort :)
You identified a real problem
Seems this needs to be better-defined, and that starts with the standard in my view. It should define "accessible" better. Then we can edit cppreference.com with confidence.
 
@LightnessRacesinOrbit I think cppreference is incorrect. Accessibility is about private/protected/public
 
File a bug on github?
 
3:25 PM
A public deleted member function can be accessible and make a call ill-formed
 
@Mgetz That may be the result, but I want to put it through peer review on SO first
 
URLs should be included in an answer for further reading only. This answer appears to rely heavily on the content of a URL and would benefit from a summary of the URL being included in the answer. — Duncan 7 hours ago
Uh.
What bothers me is that, can't he simply edit the answer instead of copy-and-pasting a part of the FAQ?
 
sounds like a question for meta, personally I err on the side of letting the original poster edit it themselves
 
@EtiennedeMartel He's from Cambridge.
 
3:34 PM
@LightnessRacesinOrbit So?
 
@LightnessRacesinOrbit I think cppreference is wrong. The standard quote (the text in bold from your question) is simply not exhaustive: it is true that the program is ill-formed if the constructor is inaccessible, but it is not necessarily well formed if the constructor is accessible (e.g. if it is deleted). However, cppreference tries to give a definition of MoveConstructible: "i.e. has an accessible explicit or implicit move constructor", and as a definition it is incorrect
 
@EtiennedeMartel So "what do you expect" sort of applies :)
@AndyProwl I think we agree. :) That would make a good answer....
I'm not so sure, as the standard states ANY reference to a deleted member function other than the initial declaration is ill-formed, thus a type trait reference is also ill-formed. So using is_move_constructable should be a compilation error. — Mgetz 56 secs ago
heh
 
The type trait does not reference the move constructor
Or, I guess it does so, but in an unevaluated context
Which I assume doesn't count as "referencing"
 
@AndyProwl I've added the rest of the passage. It sort of does...
> This includes calling the function implicitly or explicitly and forming a pointer or pointer-to-member to the function. It applies even for references in expressions that are not potentially-evaluated. If a function is overloaded, it is referenced only if the function is selected by overload resolution.
 
@AndyProwl that's why it's a comment and not an answer. But my gut tells me it should fail compilation, deleted functions are meant to be poison
 
3:38 PM
Yeah I guess traits are sort of hinky magic anyway
 
@LightnessRacesinOrbit Sounds like you're technically correct then
Although yes, if the trait produced a compilation error it wouldn't be very useful
 
@AndyProwl Or Mgetz is
 
Right
 
I think we have standard bug on our hands
personally my preference as a developer would be for compilation to fail in this case
 
That would sort of betray the purpose of traits giving you booleans
Would still love to see Andy's excellent wording above as an answer
 
3:40 PM
a good counter-point
 
@Mgetz is_move_constructible is there so that you can tell whether a type is move-constructible or not. It's a compile-time function which is supposed to return true or false. Having it return true or a compile-time error is not very useful
 
I'll delete my comment then
 
Can I get my answer disassociated so I don't get notifications about it ugh
 
@LightnessRacesinOrbit That answer would be mostly a copy of yours, just with a different conclusion about cppreference. I think you can just edit yours and get my upvote :)
 
@AndyProwl Your words are better, and your conclusion is slightly different
 
3:43 PM
@LightnessRacesinOrbit that question should probably also have the on it
 
@Mgetz Oh, yes, knew I forgot something
One day I'm going to get a gold badge for the tag
 
@CatPlusPlus Just ignore the comments?
 
I'm close to actually nuking the answer because I can't even tell if it's a good solution anymore
And people just won't shut up about it
 
@Mgetz Nah leave it!
 
@LightnessRacesinOrbit already deleted it
 
3:45 PM
@CatPlusPlus What answer?
@Mgetz :(
 
305
A: Python datetime to Unix timestamp

Cat Plus PlusAnother way is to use calendar.timegm: future = datetime.datetime.now() + datetime.timedelta(minutes = 5) return calendar.timegm(future.utctimetuple()) It's also more portable than %s flag to strftime (which doesn't work on Windows).

 
@Mgetz It was such a good point
Maybe Andy can raise it in his answer... :)
 
@LightnessRacesinOrbit you have what I said quoted above..
 
Blah!
I mean... hi!
 
user3010322
@CatPlusPlus What was that, you needed more upvotes?~
 
user3010322
3:46 PM
Can do~
 
user3010322
 
I have no fucking clue why this is upvoted so much
 
@CatPlusPlus Oh no, a comment every 3 months. However could you cope?
 
SO voting is useless
 
@CatPlusPlus Cos "viewed 158338 times"
26
Q: Mitigating publicity-driven vote inflation

Lightness Races in OrbitFollowing the Reddit debacle™ back in January, we've had another instance today of a question becoming overwhelmingly popular due to external "advertising". As soon as Joel tweeted about Eric Lippert's fantastic answer, the viewcount shot up. The OP received three gold badges for the question, w...

 
3:47 PM
@LightnessRacesinOrbit I'm lazy and the answer is bad
 
@LightnessRacesinOrbit Apart from the conclusion on cppreference I think your answer is just fine, no need to add another one only because of a minor distinction (and you can borrow that wording if you wish, I don't mind).
 
@AndyProwl >.<
 
Guy's right about utcnow vs now+2utc, though.
 
0
A: Homework time! Find me the lowest even digit in a string

JefffreyC++11, 175 Here's the compressed version: #include<iostream> #include<string> int main(){std::string s;std::cin>>s;for(char c:"2468"){int i=s.find(c);if(i<s.size()){std::cout<<i<<','<<c;return 0;}}std::cout<<"-1,8";} Of course each #include directive needs to be in his own line, therefore a s...

 
Latter is lossy.
 
3:48 PM
can anyone improve it?
 
Not in the mood to explain, just take it as word from god.
 
@Jefffrey "Of course each #include directive needs to be in his own line, therefore a space character has been added at the end, to count the new line character that should be there." is silly, just add the newline
 
like \n?
 
Press ENTER butan
 
then I don't have the beautiful single line anymore
 
3:51 PM
It doesn't work as a single line
 
It's not beautiful. Compiler agrees with me.
 
ok fine
 
Yay, Sock Puppet hat
@Jefffrey " challenge"
 
what about it?
I wish I could compact the whole for loop into something of the form:

for (...)
if (...)
...
 
@Jefffrey It's "code golf"
@Jefffrey You can; declare i outside of the loop and assign it within the conditional
int i;
for (char c : "2468") {
   if ((i = s.find(c)) < i.size()) {
     // ...
   }
}
Don't, though.
 
3:59 PM
it's not more compact because the cost of another i= is the same as the cost of the two {} I want to avoid :/
 
teehee
@Jefffrey You can probably drop the for's braces
 
hmm, I doubt that
considering that i's value can be 0
 
nevermind
 
@LightnessRacesinOrbit I don't get how that applies to the code golf in question
There's this alternative as well: ideone.com/GtSU6l
lol, shorter by 1 character
 
user1804599
Dat steak.
 
@Jefffrey I said you can lose the for's braces. You said no. I proved yes.
 
user1804599
I like the APL one.
 
user1804599
4:25 PM
Hey Ruby got a new website.
 
@LightnessRacesinOrbit Have you ever had reason to use the Monostate DP?
 
user3010322
Hrrrm.
 
user3010322
Nothing appearing on the screen...
 
how do you give a language hint to the code highlighter on SE? this doesn't work and html tags don't either :(
 
@GamesBrainiac Um sure
 
user3010322
4:33 PM
I think I need the struct hack in C++.
 
@Jefffrey it does work
@ThePhD noooo
 
@LightnessRacesinOrbit not on codegolf.stackexchange.com then
 
user3010322
I can't visualize my data when I'm debugging with std::aligned_storage, though
 
@Jefffrey Possibly not
ask on their meta
 
user3010322
So I was planning to union the std::aligned_storage with a T view[1];
 
4:34 PM
@Jefffrey see the part about code highlighting stackoverflow.com/help/formatting
you can manually set the language in a post using an HTML comment tag
 
2 mins ago, by Jefffrey
@LightnessRacesinOrbit not on http://codegolf.stackexchange.com/ then
 
user3010322
C++ compilers don't like T arr[0] on structs, do they?
 
well, it's not part of the langauge, so
 
So, people, Rayman Legends is a great game.
 
user3010322
@EtiennedeMartel Dirty liar, it's just Ubisoft propoganda!!
 
4:38 PM
@ThePhD Then use a debugging visualizer. That's what they're for.
 
user3010322
Also @EtiennedeMartel I had a dream and you were in it.
 
@ThePhD I no longer work for Ubisoft.
@ThePhD I don't know if it's a good thing or a bad thing. @R.MartinhoFernandes, what do you think?
 
user3010322
@DeadMG I'm doing that. But the .natvis format can't get the address of the std::aligned_storage type.
 
user3010322
@EtiennedeMartel Why does robot need to weigh in? u.u
 
@ThePhD: C++ compilers don't like empty arrays at all. If you want to support zero sized arrays you are best off using std::array<T, N> which also support empty arrays.
 
4:40 PM
@ThePhD it depends, they don't usually like 0 length arrays but it is valid to put them as the last member of a struct
 
@Mgetz Not in C++.
 
@LightnessRacesinOrbit How did you implement it?
 
@DeadMG as I recall you were the one who corrected me on this ages ago... it's an incomplete type
but it has to be the last member
 
and you can't have incomplete types as any member.
only C permits this struct hack.
 
user3010322
@DietmarKühl That might work, buut the thing I'm struggling with is not just having the array of types: it's not being able to get at the memory underlying the std::aligned_storage and casting it to the appropriate type so that the debugger can visual it (Natvis format for C++ debugging in VS doesn't support having template parameters and doing T* or equivalent in the file (but you can do it in the C++ debugger while its running, so Microsoft being inconsistent again...)).
 
4:44 PM
hi
 
@ThePhD The visualizers for stuff like std::vector<T> must use the template parameter.
 
user3010322
@DeadMG No, the internal storage of std::vector<T> is typed (it's a pointer of type T).
 
@Mgetz it sucks
 
user3010322
It's communicated by the members, which the .natvis uses. You can't have void* crap; and then do (T*)crap in a natvis; natvis supports globbing template parameters ( e.g., fixed_vector<.*, .*, .*> ) but they can't be named unless you name them for an explicit type, at which point the visualizer you made is no longer going to cover all uses fixed_vector or vector or w/e you're writing.
 
user1804599
@Jefffrey got 72 chars with Ruby.
 
user3010322
4:50 PM
In other words, struct hacks and unions for me ♪♬~
 
  <!--Concurrency::concurrent_vector from <concurrent_vector.h>-->
  <Type Name="Concurrency::concurrent_vector&lt;*,*&gt;">
    <DisplayString>{{size = {_My_early_size._M_value}}}</DisplayString>
    <Expand>
      <Item Name="[size]">_My_early_size._M_value</Item>
      <IndexListItems>
        <Size>_My_early_size._M_value</Size>
        <ValueNode Condition="($i &gt;&gt; 1) == 0">(($T1*)_My_segment._M_value[0]._My_array)[$i]</ValueNode>
        <ValueNode Condition="($i &gt;&gt; 1) != 0">(($T1*)_My_segment._M_value[__log2($i)]._My_array)[$i - (0x1 &lt;&lt; __log2($i))]</ValueNode>
 
@rightfold can I see?
 
I'm seeing this whole ($T1*) thing.
 
Anyone else here use hosted email? I'm ready to ditch my aging mail server (dovecot). I've seen it, been there, now it's time for a sane solution :)
 
which I'm feeling pretty sure is the template parameter.
 
user1804599
4:51 PM
@Jefffrey Wait. I screwed up.
 
@GamesBrainiac by lying to you
 
@LightnessRacesinOrbit lol
 
user3010322
@DeadMG The samples lied to me!
 
user3010322
Well, let's see if it works.
 
@rightfold You finally started having holiday? (Have enough cups, I hope??!?!)
 
4:55 PM
@DeadMG it seems you were correct I was thinking of Flexible Array Members in C11
 
@ThePhD I got lucky and remembered that the concurrent containers are based on a type-erased container that holds the storage, so I remembered that they would have the same problem creating visualizers for them.
 
user3010322
Lucky break~
 
user1804599
0
A: Homework time! Find me the lowest even digit in a string

rightfoldRuby, 71 characters x=gets.split(//).sort.find{|c|'248'.include?c};puts x ?$_.index(x):-1,x // is the empty regular expression, so the string splits into an array of one-character strings. $_ contains the last input read by gets. :-1 is actually a symbol literal, but symbols get cast to strin...

 
user1804599
71, actually. Woo.
 
user3010322
@DeadMG ♡ DeadMG-Senpai, Greatest Coder In the World, Uguu ♡
 
4:58 PM
@Dukales on the "which parameters" question, it depends on the context, obviously. Why don't you open a new question with the actual problem so we can answer that? — sehe 11 secs ago
... sigh
Christmas already forgotten
 
@rightfold '248'.include? forgot the 6?
 
Some people prefer firm members over flexible members
 

« first day (1169 days earlier)      last day (3797 days later) »