« first day (2650 days earlier)      last day (2524 days later) » 

00:45
@sehe I might be able to experience that in a few decades from now xD
@Borgleader Not me. I can't stand that ugly green. As soon as it pops up, I have to get rid of it.
can't we have funding for real innovation ...
like manned spaceship to other planets?
02:14
@TelautonomousKitty where is the car?
It at least needs wheels
@Code-Apprentice still waiting for the servo driver and jumpers though
have not started coding yet
 
2 hours later…
03:51
hi hrello
04:12
whos h.rello
it is a mysterey
whos mister rey
I am in the right meeting arnt I?
04:39
¯_(ツ)_/¯
04:54
@Prismatic sup
 
2 hours later…
07:40
@JerryCoffin distractions, be gone!
I can't see C++ IDE on raspberry pi
07:57
what can I do programmatically with a cam IR detector?
08:22
|:
08:49
548
A: Can (a ==1 && a== 2 && a==3) ever evaluate to true?

JeffI couldn't resist - the other answers are undoubtedly true, but you really can't walk past the following code: var aᅠ = 1; var a = 2; var ᅠa = 3; if(aᅠ==1 && a== 2 &&ᅠa==3) { console.log("Why hello there!") } Note the weird spacing in the if statement (that I copied from your...

Feeling better about C++ already
struct A {} a; template<typename T> bool operator==(A, T) { return true; } :D
or some operator&& overloading abuse :D
09:04
I was referring to the specific answer. (Yes, the c++17 "always auto" gag is similar)
I would deliberately give this answer even if I knew the other solutions, because it answers the question but is obviously not what they were after. Play stupid games, win stupid prizes. — Edmund Reed 5 hours ago
This is my preferred answer.
C++ outdoes JavaScript here by allowing zero-width spaces in identifiers
(painfully discovered after copy pasting C++ code from a pdf file when using a certain pdf viewer)
nwp
nwp
@milleniumbug nope
Now that I read it again maybe they didn't actually use a space.
But same idea.
@milleniumbug That was actually in the answer I linked. Javascript does support that
Oh, specifically ZWSP - I can't be bothered to find out about that
09:23
I love that you're modestly indicating you're willing to wait half a decade :) — sehe 19 secs ago
nwp
nwp
Such a hopeful estimate.
09:42
the trick is that, you can wait for many things at the same time
imagine you are CPU with 256 cores, will waiting on one core makes much differences?
if a program waits on handles the OS will context switch to another thread/process
09:57
if it's a program that uses all 256 cores ...
nwp
nwp
... then you can wait 256 times as fast!
@sehe Is a a boolean?
10:52
@Borgleader I don't think that question computes in javascript
hey
can i close this as a dupe of this?
I was trying to find a canonical "C++ has no way to handle keyboard events" Q&A and this is the closest I found
 
2 hours later…
12:57
0
Q: Elegant Output Separators

seheToday I found myself reinventing output separators for the zillionth time. I have converged on an approach like the following that seem pretty clean: Live On Coliru #include <iostream> template <typename... T> void foo(int a, int b) { auto sep = [first=true]() mutable { return first? (fir...

In which the polar bear is seen vigorously shaving the yak
@sehe let std::exchange into your heart
Oh, the context was this comment on Jonathan Boccara's Strong Optionals blog post
@LucDanton what religious background have you had :)
@LucDanton That's a beauty. None of the books/blog about "how does c++14/c++17 improve your life" mention this
Ven
Ven
@sehe lol the blog destroyed your code
thankfully the coliru link works :)
@Ven Yeah I noticed and it's documented borkness. So I left it and added coliru
It seems to me an obviously bad idea to clone all of std::optional interface just to /also/ tag it with a type discriminator
13:04
Not sure if this is in response to std::exchange being underrated or my question about religious background.
huh I would have thought I told you about it before but I guess you’re the fourth or so
Ven
Ven
@sehe your markdown-fu failed you a bit. `[foo](bar)` doesn't link.
Ah, someone else fixed it.
that time of the month ... and I can remotely ssh into pi to start camera, lol
 
1 hour later…
15:03
@LucDanton ps -u anet
Aside from the numerous issues anet has had with content etc, let's remember that their server technology really rocks
sbi
sbi
Hi. Has anyone looked into this book and give an assessment?
> Hold your breath
> Make a wish
> Count to three
> Come with me
> And you'll be
> In a world
> of Pure imagination
> Take a look
> And you'll see
> Into your imagination
@ArkadiuszKoćma oh boy how to break the news
I lost track of the post but they have been moving to AWS ever since the Frankfurt fire
15:24
Did I miss a datacenter incident?
15:35
@sbi thanks, now Amazon will just suggest that book to me for ages
sbi
sbi
@thecoshman You're not opening Amazon links in porn-mode browser windows? Why?
@sbi Personally, I like confusing it
@sbi I learned to do this ages ago
My favorite is when I order things for older relatives and my feed is diabetic socks for weeks
@sbi vOv
sbi
sbi
15:42
Well, I guess it's an unknown book then. Sigh. My boss (who hadn't had time to write code for half a decode) looked into it, considered it interesting, bought it, and dropped it off at the developers'. I now wonder whether I should quickly confiscate it and let it disappear, or encourage reading it.
quickly read it yourself then decide
nwp
nwp
But don't just half decode it.
@sbi Just buy everyone a copy of the Phoenix Project instead
skim through the things that you find important
if it does things in a sane way take a glance at the rest, if not make it disappear
 
1 hour later…
nwp
nwp
16:59
I'm using a transformation matrix at work which I learned in linear algebra. My whole world view that school and uni is useless is being threatened. Someone help.
9
@nwp you will never use what you learned in the statistics course
17:12
@nwp Linear is probably the most useful class in mathematics for everyone outside math department
nwp
nwp
17:22
Bleh, the result is not correct. I blame my education. World view restored.
17:33
@nwp Don't blame your bugs on the school.
nwp
nwp
Who else should I blame? Myself? It's not like I wrote the ... I mean ...
@nwp Oh don't be silly. It's always a bug in either the compiler or the operating system. You clearly need to read some questions from low-rep users on SO to get your head straight.
nwp
nwp
Right. I'm using VS for a reason. Now it finally pays off.
@nwp You seem to think the identity of the compiler matters. You're wrong.
18:23
I wonder if I'll ever stop having nightmare about those exams I missed or paper I forgot to write.
19:05
4
A: Why don't C++ compilers optimize away reads and writes to struct data members as opposed to distinct local variables?

Maxim EgorushkinThis is because void process_value(double& ref_value); accepts the argument by reference. The compiler/optimizer assumes aliasing, i.e. that process_value function can change memory accessible through reference ref_value and hence that size member after the array. The compiler assumes that becau...

Someone nails the explanation of ~~purfarmance~~ related question.
Guess what happens in the comments.
"I'm smarter than the compiler" on the house
@LoïcFaure-Lacroix If you get yourself some more healthy rest, likely.
@sehe The Scalar Replacement of Aggregates optimization should normalize both versions of the code. But I presume it's failing here because the array is too large.
There's probably a threshold in struct size (or # of elements) before the compiler skips that optimization completely.
@ArkadiuszKoćma No, we planned it in your absense
@Mysticial Oh, my bad for not reading the answer in much detail. I assumed he did support it with godbolt evidence
@sehe Actually, I'm wrong.
The size variable is part of the struct itself.
And that's getting passed into the function.
And the compiler is failing take into account the const.
wait....
I thought aliasing was spot on. And I tend to pass "small enough" (which is very relative) structs by value. I trust inlining and it makes everything simpler
19:16
I need to stop speed reading.
:)
@thecoshman Look up more titles
Only the double is being passed in. The size field stays local to the stack.
So SRoA is failing. And it's failing even with the smaller array sizes.
I have a feeling that SRoA is suppressed if you take the address of any part of the aggregate (struct) - even if it's still valid.
3
Q: How does BOOST_PP_SEQ_FOLD_LEFT work?

Eric NieblerI need to write a macro that processes an arbitrarily long list of things like (A)(B)(C). If I could take a Boost dependency, I would just use one of the BOOST_PP_SEQ_ family of macros. Unfortunately, I can't so I am left trying to figure out how it works. This Stuff Is Not Obvious. Can anybody ...

The gods have descended from the Olympus
@Mysticial That makes sense (unless all the code is inlined in which case it could still inline everything ultimately. I'd be very surprised if LLVM didn't)
@sehe OTOH, the struct is also satisfies the conditions for being "standard layout".
This could mean that it's valid for process_value to cast the double& back into the original struct and access the rest of its members.
Need to summon a language lawyer. /cc @LucDanton
Even the struct is defined locally and is not visible from process_value(), the optimizer probably doesn't make that distinction.
Though this does solve the issue of const-ness. Compilers don't really use const-ness for optimization anyway.
19:38
@sehe huh... I managed to actually read 'titles'
woah, new GHC errors are pretty dank
   |
17 |         _ -> print "Usage: node x, where x is 0 for server or n for client"
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@thecoshman You're getting old
I'm not 100% sure what AF_UNIX is for, but if its for interprocess comms, Windows can do efficient interprocess comms using AF_INET sockets bound to localhost. In this case windows does detect that the socket is pointing to another local process and shortcuts the comms stack, using LRPC to do the data transfer (That uses memory mapped files for a zero copy move of the buffer between processes). — Chris Becke Oct 6 '10 at 14:16
@sehe maybe... but you knew exactly what I meant
I wonder why they didn't simply implement AF_UNIX that way tho
seems like an easy fix
19:42
@BartekBanachewicz well, duh. All OSes do that
@BartekBanachewicz They do.
@sehe node.EXE: Network.Socket.socket: failed (Address family not supported by protocol family (WSAEAFNOSUPPORT))
It's just, UNIX invented (un)named pipes before the rest of the world got them right
I mean well suckage for using raw unix sockets in a Haskell codebase
but still
Yeah, I assumed you meant named pipes, as that's what AF_UNIX is on windows
I don't know what I assumed, I just have a code using that not working on Windows ;)
nwp
nwp
Wooo, my matrix thing works. Wolfram alpha is pretty cool. Should have used it much earlier.
@sehe I'm downloading Windows Insiders SDK and I'm 95% sure I'm gonna regret it
> To access this page, you need to be a member of the Windows Insider program.
nvm
I'm a complete windows abstinent, and even **I** am in the insider program
it says here that I need a special build of windows
> Please note, this Windows SDK Insider Preview is only supported on the Windows 10 Insider Preview operating system. Installation on an operating system that is not a Windows 10 Insider Preview build of Windows 10 is not supported and may fail.
ugh
It'll be an update
I thought.
19:49
I'm just gonna use AF_INET like a slightly depressed, perfectly reasonable, sad human being.
I'd still try installing that SDK but I need regular windows SDK and I'm afraid it'll break everything
Yeah. Do the AF_INET thing, it's reasonable. Just bind to the local adaptor only (security) and consider access control (same thing on UNIX)
@nwp solved in C++20
the syntax int x1 : 8 = 42; is valid in C++20
initialization wasn't complex enough, so they added more rules for C++20 :D
20:33
@sehe I'm not sure that's entirely true. UNIX file redirection definitely descended directly from a similar facility in MULTICS (though, admittedly, the relationship between the MULTICS version of pipes and the UNIX version is somewhat weaker). It's also to be expected that "X was invented" precedes (often by quite a bit) "X was done right". Looking at this particular case, UNIX named pipes are still almost hopelessly clumsy (e.g., having to create them with mkfifo).
21:04
@JerryCoffin You could say that Microsoft "accidentally" did kernel namespacing right because their filesystem namespace was such a in-homogeneous mess. I mean, Windowstations, IPC namespaces and control sets were strangely "ahead" while they were continuously struggling to even deliver simple functionality as working rename function in Explorer :)
Ven
Ven
And rename still freezes my computer.
What
@sehe explorer has never quite reflected what was exposed via API
Oh I know that
21:13
MS's system is kinda fragmented due to COM. For example, you can use SendMessage to show and hide certain kinds of dialogs (tooltips) in the taskbar, but showing and hiding other categories of dialogs require COM and thus IPC.
So, using COM to communicate with Explorer.exe makes perfect sense, except you can also use what is conceptually the process local SendMessage command...
@Mikhail it's actually worse because the shell team wanted to use COM but in pre win 95 COM was a massive memory hog, so the shell actually had it's own mini-COM
while this has since been removed it still manifests in various odd ways
Hello there
Ven
Ven
@Mgetz Like?
Ven
Ven
@Mgetz holy shit
@Ven the shell ones are just aliases for the com ones now
Wow windows
...what the hell
Ven
Ven
This is just awful
also single vs multi-threaded apartments
21:34
By the way
@VermillionAzure when you didn't have a ton of ram OLE32 was expensive
and at the time COM was new and most people didn't use it
Does anybody know about software metrics for abstraction mechanisms?
I'm trying to look for them
Not clear what you mean, do you mean Java's virtual keyword?
nwp
nwp
An algorithm that given some code returns a number that represents the "abstractness" of the code so you can say "this code is 17% more abstract than that other code".
4
Repeat for various other attributes and hope they are helpful.
@nwp White space isn't necessarily wasted
nwp
nwp
I mean the "Public questions tagged"-wall of useless text
Oh, ha, I get it, string run over
nwp
nwp
They allow to tag [tag:c++*]. It would be nice if they didn't expand it.
also lol markdown -.-
@VermillionAzure defining what is it that you're really after might help
22:07
@Mysticial I mean... aren't you like, even a bit tempted to click that beautiful green link?
I hear puppies die when it gets over 200k
I would be worried to click it by accident :O
that being said, of all these people in that contest of the most unclicked rep thing, that's probably the highest I've been given to see
nwp
nwp
Mar 21 '14 at 20:00, by Mysticial
AWWW FUCK!!! I accidentally clicked my rep icon.
@nwp just read that and Cinch came to my mind immediately
nwp
nwp
@nwp You actually can.
22:23
@BartekBanachewicz That is, whether a function is worth writing in order to save space in a program
or a macro. Etc.
nwp
nwp
That should be easy to measure. Just inline/expand the function/macro and count the lines.
@nwp No, I mean are they worth it to write in the first place if they save space
nwp
nwp
There is that guy who ask the interview question "I factor out common parts when I have the same code in X places. What is a good value for X?"
Most people answer 2 or 3.
In his opinion the correct answer is 1 because you take pieces of code and give them a name which alone is worth it.
@nwp But the name matters as well
@nwp And that's hard to quantify in a numerical way
nwp
nwp
So you might end up with a score of -3 lines saved and arguably still want to do it.
I think you would need to manually decide which functions are good and which are bad and then apply the metric and hopefully find a correlation.
22:41
@nwp Cool. Glad you like the idea
same here
nwp
nwp
Try boost*
My search field is not editable anymore -.-
@FélixGagnon-Grenier I wouldn't be surprised if @Mysticial runs a user script or proxy that blocks that click
@nwp I think tag search is not strictly a search. It "comes-from" a search, which is probably why someone decided it should be visible that the view is filtered
The top search bar is still editable for me(Chrome Version 63.0.3239.132 (Official Build) (64-bit) linux)
nwp
nwp
It is for me now too. Weird. And now it doesn't.
Ah, got it. The field has a size limit and [tag:c++*] expands to something that is bigger than that limit so you can't add any characters until you delete a bunch of them.
23:00
@nwp but MOBILE!!!!!
* SO has a mobile app.... they don't need a mobile site
nwp
nwp
@Mgetz The screenshot is not from mobile.
@nwp So UX. Much wow
@Mgetz They have two. And the newest one sucks donkey cock
@sehe Hah! I should try that, in the (rare) events when I get upvotes, I literally run (with my mouse) towards the notification.
actually.. yeah, a click listener the redirects to the reputation tab, that would be best.

« first day (2650 days earlier)      last day (2524 days later) »