« first day (3204 days earlier)      last day (1758 days later) » 

12:03 AM
Is there ever a case to use Nosql with sql ?
 
12:22 AM
maybe it solves issues of latency and throughput
 
@Rick Do you mean use a non-sql database in conjunction with an sql database, or do you mean use an sql database as if it were a simple key-value store (or something on that order) like many no-sql databases provide?
 
@JerryCoffin I can't understand why they would use both in this digram
 
I'd say definitely yes to the first (e.g., I've worked on a system where we used both PostgreSQL and Cassandra). The second...seems less likely to be of much use. I've seen people use SQL that way, but didn't find the results very convincing.
 
but what solution does it solve? when you used postgreSQL and Cassandra
and what solution are they attempting to solve with this
 
@Rick In that diagram, I can't really tell. With the way they've used (abused?) the arrow heads, they show data coming from the reader into the DB, which seems unlikely (but also means it's nearly impossible to now what they're really doing).
@Rick It was basically an online system storing various data. Database of users accounts (and such) was in PG, and the data being stored by the users was in Cassandra.
 
12:41 AM
was that because of the quality of the data coming from users made more sense to keep in Cassandra for scalability. because the digram is about designing a system that scales to millions of users on AWS
 
@Rick Just for example, we have one arrow from Worker Service on the center left, going into NoSQL lower and to its right. Does that mean we only write into that NoSQL DB? If so, why bother? Maybe it means the Worker Service(s) actually read and write that DB? The diagram makes me sure I don't know what they're doing, and less than certain whether they know what they're doing either.
 
well, I have a whole bunch of these digrams this one just happens to be for AWS. I have another for social network
let me put that one up too one sec
 
@Rick Cassandra scales, but per-node, it's pretty slow. So if you only need to store a few gigs of data, pg can be quite a bit faster.
@Rick Doesn't seem to show any DBs at all.
 
so there was no advantage to using Cassandra with PG
 
@Rick There was for data that actually needed it. We stored the data about each user's account in pg. Each user stored quite a lot of data, which was spread across multiple Cassandra nodes, and would have been fairly ugly to do in pg. That said, we did end up abandoning Casandra and splitting it further into an index using ElasticSearch and the raw data itself using lmdb.
 
12:52 AM
These are just system design templates, this one did not have DBs but most of the others do. let me put up twitter
lol
 
@Rick Actual Twitter, or somebody's idea of how to do something like Twitter? Warning: I've looked at the source code to Twitter (though not recently). I hope you'll forgive me if I doubt they've reproduced the real thing very accurately.
 
so a lot of these design templates are more marketing than templates
 
If they have reproduced it accurately, you'll need a big, very high-res monitor to read the text in all those tiny boxes...
 
this is supposed to be a twitter timeline and search or facebook feed and search
 
@Rick Interestingly, I've looked at both, and don't see much similarity between what I saw and what they show. They do quite a bit of writing to something that's more like a giant log file, and then have multiple processes that troll through the log to find the things they care about, and react accordingly. But a lot of what's really there is (by intent) mostly hidden. So for example, as you're scrolling through, they're holding real-time auctions to sell you ads.
That's based heavily on their giving bidders information about your preferences, likes, dislikes, what you've clicked on, and such that don't show up here at all. But that's how they make their money, so it's probably the majority of what they really do. Displaying the content you care about is almost accidental.
 
1:05 AM
yeah, its impressions per click type system. I've used googles advert system. You can narrow it down to subsets of qualifiers to hit your key demographic
But I'm more interested in the engineering side. Weak consistency, Eventual consistency, Strong consistency, latency, throughput, and availability patterns.
 
@Rick Point is, they have a fair number of different needs, so most just shovel incoming data into a log file, then have various processes to look at what came in and copy it other places as needed and eventually get rid of old garbage from the log.
On the other hand, it's been years since I looked, so things have probably changed since. I suspect they haven't gotten a lot simpler though...
 
I am suspicious of new tech. For example, the f35 performed worse on almost every metric compared to the f16. So these systems might be getting more complicated, but I don't know if they are actually solving a problem.
But my assumptions might be an overreach
 
@Rick Much of the complexity probably is at least intended to solve a problem. Just for example, they end up with a lot of data about users. But, quite a few countries are starting to impose regulations about how data on their residents must be stored, so data for a German user gets filtered one way, and sent to one DB. Data on an American user gets filtered differently and sent to a different DB (often in a different physical location--e.g., German user's data has to be stored in Europe).
 
1:24 AM
Europeans have better data protection laws than we do.
They also seem to be mindful of how powerful these tech companies are becoming.
 
@Rick I'm not going to try to judge better or worse (for now), from a technical viewpoint what matters is that the company has to comply with a lot of different laws.
 
That's true, which is a plus because that means more engineering problems to solve :-).
 
1:47 AM
I did not know there were upper limits when you design a distributed. For example, you can only choose two of the three targets. Consistency, Availability, or partition Tolerance.
distributed system*
*and Partition Tolerance
I guess Mysql is Consistency and Availability and MongoDB is Consistency and Partition Tolerance
This all follows a theorem called CAP
 
2:36 AM
68
A: How to use the PI constant in C++

HenrikGet it from the FPU unit on chip instead: double get_PI() { double pi; __asm { fldpi fstp pi } return pi; } double PI = get_PI();

@Rick Europeans also have shittier or absent tech companies. Perhaps their laws were not that good.
 
2:55 AM
@Mikhail I don't know if that's a fair comparison. Most of the world speaks English not German or Italian. The expectation that they have multinational companies that span borders and cultures might not be a reasonable expectation.
 
Still wondering how to they know someone is from X country.
And do government from X country know data from their people is actually stored where it should. It's not like any site tells you "Your personal data is stored here"
But then if you want your data to be stored somewhere else how can you prove or disprove that you don't live where the data is stored.
 
@LoïcFaure-Lacroix the service providers know
 
because it's their lines
it's there servers
 
Yeah but if you're living in a different country than your citizenship your data should still be stored somewhere else than from where you're connected
 
3:05 AM
That all depends on the laws.
 
For example for French, data on french has to be stored in France
 
France can literally shut the lines down or they can block companies that do not comply with their laws. China does it. I don't see that as a major problem
 
Legally it's a problem if a foreign country can store your data in their own server and check what's there
People wouldn't say the same thing if all of your life was stored in Chinese Facebook servers
 
that depends on how you and citizens see their sovereignty with respect to America.
like I don't think Australia cares
or Canada
if their information is on American servers.
there are a ton of other countries that also fit into that category
 
It's not about America, it's about being in control of the data stored about yourself. That a country doesn't care to protect its own citizen is a different question.
btw apparently cross linking Rust and C++ compiled with Clang seems to have landed in mozilla firefox
 
3:22 AM
I don't think it is about not caring. There might not be that divide you strongly associate with national sovereignty. American companies are probably considered just as Austerialan as any other Australian/Canadian company.
 
so chances are we'll see a lot more of Rust if it can be easily linked in C++ app later
 
you know they tried building a browser with rust, it never worked out.
 
you mean servo?
 
yeah
 
How isn't it not working out?
 
3:27 AM
last time I checked it was not working and that was a long time ago
 
servo is an experimental project which is being used to continuously integrate rust more and more inside firefox
servo isn't really a browser it's mostly designed to replace the rendering engine of firefox
 
wow the servo repo has recent activity
 
servo is a mozilla project to one day replace gecko
 
The Rust guys are in rage mode, Rust will no longer be ignored. lol
 
not really, firefox has been integrating rust a lot for some years already
spidermonkey isn't going to be rewritten in Rust for a long time has there is little gain to do it
 
3:34 AM
I don't know, we will see what comes of this.
 
exploits. lots of exploits.
 
3:56 AM
@LoïcFaure-Lacroix To an extent, they don't. Nonetheless, they do have some power to do searches and such, to find out where data is stored. And, penalties for violating such laws are high, so most companies probably at least make some attempt to follow them, even though they're probably well short of 100% perfect about it.
 
 
4 hours later…
8:26 AM
This robot was shipped with all the source code but without any library it includes.
 
 
2 hours later…
10:54 AM
So I uploaded some program on to my robot, it started to act like a manic. So I turned off the power and removed the batteries. It still acted like a manic, just at a much slower pace. Apparently it drew power from USB port, from which it used to download the program.
Also 7 out of 8 servo/engines are working correctly. I need to find out why the claw is not doing what it's supposed to.
 
11:52 AM
@Mysticial probably fine within core counts that the original TR had, probably stretched a bit beyond that or if AMD adds AVX512
 
12:43 PM
@Rick if by not working you mean shipping in retail firefox ok...
 
 
1 hour later…
1:49 PM
If your phone vibrates suddenly and asking your how could it help you, what could be the cause. My Galaxy S8 vibrates randomly and just now, all of a sudden, screen woke up and asking me what I would like to do. Anyone else has this issue?
I didn't touch the phone at all.
 
Well you probably either said something it understood to mean "hey Google" or "hi Bixby"
 
Even if the screen is off and I have not touched it?
 
depends on your settings or if you're currently charging it
or if you have a bluetooth device with an "assistant button" connected. There's many possibilities
 
I understand it could wake up if it receives an notification.
@PeterT If phone's bluetooth option is turned on.
 
user8104581
2:14 PM
I think the most likely possibility is that you have Google Assistant or Samsung Bixby set to listen for commands or wake up commands even when the screen is turned off
 
user8104581
In some phones holding the home button also opens the assistant
 
2:54 PM
Bixby has never been set up. I need to investigate whether Google Assistant is on ...
 
3:06 PM
Turned assistance off.
Now I have burning desire to live in a mountain with no phones, no computer and no modern technology at all.
 
3:42 PM
@Mgetz When I built it last. Which was probably 2 years ago It couldn't load webpages correctly. But a lot of work has been done on it since then, so I don't know the current state of the project now.
 
@Rick see the wiki I linked
they aren't trying to replace everything all at once
 
3:53 PM
@Mgetz That makes sense. The one thing I did notice about servo was that it loaded pages very quickly. That's because it does not wait for things to arrive in order like modern browsers. It builds out the webpage using parallel workloads using the GPU. I thought that was interesting at the time.
 
There have been a LOT of heuristics on that, particularly by the google folks
chrome is literally obsessed
 
If they are successful, firefox will be setting a new bar for performance. But Chrome has a nice ecosystem for developers. But it is sorta slow and I'm noticing that it eats up lots of system recourse. It will be interesting to see how things pan out.
 
What Firefox does a lot worse than chrome is RAM use increase when idling. When I have Firefox open for a few days the memory usage keeps creeping up. This doesn't happen as much with chrome
I made a memory two snapshots to compare, but nothing immediately stood out
 
4:09 PM
I don't use firefox much, but from my understanding chrome will spin up multiple threads. While firefox usually only uses one.
 
FF > C
Fight me!
 
but since firefox 54 they started supporting multi-threading
 
@PeterT right now firefox doesn't share common resources across procesess like chrome does. So for example fonts are shared among all processes using them in a read only page etc. That's coming in 68 or 69 IIRC
must be 69 or later as 68 is out
 
 
2 hours later…
6:16 PM
@Mysticial is this your work board?
 
@Mgetz No. It's Gigabyte X299 Gaming 7 (not the pro one) and the Gigabyte X299 Designare-EX.
I really wanted the Gaming 7 Pro. But wasn't available in NA at the time.
 
@Mysticial well if it has the same VRM as the one I just linked like the gaming 9 does... yeah that's going to be fun to overclock
Buildzoid did a breakdown for GN on the Gaming 9
 
@Mgetz AFAIK, the VRMs are the same for the Gaming 7, 7 Pro, 9, and Designare. The only difference was the VRM cooling.
Which is better on the 7 Pro and the Designare. The 7 Pro and Designare are essentially the same, but the 7 Pro has more RGB.
 
@Mysticial does that actually have something that can dissipate the 31w buildzoid is estimating for any reasonable overclock?
 
@Mgetz Let's just say that I've never been able to get the Designare VRMs to get even with 15C of when the VRM fan turns on.
Even while sustaining 350W from the chip - which is about where the chip starts temperature throttling under 360 AIO.
My Gaming 7 (non-pro) has a smaller chip (the 7900X) - which starts temperature throttling at around 280W with 360 AIO. I've gotten the VRMs into the low 80s.
 
6:24 PM
@Mysticial so the 31W estimate was at 200A draw on the VRM at 1.8V
 
But it's hard to compare since the Gaming 7 has weaker VRM cooling and the airflow is worse in that case.
I'll note that these chips are 140W stock. So 140W -> 350W is a very significant overclock even if the clocks are only 10% - 20% higher.
 
@Mysticial yeah he was estimating 14W dissipated on the VRM at 100A@1.8V
 
@Mgetz Probably closer to 1.9V, though under load, it vdroops back down to ~1.8. IOW, it's set to 1.9V with LLC to offset the droop.
The Designare (and thus the 7 Pro) are overkill in terms of VRM cooling.
You'd probably need to pull close to 500W just to get the VRMs to hit 90C where the fan turns on. And there's no way you're pulling 500W sustained without delid+direct-die or subzero.
 
@Mysticial the irony is that the heatsink on the 7pro is garbage but it's a 10phase or a 5phase with parallel stages... so the actual draw per PowIRstage would be a lot lower
it looks like they are the same stages rated for 50A on all the boards though
so realistically you're going to get 20A max out of each before things get waaaay too toasty
 
@Mgetz It's garbage? AFAIK it's the same as the Designare one. And I couldn't overheat my Designare's VRMs even if I tried.
 
6:33 PM
and that's assuming a LOT of active cooling
@Mysticial probably more of a function of the 10Phase vs the heatsink, which doesn't have a ton of surface area. That said being painted black does help quite a lot.
 
I think the only difference is that the 7 Pro's sink is black, whereas the Designare's is silver.
And they both have a VRM fan.
 
seriously... you can improve your VRM temps just painting the heatsinks black
 
How much are they drawing through the 7 Pro to make the VRMs overheat?
 
lol I was looking at the wrong image.. yeah there is no way in heck you're going to overheat that VRM
@Mysticial do you see those silver tabs on the power stages? those are directly connected to the power plane in the stage so it basically has no Tcase delta, that said those silver tabs are live... so don't touch them directly.
 
@Mgetz No because they're covered by the VRM heatsink.
 
6:38 PM
@Mysticial the point is that it's really really easy for those ISL99227s to dump heat into that heatsink. It's also a 12 stage... like a real 12 stage VRM
using 60A power stages
 
Most of the early X299 boards had truly shitty VRM cooling. Either plastic sinks or too small a sink. The Gaming 7 was probably the only board at launch that had a 2nd VRM sink above the I/O panel connected to the primary one with a heatpipe. I can get my Gaming 7's VRM into the mid/high 90s under load with just my 7900X with a high enough (summer) ambient.
@Mgetz oh ic
 
@Mysticial so pretty much every VRM on that board uses them and they cost about 7 bucks a chip. So... yeah you have as best I can count 20 of them on the board so... about 140 of the cost of that board is JUST VRMs
 
So the shittiest X299 board is probably the MSI X299 RAIDER.
$~200 at launch.
 
can't actually find a picture of the board without heatsinks
 
Maybe it's so shitty that nobody has bothered to take it apart? :)
 
6:52 PM
There are definitely better overclockers that's for sure
realistically there isn't much point in buying x299 if you're not going to push it?
 
Plenty of devs bought the cheapest board and popped the 6 or 8-core in it for the AVX512.
 
@Mysticial woe be unto them that actually pushed their CPUs then
 
I'd have gone with the 8-core had Intel not false-advertised that only the 10-core had both 512-bit FMAs.
 
it does look like entry to market was the 8 phase VRM on the video I linked above
 
user8104581
@Mgetz I have this mobo since 2017 and I find it pretty decent, though I'm not too much of a hardware specialist. You think it was worth going for spending more for an ATX, even more to use with a non overclockable processor (8400) ? asus.com/websites/global/products/ik8vi4gNBH6sZ4xe/img/kv/…
 
6:54 PM
That said... I'd be careful about pushing any of those chips on that sort of VRM
 
@Mgetz The 6 and 8-core chips are harder to push. (VRM-wise)
10+ is where it gets serious.
 
@Mysticial Yeah you can technically power those on a 4phase vcore like the one you just linked
I wouldn't want push a 16core on that though
 
I would hesitate to put my 14-core in my Gaming 7 and run it during the summer without active cooling.
 
I feel sorry for the people thinking they are going to put the 3950x in the x570 tuf gaming
 
@Mgetz Is it even worse than the Asrock mATX?
 
6:59 PM
@Mysticial different, the tuff gaming is easier to cool but probably just can't output the actual draw for the chip. IIRC it's using 60A power stages so realistic max draw around 120A?
the 16 core can easily pull 200A under load
without watercooling
That said if I was going to choose... I'd probably go with the tuff over the asrock
The tuff won't risk self destructing
 
user8104581
I would have gone for a ROG if I had the money haha. Sadly paid more for my TUF one than one would pay for a ROG Maximus Hero XI in the US
 
I've never quite understood going for really low-end mobos. The price difference between bottom-end and mid-range is usually pretty minimal, and the difference in performance and capabilities pretty serious. I used to usually just routinely go for the absolute top mobo, but now those have gotten expensive enough that it's a bit hard to believe they can deliver enough to justify the price (except, I s'pose, for those who are willing to pay about anything to get 1 MHz faster).
Then again, except as a hobby to see what you can do, I don't get most people overclocking either. Quite a few seem to spend more time tweaking settings than they do actually running the thing...
 
user8104581
7:16 PM
rarely see so many truths in only two messages
 
@JerryCoffin it's about the need for speed!
 
@JerryCoffin I know it seems I've been on a bit of a VRM rampage lately, but in doing so I've had my eyes opened into how crap some boards are and how it affects performance.
 
@Rick Yeah, I guess I got that out of my system by working on actual race cars when I was young...
@Mgetz Eh...one of the defining characteristics of a Lounger is out-nerding everybody else on earth--and the more obscure (or at least abstruse) the subject matter, the better...
 
@JerryCoffin I got it out of my system when my stupid brother made me help him restore a stupid old mustang.
 
@JerryCoffin I'm pretty sure @Mysticial probably wants to just bap me on the head and go on with that mATX board in blissful ignorance by now
 
7:20 PM
I have hated cars ever since
 
@JerryCoffin In my case, I'll spend a stupid amount of time tweaking for a few weeks. After that, I completely lose interest and just want the damn thing to work. Especially if my attention has shifted to something else - like another build.
 
user8104581
I think people often end up spending so much on their hardware that they sacrifice other things in their lives, or trying to spend really little, then regretting when it doesn't fits their uses
 
@Mgetz I acknowledge that the board isn't great. But it's still the only mATX option.
The other part is that I don't expect to be able to OC it much if at all since these AMD chips are already maxed out.
 
@andreyrk It's called bro time dude.
you fix shit up so you can shit talk your buddies and whatever they are working on.
 
@Mysticial so that's the part I'm worried about, that part is very cooling and board dependent. The chip basically will keep going until the board says "Uh NOPE" and that's set by the board vendor below what their VRMs will blow up at.
 
7:22 PM
@Mysticial Yeah--I suspect quite a few overclockers are going to find them pretty disappointing. Not because they're slow, but because AMD has simply automated things to the point that you pretty much drop it in, and it goes as fast as it can. Which does make @Mgetz's concerns more serious: power delivery (among other things) is more likely to really affect speed for an average user, not just the dedicated OC crowd.
On the other hand, I think it's had more effect than most people realize for a lot longer than most people realize either. My ancient Kaveri box will still keep up with (and sometimes beat) brand new Best Buy-level machines.
 
@JerryCoffin That probably says more about how shitty the Best Buy machines are? :)
 
@Mysticial Yeah, mostly. Point is, a potentially fast CPU can still be massively handicapped when surrounded by bottom-end mobo (and such). Certainly not claiming that my build was anything at all magical or even impressive--just decent quality mobo, power supply, and peripherals (and, not that it really matters, but also a case large enough to house a small family).
 
7:38 PM
@JerryCoffin In the past, I've never had any problems with cheap mobos when I'm not overclocking except for various board components overheating.
IOW, even the cheap stuff can handle the chips at stock. Except maybe the FX-9000 series where certain board explicitly said that they can't handle it because it draws 220W stock.
 
@Mysticial yeah that's because in the past the only components that acted like this were GPUs
 
@Mysticial I suspect your idea of "cheap mobos" is still quite a bit better quality than Dell/HP/etc., idea of a cheap mobo. When I see a current i7 that only barely keeps up with a 5 (or so) year-old Kaveri, I'm pretty sure the i7 is running a little below its potential anyway...
 
@JerryCoffin I suspect there are going to be people in for a rude surprised there. I suspect that the IHVs will actually use this to their advantage to create segmentation
 
@JerryCoffin That's probably true. All the DIY mobos will support all chips that fit the socket - including the highest end ones. (the lone exceptions being the FX-9000 series) Whereas all the OEM crap only needs to fit that one chip they sell with.
 
@Mysticial well it needs to meet the mimimum spec for all the chips for that socket, which for AMD for a 105W TDP part is 143W delivered to the socket IIRC... which is garbage
they are allowed to exceed that significantly though
GN has a video that explains a lot of this on PBO vs PB2 etc
 
8:16 PM
@Rick fixing cars is 90% about beer 10% about cars
 
@Mikhail does the game come with a truck of beer? if not it fails
 
lol, and computers are 99% CPU pin measuring and 1% beer lol
 
@Rick Whiskey or vodka, usually consumed after dealing with an annoying issue
 
Its a good game, after playing it, I feel I could build a car. Also you're required to keep drinking. Great way to Finnish your week.
 
8:26 PM
this was my first car
it could smoke any other car on the road. Literally it would not be safe to breath if you were driving behind me.
 
Yeah, I got emphysema just by looking at it
BTW, my first car was a Peel P50
 
lol P50 cracked up the moment I saw it.
 
the good old days of British engineering austerity
 
9:20 PM
Ever since you guys told me it was socially acceptable to use continuations (pass std::function to another function), my code quality has rapidly deteriorated into a Borgesian Labyrinth of control inversion.
 
we all told you to stop doing it
I may have said something about std::function parameters before as well, I’m not sure
 
Really I blame Jerry
class render_engine :private boost::noncopyable
{
public:
	typedef std::function<void(const raw_io_work_d& frame, int frame_id)> auxiliary_render_function;
	virtual void deep_copy_raw_frame_from_another_thread(const raw_io_work_d& frame, int frame_id, const auxiliary_render_function& render_function)=0;
};
Look, it was so easy to generalize rendering!
 
Use std::function_ref<R(Args...) noexcept> for callbacks
 
Now I can pass a functor to deep_copy function to write file after it was rendered.
 
Alternatively boost::signal2
 
9:35 PM
I mean, I have Qt signals
 
Speaking of callbacks, std::filesystem lacks a file copy function with a progress callback
 
So I guess the signal approach is to issue a signal instead of passing a functor?
 
@Mikhail a deep copy callback that takes a reference?
 
You issue a signal, and people decide or not to connect functions that will be called when the signal is emitted, no matter when it's emitted or where
 
@LucDanton Yes, it deep copies what was in the reference...
 
9:37 PM
there’s an argument to made for copying in the parameter
 
I'm scared of making an extra copy because I don't actually know C++
void deep_copy(big_struct my_struct){this->my_struct_=my_struct;}
 
ELIDE ALL THE COPIES
 
fair, but you should balance it against your fear of passing in a reference while not actually knowing C++
@Mikhail missing a move
 
if you have to use "this" it means your design is probably bad
 
9:42 PM
Or it means that's you're using something in a template which isn't type-dependent
 
still bad
 
Or maybe I made a quick example
But yes, the template thing is a good reason to use the this keyword
 
I mean, you don't have a choice to not use it in this case
Well, the choice is called -fpermissive and is non-standard
 
@Mikhail yes
 
^ I never quite understood the advantage. Seemed like more code so I turned that check off in my static analyzer :-)
 
9:46 PM
I find that the more reference parameters on a function the harder it is to review, so I always welcome the opportunity to remove a couple
 
Be honest: how does the following code make you feel?

std::vector<std::string> get_names();
…
std::vector<std::string> const names = get_names();

Frankly, even though I should know better, it makes me nervous.
 
advice from 10 years ago
 
Its been 10 years and I'm still too scared to pass by value
 
10 mins ago, by Luc Danton
fair, but you should balance it against your fear of passing in a reference while not actually knowing C++
all in all I don’t want to sell you a silver bullet; if it doesn’t work for you then that’s fine
keeping in mind the costs of using references is more important
 
By cost you mean errors due to unexpected sharing?
 
9:51 PM
Concurrent updates, dangling references, etc.
 
@Mikhail to be explicit I’m mostly talking about development costs as when I mentioned reviewing code, while I do realise you’re more talking about the generated code
 
As long as you're working on a local copy, you know that the risks to nuke something you shouldn't have are low
 
The sad part is that I spend at least an hour a day doing code review, should probably have learned C++ years ago
 
@Mikhail a nice companion question to this piece is: do you find yourself performing defensive copying in your code?
 
That is indeed a good question. I've made that mistake before, but no. In my case the item is deep copied into the producer-consumer queue, so it lives in a container and only one thread accesses it, etc... So, its entirely about me not knowing exactly when objects are copied in cpp :-)
 
 
1 hour later…
11:11 PM
eh, the joy of working at home. I was happy went we bought the house because my office would have a lock on the door
1 month later my 2 years old daughter found out how to unlock it from outside while watching how my wife did
 
Time to change your daughter
 
my daughter is way too smart for her age in some case.. the other day I was in the middle of a meeting and press the restart button on my comp
and said something in the line "you finished working"
 
11:28 PM
Is it acceptable to ask a question in here about threading mechanisms in C++?
 
@Mikhail My evil plan continues to fall into place!
 
...Anyways, I'm asking here because I think it's simple enough to ask without posting an actual question on SO. I'm looking for a mutex like object that would basically work like this:
`
// accessible objects to both functions
std::mutex_like_lock thing;
Queue queue;

// Thread 1
while(active){
thing.wait(); // blocks if locked, continues if and as soon as unlocked
if(!queue.isEmpty()){
queue.dequeue();
...
}
}

// Thread 2 - manages a queue
Item* Queue::dequeue(){
...
if(isEmpty()){
thing.lock();
If nobody knows anything, I'm okay with that. I'll just continue searching the web, to see if I find anything. I thought if anybody knew exactly what that thing would be. And just point out the name of it to me.
 
@Mikhail Thanks I'll take a look at it.
 
11:41 PM
@El8dN8 I don't get this... why not just use the actual ask question button that's the sole point of the site?
 
@Puppy yes>
?
@Puppy I thought it was "too simple" of a question. And if anybody in here already knew about, a simple reference or name of the standard library object would have been enough.. Any more than that I would definitely understand posting a question about it.
 
btw I put a 500 point bounty on some question, you should up vote it for no good reason: stackoverflow.com/questions/57084975/…
 
user8104581
looks decent hmm guess it deserves an upvote
 

« first day (3204 days earlier)      last day (1758 days later) »