« first day (2104 days earlier)      last day (3035 days later) » 

Anonymous
18:00
If you're on a system where long is 64 bits, using a double is a terrible idea. You can only count integers up to 2**53. With a long, you get up to 2**63 (2**64 if it's an unsigned long).
Just never use long in C(++) (except when you have to interface with 3rd parties that do).
Use int64_t for a 64-bit integer.
^
Or uint64_t if you don't need the sign
Anonymous
^ that
Did I miss the part where we explained why someone wants to use a double for an integral number
Anonymous
Using a specified-fixed-width type is the best choice
Anonymous
18:02
@DJMcMayhem Are you just trying to get the # of ms since the epoch?
I have a chat message that tells how do that.
I've actually used it for reference multiple times
time(NULL)
Why use C++ stdlib when you have C's one
Jan 14 '15 at 6:46, by feersum
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock().now().time_since_epoch()).count()
Anonymous
That's the correct solution :)
18:04
time only gives 1-second resolution, no?
@Mego Well, I'm really trying to track how long "x" has been running, so I'm using a timestamp (ms since epoch) and subtracting the start time from the current time
Anonymous
@feersum Assuming it meets POSIX spec, yes
Anonymous
@DJMcMayhem There are much better ways to do that
Anonymous
auto start = std::chrono::high_resolution_clock().now();
// do stuff
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock().now()-start).count()
18:08
Isn't that basically the same thing under the hood?
Oh, my name updated, haha
Anonymous
It's better because you don't need the epoch as a reference point
Anonymous
It will continue to work even after the clock rolls over, so long as your start and end points are on the same side of the rollover
Anonymous
Robustness is a good thing
OK. I'll need to do ms.count / 1000.0 because I need a data type I can return to python
is timezone a concern
dst is ending soon
18:12
@Poke It's just started for me
Anonymous
@DrMcMoylex What's wrong with giving Python an integral type?
@muddyfish where
I guess there's nothing wrong with that. And it would be pretty easy to change if I need a floating point type later
@Poke uk
I didn't know the UK used dst
18:14
Are you sure it started?
Anonymous
I have confidence that muddyfish knows how his home country operates
@Mego BTW thanks for your help! It's really useful
Anonymous
@DrMcMoylex Always glad to help :)
Ugh. People shouldn't write about DST if they're going to say stupid things like this:
> Daylight saving time will end at 2 a.m. on Sunday, Nov. 6. And with it comes short days and long nights.
Anonymous
Although in this case, he's incorrect - BST (British Summer Time, because the brits always have to use their own terms for stuff) just ended on the 30th
18:17
@Mego but i'm pretty sure it just ended in the uk... not started
oh
you just said that
I can think of something else BST could stand for >_>
Anonymous
DST really just needs to stop being a thing
Anonymous
Less headaches, more common sense
accurate
@Mego erm, you sure about that
Anonymous
18:19
@muddyfish Apparently not
@Mego we do call it daylight saving time though
@Geobits Because DST is the arbiter of when the sun rises and sets. That scores 5.779 TimmyD's on the arbitrary scale.
@muddyfish which direction did your clocks go
@Poke backwards by 1 hour
so it ended
Anonymous
18:21
DST seems to be the result of some legislative cabbages looking back at the Gregorian reform and thinking "Man, skipping ahead 10 days was cool. We should mimic that at a smaller scale by twiddling with our clocks twice a year for no real effect."
It's all a huge conspiracy driven by the clock lobby.
DST is the act of advancing clocks by one hour to preserve daylight
@Mego actually wasn't it for farmers so they could still use about the same times for when they did their stuff?
When we roll the clocks back it's for the same reason but we're undoing DST
@muddyfish That's what I thought too.
18:22
@Poke but winter's just started here?
Anonymous
Man, because having to adjust yourself to the fact that the length of the day changes throughout the year would be so hard
@muddyfish Every single farmer I know doesn't care what the clock says, they go by daylight hours anyway.
Personally, I'd be in favor of doing away with dst and time zones completely and just switching everybody to UTC
@muddyfish In the winter months it gets darker earlier so we roll the clocks back
@DrMcMoylex there are lots of problems with that
18:23
@DrMcMoylex Doing away with time zones will probably not happen for a long time.
Anonymous
@muddyfish DST is to "save daylight" in the summer - allowing for more time outside of normal work hours with daylight, by shifting one daytime hour forward (from morning to evening)
@El'endiaStarman probably not ever due to the worldwide administration
It'd take way too much adjusting to stuff like the sun rising at 7 pm.
@El'endiaStarman it'll happen at the same time as everybody adopts bitcoin and lojban
@El'endiaStarman especially when you change time-zones so you have to learn a new timetable of stuff to do - you would effectively do timezones
18:24
0
Q: Compile a compiler to compile your compiler!

FinWYour task is simple. You have to Make a compiler/interpreter that compiles/interprets the language you made it in. E.g if you made a compiler/interpreter in C, it would have to compile/interpret C. Test Cases A simple "Hello, World" program. Your compiler/interpreter. Yes, try feeding your com...

0
Q: A day at the Horse Races

MarioBackground Back in the late 90's / first 00's when Flash Web Design so much cool that noone could live without having a full Flash site, or at least an animated widget, I was hired to develop a "horse races viewer" in Flash/Actionscript, in the shape of an 80's videogame style animation, so the ...

@El'endiaStarman Not really. I usually had EST, GMT, and JPT all running in my head while I lived in Japan. Just takes a bit of getting used to.
Anonymous
@El'endiaStarman Just look at your clock less. Or recognize that the number shown on a clock is almost entirely meaningless, regardless of the presence or absence of time zones
@muddyfish Oooh, that's a good point.
We just need to do away with time itself
Anonymous
@Poke We can't, it's part of the universe
18:25
I will work for whatever amount of time feels right from now on
@Poke That would be quite a present.
Anonymous
@Geobits mods ban this joker
@Geobits ...I guess it's about time the puns started showing up...
@Mego its not meaningless. If I want to go to a store, I can expect that they open around 8-9 am
@El'endiaStarman Oh god, I didn't mean to start that again. Can we wind it back?
18:27
that obviously varies from culture to culture
Anonymous
Stores are open from 8 am to 8 pm. Bethesda told me so.
@Geobits Any minute now there will be a flag.
<pun including the word "alarm">
@Geobits Hmm, but each of those is associated with a specific place (in a generic sense). Not the same as it being the same time everywhere, but with similar things happening at different times.
@Geobits If you're not careful, you'll tick some people off
18:28
On second thought... maybe not?
Anonymous
The frequency of these puns is increasing at an alarming rate
Give me a minute... I think I can come up with a good one.
oh
mego already did
GAH
Anonymous
:P
Anonymous
I think it's about time I leave here and go do something useful
Alright, hands up everybody, you're all being arrested IT'S HIGH NOON.
Anonymous
18:29
Because Geobits's puns make me want to take a cloth to his timepiece
@El'endiaStarman True, but changing time zones doesn't happen all that often for the vast majority of people. And even so, it's not hard to go from "the shops open at 8am" to "the shops open at 6pm". Unless you travel very often, I don't think you'd have an issue with it.
Are you saying that our digital discussion isn't useful?
Anonymous
It's time for me to become hands-off
This has got to stop.
Hammertime
Anonymous
Before the quality of these puns drop from minute to infinitesimal
18:30
@Geobits Well, but everyone (except for the lucky sods in GMT) will have to make that adjustment. If we abolish time zones all at once, then suddenly 6 pm is 3 am but nothing else changes.
@El'endiaStarman Well yeah, they'd have to adjust once. Ever. That's the whole point.
It'd be too massive of a change, though.
Look at how long it's taking for the US to switch to metric.
If true, that's a sad statement on humanity.
Anonymous
I leave you with this parting gift:
It'd probably also be financially catastrophic, and you'd still have people using local time for a long time hence.
Anonymous
18:32
You don't have to do the whole world at once, really. Individual countries/states could just choose to use GMT for everything (just like they choose whether to DST). Eventually, I'd hope that common sense wins (but not holding my breath).
I'm not sure how it would actually be financially catastrophic though.
Plus, many (most? all?) companies are quite dependent on legacy software, and they were built in a time with time zones.
@El'endiaStarman Why would we switch to something less superior than imperial? HA
@Geobits Well, maybe not so much since computers do a lot of the stock trading these days, but I was thinking that you might have problems with people being confused about when stuff was happening, leading to missed meetings or opportunities etc.
@Poke I know right?! Screw those metric overlords!
@El'endiaStarman You get that now, though.
18:36
But it's far less confusing except for that changeover period.
The effects of the change-over period wouldn't be limited to a short time after, though.
The confusing part of DST is that we teach children only that we're changing the time on the clocks; not that we're switching timezones for half a year
@El'endiaStarman For people that cling to the old system, sure.
@Geobits *points at imperial vs metric again*
Really, the problem here is the Earth's rotation.
If the Earth were tidally locked, we wouldn't need time zones at all!
If Earth were tidally locked, life would be impossible
18:40
My point still stands.
Right, but I don't know too many people nowadays that get confused about metric vs imperial. It's just one or the other. Plus our government doesn't help with that, since many things are mandatorily labeled with imperial. Dropping it would be really easy if labeling reqs changed.
Teach kids metric only in school, and in ten/twenty years the whole thing would be over.
That's already happening in science classes (at least, in my experience).
Also, Pokemon Go measures distance walked in kilometers, which I think is pretty cool.
@El'endiaStarman Can you give me the model number and Android version of your S7?
@mınxomaτ o.O
18:53
Up to your data mining shenanigans again?
Oh, and IMEI and bank account number too :P
@Geobits Oh yeah, I don't mind giving those out.
I just want to know why something works on your phone, but not on mine.
@mınxomaτ SM-G930V and 6.0.1
Well that explains it.
Thanks.
Damnit Samsung.
18:57
.....elaborate, please?
Samsung puts vastly different hardware into models from different regions. I have the SM-G930F, whose GPU lacks some features.

« first day (2104 days earlier)      last day (3035 days later) »