« first day (1646 days earlier)      last day (3528 days later) » 

Xeo
Xeo
09:04
So you can't retro-actively make a type you don't control implement a trait?
user1804599
Yes, as long as you defined the trait.
user1804599
Not having the module restriction would be possible if you couldn't do dynamic linking (the compiler would have to know all implementations statically to determine subtyping relationships), but you rarely want to do that and dynamic linking is much more valuable.
Xeo
Xeo
@rightfold So, no chance if I control neither the type nor the trait, eh
user1804599
Exactly.
Xeo
Xeo
That seems like a pain, to me.
user1804599
09:07
I also like how traits behave like concepts when used as constraints and as base classes when used as normal types.
user1804599
You only get a vptr when it's needed.
Xeo
Xeo
You can't adapt types whose creators forgot to add them to a trait you really want
@rightfold That's what I was hoping for with C++ concepts aswell.
automatically generating an interface
user1804599
@Xeo Then you can say either dynamic linking or implementing concepts for types you don't control goodbye.
user1804599
Or compile-time checks, if you're into dynamic typing.
Xeo
Xeo
@rightfold why?
just generate a wrapper interface
which can be constructed from anything that implements its concept
user1804599
09:09
Say you have a concept that requires a function f is overloaded, and you dynamically link a module f which overloads that function for your statically linked type, then suddenly your type becomes a subtype of the trait at runtime.
user1804599
// module a
concept C = requires(T x) { { f(x) } -> int; };
void g(C const& c) { f(c); }

// module b
struct S { };

// module c
void f(S const& x) { }

// module d
int main() {
    C& c = *new S;
    g(c);
}
user1804599
Is this what you are talking about?
user1804599
Eh s/void f/int f/.
Xeo
Xeo
kinda.
user1804599
Assuming C& c = *new S; actually uses subtyping, not some kind of variable templates.
user1804599
09:20
Actually, I don't see why that shouldn't work.
user1804599
I totally forgot.
user1804599
My brain is melting.
@rightfold Bad concept, IMO.
user1804599
Although I see major problems with generating the vtables.
user1804599
If you could actually freely use constraints in concepts.
user1804599
09:22
Concepts which support subtyping would need way more limitations than just "any constexpr Boolean goes".
IYAM constexpr Boolean model sucks.
user1804599
Yeah.
Xeo
Xeo
Like this is what I imagined
(with some rules on whether the generated interface stores by-value, by-ref, or whatever. fucking ownership)
user1804599
virtual dtor
user1804599
However, you'd always have to generate those base classes or figure out in the dynamic linker where the base vtable is.
09:27
@Xeo Obviously by value.
if you want a ref, you can use a ref-to-concept.
concepts-as-interfaces can behave the same as every other type- value by default.
user1804599
Would be immensely powerful and could vastly reduce compilation times (at the cost of runtime indirection).
oooh
Xeo
Xeo
@rightfold right
in VS2105 they added a startup-project picker to the top
Xeo
Xeo
@Puppy true
09:30
@Xeo I personally had some plans about having dynamic concept refs that would be like, void* plus vtable ptr.
Xeo
Xeo
although you could play around with generating it differently depending on how the parameter is qualified. f(show) -> T _value. f(show&) -> T& _value. Since the compiler does the generation, it's not too difficult I imagine
yep pretty easy
but it wouldn't be about the parameter, just the type.
you'd just need to implement codegen differently for dynamic concept references.
user1804599
@Xeo Meh.
user1804599
I'd prefer to have show act as an abstract class.
user1804599
Instead of implicitly doing allocations and resource management and all that stuff.
09:37
holy fuck
I just go-to-definitioned and it actually went to the definition.
@rightfold SBO bitch
Xeo
Xeo
@rightfold You wouldn't even need that - the compiler can transform those functions however it wants, so you could do basically what puppy said, void* + vtable in the end
for references
Xeo
Xeo
the problems comes when the callee wants to store that argument somewhere
if you take or use Show by dynamic value then you would need the class Xeo described.
user1804599
@Xeo GC :P
user1804599
terrible
Xeo
Xeo
k, timu for Pathfinder
laterz
@fredoverflow wtf is that
@Mysticial I want to apply for internship at google. Can you give me some advises? Do they ask to implement anything during the interviews?
@khajvah yes
To your second question.
09:48
@Mysticial Some basic data structures right?
no for the first "you're on your own lol"
user1804599
Cons lists in Haskell.
I don't have much advice for the interviews themselves other than to know your shit and be comfortable with a major language.
like java, since the video above pretty much explains why you should be using it
I can't really offer advice anyway since I've personally never prepared for any interviews that I've ever done other than to get some sleep the night before.
09:50
@Mysticial I see. Now time to get to "know my shit" :)
Internships shouldn't be too hard I guess
it depends, at NVIDIA the interviews can get pretty tough
@Mysticial I once watched several hours of Beavis and Butthead the evening before an oral exam. I have never done better.
I can't say that I always know my shit. My recent interviews at Facebook and the firm in Chicago nailed me on some basic question. (such as linked lists) But I got all the difficult and specialized stuff. And that's all that really mattered to them.
@fredoverflow C++ is the almost the foundation of computing ... huh really? I disagree. I thought C is ...
> Linked lists? On today's architectures? Haven't you seen Bjarne's rant?
user1804599
09:53
lol
It will help to revise basic stuff I guess. Also the requirements are not a lot. Even "Excellent C++, Java and/or Python skills." is only preferred qualification.
@fredoverflow Yeah...
@chmod711telkitty Don't take these videos too seriously.
What was even more embarrassing was when I (initially) didn't know about quadratic probing on hashsets. It was only when the interviewer described it, did it finally come back to me. Since I learned it in high school (10 years ago) and never used it.
That only works if your array size is a prime with certain characteristics, does it not?
09:55
!
you didn't know quadratic probing on hashset???
omg ... shocking ...
Of course he knew. The knowledge just wasn't in L1 cache.
4
I've never implemented a hash set/table.
user1804599
I'm glad I can just import hashtable.
@Rapptz I've done it way too many times.
@fredoverflow It wasn't even in memory or even paged out. It was in some external hard drive. :)
09:57
actually the most commonly asked interview question that I have encountered was "what's the difference between an array & a list" ... or something similar like that, i.e. what's the difference between a list & a hashtable
Where's the fucking code?
@chmod711telkitty ambiguous
@chmod711telkitty I have never been asked any technical questions in interviews. It appeared the interviewers merely wanted to get a sense of my personality.
I've implemented every other "major" container I think.
Data structures is probably one of my weakest areas. I get nailed on it in almost every interview I do.
10:00
If you can implement Red-Back-Trees correctly, you can implement any data structure.
@Rapptz I did it once
@fredoverflow I think that was one of our assignment questions many years ago when I had very little programming knowledge/experience & of course I did a pretty awful job
I remember implementing linked lists several times in C++ because I didn't know the standard library existed.
@Mysticial If they ask me specialised things like quadratic probing then I'd probably do poorly too.
user1804599
@fredoverflow make them thread-safe and lock-free while you're at it.
10:04
@Rapptz I wouldn't call quadratic probing "specialized". But the performance stuff they asked is definitely very specialized.
@rightfold Immutable RB trees are always thread-safe.
user1804599
Wrong.
@fredoverflow why not implement it once then improve & use it many times?
How can you possibly screw up an immutable data structure?
user1804599
Mutating internal caches that are not observable.
10:05
@chmod711telkitty Because I needed it for different element types, and I didn't know templates.
2
user1804599
See Scala lazy val.
user1804599
Wouldn't particularly call them mutable.
That was a long time ago. I was on Visual Studio 6 :-)
10:07
It was a different time, you know. Loop variables leaked into the outer scope and such.
Ven
Ven
o/
@fredoverflow like in c#4 and before?
for (int i = 0; i > -100; --i)
{
    std::cout << (100 - i) << '\n';
}
std::cout << "the loop stopped at " << i << '\n';
@Ven Note how i is visible outside of the loop.
Ven
Ven
@fredoverflow ah, I was thinking about c# here, sorry
@fredoverflow so what about linked lists in C :P?
I don't think I've ever done that!
all lists are linked in some ways :p
user1804599
10:11
@fredoverflow Terrible.
Well, to be fair, VC6 was released before the first C++ standard.
So they could not be expected to get every last detail right.
<3
I thought I was only one horrible at programming when I first started
@Ven You mean the closure issue over loop variables, right?
Ven
Ven
@fredoverflow yes
ITT we find out some of the developers working for google is weak on data structure. But isn't data structure the backbone of searching algorithm & the searching algorithm the backbone of google?
10:22
He worked at noobtube
Hello
I thought about VM and that there is not a standard definition of which can be implemented as a 'bare metal' but in ever case there is such thing as VLA and languages which explicitly support it.
And a standard 'C' function 'alloca' with this functionality.
So can someone help me finding language which is possibly modern and support such thing by default?
'D' and 'Nim' language for example all doesn't support it by default but instead allow it to be implemented explicitly using 'C' function 'alloca'.
For 'Rust' I wasn't able anything and a right place to ask. And for 'Go' too.
@FISOCPP alloca isn't standard.
Never-mind I think you understand what I mean.
And what the idea behind VLA is.
I need a language which support such thing.
Possibly modern.
10:38
you come to the wrong chat
we have no interest in your question
I wasn't able to find better place.
Fuck VLAs.
I'll leave it here anyway in case someone find such interest.
@FISOCPP that's like saying 'I came to rob you because I couldn't find a better place to rob'
What do you mean?
I'm not robbing anyone.
10:40
Jan 30 at 2:30, by Borgleader
"Hi I have a question about my retirement fund"
"Sir this is a convenience store..."
"I know but it's the only thing open at this hour"
You here are all experienced programmers I think - that's way I ask you.
You may have experience not only with 'C++' language.
user1804599
@fredoverflow type checker at line 87: play.golang.org/p/D9ZWh5Qfan
user1804599
No mutation of AST nodes!
user1804599
And with type errors: play.golang.org/p/ZeRYmGPLQn
@FISOCPP most of us here are experienced with C++ or OO in general. Some might have knowledge in some other commonly used languages, OS or version control etc. But not many here has profound knowledge in niche fields that very few people use
10:47
those contain the same content.
user1804599
No, the latter has a type error.
oh didn't see the scrollbar
user1804599
Also lines 69 and 70 shouldn't be there. The type of a type isn't the type itself.
@rightfold I wonder how much switching over a type costs. Is it O(1) or O(n)?
user1804599
@fredoverflow I think it depends on the type.
user1804599
10:53
If all cases are struct types then it's O(1).
@fredoverflow In Go in general?
user1804599
If any of them are interface types then it's O(n) because it goes from top to bottom.
user1804599
I neither know nor care.
user1804599
DeclType could return a kind when given the declaration of a type.
@fredoverflow longest interview I had was at Microsoft, but even there they didn't ask me to code a RB tree : /
it's simply unfeasible for the average interview in terms of time and work
10:58
well
it must be particularly silly at Microsoft considering that they have existing employees whose sole job is to program generic RB trees.
I mean, are they accusing Stephan of incompetence?
user1804599
Stephan accuses your mother of incompetence.
@Puppy Good morning strawman!
Is PARI any good?
what strawman?
no
Focus on the good morning part. (If the strawman wasn't obvious enough)
11:01
@Puppy Is that a reply to my message?
yes
@sehe No, it was not.
Bummer.
So why is PARI no good
Looks good
And PARI/GP is used by quite a lot of people
God knows what it is.
I'm shure Puppy just DeadMG-ed it for Cat reasons
11:02
@sehe It's quite familiar to number theorists (is that the right word?)
lol used by a lot of people as some kind of indicator of quality.
@Puppy It's not, but if it was crap, noone would be using it
hardly.
So it must have quality to some extent at least
plenty of people do things of zero quality or worse.
11:03
@fredoverflow Interestingly, the compiler actually did get this detail correct though. If you used the /Za switch, it enforced the correct scope for variables defined in for loops. Problem was that the standard headers all broke horribly with the /Za switch turned on, so it was mostly academic.
@Puppy Alright. Qt is crap, and a lot of people use it. But that's different.
like join IS, or rape and murder other people, or speak out against vaccinations.
@Columbo It's completely the same.
@Puppy Ok, you're right.
user1804599
hey nothing against IS you racist
user1804599
filthy disbeliever
11:04
Can someone please kill rightfold
@Columbo at this point, please realize that likely Pup has no idea what PARI is
@sehe That was very subtle and strong sarcasm, though I'm not sure why I felt the need to use that against a dog
user1804599
PARIS
@Columbo "please" is from the wrong culture - weakling
@sehe *wimp
11:06
whimp
Is weakling even a word
Adjective: weakling
  1. weak, either physically, morally or mentally
Noun: weakling (plural weaklings)
  1. A person of weak or even sickly physical constitution
2
A: boost::stable_vector's capacity member function does not return the allocated capacity

T.C.This is an obvious bug that appears to come from someone trying to be too clever. The culprit is this diff, which changed this line in capacity() return (index_size ? (index_size - ExtraPointers + extra_capacity) : index_size); to const size_type index_offset = (ExtraPointers + extra_cap...

WOW
> This is an obvious bug that appears to come from someone trying to be too clever. The culprit is this diff, which changed this line in capacity()
@sehe Okay, lemme try: Can someone fucking kill that imbecilic worthless gossip manger before I'll have to get my ass up to do it?
More like "God have mercy on their souls as his loyal servants deal his righteous judgement unto them in humble service of his holy prophet"
That's the way it goes down much much better.
@sehe Why are you talking to yourself?
11:11
I'm horribly hungry
like firefox 1.0 was with memory
And I'm fed up with alliterations
@Columbo Not to me. My rosary, of course
user1804599
I like how Vigil uses implore and swear keywords for contracts.
I'm sure they just looked for words infrequently emploiyed as identifiers
in the process of porting stuff from C++ to Vigil people are usually left with

int main() {
return 0;
}
then many swear words are said
user1804599
11:13
It also automatically deletes code that causes contract violations.
@MarcoA. I use libncurses to ease the implementation of the last part
@sehe that is a wise choice, if you do a lot of terminal work you should also use 'thefuck' linked in the transcript
@orlp yeah I realize this. Still, it makes sense to pdqsort against it for large volumes. Since pdqsort certainly aims for general purpose (right?) it would be nice to see how "bad" it is in comparison to these new Boost algos
@MarcoA. it's getting old
@sehe pdqsort is exactly as general as std::sort
so. Indeed
Hi
11:20
Also Chromium on Linux+widevine plugin rocks!
No google phone home, and yet netflix.
Yay!
1
Q: Is it legal to hire only beautiful people?

marchIt is claimed online that it is perfectly legal to hire only beautiful people. But I am skeptical. Isn't it illegal to discriminate on the basis of sex or age? So you would have to hire people who were beautiful irrespective or whether they were male or female or 18 or 60 which seems to contradi...

Oh interesting. @EvgenyPanasyuk appears to have dealed with sort-verification tests too in the past: groups.google.com/d/msg/boost-devel-archive/KTN71zKHfPQ/… /cc @orlp
@Columbo this guy can't have all his employees as beautiful as me
user1804599
> Disability (physical or mental, including HIV status)
user1804599
porn star
11:25
@sehe > I have just successfully tested boost::spread_sort and
boost::integer_sort for N [0, 12)
0-12
lel. Sounds like he might have gone for fuill coverage (brute force)
for pdqsort that would only cover the insertion sort codepath
user1804599
sandwich spread sort
@orlp As you said, different goals.
WTF!!!
> At a young age, I remember being told by a teacher that if there are five or more native Americans in a group, it is legal to shoot them, because it is considered a war party.
51
Q: Is it legal to shoot groups of Native Americans in some US States?

EvorlorAt a young age, I remember being told by a teacher that if there are five or more native Americans in a group, it is legal to shoot them, because it is considered a war party. The teacher told me that this was an old law which is still in effect today. I found a few references, but I don't know ...

11:27
@Columbo begs the question, can we consider 5 US politicians "native" Americans by now (I reckon we should, because otherwise ~~racism~~!)
> Why anyone would adopt such a versioning scheme is beyond me...especially after all the ire Firefox has drawn over their version-bump-palolooza.
worth observing that despite that ire, Firefox hasn't backed down.
and they're right to do it too.
I don't see anybody arguing (except the quoted person, perhaps (hard to tell) - which was quoted for entertainment value only)
seems like everyone these days that thinks they won't break backwards compatability drops the big version number
hmm
I just saw the trailer for Star Wars: Battlefront, and boy, that looked especially uninspiring and just generally terrible.
user1804599
The sky is beautiful.
12:06
good afternoon
user1804599
12:19
Hoe gaat het?
@Columbo colorado has a law that you cannot be issued a birth certificate if your mother cannot have been present at the birth
@rightfold recht zo-die-gaat
I thought I'd pop in and say hi.
user1804599
Go is so awesome.
12:23
HI TOOOOONNYYYYYYYYY
user1804599
@rightfold are you sure golang.org/pkg/crypto/rsa can do this? I doubt it. — holys 1 min ago
@Jefffrey Hi!
Where the heck have you been all this time?
user1804599
It's a fucking RSA library.
Shame it's closed. Here's the solution: coliru.stacked-crooked.com/a/61fbd2c57caaa757sehe 6 secs ago
@TonyTheLion That's what you thought. Sorry. No sex was mentioned.
12:24
@Jefffrey away from this room... living a life :)
That sounds awesome
user1804599
@sehe that's Coliru, clearly not Dev-C++. — rightfold 9 secs ago
@TonyTheLion woof
@Puppy meow
user1804599
12:25
> Note: no concerned about security.
user1804599
I like this part the most.
> How can I encrypt message with private key and decrypt with publib key using Golang RSA? [...] Note: no concerned about security. Thanks.
@TonyTheLion So how is life? What did you learn about the outside world? Are you going to go away again?
Do an AMA damnit
I want security, but I don't need security.
Wait. Uses crypto. "No concerned about security". Awesome (have you considered rot13 or base64?) — sehe 51 secs ago
12:27
set public and private key to 0, problem solved.
What's a nice library to make game with? (Any language)
Löve
user1804599
@Jefffrey golang.org/pkg/fmt for ASCII art and input parsing.
2D or 3D stuff (yes I know ASCII is technically 2D thanks). You know what I mean.
12:29
@Jefffrey Wide
@Jefffrey Life's good. I learned that its definitely a more interesting experience than living a life merely in an online chat. Yeah, as I have said before, I don't plan to actively participate here anymore. Doesn't mean I won't occasionally pop by.
user1804599
You are now addicted to Lounge<C++>.
user1804599
You can never leave.
user1804599
12:34
Except when you're Pubby or Domagoj.
@Puppy That doesn't sound like a library
does declaring a fully specialized template member function in a class automatically marks it as inline?
(not defining)
I suppose so but I'm not quite sure why at the moment
wtf, we can totally do a google & tell people that Pubby or Domagoj left because we didn't want them to stay. we can have really thick skin & tell others that people whom we want here would never leave, you know that's what google says about their employees
@TonyTheLion How did you make the transition?
morning all
12:38
@TonyTheLion What are you actually doing now, on a daily basis, than you didn't do before?
user1804599
not lounging
@TonyTheLion What does it mean to "live a life" for you?
@Puppy I logged out of SO on all my devices and then forced myself to actually find other things to do. It takes some discipline, but it can be done. Persistence is key I'd say.
user1804599
Didn't persist.
and yet you came back :'(
12:40
> Doesn't mean I won't occasionally pop by.
but if you quit your job, how often do you drop in your old office?
user1804599
I want to write a concurrent system in Go.
@Jefffrey spend time with real people, instead of in cyberspace.
user1804599
I suppose I can parallelise my code indexer.
@Mgetz Dude, that does not even remotely make any sense
12:43
@Columbo think illegal immigration in a country that allows you citizenship if you're born there
ah
you bribe a doctor to issue you a birth certificate saying you were born in colorado when you're actually from elsewhere
just "waaaaaaah the immigrants" then
@Mgetz would only work if you are a baby & have plenty of money or connections to go by
@Mgetz I thought you meant "A birth certificate cannot be issued if your mother cannot have been present at the place you were given birth when she gave you birth"
12:45
@Puppy not really, at the time the law was passed immigrants were virtually unlimited into the US
@Columbo that would be the modern reading yes, because we have laws concerning document fraud that didn't exist then
at the time most people didn't have birth certificates
@Mgetz That doesn't change anything.
so the law was very loose
Doesn't US has this 7 years rule that allows any illegal immigrants to become a green card holder if they have been in the US illegally for 7 years?
@chmod711telkitty no, absolutely not, we should, but we don't
particularly if they are kids and have gone to school here
(solved my problem after spending some time in the standard)
12:53
@Mgetz Why do I kept thinking that you are from Germany?
@chmod711telkitty because I have some semblance of common sense?
US must have pretty loose rules in regards to immigration because Australia & Canada allow immigration too & Australia only has 7% of the total population you have there in the U.S.
13:08
@chmod711telkitty Had, we're still looser than most of the rest of the world though. Several Gold Rushes helped as well
I would say the U.S. is a bit over populated, after sighting cows not able to graze freely on the lawn in some areas but fed dry hay & grains
If it's not for technology & IT isn't Australia's strength, I would almost say Sydney is one of the best places to live. A bit on the expensive side, but it doesn't matter if you have enough money.
13:41
Does shared_ptr have a fixed size (in bytes)
@Prismatic .. how on earth couldn't it
Oh, you mean dependent on the template argument?
Well, most certainly..
@Prismatic Why would anyone define that?
@Prismatic Why do you care?
13:59
Good morning lounge.

« first day (1646 days earlier)      last day (3528 days later) »