« first day (3190 days earlier)      last day (1741 days later) » 

12:15 AM
@Mikhail I just completed the grading of my exams, I'm kinda happy with the results.
There were a few funny outliers though.
 
I had a problem with our kids today. Basically, the GPU coding class was restructured so that almost all the code can be written and ran in a web based IDE. The kid spent 1 days trying to get a code snippet I sent running. Had no clue how to link, didn't quiet know what nvcc was. Ended up trashing the path, and associated directories on one of our server build machines, which is going to be sad.
Students should be trained on the tools they will use at work, setting up an environment should be part of their training.
 
@Mikhail I feel your pain.
 
Also using fucking Mentor Graphics over x forwarding gave me cancer because it didn't resize to fit my 4k monitor. We used to call it "Tormentor Graphics".
 
@Mikhail 4k is still not trivial processing power.
 
Also the OGL class shifted to js, so, with the exception of an introductory data structures class (for which solutions to all problems are public knowledge) it is possible to get a degree without doing any C++
 
12:34 AM
@CaptainGiraffe can we express a source permutation and a target permutation in terms of factorials?
 
1:01 AM
http://quick-bench.com/DHKpJipPAeX-v9nomhhg_PGCt4g
^ Slight difference makes me sad
 
@Mysticial I'd guess not. At least with gcc/g++, you can use -finstrument-functions to get a particular function called upon entry to and exit from each function in your code. If you put in an infinite loop, it'll run just as main is entered, and nothing else will ever happen. Don't know for sure, but I'd guess Clang has an equivalent as well.
 
1:23 AM
@Mikhail Would you be happier if the float version became as slow as as the double version?
 
gcc has the expected code gen
 
Laser or ultrasonic distance meter, which is better?
 
1:46 AM
@TelKitty Laser, as a rule. Ultrasonic measures the distance to something in a general direction, but if there are any obstructions nearby, it's hard to guess exactly what. Laser puts a spot on the far end, so you know exactly where you're measuring to.
 
2:03 AM
Hi, everyone. I'm puzzled now. I want to develop an STG, but I am a new in c++. I'm learning dx9 now. There is also a develop tool for STG, and I just need to write and modify some lua scripts when using it. If I want to develop it soon, which way should I select? BTW, if I select to use the tool, I will not give up learning c++ and dx either.
 
2:56 AM
@萝莉w I'd encourage you to use a more web friendly language for ease of deployment. Interop Pixi.js and matter.js. This is how I do most of my games.
 
I just want to make a Single-player game as Win App now. Not on web page.
 
Its easier to do what you want using javscript, and those libraries I mentioned. You can wrap it into anything you want.
I'd also encourage you to do OGL instead of DX9 (old version?) mostly because OGL is used on more platforms.
 
3:13 AM
Oh,you mean I can use js on anywhere?
 
1) yes 2) its going to be much, much easier, especially if you stick to pixi and have little previous coding experience
 
Thanks, I will learn it.
 
From a cursory Google search, it appears there are a dozen or more tutorials about how to write a shoot 'em game with pixi
 
Thanks a lot.
 
3:47 AM
@JerryCoffin If I'm not mistaken, sound wave are affected by air pressure and temperature so the speed of sound isn't as fix as the speed of light.
As I remember, the mean to measure distance often depends on the purpose. Like measuring distance gets difficult with a laser the less distance you're trying to measure. But error in 30cm for soundwaves should probably be acceptable
but yeah, the laser is probably the best choice when possible.
Anyone has insight on AMD threadripper CPUs?
 
4:19 AM
That's a bait question
 
I'm looking to build a workstation now that I won't be traveling around the world anytime soon
 
4:56 AM
A poor substitute for a family, make sure to get one with rgb tho
 
Just upgraded my work desk from a glass dining table to a powered standing desk.
Finally can work + watch TV while standing up.
 
I assume it would be easier to just drill a pit under your desk?
 
@Mikhail No because the owners of the unit below me won't be happy about that.
 
Is that because you'd be the doing the work mostly at night, and wake them or up, or is there perhaps something I'm missing?
 
@Mikhail My parents kept complaining about not having a dining table. Technically I had one, but it had a computer + 2 monitors on it. IOW, it wasn't a dining table anymore.
I already had a standing desk in my computer room, but I work there too and I don't want to move it to the living room. So I ordered a new one - identical in every way except less vertical range and $400 cheaper.
 
5:12 AM
Yeah, last time I had somebisy over I told them my dinning room table was in the next room. I don't have a second room.
 
Initially, I was against getting any more furniture since I simply don't have a lot of space left.
But they did have a point about it being hard on visitors.
 
5:30 AM
@JerryCoffin But ultrasonic is much, much slower, thus it's more accurate for short/medium distance (less than 120 meters) when the weather is fine or indoors?
@LoïcFaure-Lacroix But fog or poor visibility would much limit the range for laser. I mean, laser is probably better over all, we have recently purchased 3 laser equipment for measuring distance, altitude etc. Laser is good for long range, but long range laser equipment are expensive. Once you are into 500 meters range, you are looking at over a grand.
Unless of course, you are willing to compromise accuracy, quality or wait for a long time because shipped from overseas.
 
5:54 AM
ah running firefox in docker to connect to my dockerized services using their hostname is definitely the coolest thing I've done for some time
that's some next level incognito mode
@TelKitty Can't help much there. But ultrasounds will probably generate more noise than lasers, you can diminish the impact of noise on the receiver physically.
 
 
5 hours later…
11:13 AM
CharType at(std::size_t i) {
    return boost::apply_visitor(
        [&](auto& viewOrContent) { return viewOrContent.at(i); },
        this->storage
    );
}
Can I somehow simplify such code?
 
 
1 hour later…
12:35 PM
@Mysticial I've largely solved this by not having visitors
 
 
2 hours later…
2:38 PM
le sigh
-1
A: What is faster, Union or std::variant<>?

Xiremaunions are probably faster than std::variant There's a couple really easy ways to see how this could be. For starters, std::variant is, by design, slightly larger than a union featuring the exact same elements. So any operations that involve copying data, moving data around, etc., are never goin...

 
 
2 hours later…
4:23 PM
@TelKitty I don't see any relationship that would lead to slower implying more accurate.
 
if the timing remains as accurate then slower means more accurate over the same distance
 
@ratchetfreak why would slower mean more accurate
 
you end up with more significant digits in the time variable and such the time*speed ends up with more significant digits
but that assumes the speed is actually constant which for sound is less so than for light
 
4:41 PM
this reminds me of the debate currently happening in the self-driving space Computer Vision vs LIDAR
 
@Mikhail not at all surprised. More surprised they admitted it, and even more surprised they were allowed to.
 
@Mikhail This is why finance companies are locked down hard.
Full information barrier between inside and outside.
Your computer is locked to the floor. If you stick a USB into it, security will descend on you.
The only thing you can take home is what's in your head and what you can print out on paper.
 
4:56 PM
@Mysticial you actually have USB ports? I have co-workers that the machines they got when working for FSI companies had them physically removed from the board. The NICs were even locking
 
Maybe it's a honey pot?
 
Working remotely doesn't let you steal stuff either since all data transfer is disabled. So you'd need to take screencaps of anything you're stealing. That's too slow.
 
Use xclip
 
@Mikhail you can actually detect screenshots and block them by flashing up garbage
quite a few remote viewers do that
 
@Mgetz The thing that pisses me off is the inability to use USB keyboard/mouse.
So you're stuck with a very limited selection of PS2 shit. And none of them fit my hand.
 
4:59 PM
@Mysticial you really need an RGB keyboard and mouse?
you can usually use basic gaming peripherals that have a PS2 adapter
 
So my productivity at work is significantly hampered compared to at home. But security is more important than productivity.
 
your productivity costs them at most 40-60k a year... a fine could cost billions
 
@Mgetz PS2 adapters only work if the device has analog connections. You can't just stick the adapter on any USB peripheral and expect it to work.
 
literally had it explained to me that way
@Mysticial true, but it opens it up significantly
 
@BartekBanachewicz Not in any way I'm aware of
 
5:01 PM
Do they disable the USB controllers too?
 
@Mgetz No idea. Nobody dares to try it.
The last guy who tried it ~10 years ago had his house raided and a search team with divers scouring the bottom of a lake for a discarded hard drive.
He also went to jail.
 
Fair as I mentioned the people I knew that have dealt with it physically didn't even have USB on the device, the ports were filled in with epoxy
pretty much the same situation as you'd find at a national lab now is my understanding
 
@Mgetz epoxy? Wow. I once mentioned, as a joke, we should do that on some of the hardware we ship to our customers.
To prevent them from using the wrong ports.
 
@StackedCrooked DOD requires that all drive headers and USB ports are removed from the device. Manufacturers aren't going to make new plastics or IO shields. So they just epoxy over the hole
 
I'm typing into chat by RDP'ing into a special "dirty" server that's separate from the internal network. Copy/paste/file-transfer is completely disabled between the two.
 
5:05 PM
FSI realized they could do the same and pays for it. the motherboards cost quite a bit more
 
The only way to transfer is to screencap, but that only works in one direction: outside -> inside. Or you can manually type it out into the RDP session.
 
People wonder why Bloomberg terminals sell like hotcakes
 
In retrospect, I'm actually quite amazed at how open and security-lax the tech companies are.
And they're paying for it with all these IP thefts.
 
@Mysticial What I'm amazed at is how many FSI's have figured out you need to let employees get away with a tiny amount of stuff
so they just monitor and NOC it
 
@Mgetz Our emails used to be locked down as well. You couldn't send anything outside without whitelisting. They've since relaxed it to allow anything smaller than X size.
Since it meant that you couldn't send yourself your own paystubs and such.
 
5:09 PM
@Mysticial that's because they scan everything. It actually increases security because at least this way they can see it
 
@Mgetz This mutual distrust (though understandable), means that I don't log into my personal email at work. I access it only through my phone.
 
@Mysticial Yeah the issue is they need to see it, and otherwise they'd have to MITM the whole thing and that would cause issues. It's better to just tell employees to use phones
 
Accessing company email on your phone requires that you install a 3rd party sandbox.
 
Yep I refuse to do that
 
@Mgetz The price you pay for a big paycheck
 
5:15 PM
@Rick I don't work in FSI, I just don't want to have an MDM that can wipe my phone or read arbitrary data
 
@Mgetz Some of us carry two phones.
 
@Mysticial I was given that option, I declined to have a company phone because when I'm not working I don't want to be found.
the people that need to know my cell
the rule is quite simple: Unless there is a physical fire... don't call
 
@Mgetz They used to give us phones. But they got rid of them and added a small amount to our paychecks to cover getting our own phones.
 
@Mysticial we're big enough old tech we can pretty much name our terms
 
@Mgetz Don't FSI build out their own systems from scratch. I don't think they use any opensource software.
 
5:25 PM
@Rick Nah, we use GCC.
And Linux.
 
@Rick only idiots don't support common development tools.
 
@Mysticial I was talking to someone at Bloomberg. Asked if they used elastic search, that was pretty much his answer, inhouse and custom built.
@Mgetz Sometimes the effort of learning a third party API is more of a hassle than simply learning the system.
 
@Rick Or sometimes, the 3rd party stuff is just shit.
For example, half my job is rewriting more performant versions of the std libraries.
 
@Mysticial really surprised you're not more involved in the performance working group
 
"performance working group"?
 
5:40 PM
@Mysticial one of the subcommittees that the game devs are heavily involved with
 
@Mgetz oh
Nobody like that has approached me. So there's that.
But I get finance and tech recruiter emails like every other day.
 
@Mysticial Bloomberg is heavily involved
so that alone is good reason to consider
 
@Mgetz game devs do focus on performance tooling and optimization but I feel most meaningful performance is done on the math and problem-solving side.
 
@Rick They would 1000% disagree
most optimization happens from better use of the hardware by not doing stupid things algorithimically
 
Google tried half-heartedly to poach me back shortly after the GCP conference. They gave up after I told them what I did and what my current role is.
That sorta just ended the conversation right away. Usually tech companies are a bit more aggressive than that.
 
5:51 PM
@Mysticial didn't you come from google?
 
@Mgetz I did.
They asked me what I did what I was at Google, what I'm doing now. And would I consider coming back.
My response to the last question was, "never say never".
They actually asked that first before asking what I was currently doing.
Though there's a difference between this recruiting attempt vs. the typical recruiter emails.
It was a high-level director that tried to recruit me back as opposed to just another HR recruiter.
 
Among the differences is that typical recruiters get paid when the company hires you. So, they are in the business of selling people, perhaps without those sames persons approval.
 
IOW, the guy recruiting me was probably several pay grades above me anyway.
 
@Mgetz just from personal experance, I have seen a massive increase in performance sometimes by up to 50% by simply using data structures that reframe the problem space.
 
FYI, we should rank people by USDA meat grades
 
@Mikhail so would you be considered wagyu beef?
 
@Rick yeah that's algorithmic and not being stupid stuff
My point was more that low level optimization is usually the last 1%
 
^ gives absolutely no credit to the guys who made '-O3` happen :-)
 
@Mikhail -O3 backfires a lot. :)
 
experiences intense flashbacks to msvc code gen
 
6:07 PM
@Mgetz I'd say there's enough variance that it's hard to quantify it in any meaningful way. From what I've seen, it's pretty well distributed between 0% and 50x.
 
lol
@Mgetz If I use a simple pointer in C (just as openCV encodes its 2D image), I would lose the ability of using array notation in C, and that's just a no. If you know of a prototype that will not force the modification of the definition of the function, that will be valid in both languages, and will not rely on UB, please tell me, because I'm very new in C++ and don't know what I can do with it. — Cacahuete Frito 22 mins ago
@Mysticial I generally ignore your experiences here because you tend to be a the extreme end of things ;p
 
@Mgetz lol
 
Also lol, because OCV doesn't use a simple pointer - at all. First off the memory is pitched, also can be backed by a GPU pointer. Also everything is reference counted. Its so, prone to performance bugs due to deep copies, I stopped using it.
 
@Mgetz :(
 
@CacahueteFrito which is technically a GNU extension. In C int[] and int* are identical from a parameter perspective — Mgetz 1 min ago
@Mysticial not saying that's a bad thing, just saying that you've tended to optimize to that point first
 
6:11 PM
@Mgetz One of the most ridiculous low-effort/high-payoff low-level optimizations I did was to replace a double -> int64_t cast with a union type-pun and a small FP hack.
~100x back in the 32-bit days.
 
Glad those days are over.
 
@StackedCrooked Different stuff now. For example, std::round is extremely slow.
 
Heh. Never used that one.
 
@Mysticial I've probably mentioned it before, but in the late '90s (or so) Intel published a whole white paper about how to that that double->int conversion without the penalty of changing the floating point control work to change rounding mode...
 
@Mysticial Honestly this is one of the reasons I'd be scared to work with you. My knowledge in that domain is virtually zilch in comparison. I respect what you do a lot though.
 
6:19 PM
The only time I need to round numbers is when outputting numbers in a human readable format.
Can't think of many other cases.
 
I've done it when truncate isn't ideal
but otherwise I usually just default to the standard
Someone want to properly answer this:
@Mgetz Something missing in your comment? I don't unserstand the first part. int [] decays to int *, but int [][] decays to int (*)[], and although GCC has VLAs as an extension, it doesn't accept them in function prototypes, so I don't know how I can do something like void foo(ptrdiff_t n, ptrdiff_t m, int (*a)[m]); in the gnu++ dialect — Cacahuete Frito 10 mins ago
pretty sure it decays to int **
 
posted on July 11, 2019 by Herb Sutter

The ISO C++ committee now regularly receives many more proposals than we can/should accept. For the meeting that begins this coming Monday, we have about 300 active technical papers, most targeting post-C++20. I now regularly get asked, including again a few hours ago, “how do we know which of these customers actually want and will use? … Continue reading Your “top five”

 
@Mysticial I really should make sure I'm following him on twitter
 
@Mgetz decay is not for function parameters, does this help?
 
6:29 PM
@JerryCoffin I vaguely remember.
 
@LucDanton what about dynamic?
they are not passing a fixed size
nevermind tried it, regardless what they are doing is UB
 
I’m really hazy on C, sorry
 
Not just C but the GNU dialect
 
My stack overflow program below instead states SIGSEGV while dumping core, shouldn't it exit due to SIGABRT instead of SIGSEGV.

Code:
int main() { main(); return 0; }
 
@mSatyam You're recursing main. That is causing a stackoverflow
so no
 
6:41 PM
lol
 
I'd laugh if it did tail call elimination though and it just turned into a while(1)
 
Yes I intended to cause stackoverflow by recursing main, but SIGSEGV is due to invalid memory reference
For overflowing stack shouldn't be there some other signal or they happened to use same
 
@mSatyam Yes which is expected
@mSatyam No
You're going off the end of the stack page
That's what's killing the program
 
Thanks @Mgetz
 
-11
Q: C or C++ for write malware/trojan/virus?

D9koderI recently became interested in writing my viruses and I have a question, which of C and C++ is better for create my malware/trojan/virus?

 
6:54 PM
hahahhaahaha
 
I'm voting to close this question as off-topic because haha, aha, hahahahahahahahahahahahaha... — Mysticial 29 secs ago
 
gotta love the bigotry that immediately jumped in
and it's gone
That feeling when people rediscover what John Carmack knew in windows 95
0
Q: Display repaint an image on window at 60 hz

SamuelIf you open skype and click "share screen" it shows you a video preview of what's going to be streamed. So far I have this code: To get screen: HBITMAP screenshot() { // get the device context of the screen HDC hScreenDC = CreateDC("DISPLAY", NULL, NULL, NULL); // and a device cont...

 
7:13 PM
@Mgetz Its been a while since I seen one of these
 
7:39 PM
@Borgleader I see one every couple of months, normally only the ones that are general like that get major downvotes
 
twitter died?
 
@Mysticial works on my machine?
 
hmm
 
apparently it's sporadic
 
Also works on my phone.
 
7:44 PM
 [Investigating] We are currently investigating issues people are having accessing Twitter. We will keep you updated on whats happening.
 
Me: I'll spend 2k on a computer, but then rage at my crappy humidifier that I refuse to replace that has shot fan bearings
/sigh
 
What does a humidifier have anything to do with a computer?
 
Just use the CPU as a humidifier
 
@Mysticial what I'm willing to spend money on
that's all
e.g. I'm willing to pay for a computer, but not fix the thing that's actually more annoying
 
ah
 
7:49 PM
because a high pitch fan squeak is ungodly annoying
 
Humidifier in the summer? Where do you live? Arizona?
 
turn off the humidifier
 
@Mysticial Colorado
 
Colorado is dry in the summer?
 
@Mgetz Easily curable the same was as squeaks in the car: turn up the radio. Except when it's not a car, you can wear headphones instead.
 
7:50 PM
If only I could average Chicago's summers and winters.
 
@Mysticial Summer, winter, fall, spring, and everywhen else.
 
@JerryCoffin That's great... except at night
 
@JerryCoffin ah
@Mgetz Where headphones when you sleep. duh
 
either way it's 14% humidity outside right now
 
64% in Chicago atm.
 
7:51 PM
@Mgetz Aka, a "muggy day", by Colorado standards.
 
@JerryCoffin actually yes...
Those days at 20% are nuts
Side note: every time I see the name "Barry" as in the tropical storm... I think of archer
 
@Mgetz My kids would undoubtedly jump straight to "Barry Allen".
 
@JerryCoffin You know... if we'd had a hurricane Archer then Hurricane Barry would have to come in and do more damage, just to show Hurricane Archer up
 
@Mgetz Seems like it's pretty unusual for one that early in the season (an "A*" or "B*") to do a huge amount of damage (but I suppose as the climate changes, we have to expect hurricanes to change along with the rest).
 
@JerryCoffin Oh I know that said: Andrew
apparently during the medieval warming period there were hundreds of hurricanes per year... but all fairly minor
 
8:06 PM
@Mgetz Whereas on Jupiter there's only one per few centuries (or so).
 
The Great Red Spot is a persistent high-pressure region in the atmosphere of Jupiter, producing an anticyclonic storm, the largest in the Solar System, 22 degrees south of Jupiter's equator. It has been continuously observed since 1830.[1] Earlier observations from 1665 to 1713 are believed to be of the same storm; if this is correct, it has existed for at least 350 years.[2]
 
@Mikhail Hmm...okay, maybe the hexagon on Saturn instead...
 
@JerryCoffin so fun fact: assuming we get to J you're a hurricane this year!
 
@Mgetz Well, at least one person has mentioned that I'm prone to extremes...
 
@JerryCoffin Isn't it me who usually pulls out extremes?
Or wait, I typically go a few orders of magnitude higher than just a planet.
 
9:10 PM
setTabData should be an optional argument in QTabBar's addTab function.
 
 
3 hours later…
11:41 PM
0
Q: I feel a need of express my hate over Stack Overflow

Pauli Sudarshan TerhoI feel like SO is an experiment of how far a human can go below its dignity to becaome a slave for a bunch of downvotes. I hoped for a helful and creative cooperation and found out that I am a victim of moderators. It can not be a part of any system in a world I want to live in. The breeding of s...

^^ /cc @Borgleader
 
@Mysticial rofl
 

« first day (3190 days earlier)      last day (1741 days later) »