« first day (492 days earlier)      last day (4441 days later) » 

1:00 AM
I actually haven't seen any good GUI libraries
 
Why the fuck does unique_task use a mutable std::promise member :(
 
@DeadMG why donkey balls . not crocodaile ones?
 
At least one that uses proper modern C++ techniques
 
well, I'd expect that if you tried to suck a crocodile's balls, it would just eat you and then the problem would be solved
 
Xeo
Guys are just too specific to each application to be easily generalized. :/
 
1:00 AM
Isn't allegro a graphics lib?
 
@Insilico Xlib is bad? :) GDI ? :)
 
@AidanMueller Allegro is decades old C library- at best
 
@user1131997: GDI and Xlib are not GUI libraries
 
@Insilico C++ techniques have nothing to do with UI
 
GDI is a drawing library
 
1:01 AM
Oh
 
@Abyx: They do if you don't want your library to suck in C++
 
any good?
 
@Insilico you may draw you own UI :))) as GUI libs do with wrapping on drawing libs :)
 
it's a decades old C library
that's pretty much the answer to that question
 
@user1131997: In fact I do (I have my own mini GUI toolkit I made)
 
1:02 AM
@Insilico it seems that you want to describe UI in C++
 
@Insilico great :) is it cross-platform?
 
Another question: what is a class wrapper?
 
@user1131997: No, it's Windows-only but it can be easily made cross-platform
 
that's wrong way. UI should be created in UI language, not in C++
 
as I pretty much buried Windows API-specific stuff in it
 
1:03 AM
@AidanMueller A wrapper for another class. That or we're missing some context.
 
@Abyx: You still need to talk to the operating system to draw said UI
 
Or do you mean to ask what a wrapper is?
 
@Insilico *nix using X-Server for this, very another technic, not so easy... but I can be wrong :)
 
@Abyx C++ is a general-purpose language and can describe a UI just fin
and WTF even is a UI language?
 
@Abyx What are UI languages? HSLA?
 
1:04 AM
HTML, QML, XAML
 
Let's invent a C++ EDSL for GUIs!
 
I've only used XAML and HTML and they both sucked such a huge amount of donkey balls that the experience traumatizes me to date
 
I guess Abyx meant something like XAML
 
I like to EDSL my way out of problems. Then I have two problems, so moar code!
 
@Abyx HTML is one of the worst "languages" ever created.
it's so bad, they had to add JavaScript to make it barely usable
 
1:05 AM
Honestly I hate the way XAML works
 
It's not bad
 
and the DOM interface is one of the worst APIs ever conceived of
 
Although I guess there are those Adobe experimental thingies already.
 
@DeadMG why donkey's balls?? ))) why not another animal was chosen for the idiom? :))
 
Because Donkey == Ass
 
Xeo
1:05 AM
@LucDanton Three problems. The EDSL, and the exponential compile time.
 
@Xeo No I already have that problem. Almost.
 
if you want to write a GUI in C++, then you have a problem
 
@Insilico don't know, that donkey is a ass :)
 
if you try to use an EDSL to solve it, then you have two problems
 
Yes, that is what I said.
 
1:06 AM
@LucDanton Iv'e just heard class wrapper a few times so I thought I'd ask
 
1 min ago, by Luc Danton
I like to EDSL my way out of problems. Then I have two problems, so moar code!
 
It would be nice if someone could submit a reasonable GUI toolkit to Boost
 
See? One or more problems, throw EDSL in, more problems.
 
I hate having to suggest something like Qt or WxWidgets
No exception safety, naked pointers all over the place
 
I think that's were bjarne stroustrub gets his
 
1:07 AM
@AidanMueller Alright, a wrapper is usually used to fit a preexisting functionality to another interface. Their point is not so much to provide a new functionality.
 
The moc tool that needs to run to "preprocess" Qt source code before the actual preprocessor is one more thing I'd much rather not worry about
 
@LucDanton when would I use that?
 
@Insilico The mailing lists devolve in an endless bickering/discussion every time it's brought up I think.
 
@LucDanton: Over things like the library interface?
 
seems to me like it'd be something they'd want to get on asap, it's a pretty common desire
 
1:09 AM
@AidanMueller When you use someone else's API for instance, and wanted to use their classes with yet another API which expects something in a particular way that the first API doesn't (but it has the expected functionality).
@Insilico What it would mean to be 'portable' for instance. If it should be from the ground up or reuse/adapt preexisting solutions. High-level design decisions.
 
Xeo
@DeadMG And a pretty hard one to fulfill
 
@LucDanton and how would I make class wrapper
?
 
@DeadMG Well the Boost libs don't have a core team that pushes what everyone else needs. It's more that someone has an idea, implements it, then submit it to the group.
 
I think it should be something from the ground up.
 
@LucDanton An unfortunate problem for Boost, really.
 
1:12 AM
Honestly, the C++ toolkits in existence now are a huge mess
 
@AidanMueller Write the desired interface, implement the functionality behind it by delegating to whatever you're wrapping. Composition/aggregation is commonly used.
@DeadMG Well it's like the C++ Standard Committee, you don't pay to get the result.
 
@LucDanton Too true.
 
I'd rather have Adobe make their libraries public, if they're still using those. Then just like GIL they can be Boostified, if needs be.
 
@LucDanton Sorry for all the questions but: Composition/aggregation?
 
@LucDanton: stlab.adobe.com
At least some of their code is public
Don't know the license though
 
1:15 AM
@AidanMueller Those are design terms. I don't think I can explain how that goes in a few lines, but if you lookup those exact words (throw in some 'class design' keywords) I'm sure you can find some good reads. Or book recommendations, perhaps.
 
@AidanMueller Get a C++ textbook
 
@Insilico GIL is from Adobe.
 
you won't be accomplishing much in C++ without knowing what composition is
 
I have a c++ book and Im not through it
 
What book do you have?
 
1:17 AM
Can someone help, please?
 
Oh wait, Adobe Eve parses a file to obtain a layout or something. I'm not sure what which one uses an EDSL.
 
I often press Ctrl W by mistake, because Ctrl and Shift are right on top of each other on this keyboard. Typing uppercase W often closes e.g. Firefox.
I found
but that seems too drastic, is it possible to disable just the idiot Ctrl W (after all, there tens of different ways to close a window already, including IBM standard Alt F4)
 
@AlfPSteinbach What is your concern, pal?
 
1:19 AM
wow, it really closes FF tab
 
You said that you need some help, well what troubles you? :)
 
i want to disable Ctrl W
 
@DzekTrek: Alf would like to disable Ctrl+W
 
maybe FF allows to customize keyboard shortcuts ?
 
1:21 AM
@Abyx: Actually Ctrl+W has a similar action in lots of different programs
 
@AlfPSteinbach also you can write a global keyboard hook, and filter-out ^W
 
It might be convention or something provided by default
 
Ah, I'll do that.
Thx
 
We have already discussed everyone's preferences for GUI-related work, haven't we?
 
I didn't think -- dang, my father always said, "if you lack tool, just make it"
 
1:22 AM
Anyone here a game dev?
 
I'm not.
 
@AlfPSteinbach I like that "if you lack tool, just make it"
 
Anyway, I have a possibly interesting little piece of hobbyist's code (written by yours truly, like yesterday):
 
@Insilico I know about that already
 
1:24 AM
        raw::LResult wmHandler(
            raw::UInt const     messageId,
            raw::WParam const   wParam,
            raw::LParam const   lParam
            )
        {
            try
            {
                return dispatchWm( messageId, wParam, lParam );
            }
            catch( UnhandledWm const& )
            {
                return defaultWmHandling( messageId, wParam, lParam );
            }
            assert( false );                    // Should never get here.
        }
 
@AlfPSteinbach but I believe there is keyboard keys remapping programs
 
One possibly interesting thing is that here an exception is the usual case.
Another is that Visual C++ is too smart and warns that the assert is unreachable.
 
Is it not?
 
@AlfPSteinbach: Yeah. Quite a bit of messages usually don't get handled by your procedure proper
 
@AlfPSteinbach I think it will be really slow
 
1:25 AM
DefWindowProc() is the "fallback"
 
most of messages are unhandled
 
c++ 11 beter than the previous
?
 
Xeo
@AidanMueller I'm a certified game programmer, though that doesn't say that much. :P
 
@AidanMueller Yes.
 
@AidanMueller: Yes.
 
1:26 AM
@Xeo How can you be a certified game programmer?
 
      // faster version
        try
        {
            dispatchWm( messageId, wParam, lParam );
            return defaultWmHandling( messageId, wParam, lParam );
        }
        catch(LRESULT r)
        {
            return r;
        }
 
Xeo
@AidanMueller Games Academy Berlin, a school for game development
 
@LucDanton I guess that's obious since it only adds and doesn't remove
 
@AidanMueller I would welcome a C++ Standard that culls a lot of stuff :)
 
@Abyx: Why not use a boolean variable of some kind?
 
1:28 AM
Not holding my breath over it however. Quite obviously.
 
@LucDanton why?
 
@Abyx it doesn't do quite the same: this version always invokes default handling if the normal dispatch succeeds
 
@AlfPSteinbach: Not if dispatchWm() throws an LRESULT
 
@Insilico to avoid optional<> stuff
 
@AidanMueller Some things simply have alternatives that are always superior. Cleaning up old syntax wouldn't hurt.
 
1:29 AM
ok
 
Xeo
@AidanMueller Say hi to std::vector<bool>.
 
@AlfPSteinbach no, normal dispatch ever throws (in that version)
 
hm, i think that's premature optimization
 
@LucDanton But you never really can remove that. some people might not like the change
 
1:31 AM
@AidanMueller Again, I said I'd welcome such a Standard, but am not expecting one :)
 
@AidanMueller: I think it's possible to make std::vector<bool> be just a normal vector of bools without anybody noticing
 
How would I go about making a gui in html
 
anyway, in Win32 exceptions are slow.
 
Depending on how your classes are structured, you might be able to do something like dispatchWm(bool& handled, messageId, wParam, lParam )
before you call dispatchWm you set handled to true
Then the base class version of dispatchWm() sets handled to false
 
@AidanMueller In Windows you can make an "HTML application" (filename extension .hta) or a "gadget" (needs silly installation)
 
1:33 AM
@AidanMueller you can use embedded IWebBrowser2
 
@AlfPSteinbach You don't mean desktop gadget do you? cause I already made one
 
@AidanMueller The nicest technology is IMHO Mozilla's XUL. So you can make extensions to Firefox and Thunderbird, like.
@AidanMueller I did mean desktop gadgets, yes.
 
@AlfPSteinbach I think iv'e heard of xul
 
IMO, the nicest thing is HTMLayout - terrainformatica.com/htmlayout
 
The two main problems with XUL are that (1) it's only a third documented, like, and (2) AFAIK the project to support free-standing XUL apps got nowhere
 
1:34 AM
I was considering making a FF extension
I hate IE
 
Why do people keep using XML as a basis for their UI language?
 
Cause it is awesome
 
better xml than html
 
Well, extensions are cool. I made two Thunderbird extensions. But when you do anything non-trivial, the next version of Thunderbird will kill your code.
 
because XML is really good language
 
1:36 AM
@DeadMG I think html is xml based
 
No HTML is based on SGML
 
@DeadMG Gadgets and XUL and whatever-it's called Microsoft's "code behind" are XML-based
 
XML is way more strict than HTML is
I'd rather have something like a stripped-down version of YAML to declare buttons and windows and things
 
is that "yet another markup language" like?
 
looks like json, iirc
 
1:38 AM
YAML (, rhymes with camel) is a human-readable data serialization format that takes concepts from programming languages such as C, Perl, and Python, and ideas from XML and the data format of electronic mail (RFC 2822). YAML was first proposed by Clark Evans in 2001, who designed it together with Ingy döt Net and Oren Ben-Kiki. It is available for several programming languages. YAML is a recursive acronym for "YAML Ain't Markup Language". Early in its development, YAML was said to mean "Yet Another Markup Language", but was retronymed to distinguish its purpose as data-oriented, rather than...
 
Wikipedia FTW
 
it's whitespace-sensitive, I don't think it's good idea until you have a syntax-checker
 
@Abyx: Yeah, which is why I wouldn't just drop in a YAML parser
Perhaps enforce the use of braces
 
I think I have heard of YAML before
 
Xeo
1:43 AM
@DeadMG json is a subset of YAML, actually
 
What is a good irc client
?
 
@Xeo Are you implying that makes my statement incorrect? Because it doesn't :P
FUUUU INTELLISENSE Y U SO SHITTY
 
Just delete the ncb or whatever database file it is and try again
 
I like mc
 
C++ is a bitch of a language to parse
 
1:45 AM
Oh, just took a glance at the Boost mailing list. I just realized the implications of 'there will be no TR2'.
 
@LucDanton: What are the implications?
 
More releases!
 
Is that a bad thing?
 
lol
 
I mean as long as it's not like fricken Firefox's release schedule
 
1:47 AM
@Insilico I don't think it has to be. If 'porting' Boost.Asio to the Standard Library is completed, I'd rather they publish the specs asap rather than wait on every other pet project to be done and to bundle everything into a big TR2.
Of course that doesn't really guarantee that everything will come out as soon as it's completed.
 
How is it that they're on version 10 when mine is like only 7 and a few months old?
@LucDanton: I agree.
 
I was surprised that they dedicated a whole Study Group to modules. I thought this was still in infancy, but I guess they're taking it seriously.
 
A "study group"?
 
I guess this means tasty post-Kona papers soon.
@Insilico Apparently Working Group 21, which is the Standard Committee inside the whole of ISO, can allocate Study Groups, which I've understood to be better than the previous way where it was all unofficial work (e.g. the early stages of TR1 if I got that correct).
Apparently making it official helps.
 
I see.
 
1:51 AM
Is there a SO client
 
Xeo
Woaah, VS11 dev preview is killing my PC x_x
 
@AidenMueller: stackapps.com
 
Xeo
@LucDanton Oho? Interesting.
 
@Insilico Thank ya
 
1:52 AM
Is there anyone holding their breath over string_ref and array_ref? I'd rather have any/optional/variant :(.
 
Tons of applications targeting the SE API
 
oh, i suddenly realized that the compiler wasn't smart about "unreachable": it was i who was stupid.
 
Xeo
@LucDanton Me. Memememememe.
 
@Xeo What's the big deal.
 
Xeo
I want them. :(
 
1:53 AM
@Xeo Meme?
@LucDanton Yeah, any and optional would be nice.
 
sting_ref sounds like an excuse to not get decent string ever. like, "why would you want anything more than PL/1, hey, PL/1 has anything you'd ever want!"
 
Admittedly while I like variant it may not be a good fit for the Standard Lib as-is. What with supporting recursive variants out of the box; I'd rather they separate that feature into an explicit recursive_variant.
 
PL/I ("Programming Language One", pronounced "pee-el-one") is a procedural, imperative computer programming language designed for scientific, engineering, business and systems programming applications. It has been used by various academic, commercial and industrial organizations since it was introduced in the 1960s, and is actively used . PL/I's principal domains are data processing, numerical computation, scientific computing, and systems programming; it supports recursion, structured programming, linked data structure handling, fixed-point, floating-point, complex, character string han...
 
FORTRAN sucks
 
1:55 AM
^ Designed for "anything" and "everything", plus "some more"!
 
<--says goodbye
 
Xeo
@AlfPSteinbach string_ref is just a complement to strings. What's so bad about them?
 
They advertise themselves as a cure to a whole range of problems I'm not sure we have. (But there's a real possibility it's a whole range of problems I don't have of course.)
 
@Xeo what I said. PL/1 isn't really a good programming language even though it has everything plus. it's just a hodgepodge collection of anything and everything. C++ should IMO get itself a decent string type. not just bits and pieces of functionality scattered around everywhere.
 
Xeo
Actually, it's really just one thing I want from std::string - to handle string literals without allocation.
 
2:03 AM
well that's easy to do. i did that. a decent string type would do that.
 
Oh speaking of -- I wanted to know if someone jumped ship and started using UD literals to get std::string literals.
The idea to put a UDL operator into the global namespace doesn't really strike me as good.
 
Xeo
@LucDanton Since I mostly code with MSVC, I couldn't use them, even if I wanted to.
But std::string would need a constructor that takes an extra literal_string tag argument in any case, since you can't differentiate between string literals and const char arrays. :/
 
Also, "Hello, World!\n"_s looks ugly.
 
@LucDanton I would have except not supported by Visual C++ 10.0
but than I'm not a professional any longer
although I might yet be again :_)
 
@Xeo Overloading on constexpr could be 'interesting'. But that seems like adding needless complexity.
 
2:08 AM
(typying too fast, happy @sbi didnt see that)
 
I guess I'm going to just try it. Plus, the idea that I can 'catch' any literal at one side is alluring.
Wonder if that can help with localization to an extent.
 
Is it safe to call std::swap on arrays?
 
Yes.
 
Xeo
@LucDanton That would be so nice. :(
 
@LucDanton The idea I had, and implemented (I'll post code), was to have literals and string values that are UTF-16 in Windows and UTF-8 in *nix.
 
2:11 AM
@Xeo Why not write a 'shallow' string-type that only accepts initialization from literals (unenforceable of course), and which mutating operations return std::string?
@AlfPSteinbach Yeah, I just realized I could do that if I needed it. I'd like to use UTF-8 everywhere but some APIs just won't let me.
 
It looks like this:
Much support elsewhere, but I need to rework the thing
And I also learned later that there is a patch for Visual C++ 8 and up that allows you to use a pragma to set the execution character set to UTF_8
 
Xeo
@LucDanton Well, I planned on creating an immutable_string some time
And guess what, it wouldn't be that much different from string_ref. :P
 
@AlfPSteinbach That looks ambitious.
 
A main stumbling block is that with Visual C++ runtime, the basic_stringstream things don't like custom character type. You get an unresolved DLL external
 
Is the usage std::basic_string<EncodingUnit>?
 
Xeo
2:15 AM
Also, string_ref subview(std::string const& s, unsigned start, unsigned end) would be nice, I'm currently relying on SSO for substr
 
Well, use of subview in transform(subview(s, 0, 10), out, functor) is still safe right?
 
@LucDanton basically yes. it works nicely with EncodingUnit as an enum type. not as a class, because there's a union trickstery in the basic_string implementation (to support short string optimization)
 
What are the guarantees that you can reinterpret_cast from the enum to its underlying type? Same rules as common subsequence of a standard layout?
What about the casts for those refs to arrays? Relying on the implementation?
 
@LucDanton That's just a practical guarantee, what reinterpret_cast was designed for. A compiler that doesn't support it would never gain any market share. :-)
 
I know, I know. reinterpret_cast usually ends up as implementation-defined, not UB.
 
2:20 AM
yep
 
But I thought maybe there were some rules regarding the underlying type.
 
maybe. i don't know. i'm not familiar enough with the C++11 standard
It would probably be in the list of valid conversions?
 
I thought you had studied the question :) I'm won't be looking for it, that can get hairy.
What does using std::basic_string<EncodingUnit> buy over typedef'ing over, say, std::string/std::wstring?
(I'm assuming you're sticking to a Posix/Windows approach here.)
 
@LucDanton type safety. the string type for system-dependent encoding can't be unintentionally assigned to e.g. std::string
@LucDanton no, it was not worth any effort. but i looked now. i don't know, what does this mean (from 3.10/10): " a type that is the signed or unsigned type corresponding to the dynamic type of the object"?
 
Will look for context, but only thing that comes to mind right now is void* trickery.
@AlfPSteinbach I see. Interesting.
 
2:33 AM
there's also overloading, of course
then it helps to have distinct types, not typedefs ;-)
 
On the one hand, it looks like 3.10/10 forbids accessing the underlying type, but on the other hand there's that whole bit about reinterpret_cast'ing pointer of unrelated type being implementation defined. If the implementation promises that the pointer really does point to a 'valid' object, does 3.10/10 matter?
 
Can't see how one can do that glvalue thing if the only thing available is reinterpret_cast anyway.
> 52) The intent of this list is to specify those circumstances in which an object may or may not be aliased.
Ah, I don't think the point of this is even to forbid what you're trying to achieve anyway.
 
@AlfPSteinbach sorry, this is off topic, but should I stick to free pascal or go from C to C++?
 
2:39 AM
@AdamScottRoan I haven't used free pascal, so I don't know. I remember my 3rd year students protesting wildly when I suggested they could learn Windows programming in Pascal. It just had to be C++. Silly, for they would have been better off without that added complexity. They simply knew more than was good for them. But learning C++ is a good idea, so I say use both.
 
thankyou.
to this day, I have no idea what to make of multiple inheritance... I think I prefer not to use it - or perhaps not having access to such a feature.
 
I know I have encountered several instances in Java where it would have been useful.
 
C++ is very intimidating, seems like you could spend a decade learning C++ and still have more to learn. :P
 
Yeah.
 
you can likely spend a decade learning any significantly complex language and have more to learn
 
Xeo
2:45 AM
Btw @Luc, any idea if this is well-formed in any way?
 
I guess that does apply to any general purpose language.
 
@Xeo I don't think so. The reseat is a no-op, isn't it?
Oh wait no. I see what you did there.
I don't know much about the unordered containers but I think it's fine, yes.
Easy to break though, for obvious reasons.
 
Xeo
It's not specific to unordered maps, but maps in general
 
i dont understand why this was closed as off topic:
1
Q: how to evaluate the performance of a dedicated server for hosting web sites

JohnMerlinoTake the following situation. I have a computer with these specs Intel quad core (released before the i7s back in 2005), 4 gigs of RAM (DDR2 memory), 500 GB hard drive, Asus motherboard. I have a cable modem (Comcast to be exact), and a Belkin router. I have Ubuntu server (the latest...

 
By the way you can use std::reference_wrapper for that.
 
2:49 AM
can someone reopen that?
 
Reseating is done via w = std::ref(other);
 
Xeo
@LucDanton Can't reseat that
Oh. Right.
Damn.
 
Double checking to be sure ;) I've always thought it worked like that but never used it.
 
Xeo
room topic changed to Lounge<C++>: Shab shubidu wap (we need a new topic). [c++] [c++11] [c++-faq]
 
Works on my end! Now taking a glance at the specs.
reference_wrapper& operator=(const reference_wrapper<T>& x) noexcept;
Postconditions: *this stores a reference to x.get().
 
Xeo
2:52 AM
Nice.
If it's not illformed in any way, or invoking undefined behaviour, it'd be really nice for when I want to find and sort a data structure by a subset of it without duplicating that subset.
 
There isn't, in fact, an operator= taking T. I'm not sure what std::ref(i) = j; is supposed to do.
 
Xeo
Wait, I think I remember another reason why I couldn't use std::reference_wrapper...
@LucDanton conversion on lhs?
 
@Xeo But std::reference_wrapper is convertible from it's value type!
 
Xeo
Yay, ambiguity!
 
And in fact std::ref(i) = 42; mentions using the deleted operator=(reference_wrapper&&)!
I don't think that r = i is reliable though, I'd stick to r = std::ref(i) which is guaranteed to work.
 
Xeo
2:55 AM
Anyways, std::make_pair unwraps std::reference_wrapper. :( So I'll get a T& stored instead...
 
lolwut
 
Xeo
Wait, ref wrapper (that thing needs a shorter name) is convertible from T&
So it, like, totally doesn't matter!
 
Yep.
 
Xeo
Ahh, no assigment inside unordered_map. :s
Now there's the reason I can't use ref wrapper. :(
 
I'm really weirded out that some of the pieces of the Standard Library use a std::reference_wrapper<T> -> T& 'decay', yet std::decay doesn't do it.
@Xeo What?
 
Xeo
2:58 AM
@LucDanton the key is const when accessed in any way. No assignment there.
Meaning no reseating.
 
Oh yeah, only the access is const-neutral. I guess that makes sense.
 
Xeo
Hmpf.
Back to my indirect_key it seems...
 

« first day (492 days earlier)      last day (4441 days later) »