« first day (3021 days earlier)      last day (1910 days later) » 

12:11 AM
> Emmanuel Macron plaide pour une levée progressive de toute forme d'anonymat en ligne [fr]
 
 
3 hours later…
3:35 AM
In order to see the whole picture, one often has to read news from multiple sources. If you do and from wide range of sources, you would know how biased each source is.
The saddest thing is not being ignorant, I know I am to certain extend, we all are. The saddest thing is not knowing you are ignorant and acting as if you know all the truth. People who do not know that they are ignorant often get used and abused.
 
 
1 hour later…
5:04 AM
@LucDanton which is weird because you probably have annomity in real life
 
@Mikhail I do have a name myself
 
 
2 hours later…
8:12 AM
> Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines. [...] Without buffering, each invocation of read() or readLine() could cause bytes to be read from the file, converted into characters, and then returned, which can be very inefficient.
in Java, 13 hours ago, by fredoverflow
try (Stream<String> lines = Files.lines(Paths.get(name), StandardCharsets.ISO_8859_1)) {
    lines.forEach(System.out::println);
} catch (IOException ex) {
    ex.printStackTrace();
}
 
8:28 AM
@fredoverflow That isn't the default behaviour? ;p
 
@Puppy Apparently, complicating things by nesting 3 different types is more Object-Oriented because Design Patterns or something ;)
 
I would have been happy with something like new TextReader(new FileInputStream(name), encoding)
 
new FileInputStream(name) is already an abbreviation for new FileInputStream(new File(name)), btw
 
sounds a little weird
would have expected that FileInputStream just takes a filepath (and optionally file sharing, access rights, etc) as the parameter
 
File is a filepath :)
> An abstract representation of file and directory pathnames.
 
8:34 AM
that.. is unexpected
 
@fredoverflow You become a slothman/slothwoman? That's what superhero comics usually tell you.
 
9:29 AM
@Mikhail that looks killer
 
10:06 AM
@Mysticial hopefully i actually build the damn NAS this year insted of leaving the TAB open for 12 months like i did with the 2017 stats
 
nwp
10:50 AM
I wish I could figure out how to break on sanitizer errors. This doesn't help.
Also having a proper IDE that can express "If this breakpoint is hit restart the program" as demonstrated here.
 
How do you even know it was hit if your program restarted?
 
nwp
I don't. It just keeps looping until something interesting happens.
It's for finding bugs that only happen sometimes and you are tired of manually restarting the program.
 
If you have lost all faith in humanity you could just launch a new process everytime a certain line is hit.
 
nwp
And kill the old process. That's what that is supposed to do.
I don't see how losing faith in humanity has anything to do with it.
Some systems are just chaotic and not as deterministic as you want them to be.
 
Instead you could almost certainly invoke the test multiple times.
 
nwp
10:58 AM
I can. But gdb+python can do it much faster.
I have the feeling that in development you get as far as your tools can carry you + one big-ish leap. Progress is not made by leaping farther but by improving the tools.
 
Well you can just call the test function multiple times from the same exet. If you're using a more complicatee test harness you could probably write a batch script.
 
nwp
Lol, assuming I have automated tests.
I start the program, click around and see which breakpoint is hit.
To be fair gdb+python can't do much about that either.
 
I've had similar problems automating tests for guis.
 
nwp
Unless you enable reverse debugging and just undo and redo until it crashes.
You know what would also be a great feature? Stepping through the program.
But I can't, because Qt message queue.
I don't want to compile Qt.
 
nwp
11:21 AM
Why are there no -dbg packages for Qt?
 
@fredoverflow damn
btw, ths came up in uni today. As a thought experiment, we were to ask ourselves what is "efficiency" of this algorithm (we didn't get to Big O yet). But in terms of big O, would this be considered as linear?
maybe worse than linear?
maybe better?
I'm really not sure
 
nwp
Looks like O(2^n) to me.
Which is about as terrible as it gets.
 
except it does log2(n) steps
so it's along the lines of O(2^(log2(n)), right?
which normally means O(n)
 
nwp
Oh, right, it doesn't do fib(n-1) + fib(n-2).
 
but is it actually O(n)? Maybe it's O(n^(3/2)) or something
 
nwp
 
it's not exactly 2^n and it's not exactly log2(n)
regardless of constants
sometimes it makes 3 calls, sometimes 2
 
12:28 PM
Chickpea = Hen x Peacock ... thanks internet, now I know ...
 
1:32 PM
I found a new specific benchmark to steal for a sorting algorithm /o/
 
2:07 PM
Is there any C/C++ Windows lib for retrieving info about SATA, USB drives? Not just WMI because sometimes it gives incorrect info while other apps show it fine

For now I am looking at CrystalDiskInfo source code but it requires MFC, and also may not provide some of the info I need, such as volume label/fs and some information about the port to which the device is connected (like Port_#0019.Hub_#0003 from SetupAPI iirc)
 
2:28 PM
@AlexP11223 WMI is the canonical way to do it AFAIK
 
it's the easiest one
but for example sometimes it doesn't show serial number or fails to identify a drive connected via adapter, while CrystalDiskInfo and other apps handle it correctly
 
@AlexP11223 without seeing your code I can't say or comment
 
code for what? it's not the issue with the code using WMI, it's the same in wmic etc.

There are other approaches for retrieving this info that apps like CrystalDiskInfo use, but it's lots of low-level code so I wonder if someone created a lib for that
 
@AlexP11223 so WMI command line caches information IIRC
WMI API does not
so I'm sorry but I just don't buy that
 
2:51 PM
Hi,
What is the meaning of this command. Actually what does that symbols < and >?

some.exe < somefile.txt > output.txt
 
< means the following argument is set as the stdin and > means that the file is set as the stdout
so in your example when some.exe reads from stdin it sees the contents of somefile.txt and anything it writes to stdout is put in output.txt
 
Thank you :)
 
3:10 PM
@Mgetz yeah I will see if there is any difference with this API but it seems like the issues are on some other levels, and device/driver-specific

For example about serial numbers, here is part of CrystalDiskInfo code https://gist.github.com/AlexP11223/daff264f3776fa1b9eb8e709a7bef9cf which uses WMI to get some part of the info it needs and in the bottom I see there are some workarounds to make sure that the serial is correct, e.g. it may use `SerialNumberReversed` retrieved from some other more low-level ATA-related API via DeviceIoControl, which seems to be different for different device
 
@AlexP11223 so it seems to be that the TL;DR is that devices implement their WMI providers horribad?
not surprised
 
 
2 hours later…
4:51 PM
@Borgleader Backblaze has done wonders to the HD industry.
 
@Mysticial calling BS on vendors helps
that said everybody ignores their warnings that their data doesn't apply to consumer
 
Seagate used to be complete shit. Literally half of mine died.
Backblaze exposed them.
And since, Seagate has gotten their shit together.
 
@Mysticial I actually knew someone that worked there, the issue was they just spun up the drives without fixing the firmware
so they took a firmware that was hard tuned for 5400RPM and then ran it at 7200RPM
 
And that killed the drives?
 
This issue apparently didn't affect the federal unit
 
4:57 PM
My Seagates all died from reallocated sectors.
 
@Mysticial Oh god yes, these are areospace level calculations. If you don't run the drives right or spin them right the heads will skip and destroy the platters or the heads.
People forget that the heads literally fly
 
ah
so head crashes
 
ramp rates and all sorts of things matter
 
@Mgetz at literally less than a hair's breadth away from the disk's surface
 
@ratchetfreak yeeep
@Mysticial technically it's more complicated than that, certain types of bad reads can mark a sector as permanently dead even though it might be recoverable etc. Turbulence and debris can cause issues. Again the federal unit, same hardware, different firmware, didn't have these issues.
 
5:07 PM
ah
 
Anyone have advice on QNAP vs Synology?
 
The impression I had was that a bad firmware shouldn't be an issue unless it caused some sort of physical or irreversible damage. So if the firmware was bad, it might miss the sector, and need to retry. Or otherwise have performance or stability problems. So unless it led to a head crash or something, I didn't think it could actually kill the drive.
 
@Mysticial So the firmware controls a ton of variables that affect the drive, everything from ramp spin to head speed. As well as the algorithm for deciding the sector is bad and marking it as such. When you literally cut half that team, and then increase platter speed bad things happen.
The federal team in comparison had well over 200 engineers and was completely isolated from the consumer team. There was no shared code. My understanding is they developed the 7200RPM firmware from scratch
 
5:42 PM
@Mgetz So they cut their R&D and paid for it.
 
@Mysticial it's slightly more complex, they shifted resources to a higher paying customer that insisted on exclusivity
and then tried to get to market parity without doing it right
I would say a more accurate would be that "The business tried to force a technical change without consulting engineering in an appropriate manner"
 
 
2 hours later…
8:11 PM
Although it should be noted that the designs of backblaze nodes is shit. The module I got was 80 drives and couldn't saturate a 1G (because it used shit tier software raid splitters).
 
8:35 PM
@Mikhail Would that affect HW failures?
 
 
 
3 hours later…
11:24 PM
In case anyone here is interested in helping, I've asked a question in the C++ Q&A channel.

https://chat.stackoverflow.com/rooms/116940/c-questions-and-answers
 

« first day (3021 days earlier)      last day (1910 days later) »