Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    C

    Chris Smith

    crsmithdev.com · Personal blog · on HN since 2013

    Chris Smith is a Python developer who wrote the Arrow date and time library and posts on email habits and logistic regression.

    Visit blogHN submissions
    Programming
    What HN says

    HN mentions it through Arrow docs, with commenters comparing newer date libraries like Pendulum to it and praising its ability to floor or round times.

    Stats for nerds
    18HN people shared it
    6linked in comments
    324story points
    Dec 2016last shared
    2014people per year2016

    Top posts on HN

    1. 1
      Arrow: Better dates and times for Python
      16 people · 319 points · first shared 2013 · 72 comments on HN
    2. 2
      Building Better Email Habits with Mailbox
      1 person · 3 points · first shared 2013 · Discussion on HN
    3. 3
      Logistic Regression
      1 person · 1 points · first shared 2019 · Discussion on HN
    4. 4
      Building Better Email Habits with Mailbox
      1 person · 1 points · first shared 2013 · Discussion on HN

    What HN people wrote when they linked it

    • niftichDec 2016

      The link to its github was posted on HN when it was brand new, and I left a comment [6], which I'm reproducing here -- since most of my points still apply.

      (...) take my very early comments with a grain of salt -- they refer to the progress as of this commit [1].

      I love Requests -- its API design is fantastic, and manages to distill down most of a complex problem domain to a clean, dare-I-say, elegant API.
      So I can eagerly anticipate this design applied to datetimes. But the progress being shown so far is definitely not it.

      >>> tomorrow = maya.when('tomorrow')

      <MayaDT epoch=1481919067.23>

      Why is "tomorrow" a precise-to-centisecond, infinitesimally small point on a giant cosmic timeline? I'm reasonably sure it's an abstract concept that describes the calendar day that starts after the current calendar day ends.

      At least, Pendulum normalizes tomorrow() and its ilk to represent midnight on the given day [2], while Delorean's natural language methods [3] like next_day() advance the day while leaving the time-of-day unchanged, but the method name makes this fairly clear.

      Even Arrow, which is heavily inspired by Moment.js to the point of conflating every single datetime idea into the same class, opts for mutators that are still more clear [4].

      > Timezones fit in here somewhere...

      Yeah, this needs more work.

      Java 8 / Threeten, and its predecessor Joda-Time took the approach of clearly modeling each and every concept that humans actually use to describe time; even if you…

    • sdispaterAug 2016

      Pendulum is a new library for Python to ease datetimes, timedeltas and timezones manipulation.

      It is heavily inspired by [Carbon](http://carbon.nesbot.com) for PHP.

      Basically, the Pendulum class is a replacement for the native datetime one with some useful and intuitive methods, the Interval class is intended to be a better time delta class and, finally, the Period class is a datetime-aware timedelta.

      Timezones are also easier to deal with: Pendulum will automatically normalize your datetime to handle DST transitions for you.

      import pendulum

      pendulum.create(2013, 3, 31, 2, 30, 0, 0, 'Europe/Paris’)
      # 2:30 for the 31th of March 2013 does not exist
      # so pendulum will return the actual time which is 3:30+02:00
      '2013-03-31T03:30:00+02:00’

      dt = pendulum.create(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris’)
      '2013-03-31T01:59:59.999999+01:00’
      dt = dt.add(microseconds=1)
      '2013-03-31T03:00:00+02:00’
      dt.subtract(microseconds=1)
      '2013-03-31T01:59:59.999998+01:00’

      To those wondering: yes I know [Arrow](http://crsmithdev.com/arrow/) exists but its flaws and strange API (you can throw almost anything at get() and it will do its best to determine what you wanted, for instance) motivated me to start this project. You can check why I think Arrow is flawed here: https://pendulum.eustace.io/faq/#why-not-arrow

      Link to the official documentation: https://pendulum.eustace.io/docs/

      Link to the github project:…

    • rottenDec 2015

      Wow, there are some great new tools to explore. Thanks!

      Some of the new libraries I'm using this year that I've found really handy include:

      Odo - http://odo.readthedocs.org/en/latest/ It is ridiculously handy for converting data from one format to another - especially for transforming a table from a database or csv into a DataFrame and back.

      Arrow - Makes for quick datetime processing. - http://crsmithdev.com/arrow/

      Xlsxwriter - http://xlsxwriter.readthedocs.org - I'm building beautiful reports, with charts, using this tool. As someone who moves data around a lot, but has to work with less technical business and analyst folks, this is becoming my goto for handing them some data to play with.

      Blessings - https://pypi.python.org/pypi/blessings - as I get older staring at simple black and white text on the screen seems to be getting harder. Putting a little color and flare in my command line interfaces cheers me up even if it doesn't do much in the way of actually getting the job done.

      Lastly, switching from curl to httpie was a huge help in working with API's of all sorts. It solved a problem I didn't even know I had. https://pypi.python.org/pypi/httpie

    • mzsMar 2014

      Oh man people that have used python for a while have come to expect datetime to just be strange in general. Essentially the default is to be in your TZ from midnight, you need to convert and there are different classes for epoch, and some of the members seemingly willy-nilly are not there or named differently then! And that's just the start, that's why things like arrow exist: http://crsmithdev.com/arrow/ time and datetime in python show their age.

    • WalkmanAug 2016

      https://dateutil.readthedocs.io

      http://crsmithdev.com/arrow/

      http://pythonhosted.org/pytz/

      http://delorean.readthedocs.io

      http://github.hubspot.com/sanetime/

      https://github.com/zachwill/moment

      https://docs.djangoproject.com/en/1.10/topics/i18n/timezones/

      The most similar to this are Arrow and Delorean, maybe Django timezone if you use Django.

    • kdeldyckeAug 2016

      Also manipulating datetimes for a living (telemetry + billing). The reason I stick with Arrow despite its slowing maintainership? Its ability to round up or down time along a granularity: http://crsmithdev.com/arrow/#arrow.arrow.Arrow.floor

    Related

    Laurent Lucelaurentluce.com22 people

    Twitter sentiment analysis using Python and NLTK

    Laurent Luce
    Personal · last shared 2022
    Simon Willison's TILstil.simonwillison.net111 people

    One-liner for running queries against CSV files with SQLite

    Simon Willison's TILs
    Personal · last shared 2026
    YUI Blogyuiblog.com141 people

    Douglas Crockford on Fat Arrow Functions in JavaScript

    YUI Blog
    Company · last shared 2020
    Chris Shiflettshiflett.org31 people

    JavaScript and URLs

    Chris Shiflett
    Personal · last shared 2026
    Nathaniel J. Smithvorpus.org123 people

    Why does calloc exist?

    Nathaniel J. Smith
    Personal · last shared 2026
    Chris Warrickchriswarrick.com19 people

    Pipenv: promises a lot, delivers very little

    Chris Warrick
    Personal · last shared 2025
    Cal Patersoncalpaterson.com102 people

    Firefox usage is down despite Mozilla's top exec pay going up

    Cal Paterson
    Personal · last shared 2026
    Chris Wellonsnullprogram.com295 people

    Why Aren't There C Conferences?

    Chris Wellons
    Personal · last shared 2026