« first day (1052 days earlier)      last day (3890 days later) » 

5:00 PM
No, decimal type is something else than double/float.
 
Notice that there's binary and decimal versions of IEEE floating point.
 
floating point number is called so , because the point is not fixed!!
 
Ok. Assuming I mean floating point numbers instead of "decimal" numbers. What is a good range of numbers where I can expect good precision?
 
@JerryCoffin rofl
 
user1804599
Define "good precision".
 
5:01 PM
@Jefffrey That depends on what you're using it for.
 
Again, there is a formula for every representable value.
 
@not-rightfold Good precision for a user that is dealing with charts and generic chart data.
 
user1804599
Define "charts".
 
lol
 
user1804599
You know.
 
user1804599
5:02 PM
You can have a 2cm chart from 0 to 10 or a 10000cm chart from 0 to 1000000000.
 
http://en.wikipedia.org/wiki/Single-precision_floating-point_format .
this is single point precision
 
user1804599
And anything in between and beyond.
 
> generic chart data
 
user1804599
What is a generic chart?
 
there are also double precision floating numbers which use 64-bit representation
 
5:03 PM
@not-rightfold generic is for data
 
user1804599
You want infinite precision.
 
user1804599
I have no idea what you mean.
 
@Jefffrey Really? I thought charts are used for things other than data!
 
user1804599
You can have data ranging from 0 to 10 or data ranging from 0 to 10000000000000000000.
 
user1804599
If you want to cover all possibilities you need arbitrary precision numbers.
 
5:05 PM
If you're making charts, you don't necessarily need infinite (or arbitrary) precision.
 
@Jefffrey A denormal gains one digit of range by losing one digit of precision, so subtract the number of digits of precision required from the quoted range for the type. E.g., if you want 10 digits of precision with a double (max range: e+308) you get 308-10 = e+298 for your maximum range.
 
A double might just work fine for just about anything you might use it for w.r.t. charts.
 
@Insilico Most charts are intended more to convince than inform.
 
Isn't there a DOUBLE_MAX thingy like INT_MAX?
 
@Jefffrey Yes, but (unless I'm remembering incorrectly) it gives the range including denormals.
 
5:09 PM
@JerryCoffin Where does e+308 comes from?
 
@Jefffrey The maximum for an IEEE double is roughly 1e+308.
 
bye
 
@JerryCoffin So for 2 digits the range would be e+306?
@user2713461 bye :)
 
@Jefffrey Yes. Just keep in mind that all these are actually in binary, so the translation to number of decimal places is rarely precise. Also note that it applies not just to the final answer, but to any intermediate answer (once an intermediate answer loses precision, that limits the precision of everything afterwards).
 
@sbi not really. just crossed my path, so to say. Later for more, rehearsal waits
 
5:14 PM
is there anything special with 192.168.0.255 ?
`nc -u 192.168.1.255 9999` Works but
`nc -u 192.168.0.255 9999` Doesn't
 
@NeelBasu local broadcast address. Nothing really beyond that.
 
It's probably a broadcast address.
 
@JerryCoffin so why cant netcat broadcast to 0.255 ?
But it can broadcast to 1.255
 
@NeelBasu Presumably your local subnet is 192.168.1.x. Broadcast only works in local subnet.
 
No my local address is 192.168.0.2
 eth0      Link encap:Ethernet  HWaddr 50:e5:49:51:0b:cb
           inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
           inet6 addr: fe80::52e5:49ff:fe51:bcb/64 Scope:Link
 
5:18 PM
@JerryCoffin thanks
 
@NeelBasu In that case, it sounds like you're just interpreting the results backwards (that the broadcast to .0.255 is succeeding and to .1.255 is failing).
 
@JerryCoffin No. I CAN see the UDP traffic in wireshark when I broadcast to 1.255 but When I broadcast to 0.255 I don't see any traffic.
 
@NeelBasu Hmm..that is truly strange. What happens if you change your local subnet to .1.x ?
 
Is there a library for C++ that allows me to synchronize certain structures between all clients? I have information that is to be shared across a few (2-50) pcs
now I could write my own server, and each client sends status updates, the server sends those to the others
 
@JerryCoffin Its DHCP Do I need to change it from router ?
 
5:26 PM
but I would like to prevent myself from having to reinvent the wheel, I assume this has been done before?
 
@NeelBasu Yes.
 
@JerryCoffin My Router is taking 0.1 and I don't see any way to change it
 
@CBenni Yes -- many times in many different ways.
@NeelBasu It's been configurable on every router I've ever had, but they often don't make it particularly easy to find.
 
@JerryCoffin Yes right got it
 
@JerryCoffin I tried google, but didnt get any decent results. are there keywords I should try? any tips?
it really doesnt matter if I use a centralistic approach or p2p
 
5:31 PM
@NeelBasu hi
 
or what the protocol is
as long as it works and doesnt have incredible latencies (it is supposed to be realtime) I am happy
 
@CBenni Most message queueing systems support something like that (e.g., Microsoft Message Queueing, Oracle Advanced Queueing, etc.)
 
0
Q: Very precise timer for C? So precise to measure single function call

nullpointerI would like to measure execution time of some math function in C. (I have a library which computes lots of math and I would like to know how much time single call would take). For now on, I use getrusage or GetProcessTimes and clock_gettime/gettimeofday or GetSystemTimeAsFileTime but they're n...

^^ XY problem gone bad?
 
Now the reverse thing is happening.
I can broadcast to `0.25`5 but not to `1.255` using `nc` but now ifconfig is showing my broadcast address is `192.168.1.255`
 
@Mysticial A typical "useful-but-not-so-long" function executes on the order of nanoseconds in modern systems. A kernel call switch to get the time is at least an order of magnitude more time, no?
 
5:39 PM
, where every benchmark is useless and their results meaningless.
 
@NeelBasu Hmm...how very odd. Have you tried it with code of your own?
 
@JerryCoffin nope I have an udp server written. I was testing that with netcat
 
user1804599
For two numbers, is addition ever undefined in mathematical sense?
 
Define number.
 
@not-rightfold +inf - inf?
 
5:41 PM
Infinities are not numbers.
 
user1804599
Infinity is not a number.
 
@Mysticial That technically leads to indeterminate forms, not undefined results, no?
 
Same thing.
 
@not-rightfold Real numbers yes, complex numbers yes IIRC.
 
user1804599
But like 1, 2, 3i, 4/5, π, 4i + 7 and 6i + (2/3)j + 85.
 
user1804599
5:42 PM
And so forth.
 
complex numbers hold pretty well with most of the basic math operations
 
user1804599
And negative.
 
except for maybe comparisons.
 
@JerryCoffin that sounds like overkill to me, isnt there a simple standalone solution?
 
@not-rightfold You can define a number system that doesn't support addition (or an analog thereof), but it's sufficiently foreign to most people's experience that they'd probably question whether they qualify as numbers.
 
5:44 PM
4
A: How to calculate std dev, quartile, ... with benchmarking a code?

Jerry CoffinStandard deviation and quartiles both deal with the distribution of values in a group. With only one measurement, these become trivial or meaningless. Since there's only one measurement, that value is the mean, the minimum, the maximum, and the mode. Since none of the measurements deviate from t...

^^ this guy's been at it for a while. :)
 
@CBenni There probably is, but I'm not sure I can give you any real help finding it. It is pretty much analogous to what (for one example) distributed file systems need to do though.
 
*trying to measure things very precisely.
 
@JerryCoffin ill search through SO again, and if I dont find anything, ill ask a question for better exposure, thanks anyways
 
@Mysticial Reminds me of those wiggly arms you often see in anime.
He used to be less cynical in his older posts.
 
Ell
5:54 PM
hi guys
 
I shall not stop until all code is slow and provably correct.
room topic changed to Lounge<C++>: We loose performance and it is suck (IT IS BACK) [c++] [c++11] [c++-faq] [meta-dumbness] [no-questions]
 
Is vector the collection with fastest random acces?
 
No, /dev/zero is.
 
He wants random access. So it is /dev/urandom
 
Real punny
 
Ell
6:02 PM
that probably wouldn't be faster
 
@DavidKron You can use my RandomizedQueue.java class if you wish ;)
 
Fuck i thought this was a c++ room, where do all the hipsters come from?
 
@DavidKron Spontaneous combustion
 
@JerryCoffin From masturbating?
 
@DavidKron To give a straight answer for a change: generally speaking, yes.
@DavidKron If you smoke after sex...you need to slow down a little.
 
Ell
6:11 PM
@DavidKron Hipsters? :P
@not-rightfold is a hipster. Java is not hipster
 
@JerryCoffin what about std::array ? don't you save an indirection?
 
user1804599
Fuck Java.
 
@Borgleader No.
 
@Borgleader Sort of, but unless you're only dealing with a small number of accesses (so loading the base address of the storage is a significant percentage of the overall work) it won't generally make a difference.
 
6:13 PM
lolwut
Someone loves Java a bit too much.
 
@not-rightfold Trust me: Women are a lot more fun.
 
What is a woman?
 
@JerryCoffin What are these mythical creatures you speak of?
 
@Greenflow An enigma wrapped in a mystery then shrouded in obscurity.
 
We call 'em clothes over here.
 
6:23 PM
@Greenflow woman is just a gender, if you dont respect them!!
 
@user2713461 Gender applies to words. People have sexes. Some people even have sex.
2
 
user1804599
Coool. :3
 
:-D
 
Ell
@not-rightfold ?
 
user1804599
NewMultiplication(NewPi(), NewInteger(42)).String() == "π · 42"
NewSine(NewInteger(42)).String() == "sin(42)"
NewSine(NewMultiplication(NewPi(), NewInteger(42))).String() == "0"
 
user1804599
6:35 PM
It's magic!
 
@not-rightfold No -- just NewMath.
Oh -- most of you are probably too young to recognize the reference. When I was in school, there was a movement to teach "new math". Exactly how it differed from old math, I'm uncertain -- my parents were quite religious, so I went to Catholic schools, where "New" applied only to the "New Testament", and anything since then was clearly evil and best ignored.
 
> Misspelled "dual monitors" chatting to my uncle last night. Today he sent me this.
lol
 
user1804599
6:50 PM
Dat pun.
 
counting more than one, more a matter of pun density
 
@FredOverflow Delicious punz
in other news, I finished the week2 homework. Imma try to fix backwash now... was supposed to do it this week but didnt have time
 
Got 100% on week 2?
 
yeah
 
awesome
 
Ell
6:57 PM
What do you call a minecraft style cursor?
 
there is no cursor...
just the reticle iirc
 
Ell
@Borgleader that's what I mean, as in you move the mouse to orbit but no cursor per se
 
@StackedCrooked That anime looks so boring.
 
7:00 PM
The first half of the first episode is boring TBH.
 
@Ell Not sure that has a standard name. I think it depends on the type of game.
 
Oh, the 3rd Edition of "C# in Depth" is due at the end of this month.
 
@FredOverflow I bought the 2nd edition 2 years ago and i just started reading it... guess i should have waited T_T
 
@StackedCrooked Oh dear god.
 
7:07 PM
@Borgleader same here :)
 
My first day at my new job was a success!!! :)
 
@TonyTheLion explain
 
It was fun, I liked the people, the work and the surroundings
 
Cool. What job is it exactly?
 
7:11 PM
How could I indicate an empty value for a FILETIME that I can later check and see if it's empty?
 
@FredOverflow I thought of using a second UF to avoid backwash but I hadn't done it because I thought it would break memory requirements. After reading the forums it seems it doesn't. That might be the shortest fix I've done xD
 
@FredOverflow Writing software for the finance industry (trading) (C++ and C#)
 
Andddddd 100% on first assignment.
 
@CCInc structs can't be empty. Just use another bool to store if its empty or not.
 
Ah, okay.
 
7:12 PM
Or, set both fields to 0 or -1 and hope that this doesn't represent a value that's common in practice.
 
Ell
@TonyTheLion Awesome! That's great news :)
 
@TonyTheLion Woohoo :3
 
Yes it is. :)
 
@TonyTheLion what's the quality attitude at that shop? I heard many finance firms are very sloppy
 
Do they use floats and doubles for currency? :)
 
user1804599
7:16 PM
I'm stumped.
 
@TemplateRex Its a relaxed atmosphere, but I wouldn't say that they compromise on quality, because a lot of things have to very reliable and accurate.
 
Ell
@not-rightfold what on?
 
How many points on the joel test?
 
I have no idea.
 
user1804599
7:18 PM
@Ell I have two tree data structures that represent (2 * π) * 3 and (π * 2) * 3 respectively. I want to get the resulting data structure 6 * π (or π * 6 idc) for both, but I can only get it working for either, not for both.
 
user1804599
It gets more fun with stuff like (2 * π) * (3 * (4 * π)), which should result in 24 * (π * π).
 
@Rapptz Yeah, that one got a lot of airplay here in Belgium (on the alternative radio station.)
 
@Rapptz That has one of the simplest non-trivial drum patterns ever.
 
7:26 PM
@StackedCrooked You seem to be contradicting yourself -- saying they may not have been so bad, but then posting evidence that they were even worse...
 
Ell
@not-rightfold can't you just flatten the tree and multiply all the numbers?
 
Ell
because multiplication is... commutative (is that the word?)
 
user1804599
@Ell Hmm.
 
user1804599
7:28 PM
@Ell No. Associative. :P
 
struct stuff {
    constexpr stuff() = default; // Can I omit this?
};
 
boost::filesystem::wifstream doesn't seem to like me reading from it >.>
 
Would struct stuff {}; have a constexpr default constructor?
 
@JerryCoffin You have no soul man.
 
@Rapptz Pretty sure it would.
 
user1804599
7:29 PM
But yeah I can flatten the tree. @Ell thanks!
 
Ell
@not-rightfold of course, this won't work after you add division
 
@not-rightfold Don't let the tree huggers read that.
 
user1804599
@Ell Division is multiplication. :P
 
Ell
oh yeah, of course :P
 
@Rapptz aggregates are constexpr, I think (at least in c++14)
 
7:30 PM
I guess I'll leave it there
 
@StackedCrooked Oh, but I do!
 
Better safe than sorry
 
@JerryCoffin lol
soul man != man having a soul
 
@Rapptz Maybe you could test it.
 
Btw, aren't they saying they're sole men?
 
7:32 PM
Clang doesn't like it.
But GCC does. Great.
 
@chris Doesn't like that?
 
@Rapptz Yeah, doing that and creating a constexpr stuff obj;
 
user1804599
@Ell Guess this should work? :P
 
main.cpp:6:17: error: default initialization of an object of const type 'const f' requires a user-provided default constructor
    constexpr f a;
.. what. Why..?
 
@Rapptz that applies to plain const too
 
7:36 PM
@Rapptz, If that user-written default constructor would satisfy the requirements of a constexpr constructor (7.1.5), the implicitly-defined default constructor is constexpr
 
@chris Okay.. so clang is wrong here.
 
I think so.
It's 12.1/6.
 
25
Q: Why does C++ require a user-provided default constructor to default-construct a const object?

KaruThe C++ standard (section 8.5) says: If a program calls for the default initialization of an object of a const-qualified type T, T shall be a class type with a user-provided default constructor. Why? I can't think of any reason why a user-provided constructor is required in this case. stru...

 
@StackedCrooked No. Perhaps you'd put more belief in the original.
 
Clang is right
 
7:37 PM
@TemplateRex That's a grand philosophical statement.
 
Or political
 
@TemplateRex The class is empty. It has no state.
There are no initialized or uninitialized variables anywhere.
 
@Rapptz It's like the united states of nothing.
 
@StackedCrooked What? You think they're claiming to be shoe salesmen?
 
Ah empty class, lemme check
 
7:39 PM
Good soles can cure all kinds of back problems.
At least my Dutch aunt says so.
 
Looking at 12.1/5, I don't see anything that would cause the generated one to be deleted, either.
 
How silly that I have to do constexpr stuff() {} for it to work
 
A police officer just parked at the end of my street.
They park like right in front of the intersection; it's stupid.
 
Is a default constructed tri-bool intermediate or false?
 
@StackedCrooked Yes, but she probably thinks fish are edible and may even go so far as to believe beer is drinkable, so you probably can't trust her judgement.
 
7:44 PM
Because boost does the latter and that feels weird
 
Dcl.init p7 last sentence
 
@Rapptz I believe its correct value is FILE_NOT_FOUND.
 
const T t; requires user-provided default constructor
No exceptions for empty class
 
Then what's this about the implicitly generated default constructor being constexpr if the user-provided one could be?
It seems to conflict.
 
11 mins ago, by chris
@Rapptz, If that user-written default constructor would satisfy the requirements of a constexpr constructor (7.1.5), the implicitly-defined default constructor is constexpr
 
7:47 PM
 
user1804599
@Ell it works! Thanks!
 
@chris The highest ratest comment mentions Attack on Titan!
 
@Rapptz What was your reasoning for that over a tuple?
 
It's an aggregate
 
7:50 PM
Always something like that, isn't it :p
 
Well in the bottom there's the tuple interface
 
> This sort of sounds Russian.
 
@Rapptz why use a defaulted default constructor that does nothing in a constexpr context?
 
lol Youtube comments.
 
@TemplateRex So constexpr triple<T, U, V> f would call the default constructor of all template parameters and work (if possible).
 
7:55 PM
But why the empty class
 
Ahahaha the Attack on Titan comment is now "spam".
 
Consrexpr is for computation, use TMP for empty classes that let you do other stuff
 
@TemplateRex The class is actually intermediate_t and I wanted to do constexpr tribool intermediate = intermediate_t{}; so I can have the tribool work in a compile-time context.
 
And the empty class represents the 3rd state?
 
yes
or I can probably do constexpr intermediate_t intermediate; and have it work off that
but that's the gist of what I was trying to do
 
7:59 PM
Why not class wrapper around enum with false, true, unknown?
 
that's the internal representation, but you need to have a way to do tribool a = intermediate.
 
yes so assign it the unknown enum value
 
. . .
How would you assign it to the unknown enum value willingly? How do you propose that syntax to work?
 
So you have a separate type for the third value?
 
Is a FILETIME effectively a long?
 
8:01 PM
@TemplateRex It's a tag.
It's the only way I know of to emulate keywords
 
sounds like you are mixing tmp with constexpr, in my experience they dont mix too well
 
Where did tmp even come into this ._.
 
The tag
 
sigh
 
smells like tmp and empty helper types, not values
 
8:03 PM
I'm going to go back to doing something productive.
 
@CCInc long long, IIRC.
 
I looked at your github page, is your tribool a tuple of three types?
 
Nope.
 
user1804599
@Ell ((π * 42) * (42 * (π * (42 * π)))) * 42 now returns (((3111696 * π) * π) * π). :)
 
user1804599
Onto the exponents!
 
user1804599
8:07 PM
Hmm this is actually just constant folding.
 
@TemplateRex coliru.stacked-crooked.com/a/07f7bccb2c6968e9 I didn't think it was that hard to comprehend tbh.
 
@not-rightfold So far. The exponents part is strength reduction.
@TemplateRex It's an enumeration that can hold one of three values (true, false, indeterminate).
 
Yes so if you need intermediate_t why not define it as std::integral_constant<enum_type, intermediate_value>
 
@JerryCoffin Ah, k
 
Straight out of the true_type false_type playbook
 
8:12 PM
@TemplateRex Because I do need the rest of integral_constant's interface here. I'm literally emulating a keyword.
 
Then it will a) play nice with TMP and b) with constexpr because it has a default constructor
 
-7
Q: Why are there fewer female users on Stack Overflow?

Sobin AugustineI've been here for a little while, but I've never seen a single female user. I know maybe there are some, but I've honestly never seen any. Why this low ratio compared to male programmers? I know that out there in the world the female to male programmers ratio is way better than here. Why this ...

 
0
Q: Combining two const char* together

WARLOCKI've tried many ways to do that, I got a void which is static and is on Console class i made, Void it self works fine: Console::WriteLine(const char* msg) On the other side, I got another const char* non static void which calls the Console::WriteLine void from It, I've been working on C# for a...

 
@Mysticial Damn -- they closed it. I was working an answer that reversed the usual hunter/gatherer crap and explained how men had to evolve to be more communicative than women.
 
8:27 PM
Ugh.
 
@JerryCoffin communicative?
 
@JohanLarsson yes.
 
I thought it was the opposite, probably missing something
 
user1804599
Damn.
 
user1804599
I'm getting 3111696 · π ^ 2 · π instead of 3111696 · π ^ 3.
 
8:32 PM
@JohanLarsson That's the usual claim, yes. My point was to reverse that -- would have simultaneously been pretty funny, and pointed to what a stupid theory that was/is.
 
@Mysticial For the same reason the are fewer female programmers?
At my uni, the Soft. Engineering and Computer Engineering degrees have a roughly 10:1 ratio
 
@Borgleader I do think membership on SO is even lower than percentage in real life. In real life, I'd guess something like 5-10% of programmers are female, but on SO, I'd guess no more than 1% of members are female.
 
Who cares?
 
@JerryCoffin Oh that's entirely possible.
 
I don't think I ever met a female programmer irl
But I would like to turn gf into one
 
8:39 PM
None at all? I met a few
 
I work with two.
 
Does @Cicada come here anymore?
 
I've seen like 3.
 
@Mysticial Cicada is a guy
and no, not that i know of
 
@JerryCoffin I'm not sure this would prevent them from having the same causes, though.
 
8:44 PM
@Mysticial females suck
 
@StackedCrooked You wish
 
user1804599
fuuuuck
 
user1804599
Now I get π ^ 0 instead of π ^ 3. ;_;
 
@Borgleader o really?
 
user1804599
Yay it works.
 
8:46 PM
@StackedCrooked He was on mumble and it definitely sounded like a guy... unless my memory is playing tricks on me
 
lol
that wasn't smart then of him/her.
 
@StackedCrooked Yes.
 
I'm behind on stuff.
 
Just a year or so.
 

« first day (1052 days earlier)      last day (3890 days later) »