« first day (661 days earlier)      last day (4304 days later) » 

3:00 PM
@Drise fine, we know that going a ton is a cool speed to pull of, and if we weant metric, it would be nothing special
 
@Ell Dude, just google it
 
According to the Portuguese wikipedia, there was also an old Portuguese tonne in use until 1862, which was equivalent to 793.152 kilograms.
 
for those who might ever wonder, doing a ton in a morris minor is a bone shaking experience
 
@thecoshman Going a ton?
What does that even mean?
 
@Ell But which kind of miles?
 
3:01 PM
@Drise 100 mph
 
Ell
@kbok yeah I know but I mean like a reputable one that is known to be well written
@R.MartinhoFernandes non-nautical miles
 
@Drise "a ton of something" in British lands can mean "a hundred of something".
 
oh yeah, I forget for a moment then about nautical miles :P
 
@R.MartinhoFernandes In the states, a ton is 2000
 
-1 because "note that omitting the return value without invoking undefined behaviour is possible only with main()." is incorrect under both the literal and the very friendly forgiving interpretation, and the OP has refused to fix it. — Cheers and hth. - Alf 1 min ago
 
3:02 PM
Is this the debate we are having?
 
@Ell I think everyone here will agree that a video tutorial is the best way to learn C++:
 
Ell
@R.MartinhoFernandes can it?
 
@Ell That's what I was taught.
 
^ What is it with these folks who refuse to fix simple errors and instead choose to argue?
 
@Drise not really a debate
 
3:03 PM
@Cheersandhth.-Alf Isn't that quite pedantic?
 
And wikipedia mentions it as well.
 
Ell
oh :L
 
if you want really obscure units, check our things like 'barrel', 'cask' and 'keg'
it is also my understanding the a 'box' of wine is 12 bottles
dozen is 12, backers dozen is 13, the greedy feckers
 
Biblical and Talmudic units of measurement, such as the Omer, used primarily by ancient Israelites, appear frequently within the Hebrew Bible as well as in later Judaic scripture, such as the Mishnah and Talmud. These units of measurement are still an important part of Jewish life today. There is much debate within Judaism, as well as by outside scholars, about the exact relationship between measurements in the system and those in other measurement systems, such as the International Standard Units system used in almost all parts of world except the USA, and in modern scientific writing. Cl...
 
Attoparsecs and millifortnights are my favourites.
 
Ell
3:05 PM
jereboam
furlongs/fortnight
 
Many people have made use of, or invented, units of measurement intended primarily for their humour value. This is a list of such units invented by sources that are notable for reasons other than having made the unit itself, and of units that are widely known in the anglophone world for their humour value. Conventional These units may or may not have precise objectively measurable values, but all of them measure quantities that have been defined within the International System of Units. Systems FFF units {| class="wikitable" style="float:right;" |- !Unit || Dimension || Definition || SI...
my GF has banned me from using 'cock' as unit of length :(
 
indeed
 
She doesn't like to measure atoms?
 
well, I think she got fed of with me comparing everything to my cock
 
3:11 PM
@R.MartinhoFernandes Smooth.
 
@thecoshman She doesn't understand the yotta prefix.
 
there's only so many times I can inform her that a glass is a half cock tall, or that the remote is quarter cock wide
 
A dozen (common abbreviated doz or dz) is a grouping of approximately twelve. The dozen may be one of the earliest primitive groupings, perhaps because there are approximately a dozen cycles of the moon or months in a cycle of the sun or year. The dozen is convenient because its multiples and divisors are convenient: 12 = 2 × 2 × 3, 3 × 4 = 2 × 6, 60 = 12 × 5, 360 = 12 × 30. The use of twelve as a base number, known as the duodecimal system (also as dozenal), probably originated in Mesopotamia (see also sexagesimal). This could come from counting on one fingers by touching the digits w...
 
No Mark B brother. i didn't write code as you typed. i don't make any silly mistakes in coding. I run this code on different systems many times. all they give me same answer. you can run my code on your c compiler. you will get the same result. I didn't add any semicolon after printf statement. reply Mark B brother, i need your help. — Mohd Iftekhar Qurashi 17 mins ago
> i don't make any silly mistakes in coding.
 
¬_¬ does it always have to come back to you being jealous that you where not built with a cock in the first place?
 
3:13 PM
@thecoshman That's a very small glass.
 
@EtiennedeMartel It's a tiny shard.
A grain, someone might call it.
 
Some might mistake it for dust.
 
@EtiennedeMartel twas a small tumbler to be sure
sigh... I knew there was a reason I haven't tooted my trumpet on here before...
 
Yep, its size was the reason.
 
sbi
@thecoshman "The speed of light may be expressed as being roughly 1.8 terafurlongs per fortnight." Wow.
 
3:18 PM
@R.MartinhoFernandes ¬_¬ please stop thinking about my cock so much
 
@thecoshman You're the one that's swinging it in our faces.
 
@sbi oddly practical me thinks
any ways, I shall bid ye fair well. stupid fair well, it should be one word
 
sbi
@thecoshman You are referring to some odd practice, Shirley?
 
@sbi wrong spelling? or general mockery?
 
You got a small dick, that's what we're saying.
 
sbi
3:22 PM
@thecoshman Such measurement units can only be "oddly practical" when doing some odd practice, no?
@EtiennedeMartel Not me.
 
@thecoshman Why would you put a well on a fair?
Anyway, if you're leaving, farewell.
:P
 
@sbi Yeah, I know.
 
In english math notation, interval (0, 1) means "from 0 to 1, both excluded" ?
 
@Cicada Yes.
 
thanks
 
3:24 PM
Square brackets means included. Parentheses mean excluded.
 
Funny @Mr Daniel Fscher. i like your comment. ha ha ha. — Mohd Iftekhar Qurashi 12 mins ago
This guy is weird.
 
We use square brackets for all kinds of intervals.
Open ends have the brackets facing outwards.
 
Yeah, I used that too.
Actually, that's what I've seen right until when I got into university, when parentheses were used instead.
 
@EtiennedeMartel dunno, what is "that"?
 
Oh gawd, TurboC 3.0 is really really borked.
 
3:29 PM
What a surprise.
 
@R.MartinhoFernandes he he
 
Any compiler/IDE with "turbo" in the name is shit.
 
@EtiennedeMartel no, they were excellent tools, at the time
 
sbi
@EtiennedeMartel It used to be really good — 15-20 years ago.
 
@EtiennedeMartel Seriously, failing at loops?
I thought that was only Java 7.
 
3:30 PM
Ouh.
 
sbi
> 1 meter = 200 000 000 beard-seconds — google
 
@sbi Why do people keep using it?
 
sbi
@EtiennedeMartel That, of course, escapes me.
 
good afternoon everyone :)
 
@R.MartinhoFernandes g++ has some optimization options where it fails at loops. it has some extra options to attempt to not fail. it still fails.
 
3:33 PM
@Cheersandhth.-Alf Aren't those alpha features ?
 
no, for many years
 
@sbi I guess many people don't know any better.
Or are taught to use those tools.
I'd blame the teachers, actually.
 
I have a friend who regularly builds his software with ultra aggressive optimizations. He told me Firefox used to "start super quickly, and crash super quickly."
 
This should be a simple question, is there a way to make gcc tell you what functions aren't called? I've written a mess that I need to clean up now that the mess has been refactored.
 
it's sort of hallmark of that compiler, that it has "optimization" options for extremely marginal just possible optimizations, that really screw up things (loops, floating point arithmetic, character sets, not to mention strict aliasing).
 
3:35 PM
@Cheersandhth.-Alf SOrry haven't been following along... which compiler?
 
g++
that's the GNU "gcc" compiler used to compile C++
 
yes I know... what optimization level is considered safe?
 
@Chimera Maybe with callgrind.
 
@StackedCrooked Ah thanks... I will see about installing it...
 
3:36 PM
Static analysis.
 
Callgrind shows the number of times each function has been called. So that may reveal uncalled functions.
 
@CatPlusPlus Yeah, I was hoping gcc could do some of it...
 
Or gcov if you have good test suite coverage.
But just running the program might not test all paths sufficiently.
C++ is bad for this stuff.
 
Compiling with -Wall -Wextra -Werror will give compiler errors on unused functions that are local to the compilation unit. (IIRC)
 
@Chimera According to the doc, only -Ofast is unsafe.
 
3:37 PM
Delete one function at a time. Put it back if the compiler complains.
 
@kbok oh ok
@R.MartinhoFernandes Lol yeah that would work also. :-)
 
Although people generally prefer -O2 to -O3. I think it's for debugging purposes.
 
Debugging with optimisations enabled is a pain anyway.
 
True, but running with optimisations disabled is a pain also.
 
Especially if some genius used -fomit-frame-pointer along the way.
 
3:40 PM
-vomit-frame-pointer
 
Hi xD
Does anyone here use pthreads or has used them in the past sometime?
 
Frame pointers are redundant: yosefk.com/blog/…
-fasynchronous-unwind-tables -ftw
 
@ecatmur isn’t that the guy from the troll FQA?
 
Yes, it's the same domain.
 
yup.
 
3:48 PM
I have just a simple question regarding the documentation of the pthreads :s
Is anyone here who would want to answer xD?
 
@Papergay I can try
 
we'll give it a shot, but pthreads is surprisingly vauge
 
Just ask, someone will help you :D
 
Is there any proper documentation? I can only find snippets scattered all over the internet
Or something like man pages would also do xD
 
man 3 pthread_*
 
3:50 PM
@Papergay read the Open Group docs.
 
Oh those pages, thanks.
:o
 
is this @CatPlusPlus? xd
 
It appears @Cat wants to die.
It also appears he's a seven-legged, winged orange cat.
 
Hi al
 
3:59 PM
Aloha
 
I am trying to under my code here: codepad.org/4DZgNqIK
 
@Arun Since you seem to be new, read this.
 
My expectation is that the the threads should be cancelled and it must be joined.
@EtiennedeMartel Sure.
 
hmm when i tried to include pthread.h it didnt work for me
i had to link against pthread libraries instead
 
hey all, would anyone know the best way to invoke a WCF REST Service from an unmanaged C++ app not running in .NET?
 
4:03 PM
@Jordan use a HTTP library like libcURL.
 
@Papergay Yeah, you will have to link it with -pthread
@papergay gcc threads.c -o thr -pthread -Wall -- sorry I should've told you before.
 
@RadekSlupik thanks for that. Do you happen to know by chance if it supports ws*
 
@Jordan What is ws*?
It supports a number of protocols.
If you want XML or JSON or whatever, you need to do that yourself or using an XML- or JSON-library.
You can combine that with cURL, of course.
 
@RadekSlupik Is it webscale?
 
4:05 PM
@papergay A conditional variable is a cancellation point. So I was expecting the child threads to exit cleanly (since they were signalled).
 
it is
 
@DeadMG libcURL doesn’t use SQL or JOINs, so it’s high-performance and web scale.
 
@RadekSlupik Thanks, I need to consume JSON data from a WCF REST service (Hosted on azure) , preferably over HTTPS
 
@papergay In addition, the cancellability is set by default.
 
@Arun I read that a pthread_cond_wait resumes its task when it was canceled
 
4:06 PM
damn
I need to find a new chatroom
3
 
the cleanup handler is invoked after the pthread_cond_wait is done
 
@Jordan cURL supports HTTPS. For the JSON, see this question:
154
Q: What's the best C++ JSON parser?

Sam BakerI've seen the C++ JSON links on www.json.org but would like some feedback on which parser people prefer - for reliability, speed and ease of use. Thanks, Sam

 
@RadekSlupik Cheers for the help!
 
Yeah.. but only the first thread exits cleanly. The second thread is stuck in the cleanup handler.
 
@Jordan No problem.
 
4:07 PM
yeah
because you lock the same mutex twice
and you dont unlock is
 
Use RAII and you will never forget to unlock a mutex.
 
or wait, before i keep talking let me read something xD
 
:) sure.
 
"a side effect of acting upon a cancellation request while in a condition wait is that the mutex is (in effect) re-acquired before calling the first cancellation cleanup handler. "
 
Yes. That's expected.
 
4:09 PM
does pthread_cancel terminates the thread immediately?
 
This is equivalent to acquiring a mutex when the condvar is signalled.
 
This question is one of the most constructive questions on this website, unlike the thousand crappy questions per day that don’t get closed. — Radek Slupik 11 secs ago
 
No, it sends a signal to the thread to exit.
If the thread is in a cancellation point, then it exits, following the signal..
which will then be reaped by the main thread (as in my code)
 
Forcefully killing threads is a bad idea.
 
i know thats what im saying
but your second thread is waiting for the mutex_lock
 
4:12 PM
@R.MartinhoFernandes Yeah. That's why I am more interested in reaping it.
 
because you did not unlock it
 
exactly.. but then what is point of making condvar as a cancellation point.
 
I really hate to say, I have been in the process of complaining to the Dean of Students. — StephanM 49 mins ago
I thought this was awesome
The professor gave the kid a slide with void ~Vehicle();
What the fuck man...
 
@arun use this pubs.opengroup.org/onlinepubs/7908799/xsh/… and write a function that simply unlocks the mutex
 
@Papergay Thanks, that seems to be promising.
 
4:16 PM
@Arun you should be cautious though, you have to use pthread_cleanup_push/pop in the same scope
 
@Drise yeah, saw that question
There are lots of professors that don't know shit about what they're talking about
 
@mfontanini I mean, I've seen horrible professor code, but what I've seen was at least syntactically correct. That code from that question was just outright fucked up.
 
Yeah.. I had a look at the pthread.h - it is a macro wrapper
 
It may even have been C with classes, but shit. It still compiled.
 
Haha yeah, the person who wrote that has clearly never used C++
 
4:21 PM
@Arun Do you run trak.in ?
 
@Chimera No, I don't
 
@Arun Ah ok... Just curious I used to host that website and knew of that Arun...
 
:)
 
I fucking hate when professors are ignorant of the code they teach. It's getting under my skin more and more.
Possibly has to do with me being morphed into a pedant because of you all y'all.
 
Oh yeah, I hate that. Here at my uni there are LOTS of professors that read X book, and stand in front of the class, reciting it.
 
4:26 PM
lol
 
But if you ask them to actually explain what they're saying, they surely don't know how to
 
@Papergay Found an elegant solution. Thanks to man pages.
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
I'm so glad my professors were simply bad teachers, but knew their stuff.
 
@DeadMG Why?
 
thx for sharing :D
 
4:28 PM
@mfontanini At least my professor read his text book, decided it was shit, and made it recommended instead of required so we didn't have to buy it. It recommended the use of structs as substitutes for classes because "we can put functions in them, so why not?". And then also recommended the use of GOTO.
 
Use this as a first call in fun().
 
Don't leave me!
 
@R.MartinhoFernandes Feels like every time I come in here is a bunch of random people discussing their Java problems.
 
@MooingDuck Idk, I think I'd rather just learn on my own.
 
@DeadMG Hmm, AFAICT, they were talking about pthreads.
 
4:29 PM
that was the other conversation
 
And there were people talking about using some WCF service from C++.
 
@Drise lol. (Un)Luckily, they don't teach C++ here.
 
@mfontanini Then take advantage of it and teach yourself. Here is likely to be the best C++ education I've ever received.
 
The thing is, things are fucked up since 1st year. You start the uni and they teach you bad programming. They force you to learn how to solve stuff by memorizing the algorithms involved.
 
many people in the Lounge feel similarly.
 
4:32 PM
So then you get to second year and see guys that don't know how to write the most fucking simple recursive function.
 
university rarely, if at all, teaches practical skills
@R.MartinhoFernandes I know it's not literally every time. It just feels that way.
 
Speaking of Java, did I mention I strongly dislike checked exceptions? </rhetorical>
 
the reason I keep coming here is to talk to you and the other regulars; my friends
 
@mfontanini And then you get an internship, and you're asked to store a bunch of data of unknown size, and you think "Ok, I'll just write a linked list" instead of "I know what a linked list is, so I'll use a std::vector"
 
4:33 PM
Yeah, I mean, you need to learn stuff on your own. But they could at least give you a good programming base.
 
I did that in my first week.
 
@R.MartinhoFernandes We all do ^^
 
Hahahha yeah, I started using the STL like 1 year after I learnt C++.
Who the hell would not create their own data structures, right?
 
I hated the Standard lib when I first started too.
 
@mfontanini My boss looked at me like I was fucking retarded when I said "I'll just write a linked list"
 
4:34 PM
in fact, I hated the whole statically typed idea.
 
lol
 
I was perfect from the start.
 
hahahah
 
hey, I effectively started learning from C
 
4:35 PM
@R.MartinhoFernandes I call bull.... oh wait... robot... right.
 
Yeah, I used C++, which was actually C with clases, nothing else. No STL, no templates, no nothing.
 
@mfontanini Lemme guess, no RAII.
 
@mfontanini Yep. That's how universities teach it.
 
@R.MartinhoFernandes Oh no, I got that one right away.
 
Yeah, char * a = new char[X]; all the way!
 
4:36 PM
"C with classes with RAII" isn't that bad. But "C with whatever but no RAII" is the real evil.
 
when my tutorials recommended malloc and free, I smelled BS instantly.
 
@DeadMG Sorry, not meant for you.
 
and I never used C-strings.
also
I've decided to attempt a new diet
 
I decided that many times before.
I never attempted one.
 
this one can work for me, I think.
 
4:38 PM
Java free diet?
 
No cookies?
 
rather than eating something different, it tends to simply involve not eating, which I find simpler.
 
I never really decide to attempt a "diet". I just decide to consciously reduce portion sizes by 20% or something.
 
@DeadMG Erm, I know about jack shit about nutrition, but I have a feeling that is not good.
@SamDeHaan I just eat. :P
 
@R.MartinhoFernandes Well sure, but robots probably don't store fat the same way humans do
 
4:39 PM
@R.MartinhoFernandes Actually, there's some new Science™, which suggests that eating little on some days is amazingly beneficial.
 
@SamDeHaan I never cared, and never got fat. And I'm a carnivore by choice. Maybe I'm immune.
 
@R.MartinhoFernandes I haven't gotten fat, yet. But I have added a few pounds I'd rather not have.
 
@R.MartinhoFernandes It's a biological thing. Some people have it, some people don't.
 
Have to adjust to this whole 8 hour workday of not much movement.
 
@SamDeHaan Ok, I never gained weight (well, except when I was growing up :P).
 
4:41 PM
but obesity is like cancer- there are many causes, which are not well understood
 
@DeadMG I guess I'm lucky :P
 
@papergay Well, that doesn't really solve the problem if you make the main thread sleep for say 1 second after thread creation.
 
@R.MartinhoFernandes Indeed.
 
The clean exits were actually unclean.
 
In fact, my grandma often tells me I should eat more because I'm too thin.
 
4:42 PM
lol
 
> warning: suggest explicit braces to avoid ambiguous 'else'
When did my compiler get this smart?
 
I'm not thin, I'm quite... normal. Whatever the word is.
 
normal is fine
 
@Drise About 5 years ago.
 
VS warned me about op precedence when I did x != y ^ z;
what muppet put != as higher than ^?
 
4:43 PM
Haha, looking for logic in C++.
 
indeeed
 
@DeadMG C I think
 
@arun ?
 
@DeadMG I always slap parentheses around bitwise ops. It's the only sane option.
 
@R.MartinhoFernandes Has there ever been a grandmother who didn't think their grandchildren were too thin?
 
4:44 PM
@Arun sry i lost the thread, i was reading something else meanwhile ... what exactly couldnt you solve neatly?
 
@Collin I wouldn't know, I only have two.
 
both of my grandmothers :P
 
@DeadMG shifts are a little wierd too if I recall. I think they're just confusing because of streams though.
 
anyway, I require sleep now
ate too much junk
good night nubcakes
 
4:53 PM
anyone wanna join me on mumble?
 
sure... if you'll have me... I've never used it though.
oh it's voice communications.. can't,,, at work
My employers firewall will probably block it anyway
 
@Collin At least when he was born, my mother thought my second-youngest looked about right (but he was 10 pounds 9 ounces at birth, where average is roughly 7 to just over 8 pounds).
 
@Drise heh... thanks
 
I actually bought that poster...
 

« first day (661 days earlier)      last day (4304 days later) »