« first day (3047 days earlier)      last day (2114 days later) » 

12:02 AM
propagate to parent as they die until it's the init process which just (should) discards them all
On a similar note, if you have an error like

The computer has rebooted from a bugcheck. The bugcheck was: 0x0000003b (0x00000000c0000005, 0xfffff80168e8c930, 0xffff99026f136d20, 0x0000000000000000). A dump was saved in: C:\WINDOWS\MEMORY.DMP. Report Id: 5614beae-f357-42f8-9957-4eab1469de14.

Is there some tool to inspect the dump file or decode the error codes?
Trying to identify a faulting hardware device
12:32 AM
Hi All,
I took a look at the c++ definitive book guide and didn't see my goto reference site:
http://www.cplusplus.com/

Is there a reason why it's not included or would it be OK to add it in, probably in the reference section
 
2 hours later…
2:12 AM
I have a very simple preprocessor question if anyone is willing to help
https://chat.stackoverflow.com/rooms/116940/c-questions-and-answers
 
2 hours later…
3:43 AM
@kiltannen That site has a very bad reputation, mostly due to having a history of sporting outdated or incorrect information.
It's not as bad as it used to be, but still.
For reference, most people here would largely prefer cppreference.
 
2 hours later…
user7659542
5:48 AM
@Puppy exactly what I meant, you imo should (for the sake of example) poll the other device with a separate process not a thread. multiprocessing is more suited than multithreading for safety critical stuff
user7659542
having separate processes offers a better isolation than multithreading against eg segfaults
user7659542
I don't see in which case multithreading would be better than multiprocessing in safety critical stuff. The only non-negligible inconvenient I see is that you need to be careful with: race conditions and concistency
user7659542
and multiprocessing may be less performant because you have the overhead of performing system calls every time you want to perform IPC. Whereas with multithreading you have a shared heap.
That you wrote it boring, bordering on the point of tautology
Yes, processes are more isolated than threads
user7659542
@Mikhail I don't get people who do multithreading on safety critical stuff
6:03 AM
With process isolation you have to create your own IPC like language
Not to mention that actual safety critical stuff doesn't really use dynamic memory
user7659542
@Mikhail I d rather do that than doing multithreading
Well, then you have to ensure your IPC like system is correct
user7659542
@Mikhail some companies do, they tend to dynamically allocate one big chunk of memory when initializing everything.
Indeed. You'd also notice that in some ways this defeats memory protection
 
1 hour later…
7:35 AM
@TelKitty You're gonna love Kotlin, the semicolons are optional!
 
2 hours later…
9:15 AM
@JennaSloan You know I could just not have force people to login :v
@thecoshman Where's the fun in that?
Besides, they need to be logged in so they can send you a message.
There's a good number not here any more
Gather round kids, Gramdpa is going to tell you a story
Long ago, back when SO chat was an exciting new place, this very room you read in now used to be very popular. Never before had such a gathering been seen
The populous spanned the blob, with a near endless shifting rotation of great people
And then a new C++ update was released and everybody left.
Don't interrupt!
So vast were the numbers, an equally global group of room owners was required
The only sad part about such a vast gathering of people relaxing was the pull it had on scrubs trying to get attention on their shitty questions they had literally just posted without even trying to find an answer themselves
9:31 AM
int 3
There was much anger
But despite lacking the power, people found a way to cope with such things
However, the previous snowflakes got upset, and invoked the power of the blue smurfs
Oh noes, my software interrupt didn't work!
There was a war, that none would call civil
grabs popcorn
Things were hostile for many a year, with several times the great room being closed, but the people were strong, and resilient, and kept breaking open the doors
However, despite the determination of the people, the smurfs were legion, and endlessly ground away at the spirit of the free people
With time, new homes were explored, but the people wanted to stay united and so these strange lands were never made a true home
There came a time though, when the smurfs took great anger, and a critical mass of "fuck this shit" was reached. A large group explored a new land,and found it peaceful and free
They stayed, and found that their desire to return faded over time
Many a great mind now dwells in this distant land
A few travel to and fro, where their hearts truly lie, one can only guess, or you know, just ask them.
And that is the tale of how this place fell from it's greatness, into the dust-ball you see before you now.
I tell you younguns, do not feel complacent about the freedoms you think you have
9:39 AM
Oy, would you story tell faster?
Phft, and where's the fun in that?
That way people might actually read it
tl;dr people got pissed of at the moderation, a vast number of the long time regulars are now found in discord
Discord is for video gamers though
o_0
it's a chat server
9:42 AM
made specifically for gamers
Discord: for gamers by gamers
Who gives a shit what they designed it for?
They made a thing, and it's not entirely shite
in any case, since posting questions here without googling is considered bad...
anyone can answer my previous question? :)
yesterday, by Wietlol
so, how do I continue from here?
> yesterday
wot?
@Wietlol Try using AutoHotKey?
i prefer not tho
9:53 AM
Why would you want to move a window programmatically anyways?
the application is built in JVM, I use the User32 lib to call windows related functions
im not sure how I would fit AutoHotkey in it
I want to move windows programmatically because I want to
makes sense?
@Wietlol it's open source
in basic terms, I want a computer with 2 screens
one screen mainly for display to a large group of people
the other as a manager of what gets shown on the other screen
one example of an operation is to show a specific application on the other screen
such as chrome
which has to be moved to that screen
programmatically
most of the stuff is included inside the program (showing images, movies, etc)
but I prefer to use a good modern browser to show web pages
Like Firefox
firefox or chrome would both do fine
i prefer chrome tho
because I know how it works
:)
9:59 AM
Well you won't learn very much if you know how it works
@Wietlol so basically like a presentation?
ye
@JennaSloan I dont intent to learn a lot
I intent to finish the application :)
Can't you move the window by programmatically manipulating the cursor?
that would be... the last thing I'd try
but I could at least try
keep in mind, I can move pretty much every application
except those with a more complex user interface
browsers for example
discord also appears to have several nested "windows"
for discord, it moves a window that is unrelated to anything directly visible
for chrome, it moves the internal window (the website that is shown)
Discord actually uses some chrome stuff
10:09 AM
it would be interesting except that it is useless because the mouse listeners wont provide the correct location any more
so, then it is broken
I think Firefox also uses some chrome stuff
I heard Edge also uses some chrome stuff
maybe I can move interwebz explorerz
Eventually, every program would just be a permutation of 0s and 1s.
10:54 AM
If you think about it, it's pretty amazing. No matter how convoluted your program is, you can always convert it to the permutation of 2 constants.
 
2 hours later…
12:59 PM
@fredoverflow Optional? You mean redundant? :p
optional
@TelKitty no... semi-colons are redundant in most languages, Kotlin makes them optional
If you can use it, or not use it and it does not make any difference, then it's redundant ... I am just being pedantic :x
it does make a difference
only in JS it doesnt make a difference
in JS, end of lines are considered statement separators
instead, the compiler (or interpreter) should only use them as fallback option
if not, then you get annoying stuff like separators where you dont want them, but you want newlines
even kotlin suffers from this
but much less than other languages
@TelKitty no, you are being wrong. The semi-colons are mostly optional, if you chose to use them, when you don't need to, then they are redundant (because they are still optional)
There are times though the the semi-colon is not optional, such as when you wish to put multiple expressions on the same line
1:09 PM
things are redundant if their meaning is already present
in JS, end-of-line semicolons are definitely redundant
but they are also optional
because you dont have to place them
Ok, I claim my ignorance, I know nothing about kotlin
again, it's the same point, it's because they are optional that if you use them, they are redundant
they are optionally redundant
wait... that made no sense
what's is the time complexity of using a minheap to sort an array? I want to say O(n) but I feel that is wrong?
1:24 PM
i think O(n log2 n)
but the insertion operation has a worst-case time complexity of O(log n) but an average-case complexity of O(1) and a peak of O(1)
so shouldn't it be faster than O(n log n)
1:39 PM
if most of the most operations are on the order of O(1), then wouldn't it be the case that the limit time should only be limited by the number of elements that need to be touched. what operation in the heap would cost the extra time
> Time Complexity: Time complexity of heapify is O(nLogn). Time complexity of createAndBuildHeap() is O(n) and overall time complexity of Heap Sort is O(nLogn).
1:58 PM
@Wietlol that showed me what I was looking for thx :)
ofcourse, instead of min/max heap sort, you can also use bogosort
(complexity will not be O(n log2 n) however)
well, I'm mostly interested in heaps, since it represents the average case for retrieval and insertion in most self-balancing graph structures. Also, a sorted array is like a heap. It's also easier to tap into since most languages use them in their objects to keep track of element location.
location hierarchy*
2:20 PM
Also, heaps are the single most awesome data structures. They can represent data in several dimensions. They are great for problem-solving and what not.
what do you mean with heaps?
In computer science, a heap is a specialized tree-based data structure which is essentially an almost complete tree that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or less than or equal to (in a min heap) the key of C. The node at the "top" of the heap (with no parents) is called the root node. The heap is one maximally efficient implementation of an abstract data type called a priority queue, and in fact priority queues are often referred to as "heaps", regardless of how they may be implemented. In a...
@Wietlol ^ Presumably.
Hierarchical data structures
I found heaps (std::priority_queue) to be slower than binary trees (std::map/std::multimap) when implementing a system for storing delayed tasks.
The heap requires a lot of swaps each time an element is inserted/removed. This is not the case with binary tree.
i like BR trees
2:29 PM
well aren't binary trees a subset of heaps
a BR tree is a sorted tree
a heap tree appears not to be
they are just heap that follows a particular order
@Rick I think you mean "tree" rather than "heap".
they are both trees, but a BR tree is not a heap and a heap is not a BR tree
Trees are hierarchical data structures. Heap is a special kind of tree.
2:33 PM
so what's the difference between a binary tree and a binary heap?
a tree is just a tree
a heap is a tree which has the "highest value" node at the top
(or the lowest value, but that just means you used a reversed comparator)
also, a BR tree is always binary, a heap tree doesnt appear to be
(at least, I never heard of an n-ary BR tree)
I feel heap is a more general term and a binary tree is a more specific subset of a particular type of heap.
> In computer science, a heap is a specialized tree-based data structure
> that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to the key of C.
3:02 PM
there are node-based heaps that avoid the multitude of swaps needed in the array based heap, but it's node based
@ratchetfreak isn't that the difference between using contiguous and non-contiguous memory allocation
 
2 hours later…
4:47 PM
@sehe I'd be willing to take the seat off your hands, but I'm not sure I'm hear often enough either really... and I don't think this ghost town really needs it
5:34 PM
@thecoshman I was willing to yield it to you, but the orthography committee rejected the application.
@Wietlol tree-based. Based on the concepts, not "implemented as a tree"
@Rick not sure that's "the" difference, but yes, if you MUST have contiguous allocations, then the result is a heap, not a tree.
@sehe wouldn't it still be a tree irrespective of the memory structure used to organize the data, at a higher conceptual level?
Yes. That's the point.
But we usually call implementations a tree if the datastructure models one more directly
So, basically, when it's node-based.
I figure everything really just a graph. when we use contiguous memory we are adding another layer, where we impose onto the data a structure (that being index's). Using non-contiguous memory seems truer to form.
since the relationships will form an edge between nodes.
but maybe I'm taking this too far :)
5:54 PM
I don't know what you are trying to say.
"True to form" - what form.
Sounds like an LSD trip.
And yes, the realization that everything is a datastructure is true, but relatively unhelpful
Data structures imbued with love.
@Rick I'd say when we are using contiguous memory that's just an implementation detail. The only real difference made is a different complexity trade-off (resource/perf)
Anyway. According to Wikipedia "binary heap" is what we refer to as heap.
5:56 PM
Yeah. Unless you say "fibonacci heap" or some other fancy heap
So there's this guy who has spent the last month and a half systematically trying to break my program in every way possible. He's found like 20 legitimate bugs so far. But half of them are really frivolous things.
He just reported that log(log(1)) returns a large negative number that depends on the precision instead of a log(0) error.
Trivia: Why does that happen?
@Mysticial ycruncher? or something internal?
@Mgetz Yeah, y-cruncher.
@Mysticial Some kind of FP anomaly?
@StackedCrooked Can you be more specific than that?
6:01 PM
Nope :)
@Mysticial I'm betting it's something weird with IEEE 754
@Mysticial my only guess is that log(1) doesn't actually return 0
@Mgetz No IEEE here since it's all arbitrary precision.
@sehe ding ding ding!!! That's correct!
which library? gmp/mpfr?
My own thing.
6:03 PM
Ah. Found the culprit :) (LOLZING)
@Mysticial ah didn't realize that
Perhaps an artifact of using fft-aided computations. But it should be okay to check for the x==1 special case
Afaik @Mysticial has his own BigDecimal implementation.
It returns a number that's really close to zero. If the precision is 50 million digits, it returns something on the order of 10^-5000100 instead of zero. Thus the subsequent log returns a large negative number instead of a log(0) error.
@Mysticial Does it actually reliably return the relative epsilon?
6:04 PM
@Mysticial reminds me of the crazy stuff denormals do
That's normal for denormals
hmm I wonder if you could do a creative denial of service using denormals
@sehe It's guaranteed to return less than the specified epsilon. But it doesn't guarantee that it returns the closest number that can be represented.
Oh, it takes an epsilon :) The question said log(log(1)), hiding that
@Mysticial Cool stuff. I would argue that it's not a real bug then. (Unless he ~asserts~ demonstrates that the call to log(1) is using inadequate epsilon in context).
@sehe The program only guarantees that each individual operation returns an error less than epsilon relative to the input. But it doesn't make that guarantee for the entire input. Thus it's possible to exploit numerical instability to cause larger-than-epsilon differences.
So the program is behaving as expected. But fundamentally, it cannot overcome the usual rules of numerical instability.
6:09 PM
That's potentially a $$$ waster if it happens in a record attempt
@sehe Yeah. So it's specifically documented that the program isn't immune to numerical instability. So it's kinda up to the user to know what they're doing and test their stuff at smaller sizes before going full scale.
@Mgetz My guess: easily once you go looking. You might even crash a few rockets.
@Mysticial How does (s)he do that? IIRC y-cruncher only had like, 1-2 inputs and that was like how many threads and how much ram
@sehe Checking the x=1 special case isn't necessarily cheap. It can take a O(N) search to tell the difference between 1.00000000001 and 1.00000000000.
Apparently you (used to be/are) able to hang the Java compiler using just e.g.:
6:13 PM
woops misping
class compilehang {
public static void main(String[] args) {
  double d = 2.2250738585072012e-308;
  System.out.println("Value: " + d);
 }
}
@sehe yeah, just curious if you could do entry into things like a photo system to make it a RDOS
@Mysticial got it. Epsilons were the choice, so that's a valid choice. It's FP after all
not sure if I want to test that
@Mgetz Should be able to... Maybe if we put an artifical low visibility planet around a nice solar system, we can crash Hubble (oh wait, did they retire it yet)
6:16 PM
@sehe you'd have to set up a photo to produce denormals during things like downsampling
@Mgetz I'm sure I don't wanna. It's much more fun going the other way. youtube.com/watch?v=FKXOucXB4a8
@Borgleader I added a formula evaluation feature in the latest version. And then there's a shit-ton of UI bugs.
@Mgetz I was joking. It's probably easier to craft a small planet :)
(I know that's ridiculous)
@Mysticial Have you used AFL on ycruncher yet?
One of the (frivolous) bugs he filed was that when you run a binary without the necessary ISA, it crashes on all threads at once - leading to multiple overlapping error messages.
@Mgetz AFL?
6:17 PM
American Fuzzy Lop
A fuzzer.
A good one.
He also filed one where the program wasn't properly handling a specific sequence of invalid UTF-8. So even there's a lot more ways to break the program than it appears.
@Mgetz interesting
@Mysticial Honestly it sounds like they are fuzzing it, I'd suggest doing your own fuzzing through. With all the sanitizers enabled
Alternatively you could accept the program will crash when given bogus input, and instead focus on performance.
@Mikhail I do try to keep the program from actually seg-faulting. But he does file on the quality of the error messages. And he also files bugs on every single system error that the program returns which y-cruncher doesn't recognize and forwards back to the user as an error code.
But probably like 1/3 of the bugs he has files (both legit and frivolous), are related to low-memory errors. When the system is out of memory, random WinAPI calls start throwing errors or outright crashing. And these are propagating through the program (which I don't always catch with a nearly formatted error message).
6:28 PM
So certain security critical environments dont let you run apps that segfault. This is virtually impossible to enforce but is the official policy . We can only hope that the guy is from some nsa black ops site.
And then there are cases where there's no memory to even display the error message. And I don't particularly care enough to implement the whole safety block strategy where you allocate a chunk of memory upfront and free it on the first OOM exception to allow enough memory to at least display the fucking error message.
@sehe huh?
Also you said gui hugs but isn't yours command line :-)
@Mikhail I said "UI", not "GUI".
There are multiple places in the program where if you enter something invalid, it prints an error and returns to the previous window as if nothing had happened. But he found one case where the program would terminate after the error message instead of returning to the previous menu. He filed that.
Sounds like you have a user with way too much free time :P
6:39 PM
A ton of the UI bugs that he files are related to warning messages that were not possible to hit prior to the custom compute feature. Basically whenever the program detects a very unusual situation that may cause problems or bad performance, it prints out a warning. These warnings were mostly for debugging and could not be hit with the built-in constants. But after I added the custom formulas, it became possible to legitimately hit them. Since I never took out those warnings, he filed on them.
And he would also file when the same warning is printed out multiple times. (asking me to de-dupe them)
I had to turn that one down because they were coming from different parts of the program. And no I wasn't going to add some sort of de-duping filter.
@Borgleader Definitely. Some of the bugs that he filed are probably hard to automate. Such as the log(log(1)) example. The program runs through cleanly with no errors, but the output isn't what he expected.
He has yet to find any "P0" or "P1" bugs. Those are the kind that can cause a world record attempt of a built-in constant to finish with the wrong digits.
7:16 PM
@Mysticial This would have to be found via fuzzer
 
1 hour later…
user3956566
8:35 PM
@TelKitty you want to go to the horses today? Should we drive up together?
10:15 PM
An orthography is a set of conventions for writing a language. It includes norms of spelling, hyphenation, capitalization, word breaks, emphasis, and punctuation. Most significant languages in the modern era are written down, and for most such languages a standard orthography has been developed, often based on a standard variety of the language, and thus exhibiting less dialect variation than the spoken language. Sometimes there may be variation in a language's orthography, as between American and British spelling in the case of English orthography. In some languages orthography is regulated by...
10:27 PM
@YvetteColomb I thought we pencilled in Thursday afternoon/evening? :p I have a few things I need to take care of today, doubt that I will have time to visit the horses.
user3956566
@TelKitty oh darn, I wasn't sure. Yeh Thurs is fine. I can't go until I've let some tradesmen in and they've finished their work. due at 1pm, but when Sophia gets home I can go. Not sure if she has a short day or how long they'll be
10:43 PM
@sehe from who?
@YvetteColomb Yeah, I am thinking more along the lines of 4pm - 5pm on Thursday, depending on your availability. Not very healthy spending too much time in the midday Australian sun.
user3956566
@TelKitty yep agree. That's fine. I might meet you up there, I'll get up there earlier and do some stuff.
Cool :)
user3956566
yep send me a text when you're leaving. If I'm driving or in the paddocks I may not reply straight away.
That's fine, I will aim for 4:30pm.
user3956566
10:54 PM
coolies, see you then.
Cya.
11:19 PM
Gosh, trying to organize an event involving 3 sides is stressful, that's not including the attendees.
11:55 PM
@StackedCrooked I don't code under the influence. :P
Does no one go to burning man anymore

« first day (3047 days earlier)      last day (2114 days later) »