« first day (3380 days earlier)      last day (1551 days later) » 

1:53 AM
Oo, google deposited $100 into my company account in December last year & I didn't know until today. Possibly from one of my passive cash generating accounts.
 
2:26 AM
AWS for developer program doesn't list Kotlin as a possible favourite language.
 
2:40 AM
0
Q: What are the new features in C++20?

vuko_zrnoC++20 is now feature freeze for some time. What are the new features it will bring compared to C++17? Are there any fundamental changes that will be used in everyday code?

 
2:50 AM
How can I make an if condition like this: "1" == 1?
 
You can't do it directly, "1" is a string (2 character array), 1 is a number.
But you can compare them indirectly, converting string to int using atoi.
 
3:15 AM
@X4748-IR if you want that condition to evaluate to true, you really need to brush up on the type system c++ uses.
 
@CaptainGiraffe Yeah. I want it to be true.
@TelKitty I have a string like this: char text[] = "1 hello 2 world 3"; I want to get the sum of the numbers
 
@X4748-IR In this case you are comparing two very different beasts. You're asking if a const char* is equal to the integer 1. This will never be true.
@X4748-IR Also this is not a good place to ask about this stuff. Try the main site instead, explain your goals and what you have tried.
 
I solved the comparison part, but I don't know how I can convert a char to string. When I try things like (int)string it doesn't return the number! I get its bytes I think.
 
I see you and your goal, and there is only a small hill in between. It's just that, you could barely walk ...
 
3:58 AM
 
4:20 AM
> When a plugin is first opened, the init functions of all packages not already part of the program are called. The main function is not run. A plugin is only initialized once, and cannot be closed.
I wonder who decided it would be a good idea to design a plugin system like that in go
I guess it went like that in the Golang design room!
- Guys we need plugins!
- Okay but we don't really have any memory safety feature, what do we do if someone want to remove a plugin?
- Ah I got an idea, with a language quick like that why simply not tell the user to restart the program
- Clever guy!
It's like the Java Garbage Collector that doesn't actually do anything. Memory safety at its best
That said, it's not the worst idea considering how unloading a plugin can be a pain in the ass.. For example, the framework I work on in python allows hot loading modules at runtime and uninstalling them... The downside is that any code change requires restarting the server... And unloading a module is technically not possible even if technically python allows it
 
5:06 AM
 
 
3 hours later…
user7659542
8:04 AM
I have the impression that one should always include everything in his sources and not his header files. (Unless the header file eg uses smth like inttypes for its function signatures)
 
templates :-)
 
user7659542
Otherwise, by including everything in the header file you are increasing the compilation time
 
I put most of my template implementations in cpp files too
 
user7659542
you ll recompile a header file which may have already been compiled to a .o file with another source
 
but that's because most of the templates I write only need like a handful of instantiations and I can explicitly specify them
 
user7659542
8:07 AM
Why do people even put all their includes in their header files?
 
user7659542
Unless that specific header file needs smth specific, there is no need to do that. Hide all that crap
 
because it's annoying if you don't have the types that the header file uses?
 
user7659542
The user of your lib isn't interested in knowing that you use stdbool.h internally
 
if it's for internal use, sure. But you include the ones that define the types you use on the interface
 
Yeah, so ideally, you'd include as little header files as possible
 
user7659542
8:08 AM
@PeterT That is the what I mentionned earlier. That is the only valid reason imo.
 
I've never seen someone deliberately including anything else
 
user7659542
if the header contains bool myFunction(void); then yes include stbool in there. Otherwise put that include in the source
 
user7659542
@PeterT I ve been at a company where the coding rules stated that you should always put all your includes in the header file.
 
that is stupid
maybe they worded it unfortunately
I can't believe that wouldn't mean "any includes you need to consume the header"
 
user7659542
If you were to have two layers of code one application layer and one driver layer. How would you call a layer between those 2? Ie a layer which is used to simply prepare arguments to call the driver's api, so you don't pollute the application layer with that
 
user7659542
8:18 AM
middleware layer? idk...
 
wrapper?
 
user7659542
it doesn't really wrap. It is just an intermediate layer imo
 
user7659542
a wrapper would be on both sides of the driver layer I think
 
I just call everything that just hides some Interface and provides an alternative API without much logic a wrapper
 
middle layer
 
user7659542
8:57 AM
I have one thread A with its local data waiting for a reply. While it is litterally waiting another thread B processes all replies. What would be the best way to have B notify A asynchronously its reply arrived
 
user7659542
so it in some sense gets interrupted updates its local data with the info from the reply and only then continues
 
I find your question unintelligible
 
nwp
Message queues are the relatively easy way if you don't need to implement them yourself, condition variables are the alternative, but it takes a bit to wrap your head around those.
 
use a std::future if you're specifically waiting for a reply or build something with std::condition_variable
 
Almost never use std::future because it defeats thead pooling
 
9:02 AM
how does it defeat thread pooling? I've used with thread pools.
 
There is a good chance it will spin up a new thread for every work item
 
what? I wasn't talking about std::async
I was talking about doing your own std::promise/std::future stuff
 
 
1 hour later…
user7659542
10:18 AM
Does C99 somehow support atomic variables?
 
it has optional atomics I think or was that C11
nvm what I was thinking of was C11
 
user7659542
I have the impression to read some contradictions
 
nwp
It says C11 here. Maybe they have it as a TS in C99 already, but I doubt it. You should probably just use C11 C++ Rust.
 
user7659542
this post claims it is supported by C99
 
user7659542
4
A: Does GCC atomic buitlins work with std=C99?

Shafik YaghmourIt is a compiler extension and therefore it is allowed to provide functionality outside of the what the standard allows but that page does not make it obvious that is the can be used in C. Fortunately, gcc does have good online documents and if we check out for example the 4.9 series document on...

 
user7659542
10:20 AM
Yet when opening the link to the GCC documentation it states C11
 
oh, compiler extensions for sure
I thought you meant with just standard C99
 
user7659542
hmm idk...
 
user7659542
I just want atomicity. If that means we ll be stuck with gcc so be it
 
user7659542
better being stuck with gcc than not having atomicity at all
 
nwp
Ah, the problem is that you're using MSVC and Microsoft doesn't care enough to update their C implementation.
(that was a guess. Did I guess right?)
 
user7659542
10:22 AM
@nwp Hmm, nope. I use vi
 
user7659542
@nwp Nope
 
nwp
What do you mean by "stuck with gcc"? Clang should support C11 just fine.
And apparently MSVC is not relevant to you.
 
user7659542
@nwp I am using c99
 
nwp
But why?
 
user7659542
@nwp aviation certified systems
 
user7659542
10:26 AM
we use an old version of gcc as well
 
nwp
I screw around with certified code as well, just medical instead of aviation. There is no requirement to use ancient tools.
No version of gcc is certified, so from the certification process point of view they are all equally good and you may as well use a proper one.
 
user7659542
@nwp We use a proprietary certified RTOS, with its provided tools. Those tools are older
 
user7659542
We may be switching to a total different system in a near future. But for now it is C99 and older tools
 
nwp
Does the RTOS certification depend on the gcc version?
 
user7659542
@nwp IDK. The software is being built with their tools, which includes gcc and does all the licensing stuff behind the scenes. I don't think we would be able to build our software with another compiler
 
user7659542
10:34 AM
implicit declaration of atomic_store_n
 
user7659542
What are you supposed to include and link to get that function?
 
user7659542
Doc doesn't state it
 
does the name "builtin" clue you into something :P ?
 
nwp
Built-in means they are hardcoded into the compiler, you don't need to include anything, just like for int.
 
user7659542
10:37 AM
yes, but still it doesn't seem to have those functions
 
user7659542
although it is builtin
 
nwp
But chances are the gcc docs you're looking at are for a different version of gcc than the version those people gave you. So you should find old docs for that version which probably doesn't have atomics.
 
Maybe mutex/lock? (pthreads?)
 
user7659542
@Mikhail No please :'(
 
user7659542
I'd like to try working with atomic stuff
 
10:38 AM
@traducerad you can disable the extensions with compiler flags, are you specifying C99
 
Writing your own spinlock isn't too hard :-)
 
user7659542
@PeterT yes, -std=c99
 
@traducerad try -std=gnu99
 
user7659542
@Mikhail spinlock in userland are not a good idea
 
user7659542
 
10:40 AM
Yeah I know
 
user7659542
@PeterT still "implicit declaration"
 
I've done a bunch of custom spinlocks in GPU code
 
@traducerad did you not specify the type of the atomic?
 
user7659542
@PeterT What do you mean? I just compile with -std=gnu99 and just call the function __atomic_store_n on some of my variables, that's it
 
user7659542
@Mikhail Linus would tear you apart
 
user7659542
10:45 AM
maybe my compiler version is too old?
 
apparently older versions had the _sync* versions
 
user7659542
Hmm I am using 4.9
 
user7659542
tried __sync, but still undefined
 
Torvald's comments are unreasonable when you consider the context. AKA the Windows scheduler doesn't have no problems. So claims "developers shouldn't do that" have little merit, when they already did and it worked fine.
 
user7659542
I don't know what may be causing this, as it is builtin
 
user7659542
10:53 AM
Ow wait!
 
user7659542
Seems like I am using gcc 3.2
 
wow
 
user7659542
@PeterT seems like I am out of luck?
 
no clue if gcc supported it, but if you're bound to a specific platform anyway then just use your platforms atomics?
 
nwp
Yolo volatile FTW.
 
user7659542
10:56 AM
platform atomics, in what sense?
 
user7659542
@nwp volatile doesn t guarantee atomicity
 
well if you are only supporting one processor architecture that architecture has certain guarantees
so like test and set for intel stuff and others
 
nwp
It doesn't. Everything with threads is technically UB. You gave up writing standard-compliant code a long time ago.
 
user7659542
Hmmm
 
user7659542
I ll just use a mutex
 
user7659542
10:58 AM
:'C
 
20 mins ago, by Mikhail
Maybe mutex/lock? (pthreads?)
 
user7659542
@Mikhail I know I know
 
@nwp I didn't say that the standard gives you thoses guarantees
 
user7659542
I wanted to try smth else
 
nwp
@PeterT Sorry, I forgot to make an arrow. That was directed at "volatile doesn t guarantee atomicity".
My point was "the standard doesn't help you, you need to look elsewhere". volatile is one way, inline assembly another. See what works and hope compiler optimizations don't screw you over.
Then again the context was certification. I'm sure they have restrictions on what you can and cannot use for the certification to hold, and yolo volatile and inline assembly is probably not allowed.
 
user7659542
11:11 AM
Does it make sense to wrap recv(2) with a mutex?
 
user7659542
I can understand that you wrap send(2), but what about recv(2)?
 
Those are blocking operations, so they are already thread safe?
 
user7659542
11:41 AM
@Mikhail not if yuo get preempted
 
user7659542
in the middle of a transmission
 
12:56 PM
Hi
 
ho
 
nwp
Rude
 
Aw, even as an owner I can't delete old messages
There go my dreams of rewriting history
 
1:40 PM
I was making a snow white joke ;_;
sorry
 
ho/hoe are my new pronouns
 
nwp
I don't like hoe anymore.
 
:(
did you ever
 
nwp
For a while.
 
Damn, I feel bad at getting consistently liked, it's difficult
Maybe if I actually gave more love back to people
 
nwp
1:46 PM
Wait, you feel bad for being liked? You're really not making it easy on people or yourself to make you happy.
 
It's tough when people like you, but you don't really like them back yet you feel like they still deserve to be liked
You know, human interactions and all that shit
 
nwp
Well, I still like you enough to tell you that I don't like you so you don't feel compelled to have to interact with me.
 
user6461957
>>> ho/hoe are my new pronouns

How does the declination go?

Does that match she/her regarding usage? So:

ho/hoe

ho = she
hoe = her

so hers would be hoes?
 
user6461957
"Hoeself"? Is that correct?
 
user6461957
Sorry I am pretty uneducated about this...
 
1:56 PM
A hoe is an ancient and versatile agricultural and horticultural hand tool used to shape soil, remove weeds, clear soil, and harvest root crops. Shaping the soil includes piling soil around the base of plants (hilling), digging narrow furrows (drills) and shallow trenches for planting seeds or bulbs. Weeding with a hoe includes agitating the surface of the soil or cutting foliage from roots, and clearing soil of old roots and crop residues. Hoes for digging and moving soil are used to harvest root crops such as potatoes. == Types == There are many kinds of hoes of varied appearances and purposes...
 
nwp
Banned for calling Morwenn a tool.
 
159
Q: Has Stack Exchange rescinded moderator access to the featured tag on Meta?

Mad ScientistA while ago, Stack Exchange removed "Hot Meta Posts" from Stack Overflow's sidebar (the "Community Bulletin"). To compensate for this algorithmic selection of questions, they gave Stack Overflow moderators the exclusive right to decide what to feature in the sidebar: tl;dr: We're removing the...

 
@nwp that's an interesting way to put it
@d03 that was troll on my part, I go by they/them (but optionally accept he/him and she/her)
 
There is an achievement in WoW "Massive Tool"
 
You did put your finger on the interesting nuget showing how the form a/b is insifficient when you'd need like a/b/c/d/[e] to have enough information to use most pronouns
 
2:05 PM
@Morwenn to be fair it could have gone muuuuuch worse as in the US there is a racial component to that
using language that I'm not allowed to even directly discuss here
 
really?
 
user6461957
@Morwenn
Ah, okay.

So then they/them and the declinations are similar to she/her or he/him probably.

Is there a website with declinations?
 
user6461957
(So that I can use it correctly.)
 
I think that there are pronouns resources and databases around, but I never quite checked
they/them is actually quite tricky because they kind of use a mix of singular and plural form
 
@Morwenn really really. I'm hesitant to even go into details. But it's in the lingo of a specific minority, although it could be called a subculture
 
2:08 PM
Like you'd say "Morwenn is French, yeah they are French", with the plural form only kicking in when the pronoun is used instead of the noun
 
user6461957
If you prefer they/them I will use these terms. I hope you forgive me if I make some mistakes. I will try to correct them.
 
@Mgetz Linguistics are interesting, I'd be interested to get robot's pov on those
 
@Morwenn AIs get very racist very quickly when exposed to pop culture IIRC
 
pop culture? or intenet memesters and edgelords?
 
@d03 it's ok, I usually don't care enough to correct people since most of the common pronouns somewhat fit
Plus even though I like they/them the most in English, it's just too complicated to have an equivalent in French so I just fallback to the old he/him even though a few people use she/her for me
 
user6461957
2:10 PM
I will try my best to use your preferred ones.
 
@Morwenn getting non-binary pronouns in official french would require an act of government IIRC
 
@d03 Thanks a lot for trying :)
@Mgetz even if we don't care about the government or the Académie Française it's just too complicated: pronouns are the tip of the iceberg, most of the language is gendered
 
@Morwenn the ironies of gender in english are... extensive. Modern understanding of gender didn't really apply until victorian times
 
As far as pronouns go iel is fine in French and slowly makes its way in the parlance in the community of people who care, but nobody has a solution for the rest of the language
 
previously it was extremely common to refer to women as he/him, in court documents unless their sex was relevant to the proceeding
 
2:15 PM
The issue is the link between people's gender and grammatical gender
 
user6461957
@Mgetz where? America?
 
@d03 UK/US but yes english speaking countries. The modern notions of gender IIRC arose from the victorians
previously it wasn't as big a deal unless you were a noble
 
user6461957
they is "sie" in German and "them" is also "sie" in German...
 
This lead to some awkward interactions between the law and the people... like people 'selling' their wives because they weren't allowed to have a divorce but there were provisions in the law for things like that. Both parties were consenting, and the 'sale' was just symbolic for the law, honestly the historical record seems to indicate they were mostly to mock the law.
but gender is at least in my opinion mostly a social power construct anyway
 
lol
 
2:19 PM
Oh yeah.. the 'buyer' was almost always pre-selected and the wife had to consent to the deal.
In many cases the Seller would use the 'proceeds of sale' to toast the new couple
 
Laws and how you can bypass them are weird sometimes
 
user6461957
So strange laws, I assume these were 100s of years ago...
 
so the 'advantage' of common law is that it's based on societal expectations. The disadvantage is the same.
 
So many things have changed in the last 100 years that it's difficult to tell what changed when exactly
 
In theory common law can change much faster than statute law
 
user6461957
2:22 PM
In Germany women weren't allowed to drive up until the 70s as far as I remember.
 
for example most americans believe that being gay is already protected under the law, even though it isn't
so if common law was still valid in the US (which in theory it is, but really isn't) a gay person could sue and win for discrimination insofar as they could convince a jury
 
Humans are one of the most obedient animals I know of.
 
If we weren't kind of "obedient" (aka willing to follow rules even though they're not always to our own direct advantage) we probably wouldn't be able to live in such societies
 
Social contracts
 
Apparently we also have all the symtoms of domestication we witnessed in other animals
So there's that
 
2:26 PM
Also the belief that such a society is the best ... no proof whatsoever.
 
> In the case of "self-domestication", it is proposed that human characteristics resembling domesticated traits in animals should be labelled "domestication-like", or better, objectively described as genuine adaptations to sedentism.
 
whelp it's going to be a fun day in the US
 
define best
 
user6461957
Oh wait, women were able to get a driver's license, but if the husband said no, then they couldn't up until 1958.
Article is in German, but here it is: https://www.weser-kurier.de/deutschland-welt/deutschland-welt-fotos_galerie,-frauen-in-deutschland-wann-sie-was-durften-_mediagalid,38821.html
 
Because without a society with modern medecine I wouldn't have been born, and even if I had been born I'd be already dead for long x)
 
2:28 PM
@TelKitty well it's relative to the cultural expectations. Not all cultures are the same. For example german and american culture see being racist as shameful where most cultures it's just a fact of life
not saying being racist is good btw
@Morwenn complications? I know I wouldn't exist, I'm in-vitro
 
I was born through C-section I month earlier
 
ah incubator
 
I've had allergies for a long time, plus a few health issues when I was younger
My teeth would be fucked
 
yeah my sister was a halo baby, she had to be c-section or she'd have killed herself on the way out
 
And I'm trans on top of that, which probably wouldn't have helped with anything
My issue was that the placenta wanted to leave first apparently
 
2:32 PM
not to different, you'd have had the same fundamental issue of not being able to get oxygen to your brain
 
nice
If I consider that life was worth living, then yes we live in a good enough society x)
 
user6461957
:/
 
It always amuses me when I describe to friends the fact that I have to be willing to leave everything behind at a moments notice if things go bad.
They don't understand how that could possibly ever happen
 
How so?
 
user6461957
Depression?
 
2:37 PM
@Morwenn Pogroms happen, usually with little warning. Usually people you were friendly with the day before will be participating to save their own hides and won't help you.
 
Oh, that kind of thing
 
At that point it's do whatever is necessary to get to safety at all costs
yes "That kind of thing"
which is still a very real danger even in western countries
 
Yeah, I also consider from time to time that in case of deep social trouble I need to fuck off abroad very fast if I want to keep getting medicine
I don't know your specific situation, it sounds like it's even worse
 
user6461957
Ah that makes me sad to even read that...
 
Minority religion in a 'christian' society that didn't used to be so 'christian'
 
2:40 PM
oof
I'm glad Christianity is half-dead here
 
user6461957
It's like almost all over Europe.
 
I went to Church a few times when I was younger, like for Christmas, but the only time I had to go to a religious event at the Church lately (for a marriage) it felt suuuuuuper awkward
 
@d03 most of western europe is acutely aware of the dangers of religiosity
Central and eastern europe it's still a rallying point sadly
 
Most of Western Europe fucked up half of the world in the name of religion
 
user6461957
Ah true, countries like Poland for example.
 
2:43 PM
@d03 I have never felt more unwelcome than I did I Poland
they do not like talking about the holocaust
 
user6461957
Though the Czech Republic is mostly atheist if I am not mistaking.
 
Austria always hides behind Germany too when it comes to the holocaust
 
@d03 ironically they have a thriving jewish community, probably because of the larger atheism
 
It's handful having a neighbour willing to take up most of the responsibility
 
@Morwenn Well too be fair most of western europe tries to pretend that SS collaborator units didn't exist
and that their own local police didn't collaborate
 
2:46 PM
lol
Breton independentists collaborated with the nazis
Because the nazis used the independence of Brittany from France both as a bait for Brittany and as a scarecrow for France
 
my favorites are the Finns... who collaborated but when pressed by Hitler about their jews basically said "See ya!" and switched sides
 
user6461957
What I find funny about Slavic countries like Poland is that some of them do sympathize with Hitler. I mean weren't Slavic people considered "Untermenschen"? So why are they sympathizing with them?
 
@d03 Because the soviets forbade teaching about the war other than germany was evil. Even east germany has this problem
Also most of the eastern block wasn't left leaning even before the war
it was extremely autocratic, and they've reverted to that
 
user6461957
It's just strange to me when I see Slavic people sympathizing with Hitler's ideology.
Like they are hating themselves... I mean it is like black people joining the KKK.
 
user6461957
People are strange.
 
2:51 PM
@d03 depends hitler used divisions between various groups to split people apart, so the Ukrainians were 'good' but russians were 'bad'
even in poland the more germanesq areas were 'good' and the more slavic areas were 'bad'
 
This was quite an extensive pattern for what it's worth. While he would have likely turned on them eventually he never got the chance
 
user6461957
Thank goodness those times are over. Hopefully we won't face something like this ever again.
 
Hiwi ([ˈhiːviː]), the German abbreviation of the word Hilfswilliger or, in English, auxiliary volunteer, designated, during World War II, the member of different kinds of voluntary auxiliary forces made up of recruits indigenous to the territories of Eastern Europe occupied by Nazi Germany. Adolf Hitler reluctantly agreed to allow recruitment of Soviet citizens in the Rear Areas during Operation Barbarossa. In a short period of time, many of them were moved to combat units. == Overview == In late 1942, Hiwis comprised 50 percent of the 2nd Panzer Army's 134 Infantry Division, while the 6th Army...
 
We're got a rise of fascism and all kinds of extremism through Europe and many people want scapegoats, so we're unfortunately seeing some bad things come back
The US are a great example
The press is being more and more controlled in many countries, and the police has more and more rights and its answers tend to be more violent than they used to
 
2:56 PM
Welcome to the dynamics of power, there will be another major genocide in the west
and as much as I hate to say it... probably in the next 50 years or so
 
Not sure what will get us first
I'd expect global warming to create terrible situations in the Southern hemisphere, and because of globalization the Northern hemisphere will also be hit - before even global warming takes its toll here - and we'll be fucked up by a social revolution of some kind
Or more of a societal collapse
And since the police annoys people who want to die decently you won't have pretty choices by then
 
@Morwenn well remember that the police are being pandered too by people that want their support in a power struggle. Because that side knows controlling the military and the police de-facto gives you sole control
 
user6461957
"The shift from globalization to
localization and other global macro trends underpins much of Bank of America
Merrill Lynch’s outlook on the markets and economy next year."

https://www.bloomberg.com/press-releases/2019-12-03/bank-of-america-merrill-lynch-2020-market-outlook-profits-rise-economy-slows-globalization-peaks-and-business-as-usual
 
user6461957
If I understood that correctly, we will observe more nationalistic policies throughout the world.
 
likely correct
 
3:02 PM
Localization will only save some of us, surely not in the long run, and only if we stubbornely tell the rest of the world to go away and die by themselves, which isn't a satisfying status quo
 
because why blame things locally for the problems when you can blame X or Y group that people already are racist towards
 
user6461957
People can't have shades of grey, everything needs to be black or white, apparently.
 
@d03 it's easier than admitting they might be part of the problem and it's complicated
 
We're fucked
I need to pile up hormones and inhalators x)
If we take enough positive actions we might make it to the end of our life and let the great downfall to the next generations
 
user6461957
I believe in the principle that every contribution counts no matter how small.
 
3:10 PM
Oh, for sure every contribution counts
But we will need more than what we already have
 
user6461957
Yep.
 
burn it down
 
My father visited a factory where our waste is sorted for recycling yesterday
He told me: we're literally sufficating under our own waste, it's both impressive and utterly terrible
 
@Morwenn it wasn't an issue until the 60s when everybody switched from glass/metal to plastic
previously you'd reuse or recycle and there was a deposit on the items
so you'd get some amount back for turning in the bottle/tin
then the bottling industry wanted to save money, and began blaming consumers for waste
 
Reuse really is the word: now everything is disposable
 
3:22 PM
just like jaywalking wasn't a crime until car companies wanted to sell more cars
 
What were the numbers? Paper can be recycled 6~7 times, plastic can be downcycled like twice
 
also jaywalking is a really nasty term
 
Yeah, plus you can tell the consumers all you want to buy things without so much wrapping, you've got to remember that finding most of your food not overwrapped is an effort x)
 
Jaywalking occurs when a pedestrian walks in or crosses a roadway that has traffic, other than at a suitable crossing point, or otherwise in disregard of traffic rules. The term originated with "jay-drivers", people who drove horse-drawn carriages and automobiles on the wrong side of the road, before taking its current meaning.Jaywalking laws vary widely by jurisdiction. In many countries such as the United Kingdom, the word is not generally used and there are no laws limiting how pedestrians can use public highways. This has caused confusion among tourists and other people visiting countries with...
@Morwenn well it wasn't an issue when food wasn't centrally processed
when food largely was local wrapping isn't really an issue
 
@Mgetz I mean, there's being wrapped and being overwrapped
 
3:27 PM
@Morwenn agreed
 
Japan is terrible in that regard x)
 
@Morwenn it is but they are still more efficient in waste disposal than most of the west
 
Overwrapping is like boxing your integers, who does that /s
@Mgetz Really? I heard contradicting claims in this area
AFAIK they sent most of their plastic to China - just like most of Europe - and are now close to crumbling under the weight of the plastic they can't send there anymore
Plastic has been sent to Thailand, Malaysia and Vietnam in the meantime but they're all banning plastic imports for recycling
We're trying to bring back deposits in France but it's going to be slow
 
3:45 PM
user image
2
 
user7659542
4:04 PM
How the hell has this software ever managed to work, lol?
 
user7659542
on a single core cpu, you have essentially two threads running. A producer and a consumer thread. At least a hundred variables are shared
 
user7659542
but no mutex or anything alike to see anywhere!
 
@traducerad because it assumes cache coherencecy (not always a guarantee btw)
it's really really bad practice
sadly extremely common in old game engines
 
user7659542
this being said I think the could size would skyrocket if you were to wrap every variable update and consumption with a mutex
 
user7659542
is there a clever trick out there for such situations?
 
user7659542
4:10 PM
On reception of a TCP IP message thread A updates a corresponding structure used by thread B
 
user7659542
100s of messages are handled so hundred of structures have been made
 
@traducerad not really? it's hard to outperform std::mutex and std::atomic
@traducerad lock free or atomics
 
user7659542
what I thought
 
the linux kernel uses RCW
 
user7659542
Revised Code of Washington (RCW)
 
user7659542
4:12 PM
What does it stand for?
 
oops RCU
In computer science, read-copy-update (RCU) is a synchronization mechanism based on mutual exclusion. It is used when performance of reads is crucial and is an example of space–time tradeoff, enabling fast operations at the cost of more space. Read-copy-update allows multiple threads to efficiently read from shared memory by deferring updates after pre-existing reads to a later time while simultaneously marking the data, ensuring new readers will read the updated data. This makes all readers proceed as if there were no synchronization involved, hence they will be fast, but also making updates more...
basically it's a lock free technique
 
Some want it in the standard
The same also want hazard pointers
Me - a noob - has no idea how tf those things work
 
it's also largely being replaced in some cases with things like ring buffers
In computer science, an algorithm is called non-blocking if failure or suspension of any thread cannot cause failure or suspension of another thread; for some operations, these algorithms provide a useful alternative to traditional blocking implementations. A non-blocking algorithm is lock-free if there is guaranteed system-wide progress, and wait-free if there is also guaranteed per-thread progress. The word "non-blocking" was traditionally used to describe telecommunications networks that could route a connection through a set of relays "without having to re-arrange existing calls", see Clos...
 
it's worth noting that more and more spinlocks are being moved away from unless it's kernel managed
 
4:35 PM
locks go spinny
 
 
3 hours later…
7:07 PM
@Morwenn spin to win... a big electricity bill :)
 

« first day (3380 days earlier)      last day (1551 days later) »