« first day (2804 days earlier)      last day (2368 days later) » 

00:05
@Mikhail You can't, it is not continuous.
So, for uniformly random numbers I can't. But I think if their underlying distribution is band limited it might be possible.
However, there are techniques for "stochastic" integration. Infamously used in finance
@Mikhail No, because if its random, the limit doesn't exist for any value. You should review your analysis course for requirements on integrability and continuity
So, people do this all the time, so it can probably be done.
For varying defintions of "this" and "done"
again, if you need to account for stochasticity in a function under an integral, this cannot be done
You need to assume some amount of stationary, or some other bullshit
00:10
but f(x) = rand(x) is not a function that can be integrated, as is
@Mikhail The Amount of mathematical rigor here leaves a lot to be desired. First you must identify what you are trying to do. You can use techniques to integrate an otherwise normal function with a stochastic or random component, but this is not the same as integrating rand(x)
> if you need to account for stochasticity in a function under an integral, this ~~cannot~~ CAN be done
In the most "brute force" attempt, you can propogate an error term through an integral
The brute force attempt is to add up a bunch of realizations, the underlying problem is that the actual integration sampling is variable...
A result with little meaning, add them up and average? They will average to 0
I mean I have something like integrate[F(x)*rand(x)], here depending on F(x) it might add up to zero, or not
rol
it's like math trolling, you should ask this on math.se and see what they make of it
I mean, if F(x) is an exponential you're taking the Fourier transform of a series of random numbers which isn't zero...
 
2 hours later…
02:19
Why encrypt your email when you telling the whole world the exact problem through lounge?
02:41
"If you want to use this package, X is the easiest way, or you can do it manually"
Followed X through 20 steps hurdle ... and it didn't work.
Why can't software be like washing machine or TV? It should just work after pressing 2-3 buttons max.?
03:18
> Les deux frères Bogdanoff ont été placés en garde à vue ce mardi 19 juin.
@user703016 prépare le popcorn
03:38
@LucDanton jpp de ces deux là
ah mince je me rends compte que j’ai oublié de copier la partie la plus intéressante : c’est une affaire d’escroquerie
sur du buttcoin ou apparenté ?
à vrai dire j’en sais pas plus
il me semble que oui
encore mieux !
 
2 hours later…
 
1 hour later…
07:28
Attention hooker - buy cute pet, name the pet after some celebrity, then constantly flood social medias with pet pictures tagged celebrity's name. Attention seeking, you are doing it right ...
I added more code without corresponding tests in my library and code coverage increased
wtf codecov
lol tests
My tests are mostly there to make sure everything compiles xD
Plus they're randomized to catch the occasional algorithmic bug
nwp
nwp
~flaky tests~
Do you print the seed before a run?
07:43
I use Catch in such a way that the seed is printed when a test fails
nwp
nwp
That's nice.
At the very best it helped me to find one or two bugs
tbh I should always print it instead, because the test won't be considered as "failed" when there's an asan, ubsan or valgrind error
nwp
nwp
That seems like a bug.
They make the program return a non-zero return code. Shouldn't be difficult to make them be considered a fail.
https://www.reddit.com/r/cpp/comments/56q01s/asan_ubsan_for_vc_on_windows/d8lys0u/

^ Emotional roller coaster
@nwp Considering how Catch works, I wouldn't be surprised if any weird tweak was difficult to implement x)
nwp
nwp
07:54
I'm considering using catch2 because my asserts are getting increasingly inadequate.
Ven
Ven
Hello
Looks like std::atexit doesn't know which value std::exit was called with, making it hard to log the seed that way
log it before starting, aka log it even if the program didn't fail
nwp
nwp
That's too noisy.
Who said not running destructors was a good idea? -.-
^
It's a toy project so I'd rather have it look great than actually being the most practical everywhere x)
08:04
make the seed global, then just read it in the exit handler
But, yeah its sad omission.
nwp
nwp
You could also make the seed the current date and recover it from the logs.
That'll lead to "fail days" which is awesome enough to do it.
The seed is already global, you can get it with Catch::rngSeed()
Apparently std::exit is never called directly in Catch, is it what happens with the sanitizers?
dat naming convention tho
I could try to throw in std::atexit and see what happens v0v
terminate is called, probably
08:10
wow, you didn't get the meaning of my sentence, which is actually understandable xD
I meant "I could try to throw a call to std::atexit in my testsuite and see what happens"
nwp
nwp
> The functions may be called concurrently with the destruction of the objects with static storage duration ...
Not sure if calling Catch::rngSeed() would even be correct.
damn, std::atexit is apparently called during normal program termination too >.>
nwp
nwp
Maybe you can cause a UBSan double fail.
Catch::rngSeed() returns an integer and that's pretty much it
Which could indeed be a problem
// User code should use macros instead of functions.
// Sets the callback to be called right before death on error.
// Passing 0 will unset the callback.
void __asan_set_death_callback(void (*callback)(void));
Sounds like something Catch2 could use
08:29
Actually maybe it always displays the seed and I only notice it on failure because ctest is configured to only show the results of the tests on failure xD
How do I incent users to give me bug report if there is any?
Make it easy
Maybe don't try calling it a bug report, but something like "Give problem feedback" and hint that doing so will improve the app
nwp
nwp
I like catch2 a lot. It let me delete lots of comments.
It's weird, I do get feedback on the regular channel (ratings and comments), just no bug report. It's unlikely that my app is that perfect.
nwp
nwp
08:43
Not sure how I'm supposed to handle test cases in member functions.
nwp
nwp
09:03
I RTFMed and it actually worked!
@nwp Lots of comments?
nwp
nwp
"delete" was not right but comments like these are now strings that get reported on failure, same as the function name here.
09:18
oh right
nwp
nwp
I can't figure out the class thing after all. I have a struct Foo{ private: int bar(); }; previously I did friend Foo_tester; struct Foo_tester : Foo { void test() { assert(bar() == 0); } };. I'm not sure what the equivalent in catch2 is.
Making bar protected works, but that gives people wrong impressions how that class is supposed to be used.
Catch's class is in an anonymous namespace, so I don't know how to friend it.
nwp
nwp
That's not bad.
I thought that unit tests weren't supposed to cover private methods
obviously these are sub-unit tests
nwp
nwp
09:24
I have to list all the privates I want to have touched instead of getting nice surprises, but better than no touching at all.
Would be fun if protobuf witchcraft could make the job of listing all members easier
09:42
Others have aggressive rooster problem, I have a problem of the opposite - my rooster is too timid. He's scared of pretty much everything other than the hen.
Thanks. I'll help another time. (Hint: I didn't say unique_ptr has no overhead, and whether optional "changes semantics" is debatable. Just file a feature request at the Boost Sml library, I suppose.) — sehe 11 secs ago
Grr. I lost my cool. I think.
Whenever he sees me, the cockerel pays attention to two things: my eyes and my hands. Because he understands either I have food to feed him or I am going to catch him and examine him or hug him. When I go after him he will scream murder and run like a fugitive.
Honest question: is there something like a "reinitializable<T>"?
@sehe naw
But if I have something he likes, like meat, the rooster will come over and try to get it off my hand.
09:48
wat
His voice will also change, when he sees meat. This rooster loves meat.
what even would htat do
You could probably bang out a reinitialize-able iterator in a few lines. Capture an iterator in the constructor, and on reinitialize() sub the captured value with your current value...
Iterator?
nwp
nwp
I'm not sure why it failed but this output looks pretty neat.
In my assert macros I converted '\r', '\n' and '\t' into "\\r", "\\n" and "\\t" and added a ^ under the first character with a difference to help with that.
nwp
nwp
10:37
operator == is to std::equal_to as operator <=> is to what? I can't find a std::spaceship or std::less_equal_greater on cppreference.
@nwp I guess it relates to std::string::compare or memcmp according to en.cppreference.com/w/cpp/language/operators
nwp
nwp
10:57
I have ~10% less test code thanks to catch2. That's pretty good, even considering that catch2 comes as a 13kloc header which is bigger than my entire project.
11:13
I stopped liking catch when I happened on Boot Test which does not cause compiletimes to quadruple (and more)
I mean, the niceties of Catch seemed to be mostly the nesting of scenarios and the "magic" of stringifying for messages.
Boost has the latter too and the first I miss considerably less than I anticipated
nwp
nwp
I think one of the goals of catch2 is to reduce compile times.
Mmm. Perhaps Catch2 is from later. 2014 was when I checked. But I thought I was using Catch2
@sehe as a consequence of the former (or vice versa) you can more sensibly abstract over tests
Well, in practice there's little I can't mimick with a little helper function/lambda
yes, but then when a test fires reconstructing the circumstances is time-consuming
nwp
nwp
11:17
> [...] `while( (void)0, false && static_cast<bool>( !!(buffer == test_data) ) )`
error: code will never be executed [-Werror,-Wunreachable-code]
note: silence by adding parentheses to mark code as explicitly dead
I'll grant you, I was enamoured with those scenarios, quite a lot. I think I valued the "grouped results" more than the generative aspect.
nwp
nwp
He should totally have done that -.-
Is that from real code...
nwp
nwp
Depends on your definition of "real code", but basically yes.
@sehe my own flipside: I had a whole hacked header of Boost.Test to get sensible output in nested scenarios, which was a whole pain to merge with upstream
11:20
That sounds bad. I had the same with Boost Process. And I stopped using it as it was as brittle as our hand-rolled process spawning in practice.
Oh. And just yesterday I ran into stupid attribute compatibility limitations with the simplest x3 grammar (ironically not using /any/ attribute propagation, and exclusively relying on semantic actions). I copped out after wasting at least half a day.
Rewrote the thing in Qi, and was much happier for it.
that… sounds similar to what I’ve been doing with Perl 6 rammars today
ITT parsing is parsing :)
inderdaad
:)
In short: Libraries with artificial constraints are bad for professional use.
Corollary: conventions/convenience features may actually slow you down disproportionately if you run into a case not catered for
Wow. Where did that word mesh come from. I should take a break.
I was thinking the same, in both cases
11:33
It was beautiful in its own twisted way. Like pictures from Pripyat or a plane crash site.
@nwp IIRC doctest is still faster
Ven
Ven
@Morwenn literally SQL :P
And has some interesting features like test templates
@Ven I don't know v0v
Ven
Ven
(a, b) > (c, d)
11:41
@Ven I don't get what you're trying to say >.>
Ven
Ven
@Morwenn it's basically what SQL can do, except worse
Guess I just don't know what (a, b) > (c, d) does in SQL
@Mgetz That is a very overly dramatic interpretation of this ultimately niche law.
Ven
Ven
does a <=> c, falls back to b <=> d if a == c
@Puppy Have you read article 13? It's not niche
it would cause stack to suspend any operations in the EU
ditto any site that does any user created content
11:43
That's lexicographical comparison, compare_3way only compares two values
ah I only saw 11
ok, art 13 is pretty bad.
In fact I don't know anybody in tech that supports article 13
yeah, but that's obviously a biased sample since the tech guys are the ones currently making money off illegal content and would have to pay to implement the law
aren't you confusing it with... std::lexicographical_compare_3way? x)
not that I disagree, it's a dumb idea, just sayin it's a biased sample
11:46
@Morwenn kinky
Ven
Ven
@Morwenn ohhh
lol, indeed
std::compare_3way is basically for generic code that wants to use operator<=> even when the type doesn't have operator<=>
12:06
Handling __int128 is annoying >.>
nwp
nwp
12:21
@Morwenn Nice. I want to have that now.
Is it really C++20? Can't they make it C++18.5?
@Ven this is std::tie(a,b) <=> std::tie(c,d) if I'm not mistaken
Ven
Ven
@BartekBanachewicz that works? cool
it should
not sure how <=> defined for tuple<...>, but that's how I'd define it
12:38
@nwp What it is doesn't matter as long as your compiler implements it v0v
@Ven most likely
@nwp you should be glad it was accepted in C++20 considering the proposal didn't exist as far as I know what C++17 was finalized x)
nwp
nwp
> The CXX_STANDARD property on target "SCE" contained an invalid value: "20".
> The CXX_STANDARD property on target "SCE" contained an invalid value: "2a".
:(
Inb4 lol cmake.
indeed
I always end up manually adding the compiler flag when I want a high enough standard version ^^"
Ven
Ven
@Morwenn I never know what to expect
nwp
nwp
I'll do that as soon as I figure out how to stop cmake from adding -std=c++11 after my flags .,.
Someone write a sane build system please.
@Ven Occasionally sane and useful behaviour
@nwp Isn't it linked to the configuration of one of your dependencies?
nwp
nwp
12:52
I don't know. Something adds -fPIC -std=c++11 -MD -MT and I don't know what.
Ven
Ven
@nwp time to use get_cmake_property(... VARIABLES) or cmake -LAH
nwp
nwp
cmake -LAH seems to not be immediately helpful and I have to try the other thing later.
try make :p
nwp
nwp
I failed expressing builddir/%.pb.cc builddir/%.pb.h: %.proto in make.
Ven
Ven
13:07
building two files at once?
just like you wrote it should work ;o)
why do build systems always involve crappy DSLs?
but building a project is trivial
because people are stuck in expressing "source a.c builds to object file a.o" and "object files a.o b.o etc. link to output.exe"
13:23
and this is somehow inexpressible in a normal language?
What do you qualify as normal language?
IME easy to express and easy to parse tend to be on opposite ends of the spectrum.
a general purpose language
Isn't that what the scons project is doing? Using python to express build dependencies.
13:28
if so then good for them
I just haven't had the fortune to ever use such a system
from what I've heard it's decent but meh
when you rebuild the entire dep tree every time you build you are kinda doing double work
are there build systems that cache that dep tree and grabs the leaves in O(1) from the target you are building?
compared to running the actual build, I can't imagine that searching the build tree can be that complicated
depends on how distributed all the information ends up
i use premake, which is in lua, works fine for me
13:36
you may need to re-think your build process if the process is nearly as heavy as the actual build steps themselves
@ratchetfreak I think ninja tries to do that. But I haven't used that myself. And as far as I understand, it needs a preprocessor to generate the ninja files.
limiting the amount of times fstat is called will help, only once per file per build at most)
and it needs to re-run if the dependencies change, of course
if directory&file monitoring wasn't broken on every platform I'd say keep a watchdog monitoring changes to files and update the to-build set for each target as appropriate
nwp
nwp
13:54
@Ven I agree, but make neither supports the builddir/ prefix nor the double ending .pb.cc.
Ven
Ven
@nwp why does it not support the prefix? ;o)
nwp
nwp
I don't know. %.cc %.h: %.proto kinda sorta works if you add some copy steps.
But I really wanted out of source builds and I couldn't figure out a way to make that happen.
@nwp The most common way is to cd into builddir with make and set VPATH to your source path. Maybe this article can help you out
nwp
nwp
I really don't want to go back to make. It is horribly broken, even compared to cmake.
To this day I have not managed to write a correct makefile and I don't think I ever will.
 
1 hour later…
15:14
15:37
@Ven It just establishes the dependency, the snippet doesn't have any build ruels
Ven
Ven
@sehe thanks for the nitpick?
Well, you said "building two files at once". So there was reasonable doubt
 
1 hour later…
17:07
Your comment answers your question. It's uninitialized. The pointer points to god knows what, using it is UB. — Borgleader 1 min ago
 
1 hour later…
18:25
@StackedCrooked OMG
no mention of Lundi
so suck
but hey @thephd nice talk
if i cared about c++ i'd prolly watch it all
the DX is just so bad
18:56
What's DX?
developer experience
 
1 hour later…
20:15
@Puppy that's a funny term
yeah maybe
seems appropriate here though
I mean it can hugely depend on a lot of factors
happy home hacking in C++ on a small project can be fun
if e.g. there's no pressure to actually ship something that works
@BartekBanachewicz ^^ That's a big part of things. When I have the time to do things right, it's all good.
i mean when the project size grows it becomes a pain in almost every language
@BartekBanachewicz It's not really fun at all compared to something like C#, it's really slow to write, poor libraries etc
20:19
@Puppy C# is clunky though
I find C++ conceptually more natural in many ways
but the actual implementation is just so bad
C++ could be a nice language
they just didn't execute the ideas properly
and then they built on top of those failures
but honestly with 2020 around the corner, we're bound to move to something that actually fixes the C++ issues
heh
ah yeah I'm sure
I'd love it if it was Terra
but it's far from the critical mass of popularity to push things forward
the state of affairs in practical development is bad enough to make me not want to do programming at all
also @Pup I'm considering moving to London after the interview actually
you poor sod
20:23
> considering
it got on the table. It wasn't there before.
@Puppy maybe because you know it well by now
@BartekBanachewicz there are a few languages out there that try to be the better than C++
though most just aren't ready to take over just yet
20:56
Was not aware Germans are so lazy
nwp
nwp
21:11
I'm confused by the text. Do they count time spent on homework or time spent studying? Or do they assume those are the same thing?
@nwp The US is probably so high on that list from all the right-wing parents pulling their kids out of school and home-schooling them so they don't "turn into liberals". ahahaha. There I said it.
21:33
@Mikhail No, they're so efficient- they get the same amount of learning out of way fewer hours per week
21:49
@nwp Both are combined. So German kids come home and spend >2 hours a day doing homework, studying.
So, does Boost's naive_monte_carlo support complex numbers?
lel you should try
I'd expect yes. But you know. It's naive :)
nwp
nwp
@Mikhail That seems like a ridiculously high number to me. 20 minutes sounds more realistic.
I certainly didn't spend 17 hours a week
I think that's what you're supposed to spend maybe
17/7 isn't too long
I probably spent around 20+ hours, especially at the end of highschool.
@sehe okay, I'll give it a shot real question is how is the error function calculated for complex numbers...
21:55
No idea. It will be documented, and it will probably relate to the mathematical definition
@Mikhail The Taylor series for the error function is globally convergent.
I don't think it has the machinery to pass a custom error function calculation object, but maybe I'm wrong.
 
1 hour later…
23:23
@fredoverflow TIL that in C, [0] is a postfix equivalent of a prefix * operator
23:52
@sehe Its not documented nor is it related to definition. Fails to build precisely because certain operators like less_than are not defined for complex numbers, and the library isn't general enough for you to specify them. Oh welp. Time to roll my own.
Need to find a fast adaptive monte carlo library with complex values (but not bounds) supoprt

« first day (2804 days earlier)      last day (2368 days later) »