« first day (2056 days earlier)      last day (2893 days later) » 

1:35 AM
 
@orlp Fuck, you seem too good and I'm drunk. I will try to understand that properly tomorrow.
@orlp Also yes, std::nth_element i non-trivial and certainly not stable.
Still, since it's always better than a heapsort, you could almost use it for pdqsort instead of heapsort. It's guaranteed to be O(n log n) when properly implemented.
Anyway, I'm really drunk and I kinda love you; see you later ♥
 
1:54 AM
@Telkitty cute
@Morwenn night bby <3
 
2:28 AM
specializations of a template yes, sure, that's what operator[] does with vector<bool>
though we don't talk about vector<bool>
child classes, sure as long as it's covariant if you're overriding it, and if you're hiding it anything goes pretty much
because you're hiding it
boost::variant is a thing
and what data?
it is different headers but I know what you mean
different headers and different binaries so there's no mixing food where food need not be mixed, unlike this metaphor
if it's a template no
if it's a type yes
where vector is a template and vector<int> is a type
unless you use the magic of polymorphism
yep
if you're using polymorphism you're using smart pointers
yeah
once you dynamic cast to the sub yes
and the contents of the unique_ptr, not unique_ptr<super> -> unique_ptr<sub>
np
do note that putting casts all over the place is considered a code smell
figured you ought to know, :P
have fun
smite your opponents
 
2:55 AM
@VermillionAzure cinch you are the hero I need today
100AUD/hr for tutoring a university student on R
 
 
1 hour later…
4:10 AM
@nick Hello?
I guess nobody is here
@nick And what kind of R? I'm only good at certain things
@jaggedSpire It is?
 
@VermillionAzure that is my understanding
it means you're violating type safety
 
@jaggedSpire Aren't they equivalent a lot of times to assertations of having a correct type?
 
or tossing it out the window, rather
 
Or are you talking about forced castings?
Also I'M HOME ALOONNNEEEE YAAAAAASSSSSSSSSSSSSSSSSSSSSSSSS
 
forced castings mostly but I could have sworn the same thing didn't differentiate between then
 
4:12 AM
I ordered myself a full SPECIALTY pizza yesterday I'm such a rebel
@jaggedSpire Yeah forced castings are bad
 
wow props
 
well yes I'm not arguing they're not
but isn't dynamic cast also supposed to be bad?
 
Dynamic cast is supposed to be used for mostly polymorphism, right?
 
It's saying "I can't be assed to properly keep track of my types check this now please"
and also it may be used to violate contracts, after a fashion
or rather keep inconsistent ones
have a function which takes a parent type have different behavior applied to the type dependent on the child type
not necessarily
you could have a legitimate use for it, and that's why it exists
 
4:15 AM
Dynamic cast exists to support polymorphism
The documentation says mostly for a polymorphic base class
 
but that you're checking the implementation of something when you're given its interface isn't really spectacular
 
@jaggedSpire But you're not explicitly checking it
 
how is checking the exact type implementing the interface provided by the base class not checking the implementation?
Certainly you're not checking how it goes about fooing its bar but you're now aware of side effects you weren't before
for instance, that it indeed foos its bar when all you could have told the base class was to foo something
and now you're dealing with information regarding the bar when you shouldn't care about it
and that's where dynamic cast becomes a code smell
like you said there are legitimate uses
but it's a sign you need to be cautious when using dynamic cast
and signs you need to watch what you're doing and be sure you're doing it for the right reasons are code smells
 
@jaggedSpire How would you do polymorphism?
wait, dumb question
 
@VermillionAzure dunno, you just have to be decent at talking to someone for an hour or two at a time
 
4:21 AM
@nick that's bad if you don't know
you shouldn't be willing to shell out 100AUD for an hour of "dont know"
 
actually it's worse if you don't know
can you teach a beginner or not
 
I can, probably
The question is what do you want to learn?
 
not me, just a random client
 
@jaggedSpire Well... I forgot what dynamic_cast was for a bit so I just looked it up
@nick ??? Um... Perhaps. What's the medium?
 
I actually have an answer where I used dynamic cast as a sort of multi-method implementation where there were precisely two cases with precisely one test
 
4:24 AM
I would probably use dynamic cast in a system where I want to switch based on type
 
it was fun and sehe's answer on a similar subject was pretty neato
16
A: How to achieve "virtual template function" in C++

seheAfter some thinking I recognized this as the classic multi-method requirement, i.e. a method that dispatches based on the runtime type of more than one parameter. Usual virtual functions are single dispatch in comparison (and they dispatch on the type of this only). Refer to the following: And...

yes, hence its presence in a multi-method implementation
 
@VermillionAzure chat, video
 
@nick Hm... I dunno. But money does sound nice
 
but which videochat system
these are important questions nick
and the public needs to know
 
if you're interested lemme know and i'll double check if this person is good to go
 
4:28 AM
@nick I'm inclined to say No because I know so little about the offer
This is the problem with online tutoring
It's hard to tutor somebody you don't know
@jaggedSpire I completely agree with Sehe's answer.
 
...did you think I disagreed?
 
i'm just a dev, not community, so i'm not the guy to talk to regarding details
will still follow up for you
 
@nick If you want people to seriously consider it, maybe get a list of topics they want to learn about, what client to use, and time openings
 
@sbi Last time I measured sorting algorithms, insertion sort was faster than quick sort for about 30 elements or less. I just assumed the situation would be similar in your case ;)
 
4:31 AM
well now I know who's been hitting the party supplies hard
 
@StackedCrooked Last time I remembered, abstract concepts like language cannot stick their schlong into an abstract word
 
@StackedCrooked I'm sure everybody agrees up until the "esome" part ;)
 
"C++ is fucking aw?"
no! not my floof pictures! they were so floofy!
 
@VermillionAzure yup and you would have all this but let's forget about it
 
4:36 AM
Question: abstract or non-abstract virtual destructor for an interface?
 
is that about money
if not i cant read it
 
0
Q: How can I do "opt-in" interfaces with a proxy class in C++?

VermillionAzureI have 5 classes named A B C D E and 2 interfaces I1 I2. Using multiple inheritance, I might inherit abstract classes to implement interfaces: class A : public I1, I2 {}; Now, I want to add more interfaces I3 I4 I5. Having to modify all 5 class definitions is tedious and violates Don't Repea...

 
@jaggedSpire ...ful
 
ah
well that's one way to cause a feed error
 
5:10 AM
@fredoverflow Heh.
 
morning
0
Q: Differences between double *vec and double vec[]

eadIn our legacy C/C++ code I encounter two versions of signatures void foo(double *vec, int n) and void foo(double vec[], int n) But there is no difference in the handling of the parameter vec inside of the methods e.g.: void foo(double vec[], int n){ for(int i=0;i<n;i++) do_somet...

 
5:41 AM
I must confess, I don't know what K&R means — ead 3 mins ago
 
6:18 AM
Good morning!
 
> I've been watching Rust, but didn't find its safety features all that useful for the work I was doing at the time. Still, it's a promising language.
Was the work unsafe code?
 
street fighter 5 time
 
Hey folks!
Hey fred!
 
6:34 AM
Am I not part of folks? :(
 
@fredoverflow no, you're an overflow
 
user1804599
6:52 AM
Hi
 
well you are fred:)
Hey Right
 
rightoverfold
 
@rightfold hi leftreduce
 
@fredoverflow That blog link at the top is nuts.
 
Ven
Hi
 
Hey Ven
 
Hi
 
> For those that got tired with design patterns, maybe because you can't handle them? Don't mask yourself by saying DP sucks and all while the truth is probably that you just can't handle DP.
You can't handle them!
 
nwp
7:45 AM
Pretty sure I don't want to handle DP. Sounds painful.
 
I see what you did there
 
Ven
Does anyone actually say "dp" for design patterns?
You must be on reddit to read stuff as retarded as that...
 
user1804599
hi
 
user1804599
@Ven no I say DP for double penetration
 
user1804599
7:58 AM
> They originally had operations
called "P()" and "V()", but nobody ever remembers whether P() was down()
or up(), so nobody uses those names any more. Dijkstra was probably a
bit heavy on drugs or something (I think the official explanation is
that P and V are the first letters in some Dutch words, but I personally
find the drug overdose story much more believable).
 
nwp
my hot water doesn't work ... +showerdeodorant
 
LSD
 
user1804599
> Clinton: "Trump is a liar"
 
user1804599
pot kettle lol
 
Ven
8:07 AM
@Shoe doesn't explain where your comment is from
@rightfold noted
 
@Ven How so?
 
user1804599
f :: forall m a. (Monad m) => Int -> (a -> m a) -> (a -> m a)
f = go pure
  where go r n k | n <= 0    = r
                 | otherwise = go (r >=> k) (n - 1) k
 
user1804599
What should I rename this function to?
 
user1804599
I'll call it "nestM".
 
Ven
@Shoe there doesn't seem to be any comment under the article :c
Has anyone used a lib with functional data structures/modans for JS? I'd need at least Data.Maybe, Data.Either, and functions from Data.Control.Monad
Currently considering Ramda+Sanctuary, but I have no idea if it's good or not.
 
user1804599
8:26 AM
@Ven Do you want them untyped?
 
Ven
If you have something relevant for TypeScript, I'm interested. Otherwise, optional runtime type checking like in Sanctuary would be nice.
 
user1804599
You can't do it in TypeScript.
 
user1804599
TypeScript has no higher-kinded types and as such you can't write generic monad functions.
 
Ven
yeah I know
which makes me sad
 
user1804599
This stuff is really easy to implement though.
 
Ven
8:37 AM
Ugh, we're really over-using DI. We should just create instances, sometimes..
 
user1804599
I've done some of it in the past: lpaste.net/3760961805791264768
 
Ven
I don't care about your unfinished libs. I want something that's tested, and used in production.
 
user1804599
lol using untyped languages in production
 
user1804599
RIP
 
Ven
14 mins ago, by Ven
If you have something relevant for TypeScript, I'm interested. Otherwise, optional runtime type checking like in Sanctuary would be nice.
typescript == untyped, okey.
 
8:48 AM
UnTypeScript
 
Ven
ImpureScript
 
user1804599
> new WorkOrder
 
user1804599
new world order
 
Ven
delete Illuminati;
 
user1804599
9:18 AM
delete kebab;
 
user1804599
delete[] cookies;
 
Ven
lol, I'm getting blamed because I noted a PR was merged that did not update the tests.
Okay.
 
user1804599
and rightfoldy so
 
user1804599
9:34 AM
how does LLVM detect loops?
 
Ven
what kind of loops?
 
user1804599
For example while loops.
 
Ven
it's an AST node
 
user1804599
No, it's a set of sequences of instructions.
 
user1804599
LLVM has no AST.
 
Ven
9:37 AM
well, it's IR
 
Ven
 unsigned D = 1;
lol, LLVM is bad, it should be
unsigned D=8;
 
makes sense
it’s a shovel right
 
user1804599
@Ven No, you first have to make the algorithm correct, and only then optimize it for seduction.
 
9:45 AM
> The device operates strangely for most of human. Because it also trains your brain. If you use it smoothly, you might not be a human. If you don’t know how to use, ask an alien next door or check the manual inside the box.
 
10:01 AM
folks is there any book out there for C++14
 
user1804599
Goats give you Q fever
 
user1804599
I.e. RIP
 
Ven
@CatPlusPlus do you want to become a goat farmer? you should ^
 
user1804599
I want to do no-fap June
 
11:13 AM
I'm gonna have to fast anyway this month..
 
Ven
@rightfold hah
 
nwp
@rightfold try for 3-7 days first, sudden deprivation is not healthy
 
Ven
it still saddens me that clang and gcc doesn't do lock coarsening :(
 
nwp
there are a ton of optimizations regarding multithreading that are just not done
 
@Explorer_N the newest Meyers book.
 
11:28 AM
> error: the value of '<anonymous>' is not usable in a constant expression
don’t think I’ve ever run into this one, how new and exciting
 
user1804599
great success
 
user1804599
fn remove_dead_blocks(sub: &mut Subroutine) {
    let dead_blocks = Vec::from_iter(sub.blocks().filter(|&b| is_dead_block(sub, b)));
    for &block in dead_blocks.iter() {
        sub.remove_block(block);
    }
    if !dead_blocks.is_empty() {
        remove_dead_blocks(sub);
    }
}

fn is_dead_block(sub: &Subroutine, block: BlockID) -> bool {
    block != sub.entry_block()
    && sub.incoming_edges(block).count() == 0
}
 
user1804599
This is so super rad.
 
Ven
would be even better with currying
 
user1804599
Functions are in a different namespace than values in Rust.
 
user1804599
11:31 AM
So you need lambdas if you want to pass them.
 
Ven
that doesn't even remotely matter
 
user1804599
After constant-folding an if instruction it removes the unvisited branch \o/
 
Ven
good, good
you've been on this project for almost a month!
lol you're not writing tests for your optimizations.
 
user1804599
@Ven boring
 
Ven
11:38 AM
Right, writing correct code is boring. New age is great
@rightfold show the original code used to generate that code
 
Ven
assert(false)? how is that not DCEd?
 
user1804599
not yet implemented
 
user1804599
line 38 in the Rust code emits that instruction
 
user1804599
there will be an optimization pass that removes instructions that follow block-terminating instructions such as Unreachable and Return and Goto
 
Ven
11:40 AM
good.
at least, right until the next label, I suppose
 
user1804599
Yeah, it's per block.
 
user1804599
A block is a sequence of unlabeled instructions.
 
user1804599
I'll do more tests tonight
 
Ven
write some of those down!
 
user1804599
some of what?
 
Ven
11:42 AM
tests.
it's goddamn stupid not to write tests for optimizations.
 
user1804599
:'(
 
@user105683,the newest Meyers book(efective modern C++) I have done with that. it covered much of the things about what feature is included and its rationale behind why it was included/implemented in c++, now i want a book that completely give practical examples and show some trick of how we can exercise the modern c++ skills in various cases/ circumstances...i meant it should much about practice.
 
user1804599
Also I am thinking of using Z3 for guiding optimizations.
 
user1804599
For UB-powered assumptions.
 
Ven
..That'd certainly be interesting
 
user1804599
11:54 AM
  Could not match constrained type

    (Partial) => Int -> Int

  with type

    (Partial) => Int -> Int
 
user1804599
good job purescript
 
Folks you guys have any idea?
 
Ven
if you have a question, try StackOverflow :).
 
@ven , i have no question i just looking for a suggestion, just before i asked "
folks is there any book out there for C++14"
 
user1804599
lol this song is called Zelda on Crack
 
user1804599
12:02 PM
@Ven For example, consider div x, y, then I'd tell Z3 (assert (not (= y 0))). Then, given c = eq y, 0, I tell Z3 (assert (= y 0)) and it'll tell me there's a contradiction, so I can simplify eq y 0 to a constant false.
 
@rightfold What is Z3?
 
Ven
@rightfold :)
 
user1804599
@wilx Z3 is a theorem prover.
 
user1804599
You can for example give it this code:
 
user1804599
(declare-fun () x)
(assert (< x 0))
(assert (> x 0))
 
user1804599
12:03 PM
And it will tell you there is no solution for x, since there is no x that is both smaller than and greater than zero.
 
@rightfold I see.
 
Ven
Fuck, the seine is overflowing
 
@Ven I wanted to say something snarky but could think only of lame penis jokes.
 
user1804599
12:20 PM
I'll finish this first, then write iron tests: github.com/iron-codegen/stlcc
 
Ven
oh, Perl 6.
 
user1804599
yeah because Perl 6 has easy FFI and easy parsing
 
Ven
Those are very strong points indeed
 
user1804599
12:47 PM
I want a ball gag
 
ask the stable if you can use one of the horses for leather for the straps
 
user1804599
lol
 
user1804599
that would be the most awkward thing
 
pretty high yes
 
user1804599
> I want to ask you if I can strip some of the skin of one of your horses because I need leather for my ball gag
 
Ven
12:55 PM
rofl
 
user1804599
Real-life Minecraft BDSM mod
3
 
wot
 
1:13 PM
seriously ... what kind of porn has rightfold been watching ...
 
sbi
1:47 PM
@fredoverflow Are we talking integers (for which a good std::vector implementation employs std::memcpy() or something similar, which for in turn should rely on compiler-intrinsics directly invoking HW commands) or are we talking non-SSO'able std::string objects in the absence of move-semantics?
 

« first day (2056 days earlier)      last day (2893 days later) »