« first day (844 days earlier)      last day (4095 days later) » 

5:03 PM
@EtiennedeMartel i'm very curious. how is quebecois different?
 
user1125394
hi, what’s the difference between a thread and a process?
 
@user1690130 Slang, mostly.
 
@EtiennedeMartel par example?
 
@cab Generally, a process has threads.
Processes each have their own address space, and threads all share the same address space of their parent process (they get their own stacks, though).
@user1690130 "Gosse" in France means a child, while in Quebec it's used for testicles.
3
 
user1125394
@EtiennedeMartel ok, by default a process will be monothreaded?
 
5:07 PM
@EtiennedeMartel c'est cool! i never heard of "gosse" for child
@EtiennedeMartel why would it differ?
 
you should learn that, I like asking that question in interviews
 
user1125394
but other threads are only created if you use spawn or new Thread, don't know the syntac in c++
 
Process provides environment, (code, data, memory, security etc), threads provide execution.
 
@sehe hi!
 
user1125394
@MartinJames thx good definition
 
user1125394
5:13 PM
actually preparing a job itw
 
@Zoidberg ohai
 
user1125394
without knowing a gram of c++
 
@user1690130 Powerrrrr
 
user1125394
there are questions like What’s a template? What are the risks of using a template?
 
@sehe huh?
 
5:14 PM
I loved the question that was "what's better, templates or std::function?"
 
user1125394
What is the STL?
 
@cab Ask @Tomalak - He'll be more than happy to clarify...
 
user1125394
hmm STL seems a good way of not using pointers
 
I kinda wish I could +1 chat messages (to indicate lols without bothering to write a comment out) without starring them (which implies I want to save it for posterity)
 
@cab Now, there's a tag line. You should be in marketing
@LightnessRacesinOrbit Me too.
 
5:17 PM
@cab I think my answer to that question in a job interview would show that I am srs in C++
Mainly because the odds of the interviewer knowing what I'm talking about are slim
Though that can backfire
 
@LightnessRacesinOrbit Indeed. Fruitfully backfiring
 
user784668
@cab Who is the STL? FTFY
 
user1125394
have no idea of c++ sorry
 
I just used Google to calculate 3579.92 seconds in minutes. Duh doy
 
user1125394
5:19 PM
I kind like languages like erlang haskell rather
 
@Fanael loose the "the"
 
oh look a polar bear
 
@EtiennedeMartel FFS I really want to find a precedent for this, but I'm failing
 
@LightnessRacesinOrbit that wasn't too hard
 
@sehe it's embarrassing
 
user784668
5:20 PM
@sehe Yeah, but then the change would be too radical.
 
or just "invalid edit"
 
@user1690130 Different cultures.
 
@EtiennedeMartel yours is like a germ culture
 
@EtiennedeMartel yes, but how is thaat reflected in the language?
 
by random duplication of vowels
 
5:23 PM
@EtiennedeMartel penses-tu des candians de banff? ou de bc?
ou de halifax?
 
0
Q: Send interrupt to cpu as keyboard do?

digIs it possible to simulate hardware interrupts somehow from user program? I've seen this question posted many times, but always not answered. I want to know about low-level interrupts (for example simulate situation when key pressed on keyboard, so that keyboard driver would interrupt interrupt)...

@sehe you did it again. +1
 
user142019
*troll*
 
user784668
@EtiennedeMartel Okay, right, I haven't. The "bug" was me having a reference to a dead temporary.
 
user784668
For some reason I expected auto&& foo = std::max(f(), bar); to extend the lifetime of the value returned from f.
 
user784668
Lesson learned: fuck C++.
3
 
5:33 PM
@Fanael Told you.
 
Ell
@R.MartinhoFernandes Modules aren't about linking libraries? What problem do they solve then?
 
@Ell headers
 
user1125394
STL is std:: * functions ?
 
@Fanael yeah I haven't really looked into rvalue refs yet. universal refs. whatever the fuck that is. it's all a giant mess of ew
 
user784668
@cab No.
 
user1125394
5:34 PM
oh
 
@cab erm, technically no. Though most people say yes.
 
@cab no but millions of people think that it is, because they are wrong.
 
user784668
@cab STL is Stephan T. Lavavej.
 
@cab STL is std:: container classes and algorithms.
 
@cab std::* is the C++ Standard Library
 
Ell
5:35 PM
@MooingDuck why are headers such a problem? compilation time?
 
@ShotgunNinja no
 
@Ell yes
 
Ell
oh
 
Ell
well I don't care for modules then :P
 
user1125394
5:35 PM
you ping gun'ed me
 
@Ell you should. Imagine compilation being 3x -4x faster, and not having to be afraid of macros as much.
 
@MooingDuck @MooingDuck hi!! :)
 
Ell
I don't really use macros, and compilation time isn't bad for me. But then again I have no real life experience
 
@EtiennedeMartel O.o
 
5:36 PM
aww @ShotgunNinja didn't take the bait
 
@Ell ah
 
user784668
@EtiennedeMartel Well, I have found legitimate compiler bugs in the past. I know it's helluva unlikely to find one, that's why I didn't report it right away.
 
@LightnessRacesinOrbit No, I shut up and started learning how I was wrong.
 
:D
good boy. good ninja.
 
5:37 PM
Only when you are able to learn from your mistakes will you come closer to not making any.
3
 
user784668
@LightnessRacesinOrbit That's nothing new, though. The same would happen with C++03 const T& foo = <expr>;.
 
I like STL
 
user142019
Haha some guy on TV has is "Dr. Singleton".
 
@Fanael not really
 
5:38 PM
Using "STL" has a bonus of ticking off OCD types which is always funny
3
 
@Fanael that does extend the lifetime
 
What is STL @CatPlusPlus ?
 
okay maybe you guys were right about @user1690130
 
Then I mean developers. @Gamecat: But it's a suspicious pattern that's happened on a lot of questions lately. My OCD doesn't like it. — Lightness Races in Orbit Sep 24 '11 at 19:22
 
@LightnessRacesinOrbit Stick around, and you'll learn plenty of cynicism.
 
5:40 PM
5 mins ago, by Etienne de Martel
@cab http://kera.name/articles/2010/08/it-is-not-called-the-stl-mmkay/
 
@DeadMG It is humanly impossible to be more cynical than I
@DeadMG though I admit I've been a bit forgiving lately
 
user784668
@LightnessRacesinOrbit The expression in my case was std::max(f(), bar), it wouldn't extend the lifetime of whatever f returned. And that was the problem.
 
user784668
@LightnessRacesinOrbit In general, though, r-value refs do extend the lifetime, too.
 
@user1690130 STL is the (erroneous) name often used to refer to the C++ Standard Library, which provides a number of common and (sometimes) useful data structures, algorithms, and systems for simple I/O that make programming "easier" in C++.
 
@Fanael I'm sure it would
 
5:41 PM
Thanks @MooingDuck
Thanks @ShotgunNinja
 
@ShotgunNinja People who are at least half-right use it to refer only to the parts of the C++ Standard Library that were originally based on the STL
Those people also don't tend to believe that actually most chavs think it's the whole thing
 
I use "easier" in danger quotes, since there's a large propensity of C++ "developers" who don't understand the full implications of the C++ Standard Library's design, and end up injecting defects into their software because of it.
 
Blah you got me into it
DANGER QUOTES
 
RIIIIDIIIN THROUGH THE DANGER QUOTES
 
0
Q: how can I call two functions: Java and Javascript with one KeyUp event on InputText

Bob Samadihow can I call two functions: Java and Javascript with one KeyUp event on InputText , i'm using Primefaces component. something like this : <p:inputText id="aa" value="#{bonBonneManagedBean.sel}"> <p:ajax event="keyup" Onstart="fnc(this)" listener="#{bonBonneManagedBean.ajou...

wtf is this
(I'm wtf about the topic itself more than the question)
 
5:45 PM
@LightnessRacesinOrbit: After reading your article again, I think you ought to mention SGI's rope class explicitly.
 
@LightnessRacesinOrbit why you mad? because i don't know stl?
 
user784668
@LightnessRacesinOrbit It wouldn't. See for yourself: ideone.com/TebAdJ
 
@MooingDuck never heard of it
@user1690130 no; because you don't know how to stop talking
 
@LightnessRacesinOrbit sgi.com/tech/stl/Rope.html vaguely like std::string, but for huge files.
 
@MooingDuck Rope class? I think I saw something about that when looking through bits/ in the C++ Standard Library implementation...
 
5:46 PM
@ShotgunNinja gcc also provides one
 
@LightnessRacesinOrbit i am chatty :)
 
user784668
@ShotgunNinja In libstdc++.
 
this is a chat room after all :)
 
@Fanael o.o
@Fanael well then I refer you to my original comment about ew
 
and i'll be less chatty if there is loads of traffic
et je veux apprendre quebecois avec @EtiennedeMartel
 
5:47 PM
that's really interesting actually. it's like the lifetime extension isn't passed on through consecutive bindings
 
Also, from my understanding, rope does for strings in memory what segmented sector writes does for files on a hard drive.
It builds strings by essentially making linked chains of string fragments.
 
@LightnessRacesinOrbit I never considered it, but it makes sense really. To pass it through would be impossible
 
@MooingDuck It wouldn't, strictly, but it would be a real mess.
 
@ShotgunNinja it's logarithmic, so not quite linked. But yeah
 
It's just that no one really cares that much about how strings exist in memory, so no one really uses rope or knows that much about it. (forgive the use of absolutes in a non-absolute sense).
 
5:49 PM
you'd have to extend every temporary in the expression
just in case
 
@DeadMG true
 
in terms of the current lifetime extension rules
 
user784668
The temporary to which the reference is bound or the temporary that is the complete object of a subobject to which the reference is bound persists for the lifetime of the reference except:
— A temporary bound to a reference parameter in a function call (5.2.2) persists until the completion of the full-expression containing the call.
 
user1125394
cplusplus.com/reference/stl ok they call those containers/ data structures (list, map,..) class templates ?
 
@cab Pretty much nobody cares about template class vs class template.
strictly, class template is correct, but many people call them template classes.
 
user1125394
5:50 PM
I'd call it data structure
 
user784668
@LightnessRacesinOrbit That's from N3376, but the wording is same in C++03, the formatting differs.
 
user1125394
rather than this misleading term
 
@DeadMG ...and most just call them "templates", unless they really need to differentiate between (for example) a class template and a function template.
 
@cab It's not misleading at all, std::list is a class template.
@JerryCoffin Or indeed, that.
 
user1125394
well ok
 
5:51 PM
fuck, I want to play some Starcraft 2.
2
 
@cab I think that's even more misleading, because that doesn't imply that it's a template.
 
class templates are used to construct concrete classes at compile-time, correct?
 
@Fanael thanks. I didn't actually know about this.
0
Q: Which standard wording tells us that ref-to-const temporary lifetime extension only "works once"?

Lightness Races in OrbitI was shown the following example in chat: #include <iostream> struct foo { ~foo() { std::cout << "destroying!\n"; } }; const foo& func(const foo& a, const foo&) { return a; } int main() { foo x; const foo& y = func(foo(), x); std::cout << "main\n"; } O...

 
@ShotgunNinja Yes.
 
@ShotgunNinja yes
 
5:54 PM
if you do template<typename T> class X {}, then X is a class template.
 
and X<int> is a class.
 
indeedycakes.
 
@ShotgunNinja They can be used to construct either concrete or abstract classes, though concrete are clearly more common.
 
So, std::list<> doesn't exist until you start referring to or using a std::list<int>, at which point a class is built to represent an int version of std::list's template.
 
@ShotgunNinja That's not quite correct. std::list does exist- you can take it through a template template.
 
5:55 PM
@ShotgunNinja if by "exist", you mean no code is generated for it, then yes
 
@MooingDuck sounds good
 
@MooingDuck Yeah, that's what I meant. The compiler does build a structure from it, though, which serves as a template for building other classes.
 
user784668
@LightnessRacesinOrbit have upboats
 
@cab It's not misleading. They're just not describing the same feature that you are. You're talking about what the things do, but the phrase you quoted is describing what the things are, in terms of the language.
@Fanael wootert
 
hmm, SGI's rope's char_producer class looks like an awesome idea, but doesn't mention how to signify a read "past the end". Or maybe it's just "invalid parameters are UB, so forget it"?
 
5:57 PM
In addition, most of the C++ Standard Library classes have concrete implementations built around them, usually for bool or char*, in the case of containers or strings.
 
@ShotgunNinja yes. A template class makes a cookie cutter in the compiler, which the compiler can use to make cookie classes.
@ShotgunNinja what? Only bool specialization I know of is std::vector<bool>, and none with char*.
 
Case in point: std::vector<bool>.
@MooingDuck I though there was std::basic_string<char>. I guess that's not really a char*, but who's counting?
 
basic_string works the same way for char and wchar_t
 
> Return a vector value that contains.
epic documentation there LLVM.
 
That's not a specialisation
 
5:59 PM
@ShotgunNinja eh, I guess there is. I guess it's the same thing.
 
And now also there's char8_t and stuff
 
@CatPlusPlus He didn't say specialization, I did :(
 
"concrete implementations"
 
he said "concrete implementation for char", which is technically correct.
 
They're generic not concrete
 

« first day (844 days earlier)      last day (4095 days later) »