« first day (1003 days earlier)      last day (3961 days later) » 

12:00 PM
But i know the feeling, I've lost 2 hours on battlecruisers last time :F
 
@EricPostpischil Ok. I reworded (I'm curious what the C99 specs said there, by the way) — sehe 14 secs ago
^ interesting. UB is quite different in C11?
 
@BartekBanachewicz Just bookmarked everything for reading on the train.
@sehe Erm, why do you assume so?
He could be quoting C11 because... well, it's the latest?
I don't see any implication that this behaviour is different from the previous standards.
And the C11 reference applies to point (2), not point (3)...
 
@R.MartinhoFernandes I'm not assuming. I'm curious. I seem to remember that depending on the data read from uninitialized memory invokes UB
 
argh, what the heck.
I acquire a lock on my window in my WndProc: std::lock_guard<std::mutex> lock(win->msgmutex);. this fails with a std::system_error if I right click on my window! unless I sourround the lock_guard with a try/catch, then it never fails. ???
 
user142019
12:06 PM
@Borgleader arrrggg I want too localized back.
 
@melak47 wtf are you doing?
 
@BartekBanachewicz locking a mutex on my window :)
 
@melak47 making it thread safe, huh?
 
how the fuck does a right click cause my mutex to be busy
 
12:09 PM
@Borgleader fuck my self writing too slowly to ever be able to answer these simple questions fast enough to get the rep.
 
2 mins ago, by Bartek Banachewicz
@melak47 making it thread safe, huh?
 
@BartekBanachewicz why do you ask?
 
@melak47 curiosity
 
yeah.
 
12:10 PM
@Borgleader ¬_¬
 
@melak47 well that's always a PITA
 
what's more of a PITA is that my compiler seems to be insane, not the first time I could swear I just undid+redid some tiny changes and it behaves completely different...
but hey, it's MSVC, I guess I should have expected that.
 
i think you're just fucking something up
one thing is that MSVS suck, the other is the rant because of lame code :D
 
@melak47 PCH craziness? UB?
 
idk ._.
 
12:15 PM
@melak47 If it's not a recursive mutex, then almost any user action will lock up the GUI because such actions generally result in a slew of messages.
 
Undo+redo not-so-tiny changes? Undo+"redo" slightly more than was undone?
General user error?
 
@MartinJames yeah, but nothing else locks the mutex. so..what, are there multiple instances of WndProc running at once?
any mouse button seems to cause the mutex to be busy when WndProc runs. keyboard buttons don't. o.O
 
@melak47 Replace with a recursive mutex and see what happens. Won't help much anyway - it will still not be safe to access GUI components from another thread. I've tried a dispatch lock before - it does not work.
 
@MartinJames "access GUI components from another thread" ?!
 
@melak47 Why else would you be locking up a window with a mutex?
What are you up to :)
 
12:20 PM
I'm locking a queue so I can put an event in the queue when it occurs
 
Yeah, it does sound nasty.
 
Hmm.
HP-UX' linker complains when I used -Bhidden_def that std:: stuff is not exported but it is imported by (my) shared library.
Should I be worried and use -Bhidden instead?
 
And you have the mutex outside?
 
Well, lock the queue, push on your stuff in the event, unlock the queue. Why are you even looking at the messages?
 
If you are coding for Windows you can use the PPL which provides thread-safe queues.
 
12:24 PM
@R.MartinhoFernandes I was thinking about using the boost ones, but I don't even really want to consume and produce at once anyway
 
@MartinJames what do you mean?! that's all I'm doing
 
@melak47 Hmm.. the lock sems to be associated with the window 'win->msgmutex', rather than any queue class.
 
@MartinJames the window has the queue :p
 
@melak47 OK, and the queue should have the lock.
 
12:27 PM
what difference does that make? I'm the only one locking it
 
The queue can enforce that better.
 
yes, but right now I don't even have a consumer thread, and still crap happens
 
It's perfectly fine to push stuff onto a concurrent queue in a WndProc message-driven callback. I do this all the time. If it does not work for you, you are in derpstorm land :)
 
Synchronisation primitives should be bundled with the data they protect. They should be one with each other, not two individual pieces of a puzzle.
 
Yeah - mutex should be private to your Queue class and lock/unlock should be in the queue 'push' member function, (and pop, of course).
 
12:31 PM
Now that I think of it, both Java and C# builtin monitors fail to do that.
 
I get that I may want to redesign this...but making my own queue now is not going to make this stuff work anymore than it does now :S
 
@R.MartinhoFernandes Hehe - no surprise there.
 
Hmm did you guys know theres something lower level than opcode/machinecode?
 
@moonbeamer2234 Yes, for hardware chip developers, there is.
 
Yeah microcode
 
12:34 PM
there's also VHDL and Verilog and whatnot
 
But I always assumed after machinecode everything was done at the physical level and coding was taken completely out of the equation, except for pure binary obviously.
 
@MartinJames I always use something like private readonly object theLock = new object(); instead of the builtin monitors, because they are just trouble. It does pain me that I can't just opt-out of them though: in any application there are about a zillion pointless monitors in memory because of that crap :S
 
Wait are you guys talking about java or c?
 
What, is this lounge<java>? Or lounge<c>
 
@melak47 Maybe.. maybe not. Like robocop says, divorcing the lock from the queue class reduces encapsuation. Going anywhere directly near WndProc/Dispatch with it is likely to be... 'problematic'.
 
12:36 PM
@MartinJames why :S
 
@R.MartinhoFernandes I don't know, I read the above comment
 
@wilx Sorry, but my HP-UX experience is really too old. Have you tried SO?
 
and java was mentioned
 
@R.MartinhoFernandes I suspect that OS syncro primitives are pooled up and served up to objects as needed. That means every object needs a pointer, and maybe a refcount, just in case it needs a lock attacked to it :( I always thought that was a stupid idea.
 
@moonbeamer2234 We were talking about synchronisation primitives, and I mentioned that the ones built into every object in Java and C# are bad.
 
12:38 PM
I agree
if you want a lock, make a lock object, it's not that tough.
 
@moonbeamer2234 we have to mention it if we want to bash it
that being said, I posted Prolog code today so I shouldn't even open my mouth
 
that would be preferable, especially on a permanent basis ^^
 
@DeadMG OMG! We are all in agreement about something. The Lounge has become infected!
 
watdafuq
impossibru#
 
@moonbeamer2234 I could be mistaken but I think RISC processors don't have microcode
 
12:41 PM
@melak47 Recursive message-handling.
 
@MartinJames recursive what D:
 
That might be true A.H I was just sharing...my ignorance apparently. Lol. I found it interesting cause I always thought the only thing lower than machine code was like writing in 0s and 1s lol
 
@DeadMG eh.
 
@melak47 If you put an atomic inc/dec round 'DispatchMessage', you will find that it goes above 1.
 
12:43 PM
@MartinJames dude, naww
 
@moonbeamer2234 What about voltages?
 
@TonyTheLion Also, lol in far better quality
 
@melak47 Try it and see!
 
Spread the C++11 love:
0
A: minimum double value in C/C++

rubenvbIn C, use #include <limits.h> const double lowest_double = -DBL_MAX; In C++pre-11, use #include <limits> const double lowest_double = -std::numeric_limits<double>::max(); In C++11 and onwards, use #include <limits> constexpr double lowest_double = std::numeric_limits<double>::lowest();

 
12:45 PM
@MartinJames I believe you, I just don't want it to be true! :p
 
@sehe that's an amazing title
 
@melak47 In fact, does not need to be atomic, 'cos only one thread. Any old ++/-- will do.
 
@thecoshman > stcikign to a convetion
 
@moonbeamer2234 To be clear, when I say they are bad, I don't refer to the semantics they provide. Monitors are one of the safest and most versatile primitives around. What makes these ones bad is that they are (1) in every object for no reason whatsoever; and (2) publicly accessible to every method everywhere.
 
@R.MartinhoFernandes analog and binary/digital would be synonymous in their level of abstraction no? A binary 0 is any voltage lower than what's required right?
 
12:46 PM
@KonradRudolph dat shtick
 
@moonbeamer2234 A 0 abstracts away voltage fluctuations, so I would quite confidently say "no".
 
@MartinJames why does DispatchMesssage recurse, though?
 
@KonradRudolph shtoop
 
@melak47 ..because some component member functions use SendMessage() internally.
 
@melak47 Message handlers can either queue new messages (which would be handled later on when the queue pumps away) or handle them immediately (which means recursing).
 
12:48 PM
@sehe I have just submitted a question:
0
Q: HP-UX, aCC, -Bhidden_def, imported but not exported warnings from linker

wilxHP-UX' linker complains, when I use -Bhidden_def, that std:: stuff is not exported but it is imported by (my) shared library, e.g.: /usr/ccs/bin/ld: (Warning) Symbol "std::basic_string<char,std::char_traits<char>,std::allocator<char>>::npos" is not exported but is imported by a shred library S...

 
SendMessage vs PostMessage IIRC.
One returns immediately, the other only returns when the message is done being handled.
 
@melak47 Imagine what has to happen when a message posted to the GUI input queue results in a TreeView update...
 
It's nice if you could perhaps also fix the question next time, when you deciphered it :/ — sehe 1 min ago
 
..which requires a TreeView scroll..
 
@MartinJames simple: using my patented "do it later (or never)" approach, a TreeView update goes on the input queue :)
 
12:51 PM
.. which requires the leaves to be repainted..
 
VLAAAAAAAAAARGH.
 
oohh - refp has exploded...
 
@refp variable length AAAAAAAARGH?
 
damn I gotta add a new improvement to some of my really old code. I really hoped I'd never have to maintain that sludge
 
12:53 PM
@melak47 nhaa, I'm a monstah
 
@Aboutblank Welcome to my world...
 
"I'll do it quick and dirty because I'll never have to maintain this" — famous last words
 
7 hours ago, by refp
@Magtheridon96 well, at least c++ doesn't have any captchas.. that would've been far worse than a few gotchas. just sayin'
 
Vocabulary question: (the sort of thing you can't google because you don't know the name): I'm looking for a structure to hold n-dimensional arrays with capabilities similar to boost.multi_array (reshape, slice), but for dynamical sizes. vector<vector<vector< ... >>> seems so complicated. Found blitz++ but can't find any reshape function. I'm used to numpy arrays... :( thanks
 
^ I thought I was being clever and told my 14 year old brother the same thing, he just shook his head and walked off; "you are fucking weird Filip, fucking weird".
 
user142019
12:54 PM
@Sebastian Embed Python and use NumPy.
 
Boost.multiarray isn't resizable?
 
@R.MartinhoFernandes I either delete or lose my old code. So... not a problem for me! xD
 
@R.MartinhoFernandes Unfortunately, it often gets left to the next guy.... Sometimes to a maintenance/enhancement developer in the East Midlands, UK :(((
 
@rightfold boost.multi_array is a static array like a c style array. Unless I misunderstood
 
@MartinJames Why do you think those are last words? ;)
 
user142019
12:55 PM
That's irrelevant to my answer.
 
@Sebastian AFAIK the number of dimensions is fixed, but their size isn't.
 
@Sebastian extents are runtime
 
Do you need the number of dimensions to change at runtime?
 
@rightfold sorry, how would I use python inside C
 
user142019
lol
 
user142019
12:56 PM
> C
 
@rightfold No!
 
@Sebastian He's trolling you, ignore him.
 
how can C++11 be used inside C++03?
 
user142019
I would actually do it this way because I like Python. :>
 
@R.MartinhoFernandes I'll check. I dont need to change dimensions
 
12:57 PM
@melak47 that's by Gustav Holst, right?
 
@R.MartinhoFernandes LOL! Some developers must keep their CV's continually updated and always have a resignation letter ready to be dated at a moments' notice, just in case a support request comes in for their code.
 
@rightf
 
Destroyer of Worlds is the tenth studio album by Swedish extreme metal band Bathory. It was released on 9 October 2001, through Black Mark Productions. Background The album's title is taken from a famous quote by J. Robert Oppenheimer about the atomic bomb: "I am become death, destroyer of worlds", which was itself quoted from verse 32 of chapter 11 in the Bhagavad Gita. Stylistically, Destroyer of Worlds is a cross between the Viking metal of Bathory's 1988–1991 period and the thrash metal style of Requiem and Octagon. It is Bathory's longest studio album. Track listing Pers...
 
@rightfold I have code in python/numpy that I need to translate to c++
 
if Gustav Holst does "extreme metal" now?
 
user142019
12:58 PM
@Sebastian Ok.
 
I always read that as 'numpty'.
 
user142019
 
@rightfold One of these days I'm going to kill that proxy that keeps racing with SO Chat javascript
 
numpy is obviously the lost brother of Humpty & Dumpty.
 
user142019
1:00 PM
Kill it with CoffeeScript.
 
@melak47 if jhaj a ligajure?
 
@refp Humpty Dumpty is a single egg-shaped being.
 
@sehe wha?
 
You can reshape it into several
 
@R.MartinhoFernandes nhaa, I've always thought of the character as being schizofrenic.
 
1:01 PM
@refp Heh! As long as I don't have to try to put broken Python/numpy together again.
 
@melak47 n.m. I thought if was a typo for is
 
@sehe and then your post would've made sense...how? o.O
 
@R.MartinhoFernandes thanks for the link and clarification. I'll check about sizes. I was confused because boost::array is fixed at compile time
 
@R.MartinhoFernandes and always = during these last few minutes.. I know nothing about humpty-dumpty
 
1:02 PM
@refp 'When Humpty Dumpty is described,' Humpty Dumpty said, in rather a scornful tone, 'it is just as the author choose to describe it — neither more nor less.'
 
and with that sorted out; time for a smoke.
 
Good plan - coffee/fag.
 
user142019
> requries
 
user142019
I hope this is a typo in n3580. :P
 
That's not an issue. Individual papers are allowed typos.
 
1:07 PM
std::unique_ptr < std::queue < std::function<void(void) >, std::vector < std::function < void(void) >> >> front, back; //dammit VS2013, get your auto formatting together
 
lol
 
>> >>? I thought we were over this...
 
it's kinda annoying indeed
@DeadMG wanna shine some of your knowledge on one thing that came to my mind WRT GL?
 
@melak47 why do you put the queues in unique_ptrs anyway? Are they optional?
 
@ArneMertz just messing around
 
1:12 PM
@melak47 obviously you can let VS12 take care of messing around :D
 
@BartekBanachewicz Cue "it's a massive pile of crap"
 
@R.MartinhoFernandes you are not allowed to say that until you see it
myVao.withBound([]{
    gl::VertexAttribPointer(stuff);
    // more stuff
});
 
It's a massive pile of crap.
:P
 
I thought it might be nice for implementing DSA on drivers that don't have it, and in general as interesting usage pattern.
 
@BartekBanachewicz Is withBound meant to mean "with this VAO bound, do this"? I think it's a weird name, but I can't think of a better one.
 
1:16 PM
@R.MartinhoFernandes pirate suggested whilstBoundDo :P
 
But you can skip the naming altogether if you make it myVao([]{...}) :P
-6
Q: sex while boyfriend is asleep?

suicide boothLast night we went out to a few local bars, starting at Urban Mo's. After drinking with friends for a few hours, we came home and the Bf proceeded to pass out instantly after doing some heroin and eating a whole Dominos pizza. I was feeling horny, so I texted a guy I've chatted with on aim messen...

 
@R.MartinhoFernandes nice
 
@R.MartinhoFernandes naming isn't really a big problem :P
 
@BartekBanachewicz I used a similar approach back when I did C# to get around their lack of proper RAII
 
hmm, indeed, C# does that.
it's legit then.
 
1:20 PM
What exactly is it supposed to achieve in C++ though? Just to ensure you don't store some kind of binder object into a vector or similar?
 
@BartekBanachewicz wat?
 
@jalf Well, [&] can easily overcome that. If that is the goal, it's a lost cause.
 
@jalf some drivers don't support the DSA extension, and we decided to implement that ourselves
 
It's protecting against Machiavelli.
 
for this though, I would be a bit concerned about its impact on compilation time (it effectively means that every call to withBound is a new template specialization)
 
1:22 PM
@BartekBanachewicz "C# does it" != "It's legit"
 
you should probably negate the implication, but I get your point
 
@BartekBanachewicz but how is myVao.withBound() different from SomeRAIIBinderObject binder(myVao); // now do glVertexAttribPointer stuff?
 
hm, that's an interesting approach indeed
 
It is?
 
@jalf Nesting withBound is going to be simpler than nesting RAII objects.
 
1:23 PM
I thought it was the obvious one, and yours was the "interesting" one :)
@DeadMG O.o?
 
well, let me put it this way
 
@jalf I was just thinking differently, and skipped that somehow.
 
{ raii one; stuff; { raii two; stuff; } stuff; }
 
if I have an RAII object, it's not going to be destroyed until end of scope.
@R.MartinhoFernandes Right, it's kinda ugly really.
 
1:24 PM
one.f([]{ stuff; two.f([]{ stuff; }); stuff; })
 
@BartekBanachewicz anyway, conceptually I like your approach a lot. In practice, like I said, I'd have to wonder how it would scale in terms of compilation time
 
Eye of the beholder.
 
I personally quite dislike floating compound statements
 
What are you doing, by the way? A C++ GL wrapper?
 
yes
 
1:25 PM
@jalf this is a workaround anyway. (proper call is vao.directVertexAttribPointer and doesn't involve binding at all)
@jalf yup.
 
Xeo
@jalf auto binder = myvao.bind();!
 
@Xeo I don't think I like the idea of bind() returning anything
 
@BartekBanachewicz It returns a scoped binding.
 
@BartekBanachewicz You're wrong.
I personally would much prefer auto binder = myvao.bind(); rather than SomeRAIIWrapper binder(myvao);
 
@BartekBanachewicz rename it scopedBind()?
 
Xeo
1:27 PM
Just an alternative to RaiiT binder(myvao); or auto binder = bind(myvao);
 
@DeadMG but then vao.bind(); would have no effect
@jalf better.
 
@DeadMG I can accept that. But like I said, it depends on who looks at it. I actually find both ugly :|
 
@BartekBanachewicz Which is fine.
 
@BartekBanachewicz We need explicit operator void()!
 
or calling it ScopedBind could work fine.
 
1:28 PM
anyway, those two approaches are pretty trivially interchangable. Doesn't matter which one you prefer. IMO the interesting question is those vs his withBound function
 
@R.MartinhoFernandes +1 let's write a proposal
 
@DeadMG lol, soped.
 
soapedBind
2
 
seriously, you noobcake.
don't you know you have to wait two minutes before pointing out funny spelling mistakes?
@jalf It binds using SOAP web protocol.
 
@MartinJames well, thanks. I didn't see that with the recursive messages mentioned anywhere on MSDN I happened to look
 
1:29 PM
PTSD
 
Xeo
@R.MartinhoFernandes How'd ya write something like that in Haskell?
 
@Xeo withVao x $ \bound -> ..., I guess, possibly sweetened with do notation.
 
Xeo
mh
 
bound might not be needed.
withVao x $ do ... looks better.
 
@jalf withBound could potentially do some lazy operations... like, construct batches of the calls and don't change binds for the same vaos
 
1:34 PM
@BartekBanachewicz I'd like explicit operator void and operator auto.
 
vaoA.withBound(A)
vaoB.withBound(B)
vaoA.withBound(C)

would evaluate to

bind(A)
do(A)
do(C)
bind(B)
do(B)
 
operator auto definitely.
 
@BartekBanachewicz Actually, I think you can make that the only mode of operation, and get rid of redundant binding altogether.
 
@R.MartinhoFernandes what would operator auto do again?
 
@BartekBanachewicz auto x = expr;, operator auto returns the real object.
 
Xeo
1:35 PM
@BartekBanachewicz And how'd you actually do that, with that syntax?
 
@R.MartinhoFernandes Well I will say it again, it's only a workaround for the lack of DSA
 
for example, consider if expr is an expression template.
 
@Xeo some global state :/
 
Xeo
...
 
@BartekBanachewicz Wait what?
 
1:36 PM
hey, don't forget it's OGL! I have some guarantees about single-thread and single-context and whatnot
 
How do you plan to reorder operations?
And is reordering them always valid?
 
@R.MartinhoFernandes operations on separate objects?
 
depends on the operation.
if I draw in those calls, say...
 
@BartekBanachewicz Decide what the type of auto x = f(); is. (Primary use cases are forcing expression templates to not be expression templates and forcing the user to pick a type for templated operator T)
 
what if do(C) changes the current render target?
 
1:37 PM
yeah, I am not going to do that, it was a long shot for @jalf to find differences between my and your approaches
 
Exactly.
You can only reorder them with guarantees that they are independent, and... good luck with that.
ARG
 
that's why binding sucks in general and it should be minimized
 
s/binding/OGL/
 
@DeadMG haven't you perhaps noticed how modern OpenGL is going forward to solve that problem?
 
@BartekBanachewicz Erm, there's nothing you can do if they are dependent...
 
1:39 PM
@BartekBanachewicz lolwot.
 
And there's no facility to mark that or to detect that.
 
you make it sound as if I give a shit about what modern OGL might or might not do.
 
@R.MartinhoFernandes you don't need withBound function if you don't bind
 
Direct3D hasn't done this shit since D3D8, if not earlier.
 
@BartekBanachewicz That still doesn't allow you/the compiler to reorder them at will.
 
1:40 PM
@DeadMG go use DirectX then.
 
when OGL publishes an API that does not involve this shit and consumer hardware and drivers support it to a good market penetration, then we'll talk
@BartekBanachewicz I do.
 
because right now it's just noise in the discussion.
 
you know, you're right, I don't know why I said that.
 
@R.MartinhoFernandes right.
 
@melak47 No problem. I'm only too happy to screw up someone else's designs/code, after all, other developers have been trying to put me in a nuthouse for decades:)
 
1:43 PM
lol
 
Ok, I will try to implement a bit of what we talked about today and see how it fits.
 
@MartinJames Are you sure they haven't succeeded yet? (hitchhikers.wikia.com/wiki/Wonko_the_Sane)
 
joke's on you; I had no design!
 
@R.MartinhoFernandes Well, I'm in the Lounge, so... :)
 
Martin James the Lounger (interpret as you will)
 
1:51 PM
Do you guys ever feel like your semicircular canals have reset after yawning?
 
That's normal, isn't it?
 
That's what I'm asking :)
 
Ok, I must admit my stupidity right here: the things in "my little pony - friendship is magic", are they ponies or unicorns?
 
Well sure, yawning helps to equate the pressure difference between inner ear and and outside
 
Or some are ponies & some are unicorns?
 
1:55 PM
keming.
 
What's not normal is feeling your hyoid bone jump out when you yawn
hurts as hell
 
@BartekBanachewicz Darnrnit.
 
This joke is so damn nerdy.
 
@jrok Oh nice. No need to worry, then.
 

« first day (1003 days earlier)      last day (3961 days later) »