« first day (2565 days earlier)      last day (2374 days later) » 

12:34 AM
@LucDanton Sorry, I missed that. I was too busy doing IMPAHTANT STUFF, to wit:
0
A: (Homework) Trying to make a Yahtzee game in C++

seheI was inspired to play with some c++17 freshness. Here goes: Live On Coliru ¹ #include <algorithm> #include <array> #include <cassert> #include <iostream> #include <iomanip> #include <map> #include <random> #include <string> #include <string_view> using namespace std; using Score = size_t; n...

@LucDanton The behaviour is normal if invoked in normal mode
 
all the same I don’t think that’s what the ycm authors intended :)
@sehe speaking of C++17 freshness you can face { dist(e) } instead of static_cast<face>(dist(e))
which is about as far as I read before I balked at the amount of code :)
 
Don't worry. You're better of not reading the hackyness that it is :)
I've forced my way to use fold expressions everywhere.
Which is kinda nice in some spots:
    void hold_highest() {
        held = matching(max({faces[I]...}));
    }

    void reroll() {
        faces = {{ (held[I]? faces[I] : roll_one())... }};
    }
 
these look like regular pack expansions to me
I see a couple of comma folds down the line for printing stuff
 
True. I lump those a bit together
    switch(c.how) {
        case method::upper_box:      return ((c.key[I]? all_values[I] : 0) + ...);
        case method::_3_of_a_kind:
        case method::_4_of_a_kind:
        case method::chance:         return (all_values[I] + ...);
        default: throw runtime_error("illegal move");
    }
 
oh there they are
the filtering via the key is fun
 
12:46 AM
I think it's pretty fun to have the index pack available at all times. Also, hacks like this were fun:
template <size_t... I> hand_impl<I...> make_hand_helper(index_sequence<I...>) { return {}; }
template <size_t N = 5> auto make_hand() { return make_hand_helper(make_index_sequence<N>{}); }

template <size_t N = 5> using hand = decltype(make_hand<N>());
I should probably look at your YCM question, but I'm not sure whether you mentioned what triggers the behaviour
It's sad in a way that it's not possible to get a non-type parameter pack back on-the-fly, like say from integer_sequence<>
 
as best as I can tell this manifests on 'large' enough files; but I’m not talking about anything gigantic here, something like ~135 lines of rST, just about enough to (I assume) populate the completion
what happens: I enter insert mode, type enough characters to trigger a completion hint, then ESC
in most circumstances nothing special happens (i.e. back to normal mode, characters have been inserted)
if I ESC quick enough however the last inserted character gets decremented and the cursor jumps up :/
 
@LucDanton rST? Restructured text? Does YCM do anything for those?
 
when I used -V1000trace.log to get an idea of what happens I have to press it really quick, so I’m thinking race condition of some sort and the feedkeys() call goes haywire or something
 
I was thinking that. And that would probably make it a vim bug
 
@sehe without having ever looked at the docs I believe it’s attempting to do human text completion, i.e. I get pretty much every other word in the compl hint
oh and what led me to ycm: unsetting completefunc obviously gets rid of both completion and the quirk
 
12:53 AM
In other vim news: I had a random unexplained crash just a few hours ago. Right after starting vim. A restart got me back up and running in <3s so no time wasted.
It was a notable event though. Usually Vim doesn't crash on me, like, ever.
 
same
 
I figure that, too, might have been a ycm race. I'm not sure how long the ycm server lingers, and I was restarting Vim pretty quickly before the crash (which is why it didn't cost me any time at all to re-restart :)).
 
I’ll open an issue when/if I get a more up-to-date YCM (long story but it’s a system install), since I noticed I’m behind master a couple of changes already, plus I’ll need to make sure I haven’t set weird YCM parameters or suchlike
 
posted on October 24, 2017 by Herb Sutter

Last week I did an interview by email with InfoQ. It just went live: C++17 is Here: Interview with Herb Sutter Topics include: What parts of C++17 should developers get most excited about? Why didn’t concepts make it into C++17? What will be the major focus areas for C++20? What do you find interesting or […]

 
1:00 AM
@sehe behold! now coming to a proposal near you
5
 
@LucDanton I just updated, but I'm still not getting proper c++17 support (I'm never sure what decides what version of libclang is used)
@LucDanton That is cool.
 
@sehe me and my concepts cannot possibly comment on libclang :)
it’s not the first time we talked about polymorphic lambda hacks, so to recap: poly lambdas give the power of local templates, consequently explicit template parameters give full partial spec powers
here’s the latest proposal, easy enough to find via Ctrl-F 'lambda'
 
@Morwenn Running Windows updates on one of my sandboxes to grab the latest definitions.
 
2:10 AM
How much longer does anyone think that Microsoft will support Window 7?
I am kind of reluctant to upgrade to win 10 because of the advertisements
 
 
1 hour later…
3:19 AM
@Morwenn Looks like VirusTotal has several others flagging it. I took a look at the code and that launcher application pulls in my entire hardware detection library which includes a bunch of low-level system calls and WMI calls. Most of it is unnecessary. Once I stripped those out, VirusTotal shows only 1 program flagging it.
Fuck it, I think I'm just gonna open-source that launcher application once I rip out that hardware detection library.
So I suspect that a combination of the hardware detection library combined with a whole bunch of string-logic which gets passed into CreateProcessW is probably tripping up these virus scanners.
 
4:07 AM
Can you recompile the hardware detection library with the hopes of tricking the AV?
 
That's certainly possible. But the thing is that all the main y-cruncher binaries have the library has well. And yet none of them trip up the AVs.
 
Did you LTO the library, if its static?
 
So it's probably a proportional thing. Those main binaries are so large that the HW library is only tiny portion of them. But in the launcher binary, the library is more than half the binary size.
@Mikhail Yes. It's LTO'ed in all the binaries - both main and launcher.
 
we need a "Bro do you even LTO?" meme
 
That launcher should be open-sourced anyway since it contains no math. But I never did in all these years because it has a bunch of ugly dependencies - one of which is that HW detection library.
That library I can't open-source simply because it's part of the benchmark validation system in the program. And doing so weakens the unavoidable security-by-obfuscation for competitive benchmarking.
 
4:15 AM
 
gangster with tiny monitors ...
 
plot twist, actually there was a virus
 
5:03 AM
 
5:19 AM
and now, for the next chapter in "@Félix has no idea what the hell happens with the c++ tag", you won't believe how many upvotes this too broad unclear without mcve gaussian blur question got.
... so yeah. I mean, why is it interesting?
to be completely transparent, this is exactly the kind of questions I would did happily vote to close. Apparently, I don't share consensus here. I'd be happy to know why. Is it because niche c++ "get off our lawn" stuff, or is it really different from your general "generate code off your arse" lazy question?
 
I think its fine, the guy wants the answer in C++, so he tagged it as C++.
The funnier thing is that that accepted answer looks visually distinct from the effect in the question.
 
5:43 AM
@milleniumbug I'm open-sourcing that CPU dispatcher because it trips a small # of virus scanners: github.com/Mysticial/y-cruncher/blob/master/trunk/Source/…
 
Ell
////////////////////////////////////////////////////////////////////////////////
nice comments :P
 
Yeah, that's just a stupid habit I have.
 
6:00 AM
@Mikhail Looks like the hardware library was only part of it. It's static-linking the Windows run-time library.
 
watup peeps
do you guys know any solid sources on how reducing contrast of black fonts on white bg lowers eye strain?
 
no
 
I've looked at some questions on UX and there's a lot of opinionated info and sources which cite 1980's research of CRT displays
that's like not real information anymore
most recent posts seem to be from 2011 or so
I wanna learn more about this but I can't find any real research, just personal opinions
 
@Mysticial Sounds like an amuetuer move, especially now that the CRT is distributed through Windows update.
Now with 30% more "telemetry"
 
guess my next visit to chat will be next year, as usual
 
6:43 AM
@user1306322 looking forward to it
@user1306322 Last year was in C# though
 
6:56 AM
And everyone here will just think that you are just another newbie once again!
#renewbiefy
 
Re: Re: Re: Re: new beefy
 
7:14 AM
Man. I got overloaded watching just 1 minutes of that
 
7:34 AM
@Mysticial Didn't you already have an issue open for that somewhere? :)
 
DRIVER_IRQL_NOT_LESS_OR_EQUAL you say?
why ._.
 
@LucDanton hahahahahaha
 
8:25 AM
Sitting here for some talks about mobile apps & I heard snores behind. Although I am not 100% sure it's definitely snores though.
 
@BartekBanachewicz you mean it taking Object instead of K?
that's because of when you get a Map<? extends K, V> you wouldn't be able to use get
 
Ven
@BartekBanachewicz why are you surprised
 
It's the same with contains in Collection<T>
 
9:06 AM
@ratchetfreak it's dumb
@ratchetfreak Yeah no
 
@BartekBanachewicz I know, the loss of type safety is a issue I ran into multiple times already
 
@EuriPinhollow oh well I have read it more carefully and now I see what author is writing about. I can't understand why he is not happy with compiler optimizations (copy elision, inlining) and others.
 
Ven
how come half of the C++ proposals are related to lambdas /cc @Morwenn
 
9:24 AM
@Ven people love them lambdas and would love to love them even more
 
but you can't make love to lambdas
@BartekBanachewicz Java collection classes are garbage
 
@milleniumbug don't try me
 
@Morwenn it's almost as if this programming with functions could have its own paradigm
 
@milleniumbug java generics are garbage
 
@ratchetfreak Yes, that too
 
9:52 AM
@Mysticial here you go stop wasting precious performance with that OS go bare metal :D
 
@thecoshman hey, this is easier than I thought
 
ah sure, just five lines of magic and bobs you uncle
 
10:12 AM
@thecoshman it's not magic, it's just low-level code
mov ax, 0x3
int 0x10 ; set vga text mode 3
this is just like on 486 :3
but I dunno, I guess I'd rather learn AVR at that level than x86
I fell in love with the ATTiny
 
@BartekBanachewicz I was being sarcastic ¬_¬
@BartekBanachewicz there's a reason it's known as x86 :\
It's kinda cool knowing about how it works though
 
yeah it's just not very practical on modern machines
you need drivers for about everything
while on mcus you can write those drivers quite easily
 
Well, for most no GPU devices, those drivers are opensource, or at least have opensource guesses of how they wowrk :P
 
yeah but even getting such a driver to work is a lot of effort
 
Oh yeah, I can't see any real reason to do it these days besides novelty
 
10:54 AM
@thecoshman or actually developing a GPU driver...
 
11:23 AM
> Change of font to Times New Roman based on looking at what other papers were using, though I did briefly consider Comic Sans.
 
11:44 AM
@nwp :D
 
The more I read the operator<=> proposal the more I like it
 
@Morwenn Who wouldn't like to have a spaceship...operator?
 
Ven
the more i like you
 
:3
@wilx I'm pretty sure you can find people to voice their opposition somewhere :p
 
nwp
@FélixGagnon-Grenier 2014 and the bounty probably made the question look better than it is. Additionally it is decently clear and unlike most "write my code" questions there is an actual understandable knowledge gap behind it instead of laziness. Making stuff run fast with a clear goal and also creative possibilities can be a neat challenge.
Technically I would count it as "off-topic because... This question does not appear to be about programming within the scope defined in the help center." but the reason those questions are off-topic doesn't seem to apply here.
But I too have difficulty telling the qualitative difference between heavily up- and downvoted questions sometimes.
 
12:00 PM
-9
Q: why I can't send and receive list file in c++?

alexhow to send and receive list file in c++ i'am so tired i want a server and client for send and receive list file full code with header please.

/cc @Mysticial
 
12:59 PM
Is KDiff3 perfect or just unmaintained?
 
when in doubt consider it to be perfect :p
 
Ven
@Borgleader goddammit alex
 
@Morwenn it's decent
 
1:29 PM
@nwp Imagine his heartbreak. Somebody needs to console him.
 
1:56 PM
@JerryCoffin :D
Wow. What an answer, this answer should get -2000 or something... Why is your short answer "do not use singletons"? There are the places where you need to use "singleton" (rare, but still, they happen), otherwise, the design pattern wouldn't be invented... — Muhamed Cicak 2 hours ago
 
@nwp I think Oct 14 stands for 14th of october, but indeed the bounty must have drawn some sympathy upvotes. That concept is beyond my meager human mind to comprehend.
Tbh I just feel bad for OP here meta.stackoverflow.com/q/358319/576767
 
2:45 PM
@fredoverflow Looking for the source where one of the GoF said that singletons were a mistake. ISTR you posting a video but I can't find it.
 
3:07 PM
GDAL randomly not working -____-
 
3:17 PM
@Morwenn Not an issue per se. But it had been my intention to open source the launcher. But I never got around to it since it had a number of dependencies which aren't open-sourced. So I bit the bullet last night to run through all those dependencies and figure out which ones can be removed, and which can be moved into the open-sourced library.
 
Do you really on other non-open-source library than your own big numbers library and y-cruncher internals?
 
Tonight I'll see if the Intel compiler has the same issue. I doubt it'll make a difference though. Seems that the AVs are bitching about the statically-linked MSVC run-time library more than the hardware detection and process execution.
 
oh
 
@Morwenn When I put the original binary into VirusTotal, it said 4 AVs flagged it. Though I couldn't get my own Windows Defender to flag it. That fact that there's more than one false positive led me to take a hard look at it.
Once I ripped out the bulk of the hardware detection library, the 4 dropped to 2.
Once I dynamically linked the MSVC run-time library, it passed all of them.
 
Nice :)
 
3:22 PM
I've uploaded the SSCCE on my Github. If you compile with VS2015 through the project that's provided, it generates the binary that gets flagged by 2 AVs on VirusTotal.
I haven't tested with VS2017 yet.
I can't move to VS2017 until the Intel Compiler fixes their integration.
But since the launcher binary is self-contained and separate from the main binaries, I can easily do a one-off thing with VS2017 if that's necessary.
Though part of me wants to submit a bug to the VS dev community saying, "Programs compiled with Visual Studio get flagged as Viruses." And give a 10-line SSCCE.
 
@Mysticial The problem with that is that the bug is really in the AVs. Most likely comes down to: virus X (and perhaps Y and Z) was compiled with MSVC, and statically linked with its library, therefore anything else built the same way has an increased chance of being flagged as a virus.
 
@Morwenn I think you typoed somewhere in that.
@JerryCoffin Hmm... That's a good point. OTOH, the rest of the binaries also statically link. But they're also an order of magnitude larger in binary size.
 
3:41 PM
@JerryCoffin it's more likely a combination, hardware detection+static linking
 
@ratchetfreak To actually be flagged, I'd agree. That's why I said "increased chance of being flagged" rather than "will be flagged". I'd guess it's roughly like many things in the DSM: anything showing more than M of the N symptoms on the following list will be diagnosed.
 
 
1 hour later…
4:57 PM
@Mysticial Indeed
I guess I was really -> rely
 
Ah. The answer is no aside from the basic system libraries.
 
ok
 
There are a few optional dependencies which can be trivially removed without affecting the core functionality of the program. (libnuma in Linux, Cilk Plus, TBB in the latest dev version)
 
Who are you going to do about the Cilk Plus deprecation?
 
For Windows, I've added TBB for v0.7.5. I'll keep Cilk Plus in there until Intel drops it in their compiler.
For Linux, I don't know yet. TBB doesn't seem to come with GCC like Cilk does. And therefore, it isn't pre-installed with most distros.
 
5:08 PM
Next step: everything through executors x)
 
The program will work fine without both Cilk and TBB. But there is a limit to what my hand-rolled thread-pool can do.
 
5:45 PM
in WPF, 2 mins ago, by biggidvs
Interesting visual of different sorts for anyone interested https://imgur.com/gallery/voutF
/cc @Morwenn
 
@milleniumbug Those are always pretty, but hardly ever help actually understand IME ^^"
And hybrid algorithms are too complicated, so the visualization often doesn't look like anything unless you've got a shitload of values
 
you could use these as a replacement for an aquarium
 
I'll have to wait for my goldfish to die first
 
6:17 PM
@fredoverflow awesome, thanks
 
6:38 PM
@milleniumbug I found it by typing "Vlissides" into YouTube, by the way.
 
7:33 PM
I wish B5 paper was as easy to find/purchases as is A4 paper.
 
 
1 hour later…
8:45 PM
hi
 
9:08 PM
either my phone battery is getting really old or locations services on new OS version is draining more battery
also ... need a new phone
 
9:31 PM
GUYS
I'M GOING TO BE A TA FOR A C++ CLASSSSS
 
congrats, you get to torment the C++ newbs in real life instead of just on the internet
 
lol
So I'll be able to give input on the material!
Any suggestions?
I was thinking I could get "Hello world" and turn it into an exercise on operator overloading and "abstraction"
like, to get them to understand what std::cout is and what it does
so like "Create a struct and an operator<< to represent 'accumulation' into a register"
So like:
struct Register { int value; }; Register& operator<< (Register& register, int right) { register.value += right; return register; }
 
why is << supposed to represent "accumulation" into a register
 
To get them to understand how operator overloading works, as well as why the syntax for std::cout << "Hello world" << std::endl; looks the way it does
because it's really just operator<<(operator<<(std::cout, "Hello world"), std::endl);
Also, it gets them thinking about why they chose to use the operator<< as an abstraction for "sending" output to a direction
@milleniumbug What do you think?
 
9:38 PM
I think teaching them that overloaded operators can do anything by asking them to write an operator with an unclear meaning is silly, but vOv
 
@milleniumbug Well, it's meant for students coming from C. The purpose of the assignment is to hint at higher-level abstraction and interfaces
 
and I don't see how is that supposed to help
 
I guess you're right
What would you try?
The target audience is students from C, and we want to teach them how to break down problems, design, as well as objects as a powerful modeling tool for processes
 
9:52 PM
Don't you have a course syllabus? Otherwise, can't you start with simple objects if all your students come from C background?
 
10:33 PM
not yet
 
@VermillionAzure lol, go work in a lab with funding
 
11:36 PM
@Mikhail But I'm not going for research and I'm not a graduate student (yet)
 

« first day (2565 days earlier)      last day (2374 days later) »