« first day (2279 days earlier)      last day (2662 days later) » 
00:00 - 19:0019:00 - 00:00

7:06 PM
I just had a thought...
 
@Ven J'adore recevoir des courriers pour « Monsieur & Madame [moi] ».
 
Let's say you have counties or states and you have a representatives body that has X1..Xn mandates for each of these states/counties. What if we gave each of the states/counties number of mandates based on rounded up logarithm of their population?
That would still give more mandates to bigger states/counties but they would not completely dwarf the smallest ones.
 
On the other hand, the current system means that if you're evil enough, you can make a huge plan to populate the smallest states to gain power.
 
@Morwenn If you are evil and motivated and persistent enough you can do anything. :)
Even gas few million of people.
I wish it was easily possible to get tables from Wikipedia into CSV or such.
 
Now that would be an interesting feature.
 
Ven
7:17 PM
@Morwenn i never guess it was an union - thought it was an intersection.
 
@Ven Now I'm not sure.
 
@wilx the just increases the discrepancies in voting power
Which in turn increase the chances that candidates will focus exclusively on a subset.
 
Ven
Tu découvres ton corps, comme en 40.
 
@R.MartinhoFernandes Sure.
@R.MartinhoFernandes Right. Well, it was just a thought.
 
@R.MartinhoFernandes What do you think of that guy, by the way?
 
7:35 PM
Assumption built-ins are cool :D
 
Ell
I think I'm going to have a night off school work
 
user1804599
lol top comment
 
@wilx Move to Russia! Have a strong president!
 
@Abyx ... I am not retarded.
 
Ell
7:49 PM
@rightfold have you tried mini-agda?
 
user1804599
nope
 
-6
Q: What is the best way to start getting into/good at codeing

Epicxz.kirbyI'm interested in coding and would like to get started. Can I get some help?

 
I hate it when people answer questions for windows with "just call this System call directly" as if that's an answer
 
@wilx that's good! we need smart and healthy people here
 
user1804599
Well it solves the problem.
 
user1804599
7:54 PM
However it is indeed annoying when the answer does not include additional information about why doing it that way.
 
user1804599
I wouldn't downvote it but I would provide a comment.
 
@Borgleader I think there is an FAQ or similar on SO that says how to become a master at python stackoverflow.com/questions/2573135/… . So its actually a duplicate!
 
@rightfold I did, they responded with a "well I said not to do it" as if that was really a warning since their warning wasn't even obvious
 
Blackballing is a rejection in a traditional form of secret ballot, where a white ball or ballot constitutes a vote in support and a black ball signifies opposition. This system is typically used where a club's rules provide that one or two objections, rather than an at-least-50% share of votes, are sufficient to defeat a proposition. Since the seventeenth century, these rules have commonly applied to elections to membership of many gentlemen's clubs and similar institutions such as Freemasonry and fraternities. A large supply of black and white balls is provided for voters. Each voter audibly...
TIL it's a word
 
@Abyx I can imagine that as you are haemorrhaging educated people to the West by tens of thousands every year.
 
8:00 PM
Is it just me, or is the synchronized keyword in the TM TS just gonna encourage really bad programming?
 
@Mysticial What is the synchronized keyword in the TM TS?
 
It runs a {} block under a global lock.
synchronized { // begin synchronized block
    std::cout << i << " -> ";
    ++i;       // each call to f() obtains a unique value of i
    std::cout << i << '\n';
    return i; // end synchronized block
}
 
@R.MartinhoFernandes: Mandates Logarithm Model
 
@Mysticial it does and it is, I consider that keyword horrendous in every language it exists in
 
Interestingly, the numbers look reasonable.
 
8:02 PM
@wilx only weak and useless people go
 
ok fine, std::cout is something you probably should take a global lock on. But the feature seems to easily abused.
 
@Mysticial except it's already thread safe
 
@Abyx Keep telling that to yourself.
 
@Mysticial the global lock is the bad programming.
 
@Mysticial old debug versions of MSVC had this
 
8:03 PM
@Abyx Does the mental gymnastics you have to do to maintain your conviction when you are confronted here hurt much?
 
@Mgetz It is, but it not on a "per line" scope. So two log lines will get interleaved.
 
@wilx sorry I've got a parsing error when I was reading that
 
I can see synchronized being a useful debugging tool. But not something that should be given to someone who doesn't know what they're doing. Though the same thing can be said about the majority of C++ features.
 
From experience, std::cout can be shockingly slow, it takes milliseconds to write characters - typically the performance is masked by a buffer, but if you repeatedly call it or require it to finish printing you're going to be sad. Which is why we can't have a lock on it.
 
yes all console I/O is slow af
 
8:06 PM
Well, "Northern Mariana Islands MP 53833 5" That does look like over-representation.
 
@Mikhail I agree. There's a publication where someone was comparing a C# implementation of computing various constants to a lot of digits. They noted that they were able to beat my program when the # of digits was less than 10000.
Mainly because of the overhead of all the printing (with colors) in my program.
 
@Mysticial Won't there be std::osyncstream for that specific purpose?
 
@Mysticial So, from personal experience std::cout is insanely slow, but writing to a file stream is as-expected. Maybe if you wrote to those fancy characters to a file you'd be fine...
 
@Morwenn The (chaining oriented) design of streams makes them particularly difficult to synchronize well.
 
@Mikhail I actually don't use cout in the production builds. I use WriteConsoleW.
Doesn't matter though. Any sort of printing is slow.
 
8:10 PM
737
Q: Transatlantic ping faster than sending a pixel to the screen?

Konrad RudolphJohn Carmack tweeted, I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that? And if this weren’t John Carmack, I’d file it under “the interwebs being silly”. But this is John Carmack. How can this be true? To avoid discussions about what exact...

obligatory John Carmack
I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that?
 
@Mikhail there is a sync with stdio flag you should turn off
 
@Mikhail Heh, even answering the question. :D
 
@Mgetz That helps but the times are still on the order of milliseconds to write single characters. There is a ~20x difference between the speed of std::cout and writing to the same data to a piece of spinning metal.
 
@Mikhail that could also be the terminal emulator
 
Well, I linked against the console subsystem, so not much control as to the terminal emulator on Windows... Although my micro-benchmarks showed similar performance on the KDE plasma terminal. The per character performance seems to be exactly the NTAPI's thread response time, which is 0.5ms. My only thought is that its calling _sleep() after each character :-)
 
Ell
8:15 PM
xD
 
@Mikhail dunno, I'd almost be willing to bet it's a window message
 
Interesting idea, you might be right
 
not really, any GUI program on windows has a message pump
it's more than likely that the console host just pumps messages to the terminal emulator
 
Well, that would hint that the terminal runs in a separate process - which feels like bad design given that on windows you're literally linking against some terminal library.
#MakeTerminalGreatAgain
I got this brilliant idea, lets write a terminal emulator that renders using OpenGL and is written in some shiny language like Rust. But no text selection.
 
8:41 PM
@Mikhail Have you never noticed conhost.exe processes? :)
 
9:02 PM
Fuck, do I need to roll my own terminal to avoid IPC?
 
Ell
@Mikhail just write to /dev/tty0 :D
 
@Mikhail Nothing stops you from painting your own terminal.
 
@Mikhail cmd.exe
 
@Mikhail TBH, why do you need that fast terminal? If you need that, you are probably printing too much crap on it.
 
spoiler: nobody will read this anyway :D
 
9:09 PM
The stuff you print to the console is something that a human should be able to read. If you just want an event logger that captures everything, make that a separate thing and does its own local buffering and flushing to disk.
 
9:19 PM
Here is a use case. I need to acquire 256 images, each one takes 2ms to capture and process. The log gives useful information, such as if there were any acquisition failures (which is not a critical error), it would be nice if I could log as I was acquiring. Instead I need to log on a dedicated separate thread...
I'm not writing that much, its just that writing slows down the acquisition process
Other motivation for faster terminals included noisy build processes.
 
@Mikhail Well, a decent logging library does this for you.
 
I work in an intellectual vacuum. I'm the only software person on my floor.
 
@Mikhail Lockless queues. :)
@Mikhail Well then you're fucked.
 
Well, I did roll my own thing, but it makes me sad that in 2017, 60 years after the first terminals, you need to roll your own to get reasonable performance.
 
@Mikhail You're fucked because you expect terminals to be performant.
9
And if you're trying to pipe the terminal output to a file, then you're doubly fucked.
 
9:27 PM
They could be, if they weren't written like shit
 
Stop trying to use a hatchback van to win a dragster race. Cause you're fucked before you even start.
 
or we could have terminals that aren't bullshit
 
That doesn't change the fact that you're still fucked.
 
@Mysticial I'm sorry, I can't hear you over the sound of my two E5-4559v3 rubbing against my chest hair.
 
If you have processors in your chest hair, then I really don't know what to say other than you're fucked.
8
 
9:39 PM
eventually I'll get the money to install them
 
@Mysticial no context stars best stars
 
Ell
I mean
I think there exists a fast terminal
but idk exactly if drawing the terminal is the bottleneck is it?
 
The unverified suspicion is that each character is passed individually via IPC
 
Ell
Surely not :V
I don't know how windows works though
 
Micro-benchmark time for each character is almost the same as the IPC passing time. Although for a typical use case there seems to be some buffering that overlaps this operation.
 
Ell
heh
egh
I don't like the ::
I think : is better
 
@Mikhail you seem to think writing a terminal emulator is easy
particularly one that will run on ALL machine configurations that windows supports
 
Ell
but that's syntax :3
 
@Mikhail you can listen to the window messages if you want to
 
@Mgetz That's why he's fucked.
 
10:03 PM
so windows actually dumps all of the string out at once except the \n
 
What does that mean?
 
It means that you're fucked. :)
 
apache-kafka aims to provide a unified, high-throughput, low-latency platform for handling real-time data feeds.
what a classy name
 
Ell
10:24 PM
I'm annoyed
there was an error in my exam 2 days ago
well, 2 errors but 1 really flipping stupid one
 
school if for loosers
 
Ell
they gave us a "max-heap"
aka not actually a max heap -.-
 
10:36 PM
@Ell What was the error?
 
Ell
@CaptainGiraffe one error was that the max heap they gave us wasn't a max heap
the other was that they didn't give a sink node in the maxflow question
 
That shouldn't be a problem
ok
What was the question?
 
Ell
the first was "what are the indices changed by performing extract-max?" and the second was "use the ford fulkerson algorithm to find the maximum flow for the following flow network:"
and there was a s source node
but no t sink node >.<
 
I've written dozens of exam questions with defects. I always premier answers that acknowledge the problems and try to work around them. I'm quite sure your Prof will do something similar.
Also if a question is sufficiently defect, I just subtract it from the total but let the awarded points remain.
 
Ell
@CaptainGiraffe yeah, I think it will be okay really
but saying "This is a maxheap: <insert not-a-maxheap here>" is a really elementary error
it was like
"This is an array representation of a maxheap: [20,9,8,13,4]"
 
10:47 PM
@Ell lol
I always take tests myself before I hand them out - same with exercises. Otherwise I feel like a dick.
I get that it doesn't scale though.
I always find one or two fuckups in every test I write.
 
Ell
yeah, I mean, it is understandable
 
My my, LiveEdu is turning into shit.
 
I've had an exam question state: in the ordered set {1.0, 0.0, 1.0}.
 
Ell
@CaptainGiraffe ordered by type perhaps? :P
{double, double, double}
 
=) I was missing a minus sign
 
Ell
10:49 PM
ah yes
 
I profusely rewarded any clever answer to my mistake.
 
`assertion failed: pop_scope: unexpected curr_object_lifetime for function or block scope`
 
lol, I think someone took a code generator, found a shit-ton of bugs in ICC17 and reported them all at once to their forum.
 
hahaha
 
Literally l like half the bug reports in the past month are from one guy.
 
10:56 PM
It used to be possible to write a research paper where you simply fuzzed a compiler or API for errors
Then you'd be like, my fuzzed found all these bugs
Then the OEM would tell you "we don't' have time to fix them"
 
That does seem to the case right now. Only about 1/4 of the reports have a response from Intel.
Most are optimization bugs.
 
All my bugs that crash NVCC were acknowledged and still haven't been fixed...
 
ICC has acknowledged all the bugs I've personally filed. They've fixed all but one of them.
MSVC has fixed every bug I've ever filed.
Granted, I only report miscompilation bugs.
 
Yeah, I've been really impressed with the MSVC's response time to compiler bugs
 
They don't give a shit about syntax or language issues.
 
11:03 PM
or their IDE crashing
 
yeah
And any sort of ICE.
 
My understanding is that the IDE development is outsourced to MS India
 
Or rather incorrect compilation has much more serious consequences then a couple Linux guys bitching about C++11 support and accepting code without template and this-> inserted everywhere.
 
When I did an internship in HPC, many years ago, I remember my mentor complaining about miscompilations messing up his fluid dynamics code.
 
Is it really a miscompilation? Or just an unintended effect of fast math optimizations?
 
11:11 PM
Well, they fixed it. This was around 2012, and I think it was on OpenFoam.
 
oh
I have a number of instances where upgrading the compiler broke things.
1. VS2013 had a new optimizer pass that somehow messed with the register allocation in a way that caused some data corruption.
2. ICC15 or 16 had a similar register allocation problem that only showed up in block of about 300 AVX intrinsics and lots of register spills.
3. ICC14? IIRC, started doing fast math optimizations on intrinsics. That broke a lot of my FP-abusive code.
 
What I find shocking is the lack of testing done by vendors. One of the national labs has this test where they check if the compiler version breaks one of ~15 popular HPC codes. I have no clue why MS can't get their shit straight and setup such a test suite.
 
I don't exactly consider that last one a real compiler bug though.
@Mikhail Every version of VS from 2010 - 2013 broke something in my pi program.
ICC has been much better.
 
@Mikhail I suppose it’s sort of the point of pre-releases, but otoh there’s not much that usually gets fixed in-between the pre-release and the actual thing is there?
 
A similar explanation is that there is no business case for compiling code correctly.
Remember the static analyzer built into MSVC? Shit would crap out on Boost. How can you release something that breaks on Boost!
 
11:19 PM
I really regretted not following GCC head more closely during the process leading up to GCC6, a big regression was introduced right at the end of the development cycle that could only be fixed for 6.2
 
What did they do?
 
@Mysticial something like inheriting or automatically generated constructors not working right, so you couldn’t use move-only types with things such as optional and so on
 
oh, that's big
But still better than a miscompilation.
 
4
Q: Move only class parameter in inherited constructor

uh oh somebody needs a pupperThe following code doesn't compile GCC 6.1, but works in Clang 3.8.0 and Visual Studio 2015: #include <memory> class base { public: base(std::unique_ptr<int>) {} }; class derived : public base { public: using base::base; }; int main() { derived df(std::make_unique<int>()); } Wit...

 
11:48 PM
Anybody got a funky corner case where, std::is_signed<T>::value and std::numeric_limits<T>::is_signed disagree ?
 
the latter can be specialized for custom types I think
the former can't
 
Somehow I feel the C++ community should deprecate duplicate functionality...
 
@Mikhail for starters the former is false for non-arithmetic types while the latter is not sensible (i.e. no corresponding std::numeric_limits<NonArith> specialization exists)
oh that was premature
I’m not 100% sure about the meaning of std::numeric_limits<T>::is_signed but I’m going to venture that they always agree
 
00:00 - 19:0019:00 - 00:00

« first day (2279 days earlier)      last day (2662 days later) »