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

3:00 PM
also shitty OO/procedural support, so if you do encounter a place that would be better suited to it, then you're as buttfucked as wanting a lambda in Java.
 
Haskell was never designed to be useful.
2
 
nor is it remotely interesting
it's a functional Java.
 
@DeadMG Is so! Is so!
 
one single paradigm taken to the point of utter absurdity, far beyond the point where it does more harm than good
 
@DeadMG In what sense? Surely, Haskell is orders of magnitude more expressive than Java.
@DeadMG "one single paradigm taken to the point of utter absurdity" is exactly what Haskell is supposed to be, and it achieved that goal very well I would say.
 
3:02 PM
so what?
whether it is what it's supposed to be is irrelevant
 
I don't see any connection whatsoever between Java and Haskell. Oh wait, that's not true, Phil Wadler was involved in the design process of both :)
 
what matters is if what it is is useful or interesting
and "Abusing one single paradigm" is neither.
 
Personally, I think abusing a paradigm is very interesting.
 
about on a par with watching paint dry
 
How does watching paint dry change the way you think about programming?
 
3:04 PM
no, I'm suggesting that coding Haskell would be about as interesting as watching paint dry.
 
could you look at my code? It's probably some rookie mistake: ideone.com/Ytl65
 
I and thousands (or is it only hundreds? :) of Haskell coders do not agree.
 
Haskell is the most wonderful language ever.
 
yay, cat vs. dog fight :)
 
@FredOverflow Congratulations. I'm glad that you feel affirmed in your beliefs.
@gogowitczak RTFM about std::sort.
 
3:06 PM
@DeadMG Everybody wants to belong ;)
 
I have no particular desire to belong.
 
I never noticed that ;)
 
lol
 
@DeadMG Didn't we already tell him to use std::sort? Or was that some other guy?
 
NFI, tbh
 
3:08 PM
@gogowitczak That would be std::sort(table + 0, table + size, compare);
Also, you're missing a semicolon after return 0 :)
Also, you should pass A and B by value. Nobody passes ints by reference to const.
 
@FredOverflow Unless they need an actual alias, as it were.
 
@FredOverflow - thanks a lot! :). Hopefully one can still find here some help, not only "RTFM"
 
@gogowitczak RTFM would probably have helper you better in the long run. But you're welcome ;)
> Array Names Are Const: One subtle distinction between an array and a pointer, is that the pointer which represents the base address of an array cannot be changed in the code. The array base address behaves like a const pointer.
Why do people insist that arrays are pointers? Why can't you just explain that an array is an array, and a pointer is a pointer?
 
@gogowitczak Well, if you had RTFM, you would know the problem and solution.
damn
why is it so meltingly hot outside?
I wish to leave the house without sticking to the pavement
 
probably because of the sun (or is it the oracle now?)
 
3:13 PM
20 degrees here.
 
does windows cmd print the uncaught exception while my program crash ?
 
Dunno, have you tried?
 
I just executed my app on linuxapp on windows. It crashed.
in console it used to show the exception.
but in cmd it opens a GUI window instead
 
> people in these political organisations don't want exceptionalism, they want stability, so they can sit on thier laurels and pay thier morgage and give steady income to their wives so they get regular boring sex. small organisations attract risk takers... ie young people without wife kids morgage.
 
@FredOverflow was it an answer to my question ?
 
3:25 PM
What? No.
 
@FredOverflow oh!
 
Oh wait, you mean because of the word "exceptionalism"? lol
I don't have Windows, so I can't help you.
Well, I have a Windows CD somewhere, but I'm not gonna install it just to see if cmd displays an uncaught exception.
 
@FredOverflow and also political organisation. I thought you meant microsoft bypolitical org
 
lol what a coincidence :)
 
@FredOverflow but it doesn't show the exception name
 
@NeelBasu How about this:
int main()
{
    try
    {
        actual_main();
    }
    catch (std::exception& ex)
    {
        std::cout << ex.what() << '\n';
    }
    catch (...)
    {
        std::cout << "unknown exception\n";
    }
}
 
@FredOverflow what ? lol
I really lol ed
 
This will display the exception if something goes wrong. What's so funny about it?
 
what a soln for windows
or running the whole main code in lambda ?
 
Then just use WinMain or whatever, not familiar with Windows programming.
@NeelBasu Lambda? What lambda?
 
3:30 PM
@FredOverflow [](){}
 
What does that have to do with anything?
 
main{
[](){
//main code here
}

}
and wrap that lambda in a try catch block ?
 
@FredOverflow boost::diagnostic_information.
Shows a bit more than ex.what()
 
@NeelBasu And what would you gain from that? Just replace actual_main(); with your actual main code and you're done, you don't actually need a function for that.
@CatPlusPlus By the way, I think std::exception should have a girlfriend member, then I could print ex.girlfriend() ;)
 
@FredOverflow nothing. just saying
 
3:36 PM
Putting real main into another function is good for readability.
I was thinking about making a small library providing "modern" main, with try {} catch wrapper and std::vector<std::string> as an argument.
Boilerplate is bad.
 
@CatPlusPlus That's a good idea!
int modern_main(std::vector<std::string> args);

int main(int argc, char * argv[])
{
    try
    {
        return modern_main(std::vector<std::string>(argv + 0, argv + argc));
    }
    catch (std::exception& ex)
    {
        std::cout << ex.what() << '\n';
    }
    catch (...)
    {
        std::cout << "unknown exception\n";
    }
    return -1;
}#
@CatPlusPlus something like that?
 
Yeah. + Boost.Exception and maybe WinMain support.
 
You take it from here, I'm already bored with it ;)
 
I was bored with it before I wrote anything.
 
lol
By the way, how many times did you have to explain to newbies that catch (...) is actual C++ syntax and not pseudo code? :)
 
3:43 PM
Me? Never, because I don't use catch (...)
 
I certainly remember the first time I saw catch(...) in a book and wondered "What the hell am I supposed to put into the ... part?" :)
 
Xeo
@FredOverflow make it std::vector<string_ref> :P
 
@Xeo Right, because initializing a vector of strings once at the beginning of the program is an unacceptable performance bottleneck, right? ;)
 
Xeo
But but.. I like string_ref :(
 
@FredOverflow PERFORMANCE!!!!!!!!!!!!!1111!1!!!11!ONE
 
3:57 PM
@Xeo Is that C++11 or Boost?
@EtiennedeMartel Are you sure one exclamation mark is sufficient?
 
Probably not.
There we go.
 
You forgot eleven.
 
Damn.
Well, fuck it. It'll stay that way.
 
Xeo
@FredOverflow Neither, but a proposal for C++Next
 
Ell
string_ref?
 
Xeo
4:02 PM
Atleast AFAIK
yes
Oh, and llvm has it too
as StringRef
 
@FredOverflow it's always an uphill struggle to teach people new ways. mostly i do it by example. most times though i'm not even aware of that, i just register that suddenly a fair number of people have adopted some phrase or way of coding or whatever (even the silly 3 spaces indentation)
 
Ell
what is it for?
 
Xeo
@Ell non-owning reference to a string as a value type
 
Ell
like std::string& ?
 
i think the most baffling is the "hit ctrl to see where the mouse cursor is" thing
 
Ell
4:03 PM
like std::string* ?
 
Xeo
not really
 
Ell
or isn't that value type?
 
i remember passionately arguing for that functionality in 1986
dunno if it was me or whomever, but now it's there
but sometimes it gets back to bite me
as when i argued strongly for using unsigned to indicate the intended range, and then not so many years ago suddenly realized that hey, that's as dumb as it gets. then the hordes who had adopted unsigned in this capacity, were mostly unable to grasp the New Understanding
 
@Cheersandhth.-Alf I was born on 1987
 
Ell
4:09 PM
@Cheersandhth.-Alf why is it dumb? o.O
 
because the only advantage it has is mnemonic, which you get alternatively by a simple typedef, but it has lots of problems, in particular related to implicit conversions and modulo 2^n wrapping. so, no real advantage, lots of problem. equals dumb.
in Pascal it was a different matter
 
Ell
right
 
in Pascal, when you defined a range, you got checking (whereas the C++ standard guarantees that no conforming implementation can add checking)
 
Ell
like ada?
 
not quite as robust as ada
 
Ell
4:14 PM
but similar kind of thing?
 
yes. but pascal was created for students (by niklaus wirth), while ada was created for defense systems programming (by a committee)
so, niklaus focused on simplicity, with the goal that a student should be able to compile a pascal program by hand. and they did. while the ada committee focused on safety, and did not care much about how much complexity was needed for that safety
 
Ell
ahh right
 
Ell
anyway, off karting now :)
 
Seems similar to my old Alf's StringValue class. Again teaching by example and arguing. I've since learned that for some usages simple copying is faster still, with a suitable allocator.
I think though that calling those things "inventions in this paper" is quite a stretch. Ignoring all previous work. And ignoring Java and C#.
 
4:27 PM
Can someone tell me what is the use case Microsoft is thinking for a remote display driver? msdn.microsoft.com/en-us/library/windows/hardware/…
 
4:39 PM
Have anybody ever experienced Unknown Exception with boost::serialization ?
 
Xeo
4
Q: Reason for C++ member function hiding

Channel72I'm familiar with the rules involving member function hiding. Basically, a derived class with a function that has the same name as a base class function doesn't actually overload the base class function - it completely hides it. struct Base { void foo(int x) const { } }; struct De...

close votes!
 
Are typenames suffixed with _t reserved? I believe somebody once told me.
 
Xeo
POSIX IIRC
 
So it should not matter within a namespace?
 
Xeo
not by the formal C++ standard
 
4:47 PM
Aight.
Dutch XFCE y u so many spelling errors.
 
Can I set visual Studio to break on any error or uncaught exceptiion ?
 
@NeelBasu Yes
debug -> exceptions
 
@MarcusJohnson Maybe.
@MarcusJohnson No.
 
@DeadMG how ?
 
I don’t follow links to questions unless they are oneboxed.
 
5:01 PM
must be some simple check ?
 
Xeo
6 hours ago, by Cat Plus Plus
If you are new here, read the code of conduct now. Thank you.
 
I never used Beautiful Soup.
 
thank you for dumping your link in Lounge<C++>, kindly receive your express downvote, courtesy of DeadMG Incorporated
5
 
Man. Z-shell has the best UI ever.
@DeadMG Pin that. :P
 
naw
pins suck
 
5:06 PM
meh
 
let The People™ decide whether it needs to be memorialized
 
One can paste text in xterm using the middle mouse button. I don’t have a middle mouse button. Okay… one can emulate the middle mouse button with shift+insert. Guess what. I don’t have an insert key on my keyboard.
It is bad & no problem.
 
@MarcusJohnson No problem. Come back and link another question because you've gone a whole 20 minutes(!) without an answer, and we'll deliver the same service once again
 
We do like linked questions. We need sómething to downvote.
 
@MarcusJohnson Now you do. Read code of conduct next time.
 
5:11 PM
it's a pity
when you downvote people like that, the moderators would undoubtedly censor me for explaining why
oh well
 
Xeo
:4906544 Okay, now, I'll ask you this. Assume you're a chatroom on a certain topic, say, C++. And you're a very active chatroom, with loads of people talking about all kinds of stuff, be it about C++ or anything else. And suddenly, a stranger comes in to dump a link to his question. He comes in, into a chat room whose topic is not even remotely connected to his question, just because it's active and disrupts the conversations going on. Do you really expect the chatroom would like that?
 
Oh, also, one more thing.
 
Xeo
Hope that answers this.
 
why recycle bin instead of bin?
wouldn't that make like, the fourth bin room?
 
Xeo
Seems somebody renamed it
Oh, wait, it's not
my mistake then
Should I move them back to here and move em to the real bin?
 
5:21 PM
Having a shared clipboard between Linux and OS X is a heaven.
 
@Xeo naw
 
Hay. I expect that most in here is "masters" of c++. Is it worth the while continuing developing in c++.
 
Depends on what you want to do.
Sure, knowing C++ won’t harm.
But Haskell is better.
 
Xeo
@JonathanGeers No, C++ sucks, it's better to choose a better language like Java or PHP
 
@RadekSlupik No.
@Xeo Would you please not troll the poor guy?
 
Xeo
5:25 PM
:(
 
Poor? He has a computer. He is pretty rich.
 
Xeo
But the question begs it!
 
@JonathanGeers C++ is not dying out if that's what you mean.
 
Xeo
@RadekSlupik Sure? He could be at an internet cafe
 
@Xeo I'd say he's still not annoying enough to give us a license to troll... yet.
 
5:27 PM
lol learning C++ in an internet cafe
 
@RadekSlupik Maybe he only gets to use his friends computer 1 minute per year. And we give him this?
 
xD
You cannot learn C++ in one minute.
 
I didint say its dying. I just dont like it very much. There is a limit to what you can do with it.
 
Xeo
room topic changed to Lounge<C++>: C++ sucks, better learn Java or PHP [c++] [c++11] [c++-faq] [fun] [nsfw]
 
It takes many minutes.
 
5:28 PM
@JonathanGeers ehm.
C++ is one of the few languages that gives you near 100% control over the computer.
 
Xeo
@JonathanGeers If you don't like it, don't use it
@RadekSlupik Inline asm says 100% :P
 
Inline assembly isn’t standard.
 
Xeo
Hm, right
 
@JonathanGeers Not in term of power, no. However, it's also quite complex, so it might be easier to do a specific task in another language, such as Python.
 
What asm does is implementation-defined. The standard only gives a suggestion about assembly.
 
5:31 PM
I have to learn it. I am first year computer science so...
I know it gets complex, but it is allot to learn and allot to do. I had to write my own assembly language in c++ using structures and that was not easy
 
C++ is not that ha… Nevermind, it is.
 
Xeo
I don't think so
 
Consolas is a beautiful, only the italic lowercase L fucks up everything. T_T
 
Xeo
I like Segoe UI
And Lucida Console for monospace
 
I prefer Consolas for code, or Monaco.
Otherwise Palatino, Lucida Grande or Helvetica Neue.
 
5:38 PM
South Africa's c++ developers suck. they dont know alot and the internet here is slow. For all u know i sent this yesterday
 
C++ developers suck. FTFY
 
haha if you say so
 
Cheers ppl
 
Tkinter is awesome.
 
5:44 PM
@RadekSlupik huh
 
@Cheersandhth.-Alf ?
 
isn't that the python gui thing?
didn't impress me
 
Yes.
 
on top of limited functionality, it adds extreme inefficiency on top of the most inefficient language: everything (if i understood it correctly) is translated down to textual commands in some silly interpreted language down under, then executed
i think tcl
Tcl (originally from "Tool Command Language", but conventionally spelled "Tcl" rather than "TCL"; pronounced as "" or "tee-see-ell") is a scripting language created by John Ousterhout. Originally "born out of frustration", according to the author, with programmers devising their own languages intended to be embedded into applications, Tcl gained acceptance on its own. It is commonly used for rapid prototyping, scripted applications, GUIs and testing. Tcl is used on embedded systems platforms, both in its full form and in several other small-footprint versions. The combination of Tcl an...
 
You’re right. I should make a web app.
 
5:49 PM
Coffee time!
 
6:34 PM
I am writing a task manager in Python.
With a CLI and a GUI.
 
6:55 PM
Why does hPrevInstance still exist when it's always NULL in Win32/64?
 

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