« first day (867 days earlier)      last day (4306 days later) » 

19:00
Well yeah, you did use == true/== false, I can see that.
Xeo
Xeo
@LucDanton For a reason.
Brain damage?
Xeo
Xeo
lol
no
20
Q: Vote fisherman, or SO's most relentless editor

0x7fffffffI'd like to bring attention to a user who seems to be (kinda) cheating the voting system, and doing so below the radar. As implied in the title, I'm not 100% sure that he is playing the system because he may just be a total perfectionist, but, one way or another I ended up on this users highest v...

^^ It was bound to eventually happen.
incompetent people incompetently repwhoring?
19:04
yeah
rep whoring how?
He has 5k rep, he gets no rep from edits.
@Rapptz bumps
Oh right I forgot people browse "Active"
I just browse "New"
As well as the homepage.
That's where I camp.
yeah I definitely don't touch the front page
Xeo
Xeo
19:06
// I just dislike how the following might cause misunderstandings
// because '!' isn't very visible
static_assert(some_trait<A>(), "...");
static_assert(!some_trait<B>(), "...");
@LucDanton ^
The homepage is slower, but I see a greater variety of stuff.
@Xeo ! is superior to == false imo.
:)
@Rapptz Depends on which operators, if any, are overloaded ;P
Xeo
Xeo
@Rapptz For normal code, I totally agree, but when directly comparing two traits, which is clearer?
Ell
Ell
@Xeo I like == false too
19:07
@ShotgunNinja Never overloaded unary ! so I don't know.
Xeo
Xeo
@Ell Somehow, that has me worried.
@Rapptz I have, for an invertible Matrix class.
Why?
Xeo
Xeo
12
Q: why sizeof(13.33) is 8 bytes?

karthikWhen I give sizeof(a), where a=13.33, a float variable, the size is 4 bytes. But if i give sizeof(13.33) directly, the size is 8 bytes. I do not understand what is happening. Can someone help? Thanks.

Reminded me of ^
oh that
lol
Ell
Ell
19:08
@Xeo heh
$ grep "static_assert([^ ]" -RI include/ src/ unit/ | wc -l
0
$ grep "static_assert([ ]" -RI include/ src/ unit/ | wc -l
136
@Rapptz Because the ~ operator gave the transpose matrix, which is different from an inversion operation. Also, because that's the way our professor specified that we needed to write the Matrix class.
wut
Xeo
Xeo
@ShotgunNinja Oh gawd, abuse from hell.
user142019
Hi.
user142019
19:09
I'm back in the country of weed.
@Zoidberg Jamaica?
user142019
Netherlands!
@Zoidberg Bullshit.
Xeo
Xeo
@LucDanton I'm not overly familiar with regex, but I guess that tells me you always do static_assert( trait<T>(), "..."); with a space at the beginning?
19:11
I can't imagine the Netherlands have that prominent of a marijuana culture.
I'd assume it's fairly pronounced, but I'm also fairly certain there are other countries out there that have earned the title far more readily.
Xeo
Xeo
Well, just another style to go with.
time to see if I can locate some beer in this swamp
user142019
Eww beer.
user142019
Coca-Cola. (Y)
Puppy's becoming an alcoholic ever so slowly.
3
user142019
19:14
Home > anywhere else.
Ell
Ell
Hmm. Are iostreams really slow?
user142019
Slow as in developer time or slow as in runtime?
user142019
(Because they're certainly slow in the former.)
You can speed it up by disabling syncing.
Ell
Ell
@Zoidberg as in runtime
19:19
@Ell due to flexibility + syncing + locale support: the serialization is slow (to/from disk obviously not affected)
Ell
Ell
What is the syncing for?
std::cout << "HELLO";
printf(" WORLD"); //if they aren't synced, can't depend on the order.
Ell
Ell
Ohh right
They're pretty fast if you disable syncing apparently.
user142019
I/O stream library must do nothing but writing and reading bytes and that's it.
Ell
Ell
19:22
That's sort of my view
user142019
You do your (de)serialization yourself.
@Zoidberg That's just an IO call. IOstreams are formatting and buffering frontends to said calls.
if you don't want formatting, don't use formatted functions of iostreams.
user142019
Does C++ offer anything for I/O that doesn't do formatting and crap which isn't inherited from the C standard library?
Ell
Ell
I'm confused about buffering too - is that to reduce the number of system calls?
@Zoidberg unformatted functions in the iostreams.
@Ell yes
user142019
19:24
Then you still have the crappy API of I/O streams. :P
Ell
Ell
Why doesn't the OS buffer? or give the option?
std::cin.getc()
user142019
I always use ::open, ::close, ::read and ::write. :P
@Ell OS does buffer, on the OS side.
@Ell OS calls are not like normal function calls. There's a lot more overhead
High-performace I/O means OS-specific system calls, ie. not standardization-friendly.
Ell
Ell
19:26
Oh yeah nevermind, the OS buffering wouldn't reduce system calls
I mean, from the user side
@MartinJames getc, putc, read, write, printf,scanf can also do high performance IO.
@Ell OS can't do anything user-side, that's your side.
@Ell though you could have a library that does it for you. LIke.... iostreams.
Ell
Ell
Yeah, I know what I mean I just didn't explain it very well xD
user142019
I dislike streams doing formatting.
@Zoidberg that's all they do.
user142019
@MooingDuck except they also do I/O or writing to strings or whatever.
19:28
@Zoidberg if you want no formatting, use std::streambuff
@Zoidberg no, they're just a formatting frontend for std::streambuff.
user142019
std::vector<byte> buffer = serialize(my_object);
file.write(buffer);
user142019
^ superior interface.
@Zoidberg to an extent
Ell
Ell
Isn't there an unecessary copy there?
What about:
Do not printf etc. just end up in putchar() calls, byte-by-byte?
19:29
@Ell yes
user142019
@Ell uh no?
@Ell Move semantics, motherfucker.
@MartinJames No.
user142019
serialize returns by move and write takes by const ref.
Ell
Ell
serialize(my_object, my_out_stream)
user142019
Eww impure serialization function.
Ell
Ell
19:30
Yeah move semantics, but still doesn't seem right
user142019
Why not.
there's nothing wrong with that.
user142019
@Ell SRP
user142019
serialize must serialize, not write to anything.
user142019
Otherwise you want serialize_and_write.
Ell
Ell
19:31
Yours writes to a string
the only reason to pass a stream into serialize is if you can ellide the buffer in the first place.
Ell
Ell
this writes to a stream
well maybe not stream, a sink or whatevs they be called
which is not always possible.
 std::vector<byte> buffer = serialize(my_object);
mystreambuff.sputn(buffer.data(), buffer.size()); //we have this, though it's FAR from perfect
Anyone here use Perforce?
19:33
@DeadMG if it's not possible, then the object should serilize to a buffer then put that in the stream. Then at least the option of bypassing the buffer is available.
@Borgleader yes :(
Ell
Ell
@Zoidberg srp?
user142019
Do one thing and do it well.
@Zoidberg serializing to an byte-iterator would be acceptable though IMO.
user142019
Don't do multiple things at once.
user142019
@MooingDuck ahye
19:35
yeah, if you want raw IO, there's a thousand ways to do that, so nobody cares. Pick one or several and use them. What we really need is a better formatting frontend.
I would have thought that the formatter was the easiest thing to get right?
@MooingDuck If I want to add a file to the depot that is not in a subfolder of one of the mapped folders. Do I need admin rights to do that?
Meh, can't appear to write a Y-combinator with Boost.Phoenix. Won't try any harder than that.
@Borgleader you want to add a file to the depot that is not in a subfolder of a workspace? I don't think so, just make another workspace. Or add that folder to your workspace.
user142019
C++ y u no byte. :P
19:38
@MartinJames format ing is easy. But the interface for a formatt er object is hard. If state isn't sticky, you can't set state and pass to a function that doesn't care about state. If state is sticky, then users have to remember to remove state, or they ruin everything. What about user-added formatting states? How to make it easy for user-objects to interact with default-states?
@Zoidberg That's just char.
I don't know C and even I know that.
@Mysticial but char is also other stuff. printf("%c", mychar);
@MooingDuck Because right now I get this: c:\UDK\UDK-2012-10\UDKGame\Config\UDKATomInput.ini - file(s) not in client view.
posted on March 01, 2013

Last week I posed a problem: Suppose you have an inheritance hierarchy that lets you represent integers or floating-point numbers. How would you define comparison within your hierarchy? We can restate this problem in a language-independent way: How can we compare two numbers, either of which might be integer or floating-point?

user142019
@Mysticial no.
user142019
19:39
char is a "character" whatever that means. Also, its signedness is unclear.
The standard defines a char to take up the space as one byte.
But the standard doesn't define a byte to be 8 bits.
user142019
@Mysticial so?
@Mysticial and everything expects char to be a character, and interprets them as such, not as integers.
Ell
Ell
@Zoidberg it's signed isn't it? Like int, long, any other numeric type
@Ell sometimes, kinda
user142019
19:41
@Ell implementation-defined.
Ell
Ell
unless preceded by unsigned obviously
@MooingDuck "Everything" is a bit of a blanket statement. I use chars more as bytes than a characters.
Ell
Ell
oh XD
how about typedef uint8 byte?
unless you have non 8-bit bytes obvs
user142019
@Ell uint8_t is unsigned char on my machine. :L
Non-8-bit bytes would be suitable as a hell++ compiler.
19:42
@Ell unsigned char, signed char, and char are all unique types. And char behaves identically to one of the other two. That doesn't apply to int or long or whatever.
They really only exist for certain DSP systems.
I searched for "numpunct" in cppreference and it didn't show up
@Mysticial 65 bit bytes?
but I searched for numpunct on google and the cppreference page is there :|
what kind of shitty search does cppreference have
@MooingDuck That would be amazing.
:)
19:43
@MooingDuck Obviously, it has to be prime.
@Mysticial sizeof(long long)==1
31 bits, say, or 37.
@DeadMG 67, for long long.
user142019
40.5
@Zoidberg don't think that's conforming.
user142019
19:44
Me neither. :P
@MooingDuck Why would you want sizeof(long long) == 1?
oh wait, doesn't spec say that bits per byte has to be a power of two? Think it does.
user142019
No, it doesn't.
@MooingDuck No.
@DeadMG to screw up everyone who assumes that long long can hold myint * myint.
19:44
there are existing 9bit, 36bit, etc systems.
user142019
// TIL: this is UB:

\u12\
34
user142019
:P
@MooingDuck That's simply achieved by making char, short, int, long, and long long at least 64bits and all the same size.
no wait, I recall, the maximum value has to be 2^N-1 :/
@MooingDuck That kinda shit is common enough with pointers and ints.
19:45
@DeadMG and char is defined as 1...
@MooingDuck OIC.
user142019
sizeof(char) == 1 at all times no matter what.
@Zoidberg Except in C#, but this isn't the right room for that.
user142019
@ShotgunNinja C# is actually decent and has byte.
windows.h has byte too
user142019
19:47
Zoidlang has Byte and CodePoint. :P
@Zoidberg and C++ has wchar_t and uint8_t...
which is just a typedef but whatever
@ShotgunNinja uint8_t is a typedef.
@Rapptz merely a typedef, gets screwed up in overloading
@EtiennedeMartel Oh, I understand.
19:48
@EtiennedeMartel to what?
@Rapptz unsigned char
@Rapptz Usually unsigned char.
@Rapptz Depends on the target platform. Usually unsigned char.
What about uint16_t/uint32_t
@Rapptz unsigned short and unsigned int (if the platform is 8bit/etc/etc)
19:48
@Rapptz Usually unsigned short and unsigned int, respectively.
user142019
unsigned short and unsigned int.
and int_fast8_t?
@Rapptz unsigned your_momma.
I'm actually curious about that one rather than joking
because I still have no idea what that is
This is probably not a good time to mention Unicode, then..
19:50
@Rapptz char, usually, but with intrinsics or other compiler-specific tags to identify how it should be compiled.
8
Q: The difference of int8_t, int_least8_t and int_fast8_t?

NebulaFoxWhat is the difference between the int types int8_t, int_least8_t and int_fast8_t?

user142019
@Rapptz something like char I think. :P
@Rapptz I think that's usually char or int, not sure.
@EtiennedeMartel thanks I'll check that out
user142019
Or maybe __fast8 or whatever magical type your compiler provides.
19:50
In all likeliness, all the "fast" versions smaller than 32-bits are set at 32-bits.
x64 handles 32-bit integers at full speed.
But has some penalties for smaller sizes.
@EtiennedeMartel that literally did not help at all, thanks though.
@Rapptz > int_fast8_t can be anything. It's likely to be a typedef of int if the "native" size is considered to be "fast".
yeah not very useful
I saw it being upvoted twice though, that was interesting
Well, load and store operations are typically faster when dealing with stuff of a "native" size.
19:54
Has anybody used dropbox before?
@user2096518 yes
No user2096518, no one has ever used dropbox.
@user2096518 Why ask that in a C++ room?
user142019
@user2096518 yes, like everybody.
user142019
inb4 puppy bins everything.
19:56
I may have done, but the passage of time has made my recollection unsafe and should not be taken as accurate for any legal purpose.
There is the green checkmark sign and the blue sign. How do you get the sign to go from blue to green? I thought the manual implied to sitback and wait, but even this 14 KB file is not doing it.
yesterday, by R. Martinho Fernandes
@FredOverflow "I need you to make me a database with the numbers already in it", lol
@R.MartinhoFernandes Watching for the 10th time, and it's still funny :)
user142019
@user2096518 You wait until it's done uploading or downloading.
user142019
Dropbox is just a folder that syncs automatically whenever you change its contents.
awwww man, LoL Client for Mac is being released.
19:57
How long can it take for a 14 KB file? Isn't 14KB tiny ?
@user2096518 How much do you have in your dropbox?
I have a 14KB file and a 91300KB file.
@user2096518 Is that your only file in the dropbox?
user142019
@user2096518 if you right click the Dropbox icon in your task bar/menubar you can see what it's currently doing (with upload/download speed).
15 KB is HUGE. I can't even memorize that...
19:57
@user2096518 Well, maybe it's syncing the large file first?
OK. the 14KB one finally finished!!
How does it feel to have the shittiest upload speed known to man?
Must be on same ISP as I .
@Rapptz Just wait until he connects and can generate a usable response on his pre-56k modem.
Does the speed of the syncing depend on the internet connection?
3
20:00
@user2096518 Of course. But again, it was probably syncing the large file first. AFAIK, dropbox does not sync multiple files at once.
@FredOverflow It does actually
Oh, okay.
user142019
@user2096518 of course it does.
oh ok. i put the large file in first. then the second one out of curiosity. the second one (the small one) finished. the large one is still going.
@Zoidberg Does my financial wealth depend on my income?
user142019
20:01
@FredOverflow also on how much you spend.
I don't spend much. If I earn more, will I have more?
user142019
Yes.
user142019
Note that spending includes tax and shit.
@Zoidberg Thank you!
Ell
Ell
What would a medieval total war style terrain/view be called?
user142019
20:03
@Ell medieval total war style terrain/view.
Ell
Ell
I want to look up on youtube videos of that kind of terrain where it's zoomed out a lot
-.- helpful :P
user142019
Age of Empires terrain?
@Zoidberg I have right clicked but I don't see where that option is. Do you know where the viewing option is under?
user142019
It's not an option.
@user2096518 If nothing is syncing right now, you probably won't see anything.
20:05
@Ell Why does it have to be called anything?
the file should be syncing. it is still blue.
user142019
It's the menu item above "Get more space".
@user2096518 try F5
Ell
Ell
@DeadMG it doesn't have to be, I was just hoping it was so I could look at pictures/videos/stuff about it
20:06
hmmmm. it will not tell me the progress there. it has "Uploading 1 file . . .." in gray.
user142019
Oh. Hmm.
user142019
Maybe it's only the OS X version then. I don't know.
user142019
I rarely use Dropbox on Windows.
oh no . . i see now. it is in gray
Ell
Ell
@EtiennedeMartel It's okay I think I'm being too specific. I'm just interested in terrain in 3d
20:07
thanks!
bye! :)
@Ell Google "How can I get my girlfriend to tape her fingers together and pretend she's a dinosaur?"
6
@FredOverflow wut
wow...
user142019
> It's all in the timing. Wait until she needs a bandaid for a hangnail or something, and then come at her with rolls of tape. Then tell her that you'll stop loving her if she doesn't make raptor noises. Duh.
user142019
-1 not enough BDSM.
20:09
> How can I find Chuck Norris LOL
user142019
@FredOverflow You're in Austria?
@Zoidberg No, that's just the first picture I could find. I didn't make it myself.
user142019
ohlol
user142019
I want a bulletproof vest made of Nokias.
I want a Nokiaproof vest made of bullets.
user142019
20:13
Impossible.
user142019
Nothing is Nokiaproof.
user142019
They should make a Nokia 3310 out of graphene, and a diamond display.
@Zoidberg As anti-tank munitions?
user142019
lol
If you gave them a nice, leather case, you could sell them as sabot rounds.
HEAP - 'Highly Expensive Ancient Phone'
Why are we still here when the pubs are open?
user142019
20:27
Because we are programmers.
Ell
Ell
Because we are underage and have no ID
user142019
No ID?
Ell
Ell
Yeah
user142019
I had an ID card when I was 16.
Ell
Ell
ID to buy alcohol with
20:28
in The Bridge on The Stack Exchange Network Chat, 1 min ago, by LessPop_MoreFizz
SPACE MARK SPACE SPACE CAR. SPACE SPACE SPACE MARK SPACE RET. LINE SPACE MARK SPACE SPACE! SPACE FEED FIGS. MARK MARK SPACE MARK . MARK
user142019
You can buy alcohol at 16.
Ell
Ell
I have ID to prove I'm 17, but age is 18 over here
Not in UK
Will a GUID do?
user142019
HHAAhA pwnt
user142019
@MartinJames lulz
Ell
Ell
20:30
Have you guys seen loiter squad?
I misread that as 'lobster squid'
user142019
No, you?
Ell
Ell
Yeah, they are so funny xD
5 people just doing hilarious and stupid things
some stuff is in public to be awkward/creepy
some stuff is just darn right stupid, like slapping someone with a fish
Especially if it's a swordfish
Have you guys seen A Bit of Fry and Laurie?
20:32
some
OK, goodnight guys/gals/whatever. I'm outa here for beer.
Who here knows how to code an iterative inplace quicksort in C++?
wait, iterative rather than recursive?
@DeadMG iterative
user142019
20:36
> However, std::vector<T> may hold any number of items, only bounded by the available memory.
user142019
Bounded by max_size(). :P
@Zoidberg pft. I'm pretty sure max_size is a bigger limit than available memory by spec implication at least.
@MooingDuck Forwards to allocator.
that's what "available memory" implies- the memory made available by the allocator.
Anyway, I bet most people can code an iterative quicksort, but asking someone who's clearly a student to do so for a class is absurd.
@MooingDuck Why? It's absurd if (a) they hadn't received the training (b) they are not allowed to fail
user142019
20:41
32 mins ago, by Zoidberg
> It's all in the timing. Wait until she needs a bandaid for a hangnail or something, and then come at her with rolls of tape. Then tell her that you'll stop loving her if she doesn't make raptor noises. Duh.
@MooingDuck Iterative quicksort? Isn't that harder than recursive?
@Zoidberg Mine is much more bandwidth intensive!
WHAT'S WITH THAT DINOSAUR THING.
@sehe if he's having trouble with quicksort, he's probably learning recursion, and thus they probably can't work out how to do an iterative version.
@FredOverflow yes
quicksort takes log(N) space
user142019
20:41
@FredOverflow iteration doesn't even exist!
Well, you can just manage your own stack, but that would probably be slower than recursion.
user142019
Oh wait right: C++.
@MooingDuck Strong assumption. Also: "probably can't work out" would be the best motivation to require it as a task!
@sehe setting them up for failure?
@FredOverflow I don't think it would. I'll have to test it sometime.
Setting them up for learning?
What a dastardly deed!
20:42
@FredOverflow I wrote an iterative version without a stack once, but Robot called into question if it was even a quicksort anymore. O(1) space.
user142019
If it's quick and it sorts, it's quicksort!
@MooingDuck You managed to compress any number of elements into the space of one? Impressive.
This whole notion of being afraid to fail is ... wrong. This is (in part) why people don't actually learn the trade of programming in college: it's not allowed
@AndreiTita O(1) additional space over the input obviously :/
user142019
@sehe what is not allowed?
20:44
@Zoidberg failing to complete an assignment
To learn. Apparently, it is not okay to fail
user142019
It is allowed.
Yeah, it's just not encouraged. Not in public!
@AndreiTita en.wikipedia.org/wiki/In-place_algorithm "Quicksort operates in-place on the data to be sorted as it only ever swaps two elements. However, most implementations require O(log n) space to keep track of the recursive function calls as part of the divide and conquer strategy; so Quicksort is not an in-place algorithm."
user142019
@sehe But even if I do it in private, I'll be embarrassed by my friends! :'(
20:45
(I'm charging a little, but this really irks me. To learn you have to be free to fail. And be encouraged to enlist the help of people who can point you in the right direction)
@Zoidberg That's ok! They're in the same spot
8
A: Is imperative Quicksort in situ or not?

Jason is Quicksort actually not an in situ algorithm? The standard implementation of it is not in situ. It's a horribly common misconception, but you as correctly note due to stack space consumption, that conception is wrong. I say "standard implementation" of it because people have modified the...

user142019
@sehe unless the friendship is immutual. :L
@FredOverflow of course, I invent a new algorithm, and someone got there first :(
2
@Zoidberg In that case, it's irr-ell-ephant. :L
user142019
Stop talking like @Ell. :L
user142019
20:47
@sehe Dat pun.
user142019
It's like, a pun in a pun.
user142019
Nested pun.
user142019
pun {
    pun {

    }
}
pun(pun())
user142019
Zoidlang will have pun expressions that make the compiler emit puns.
user142019
20:48
pun expression end.
puntastic idea!
Oh god. The sanity hasn't yet been restored. Quick, the potion!
@FredOverflow Frick, and their implementation is almost identical to mine, except they thought of an optimization to do N/2 fewer swaps than I did :(
user142019
Now is your time to die
We've gathered here to say goodbye
No more you'll cry
No reason left for you to fight
Feel pain no more
Emotions never felt before
Where do we go, we go she'll never know
@sehe That'll teach you to be punny.
20:50
@MooingDuck Well, they had probably more eyeballs looking at the code than you ;-)
@FredOverflow and I was so proud of myself :(
@Zoidberg What is that gay text?
user142019
@sehe Oh potion, I read that as "poison".
user142019
@FredOverflow lyrics of The Poison ^.
@FredOverflow no wait, it's the same number of swaps. I feel better.
alright, I'mma go get lunch
user142019
@TonyTheLion Transporting level: Asian.
@Zoidberg pun pun pun pun pun pun pun pun pun pun pun?
user142019
fn foo() ->
pun end.
user142019
main.zl:2:1: pun: pun not indented.
20:58
@TonyTheLion Wow
Quite a skill huh
user142019
@TonyTheLion Mind = squarely shaped now.
interesting read on rust in the D forums:

http://forum.dlang.org/thread/[email protected]

« first day (867 days earlier)      last day (4306 days later) »