« first day (878 days earlier)      last day (4298 days later) » 

user142019
10:00
I'll fix the formatting.
I hate clearcase ¬_¬
why do we need boost if we have'em in stdlib now?
@Abyx boost is a damn site more then smart pointers :P
@Mysticial looks nice
@thecoshman And quite a bit of that damn site is in the stdlib now.
10:01
@thecoshman everyone does
@Abyx boost != boost::smart_ptr. Also non C++11 compilers
and even more of it will be going into C++14
@Abyx because boost is more than smart ptrs, and because not everybody has access to C++11 compilers
@ArneMertz who gives a fuck about 10yo compilers?
10:02
@Abyx 10yo? Dude. Look at GCC 4.4 or 4.5 for instance. Or MSVCC 2010
or 10yo standard, whatever
msvc has std::tr1.
MSVC2008 has TR1.
and GCC 4.3 supports rvalue references and unique_ptr.
meh
boost uses tr1 when possible
it "just works"
that's not the point
that is the point
boost is convenient
10:06
the point is that a massive chunk of Boost is redundant now, and another very massive chunk hasn't been updated for C++11 features.
^ that.
depends on your definition of redundancy
and yes, the fact it isn't updated is lame
if they don't act quickly, there won't be much of a Boost left.
welp
they did their part earlier
because it's a lot of their work in C++11 and C++14
user142019
Boost is great.
10:07
indeed.
user142019
It's C++++.
but what about C++17?
or later?
they have at least 3 years to catch up
I won't mind if boost becomes obsolete.
I guess there are still features missing
10:07
the Committee can't keep depending on taking ideas from Boost.
user142019
Boost will still be needed for old code that uses it. :P
like spirit
user142019
Formatting fail.
Think about it: if boost becomes obselete, we'll have boost built into our C++ compilers.
Let that thought soak in for a bit.
user142019
wat
10:08
boost keeps adding adding new features
@DeadMG they aren't "depending". it's just commitee is too fucking slow
user142019
Why the fuck would you make (third-party) library features built-in.
@DeadMG why not?
user142019
@jalf because if they do, one day all of Boost will be standard and there is nothing left to take. :)
@jalf Principally, because in my observation, Boost is not adding new Standard-ready libraries at anywhere near the rate at which the Committee is Standardising the existing ones (or superseding their main uses with language features).
@Zoidberg like std::shared_ptr, you mean? :)
10:11
there simply won't be any Boost suitable for Standardisation left at this rate
user142019
Write Boost 2.0!
user142019
Call it Hike.
@DeadMG I think that's probably true of the C++ ecosystem as a whole though. At least at the moment. Right now, everyone is busy catching up to C++11. It'll probably be a couple of years before people really start coming up with new libraries to submit for standardization again
user1357851
mobile C++ ftw!
Also, if Boost (and everyone else) can't deliver new libraries for standardization, doesn't that just mean that the need isn't there? Seems like a good thing to me, it implies that what's already in the language is actually good enough for a lot of uses
user1357851
10:14
I wish mobiles have terminal mode, what would be so cool, imagine all the 'damage' we hackers could be doing to our poor phones
hmm
user142019
@Telkitty well install a fucking terminal emulator on your phone.
I think that in a healthy system, there should always be way more libraries ready for submission than the Committee needs or wants to adopt.
but tbh I think it's mainly about timing. In most people's minds, we're still in the C++11 timeframe. People are figuring out how to best use C++11 stuff, rather than developing new things for inclusion in the next version of the standard
user142019
It ain't rocket science.
user142019
10:15
There are terminal emulators for iOS and Android.
user1357851
@Zoidberg not emulator, I need access to the underline 'shell'/os on my phone
user142019
It's quite difficult to use bash without a terminal emulator.
user142019
I think you don't know what a terminal emulator is.
user142019
It's a program that emulates a terminal, such as the VT100.
Xeo
Xeo
Hey, puppy, got a blanket CWG proposal layout lying around somewhere? :)
10:17
@DeadMG kind of true, if the goal is to keep the standardization process thriving. But what if the goal is just to have a language that people are happy with? Every proposal made to the committee is basically people saying "what we have now is not good enough"
user142019
Or whatever modern terminal emulators emulate.
user1357851
& how am I going to use emulator to control a real phone?
user142019
CWG? Conversations with God Foundation?
C++ should totally break backwards compatibility with C
user142019
10:18
@Telkitty install terminal emulator and run it.
Xeo
Xeo
Meh, then I'll just use the one I had for relaxing auto-move restrictions.
Somehow, I just can't see a great demand for a black box with a dollar/percent prompt for the phone users I know.
Xeo
Xeo
@Zoidberg Core Working Group
user142019
It should start your default shell or login.
@jalf That's true. But what I'm also saying is that the bigger proposals are no longer coming from Boost.
10:19
@Telkitty you have no idea what you are talking about again. Why don't you read up and not criticise Zoidberg, who is giving you real advice?
I mean, not just in terms of C++11-new libraries
user142019
A terminal emulator is nothing more than a program that emulates a terminal. A terminal is an ancient device for I/O.
but things you could solve in roughly the same way back in C++03, too.
for example, there's some scattered Unicode support, but nothing really comprehensive or useful
user142019
It doesn't emulate a shell or whatever. It only emulates a terminal.
user142019
Because who the hell uses a hardware terminal these days.
10:20
and more advanced threading support, for another example.
user142019
Terminals and shells are unrelated, but you usually use a terminal to communicate with a command-line shell. On a PC or a phone, you'll need a program that acts like it's a terminal, which is called a terminal emulator.
user142019
Terminal on OS X, and xterm are examples of terminal emulators.
user142019
Most emulate the VT100.
You can't subtract pointers, can you?
yes
user142019
10:24
You can.
Xeo
Xeo
Sure can
user142019
How would std::distance work for pointers?
Xeo
Xeo
p2 - p1 == distance(p1, p2)
@Zoidberg walk the lesser pointer until it reaches the other one. :D
user142019
lol
Xeo
Xeo
(Guess what std::distance does for less-than-random-access iterators.)
10:25
I hope so, been doing it for years.
pointers are random-access iterators, and provide all the same operations.
@DeadMG At least they put the minimum basic tools in place. The ones you can't replicate easily. Except for char8_t, that is.
@DeadMG yeah, but again, look at the timing. For C++11, Boost had a decade's worth of proposals to submit, and now, their backlog has basically been cleared. Building up the proposals that went into C++11 took many years too
@TonyTheLion you can, if they point to the same array object. Otherwise you have UB
@ArneMertz right
10:27
@Zoidberg 'VT100' - ~~shudder~~
@jalf Yeah, but quite a few of them were in TR1 as well, and that was a lot earlier.
Ugh, so the scren is back to life, but it appears to have the worstest ClearType settings possible.
anyway
I'm not trying to suggest that Boost authors are slacking off
or that they won't contribute in the future
all I'm saying is that for the immediate future, the big library innovations in the Standard will not come from Boost.
@DeadMG yeah, but you're still comparing "everything that was added in the '98-to-2010 timeframe" to "everything that was added in the 2011-early-2013" timeframe"
@DeadMG Yeah, probably true
but I don't think it'll necessarily stay that way forever
also true.
10:30
@DeadMG But they are! Where are the movable optionals I ordered two years ago?
I was about to say
@R.MartinhoFernandes held up in customs...
strictly, the Boost authors don't owe us anything and if they are slacking off then that's their right/perogative/etc.
but they don't seem to be making a lot of progress... rvalue refs have been quite usable in every major compiler for a number of years now
@jalf I want my money back!
AFAIK many of them are involved in the library working group, so they might be just too busy putting things into the standard lib
Xeo
Xeo
10:33
Uhm... what is the usual way to allow additional compiler flags to be passed through the make invokation?
I tried CXXFLAGS := $(CXXFLAGS) .... but the flags I set in the makefile aren't taken anymore it seems. :|
@Xeo: CXXFLAGS += -NewFlag ?
or you'd have to edit the makefile to += the flags it wants to set instead of conditionally assign them
Xeo
Xeo
I have control over both the makefile and the invokation
Question title: "printing unicode characters as unicode in html" => turns out he wants to escape ampersands.
Is it true that if I use extern objects it has to create a new object for each source file I have?
Xeo
Xeo
@R.MartinhoFernandes lol
10:39
@RolandSams no
so maybe you have a ?= in the makefile wehn you set CXXFLAGS first - this will have no effect if you pass it in, so what the makefile sets will be "lost"
@jalf that's comforting
declaring an object as extern means "do not create this object, it will be created somewhere else, and the linker will be able to find it."
@jalf ahh, ok ty
user142019
10:48
blargh...so this (toy block) tower class for this assignment has an "addBlock" method which throws if the added block would make the tower unstable, but now we're asked to add a method that tells us whether the last added block threw - why the fuck should the tower know? the caller catches the exception to find that out already? :/
@melak47 sound like a good reason to reject that CR ;)
Change Request - or feature request if you like
oh. It's an assignment, so, I can't :/
@ArneMertz: Rejecting an assignment isn't always that good if it is mandatory. However, telling the tutor that it's b/s is mandatory.
Xeo
Xeo
10:54
@melak47 Why does that throw in the first place?!
user142019
@Xeo because that's how the interface we are to work with is defined. I suppose I could change the implementation to not actually throw :p
but then all the other code breaks >_>
Xeo
Xeo
stupid assignment
2
Q: Segmentation fault when assigning pointer to pointer

Primož KraljI have struct Node{ Node* father; Node* left_son; Node* right_son; char content; }; void build_tree(Node* node){ Node* left; left->father=node; //segfault } void init(){ Node* root; build_tree(root); } I am getting segfault in build_tree(). Why?

I loose faith in humanity with questions like this.
Seriously, can't people pick up and read a C++ book before asking questions
well then talk to the guys who defined that interface - let them tell you the reasons for that method
user142019
10:56
Fuck.
user142019
I accidentally a fork bomb.
I rejected a question in an English exam once. We were supposed to write an argumentative text in favour of some bullshit, and I wrote an argumentative text arguing that I could not possibly argue in favour of something I had no idea about.
@Xeo it's an assignment for some structural analysis class, so they seem to have crammed in everything they can. custom exceptions, custom linked lists, MVC and Observer patterns, etc
Teacher was cool and gave me full credit.
10:57
@TonyTheLion for knwoledge vampires it's so much easier to ask and demand feeding...
@Zoidberg Dude that doesn't happen accidentally.
@ArneMertz can't, it's not even my assignment :p
Oh, I almost forgot. They also demand we make a "class that provides 5 kinds of buttons" - does that sound like ButtonFactory to anyone else? :(
@melak47 or just provide the method - let it throw a WhyTheFuckWouldYouCallThisException :P
7
Q: Is it possible to disable GCC warning about missing underscore in user defined literal?

cmeubvoid operator"" test( const char* str, size_t sz ) { std::cout<<str<<" world"; } int main() { "hello"test; return 0; } In GCC 4.7, this generates "warning: literal operator suffixes not preceded by '_' are reserved for future standardization [enabled by default]" I un...

Sigh.
Xeo
Xeo
Whoever gave you that assignment, shoot him.
11:00
@Xeo y u no liek JButtonFactory
Xeo
Xeo
@R.MartinhoFernandes To quote a character from one of my favorite VNs: "Fufufu... hopeless mortals."
Btw @Xeo stopped adding missing lately?
Xeo
Xeo
Never heard that you should use robots for automatable tasks?
And you seem to do the job just fine.
Btw, saw my request for a better example?
alright, I'll provide the stupid method that tells you if the tower would have become unstable by that last attempted action, if the tower wasn't defined to be unable to represent an unstable tower...
@Xeo Yes. Can't think of one. I know I have wanted something like that once or twice, but can't really remember it.
11:03
Is the standard actually going to add new suffixes?
I think there are already proposals for it.
Xeo
Xeo
Better safe than sorry.
STL Y U NO DATETIME?
Because dates and times are terribly complex.
user142019
Doesn't std::chrono have something?
user142019
Oh.
Chrono is not for dates.
chrono is for chrono stuffs
user142019
Boost.Date_Time! :P
0
Q: Extracting Pure Text from an HTML File

Norman Roy de GuiaGood Day, I hope you can help me. I have to write this code that downloads the page source of a website and save it to an html file (I already have done this). The next part is to extract the text from that site, using the saved html file. I have this algorithm steps in my mind: Say we have an ...

ugh, parsing HTML in C
user142019
11:06
lol
user142019
With resource leaks!
Anyway, use NodaTime.
Oh, C++... :P
Xeo
Xeo
Mmm... Damn. I thought I could be all cool and pass -fsyntax-only for our check builds with clang, but the makefile also does ar rcs target *.o, which is kinda bad if there are no .os.
std::chronoda_time!
Xeo
Xeo
Any ideas? :)
11:08
FWIW, even NodaTime is bound to suck: it ignores both relativity and leap seconds by design.
The former is acceptable, the latter can be problematic.
user142019
So it's broken by design?
No.
UNIX time is broken by design when it comes to leap seconds.
Xeo
Xeo
Hm.. you can't have a variable introduce a comment, or can you?
@Xeo no.
Say, for example, UNIX time 1362691676 means that 1362691701 seconds have passed since midnight 1 January 1970 UTC.
user142019
11:10
lol
user142019
But how would you handle leap seconds?
user142019
Are they predictable?
@Zoidberg It's messed up, and that's why we explicitly left them out in NodaTime.
so...in an MVC based thing, would the view and controller(s) be the observers, and the model notifies them of stuff?
user142019
That is possible.
11:14
@Zoidberg FTR, NTP time does the same thing as UNIX time, IIRC.
i.e., given two arbitrary timestamps X and Y, with Y being later than X, there are no guarantees that Y - X is the amount of time elapsed between the two.
user142019
I see.
user142019
What about daylight saving time? (The most ridiculous invention ever.)
Timestamps are no longer really numbers. They are nore like IDs, and they are not unique IDs.
@Zoidberg That's a presentation issue.
user142019
Ah okay.
@R.MartinhoFernandes "We"?
11:17
Both UNIX time and NTP time represent instants as the number of seconds since some epoch, except broken by leap seconds.
@DeadMG I took part in the initial design and implementation.
of that I was unaware.
surely handling leap seconds isn't any harder than plain leap years?
Leap seconds are not predictable.
ok, so just have a list of them
Xeo
Xeo
lol
And update it every six months.
11:19
Technically, neither can cause a seg fault: char* is larger than char, thus more memory is allocated. Also you can not read beyond eof thus fread is legitimate too. There are other errors in the code, though. — Aneri 3 mins ago
what?
What UNIX time does is, on a leap second, the latest second is repeated.
@R.MartinhoFernandes Adding one extra entry to a list every six months doesn't sound like a big deal.
So, if there is a leap second after second 10, you have 1,2,3,4,5,6,7,8,9,10,10,11,12,...
@DeadMG The point is that you run inaccurate for some time.
yes, but at least you'd always be managing that inaccuracy and limiting it.
and if a person on Day X gets the latest update, then they know that they are basically not inaccurate, unless they're in the window between the leap second and the update.
user142019
user142019
11:22
lol looks so weird
@DeadMG And it's very hard to deal with this at a library level anyway, since the underlying OS timestamps are broken.
true.
what does Windows do?
You get the same issues we had with DST (dates that are either ambiguous or nonexistent), but at a more fundamental level in the API.
@DeadMG I think Windows time is the same as NTP time.
So we just called it a day and played along with the mess from below.
It already messy enough above the OS.
@Zoidberg Wait, "official U.S. time"? Leap seconds are inserted at midnight UTC...
user142019
It's a screenshot of time.gov.
user142019
And it's broken in Safari. lol
11:32
@DeadMG What about scheduling things while in that inaccurate window? Or scheduling into that window?
Did you know that Y2K problems showed up long before the year 2000? And there were already reported Y2K+38 problems?
logically, it's going to be less of a problem when the time is more accurate, even if the inaccuracy still exists.
and secondly, you could suggest a "pull from a database" solution to try and minimize it, so no active developer effort required
@R.MartinhoFernandes 'there were'?
@thecoshman were
surely sherly you mean 'there are'?
Maybe.
It's Shirley, btw.
11:36
It's a name, there are no wrong spellings of names :P
/ˈʃɜːrli/
:P
argh, I'm confused. Buttons are in the view. I press a button, that calls the action listener - which is the controller? which then goes on to do stuff with the model. so, where does the observer go? :/
Too many buzzwords in there.
but I have to use MVC and observer patterns :(
Maybe the observer just sits there observing the MVC championships?
11:38
> I need to implement "allocator-extended" constructors for a custom container that itself doesn't use an allocator, but propagates this to its internal implementation which is a variant type and whose allowed types may be a container like a std::map, but also a type which doesn't need an allocator, say a boolean.
holy crap
@R.MartinhoFernandes :/
Xeo
Xeo
Wheee, new makefiles and buildscripts submitted. Let's see what I break.
1
Q: Converting STL container<T *> to container<T const *>

SimonDI'm looking for a way to formulate a class having: an interface using STL containers of pointers with maximum 'constness' but which internally mutates the pointed-to objects with no extra run-time overhead compared to a non-const analog Ideally, the solution would compile to no extra code com...

does this actually make sense?
g'morning all
I was up all night sourcing
hmm, what should I have for breakfast
user1182183
Hm guys I'm having a presentation about Hashing an Cryptography, and I would lke to show my audience a sample of how for example MD5 works, but in a graphical way. Is there any kind of "graphical (scripting) language" which could show what is done at each step so I can make a short movie?
11:43
UML
have fun :P
user1182183
My presentation is kinda done, I have 2 days (to "add" that movie), is that enough time? XD
@TonyTheLion you say that like you are joking. this stupid assignment wants UML diagrams of the stupid classes! :(
user142019
Don't do it.
user142019
Tell your teacher you're too good for UML.
user1182183
@Zoidberg yeah it's not mandatory but such a visual overview of what MD5 does would be a big +
user142019
11:45
You shouldn't use UML for that really.
paint :)
user1182183
@Zoidberg do you recommend anything? :P
user1182183
@TonyTheLion Lol Last Resort XD
yeh, paint
user142019
Anything that suits the job.
11:45
^ vague
user1182183
^^^ yeah...
lol
good luck
Scumbag Zoidberg: says solution X sucks, has no better options
@TonyTheLion It's inherently broken.
user142019
Visualize all the steps required to hash something using MD5 in order.
11:47
Same thing as wanting T** to convert to T const**.
@R.MartinhoFernandes I had that thought too
user1182183
well then Will do that heh ; >
man
Xeo
Xeo
@R.MartinhoFernandes That thing is a bit mind-baffling at first.
I've been at work for some hours, but haven't really achieved much...
11:48
@DeadMG welcome to my world
user1182183
@DeadMG Welcome.
welp
time to phone up that other guy who also wants to interview me
@Xeo I was deprived of that feeling, I guess.
@R.MartinhoFernandes I definitely couldn't figure out why it wouldn't work.
I'm still not sure if I quite understand.
Xeo
Xeo
Btw robot, note that the OP doesn't actually provide something akin to T const**, only T const* const*. The other one was a sanity check.
11:49
it's one of those things that I know to be true, but never really looked at hard enough to understand why
Xeo
Xeo
@Xeo I was hoping to get away with not writing any code! Care to give an example of what the solution you propose would look like? — SimonD 41 secs ago
I think I'll pass for now.
user142019
Interesting point. Care to provide some code to show what that class would look like? — SimonD 2 mins ago
user142019
What does he mean by "that class"?
user1182183
Fuck you too word. Just FREEZE, yeah, I know it's snowing outside!
user142019
Well, don't use Word problem solved.
user1182183
11:55
@Zoidberg blow up the world and all problems will be solved ; >
Xeo
Xeo
@Zoidberg probably what the "view" would look like
Both comments sound a bit too much like "gimme teh code", so I'll pass for now.
user142019
The interface of which class? std::list<T>?
¬_¬ did I miss the actual election voting?
Xeo
Xeo
There's still time
user142019
No voting = no complaining about new mods. :)
user142019
12:14
user142019
lol
@Xeo I guess having a more math-y education may have something to do with it.
Xeo
Xeo
12:36
0
Q: stl template, self/recursive definition

bcg57I want to create a container which contains iterators on elements of this same container. I want to use the STL. The code should look like this: list< list< ? >::iterator > iteratorList; Normally, in place of caracter '?', I must indicate the type of the elements which are stored ...

Ufufu... hopeless mortals
user142019
lol impossibru!
so basically pointers usage is similar to instantiation in c# and assigning instance address to the reference type variables but without having a garbage collector ?
i want to validate my understanding
but instead you have to use delete operator?
correct ?
what.
If your pointer points to an instance ceated with new, then you can delete it, yes, if you wish.
12:52
It's -3 degrees outside :(
it's purpose is only for memory management ?
and for data structures as well ?
A pointer has nothing to do with delete. You can call delete on a pointer if the pointer points to something that you wish to delete, but a pointer in itself has nothing to do with memory management, and nothing to do with delete
no one to ask in real life you know
@CatPlusPlus It's -4 here :(( I'm in fear of the dog squeaking for a walk.
@Mhjr No, it's also for herding kittens
12:53
@CatPlusPlus HOW !!!!?
;)
A pointer just points to something, just like a C# reference does
I understand you
@CatPlusPlus ptr_kitten is deprecated.
the only significant difference between the two is that if a C++ pointer points to an array, you can do pointer arithmetics on it (increment the pointer and it will point to the next element in the array), and you can't do that with a C# reference
*(ptr++)
?
12:54
yes
strong feature
I should learn this shit
what's the average salary for a c++ programmer
?
annual
Seventyfour squillion
Xeo
Xeo
20times that of other C++ programmers.
That depends on (1) where the C++ programmer lives, and (2) what the C++ programmer does, and (3) which company the C++ programmer works for
12:56
In US
but what's the usual
expected I mean
4 peanuts/day
And if your decision to become a C++ programmer is going to depend on how much money they make, don't become a programmer
2
How the fuck would we know?
I dunno - try googling for some stats.
I was asking for the sake of asking
And why do you think a C++ programmer gets paid significantly differently than a Java or Haskell programmer
12:57
@jalf And (4) a bunch of other things too!
@Mhjr So could you try not asking for the sake of not asking?
ok
cute...
did you see the [no-helpdesk] tag in the room description?
@Mhjr Just in case you are not aware, message edit history is publicly visible: chat.stackoverflow.com/messages/8220133/history
12:59
lol
it also implies [no-career-counseling]

« first day (878 days earlier)      last day (4298 days later) »