[14:39] morning [14:40] Morning [14:45] party [17:10] are we having fun yet? [17:10] YES [17:11] I really want to write strtotime in go, but I'm afraid I'll hit a wall. What do you think I should do? [17:12] shell out to C? ;) [17:12] I'd rather not. [17:12] use Python like a gentleman [17:12] python++ [17:13] erm... python += 1 [17:13] so... I call strtotime from python, because python datetime parsing sucks. [17:13] that is a wrapped C function because python calls C nicely. [17:14] Python Datetime parsing is pretty awesome [17:14] using dateutils [17:14] terrible. [17:14] j/k. i never used it because I had strtotime. [17:14] https://pypi.python.org/pypi/python-dateutil/2.6.1 [17:15] I'd be afraid to write anything related to time because it's a clusterfuck of exceptions [17:15] and I'd wind up writing 0:60:01 or some shit [17:15] I just was handed a smoothie with frozen peaches in it, so yeah, having fun now [17:15] mmm... peaches. [17:16] well, my job is all about video playback which is time based, so yeah... time and a clusterfuck of exceptions is my job now. [17:16] yeah, the big flat of them we got from costco were good, but a few got soft spots before we could eat them, so, into the freezer they go! [17:16] in what state were they grown? [17:17] uhhhhh, dunno [17:17] jrwren: Fun times [17:17] box is recycled (and pickup day was yesterday) [17:17] greg-g: i'll pretend they are MI peaches ;P [17:18] heh, thanks to ya'll then :P [17:18] I don't see a way I can parse '1 day ago 2 hours ago' in dateutils :p [17:19] jrwren: datetime [17:19] https://stackoverflow.com/questions/6871016/adding-5-days-to-a-date-in-python [17:19] and timedelta [17:20] cmaloney: no no no... I want it to work like gnu date cmd line. e.g. `$ date -d ‘1 day ago 2 hours ago’` [17:20] you can run that on linux (not on bsd/mac) [17:20] err, well, those quotes aren't right, but if you fix them you can run it :) [17:20] try this: [17:21] exec("date -d '1 day ago 2 hours ago'") :-P [17:22] bwahahahahahaha [17:23] i would, but I am concerned aboud speed of http responses and so I will not fork. [17:23] https://golang.org/pkg/time/#Time.AddDate [17:23] that doesn't help. [17:23] Use that to get the day one day before [17:23] lets say I pass '1 day ago' as a query parameter, how do I get a date. [17:24] right, you are saying to write my own parser. I'll take your advice. [17:24] Yeah, sadly I don't know why Go doesn't have a parser like that [17:24] most langs don't. [17:24] most call C strtotime :) [17:25] although strangely ruby's fancy pants parser seems original [17:25] MOst of the time I'm not parsing a string for my "two days ago" foo. That's a config parameter [17:26] And if I need to get really fancy-pants I use https://docs.python.org/2/library/calendar.html [17:26] for stuff like first day of the week [17:26] it must have just been teh nature of atlas apis when I was at arbor. the "days ago" queries were VERY useful. [17:28] https://dateparser.readthedocs.io/en/latest/ [17:29] oooh! that is the one. [17:30] omg, those deps though [17:31] That's not too crazy. ;) [17:31] pytz six [17:31] https://pypi.python.org/pypi/ruamel.yaml <- this one I don't quite understand [17:32] nor the added regex lib [17:32] ah, for reading config files [17:32] i don't see wehre it is supporting some of that syntax. https://github.com/scrapinghub/dateparser/blob/master/dateparser/parser.py [17:32] oh... https://github.com/scrapinghub/dateparser/blob/master/dateparser/freshness_date_parser.py there it is. [17:33] well, i wasn't going to hand write the parser, but maybe I will. [21:57] i just ran longer than I've ever run in my life. It was also the first run in my 40s [21:57] Also the first run since my knee injury. I didn't even notice it, so I guess I laid off it too long [22:29] <_stink__> jrwren++ [22:41] jrwren: <3 awesome [22:51] jrwren: You want date time stuff in Go? [22:54] brousch: I want strtotime, yes. [22:58] I remember our Gonads at work talking about doing that [22:58] I assume that's what Go programmers are called [22:59] gophers. [22:59] brousch: have I told you how much I love go now? I like it a lot. :) [23:35] <_stink__> brousch++