Re:30k Hours (2019)
by fredrikholm on Friday February 26, 2021 @04:22AM
(#26272885)
> # sum(years * (hours/week)) * (weeks/year)
Appears to be Python?
Here's it converted to Common Lisp:
(defun sum (years hours-per-week weeks-per-year)
(* (* years hours-per-week) weeks-per-year))You must write your own lisp, and that’s the beauty of it.
Definitely not LISP. LISP uses a prefix notation, the expression in the post uses infix (like most programming languages).
Yes it's definitely Python. Not sure why I wrote Lisp (other than that my variants of Lisp look like that, with mixed fix notation).
Re:30k Hours (2019)
by qinjian623 on Friday February 26, 2021 @04:16AM
(#26272842)
This is the lisp-way:
(* 48 (+ (* 4 10) (* 2 30) (* 5 20) (* 6 20) (* 6 25) (* 15 10) ))
I don't really know Lisp, but how do you get a Lisp to run that expression? I tried it in Emacs Lisp, Racket, Common Lisp.
It runs just fine in Python, and returns: 29760