« first day (912 days earlier)      last day (4038 days later) » 

Xeo
9:00 PM
Split-up read/write is really basic for streams
 
oh man firefox is SLOW AS FUCK lately
 
Is it common to use both?
 
@ThePhD Yes, but not for what you'd normally think of as formatting. The streambuf primarily uses the locale for things encoding and decoding (the codecvt facet), such as converting, say, ISO 8859-something to UTF-32 during input, and UTF-32 to UTF-8 during output.
 
Oooh.
... Um, well okay.
Everything's virtual...
 
also all of its plugins seem to permanently be listed as "vulnerable"
 
9:02 PM
@ThePhD Yes, the design predates templates (by quite a while).
 
I don't suppose unless I template the shit out of this, I'm going to ever see the anything but virtual implementations of streams...
 
@JerryCoffin And clear naming of variables, presumably.
 
Technically, each stream is completely different but usually you'd only request the same operations. That smells like a base class to me, but... I don't know. Would I gain anything by trying to make this completely templated? How would I go about making this thing templated in the first place?
The primary concern is the Backing Store of the stream, which may be a network connection, a file on the file system, or just an array in memory. I don't think I can cover all the cases, unless I store everything in RAM first.
 
@LucDanton That's less "predates" than "ignores". It also displays a fair number of "solutions in search of problems", like the "pattern" of virtuals all being protected, with a public, non-virtual function for you to call. I've read the arguments for this design, but have yet to see a real positive effect from its inclusion.
 
@LightnessRacesinOrbit @FredOverflow more groovy disco stuff:
The whole granado espada OST has a gold mine of groovy shit.
I dig it. :D
Some of it is borderline-rave-y,
and some of it, it starts out really great, and then some douchewad presumably in the middle of hte song just shits on it
But the vast majority of stuff is pretty good.
 
9:07 PM
@ThePhD Personally, I think we should eliminate files completely. Let me memory map everything, and give an arbitrary name (and protection) to a section of memory.
 
I don't quite know how memory mapping works.
 
@ThePhD Pretty well, when it's used correctly.
 
I wouldn't know what that implies for C++ though.
How would I perform I/O with Memory Mapping?
I know the Windows API has a MemoryMapping API of some sort that relates to I/O, but I don't know how it works or what it's supposed to do.
 
@ThePhD It would imply moving most of that ugliness out of applications and into the OS.
 
Ooh.
So not something I can solve. x3
At least, not unless I take over Linux or Microsoft or something.
 
9:11 PM
Memory mapping means your program just treats something as if it were just data in memory. The OS takes care of reading it from disk (or elsewhere) into RAM when you want to read it, and flush it back out from memory to backing storage if/when it's been modified.
 
Ooh.
That gives me an idea.
BufferedStream.
 
user142019
On POSIX, see mmap(2) and msync(2).
 
It'll take a stream, and when possible, write out as much data as it can to RAM.
When that data runs out, it'll refill the buffer.
.... But it will be predicated by taking a regular Stream, and being a Stream itself.
So I haven't solved any of my problems. xD
 
user142019
With memory mapping you just "convert" a file descriptor into a pointer to a block of memory.
 
Gah. Fuck I/O.
 
user142019
9:13 PM
It works because of a wonderful technology called paging.
 
I wonder if, automatically, FILE* c handles are Memmapped by default...
 
Xeo
Alright, I'm out for today. G'night.
 
user142019
FILE is a cross-platform wrapper around file descriptors.
 
Niiight.
 
I should add: a 64-bit virtual address space is large enough that you can assign unique virtual addresses to all the storage on the planet. This would let me access (for example) my local memory, local disk, any web site, etc., identically.
 
user142019
9:14 PM
On Windows they're called handles I think.
 
Ell
Hi guys
 
@Zoidberg Yeah, HANDLE and shit.
 
user142019
Hello Ell.
 
@Ell Hey there honey bunches how are you. <333
 
user142019
mmap can also be used to allocate pages with custom permissions and shit.
 
Ell
9:15 PM
I'm okay, just finished up some maths homework, how about you?
 
user142019
On Windows you need VirtualAlloc IIRC.
 
Ah okay.
 
user142019
OS X implements malloc ITO mmap.
 
Well, that gets OS-specific, and I'm not quite ready to dip my face into that pool.
 
boost has mapped file:
mapped_file mm(filename);
fill(mm, 0); // Works as range
char *data=mm.data(); // Or as raw memory pointer
copy("String in memory", data); // Copy to raw memory
 
9:17 PM
... What does boost's io streams look like
 
user142019
I/O streams and memory mapping are unrelated.
 
Hm.
 
> Bad code ID!
 
oops, I will re-try
 
9:19 PM
Well, after looking at C#'s Streams, C++'s stream_buf and Boost's IO...
 
@JerryCoffin ... till we run out of pointers.
 
Wow.
I really like Boost's model.
It's like C#'s.
Not a single mention of imbue, locale, and other things that don't really matter to getting and setting bytes from a source or sink.
 
@ThePhD: did you ever use PIX to debug your Directx applications?
 
@Borgleader PIX is now integrated with VS2012.
 
user142019
9:23 PM
Haskell has the best I/O streams.
 
@ThePhD It's just, the weird thing is.... I took one of the DirectX samples and took stuff out of it to get just a window with a blue background, no rendering just clearing the rendertarget. And when I run it with pix it crashes saying one of the parameters is corrupt. But when I run it without pix everything is fine
 
PIX forces D3D's device to be in debug mode.
So maybe you are indeed doing something wrong.
Also, if by "Running pix" you mean anything but "hitting Alt + F5 to start the Graphics Debugger / Diagnostics in VS2012", you're doing it wrong.
If you're not ending up with a Graphics Experiment.vslog, something is wrong.
AWW TITS
ALL BOOST DOES IS WRAP STANDARD STUFF
How jerkisk. =[
 
By running PIX I mean starting PIX (the standalone thing) and then pointing it to my exe
And yes my device is in debug mode:
	UINT createDeviceFlags = 0;
#ifdef _DEBUG
	createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
#endif
 
Try not to run the external PIX.
Use the real PIX
As in, the one in VS2012.
There's a Graphics Debugging Toolbar and should also be a graphics menu
Debug > Graphics > ....
 
is there a way to display only active questions of my favorite tags?
 
9:29 PM
Whats wrong with the external one? I've used it before on a d3d9 application
 
External one hasn't been updated in forever and won't play nice with DX11 ?
 
@bamboon With a bit of hacking around :D
 
Pretty sure the only graphics debugger for DX11 is the one inside VS2012.
I don't even know who was developing PIX in the first place.
 
@ThePhD Oh...
 
@Rapptz I wouldn't mind that, I have no idea how to do that though.
 
9:31 PM
@bamboon Could do something similar to this
 
@ThePhD Well it ships with the DXSDK I think so it would be MS
 
@Rapptz swag, that looks good
 
Yeah.
PIX has been integrated in VS2012.
It works with DX11.
PIX has not been seperately updated, and the DXSDK is no longer being supported separately.
Everything in the DXSDK folder is old.
The only thing you should take from it is XAudio2, to make sure it works on a Windows 7 computer, IF you even use XAudio2 in the first place.
 
liveworkspace.org supports persistent file I/O: liveworkspace.org/code/4y1NKg$0 - cool
 
@Rapptz thanks, worked very well.
 
9:35 PM
@ThePhD Nah, right now I'm building a deferred shading prototype. But for my engine the audio will either be FMOD, Wwise or both
 
I could never stand FMOD stuff.
I can't see the appeal in FMOD.
But that's probably because I've never used it.
 
Ell
OpenAl is what I'd turn to immediately
 
@ThePhD I think the appeal of FMOd is more the tool
than the API
 
What's the tool good for?
 
user142019
Nobody. Y u use PostgreSQL.
 
9:40 PM
@ThePhD its like some designery thing where they can visually script sound effects and stuff
 
@EvgenyPanasyuk mmm how would that work, and what are the limitations
 
user142019
SEHE!
 
Lol
 
@sehe only for registered users, 1MiB of sandbox. i.e. 1MiB per account
 
I wrote out this stream and it looks exactly like C#'s
Goddamnit.
I've solved nothing. =[
 
9:47 PM
I appreciate that static linkage has a purpose. However, it's relation to Licensing is ... tenuous at best. If licensing is going to be the argument, then surely dynamic linking trumps static linking by a big margin, because dynamic linking is not considered a derivative work in the sense of GPL, but static linking is. IANAL though. Anyways, static linking is not a way to get rid of glibc. Not using glibc (static or dynamic) is the only way to achieve thatsehe 17 secs ago
3
 
Ell
I don't like android dev -.-
 
@EvgenyPanasyuk Oh, one can register now? That link has been 'broken' (unimplemented) for just so long I just gave up on it
@Zoidberg What?
 
@sehe yes, I registered several weeks ago
 
user142019
Wat's op.
 
@Zoidberg short for operator or operational. Also, dutch for up or finished/completed.
 
9:49 PM
@sehe note, if you would use gmail e-mail, verification email from lws may go to "spam" box of gmail's web-interface.
 
user142019
@sehe OP is een flikker.
 
x_X
I've been statically linking the FBX SDK
 
@sehe Yeah, the notion of licensing really gets blurred when you consider how the binary is constructed.
 
And zlib.
 
Ell
Did the boston marathon explosion happen today?
 
9:52 PM
zlib uses the PNG license so it's safe to statically link...
 
Blaarrrgh
Whatever, I'll just dynamically link everything.
Might as well.
 
@Zoidberg In the context of SC2, "OP" == "Over Powered".
 
Somehow, I think these attacks are US in origin. Not as in conspiracy theory, but someone disgruntled over something. They seem weak (in comparison to concoctions from extremist groups)
 
9:54 PM
They certainly weren't extremely deadly.
No high-profile government building targets either.
Just a Marathon.
 
@Ell Wait, you knew it was going to happen, yet you don't know whether it has happened yet?
2
 
@sehe That comment is not linked to the preceding one D:
 
Ell
@sehe .... ermm I mean, did anything interesting happen today?
 
=[
When does SO's rep counter reset?
I want to start answering questions again.
 
3am UTC?
 
9:56 PM
@ThePhD WTF is wrong with that sentiment
 
user142019
@Ell Something interesting happened today.
 
user142019
I learned about triggers.
 
@sehe I meant, it doens't seem like an organized terrorist group of any kind.
Agreeing with @DomagojPandža that it was some disgruntled person or two.
 
Ell
@Zoidberg triggers? In what context?
 
user142019
@Ell SQL.
 
Ell
9:58 PM
also android god so much code duplication! Agh
 
@LucDanton Yeah, well, that's ok. The guy will get a notification anyway. Also, I /think/ I don't mind not getting a reply from him, judging by his comment. (Yeah. mixed messages. I'm doing it. Again.)
 
user142019
Oh, awesome. PostgreSQL has inheritance. And polymorphism! And multiple inheritance wat.
 
I really don't know how to cope with the 'FLOSS enthusiast' part of the profile.
 
@ThePhD Well, that's so good to know :|
@LucDanton Exactly
 
'Free GPL code! Neat' <- that kind of enthusiasm?
 
9:59 PM
@sehe It's easier to put down a disgruntled maniac than an organized group of insane people. :D
 
Almost certainly.
 
@LucDanton It really sounded literally like: I want to statically link to [OSS library X] because I don't want to seen depending on it (e.g. I want to keep the use of licensed code hidden)
 
I don't see the point in such crime. Just pure insanity, going for the kill. No benefit beyond pleasuring a sick and perverted mind.
 
863 rep on Reverse Engineering.SE.
 
I'm just glad (s)he sucks at bomb construction.
 
10:01 PM
@LucDanton Woot. I didn't even know that exists
 
@DomagojPandža terrorism
 
@ThePhD It's even easier to jump to conclusions based on little or no evidence. That doesn't help. Well, except for the fact that if everybody keeps repeating "Patriot's Day", "McVeigh" and "US faction" then any terrorist group will be highly motivated to claim the attack.
 
8 hours ago, by Luc Danton
Today is poison the well monday!
(Only reason I brought up RE.SE.)
 
@DomagojPandža Not really. He/she is just being economic. It's probably not about quantity killed.
 
But beyond panic and fear, what does he stand to gain? Economic involves ROI. I don't think terrorism makes people more cooperative. If anything, they team up to whoop your ass.
 
10:04 PM
@DomagojPandža fear -> manipulation
 
Manipulation, how so?
 
@DomagojPandža So. You answered your own question, then you proceed to paint it as a big dilemma?
 
I just fail to see the point of it. Oh, well.
 
@DomagojPandža if somebody would put gun to your head, you would be very polite with him.
 
@DomagojPandža Political agendas. Security. Surveillance. Limitation of freedom. Military budgets. Etc.
@DomagojPandža Well, that's good to know, too :)
 
10:05 PM
@DomagojPandža When you get angry at your dad and punch him, what is the point of it?
 
@EvgenyPanasyuk His point is exactly that: this is so different
 
why is it so fucking hard to get a co op?
 
@LightnessRacesinOrbit You get angry at your dad and then proceed to punch him?
 
o.0
 
@DomagojPandža Some people do
Or perhaps your friend
 
user142019
10:06 PM
 
user142019
OmniGraffle FUCK YOU.
 
I like to talk people down.
 
@DomagojPandža You never feel violent?
 
Is it toma or tomo?
I kinda like Toma.
 
10:06 PM
@ThePhD you got it right
 
user142019
Tomatolak.
 
@ThePhD He's like a sword.
 
@LightnessRacesinOrbit You do?
 
@EtiennedeMartel He can stab me anytime he wants~~
 
@Zoidberg Tomaytolak, just to infuriate him.
 
10:07 PM
@sehe of course
 
@LightnessRacesinOrbit ...
 
user142019
Toyotalak.
 
@DomagojPandža if after attacking some small country, you would know that many buildings in your country would be bombed, then you would think twice - that is fear.
 
lak! schijt!
 
there are times I could bust a wall in. usually after talking with CatPlusPlus
 
10:07 PM
Potatolak.
 
@EvgenyPanasyuk Precisely. But I think you're explaining to the wrong person
 
user142019
@sehe nagellak
 
> Our thoughts and prayers are with all those impacted by today's tragedy in Boston.
 
@sehe sorry
 
10:08 PM
^ Posted on MLP's Facebook page.
 
@EtiennedeMartel: I'm sorry to tell you this, but the ponies from MLP are not real
 
@EvgenyPanasyuk Not really. From the US example, they just get very pissed off. And they tend to think less and stereotype more, turning everyone that's not them into a terrorist.
 
@911BUFF, 911bufftip@gmail.com
Breaking the news before the news! Operated with one goal, 'to prove that the city that never sleeps neither naps'.
5.3k tweets, 22k followers, following 0 users
^ presumably this is sick trolling?
 
@DomagojPandža Fear does make it easier to sell guns, though.
I mean, those gunmakers aren't going to get profitable by themselves.
(Before anyone asks: no, I'm not saying firearm manufacturers are behind what's happening)
 
@EtiennedeMartel I can hear sehe hitting backspace from here. :P
Also, friendship is magic and we should all have ponies that protect us.
 
10:13 PM
@DomagojPandža Fear is a weapon - it can be used by both: terrorists may try to use it to protect their countries, and "anti"-terrorists may try to use it to convince his people to conquer "dangerous" countries.
 
@DomagojPandža You know, I don't care much for the ponies. They could have used humanoid characters and the show would have had the same appeal for me.
 
hmmm would this collatz thing possibly stack overflow at one million inputs if it was implemented recursively?
 
@DomagojPandža Not really. I think Etienne has a splendid real life example of what happens in reality. (But yeah, the gun lobby will simply just spin news items to achieve the same effect - mainly because it's so much easier and plenty effective)
 
@EvgenyPanasyuk Or just to elect governments that get away with politics that aren't in the best interest of people/freedom, based on the 'enemy image'
 
10:15 PM
67
A: How much usage can a LEGO piece take before it loses its 'clutch power'?

pcantin37,112 times. Well I did it. I built a machine to test this. It took 10 days until the LEGO at the bottom couldn't stay on anymore. More details on my blog.

 
@sehe "Buy a gun and shoot explosives from a distance."
 
huh
 
I'm just a bit different and tend to believe that all people are not assholes waiting to stab you in the back and murder your family to make a sale. But that's just me.
 
@DomagojPandža: I found D3D10 deferred rendering examples I can take inspiration from (humus.name/index.php?page=3D&&start=8) Obviously they'll need rework (for one it seems neither handles transparency)
 
Question (language agnostic): is there a way to keep a variable in a recursive function, initialize it, but not have it reset every time?
 
10:17 PM
@Borgleader Usually, people just add a footnote saying "Deferred rendering doesn't support transparency." religiously and leave it at that. I'm sure half of them have no idea why that's the case in the first place. IMHO, a deferred renderer with no transparency handling is worthless. Unless you sell the game's universe as Opaque.
 
@LightnessRacesinOrbit "Lego Answers"? Really?
 
@sehe Yeah, saves a lot in marketing.
 
@DomagojPandža The author of these examples probably does, he has another demo about order independent transparency. I think I'll go for the transparency layers technique rather than mixing deferred and forward rendering. I'm hoping it'll scale better when the scene contains a bajillion light sources
I have this idea for a scene that I want to do (in many months), where I'll create a stack of spheres which will be dynamic physical actors as well as light sources, and theyll just move about everywhere. should make for a cool demo
 
I tried to learn OIT.
 
OIT?
 
10:24 PM
But I just couldn't wrap my head around it.
Order Independant Transparency.
It basically attaches like, linked lists to certain pixels for multiple color samples.
 
@EvgenyPanasyuk Really.
OMG MOAR FREEDOM
 
anyone see a problem with this in concept? It seems to work except for one number. The sequence should be [13, 40.0, 20.0, 10.0, 5.0, 8.0, 4.0, 2.0, 1.0], but the 40.0 is missing.
while(a!=1):
        if(a%2==1): a=a*3+1
        if(a%2==0): a=a/2
        count+=1
    return count
@ScottW I'm... I'm programming ._.
 
It's hard to know what is wrong when we dont know wtf you were trying to do in the first place
 
@Crowz you should have a else-clause, the 40 is being turned into 20 by if(a%2==0)
 
oooh I see
yep that worked
 
@Crowz now you owe me a million rep
 
@DomagojPandža I agree. I think the best response to terrorism is to pull together and embrace the "enemy". I also understand that this kind of response is impossible to achieve in society (as long as there is the lizard brain and power to be had)
 
@EvgenyPanasyuk that's just ugly
 
@refp define ugly
 
@EvgenyPanasyuk not pretty, or do you consider what you wrote to be a beautiful solution to the problem?
 
10:38 PM
Apparently, atheists are to blame for the Boston detonations.
 
@refp Which problem exactly? Printing/Processing Collatz sequence?
 
@DomagojPandža Maybe they're talking about muslims. Which raises a heap of other questions.
 
@EvgenyPanasyuk hover above the message I sent you and you will see what message it's a reply to, and you will figure out exactly what I think is ugly
 
@DomagojPandža only a few of those blame "the godless"... half of them just said it was a godless thing to do...
 
user142019
@DomagojPandža Unfriend on Facebook and IRL. Problem solved.
 
10:40 PM
@Zoidberg Not really :|
 
@refp what exactly you don't like? yield?
 
Likely. And it's not C++ pedantry
 
@JustinMeiners Read again. And again. And again. Then read your statement.
 
user142019
I'm a hardcore atheist.
 
You godless you!
 
10:41 PM
@DomagojPandža "if someone did this they are godless", "sensless act by godless coward
 
I'm agnostic (is that a word)?
 
user142019
Well, atheists lack gods, yes.
 
ok so only 2
 
user142019
I'm a materialist.
 
not half
 
10:42 PM
@JustinMeiners Godless coward. A man who doesn't believe in god. An atheist.
How are the two related? Not believing in god doesn't make you a bomber.
 
user142019
Most suicide bombings are by religious extremists. Just saying.
 
@DomagojPandža For some people, not believing in God means you have no morals.
 
@EvgenyPanasyuk I have nothing against the yield part, but there are a lot of uneccessary statements in there
 
@DomagojPandža They are saying its an un godlike thing to do
not
 
"only 2..... ♪♩
can make â™® me happy!
only 2... ♬
" etc.
 
10:43 PM
athesit = bomber
now the other 4
 
@JustinMeiners What's a "godlike thing to do"?
 
on that list
are
 
@DomagojPandža Do so!
 
totally calling out athesits
 
@refp ok, reduce it and show, I am not python expert - would be interesting to see
 
user142019
10:44 PM
@DomagojPandža praying to a god.
 
@EvgenyPanasyuk codepad.org/7tVOZa6G
stupid chat
 
user142019
Learn to indent, you noob. Control+K.
 
user142019
def foobar(n):
    while n != 1:
        yield n

    n = x * 3 + 1 if n & 1 == 1 else x / 2
 
user142019
It's not that hard.
 
@Zoidberg I pressed the "fixed font" fucktard button but as usual it dodn't wanna work
 
10:46 PM
@refp yeah, that is smaller, I forgot about "double"-sided if
 
@EvgenyPanasyuk the main problem with that code is that it leaves out the last 1, but that is easily changed by reversing the loop in another direction
 
user142019
Also, Python code is indented with four spaces and certain operators are surrounded by spaces.
 
user142019
As per PEP 8.
 
@Zoidberg I don't care, I don't write python
 
You don't wait until it want's to work. You just, make it obey.
Like a boss.
 
10:47 PM
ok does anybody else think that the indenation syntax thingy in python makes it difficult to copy and paste code saftely?
 
user142019
My ERD sucks donkey ballsack.
 
user142019
Do join tables belong in ERDs?
 
Exactly according to spec
 
@Zoidberg this was a matter of solving a problem with a more beautiful algorithm, not about writing "correct" python code.
 
@Zoidberg I think so. But I'm hardly the expert on ERD (and proud of it)
 
user142019
10:48 PM
I think ERDs are nice.
 
user142019
Unlike class diagram shiz.
 
ERD?
 
Entity Relation Diagram
 
@ThePhD letmegooglethat for you?
 
@refp what is problem with last 1?
 
10:49 PM
I've said it before and I'll say it again.. I don't like this fucking @Zoidberg
@EvgenyPanasyuk the code I wrote won't yield it
 
user142019
@ThePhD it's a diagram in which you lay out database tables and draw lines between them.
 
@EvgenyPanasyuk make it your task to cover that case, it's not hard and could be a good brain nut for you :)
 
@refp Keep on saying that. It'll make you more popular and this lounge so much more inhabitable. Why don't you just... go somewhere else if you're bored?
 
@refp yes, but : "The sequence should be [13, 40.0, 20.0, 10.0, 5.0, 8.0, 4.0, 2.0, 1.0]" chat.stackoverflow.com/transcript/message/8868143#8868143
 
user142019
Or plonk me! :D
 
10:50 PM
Plinkity Plinkity Plinkity Plonk!
 
@sehe I got nowhere else to go..
 
That's a lame excuse
 
(starts crying)
 
@EvgenyPanasyuk that's not the correct sequence
 
user142019
I think "Membership" is an overly ambiguous name for an entity lol.
 
10:52 PM
@refp of course when program is wrong - blame the user
 
@Zoidberg Depends. If it's a ship for your dick, it might be overly specific!
 
@sehe probably, but it's cool. I can't like everyone, and not everyone will or should like me
@EvgenyPanasyuk what are you implying?
 
@refp It's not cool if you keep repeating offenses. Just take it like a man.
 
user142019
@sehe a user is a member of one or more projects.
 
@sehe lol
 
10:53 PM
@refp I just mean, that 1 was in tail of request
 
@Zoidberg Sounds exciting
 
user142019
But I might have more memberships later.
 
@EvgenyPanasyuk I still don't get what you are saying
 
@refp never mind
 
Here's some coherent communication that you folks will be able to comprehend:
I'm going to bed. Cya tomorrow.
(Now, I'm going to confuse the hell out of all the regulars by actually going to bed for the first time ever)
 
10:55 PM
@EvgenyPanasyuk okay..
@sehe I'd rather take it like the complaining asshole I am, throwing segfaults at people hoping my UB will make it all go away.
@sehe you are not going to bed..
 
user142019
@sehe no, you are not.
 
user142019
Don't fall asleep now
that would be a waste of time
 
user142019
May 26 '12 at 0:14, by Ell
I don't have the determination or self discipline to write antthing
 
user142019
Me neither.
 

« first day (912 days earlier)      last day (4038 days later) »