« first day (678 days earlier)      last day (4284 days later) » 

9:00 PM
@Mysticial what's that number stand for?
 
The "hotness" of a question.
 
how do you get it?
(formula)
 
@LuchianGrigore roughly speaking it's this: meta.stackoverflow.com/questions/11602/…
 
ah cool, thx
 
But it's been modified since then.
 
9:02 PM
Just wanted to know the high-level stuff
 
And furthermore, there's also an undocumented per-site bias. The bigger the site, the more votes it needs to reach the same hotness.
 
not the exact thing
@Mysticial guess that explains why not all hot questions are from SO...
 
There's only been one time where I've seen an SO question go over 300 hotness.
But on other sites, 300 isn't too uncommon.
 
that's not a very good formula then...
 
@LuchianGrigore It's got other bigger problems with it.
Konrad's question answered John Carmack peaked at about 660+. That's the highest I've seen.
I wasn't here when the security auditor question was asked, but I assume that probably went even higher.
 
9:07 PM
let me just find that... :)
 
@Mysticial what question?
 
494
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...

I remember the Linux server crash question made 300+. That was on ServerFault.
 
I should check the multicollider more often...
 
Xeo
@LuchianGrigore There are some interesting questions there at times
 
@LuchianGrigore If you're wondering how random questions can get 100+ votes without being linked, it's always the multicollider.
*100+ votes in a short amount of time that is.
@Xeo A lot of the gaming ones can be quite hilarious...
 
I'm not sure how many of the ones on this list made the multicollider - since I wasn't here at the time:
11
Q: SE question URL to title converter stops after 10

Nick TTypically if a bare URL for a SE question is pasted into a post, it will automatically use the title of said post and hide the URL, e.g. http://meta.stackoverflow.com/questions/9134/jon-skeet-facts => Jon Skeet Facts? But after 10 in a list this seems to stop working. My wife is stuck in a w...

 
@Mysticial i don't buy it. a ping is substantially slower
if i move the mouse, the pointer moves immediately on screen
 
@JohannesSchaub-litb I don't think your response time is faster than 50ms? Or whatever Carmack says was the duration for a transatlantic ping.
I know mine is at least a quarter of a second.
 
@JohannesSchaub-litb For most people, anything less than around 100ms looks/seems instantaneous.
 
9:26 PM
that feel
 
@JohannesSchaub-litb I should probably add that our hearing is much more sensitive in that direction. For most people, there's about a 20ms window, that if two similar sounds arrive in that window, we hear them as a single sound. With only about 20ms separation, we start to hear the second as an echo.
 
gn guise
 
posted on August 24, 2012 by vcblog

Hi, I’m Andy Rich, a tester on the C++ frontend compiler and one of the primary testers of the C++/CX language extensions.  If you’re like me, making use of a technology without understanding how it works can be confusing and frustrating.  This blog post will help explain how XAML and C++ work together in the build system to make a Windows Store application that still resp

 
@LuchianGrigore G'night.
 
can I safely cast a 2D array to a 1D array?
like if I have
int array[2][2];
int* ptr = (int*)array;
 
9:42 PM
@lezebulon The cast is safe. Trying to index into an MxN array as a 1D array of M*N elements is officially UB (if memory serves), though I don't think anybody's ever come up with a way it would (even theoretically) fail, unless you went to something truly unusual in the implementation.
 
@lezebulon yes, and very normal
@JerryCoffin wait, really? I thought it was guaranteed
 
Xeo
@MooingDuck remember, only char* is allowed to alias
 
@lezebulon anyway, in C++ you don't need to, unless interfacing with non C++ code.
 
Xeo
And it's basically the same as iterating like array[0]['[0,4)'], aka over the inner bounds
 
@JerryCoffin ohh
 
9:45 PM
@Xeo and unsigned char*
 
Xeo
@JerryCoffin Even while doing something truly unusual, I don't think you could fail, since arrays are guaranteed to be conitguous, even multi-dimensional ones. Well, you could have runtime-checked-pointers I guess but....
 
@MooingDuck Well, the really unusual (at least for anything like C++) implementation that would make it fail would be one that used type tagging, so it could check the defined type at run-time (including array bounds) even if the data were being accessed via a pointer to some other type. I don't know of C++ ever having been done that way, but type tagging for things like Lisp and Smalltalk is fairly common.
 
Xeo
@MooingDuck And signed char, then?
 
@Xeo I'm pretty sure it's just those two actually
§ 3.8/6 "the glvalue is used as the operand of a static_cast (5.2.9) except when the conversion is ultimately to cv char& or cv unsigned char&,..."
§ 3.8/9/2 "For any object (other than a base-class subobject) of trivially copyable type T, whether or not the object holds a valid value of type T, the underlying bytes (1.7) making up the object can be copied into an array of char or unsigned char."
§ 3.10/10 "If a program attempts to access the stored value of an object through a glvalue of other than one of the following types the behavior is undefined: a char or unsigned char type"
 
Xeo
ok, I see
 
9:50 PM
I think the intent is to use unsigned char, but they added char for historical reasons.
There's other bits in the standard, but I figured three quotes was plenty
 
Xeo
strange that they don't allow signed char, since char might be either
 
char might not be signed char
 
I think there's probablems asserting that a signed variable can hold all bit representations of everything, so the wanted to require unsigned, but they couldn't quite do that because of existing code, which merely treats char as if it were unsigned in those cases.
but yes, wierd.
now I must figure out where I left my waterbottle.
 
Why would someone use Digital Mars as a C++ compiler ?
 
@kbok they also do D in their free time
 
9:53 PM
@MooingDuck I mean, what kind of things does it better than, say, MSVC or GCC ?
 
@kbok it also compiles D
 
@JerryCoffin I get annoyed/disoriented when I configure my PC such that my MIDI-connected keyboard plays with a latency of >4ms
 
en.wikipedia.org/wiki/Digital_Mars "The company has gained notice in the software development community for the programming language D which they developed in-house."
 
@kbok nothing, the way I found out recently
 
I see, but that doesn't really answer the question does it ?
@sehe Ah, right :p
 
9:56 PM
@kbok In the MS-DOS days it was good at producing quite small executables. Other than that, it's just another extremely out of date C++ compiler. Of these ancient artifacts, Watcom is about the only one with much excuse for continued use (had the best code generation of most DOS compilers).
 
3
A: reason why custom loop is faster? bad compiler? unsafe custom code? luck?(lucky cache hits)

seheIt's likely due the fact that the compiler fails to make it register-operands, working on indirect (address) operands instead. Switch compilers <-- this is your best optimization. Update I have gone through the trouble of translating the the same program gcc intel inline assembly: test.c. It...

@kbok ^ my latest encounter with DM C++
 
Oh, it's this guy
 
Anyway I can do this properly?
static_assert( TILES_PER_MAP <= std::numeric_limits<char>::max(), "encode in a larger type");
no function call alloed
 
@JerryCoffin Do people still use DOS compilers nowadays ?
 
Xeo
numeric_limits functions aren't constexpr, and the condition needs to be a constant expression
 
9:59 PM
@kbok I'm posting from DOS
 
@Xeo really?
i thought they have been constexpred
 
@lezebulon lolwot
 
Xeo
In a post C++11 DR, IIRC
 
ohh
what a pity
 
Not funny.
 
Xeo
10:00 PM
Together with some char_traits functions
 
@kbok Darned few, obviously. But if (for example) you want hard real-time response (and don't want to pay too much for it) DOS is hard to beat.
 
real time linux
 
so I have to use UCHAR_MAX since I don't have C++11?
 
@JerryCoffin That's true, but who needs realtime components that are so much exposed to failure ?
 
no, use (unsigned char)-1
because 1) no need for headers 2) no magic constants
 
10:01 PM
(unsigned char)~int() is better
 
@kbok no it's worse
 
@JohannesSchaub-litb Depends -- can also be a viable option, but even the smallest Linux kernels I've seen are several times larger than DOS. For small systems, a smaller ROM (and RAM) footprint can be a big deal.
 
It's better.
 
it 1) depends on the sign representation 2) on two's complement, it depends on that INT_MAX is a multiple of UCHAR_MAX
@kbok no
you are definitely wrong
i'm going to pull out my answer again
55
Q: Is it safe to use -1 to set all bits to true?

hyperlogicI've seen this pattern used a lot in C & C++. unsigned int flags = -1; // all bits are true Is this a good portable way to accomplish this? Or is using 0xffffffff or ~0 better?

 
I'm kidding.
 
Xeo
10:03 PM
@Johannes hmmm, can't seem to find the DR
 
@JohannesSchaub-litb And Another:
16
A: How portable is casting -1 to an unsigned type?

Jerry CoffinThe requirements on unsigned arithmetic guarantee that casting -1 to an unsigned type will produce the largest number possible for the target type. C99, §6.2.5/9: "...a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than t...

 
Does Microsoft plan on continuing to support Win32?
 
It's a joke because it looks like a destructor.
 
Xeo
was sure I saw it somewhere, though
 
what's a DR
 
10:05 PM
@IDWMaster they have to, otherwise random programs would stop working
 
Xeo
Ohh, just had a look at the post-standard draft and it seems they're indeed constexpr. In any case, MSVC doesn't support constexpr, so there's no was their stdlib could use it
 
@MooingDuck They could just remove it from their compiler tools
 
@JerryCoffin turns out i've already upped it
 
And mark it "deprecated"
 
Xeo
@lezebulon defect report
 
10:06 PM
thx
 
after issue reports have been resolved, they become defect reports
 
@IDWMaster that makes existing code no longer compile.
 
@kbok Hmm...years ago (early '90s) I wrote a controller for a small sewage plant that ran on DOS. In about 20 years, its only down-time has been when there was a flood that destroyed most of the equipment it controlled.
 
@MooingDuck Yeah, but do they care?
 
@IDWMaster yes, they work really hard to make old code still compile
 
10:07 PM
Or do they want everyone to go "metro"?
 
@IDWMaster both, you have to pay extra money to still compile older code :D
@JohannesSchaub-litb where does one file issue reports?
 
@MooingDuck OK. So if I purchase a "ultimate" version of Visual Studio 2012 I should be able to develop Win32 apps with that; correct?
 
@IDWMaster right
 
I would be willing to pay additional money for this feature
 
@JerryCoffin I'd be very proud of such a thing
 
10:09 PM
@IDWMaster it's expensive
 
@MooingDuck How much?
I've paid over $2100 USD for Visual Studio in the past.
More than that?
 
I think Ultimate is over $10k
 
@IDWMaster I think it's less, I'm trying to find it
 
@JerryCoffin I wish I could download your knowledge and experience into my brains.
 
@kbok Hard to get too excited -- when all is said and done, it's still a sewage plant. Nothing terribly complex in it either, to be honest. Writing it was definitely a bit different -- doesn't use the heap anywhere, and I hand-counted the deepest the stack could get to ensure there could never be an overflow.
 
10:12 PM
http://wiki.answers.com/Q/How_much_does_Microsoft_visual_studio_Ultimate_cost
Ultimate is $11,899
 
@StackedCrooked Hmmm...how many brains to you have?
 
Note the last digits to give the impression to the reader that it's $11,800
 
I have many neurons that could be reassigned to something more useful.
 
user1182183
@sehe Well if your GF has those pills which let her body think she is already pregnant so she doesn't get pregnant then is't OK, if you use it like prescribed then there shouldn't be any worries :p
 
1
Q: What does this "<>" mean inside a template class function?

Negative ZeroThere is a code like this. template <DeviceTypes T> std::ostream& operator<< (std::ostream& output, const DeviceType<T>& dev); template <DeviceTypes T> class DeviceType { friend std::ostream & operator<< <>(std::ostream & output, cons...

 
10:14 PM
I have a function that takes about 15 bytes of variables, that calls a short(*)() function that takes ~100 bytes of variables, and I see that they are 482 bytes of stack space seperate. (As measured by addresses of local variables) Any ideas what's taking all that mystery space?
 
@GamErix mmmm. I'm not sure whether you are aware of how ignorant that comes across. I'm going to assume you are not (ignorant), but just fail to see how generally applying that 'recommendation' could lead to trouble for many people. Other than you, hopefully
 
I guess I'll just set this for 10MB, and pray :/
 
user1182183
@sehe Why do you guys always brainfuck me after I get a nice colde beer ~.~
 
user1182183
Say it in easy language? xD
 
@GamErix Because you keep coming back for more :)
 
10:17 PM
@StackedCrooked Me too -- lots of thoroughly out of date crap lying around. But if you ever need to know what to print to a terminal to log a user off of a Control Data mainframe, I'm your man! :-)
 
user1182183
Well drinking beer after 10 p.m. and chatting here is more like, well, one thing in my life xD
 
@GamErix Translated: Okay, maybe you're not just dumb, but at least you give bad advice in general. Be careful of others too
 
user1182183
@sehe Well what I do people , ofcourse, should only do if they have a steady relation and are sure everything will be ok etc, before that just use condoms, and for a great feeling get some durex feather condoms lol.
 
>that feel when no gf
 
10:18 PM
You, sir, should be hired to do marketing
 
user1182183
anyway natural are quite good but it does make much difference when not using it
 
@lezebulon There are dolls for that
 
i'm not that desperate
 
user1182183
@lezebulon and you can make your own fake vagina
 
10:19 PM
Also:
 
user1182183
Ah radek ; D
 
hey you should scream
 
2 hours ago, by Cat Plus Plus
This isn't 4chan, thanks.
 
user1182183
Did I break the rules? : (
 
user1182183
I'm really sorry for that, my bad
 
10:19 PM
The rules don’t rule.
 
There.. really isn't a rule for it
 
Also, follow the reply links
 
user1182183
Ah yeah i see now : x
 
user1182183
@lezebulon well getting a GF can be hard but well, if you have some luck you will get it, then - pray to whatever you believe in - it's a GF that will love you too.
 
@JerryCoffin What is great it that you made it, from scratch, and it worked well and for a long time. Many programmer's jobs nowadays consists of building a submodule of a submodule which must respect some specs in a Word document written by someone they don't know. It just feels like a drop in the sea.
 
10:21 PM
@GamErix You shouldn't chat with that much beer.
 
user1182183
@sehe it's only 500 ml of 5.7% vol
 
Also as a maintenance programmer I have to submit microscopic patches in a code that is a huge pile of crap written by a bunch of people in 20+ years. I can't do any design decision because those are too small changes, so my contributions will be forgotten shorty after I'm gone.
 
user1182183
"Lech Premium Beer"
 
This is depressing.
 
@kbok Well, there is that -- and yes, I did build it pretty much single-handedly, from the ground up.
 
10:23 PM
@GamErix Who'd have thought.
> "it's a GF that will do X" - wow. Just wow. What is your native language?
 
user1182183
@sehe I'm a Polish guy who lives in the Nethherlands, did live in Germany for a year though.
 
@kbok I know that feel
 
@GamErix O ja, nou herinner ik het me vagelijk. Toll. Bier macht Spass. Cheers
 
found my waterbottle on the office microwave. I wonder what I was doing when I left it there?
 
user1182183
Bier is fun ja ;x
 
10:25 PM
@lezebulon Oh you're in Paris too. Need a GF ? Go to the Charly Birdy aux champs. Tons of hot chicks :)
 
user1182183
Ale itak wole rozmawiac po Polsku xD
 
@kbok Well, they almost forgot who wrote this. In 1999 they had to find me to verify it was Y2K compliant. I'd moved a couple of times since, so it apparently took them a solid month or so to track me down.
 
@MooingDuck Hah. I found my 2l milk bottle in the office fridge. A week after I bought it. We have to drink a lot of milk tomorrow :)
 
@JerryCoffin That sounds like a TDWTF story :) So was it compliant ?
 
We're using air conditioner as a fridge.
 
user1182183
10:27 PM
@CatPlusPlus I can actually rebuild a fridge to a air conditioner : p
 
Milk can survive weekend on that. Empirically proven.
 
@GamErix Niestety, nie będzie w stanie dopasować swoje preferencje. Jeśli nie masz nic przeciwko, będę trzymać się języka angielskiego (na czacie) lub holenderskim.
 
Neither of you is very good at this.
 
user1182183
@sehe Dutch is good enough :]
 
Phew. Such a relief
 
user1182183
10:28 PM
Being multi-laguguageal <lol> helps in many cases, or well, like we know the world - can be your enemy
 
multi-lingual. <-- see, too much beer
 
user1182183
If my parents get a letter they don't understand, who is going to translate it? me ofcourse ~.~
 
user1182183
@sehe Beer is fun xD
 
@kbok Yes and no. None of my code had a problem (never paid attention to absolute dates/times at all) but neither the machine it was running on, nor the version of DOS was. Transplanted it onto newer hardware with a newer version of DOS, ran the tests, and AFAIK it's been running since (other than when the plant as a whole was shut down).
 
@GamErix can't be as timeconsuming as fixing their PC issues. Also: gives you more power
 
user1182183
10:30 PM
@sehe I'm actually promoting my PC services for a cheap price, just, I'll be lucky if the law enforcements don't find out lol
 
Speak more about it online.
 
@GamErix Good plan. Almost as safe as the sex advice
 
user1182183
like they going to find me by public chat lol
 
Certainly faster than in private chat
 
user1182183
@sehe I don't think I would do it with a random person ort prson I don't know really long,
 
user1182183
10:31 PM
and if I don't love the girl then sorry but I won't fuck her
 
so much C++
 
I would definitely do it. Come on, do you really think the police is going to knock at your door because you asked someone $50 to repair his computer ?
 
user1182183
if she wants it at such a moment she has a problem
 
@GamErix Y U SO MEAN :)
 
@kbok One more little tidbit: the machine it's running on now is probably the most under-utilized you can imagine. IIRC, it was originally written for a 33 MHz 386 (whcih was already overkill for its purposes). When they upgraded the machine for Y2K compliance, then ended up with a Pentium III, if I recall correctly.
 
10:32 PM
._.
 
@lezebulon Sorry. Scroll up. You came in and things derailed :)
 
user1182183
@sehe well good people still exist.. and I try my best to be one of the good people.
 
That's what she said.
 
user1182183
Not hurting nybody, helping as much as possible etc..
 
@JerryCoffin Heh. Classic.
 
user1182183
10:37 PM
and the chat died... [*]
 
Once I wrote a class that returns values from a stream reading an arbitrary number of bits each time. That was hard. unsigned value = stream.read(3); //read next 3 bits
 
I should do something. I'm just staring blankly at my screen.
 
user1182183
Well, if you have 3 bits you can enable just 3 values, the ones you choose, did the other values depend on the previous values?
 
@MooingDuck show the code :)
@kbok sleep
 
user1182183
1 2 4, why should it be hard to read that? xD
 
10:40 PM
@sehe It's too early.
 
@kbok prove it
 
Imma learn a programming language.
 
@kbok yay
 
Haskell.
 
Php
Assembly
 
Ell
10:41 PM
@kbok learn ruby!
 
GWBASIC
Prolog
 
user1182183
assembly.
 
@kbok It's Friday night. Good time to get away from the computer and participate in real life.
 
Haskell I'm learning. I spent a great amount of time on Haskell in the past two weeks so I'm giving it a little break.
 
@sehe Bite your tongue.
 
user1182183
10:42 PM
@JerryCoffin My payday was today, too bad I didn't know that I have the cash
 
PHP i know too much already. I don't want to write one more line of PHP. Ever.
 
@JerryCoffin "participate" to my ears, makes it sound as if "life" unfolds outside us by default (I mean, you just have to do something to participate)
 
GW-BASIC was my first language :) memories.
 
Ell
how about sadscript
 
@kbok Mine too
 
Ell
10:43 PM
a botched variant of fb 6 IIRC
 
@Ell malbolge
 
Ell
*vb6
sadscript is unfortunately not esoteric
 
@sehe it's older code, I have to find it. I wonder how well it works now. I see that it only reads from cin, that's definitely a point against it. ideone.com/7PPXq It also appears to crash on ideone
 
@MooingDuck because there is no input + no error handling. Acceptable
 
@GamErix the hard part is reading the next three bits, and hten remembering which bits were read, so when they read the next five bits you give them the rest of that first byte.
@sehe oh, right, duh
 
10:45 PM
@JerryCoffin Yeah, I should have gone out. I'm doing nothing productive tonight.
 
if you guys are interested in the apple/samsung patent war, here is the live verdict: live.theverge.com/apple-samsung-verdict-live
(hint: apple wins.)
 
Ell
spoiler alert!
 
nerd alert!
 
@sehe fixed
 
@MooingDuck test asserts pan out ok on my box after g++ test.cpp && ./a.out
 
10:46 PM
@sehe definitely needs a total rewrite though :D
throw std::runtime_error(""); HAHAHA wow I fail
 
@MooingDuck hmm. not if it works :) There are even tests.
 
@sehe well, it only handles unsigned long long, and only from std::cin. Also the exception has no description or useful type.
 
@MooingDuck Not relevant. However, it seems as though you've mixed signed/unsigned chars. This could turn out deadly. I haven't checked it but - first glance
 
Maybe not a total rewrite, but...
@sehe I keep track of the valid bits, a signed char shouldn't mess with things.
 
@MooingDuck I'd switch to using a basic_streambuf<Ch, Traits> instead of istream
 
10:50 PM
does 1 MB of memory create a stack overflow ?
 
@MooingDuck oh, they're just counts. I thought perhaps they 'held' the bit masks
 
@sehe I haven't dealt in that black magic
@lezebulon with my program it does, with most programs it doesn't
 
@lezebulon ? Depends on stack size. And where you do the allocations....
 
@sehe buffer does hold the data, but I only read the bottommost held_bits bits.
 
@sehe I allocate on the stack ofc, but 1MB limit seems low
 
10:51 PM
I was also amused at the idea of a 1 byte buffer
@lezebulon don't allocate on the stack, and it's quite high indeed.
 
I'm pretty sure friend is unrelated here. Actually, I can't replicate the problem without friend, so maybe it is. I'm glad I didn't downvote. — Mooing Duck 19 mins ago
 
@lezebulon where? platform, arch, compiler flags?
 
This is kinda why I don't answer a lot. I tend to get downvoted :(
 
@sehe I can't tell you much more I was doing some test on array on my laptop
 
Ell
I always use the stack where I can
 
10:53 PM
@Ell I use stack for variables, but no arrays.
 
@lezebulon Is it secret?
 
@sehe lol no it's just that I don't even know what arch and compiler flags are
 
greetings! How is everybody?
 
Ell
vector does free store doesn't it?
 
@MooingDuck Oh I have no fixed rule, stack can be ultimately appropriate. It will be very very quick, for shortlived buffers in functions with low 'fanout' (e.g. at the bottom of the stack depth)
 
10:54 PM
@Ell yup
 
@lezebulon architecture and command line for compilation
 
ok thanks
 
@Ell You knew the answer when you asked, didn't you?
 
but yeah it's definitely a stack overflow
I wonder if it's legit to have a object of 1MB because it stores a huge array
 
That's good. Glad to hear it.
 
10:55 PM
@Ell I want a free store. I'd do all my shopping there
 
Ell
@stackedcrooked yep :L
 
@lezebulon Certainly is. I've tweaked stack sizes to smaller on heavily (heavily) threaded applications
Remember, each thread gets a stack, so allocating more than say, 8k per stack might prove costly
 
@Ell Maybe. It allocates memory via whatever Allocator object it's told to use. By default that'll use the free-store, but you're free to supply an allocator that'll get memory from elsewhere.
 
@sehe using pthreads? Or some windows threads?
 
Ell
how do you modify stack space? platform defined?
 
10:57 PM
@Ell Indeed.
 
@Ell Yes -- typically a linker flag.
 
@JerryCoffin Besides the free store and stack, are there any other viable options? (And stack isn't really viable for vector.)
 
I believe it was some kind of attribute in pthread
 
@sehe Yes, you make an API call to pthreads to change the size of the stack, which is an attribute you set for the thread.
 
@StackedCrooked Depends on how you define viable. You could allocate a big array statically, and grab memory from there, or you could bypass the free store and grab memory directly from the OS (probably with a separate heap manager of your own to minimize the number of OS calls involved).
 
10:59 PM
Ahem
 
I'm sinking, am I not?
 
Xeo
@StackedCrooked lol
 

« first day (678 days earlier)      last day (4284 days later) »