« first day (827 days earlier)      last day (4347 days later) » 

@LightnessRacesinOrbit I noticed You were missing SO action for quite some time before you turned back again a few days ago?
@AlokSave I've been back on SO for months
popped into chat just this weekend though
@LightnessRacesinOrbit But you were missing for long? I haven't been in chat for too long.
The formula would probably be something like this:

(# of views) * (probability of upvote)
The probability of upvote goes down at the total # of votes goes up.
But...
There is a significant population who ignore the vote count and vote strictly based on usefulness/awesomeness... and such.
So (probability of upvote) never drops below a certain value provided that the reader understands the post.
some families have a hardware-accelerated sock sorter, known as mom
07:05
@Mysticial Yes and there is an additional factor, Passive votes, votes that keep coming long after the thread has turned passive. On a passive thread people usually vote based on the number of votes already seen on an answer/question.
@LightnessRacesinOrbit Nice pics. Pretty girl btw :)
a positive-feedback effect. some sort of lame primitive solidarity thing
@AlokSave That's a different thing. Passive votes are the result of high-views after the question is old. So that would be the case for something like this:
2670
A: Why is subtracting these two times (in 1927) giving a strange result?

Jon SkeetIt's a time zone change on December 31st in Shanghai. See this page for details of 1927 in Shanghai. Basically at midnight at the end of 1927, the clocks went back 5 minutes and 52 seconds. So "1927-12-31 23:54:08" actually happened twice, and it looks like Java is parsing it as the later possib...

@AlokSave That doesn't match what I've seen. Quite a bit of my passive rep is from relatively low-scoring answers (often answers that I took enough time that they were just too late to get much rep when posted).
@AlokSave :)
actually that reminds me.. need to update
which sits atop of Jon Skeet's profile - the most viewed profile.
07:06
anyone downvote massively upvoted stuff just to be mean?
never
it's usually shite, so I downvote it for that reason
they punish you just enough to be nonzero and that seems to be a deterrent I guess
@JerryCoffin Possible, because it is most likely that someone actually faced the problem and stumbled to the question through a exclusive search and not just the high views or vote count & found the answer more deserving
@AlokSave Could be -- once in a while I see some rep from something I don't remember at all and click on the link. More likely than not, it's something from a few years ago with a score of 1 or 2 -- but I don't pay enough attention to really know much with any certainty.
@Mystical I would put a small exponent > 1.0 on the # of views, people will upvote because of all the upvotes
07:14
@Mysticial That answer still impresses me a bit
Well, I think I'm going to go get some sleep. Later, all.
@JerryCoffin nite
@doug65536 Hard to say. I've actually been keeping track of a number of things on that question for a while. And I can say with certainty that the vote/view ratio has been steadily dropping.
It used to be at about 25 views/vote passive. Now it's up to about 40.
there's a cutoff point where people say "ok, the question isn't THAT good"
So people are definitely holding back their votes.
@doug65536 exactly
07:17
@Mysticial I've never collected data, but my feeling has been that votes/view (in general) has been dropping for a while now.
there's a gold-mine of anthropology data being fed into SO servers all the time
@Mysticial This guy... is he even real
@Rapptz In terms of one-time popularity, that question was only as popular as the denormal float question. But because Jon Skeet has the most viewed profile, he gets an enormous amount of views to that answer.
and every forum or chat server
@R.MartinhoFernandes Fixed. (Still a little crude output, but it works.)
07:21
lol at "I'd like to see you guys man up and filter my ignored tags at the database level." meta.stackoverflow.com/a/69072/208703
DON
DON
hi
anybody here ?
@JerryCoffin That's probably true in the long run. But I've noticed it in just the 6 months since the question was asked.
07:40
I havent seen this room empty yet
Unless you use JavaScript for DOM manipulation.
@DON Everyone is here.
@JerryCoffin On a second glance. I said earlier that the view/vote ratio went from 25 to 40. But I just realized that there's some sample bias. The average of this past week was about 45 - which is significantly higher than the weeks before it. This is probably due to people pouring into my profile from the Pi question, and then into the branch predictor question itself. Many of these people came from Reddit/HN, and thus had no accounts. Or they had already upvoted it from a while back.
You and statistics
@Borgleader I don't deny that I like numbers. :)
07:51
but he hates math
what a weirdo
I hate numbers :(
do you love math
I used to, but I got streak of awful teachers and now I hate it
math's cool
And I would love to be good at it
07:53
Well tbh I'm mildly decent at vectorial match because I can see it in my head
vector math is easy
if we're talking euclidean vectors anyway (btw this is a joke.. a bad one admittedly)
linear algebra makes so much sense, it's like we're hardwired with some understanding of it when we're born or something
07:54
it doesnt make sense to everyone though
I liked it because it was the most "visualizable" math I'd done
Calculus made me dislike 3D math a bit.
With the whole, washer thing.
._.
@Mysticial If you think that's ugly, you should see the LaTeX source :)
engineering math is mostly nice. very easy to imagine and think about some of it. seems somewhat intuitive
@Rapptz fuck you :)
\begin{align*}
\int\frac{3}{(x+1)(x^2+9)}~\text{d}x& = \int\frac{A}{x+1}+\frac{Bx+C}{x^2+9}~\text{d}x \\
& = Ax^2+9A+Bx^2+Cx+Bx+C \\
& = x^2(1A+1B+0C) = 0 \\
& = x(0A+1B+1C) = 0 \\
& = (9A+0B+1C) = 3 \\
& = \text{rref}\begin{pmatrix}
1~1~0~0 \\
0~1~1~0 \\
9~0~1~3
\end{pmatrix} \\
& =  A = \frac{3}{10}~B =-\frac{3}{10}~C=\frac{3}{10} \\
& = \int\frac{\frac{3}{10}}{x+1}+\frac{-\frac{3}{10}x+\frac{3}{10}}{x^2+9}~\text{d}x \\
& = \frac{3}{10}\int\frac{1}{x+1}~-\frac{3}{10}\int\frac{x}{x^2+9}+\frac{3}{10}\int\frac{1}{x^2+9} \\
07:56
okay this is bullshit...
I changed this variable but nothing changed in the picture
08:12
@Rapptz I hope that code is generated.
No. I wrote it all by hand.
That doesn't seem right...
I use LaTeX a lot so I'm used to it, it isn't as bad as it looks.
Having it being generated would take out the fun of writing it.
08:28
@LightnessRacesinOrbit I figured out that wide __FILE__ etc thing. It was a simple matter of putting in the _T (or 'L'). I posted my custom assert implementation that statically generates a good assert with file and line number
You could have figured that out like, couple hours earlier.
I was doing other stuff
you implying I sat here and worked on that the whole time?
No, I meant, you could have read the answer doing exactly that :P
trying to make people look stupid makes you look stupid
I don't think I was trying to make you feel stupid, though I guess if it does, hey that's okay too I guess.
I'm kidding obviously.
08:30
lol
08:41
What do y'all think of my website design, eh?
@Crowz you didn't post a link
It's pretty meta, he's implying they don't exist.
09:14
So Rapptz, how does one become good at math?
I don't know, I naturally found it fun and didn't mind it. I've never been in your shoes.
Well I used to like it
My mathphobia is rather recent ish
I used to do a lot of problems for practice.
Be like, "this looks cool" or something of the sort.
I'm going to sleep.
 
2 hours later…
11:08
1 hour ago, by SpicyWeenie
SO. Where the socially challenged can feel like somebody...
@SpicyWeenie ^ the irony that you should have felt the need to shout that into the void and retract it :)
user142019
11:20
I was thinking of an input validation framework for validating a large amount of inputs like this:
guys, what do you think about the accepted answer here? stackoverflow.com/q/14423563/893693
@Zoidberg I like your style. Succinct, zero-overhead
user142019
validateUser name email password
      = validateMinLength name 4
    >>= validateEmail email
    >>= validateMinLength password 4
CTRL+C also doen't enter to finally . — URL87 28 mins ago
^ this surprises me a lot more
@Zoidberg haskell? no comment
@sehe you hate Haskell?
user142019
11:25
dfsf
@sehe it works for me
but I think even more that setting REUSEADDR is totally the wrong way to go
@StackedCrooked no
@bamboon For me too
@URL87 huh? It does. If it doesn't check your signal handling filters (parent shell(s)) and your assumptions. Proof: pastebin.com/iY8LQDyKsehe 1 min ago
user142019
validateUser name email password = validate $
    [ Validation { value=name, regex=Just "^[a-zA-Z'- ]+$" }
    , Validation { value=email, email=True }
    , Validation { value=password, minLength=Just 4 }
    ]
@bamboon totally should be overstating it. I think there is no actual leakage, kernel sockets will have a limited TIME_WAIT state, IIRC
user142019
That would return a list of failed validations.
11:29
@Zoidberg looks better
user142019
Or an empty list if everything was OK.
user142019
validate is easy to implement.
@ThePhD no, I build up to date toolchains for MinGW-w64.
I'm not a MinGW-w64 dev (not smart enough)
If you have MinGW-w64 problems I might be able to help. If you want a new GCC feature I can look into buiding a prerelease.
user142019
validateOne :: Validation -> Maybe ValidationError

validate :: [Validation] -> [ValidationError]
validate = catMaybes . map validateOne
11:46
is there a way to get a outputtable string in a function f() corresponding to the function name where f() is called?
without specifiying C99 macros like __FUNCTION__ etc.
I'm now manually writing a class::function:: prefix to all my debug output, but it feels so unnecessary :/
user142019
Maybe like this:
@Zoidberg catMaybes? catForSure
user142019
void foo() {
    std::cout << abi::__cxa_demangle(typeid(foo).name(), foo, bar, baz, you know shit here) << '\n';
}
user142019
@sehe catMaybes returns a list of xs in all the Just xs.
I understood :)
user142019
11:50
It should've been called justs IMO.
user142019
No wait
user142019
that'd imply it'd return the Justs. xD
@Zoidberg I don't want to add cruft at every call site :(
user142019
well
user142019
make it a function.
11:52
that would still not be much better than manually writing the function name. Today, C++ still sucks.
cause I'd manually still have to write the function name
user142019
Use Haskell.
lol
I almost started using C# last week.
<shudders>
user142019
C# is awesome.
user142019
C# > C++.
It's not that great cross-platform.
11:54
@Zoidberg define ">"
user142019
is better than
as a language, maybe
user142019
lol
user142019
(>) :: Language -> Language -> Maybe Bool
user142019
11:55
Maybe better.
sure, crappy benchmarks are crappy.
but still.
@rubenvb Mono sucks?
@Abyx yeah, but that would be my runtime on non-Windows.
which would lead to huge dependencies for a build system app.
which I don't want
user142019
Premature optimization.
user142019
11:57
Use unsafe or even C for bottlenecks. :P
non-Windows OS? never heard of them.
Can I “reset” an std::istringstream? As in, int x; istr.reset("10"); istr >> x; reads 10 into x?
Check your router. Or the stuff serving your favourite website. Or your TV settop box.
user142019
mystream = std::istringstream{"10"};
11:59
@KonradRudolph istr.str("10");
thanks
yeah, just found that myself :)
no need to create a whole new stringstream.
user142019
I'm going to play with unsafe.
user142019
I wanna segfault Mono. :P
Hmm, Catch.hpp is quite brittle with its expression decomposer
@Zoidberg No need for unsafe :p
12:02
@rubenvb Not a bad idea to istr.clear() as well.
user142019
lol
Just put in some invalid UTF byte sequence
(ioflags stuff)
user142019
Seriously? T_T
@LucDanton Indeed, was necessary, state was still eof
12:02
@LucDanton ah yes. Subtle thing that might not pop up until you won't find it when it does.
user142019
> System.NullReferenceException: Object reference not set to an instance of an object
user142019
C# y u check pointer dereference.
Yeah, it's finnicky.
@Zoidberg Not if you make it an extension method instead of an instance method
user142019
public static void Main(string[] args) {
    unsafe {
        int *foo = null;
        *foo = 42;
    }
}
12:04
oh, well, what made you expect anything else?
user142019
I thought it'd be a segfault.
"unsafe" ?
I think unsafe relates only to the value of the pointer (and the lifetime/validity of the referred object)
user142019
int *foo = (int*)48423984329;
*foo = 42;
unsafe just allows T* syntax
@Zoidberg int x; int* foo = &x; foo[1] = 42; ?
user142019
12:06
I even get a NullReferenceException here. xD
user142019
@KonradRudolph you mean foo[1]?
still shouldn’t segfault though
user142019
foo[1] just does nothing.
user142019
foo[10000] = 42; gives NullReferenceException. :P
@Zoidberg What do you mean, nothing? That’s also weird
hmm
12:07
@Zoidberg UB
user142019
Probably stack corruption.
@Zoidberg it's detectable out of the GC mapped memory
@Zoidberg yup
@Zoidberg nope, if it's a x64 OS
user142019
It's an x64 OS.
try long then
user142019
12:08
Hmm wait
user142019
I'm gonna try this:
foo[1] points to padding (alignment)
user142019
long x = 0;
long y = 0;
long* foo = &x;
foo[1] = 42;
Console.WriteLine("X = {0}; Y = {1}", x, y);
user142019
COoooooooool
user142019
> X = 0; Y = 42
12:10
@Zoidberg and try with long* foo = &y; too, or inspect IL generated to see what order they get pushed
@Zoidberg You think that's cool? Have a look here:
7
A: How to get current value of EIP in managed code?

seheThe real short answer is: the CLR VM is a stack machine, so no EIP there. The slightly longer answer is: if you rely on undocumented implementation-specific details, you could extrapolate a useable ID from the CPU EIP in unmanaged code. Proof Of Concept I just managed the following proof of c...

user142019
@sehe both 0.
@Zoidberg Yeah, that was obviously redundant after you already confirmed the order
user142019
How do I pin an object?
user142019
Oh got it.
He helped me to find this line in my code: ident %= ident [_a = _1] >> lit('=') >> value(_a);<br>It is obviously wrong. — user1861174 15 mins ago
^ he still doesn't get that "he" is the person he is talking to...
@Zoidberg fix IIRC
user142019
12:17
var handle = System.Runtime.InteropServices.GCHandle.Alloc(str, System.Runtime.InteropServices.GCHandleType.Pinned);
user142019
:P
@Zoidberg wtf. That's kinda neat though. I think the other day, a question could have been answered using this instead of the fix (scope limited) keyword
user142019
I need its address.
user142019
@sehe fixed FTFY
@Zoidberg max recursion depth exceeded
user142019
12:21
> System.ArgumentException: Type String cannot be marshaled as an unmanaged structure.
user142019
Fuck. :P
user142019
Apparently, this gets the size of a managed object:
user142019
var th = str.GetType().TypeHandle;
var size = *(*(int**)&th + 1);
Lots to learn. I suppose you'd do good to start with
user142019
Hmm this is interesting.
user142019
12:25
Apparently, String uses SSO.
user142019
Or the compiler optimizes it.
@Zoidberg it's implementation defined.
user142019
> System.ArgumentException: Object contains non-primitive or non-blittable data.
user142019
Hmm.
user142019
sizeof y u no managed objects.
user142019
12:32
unsafe y u so safe.
user142019
Oh cool.
user142019
Mono has a C# REPL.
user142019
Which you can embed.
user142019
So you can provide C# as a scripting language. xD
How do I call a conversion operator defined in a base class? base_t::operator T()?
12:38
@Zoidberg interning. and yes, optimizations
@Zoidberg you know, try sizeof on std::vector once
@KonradRudolph That works, yes.
@Zoidberg absolutely. why?
user142019
@sehe that should work.
user142019
But in C#, sizeof(string) gives an error.
C# has sizeof? What's the point?
12:42
ach, drat! C++11 and its partial support in compilers has me utterly confused
Can I or can’t I pull in base class constructors via using base_t::base_t_name; now? GCC doesn’t let me, and has a bespoke error message telling me so
@KonradRudolph I don't it's supported yet
Okay, apparently it works and GCC 4.7.2 can’t do it yet
that is utterly annoying :/
4.8 will have it thohgh
*though :)
user142019
Does .NET have a string stream?
user142019
Oh nevermind I need a StringReader.
user142019
I want ' to be able to be part of identifiers in Zoidlang.
user142019
I miss that so much in non-Haskell languages. xD
what, like void don'tCallMe(...) ?
or more like f(), f'()..?
user142019
The latter, but both are possible.
user142019
And I also like ! to signify impurity for member functions.
user142019
13:07
var arr = [2, 4, 1];
arr.sort(); // returns new array
arr.sort!(); // sorts array in place
user142019
And maybe ? for functions that return null instead of throwing an exception.
user142019
Of course all conventions.
@KonradRudolph In some instances it won't complain about such a using declaration, but they have no effect.
@Zoidberg (As you may know) Ruby uses ! for methods that mutate state and ? for methods that return a boolean.
user142019
That's where I got the idea from. :P
13:17
I got a parent-child-pointer to base inheritance problem
@Zoidberg Thought so :)
user142019
I really like the bangs.
However, does Ruby use ? to indicate possible null pointer?
user142019
You're allowed to, but I've only seen it used with Booleans.
user142019
Zoidlang convention will be exception/null though.
13:19
I first used Ruby in 2005 but I still haven't found the opportunity to learn in properly.
Perhaps I should prioritize that.
user142019
File file("my_empty_file.txt");
file.read(); // IO.EndOfFileError
file.read?(); // null
user142019
Since sometimes exceptions are just fucking ugly.
I have project inheriting from target. I store a list of target*s in project. My parser class thing needs a project reference, but all I have is a target*. What I did until now is a static_cast on the pointer I knew was a project, but is there a better way (i.e. without a cast, and without an extra base class)?
user142019
C# y u no const var.
SSDs Y U €1/GB?
13:26
@rubenvb because they are awesome?
@rubenvb I suppose the answer is not as easy as having a project* member, given that you know that you have a project?
I.e. this begs the question, under what circumstances do you know for sure you have a project*, where does it come from and where can you store it.
@LucDanton Well, a project itself can store many pointers to subprojects.
:7279808 project.targets.emplace_back(new libambrosia::project(project.name + "::" + token, subconfiguration, dependencies));

          nectar_loader subloader(*static_cast<libambrosia::project*>(project.targets.back().get()), external_dependencies, full_subproject_filename, subdirectory / token, sub_stream);
> I am running two programs.. First program is written by c++ and Another program is written by java.
Maybe I need to first store a pointer, to the subloader thing, then emplace_back.
13:29
@rubenvb That would be extremely straightforward -- I would recommend taking care of that new though.
@LucDanton I don't see the problem. It goes directly into a unique_ptr.
Wrong attitude.
You know how the quote goes, favouring obviously correct code over code with no obvious fault.
So you suggest I write a make_unique?
Never crossed my mind actually. Would have expected you have one.
I saw no reason. out-of-mem exceptions are like totally unhandled.
and I really see no other way for a new into a unique_ptr to do anything nasty
Ell
Ell
13:34
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
    return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
make_unique is just nicer imho, seeing new makes me nervous :3
I don't want to give pause and consider function argument evaluation order and exception from constructors. Obvious code etc.
lol
OK. I'll add it to my algorithm.h header.
It does kill MSVC compat though.
which is a nono
@rubenvb Yeah I know you don't see any obvious fault. I don't care about that argument.
Ell
Ell
@rubenvb does it? o.O
2
Q: Is there a way to write make_unique() in VS2012?

KlaimHerb Sutter propose a simple implementation of make_unique() there: http://herbsutter.com/gotw/_102/ Here it is: template<typename T, typename ...Args> std::unique_ptr<T> make_unique( Args&& ...args ) { return std::unique_ptr<T>( new T( std::forward<Args>(arg...

Unless you convince me of a situation in which my program would crash (and it's not because of some out-of-mem or other "it's really the user's fault for having a sucky system" error), I'm not going to write/use a MSVS2012 compatible make_unique.
user142019
13:37
Is there a short verb for "omit initialization"?
I don't care. It's your code.
user142019
Or a word indicating an uninitialized object.
List of incentives for me to convince you:
Ell
Ell
I wonder how slow a hypervisor running all of the major archs & os' would be to compile stuff
@Ell My VBox running Linux vs native Windows is about 45 seconds to 30 seconds to compile all of my little project.
Ell
Ell
13:40
@rubenvb hmm interesting
Considering Linux GCC is bound to be a bit faster than on Windows, I was surprised.
That was my project building itself.
I used std::time(NULL) to measure.
Ell
Ell
I think there should be a way to click compile, and then it compiles on linux, windows and mac
that would be kewl
@CatPlusPlus morning. Do you have a headache per chance?
When a test case fails and gets you thinking that’s the equivalent of a scientific test yielding unexpected results … I get a warm, fuzzy feeling :)
> tests/dna.cpp:94: a > 'T' failed for: N > T
Hmm. So how do I tell C++ now that the implicit conversion unsigned char => dna takes precedence over the implicit conversion dna => unsigned char?
13:44
@KonradRudolph You can't really rank conversions, although perhaps we could help with your Y if you tell us about your X?
@LucDanton I think I can just make the conversion to unsigned char explicit anyway
@KonradRudolph delete the conversion operator or make it explicit? (just guessing things I would try)
okay now I get a very interesting situation indeed … unsigned char and char are different types, so if I have an implicit constructor which takes an unsigned char, that constructor isn’t called in a comparison with a char literal?
Aug 20 '12 at 8:34, by Luc Danton
And from that I learned that conversion operators that 'overlap' are problematic, even when using explicit.
ah, figured it out
bother!
(sorry for the soliloquy)
Ell
Ell
13:50
@rubenvb is ambrosia just a build system? or will it allow running of tests and stuff?
also does it generate build files (like CMake) or does it run directly?

« first day (827 days earlier)      last day (4347 days later) »