« first day (2412 days earlier)      last day (2762 days later) » 

Last year, WHO spent about $71 million on AIDS and hepatitis. On malaria, it spent $61 million. And to slow tuberculosis, WHO invested $59 million. Still, some health programs do get exceptional funding — the agency spends about $450 million trying to wipe out polio every year.
@R.MartinhoFernandes What? It is not my fault!
and look at how successful that is ...
@wilx Woah, what?
@R.MartinhoFernandes The face? :)
10:02
@Telkitty Polio prevalence has decreased by 99% since 1988.
Totally a complete failure.
There were 37 cases reported last year.
@wilx I didn't know it meant anything like that.
@R.MartinhoFernandes It was a joke.
@R.MartinhoFernandes so did smallpox, even before WHO was founded
err, the existence of WHO may or may not be the primary reason why polio is mostly wiped out
I hope you don't think it just happened to disappear.
$450 million a year is nothing, though. With Brexit, the UK is getting $450 million a week to fund the NHS.
10:13
so you are telling me if WHO doesn't exist, governments and other organization will not step in and do the same
So you are telling me that if the WHO doesn't exist, the WHO will come into existence under a different name.
I am telling you, if a disease disappear, it is usually because someone accidentally step on a cure
lol
There's no cure for polio.
or prevention
@Telkitty Yes, which already exists, in case you didn't notice.
(And it wasn't "accidentally stepped on", it was developed on purpose)
10:18
Herd immunity (also called herd effect, community immunity, population immunity, or social immunity) is a form of indirect protection from infectious disease that occurs when a large percentage of a population has become immune to an infection, thereby providing a measure of protection for individuals who are not immune. In a population in which a large number of individuals are immune, chains of infection are likely to be disrupted, which stops or slows the spread of disease. The greater the proportion of individuals in a community who are immune, the smaller the probability that those who are...
I like this term already
almost like "nerd immunity"
user1804599
Might do a new C++ project.
user1804599
@RudiantoPrasetya Might be very obscure J code, but I don't think so.
@wilx Also, seriously, those non-travel numbers seem much lower than I would expect. Their budget seems extremely small.
user1804599
Definitely not APL.
10:23
@rightfold Starting C++ projects is for LOSERS consider starting a KOTLIN project instead
user1804599
Kotlin doesn't fit my usecase.
user1804599
I want to write a garbage collector.
try to fit it nonetheless, because Kotlin
@login_not_failed This is the right attitude
user1804599
Kotlin Jenner
10:26
@wilx For comparison, NASA's budget is 4x the WHO budget. o_O
I accidentally understood how to properly DLL
WHO's parent organization: United Nations
@Horttanainen compile a DLL, make a proper export section inside it, or what?
united nations doesn't have any real power or serious monetary income
NASA is funded by US government
@login_not_failed Ill show you. Just wait
10:31
 By 20 January 2017, when President Trump took office, annual military spending had reached its highest peak ever—$596 billion
dwarfing everything else
user1804599
std::vector::erase "invalidates iterators and references at or after the point of the erase, including the end() iterator."
user1804599
Can I still decrement the iterator at the point of the erase?
user1804599
Or do I have to do that before calling erase?
why do you need it, if it will be invalidated shortly after? I see no point in it
user1804599
The iterator before the point of the erase is not invalidated shortly after.
user1804599
10:32
Also, "shortly after" is very ill-defined. Computers are very fast.
@rightfold Use the iterator it returns.
@rightfold You can't.
user1804599
Thanks, I'll see what it returns.
user1804599
> Iterator following the last removed element. If the iterator pos refers to the last element, the end() iterator is returned.
user1804599
Cool!
«short after» meant «right after decrementing it, looking down the code»; glad it's not working — haven't lost my intuition yet
(and I probably had a wrong idea about «at the point of the erase»)
good morning
not sure I'd go that far
though it is sunny
mkay, not as bad as it usually is — sounds good enough?
@BoundaryImposition sigh
@login_not_failed Here is how to DLL as I understand it: pastebin.com/r9UvcrdE
Please correct me if I got something wrong
As you see the memory handling is done in the dll binary
10:50
@rightfold Use erase's return value
@Horttanainen so you cannot delegate memory management to smart pointers inside DLL? to avoid exposed delete-new pairs
Oh, Robot beat me to it
@login_not_failed The problem is that I cannot export the smart_ptr accross the dll-interface
@Horttanainen yup, that's what I am suspecting — there should be some difficulties with this approach, because otherwise you'd use it
Beautiful thing is that now a C++ class can be exported (as a pointer) and it lives in its own CRT
I am off to lunch. bye!
10:55
bye~
user7011379
i want to learn c++ which is the best resource ?
4
@Horttanainen speaking about CRT, fun fact: the difference between DLL and EXE is in a single field called Characteristics inside IMAGE_FILE_HEADER, which lies inside IMAGE_NT_HEADERS: you can apply IMAGE_FILE_DLL mask to it, or IMAGE_FILE_EXECUTABLE_IMAGE to change how the system treats this binary
@AkhilJain your brain
user7011379
@BoundaryImposition thank u
11:04
@AkhilJain you're welcome
user7011379
@login_not_failed thanks man
@Horttanainen (tbh DLL and EXE entrypoints differ, as well as other stuff, but that one is a core difference :P)
oh welp
another guy I knew commited suicide last friday
that sucks
11:12
kinda
@Telkitty in the discretionary budget yes, non-discretionary items like interest payments, debt payments, social security, and medicare were a much larger chunk
always makes you think if you could've done something
yup, this too
@BartekBanachewicz unless you were actively encouraging them to go to a professional for help you can't do much really
@Mgetz he never listened to that
it was all totally bizarre
it seemed like he just didn't fit in no matter what
11:15
@BartekBanachewicz then you did what you could other than being supportive, depression is not logical. It needs to be treated
I guess so.
The scariest part of it is not realizing how serious it might be until it happens
@BartekBanachewicz another? o.O
@BoundaryImposition last time it was a closer friend
@BartekBanachewicz :(
May 23 '13 at 16:03, by Bartek Banachewicz
Oh and also our friend, as it seems, left a suicide letter for us. He left his LoL password there.
11:17
that was considerate of him
@BartekBanachewicz that's heavy, one of my friends might be in the same boat, but he refuses to cooperate, and his girl seems to be too dumb to see this
@login_not_failed this sucks
@Mgetz hope I'm just making it look worse than it is, but that's how people are making that mistake of not realizing how serious it is
@Mgetz impressive exploit!
11:26
@login_not_failed it's the classic, "don't trust anything it's probably malicious" issue
@Mgetz but subtitles! I would've never think about them being malicious, most of the subtitles formats are just marking up text by time and text sections
@login_not_failed 98%ish of exploits are parser bugs, if you can't be @sehe and be a parser ninja then you should at least assume you have vulnerabilities and fuzz test.
@Mgetz I'll make sure I memorize this line well enough :)
the other thing is that in this day and age it's safer to assume something came from the internet and might be malicious than not.
user1804599
huh
user1804599
11:36
normally when trump visits criminals (e.g. saudi arabia royal family) all hell breaks loose, now he visits leader of huge world-wide pedo network and nobody complains
@rightfold we're waiting to see how he'll piss off the world's catholics with an offhand remark
user1804599
:o
user1804599
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
    value const* elements[];
#pragma GCC diagnostic pop
user1804599
:3
like it or not, Francis has done a lot towards cleaning up the church, the exact opposite of what you could say about trump
user1804599
11:38
Flexible arrays FTW.
@rightfold just use vector?
user1804599
Is vector a flexible array? No.
user1804599
lol unnecessary extra indirection
user1804599
lol storing the length twice
lol at you, for non-standard, non-portable code that will break when GCC decides they don't want to support that extension anymore
Ven
Ven
11:47
and for that will only work on GCC.
user1804599
If you support GCC and you support clang, you are portable.
Ven
Ven
#pragma GCC works on clang?
man I wish school would give us more solo project where we can pick the language.
@Ven The ones that existed on GCC 4.2, yes.
Ven
Ven
@R.MartinhoFernandes TIL, thanks. I'm not sure if I should find that cool or horrifying.
Masquerading as GCC 4.2 was one of clang's design goals.
Ven
Ven
11:51
but I guess they just had to do this..
@Ven It was so that it would work as a drop-in replacement in XCode.
user1804599
@Ven Nice.
It even reports the GCC version macros as if it were 4.2
user1804599
Edge also did this, and it broke our site which only worked on Chrome.
user1804599
It didn't hide the entire site and show the "you MUST use Chrome" error, because Edge tricked the site into thinking it was Chrome.
user1804599
11:52
Had to add Edge to the UA detector.
Ven
Ven
"Chrome (Like Gecko)"
:')
user1804599
If you trick things into thinking you're something else, you better be fucking compatible.
user1804599
Edge is literally Internet Explorer.
To an extent.
Clang isn't bug-compatible with GCC 4.2 :)
user1804599
> Develop a GC that only handles memory allocation, but does not implement any actual memory reclamation mechanism. Once available Java heap is exhausted, perform the orderly JVM shutdown.
user1804599
11:54
lol
Ven
Ven
"What bugs, Marty? Where we go, bugs are features"
user1804599
static_assert(noexcept(array_value()), "array_value must have a noexcept constructor");
auto memory = operator new(sizeof(array_value) + sizeof(value const*) * size);
new (memory) array_value();
std::unique_ptr<array_value, value_delete> upointer(static_cast<array_value*>(memory));
user1804599
what could go wrong right :trollface:
user1804599
also I still know C++ \o/
user1804599
@Ven So does the GC look at arrays specifically, or does it track the order in which objects are being actually accessed?
Ven
Ven
11:58
No goddamn clue.
@rightfold are you proud?
user1804599
No :(
user1804599
Are you? :3
Ven
Ven
@rightfold considering I was to teach it last week, I better remember at least bits.
@rightfold this is because people code like shit and focus only on chrome
user1804599
No, Microsoft should just stop developing browsers and ship Chrome.
Ven
Ven
12:04
nothing could go wrong with a browser monopoly
cough
user1804599
Countless and countless of browser releases, and they're all worthless shit.
Firefox master race.
@rightfold they are decoupling Edge from Windows releases in fall, this should allow it to be a bit less shit
@Mgetz I'm not convinced this is the case, unless you count binary formats ("parsing" implies text, to me).
And yeah. Even for me, it takes a lot of stamina to be rigorous.
If you don't have overruns or similar it's very easy to have DOS vectors.
exploits by definition almost require that some input produces undefined behavior
12:13
@login_not_failed Definitely a fun fact :P
That makes a lot of sense. Though side-channels provide unexpected "inputs"
(E.g. starve a system to exploit lack of error handling. Poison permissions or inject dynamic libraries)
but it's something somewhere that didn't do what the programmer expected it to do or got what the programmer didn't expect it to get
@sehe IRTA Poisson permissions and thought that I would learn something
Hey guys is passing a reference across dll-boundary ok?
12:29
@sehe I do include binary in that, as until you parse it you're not sure what it is. There are a whole host of exploits just around people assuming it's text
I mean that could the object that is passed by reference be living in a different CRT
@Horttanainen yes
@Mgetz ok thx
@Horttanainen depends on the type
yeah it's not a simple answer
@Mgetz it is custom interface
12:37
if the type doesn't expose any inline methods and you call to the other DLL for everything you're fine
if you do or it has template anything be wary
you have to make sure both sides of the boundary expect the same object
huh spotify is fucked on my laptop
@ratchetfreak What do you mean?
I load it up and it freezes. thereafter (until reboot) Windows Photo Viewer just gives me black instead of images
display driver incompatibility?
pfft.
@Horttanainen layout needs to be the same, there is a reason that MS specifies packing on all their structs in windows.h
12:38
@Horttanainen it's not uncommon for std::vector to be implemented differently by different stdlibs or is debug flag is turned on
@Mgetz I think everything is passed to the other DLL. I know that this works for pointer, but wanted to be sure for reference as well
also I like how WinUpd is now randomly giving me an optional update from October 2015
@ratchetfreak That is what I mean by different CRT
@Horttanainen nonnullable pointer == reference
@Mgetz Thanks
12:39
if you want to be super safe then only pass around POD types with explicit layouts
@Horttanainen just think about it this way: is what I'm doing safe for COM? if it's not, consider an alternative
Everything is fine then
I dont know shit about COM :P
@Horttanainen COM uses the fact that the C++ v-table layout on windows is very predictable to allow interfaces to be passed about between various languages
I already came up with this: pastebin.com/r9UvcrdE There is no argumets passed around in this example however
@Horttanainen don't expose the inline method
12:42
@Mgetz Ok. That I actually did know
just use a struct and expose virtual methods only
inline method lives in the header? What problem could that be?
@Horttanainen it's unnecessary and if the impl changes at at all it could create bin-compat issues
@Horttanainen what methods they call in turn, which could go down to malloc and create issues when freeing somewhere else
@Mgetz there is the exception of pimpl though
Do you talk about the non-virtual interface pattern or about the createCar?
12:44
@ratchetfreak pimpl is not safe across DLL boundaries
Honestly for this kind of thing I'd consider just using COM's IUnknown as a base and using a COM-like interface even if I'm not using COM
I still don't understand the problem with inline in the header
user1804599
@sehe Really?
the reference counting allows the user to use wrl::ComPtr
@Horttanainen a) it's unnecessary, by definition you're not returning an instance you're returning a virtual pointer b) if you change the parameters or v-table location of the impl function you could break callers
Wait is this code not cross platform? I keep talking about dll's but actually mean dynamic libraries in general
@sehe I made some progress (I also think I have the timing right now on that pesky measure 3) clyp.it/evyktv4l
12:48
@Horttanainen sharing c++ interfaces across libraries is always platform dependent to some extent, generally speaking a pure virtual base class will always work though
for example GCC has broken it's vtable layout IIRC at least once
@Mgetz Do you mean createCar? If so I dont understand how it is unnecessary
@Horttanainen because if you're already passing a pure virtual base class then you don't need an impl
because you're not hiding data members
that's a very interesting topic, glad I'm tuned in with a fresh coffee :3
@Mgetz I get a feeling that you are talking about pimpl idiom?
@Mgetz so, AFAIU, pimpl is not working if you try to implement it across shared objects (.dll, .so, and what not)?
12:51
@Horttanainen correct, which is unnecessary here and actually dangerous
like, you shouldn't try to do it in case of shared objects
@login_not_failed so it's not safe to use with shared objects, either you should pass a POD, an Opaque Pointer, or a pure virtual object
but don't mix
@Mgetz There is no pimpl in here. Only a interface and a impementation. I dont try to hide anyhting. I only want to move the memory allocation to dll binary
@Horttanainen then you don't need an inline function
I am sorry if the Impl is somehow misleading
12:53
@Mgetz yes! this is what I saw in a debugger a lot: people are only passing these types around, this makes sense now
in terms of bin compat an opaque pointer is always the safest
but also requires a procedural interface
@Mgetz Please explain. I want the create function to be in the same CRT as the caller. However this allocates the car in the memory of the DLL which may live in the different CRT
btw MSVC forces me to put that inline there
@Horttanainen why? what's the error?
Multiple definitions linking error
@Horttanainen then the caller needs to pass in an allocator pointer
12:57
agh Spotify's buggered the TortoiseSVN commit message pane too lol
& reboot is inconvenient
fml
@Mgetz No no. Caller wants the object to live inside the dll binary and get a handle to it
Ven
Ven
@BoundaryImposition what, how?
@Horttanainen the only way that can happen is if you're somehow compiling into two spots... I'm very confused, using a pure virtual call should not be triggering that
Do you find the number of permutations of a string like this? factorial(length) / (factorial(repeating character) * factorial(2nd repeating character)...)
@Ven fuck knows
12:58
Fucking hell
tbf I can't rule out the possibility that the problem is more fundamental and Spotify is just exhibiting a related symptom
however everything seems to work fine until I launch it
Let me write it again so you can get pass the non-virtual interface pattern
Ven
Ven
do you play a song when committing and that's why tortoise and spotify are linked??
> non-vurtial
that's a new one
@BoundaryImposition update your display driver
12:59
@Ven it's messing up my display driver somehow
@Mgetz it's up to date AFAICT. currently running a WinUpd anyway
@Horttanainen you can't have a non virtual interface, by very definition it has to be virtual

« first day (2412 days earlier)      last day (2762 days later) »