« first day (1018 days earlier)      last day (4156 days later) » 

00:01
@Link You got it? Good, here's a spoiler coliru.stacked-crooked.com/…
@sehe why ss?
Don't forget whitespace can appear in the middle of a line or at the end
@MooingDuck Because I'm lazy. I hate going through the motions to either use istreambuf_iterator<char> or std::cin.unsetf(std::ios::skipws)
Anyways, the algorithm doesn't change :/
std::string input;
std::getline(std::cin, input, 0); //?
Fixed
@MooingDuck Why linewise?! /cc @Link
@sehe it's not linewise, it reads until the first null, which is effectively the same as your first draft
00:04
Ah. Good point. Except when input contains NUL characters
Also, my version is now streaming, whereas yours keeps everything in memory.
@sehe I just realized that .str() doesn't stop at the first null like .c_str() does. My bad
@sehe yes, your second draft is far superior
@MooingDuck :D I should remember that istreambuf_iterator is actually less code than the rdbuf() bulk spell
@Rapptz Woah*
woah sehe, helping students with their uni assigments again?
@sehe Same thing..?
@sehe lol
00:07
@Rapptz Different spelling
@Telkitty猫咪咪 Summer holidays
It's literally too hot to sleep.
> Whoa can also be spelled "woah" though there are many arguments started by bored people about which way is correct.
@CatPlusPlus Too sexy for my bed
My browser has decent unicode support. 猫咪 are two characters.
@Telkitty猫咪咪 nope. I'm doing it for them because I'm too lazy to explain and want to find out whether there are gotchas and things that can be improved.
Ell
Ell
00:10
Pray tell, what is "character" according to Unicode? I didn't think it was defined ?
@Ell he means glyphs
"Character" is ambiguous.
@Ell Stuff that vim shows to me in two spaces.
Suppose to be three characters, just another way of calling kitty. A but like Jim & Jimmy
Ell
Ell
Grapheme clusters maybe :P I've been programmed to take character as ambiguous by osmosis
00:12
I don't get it. It's supposedly 20 degrees, but it feels like 40.
@MooingDuck Documentation? Testing? Explore new tools? Work in a local working directory? Research something new? Investigate a bug?
@CaptainGiraffe glyphs
You shouldn't need to ask
Humidity at 88% jesus
Feb 1 at 13:55, by R. Martinho Fernandes
Ah, System.Globalization.StringInfo.GetTextElementEnumerator is the grapheme cluster stuff.
00:14
I need an AC.
@LightnessRacesinOrbit that's what I am doing, but it feels wierd
@MooingDuck How many glyphs are the answer to this Q ? stackoverflow.com/questions/1732348/…
@CatPlusPlus Jesus introduced AD, I think AC is obsolete
@sehe Anno Calculus?
Whatever Jesus introduced is doubly obsolete.
00:15
@CatPlusPlus what do you need Alternative Current for?
If there were ever a religion based on the teachings of Jesus it might be pretty good.
@Telkitty猫咪咪 markdown fail ******
blame SO chat developers
Meh, AC too expensive.
Yeah I blame them for this button
@MooingDuck That's bad. I had a real reason :/
00:18
yes I am a SO programmed bot
@MooingDuck I like that better. Somehow I was still torn on whether I wanted to support absolutely defined tabulation stops (e.g. 2 6 10 17 21) which is why I kept col as state. I agree, I only ended up using (col-ws) which is 'delta' or `ws' amount, as you wrote it
@MooingDuck Um, what do you normally do? You just write code?
No. Code happens.
Who wants to write docs seriously.
/cc @Link
Must not miss opportunity to further confuse C coders
00:20
Writing docs feels great.
I don't even write docs jokingly
I wrirte docs for my own crap
@LightnessRacesinOrbit You get to impart superiority on needy readers?
If not then you're not proud of your work, and you should feel bad.
@sehe Yessssssssssssssssss
My code is self-explanatory.
00:21
Though lately my docs and specifications have taken on something of a C++ standard vibe to them. I just can't help it :( "It is implementation-defined whether this function returns any value when the input is green."
@LightnessRacesinOrbit Come on, there are far more direct ways than that. Everyone knows no one reads the docs :)
@LightnessRacesinOrbit ... that's not a good sign
@LightnessRacesinOrbit normally it's coding/debugging. But my buglist and todo list for this release are now empty. So I started addressing bugs that were to be delayed until our next release, but I can't check in fixes :/
@sehe They may not read them unprompted, but I enjoy referencing specific paragraphs when asked a dumb fucking question.
@LightnessRacesinOrbit lol. How could it be that I envision this so lively
I just found a big bug. hmm
00:22
@MooingDuck Fair enough
@MooingDuck I suppose that might make one feel somewhat.. naked.
@CatPlusPlus That's because you're a child and have never created a carrier-grade software application of significant scale.
A few flow diagrams and a network protocol grammar go a long way.
Besides, in order to secure IP rights on our network protocol, we have to specify it formally.
@MooingDuck It condenses spaces in the middle of a line without regards to... alignment of tabs :) You need col anyways (as did I)
@LightnessRacesinOrbit Not loftily like Fieldings
Ell
Ell
[tag: tomalak-so-PMS]
@sehe oh curses
@CaptainGiraffe Okay I don't know what that is.
00:24
my tent has came
@MooingDuck you found another bug? I didn't think there were more
@LightnessRacesinOrbit My misspelling You know R Fieldings
Ell
Ell
Heh
@CaptainGiraffe Never heard of him.
00:27
@LightnessRacesinOrbit "Roy Thomas Fielding (born 1965) is an American computer scientist,[1] one of the principal authors of the HTTP specification, an authority on computer network architecture[2] and co-founder of the Apache HTTP Server project."
Oh, HTTP guy
Sorry, I blocked out my memory of ever having met him
Ell
Ell
I only remember sir Tim berners Lee as anything to do with the internet
2
@MooingDuck coliru.stacked-crooked.com/… fixes that (tested) /cc @Link
Writing most of the first apache web server is but a bagatelle.
00:30
damnit I can't make my library deadlock free unless I assume whoever is using it isn't an idiot
//Create A Namespace called "Header"
namespace Header
{
    using namespace std;
}
wot.
so many things wrong in his code lol
@CaptainGiraffe Precisely. Also, wasn't that lighttpd?
@Rapptz What is this ?!!?
@Rapptz what's wrong with that? If that's a private namespace (as in implementation detail) it's actually a lot nicer than globally using namespace. I do this frequently. namespace implementation { using qi = boost::spirit::qi; using boost::phoenix::bind; .... etc.
@Rapptz The comment is more than silly, though
00:33
@EJP: As long as all those muppets below keep answering questions like this? Yeah, he will think that. — Lightness Races in Orbit 44 secs ago
Hahahaha xD
@sehe The namespace is otherwise empty. (Though clearly it won't be forever, is the answer!)
@Borgleader I thought my other comment might have been more popular >.<
@sehe I don't quite get the point? It's an empty namespace with a using statement.
@LightnessRacesinOrbit That's cool. So now he can say using namespace Header; to secretly hoist everything from std:: into the enclosing namespace. Useful !!!?! (not)
@Rapptz I didn't know it was actually empty. I assumed you reduced it
@Borgleader I would have answered it ...
Weee
00:36
eeeW
eWee!
iWee
@sehe the guy you were trying to help earlier is answering questions, sadly it's not going so well for him
Xeo
Xeo
So, I've been trying out Splashtop on my Nexus for remote desktop, and man, this is nice. Too bad the free version will only work inside the local network
I think I'll try TeamViewer tomorrow to compare.
@Borgleader uhoh. that's bad.
00:41
I desperately need a dehumidifier.
EWI (an acronym for electric wind instrument, pronounced EE-wee) is the name of Akai's wind controller, an electronic musical instrument invented by Nyle Steiner. The early models consisted of two parts: a wind controller and a synthesizer in a rackmount box. One of the current models, the EWI-4000S, combines the two parts into one, placing the synthesizer in the lower section of the controller. It uses the Boehm fingering system and is designed to be similar in action to a soprano saxophone, although players familiar with the clarinet should have no problem adjusting to the fingerin...
Xeo
Xeo
(together with Hacker's Keyboard, this is really nice.)
Ell
Ell
@cat isn't rock salt and charcoal supposed to dehumidify? Try putting a load of it in a basket or something xD
Yeah, I'm sure that'll work.
I'll just get my stash of charcoal I keep handy just for this kind of thing.
Xeo
Xeo
I guess I could also use a VPN app of some sort to circumvent the "same network" stuff.
Ell
Ell
00:45
@cat we have charcoal stash for barbecues, I don't think it is that unreasonable
needs cat litter I am sure you have that around
@A.H. Yeah sure.
@EtiennedeMartel Oldie but a goodie
@MooingDuck since you apparently went to sleep, lemme post a correct fix (that obviously starts with tabs first :)) coliru.stacked-crooked.com/… /cc @Link
And I'm out
00:48
hello folks
@sehe 'night 'night
Ell
Ell
@sehe night :)
@sehe gnight
Ell
Ell
Good to talk :)
Cheers
Xeo
Xeo
00:48
anyone here ever poked around with that vpn-on-mobile stuff?
Only time I ever used a VPN was to do my assembly homework from home
Xeo
Xeo
oh well, tomorrow then. g'night
I have a trivial but hard-to-google C++11 question: How do I write
template<typename T> struct Addition { static const bool IsSupported = ...; }
such that Addition<T>::IsSupported is "true" if and only if "t + t" is a valid expression? I can do it with helper structs, but is there a one-liner?
Ell
Ell
Goodnight all
Xeo
Xeo
00:52
53
A: Is it possible to write a C++ template to check for a function's existence?

XeoThis question is old, but with C++11 we got a new way to check for a functions existence (or existence of any non-type member, really), relying on SFINAE again: template<class T> auto serialize_imp(std::ostream& os, T const& obj, int) -> decltype(os << obj, void()) { os << obj; } template<...

@Xeo thanks... but it looks like the gist of that question's answers is "no, there's no one-liner".
at least not without macro magic
Xeo
Xeo
ya
bah. oh well.
@Quuxplusone coliru.stacked-crooked.com/… a 4-liner. By the way, this is known as SFINAE-ing on an expression. And SFINAE is very googleable
01:02
lol
@CatPlusPlus Wait, wasn't that the extremely crappy site?
Yes.
I've been looking at bookmarks.

Write a programming!

Jun 1 '12 at 23:38, 15 minutes total – 66 messages, 8 users, 7 stars

Bookmarked Jun 4 '12 at 19:07 by daknøk

Don't worry, Internat Archives has you covered: web.archive.org/web/20121001205042/http://…
Jun 1 '12 at 23:41, by Cat Plus Plus
> C programming is a based of all programming language. It is provide basic concept and basic step for learn any programming language. C is a mother of all programming language. C programming developed by denies Ritchie at the Bell lab in 1973. C ++ and C# is a latest and advance version of c programming.
Incredible
maybe the site is meant as a joke ?
Evening
@CatPlusPlus, can you bash Objective-C for me, please?
@sehe It denies Ritchie.
01:12
@Jeffrey Denied.
Oh ok. Objective-C is such a great language. It makes me shit rainbows.
Waaaay better than Haskell
@Jeffrey You might want to see a doctor about this.
For the first or second part? (if you have to ask: both)
All of it.
01:14
@Jeffrey So, a language is either complete shit or the best thing since sliced bread with nothing in between?
People don't usually shit rainbows, it's probably a medical condition.
How cool of a condition is that though?
@CatPlusPlus ..or possibly a prawn magmaloo.
You killed this conversation.
I think I'll might wanna try writing an application in Obj-C. But I'm not sure if I wanna spend my time on learning it. How bad is that from 0 (lisp,haskell) to 10 (php, java)?
01:20
11
^ this
Even worse than php?
Oh god.
Well, maybe.
I wouldn't conflate PHP and Java.
Your scale is broken.
01:22
Yeah it is. It was just an hint to where the arrow is pointed to in the scale.
Objective-C is just an obsolete language with poor tool support.
I mean, say what you want about Java, at least its tools are somewhat compensating for its deficiencies.
With Objective-C, its making them even worse.
Why don't they just drop it then?
Who? Apple?
Political reasons, probably.
Too much code has already been written that uses Objective-C.
Also, maybe someone high up really likes it.
01:27
There's also an entire ecosystem whose butts will cry out in hurt if they lose their precious Objective C.
It goes against the "always move forward" kind of politic they have though.
I mean, that's the main reason OS X uses ObjC: because NeXT used it, and the guy who made NeXT really liked ObjC (although back then it wasn't that bad compared to the languages available at the time).
@Jeffrey That's not their policy.
That's the llvm/clang team's policy, sure.
But Apple != clang
@EtiennedeMartel didn't they drop Flash support because they claimed "Flash is not the future"?
So they were moving forward?
That's an excuse, not a policy.
01:30
@Jeffrey That's their stated reason. Underneath it's because they did not want the Flash engine running on their phone.
Probably a mix of security and legal concerns.
Probably.
Anyway. As Orwell said: all issues are political issues.
Supporting ObjC might not make sense from a technical standpoint, but thechnicalities are rarely relevant.
I guess you don't have a choice though if you are planning on releasing on iOS.
They even dropped support for Carbon which, IIRC, was the C++ API
What if instead of using the & operator we used the @ operator?
01:46
Are annotations - or the likes of them - useful in a language such as C++?
C++11 (formerly known as C++0x) is the most recent version of the standard of the C++ programming language. It was approved by ISO on 12 August 2011, replacing C++03. The name follows the tradition of naming language versions by the year of the specification's publication. C++11 includes several additions to the core language and extends the C++ standard library, incorporating most of the C++ Technical Report 1 (TR1) libraries — with the exception of the library of mathematical special functions. C++11 was published as ISO/IEC 14882:2011 in September 2011 and is available for a fee. The ...
should be a link to http://en.wikipedia.org/wiki/C%2B%2B0x#Explicit_overrides_and_final
@melak47 You're alive!
:o
if you wanna call it that...I've been writing javascript again :(
Oh lawdy lawd.
Wouldn't overloading something generally be something you would want in the base class?
01:52
What're they making you do now?
@Pawnguy7 Rephrase.
terrible web apps, still
Oh boi.
Webwebwebweb apps!
No C++ relief at all?
nope :p
Heh.
Well, I mostly finished my RasterFont solution. :D
Gotta add raster-font support for Right to Left and Bottom to Top text, but, for the most part, it's all been awesome.
@ThePhD Like, if I wanted to make sure I overloaded a method, I would think I'd put that at the base. Otherwise, I am basically trading remembering one thing for remembering another. Unless I misread.
01:59
why would you want rasterfonts when you have ~DirectWrite~
@Pawnguy7 You can only overload methods marked virtual and put in one of the bases of an inherited class.
@melak47 Not implemented yet. That shit be hard, yo. :c
@ThePhD I am not finding what is contradictory here.
@Pawnguy7 Then it's all fine. :D
02:15
That's not overloading.
That's overriding.
And subtype polymorphism is something you really need to design your base classes for.
See fragile base class problem.
@Rapptz Your linked meta question has all the answers.
What is duck typing?
Python thingy. Just like templates.
It isn't a python-only thing, lol.
02:26
I mostly hear it being associated with python. So that's what I usually associate with it too.
Pawnguy man, learn to google.
In computer programming with object-oriented programming languages, duck typing is a style of dynamic typing in which an object's methods and properties determine the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface. The name of the concept refers to the duck test, attributed to James Whitcomb Riley (see history below), which may be phrased as follows: :When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck. In duck typing, one is concerned with just those aspects of an o...
I am to tired to google :\ an odd mindset, but nevertheless it exists.
That is the most retarded thing I've heard.
Probably.
BTW, something very unrelated, do I need to indent the "Thru:" part in a business letter? Google returns gibberish.
02:30
Thru?
@Pawnguy7 Yes, like "PAWNGUY7\nPresident blah blah\n\nThru:\nSome Name Here..."
Like an HTTP proxy. It is in the Thru part where you send the letter, then forwards it to the actual recepient.
Oh.
Don't think I have ever heard of such a part, no idea.
I remember it somewhere, where you should indent the thru part, though I don't clearly remember.
Ugh, Wikipedia. Duck typing is not strictly dynamic.
They even include C++ in examples. Shit quality as usual.
> namespace DuckTyping
lol
02:36
To be honest, all the formal stuff has never been my thing. Just be respectful, I guess. Though I suppose that is probably flawed.
> Relative Humidity 93%
Wow. Google dictionary v2.0! And it includes translation.
Weather status: still shit.
@sgun Uh, congrats?
2 messages moved to bin
as far as I know using stdarg.h is dreaded for portability issues
02:39
Also ugh printf and macros.
printf blows.
Varargs are not type-safe. Don't use them, ever.
@Pawnguy7 Guess I'll just do that. I think the recipient isn't that much of a pedant.
And doubly so for the entire printf family.
yeah but I ended up suggesting a solution with them since printf is implemented in this way
02:40
It goes with the rest of my language/grammatical dislikes: I highly doubt I will ever need to know what a gerund is in practice.
Cool Google word meaning also includes origin.
can you detect any side affect of using "my first suggestion" to that question.
?
I love this Pope.
But anyway, night everybody.
@Jeffrey night
Too hot and humid to sleep :<
02:55
God fucking damn it. Apple makes software that uses and leaks a lot of memory to run on computers THEY make with little fucking RAM
I'm writing unit tests instead. Woe is me.
Apple is not very good at computers.
I'm running back to Microsoft Windows soon ;_;.
(I may also create a partition for Ubuntu~)
@Magtheridon96 go full linux
cpx
cpx
There's one question I always wondered: Why do some people 'hit' the enter key and not press it like other keys?
Sometimes they hit it hard as if it would pop out.
03:13
Because it empowers them! ;_;
cpx
cpx
I have also noticed whenever I play a game on PC, I press the control keys harder.
But still I die in the game :/
So, instead of controlling the character through the keys, I try to control the keys lol
03:33
What game are you playing?
cpx
cpx
04:03
Some version of brick breaker.
04:27
stupid vodafone mobile broadband
starts blocking with 4mb left and won't let me renew because I have 4mb left
04:41
that's kind of retarded lol
@A.H. Ha ha - That's a catch 22
05:11
Well then, what is it? — Monet R. Adams 3 mins ago
Hahaha xD mod closes the question and adds a comment "Yes there is a way"
05:24
interesting question
0
A: Does T() return anything?(not the constructor)

Leonid VolnitskyT() calls default constructor and "returns" T&& type. Its lifetime is lifetime of expression in which it is used.

Really? o.O I'm not so sure about this T&& thing
@Borgleader what do you mean ?
It's a temporary object alright but it doesn't return an r-value reference.
A copy constructor taking an r-value reference would be called if you were to assign it but, I don't think its accurate to say it "returns" a T&&
binding temporary to non-const ref eh?
05:29
yeah you cant bind a temporary to a non const ref
wouldn't that mean T&& is returned
I don't think so... maybe @StackedCrooked can help clear this up?
You can bind it to an const ref or an rvalue ref.
Not that, the answer I linked.
Either my understanding is wrong or the answer is, I'd like to know which :)
My understanding is that a constructor returns an object, in this case a temporary one. You can take an r-value reference from it yes, but the constructor itself doesn't "return" an r-value.
Essentially T() is an expression. And expressions have a type.
I'm not good at this stuff you know :P
05:34
well it has to return something
You need to ask the robot, xeo or luc danton for the legalese.
Luc is awol, the other two are asleep :(
maybe luc has quit for good
or maybe he lost his memory and don't remember this chat any more
What are you asking? The return type of T()?
Maybe he became a hermit.
05:38
@Rapptz I'm under the impression the answer is wrong. I want to know if I'm wrong or if the answer is.
Well, maybe not wrong but misleading.
It doesn't return T&&, it'll be a dangling reference and it'll be moronic to do so.
It's just an r-value, he's confusing it with r-value referenced.
You use T&& to extend the lifetime of the object.
but you can be a hermit and be on this chat at the same time ... unless you mean physically becoming a hermit and reallocate to a state forest in which there is no internet connection at all
@Rapptz well what is the difference T r-value and T&&
would it be wrong to call any r-value a T&&
@A.H. T&& extends the lifetime of an r-value, or a temporary.
Well, I think in this case it's actually a prvalue. But an rvalue is a prvalue.
oh so we are just talking about the binding here
05:41
But what is the type of the expression T().
T or T&&?
T.
It doesn't return T&&, it returns T but it's an rvalue. If it returned T&& then it'll have a dangling reference. You're confusing types with value categories. — Rapptz 11 secs ago
@StackedCrooked The type is T. It's value category is generally an r-value.
That's what @Luc has told me before. Types and value categories.
Hey, look. cppreference has a section devoted to value categories
lol, I like this a lot better than the SO question I learned it from a long time ago.
05:45
@Rapptz thanks that clears things up
Found it.
296
Q: What are rvalues, lvalues, xvalues, glvalues, and prvalues?

James McNellisIn C++03, an expression is either an rvalue or an lvalue. In C++11, an expression can be an: rvalue lvalue xvalue glvalue prvalue Two categories have become five categories. What are these new categories of expressions? How do these new categories relate to the existing rvalue and lva...

I think the cppreference page is better.
Are you kidding me? And here I thought there were only l/r/x-values
No there are r/l/x/gl/prvalues
so saying x in int x; is an lvalue is wrong, because it could be an xvalue.
you'd need to say glvalue.
06:23
I have outlived my usefulness.
does that mean you are decisively becoming useless from now on?
06:43
I spent such a long time formatting the C++ standard quotes :(
Damn power fluctuation!!!
@Rapptz for?
@Borgleader this
@Rapptz Silly H2CO3, answering C++ questions. "Is it guaranteed to be null-terminated?" "We dont know" uh... yes... we do
06:54
I need one more C++11 answer for my bronze badge
morning
18 consecutive days, woot :D

« first day (1018 days earlier)      last day (4156 days later) »