Comment

Comment by isoprophlex

So... I want to like Lisp, and every time I read stories like these I understand why people enjoy it.

But then I see a code snippet, something like this manual datetime string parser. Apparently the programmer needed to roll their own, and I wonder: how on earth am I going to convince my corpo overlords that this language belongs anywhere near a production system?

  (let ((year  (parse-integer string :start 0 :end 4))
        (month (parse-integer string :start 6 :end 7))
        (day   (parse-integer string :start 9 :end 10)))
    (- (+ (\* year   31556926) ;; no. of seconds in a year
          (\* month  2629743)  ;; no. of seconds in a month
          (\* day    86400))   ;; no. of seconds in a day
       (\* 1900 31556926))))   ;; lisp timestamps start at 1900
parent isoprophlex 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton