« first day (623 days earlier)      last day (4551 days later) » 

17:00
@Fanael So you want to be able to also turn off optimizations done by the hardware?
user784668
To make it clear: I want the compiler to take the result of -O0 and insert completely superfluous computations into it.
@Fanael Not sure if you can find such a compiler.
user784668
@Insilico That's why I said "I wish compilers had options [to do that]".
A vendor is not going to say "OUR COMPILER IS CAPABLE OF INSERTING USELESS CODE INTO YOUR CODE TO MAKE IT SLOWER!".
user784668
@Insilico GNU could :P
Ell
Ell
17:02
back :D
@Ell Hello again.
Ell
Ell
I'm wondering how an opengl gui library would work
what would be drawn by ciaro onto a texture, and what would just be additional quads?
@Insilico Of course it can't. It's not useless if it makes it slower. It's useless if it makes no difference.
@Mysticial I guess making your program go slower is useful in some twisted way.
@Ell You should probably see if you want your library to work in immediate mode or retained mode (or some kind of hybrid)
Ell
Ell
as in immediate = redraw every frame,
retained = redraw when necessary?
17:06
Basically retained mode libraries have knowledge of what you're drawing.
immediate mode just shoves polygons through the graphics card
Ell
Ell
yeah me and deadmg were talking about this, I argued a hybrid and he argued retained
but I think he ended up switching to believe a hybrid is superior
I was thinking, immediate mode for when a control draws itsself, but retained mode for all of its child controls
@Ell I think pretty much all graphics libraries nowadays have some kind of hybrid style to it.
Ell
Ell
I would dislike having to keep a list of Rectangle, Line and Text elements to draw a text box, but it makes sense keeping a list of child controls
I best be learning opengl then :P
@Mysticial 2k upvotes? this is madness
user784668
@bamboon This is people not knowing about how CPUs work.
17:15
in a positive way of course
@Mysticial Ha, there's even one downvote.
@bamboon Not yet... But I think it'll probably get there come Tuesday when the newsletter gets out.
user784668
+1903/-1, lol
Now the question is... is it gonna beat Eric Lippert's hotel room answer.
@Mysticial and now you even have 3k at performance tag and still no gold badge^^
user784668
17:17
I could downvote it for that large image. But I won't.
user784668
Yes, I hate answers with large images that contribute little to the meaning.
> A controversial study has shown that training with a working memory task (the dual n-back task) improves performance on a very specific fluid intelligence test in healthy young adults.[54] The study's conclusion that improving or augmenting the brain's working memory ability increases fluid intelligence is backed by some[55] and questioned by others.[56] The study was replicated in 2010.[57]
^ AKA: How to say nothing.
user784668
@bamboon Too few answers for the badge.
@StackedCrooked Smooth.
Ell
Ell
can someone tell me why vc's default main is this:
// OpenGL.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

?
17:19
@Fanael I know but I just find it funny
@Ell _tmain is actually a macro, I think
It resolves to either the ANSI or Unicode version depending on if UNICODE is defined or not.
Because that's how they take Unicode command line args.
The _T variants are there for legacy purposes
All new applications should use Unicode.
Ell
Ell
whats wrong with just "int main() {...}"?
@Ell Nothing. Use that.
17:21
@Insilico I've been consistently using wchar_t for anything that touches the filesystem or that takes user input.
@Mysticial boost::filesystem?
Though whar_t is still kinda broken.
@Mysticial Well, wchar_t is a UTF-16 character on MSVC, right?
@EtiennedeMartel Well, it's supposed to be.
@EtiennedeMartel I think so.
17:22
A lot of applications treat wchar_t more like UCS-2, though, which is incorrect usage.
user784668
@EtiennedeMartel Yup, on all sane Windows compilers.
@EtiennedeMartel I haven't looked at that, but I was talking about creating and opening files with names that are user-inputted.
In my code, wchar_t is used but the fact is hidden from the programmer.
Of course, the Windows console is still shit since it can't print Unicode without setting the locale.
The interface works almost exclusively with Unicode code points
Whether the underlying system uses UTF-16 or UTF-8 is an implementation detail.
Ell
Ell
17:24
ahh I can't use visual c++ ide :S
I wonder how the endian plays with the different machines... lol
@Mysticial I think that's only an issue when reading/writing files.
@Insilico Does the endian of the bits in each byte vary?
Or is it standardized.
@Mysticial In UTF-16, if you use wchar_t then endianness isn't an issue.
If I'm reading a file in raw binary. The smallest addressable unit is a byte. So the endian shouldn't matter as long as the bits are in the same endian.
17:26
If you store UTF-16 as an array of bytes, yes, then it's an issue.
@Insilico ah
But you're not supposed to work with UTF-16 as an array of bytes anyway.
(except when reading/writing files, probably)
@Insilico I definitely don't...
For my code all string literals are in UTF-8
When passing them to the OS they are converted to UTF-16 on the fly
However, I will take a wchar_t* and pass it directly into an fwrite with the binary format code.
17:28
That way I don't have to type the stupid "L" prefix all over the place
And that will probably break the endian.
@Mysticial You can actually store UTF-16 in either endian
You just have to make sure you start the file with the proper byte order mark
Or make sure all applications reading/writing agree on the endianness.
Hmm... too bad I don't have access to a big-endian machine.
There's a few things I'd like to try out.
@Mysticial What you intend to try out with big endianness?
@Insilico I write a wchar_t text file in Ubuntu (UTF-32 I think). Using fwrite() with binary format. (not text)
pass it into a big-endian machine, and open it
17:31
@Mysticial I think the *nix machines use UTF-8 as well
And write raw integers into binary files via fwrite() and read it back in a different endian machine.
I definitely expect the latter to be different.
@Insilico On my Ubuntu machine, sizeof(wchar_t) = 4
@Mysticial Yes, but when you use the APIs that expect char* it's actually UTF-8
user784668
@Insilico They do. That's why they use const char* in APIs.
@Insilico Oh, I'm writing and reading with only my own code.
And I can open the text files in gpedit.
And it looks right.
I've been stress testing the UTF-8 decoder I have to see if it can handle all the weird edge cases
17:34
Right now in my pi-program, I use wchar_t for all filenames and such. But on the Linux versions, I have to downcast them back into regular char.
user784668
@Insilico Like U+1F4A9?
Not that I've actually tested if Unicode actually works on Linux. Since I only intended the program to support ASCII on Linux.
@Fanael Yes, that too.
Along with overlong sequences, surrogate pairs, missing continuation bytes, too many continuation bytes
byte order marks in text
Unicode Character 'PILE OF POO' (U+1F4A9)
nice
user784668
@Insilico How does it handle overlongs? Die die die or silently return the correct code point?
17:37
Where the committee members constipated when they added that?
@Fanael It returns 0xffffffff and the user code has to deal with it.
user784668
@Insilico So it's "die die die".
Returning the correct code point silently is actually a very bad idea from a security standpoint.
@Fanael Yeah, basically, but it keeps going.
user784668
@Mysticial Now you see, Unicode is a piece of shit :P
Ell
Ell
I still don't understand whats so difficult about unicode?
user784668
17:38
@Ell Everything.
Ell
Ell
each character is made up of x amount of bytes, right?
@Ell Unicode isn't that hard, actually. It's just that nobody understands how it works
user784668
@Ell First, what do you mean by "character"?
Unicode is not a fixed-width encoding in all forms.
UTF-8, UTF-16 are very much variable width encodings
Ell
Ell
okay, each character is made up of an array of glyphs..?
17:39
Even UTF-32 is not fixed width either, since multiple characters can form a single glyph
Unicode is a incredibly complex beast.
@Ell No, it's the other way around.
A glyph on the screen may be represented by more than one code point.
And each code point may be represented by more than one code unit, depending on the UTF format.
user784668
@Insilico Could you use the proper term "code point", please? "Character" is too often associated with "glyph".
@Fanael Oh okay, I thought you was talking about code unit.
Ell
Ell
I need a glossary of all the terms I think
17:42
A glyph is what you see on the screen.
I think of "character" as in RPG character.
A code point is any value between 0x00 and 0x10ffff, inclusive.
A glyph may be represented by more than one code point.
The Unicode transformation formats, UTF, is a way to store each code point in memory.
UTF-8 encodes all code points in 1 through 4 code units.
Each UTF-8 code unit is a byte.
UTF-16 encodes all code points in 1 through 2 code units.
Hiyo, could someone help me with a data structure question?
Each UTF-16 code unit is 2 bytes.
UTF-32 encodes all code points in 1 code unit.
user784668
@GregRos Sure, go ahead and ask.
17:43
Each UTF-32 code unit is 4 bytes.
goo.gl/cSd12 does this sort of binary tree implementation of a deque have a name, and does it have any glaring problems?
@GregRos It kind of reminds me of heaps.
@GregRos Assuming what you have works, you can just call it a "tree based deque".
Hmm, I guess I'm looking for any literature on the subject. I'm kind of messing about with embedding this sort of thing in a finger tree.
Although usually the fact that deques are implemented using <data structure> is not exposed in its interface.
Meaning if I replace an array-based deque with a list-based deque it should behave the same way (save for different complexities)
Yes, but underlying data structures do tend to have names beyond 'binary tree'.
Even though I guess this one doesn't have features so much as restrictions.
There really seems to be a vast amount of data structures that have little information about them, except in specialized areas
If I hadn't read that article by Eric Lippert, I would never have known the awesomeness that is finger trees.
17:53
3
Q: Automatically add chat event to the community bulletin (or make it easier)

AlenannoWhen creating some Chat event on my site, I usually go to the Chat Room's info and there I schedule my event. But, if I want the users to notice that, I also need to add it in the Community Bulletin. Manually. There are some differences in the two tools: The Schedule Chat Event has a Descrip...

@GregRos The specialized areas are were you'll find the more esoteric structures
You'd think that, but finger trees for example are crazy flexible and useful, and they barely have a paragraph on wikipedia.
But stuff like, I don't know, spatial partitioning binary trees have tons
'Finger tree' does sound a bit creepy though.
Looks like we have the first of the follow-up questions:
1
Q: Why can't (or doesn't) the compiler optimize a predictable addition loop into a multiplication?

jhabbottThis is a question that came to mind while reading the brilliant answer by Mysticial to this question. In his answer he explains that a the Intel Compiler (ICC) optimizes this: for (int i = 0; i < 100000; ++i) for (int c = 0; c < arraySize; ++c) if (data[c] >= 128) ...

Which I don't know the answer to...
They should be called 'cuddly-wuddly fwuffy-wuffy trees'
new CuddlyWuddlyFwuffyWuffyTree
user784668
@Mysticial This would be simple to optimize with deforestation if it were a map call. But it's C++, and it's a for loop.
18:02
First- so far only- resistance to German occupation of the Channel Islands: an Irish dock-worker has punched a German soldier in a bar.
Hmm, I am tempted to really define a data type called a CuddlyWuddlyFwuffyWuffyTree
folks
@GregRos typedef MyRealAndSeriousTree MyCuddlyWuddlyFwuffyWuffyTree;
@Cicada Hello.
hello.
18:06
Is the response time of a screen that important? Do we even perceive the difference between a 2ms one and a 5ms one?
@Cicada Last time I recall humans don't respond to anything in less than about 10 ms.
If you're referring to the numbers they print on the specification, they're rigged.
Response times are different depending on how you measure them.
480
Q: Transatlantic ping faster than sending a pixel to the screen?

Konrad RudolphJohn Carmack tweeted, I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that? And if this weren’t John Carmack, I’d file it under “the interwebs being silly”. But this is John Carmack. How can this be true? To avoid discussions about what exact...

B2W, G2G, etc, etc
user784668
@GregRos They're rigged to blow.
18:07
And they will usually choose the more favorable interpertation.
@Mysticial Yeah I saw that question :D
@Cicada So I think you're already at a minimum of 100ms?
Ah I missed a zero. The response time is on the order of about 100 ms for humans
But the thing is, even on monitors that are rated highly, you can see some ghosting if you really try.
In limited circumstances.
I've read a paper (on concurrent) that talked about the "THE protocol"
Yes, it's called "THE".
The worst protocol name I've heard
If not because it's impossible to search for.
18:12
My monitor is rated 8ms G2G, but I could still see some ghosting in dedicated tests.
(not that 8ms is very high)
So far my UTF-8 conversion routines seem to be working just fine
With both well-formed and malformed UTF-8 text
Oh, but the search is easy :)
> UTF8
> Working
Pick one
What's wrong with UTF8?
user784668
@GregRos Some people are too dumb to understand it.
18:18
@Cicada How so. It is working, ʎlqısuǝʇso ǝʇınb
@Fanael to dumb? birth of a new infinitive
user784668
@sehe Stop dumbing :P
@Fanael Stop editing
user784668
@sehe No.
Meh.
user784668
@sehe You just discovered message edit history? Great!
18:21
@Cicada Aarg, I can't decide!
It's driving me nuts.
@Cicada So my code is a logical paradox? :-P
user784668
@Insilico Your code is a spoon.
So plonked
user784668
@sehe Plink all the plonks!
18:36
Plonk it real hard.
@JerryCoffin why?
In other news:
in PHP, 6 hours ago, by NikiC
@Gordon If you want to learn new words, go into the C++ chatroom and listen to @sehe ^^
@StackedCrooked Yeah! Harder! Do it now!
Bwahaha
@sehe What were you doing in the PHP room, blasphemer? :P
@DomagojPandža I wasn't there. Did you read the message?
Oh, I just woke up, I'm a bit retarded for the first 5 minutes. :Đ
Good "morning" then
18:45
I'm retarded all day.
3
I hate that period when everything is so damn bright and blurry.
Morning?
And you walk like a penguin across the house because your body is also on a time lag retardation.
@GregRos Yup
And also because you are a penguin.
But that might be just me.
hi all
@sehe you did change your avatar?
nice pic
18:54
@user1131997 Same it's always been.
@EtiennedeMartel no, last time I asw him , he had another one
@EtiennedeMartel I c u play ICC?
@user1131997 You mean, a few months ago?
@EtiennedeMartel yeah
@user1131997 Erm, it's a compiler.
@EtiennedeMartel Internet Chess Club ( ICC ) chessclub.com
many programmers use it, cause of interface and commands to work with it
18:57
@user1131997 I was refering to Intel's compiler.
yoes
@EtiennedeMartel by the way... I didn't use Interl compiler, is it C++ or it does support pure C too?
@user1131997 Both C and C++.
Does anyone know if there's a particular reason that java's String.indexOf(int char) takes an integer for the character?!
@EtiennedeMartel the last standarts?
@melak47 to take value from table on which linked exact char as in other languages
19:00
@user1131997 Not fully C++11 compliant, but it at least supports variadic templates.
@EtiennedeMartel and what about pure C? ( C99 , C11 ) ?
@user1131997 No idea, and honestly I don't give a shit about C.
i dnt understand why did i learn trigo,calculus and all other interesting math concepts when i cant find their use in my day to day programming life
@fluty Are you doing 3D rendering work? Because it's hard to avoid using linear algebra and trigonometry there.
@EtiennedeMartel pity... I'm not using C++, cause want to learn all sturcutres in clear theory ( like RB-tree, B-Tree, Hastables and others and want to implement them in pure C for better understanding ), some of types I know of C++ that are used... Like <map> uses RB-tree, for soring - Quick Sort as far as I rememer for substring search Boyer–Moore–Horspool and so one
19:04
@EtiennedeMartel and if you do fancy effects like volume rendering, subsurface scattering, etc...then you get to use all the fancy math :p
@etienne , no I am not into that domain
@user1131997 You could also do it in C++.
@fluty Yeah, I figured.
You're also probably not in AI, because that uses a lot of probability theory, set theory and graph theory.
Actually, what's your day to day programming life?
@etienne, I am into php development ...i develop module for websites
@fluty Aaaaaah. Well, Web development does not use a lot of math.
19:08
@etienne,in which domain you are working ?
@EtiennedeMartel Some C++ as I remember by standart, when code goes after { } scopes erases memory , no?
or I'm confusing with smth?
@user1131997 C has the same concept of scope.
An object "dies" at the end of its scope.
@user1131997 Lifetime of object is defined by its surrounding scope.
i used to write code in c++ during my college days,and i am very much familiar with its beauty thats why i am thinking to start it again as a hobbyist programmer
It's just that C objects are PODs, so there aren't a lot of things to do at the end of a scope.
19:10
@EtiennedeMartel thank you
@StackedCrooked thank you too
Aww.
Scope-bound resource management is a cornerstone to good C++ style.
So understanding scope is pretty important.
Jan 25 at 18:32, by Etienne de Martel
@Olumide If you love C++, then you did not use it enough.
Guys, don't you know good program for sniffing some exextable?

I want to look, how does EXACT program exchange packets.

I know about netmon.exe ( from M$ ) and Wireshark, but the packets from there programs like a trash with not comfortant search...

Does some program exist, which I just tell it them process I want to snif, then it gives me packets , which sends/recvs only this exact program?

Thanks!
Kate Gregory mentioned something about C++ programmers saying they love C++ and that she never heard a programmer say this about another language.
@user1131997 your question is almost incomprehensible, but you should be able to do that with wireshark filters afaik.
Either the program uses a very specific L4 protocol that you can filter on or it uses regular tcp/udp with its own ports you can filter on.
19:21
Scumbag noob: Can't formulate a proper question, refers to Microsoft as M$.
8
heh, all the assignments this semester have been in C (C89 at that), and the final one is in java.
@melak47 I guess you didn't need to implement the assignment operators then.
@StackedCrooked final assignment is to implement a web service, guess they wanted to make it easy. Or more likely, they didn't want to write a huge framework for us to implement the stuff in :)
@StackedCrooked Then she never heard me talking about C#.
@EtiennedeMartel You know what to do then.
19:40
I started watching Panty & Stocking with Garterbelt. I can't say I really understand what the fuck's going on.
@EtiennedeMartel I don't get it either. Apparently it's really popular though.
@StackedCrooked Oh he's the guy who answered this
@Cicada He's a known help vampire.
@EtiennedeMartel That's the beauty of it.
It's a complete and utter mindfuck.
@StackedCrooked She never seen Haskell, then. Whoever says they love C++, they either are crazy or don't know C++.
Or haven't written anything in C++ yet.
Ell
Ell
19:45
@EtiennedeMartel I was going to start watching that
Oh what the fuck, there's a transformation sequence and everything.
I feel like I should be looking over my shoulder while watching this.
There's even a plot, although it starts in middle of first season or somewhere around that.
@CatPlusPlus the good kind of crazy?
@melak47 No.
19:48
Oh, why is it always a Desert Eagle?
These Japs have no imagination when it comes to guns.
It'd be Glock if it were made elsewhere.
@EtiennedeMartel They specialize in hair colors.
Glocks are so ugly
It's a gun.
It's still an ugly gun
19:51
isn't there like a fully automatic glock?
I think I heard about it somewhere.
A fully automatic pistol.
It doesn't include "looking pwetty" in intended functionality.
> implying looking pwetty is a functionality
@Mysticial The Glock 18 can fire fully automatic, yes.
@CatPlusPlus That makes me the bad kind of crazy.
Ell
Ell
I made a cake factory on minecraft!
19:54
Aren't we all.
@CatPlusPlus Especially you.
I'm not crazy, I'm eccentric.
@EtiennedeMartel kewl...
Crossbows are way more cool than guns, anyway.
Jun 26 at 2:44, by Etienne de Martel
@RMartinhoFernandes I prefer the term "eccentric".
19:57
@EtiennedeMartel :P
Ell
Ell
@CatPlusPlus my younger brother is intent on buying a crossbow because it is legal to own them :L
@EtiennedeMartel You should watch Lupin III then. It has all the nudity without the confusion.
Actually, not sure if Garterbelt had any visible nudity or if it was just suggested.
@StackedCrooked I should really finish up Bakemonogatari fist.
@EtiennedeMartel second season sucks though
@EtiennedeMartel That's a good one. However, it took two tries. The first time I stopped watching after 4 eps or so, started again a year later and loved it.

« first day (623 days earlier)      last day (4551 days later) »