« first day (498 days earlier)      last day (4454 days later) » 

8:00 PM
yeah
 
does Starcraft 2 ask me if it wants to store a gigabyte of some ... cache ... something on my SSD? why, no, it doesn't
 
that it's one big monolithic blob which all must go on the same partition
 
in my opinion, the whole program files, program data, users, documents, thing is just rubbish
every file a single program needs should go in a single folder
 
@DeadMG that's rubbish too
 
@DeadMG I don't think so no. We tried that, doesn't work so good
 
8:01 PM
need to keep executables and things that don't need to be modified as write-only
that's impractical to do if they share a directory with the writable stuff, like configs and logs
 
@DeadMG Even Unix uses that model
 
@jalf Subfolder?
 
@DeadMG error prone. For every program, you then need to create a subfolder and set write permissions on that
 
@DeadMG thanks!
 
More robust to have a single parallel directory tree for user data, which all programs use to store writable stuff
also makes it a lot easier to take backup of
I don't want to have to hunt down a subdir inside each program's dir
 
8:02 PM
@jalf also lets ProgramA and ProgramB use the same userfiles
 
@jalf You don't have to. Just copy the whole lot.
 
@rubenvb Unix uses a completely messed up directory structure too. But they got that one part right
 
@DeadMG my backup drive isn't big enough for that
 
Generally speaking, I dislike installing things, as well
 
@DeadMG err, no. I don't think so. I don't want to copy 500gb when I just want to take backups of, say, 1gb of user data
 
8:03 PM
in my opinion, there are a very few things which actually need to be installed, like shell extensions, at most
 
@DeadMG most people do. The installation model on Windows is broken
@DeadMG true. Unfortunately, 20 years ago, Microsoft decided othewise
 
unfortunately, 20 years ago, a lot of bad choices were made and we're stuck with them foreverafter
 
@jalf I recently had a panicky kind of restore job to do. I was very fond of my foresight to map /etc /home and /home/username/Documents to different partitions.
 
@jalf yeah true. You actually need a manual to figure it out, and chains and a prison to throw each app that doesn't strictly respect it.
@DeadMG Windows did change stuff like that often
Like with UAC.
They could do it again
 
seems like the app store thing for win8 is a first baby step towards something a bit saner
 
8:07 PM
@rubenvb UAC = "Uggh Aaaaaaah Come on you can't be serious"
 
one of the things I don't get is some of the design decisions in the Windows API
 
@DeadMG is there a design?
 
@DeadMG you're assuming then that there were design decisions involved ;)
 
lol
well, recently, I was trying to debug a Direct3D application that wasn't working
 
well, in some cases there were, but they were made for a design thought up in a whole different era
 
8:09 PM
and they return an HRESULT with some nothing value like CALL FAILED
and you know, it irritates me, because there's no need for that at all
there are perfectly good designs for throwing exceptions across binary boundaries
 
@DeadMG Oh you poor sod, do you have a world-relief account we can send money to?
 
@DeadMG no there isn't. The code has to be callable from C
 
@CaptainGiraffe never worked on a Mac? Or a Unix system?
 
it has to be callable by compilers implementing different exception-handling schemes
 
@jalf That doesn't limit you to HRESULTs.
 
8:11 PM
@rubenvb I really like most linux dists
 
room topic changed to Lounge<C++>: The Robot knows. [c++] [c++11] [c++-faq]
 
@CaptainGiraffe You even have to type your password there, instead of clicking "Yes"
 
@DeadMG nope, but it does limit you to using error codes of some kind. Does it matter whether they're called HRESULT or err_t, or soemthing else?
 
sure
 
Don't pull UAC into bullshit. Every mainstream OS has it.
 
8:12 PM
but first, you could pre-allocate a buffer large enough to hold the normal return value, and an object of each possible exception type, and you could pass it in
and then, you could use the return code to indicate which object type is within the buffer when the function returns
 
@rubenvb Well, yes but at very different intervals than the UAC stuff. It's almost predictable =)
 
@rubenvb not really. On other OS'es, it works consistently, and offers some kind of security
 
and then, you could write a trivial inline function executed on the client which would perform the conversion between "object in a buffer" and "normal thrown exception"
 
I now have 900 vertical pixels, allowing me to see 8-10 starred messages
 
@rubenvb Congrats 1600 verticals signing in! =)
 
8:13 PM
On Windows, it is just for show. Microsoft does not consider UAC to be security. They have no problem with the many "workarounds" people have demonstrated for someone on an admin account with UAC enabled to either disable UAC, or do things which require admin privileges without getting an UAC prompt
 
@jalf hmmm... In my eyes, Mac OS X asks you just as much, and Linux is extremely inconsistent
@CaptainGiraffe that's the horizontal pixel count. On a 13.1 inch screen. How awesome is that?
 
@rubenvb I'm not talking about how often it asks you, but about whether it actually prevents you from gaining root/admin access
on Windows, it doesn't
 
@rubenvb It is =)
 
@jalf How sure are you about that? I haven't had malware trouble me at all. If I accidentally execute it, I Just Say No and the boogeyman goes away.
 
@jalf A very important aspect of any UAC is that the user feels in control. Predictability et al.
 
8:15 PM
On a side note I switched to using the magic mouse now.
 
@rubenvb I'm pretty damn sure, because Microsoft have said so repeatedly
 
@StackedCrooked Pet or girlfriend?
 
Check the blog they ran during Win7's development. People repeatedly called out UAC "flaws", and Microsoft again and again said "UAC is not designed as a security boundary, and so, it is not a security flaw if you can bypass it"
 
@jalf ah. I never listen to MS. That might explain it.
 
@CaptainGiraffe Bit of both ;)
 
8:16 PM
The same can be said about their activation scheme IMHO.
 
@StackedCrooked you touch her too much then, I guess.
 
@daknĆøk That's pretty much the point.
 
:P
 
ideally, the compiler would generate the code instead of being hand-written, of course, but you could hand-write it if you wanted
 
8:20 PM
@DeadMG What is your concern with that ideone code?
 
it's not a concern at all
I'm just questioning why it wasn't written 20 years ago
 
so you're arguing that instead of simply exposing a standard API which all compilers can call, they should add a set of language extensions that allow you to call a C api and have the result automagically turned into an exception?
I'm not sure I see the advantage
 
the only language extension is that the conversion code would be automatically generated
anybody could write it by hand or implement a similar feature for any other language
 
yes, and suddenly you require all compilers which are used for code that calls a Microsfot API, to implement this proprietary language extension
and then you'd be bitching about that :)
 
you could hand-code it if you wanted to, the logic in it requires no compiler implementation details
in fact, I had in mind that Microsoft would simply ship it in the header
 
8:23 PM
And yet you were complaining about the API design. Now you're saying the API should stay the same, but the compiler should autogenerate some calling code
 
generating it automatically is just easer if you can do it
 
@DeadMG 20 years ago, that code wouldn't have compiled. :)
 
that's true, but you could just have used memcpy or some other more era-appropriate equivalent
 
but the point is that the change you want has nothing to do with the API you were just complaining about
 
it has everything to do with it
 
8:25 PM
You were complaining about API design decisions, and why the API was designed to return HRESULT error codes
 
right
because Microsoft seem to think you have no other choice
 
Now you're saying that instead, it should..... return HRESULT error codes, and then on the user side, some code should be written to turn that into an exception
 
well, I also return an exception object
possibly
 
@DeadMG you're assuming every language that wants to call into the Windows API has an "object" concept?
2
 
@DeadMG Which would be used how, exactly, if called by a different compiler implementing different exception handling? Or if called from C?
 
8:27 PM
and the "object" has the required memory layout...
 
@jalf If you're in C, then you can just read the object directly. If you're in a different compiler, then that compiler is what compiles the throw statement, there's no boundary-crossing exceptions going on
@rubenvb There are some fundamental requirements for using a C API, and that is one of them, yes.
 
So what would this exception object contain, other than a HRESULT?
 
whatever you want
say.. a string
 
Which is allocated by who? Freed by who?
A string is non-POD. Good luck passing that across ABI boundaries. Good luck passing it to C code
 
well, for a start, I was thinking of a C string
 
8:29 PM
@DeadMG again, who's responsible for calling it and freeing it?
 
and the WinAPI has existing conventions for that- usually user allocated buffer, or function specifies function to free it as part of documentation
 
@DeadMG great, suddenly calling a simple API function becomes a pain in the arse too
 
@DeadMG that's pretty dumb for exceptions, isn't it?
 
Because I have to take care of freeing the error string that I probably never needed in the first place
 
@jalf Written once, if not automatically generated, and then used in the easiest fashion a thousand times
instead of having to write the silly error code checking code a thousand times
 
8:31 PM
@DeadMG you were jsut saying it might be generated by hand, since not all compilers would support this magic
 
yes, but you, the user, do not necessarily have to actually do it yourself
 
And honestly, I don't see why it would be "simpler" or "easier" to check an "exception object" and then free a string after every call, instead of simply checking an error code
 
for a start, Microsoft might be kind enough to ship it for your favourite language- like, say, their main languages, .NET and C++
 
@jalf +1 (no I'm not starring it as interesting, only funny stuff belongs there :P)
 
@DeadMG So we're back to requiring every compiler to implement these proprietary language extensions?
 
8:32 PM
no
 
And if I want my code to work with, say, Clang, then I have to do it manually
 
@DeadMG .Net has a completely different WinAPI
 
And you still haven't shown how this would improve the API at all.
 
once it's written, you can share it however you want, in whatever language you have
@jalf Well, a string can yield an awful lot more descriptive errors than an HRESULT
why does regular C++ use exceptions instead of return codes?
 
Yes, and the API already has functions for getting an error message string
 
8:33 PM
hey guys
My question maybe bit offtopic, but, can anyone explain me difference between developer and programmer? is there any difference at all?
 
so you could write a wrapper to retrieve the string when you need it
but without requiring it to be passed across for every call
 
it doesn't have to be passed across for every call
 
it's part of the returned object
 
no
the returned object is more like a union
 
8:34 PM
or a boost::variant
 
Again, what is gained by this? What does it give me that I can't get just as easily with the current API, which gives me an error code, a function to convert the error code into a string, and perhaps a function for getting the error message for the last error that occurred?
 
@daknĆøk so developer >=programmer?
 
Our imaginary language extension could just as easily use those to generate the exception object client-side, without changing the current API
 
@jalf Because the error codes are fixed beforehand. Error strings aren't.
 
and without causing all those headaches for the unfortunate compilers/languages which aren't on board with your language extension
 
8:36 PM
@trl13 depends on the definition of operator>=.
 
and GetLastError() is hardly the most thread-safe function ever
 
@DeadMG huh?
 
not to mention the idea that two functions might re-use the same return code by accident
 
I don't know about you, but I certainly don't want my error handling to depend on unknown string values
@DeadMG Er, yes it is. The last error is stored as a thread local
 
@DeadMG from MSDN: Multiple threads do not overwrite each other's last-error code.
 
8:36 PM
@jalf Yeah, that's my mistake.
@jalf Not all of them have to be strings. It's an exception object- it can be and contain whatever you want.
 
Well, once again, even assuming that such a proprietary language extension, making it harder for portable code to call the API, is a good idea, how exactly would changing the API itself help? Everything you want to know can be automatically retrieved/generated in a much simpler manner
@DeadMG And I'll ask again: what should it contain? You're the one complaining about getting a HRESULT and the ability to query for an error message string. So what do you want instead?
 
what I'd like is instead of INVALID_CALL something along the lines of "You specified a 60Hz refresh rate, but Windowed mode devices must have the refresh rate set to 0."
 
@DeadMG the problem is that programmatically checking that is costly
 
@DeadMG you mean, like you can already get by asking for the last error message?
 
but Direct3D does it anyway, in order to return INVALID_CALL
@jalf I know of no such function for Direct3D
 
8:41 PM
@DeadMG huh? D3D internally generates a stirng and then checks that in order to convert to a HRESULT? Unlikely
 
@jalf No, but it must check that the device creation settings are invalid.
there's little difference in performance to *ptr = "..."; return 1; and return INVALID_CALL;
 
@DeadMG That's forgetting about the fact that it will take rougly 20Gb on a bare (omg) installation of Win7 64 bit. ... Ugh.
 
So now you've changed your argument from "the API should be changed", into "Microsoft should give me more descriptive error messages"!
 
@jalf Which is pretty much the same thing, since I doubt that they can do useful things like insert values into pre-defined error codes.
 
and I seem to recall that GetLastError() works with D3D stuff too. Have you tried that?
@DeadMG how is it the same thing?
You started out saying they should completely change the API, so that it returns fundamentally different data types. Now you're merely saying "I want a descriptive error message"
 
8:46 PM
well, it would also achieve a much simpler integration with languages that offer exception handling
and secondly, it's the same thing because what qualifies as a "more descriptive error" might be outside the bounds of a single integer
 
@DeadMG you still haven't shown us how
Compilers for languages which offer exception handling could just as well retrieve the error message through the current API, wrap it in an exception object, and throw that
nothing there requires the API to change
@DeadMG Which part of "you can get an error message string from the current API" confuses you?
 
because you're talking about something totally different
> It's an exception object- it can be and contain whatever you want.
that's not necessarily a string
it's any T
 
@DeadMG And you still haven't said what else it should be. I asked you twice what you'd want in that object, and both times, you said "a better error message"
So you're saying that 20 years ago, before C++ was standardized, and before Microsoft had a compiler which implemented C++ exceptions, they should have changed the API into something even you don't know what should be, just so the compiler could autogenerate a bit of wrapper code which can be just as easily generated for the current API
Are you really wondering why no one else thinks that makes sense?
 
well, yes
your example only works for the Windows API, specifically
 
Also, have you looked at DXTrace and DXGetErrorDescription
 
8:50 PM
mine works for any API crossing a binary boundary
@jalf DXTrace is what I'm using now. It's just MessageBox under another name.
 
@DeadMG Huh? So Microsoft should change every API, not just their own?
 
sbi
Whoa. And again, @jalf is in a quite animated dispute. The room isn't really inviting right now.
 
I honestly, seriously, truly don't understand what it is you want
 
@jalf No, what I'm saying is that what I'm describing is a generic solution for any API
and is a lot more worth the time and effort to automate than a solution for one single API
@jalf Curiously, DXGetErrorDescription doesn't get any results on MSDN, and I've not seen it referred to in any tutorial or documentation, but my global namespace does seem to include it.
not that it returns anything more useful than INVALID_CALL, though
 
ohhh, must have been some carried over refinement on the search
 
I just double-clicked the word in chat, selected google, and clicked on third google hit :-)
 
I already had an MSDN tab open and simply clicked in the search box
 
don't know if you're aware, but for general window errors you can get error descriptions from FormatMessage
 
but the new search only searches in the area you were already visiting
 
9:01 PM
and also from COM smart pointers
 
@CheersandhthAlf I doubt they will come back with anything more interesting than INVALID_CALL
 
probably not...
there is one subtle thing. in some cases a sub-API defines a message resource in a DLL, and you can give that to FormatMessage. e.g. as I recall RAS API does/did that. and some network stuff.
it is like a hidden corner of Windows. there is a special message compiler to create such resources, and they support internationalization and are used for the event log. and none of it is very well documented, if at all.
 
@DeadMG how's the language going?
 
taken a break from it for now
 
My current Stack Overflow score is 124,365 ā€¦ my inner OCD personality is crying :'(
4
 
9:12 PM
rofl
 
sbi
@KonradRudolph And that makes you visit the chat, huh? We should try to make your OCD personality cry more often then!
Nice to have you around.
 
@sbi Actually, no
I was trying to get @DeadMG on the hook
 
@KonradRudolph What hook?
 
sbi
@KonradRudolph When I say it's nice to have you around, then that is true. I won't take "no" as a snide reply for that.
@DeadMG You've just swallowed it, I guess.
 
@sbi Ooh, poo, didnā€™t even notice that. :) Thanks
@DeadMG Youā€™re playing around with Spirit, right?
 
9:17 PM
no
 
sbi
@KonradRudolph I'm confused. You haven't noticed he swallowed the hook?
 
ah, shoot
@sbi line, and sinker
@sbi No I didnā€™t notice you saying that itā€™s nice to have me around
 
sbi
@KonradRudolph Yeah, but he has just spit it out. You failed to make it barbed, eh?
 
Not even intel compiler 12.1 supports variadic templates like it says it does :(
 
I expected that he liked the bait better
 
sbi
9:18 PM
@KonradRudolph You might want to learn how to reply to messages. Otherwise I'll retract that statement.
 
@sbi Iā€™m too lazy ā€“ to reply I either have to move the mouse (not gonna happen) or do some convoluted keyboard magic.
 
hmm
if only I hadn't been up since 3:30am this morning
then I might be able to work out how this UI layout algorithm is supposed to work
 
sbi
I think @wilhelmtell uses spirit. Lemme see...
 
I thought DeadMG was playing around with a toy language ā€¦
must have confused that
 
I was
 
sbi
9:20 PM
I know there was something...
 
but I was never seriously contemplating using Spirit
 
sbi
@KonradRudolph He is, but it isn't called "Spirit".
Ah, here:
I feel like Don Quixote. Boost.Spirit makes me want to poke my eyes out with a lance.
That might not really help you, though, @Konrad. :-/
 
@DeadMG ā€œI never seriously contemplatedā€ ā€¦ out of interest, why not? Did you want to write the parser manually or did/do you use another parser generator, and why?
 
I found no meaningful way to make it accept my custom token type and propagate location information
also LL is a weak-ass parsing algorithm
so I moved to Bison
Bison's ugly as hell for numerous reasons, but it could have been a lot worse
 
Just FYI, Spirit isnā€™t using LL
itā€™s using PEG
 
9:26 PM
last time I checked it was LL(*) backtracking
 
@DeadMG That was before Spirit.Qi
 
oh yeah
 
Not that PEG is perfect
 
and Spirit has about a billion different interfaces in different styles under different names
can you say "It's way too confusing"?
 
True
But once you stick to one of them it becomes manageable ā€¦ more or less
thatā€™s actually why I was looking for help ;)
 
9:28 PM
Spirit was way too complex in areas I didn't care for and couldn't even do the simplest things, from my perspective
so Bison for me
 
sbi
@KonradRudolph I was just wondering.
 
incidentally, I love the chat room slogans ā€¦ they crack me up every single time. Is there some kind of archive of all the slogans?
 
sbi
@KonradRudolph It's kind of a meme to change the tagline several times a week. The only thing that's archiving it is the messages that appear when it's changed.
room topic changed to Lounge<C++>: The Robot knows it all. [c++] [c++11] [c++-faq]
 
@sbi Also, the Robot knows them all, since he knows it all.
 
The Robot knows.
 
sbi
9:34 PM
They adhere to a certain scheme you can search for. But since they are posted as messages from the one who changed them, he can change them after they are posted.
 
Is SO the right place to ask why the 12.1 intel compiler isn't compiling variadic macros
 
room topic changed to Lounge<C++>: Your code is bad and you should feel bad. [c++] [c++11] [c++-faq]
woooob woob woob!
 
sbi
@Ninefingers Some of those are fakes, though. I don't think Xaade is an owner.
Checks.
 
@sbi He may have been in the past.
 
9:37 PM
@Ninefingers That's indeed quite funny.
He was an owner until recently.
 
sbi
@DeadMG No, he isn't and he never was. He does fake those once in a while, though.
@StackedCrooked What? I don't think so.
 
Days without singleton incident: -2147483648
that's pretty good
 
@sbi Unfortunately it won't differentiate between owner messages and ordinary ones :(
 
Woohoo: you have to use the compiler option /Qstd=c++0x
 
@sbi Before you introduced the rule that most frequent users should be the owners he was.
 
sbi
9:42 PM
@StackedCrooked Darn. That's wrong! I didn't introduce the rule! I suggested we set up a rule. There was an extensive discussion, the result of which was that rule. I',m not even sure I even suggested that rule.
And, anyway, that was long before this, so it is a fake.
 
Ok, sorry, didn't mean to imply such a thing.
 
I really need to redefine the left Ctrl and CapSlock keys
 
sbi
@StackedCrooked Yeah, they all say that afterwards.
@CheersandhthAlf Put a sticker on them.
 
Everyone is a politician.
 
sbi
@StackedCrooked Even after several minutes of contemplation, I think this is wrong. Most people, and probably all of us, are part of a polis, though.
 
9:48 PM
Death to Caps Lock!
 
@sbi And henceforth, in accordance with the usual laws of politics, it shall henceforce be known as The sbi Ruleā„¢.
 
Jul 7 '11 at 14:10, by Feeds
sbi has added Xaade to the list of this room's owners.
Dec 30 '11 at 8:53, by Stack Exchange
sbi has removed Xaade from the list of this room's owners.
 
sbi
@DeadMG "And henceforth... it shall henceforth be known..." You're a puppy. Keep your small brain out of such matters.
 
Ah, the Archivist strikes again!
 
sbi
@RMartinhoFernandes Dammit! I was actually afraid this would happen.
 
9:50 PM
I am going to do just that and allow it to rest
 
@RMartinhoFernandes How did you do that?
 
@CheersandhthAlf Do what?
 
Find those
 
sbi
@RMartinhoFernandes I tried to search for the @Feeds guy to find just those. I failed, though.
 
9:51 PM
@sbi Yeah, for some reason it doesn't show up in the popup. But I do know it's user -2.
 
sbi
@RMartinhoFernandes Delete "Feeds" in that search. Then try to enter it in the search field.
 
I entered -2 in the user field.
 
sbi
@RMartinhoFernandes Only a robot would remember that. (Incidentally, who is -1?)
@RMartinhoFernandes Only a robot would do that.
 
@sbi Community.
 
sbi
@RMartinhoFernandes Only a robot would know that.
 
9:52 PM
Ok, ok. I get it.
And... this is user -3.
WTF?
 
sbi
Haha!
@RMartinhoFernandes Only a robot would try that!
 
What a cutee :/
 
@sbi AFAIK cats are curious too.
 
sbi
@RMartinhoFernandes No, those are chimps!
 
Even dogs can be curious.
 
9:55 PM
Oh, right. Cats are allergic to curiosity. That's why it kills them.
 
@Ninefingers Awesome, thanks
 
I just found that there is a website http://www.deathbycuriosity.com/. Haven't really checked it out yet.
Seems to contain mostly music framents.
Some of them good.
 

« first day (498 days earlier)      last day (4454 days later) »