« first day (3551 days earlier)      last day (1380 days later) » 

1:46 AM
0
Q: Characters and Access level of inherated constructor

Dev-ilFrom a book I am referring, I found something like: Unlike using declarations for ordinary members, a constructor using declaration does not change the access level of the inherited constructor(s). For example, regardless of where the using declaration appears, a private constructor in the base ...

 
user8305079
2:00 AM
I am trying to practice binary search using 'invariants'; do any of you know of any good resources? Alternately, given a binary search implementation, could I reverse engineer and find the invariant being used?
 
user8305079
Note that while there are innumerable resources that implement binary search questions, I am particularly looking for resources wherein they reason about the implementation using 'invariants' (not just give the implementation).
 
5:00 AM
@traducerad I think he's saying you should get three points in front of the reader as quickly as possible: 1) who's the audience, 2) what's the problem, and 3) how do you solve the problem. Those statements should be made as simply as possible, with the least explanation necessary to make them reasonably credible. Deeper explanations should be saved for the body of the paper, not the introduction.
@F.Müller My immediate advice is to not worry much about making it particularly efficient. Especially the first time, it's better to write something and get it working than to get caught up in trying to make it even close to perfect. It's more effective to write something crappy the first time, then improve, than to try to write something good the first time (especially since it'll be crappy anyway, unless you're god's gift to compiler writing).
 
 
2 hours later…
6:57 AM
@F.Müller craftinginterpreters.com is an excellent resource that covers most of the basics. If I were you, I would start there.
There are lexer generators and parser generators, but they don't really help that much; most major lexers and parsers are written by hand.
 
 
2 hours later…
8:57 AM
@TooFatManNoNeck Do you think that baby octopus sized super intelligent alien will visit earth too?
Every time I see a new name in the lounge who also frequent the C# room, I am getting a bit of suspicious.
 
9:26 AM
@TelKitty Because C#room was designed from the drawback of C++ room in mind.
 
10:09 AM
I am getting more suspicious ...
 
@traducerad I feel like I do a pretty good job at explaining my work as evidenced by consistent praise from reviewers at high impact journals.
@traducerad There are a lot of other minor failures in the Linux kernel besides the scheduler being fucked. One example from personal experience bench-marking Linux vs Windows in 2012ish on in FMA heavy code was Linux's tendency to have poor granularity for saving register states. As you know when a floating point instruction is encountered the process hits a trap that causes the floating point registers to be saved across context switches.
Now, if memory serves me correctly, the problem with Linux is that the granularity for saving this guys across context switches was suboptimal, so that the moment your code trips an SSE instruction, your saving AVX512 on context switches, even if the code is old.
 
11:01 AM
@traducerad Yes but it required a copy, and there is no standard design at all. NT has had fairly standard drivers for ages and doesn't requires copies because AFAIK no OEM driver EVER handles an interrupt directly.
 
 
2 hours later…
12:55 PM
@Mikhail huh, interesting I always assumed that all registers are saved, but it makes sense that given the sheer size of the register file you'll want to save some bandwidth
but doesn't keeping other processes' floating point in registers expose the CPU to meltdown-like attacks?
 
he didn't say "don't zero them"
just "don't save them"
 
ah sure
 
1:13 PM
@ratchetfreak AFAIK windows does the same as linux. The first SSE instruction can be a doozy
 
@fredoverflow, @JerryCoffin, @Mikhail
Thanks for your help. This is very helpful. :)
 
user7659542
So Linux managed to create a context safe print function?
 
user7659542
1:28 PM
printk() feeds kernel messages to the console, dmesg, and the syslog daemon. It is useful for debugging and reporting errors, and can be used inside interrupt context,...
 
@traducerad it doesn't, but it doesn't encourage it either because until recently the kernel used directly mapped memory. This means that mapping directly without windowing gave access directly to hardware from userland. For obvious reasons that's less than ideal.
@traducerad well... we'll see, this is the eighth attempt I think? It's mostly right as best people can tell
The issue is that printk from high IRQLs can still cause major issues
 
 
5 hours later…
6:13 PM
@Mysticial so GN is reporting that LGA1200 probably won't get PCI-e 4.0 after all, that it will go to LGA1700. This is of course unless intel does something weird and actually keeps socket compatibility.
 
 
1 hour later…
7:29 PM
Fun thing here is that the PCI-e 4.0 spec is almost a decade old
 
yes but implementing it takes time
like... five years
 
 
1 hour later…
8:36 PM
Can anyone help me with this? https://stackoverflow.com/questions/62746706/how-to-enable-pch-in-clion-with-cmake

Maybe I am just to stupid to understand how it works. :S
 
user7659542
@Mgetz like which ones? You re just writing to a serial port. So if it was not context safe you ll have mixed data (ie from multiple contexts)
 
user7659542
Also AFAIK on many microcontrollers HW buffers (so I suppose CPUs too) of containing data which is to be sent on a serial port are circular (I think), so worst case you ll overwrite your own data(
 
user7659542
@Mgetz well yes, as expected the challenge is being able to not have your output mixed or lose data
 
user7659542
as you are calling printk from everywhere (simultanuously or not)
 
user7659542
8:46 PM
I like how straight to the point Linus is
 
user7659542
I d love to work with such a guy. Typically people who really care about software, are good at it and have a very direct communication style are people from who one can learn a lot
 
@traducerad so that becomes a major issue if you call it in high IRQLs as you end up potentially deadlocking the kernel.
 
user7659542
We ve got a senior engineer working at our company who is quite competent, but he is a slow thinker, does not care a lot and lacks some communication skills unfortunately
 
user7659542
he also does not always tell what is on his mind so there is not much to learn from him
 
user7659542
yet when you carefully read code he is silently pushing on the server you can notice some interesting things here and there
 
user7659542
8:50 PM
@Mgetz maybe a solution would be to disable interrupts when you are working on the buffer containing the data (trying to protect the critical code section)? But IDK how much of an impact that would have on the overall system...
 
user7659542
or stack the IRQ requests, not disable them
 
user7659542
that way you handle them x useconds or ms later, ie once you are passed that critical code section
 
user7659542
this is for IRQs but then you may end up having the same issue when switching from one task/thread to another
 
@traducerad so in a high IRQL that is already the case except for an NMI. The issue is you need to get out of that disabled mode ASAP
 
user7659542
indeed asap
 
8:52 PM
otherwise it can cause perceptible hang
printk can actually take too long
generally a high IRQL handler literally just moves data and does some sort of semaphore/event
 
user7659542
I imagine peope who have worked on printk have done crazy optimizations like those people:
 
user7659542
 
@traducerad no AFAIK it's just banned from some places in the kernel
 
user7659542
@Mgetz idk... typically you avoid even doing memcopies and so forth in an IRQ if possible
 
user7659542
due to the time it takes
 
user7659542
8:54 PM
v4l has an interesting 0-copy approach
 
@traducerad well generally you'd remap the data pages
 
user7659542
where they IIRC manage to pass a pointer to userspace which is a pointer to a memory area, so you don't have to copy anything
 
user7659542
Now that I think about it
 
user7659542
I think any function which you want to make safe and where you have IRQs occuring will have race condition issues
 
user7659542
even if you were to try to create a more clever printing mechanism, no matter how you look at it
 
user7659542
9:02 PM
That's my first impression about the problem though
 
user7659542
solution may be to lock a buffer while you are copying
 
user7659542
and if an irq occurs, it will try to lock that buffer but will fail (as lock is already held by another context/task) so it will copy its data to another/second buffer
 
user7659542
and then you have to be able to somehow flush those buffers at a good/opportunistic moment
 
user7659542
but HW buffers are finite...
 
user7659542
might be able to solve it with a bunch of sw buffers on top of the HW buffer
 
9:14 PM
Is anyone familiar with shaders and modern graphics? I have some really dumb questions...
 
9:46 PM
Ask away (I'm still a newbie but someone should help)
 
 
1 hour later…
10:52 PM
 

« first day (3551 days earlier)      last day (1380 days later) »