freenode/#sicl - IRC Chatlog
Search
11:46:33
heisig
I used to feel strongly about that, but nowadays I'm willing to roll with any system, as long as it helps us build wind turbines in record time and promotes women's rights.
11:50:40
heisig
No, I had my share of Lisp teaching for this semester. And the summer semester is dedicated to teaching Python...
11:51:35
heisig
... which is a long-term investment. At least, it will prevent people from using C. And it promotes the idea that dynamically typed languages can be very productive.
11:52:09
beach
Yeah, I agree. In fact, when I was in charge here, I settled on Python as the first language for the undergraduates.
11:54:06
heisig
And the good thing about Python is, no sane person would ever use it for a large, serious software project :)
11:57:58
beach
I probably told this story a dozen times, but at the time, my colleagues the scientists (physics, chemistry) were in charge, and if I had suggested something Lisp like, they would have vetoed it. So I convinced them that in CS we had no use for Python, but the scientists and the engineers do, and that I was doing this for them, not for us.
11:59:08
beach
Plus, the first semester is an orientation. The students haven't chosen yet. I think if I had started with Lisp, they would have massively fled CS in favor of the sciences.
11:59:47
heisig
That reminds me, I haven't sent you the slides from my talk in December. Give me a moment.
12:05:06
heisig
I sent you an email. Some issues are oversimplified in the talk, but I hope you like it.
12:19:58
heisig
I am planning a sequel where I introduce CLOS. But I don't want to overdo it with Lisp propaganda. So maybe in in summer or autumn.
14:25:53
jcowan
heisig: https://pypi.org/project/multimethod/ is a library for doing generic functions in pure Python 3. It may be useful to bridge the gap.
14:37:00
heisig
The multimethod.py code is remarkably brief and readable. Certainly the best you can do (in Python).
15:33:16
jcowan
Recent versions of Py3 laid the groundwork by adding type hints and making them reflectively available. Though the Python AST is not quite as simple as the Lisp AST, it's still pretty easy to understand.
15:38:24
jackdaniel
two or three more backward compatibility breaks an it will have proper lexical scoping and lambdas ;)
15:39:12
beach
Didn't Python use to have LAMBDA and it was removed? I could be wrong. It is just something I heard.
15:47:05
jcowan
It does have lambda and it was not removed. It is limited to a single expression, however. (On the other hand, embedded def does the Right Thing, so at worst you have the burden of thinking up unnecessary names.)
15:57:32
jcowan
It does have the same problem as CL that iteration reassigns the iteration variable rather than rebinding it, which means if you close over the iteration variable N times, you get N identical closures instead of one per value.
15:59:58
beach
jcowan: Well, you know us. We don't consider it a problem as long as it is documented. In this case, I believe the Common Lisp HyperSpec gives the implementation a choice.
16:02:59
jackdaniel
luckily in CL you may write a macro: (defmacro ilambda (capture args &body body) `(let (,@(mapcar (i) (list i i)) capture) (lambda ,args ,@body))
16:07:06
jcowan
jackdaniel: Perhaps that could be done with a decorator, which is analogous to a macro. I don't know
16:07:40
jcowan
Let's just say I think assignment, in the cases where it makes a difference, violates the Principle of Least Surprise.