Live data from Hacker News

Python vs Common Lisp, workflow and ecosystem (2019)

lisp-journey.gitlab.io

51–60 of 83 posts

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#51
post #9

Earlier quoted context omitted.

Yeah, they're very much doing it. Pandas is huge, libraries like Spacy, NetworkX, etc exist. It's a massive and good ecosystem. Python is the goto for scientific computing in most of the sciences for newer students I'd hazard a guess over the older R and Julia. This will be blindingly obvious if you work in that area. Yes, you can do it in another language, but you're missing out on a lot of stuff that is just done a…

> and is fast because the speedy parts aren't in Python. Having worked months with a slew of senior data scientists, this was a bit painful. Python is so slow and those data scientists were very good at coming up with solutions for the issues of the company, but the implementations (using Spacy, Pandas and other libs) had enough Python in them to make them not practical for the company use case. Nice prototypes which…

The vast majority of the time that I've seen slow Python code, it's because people are not leveraging the libraries in the right way, e.g. by using groupby-apply in Pandas or not vectorising while using NumPy.

I can't speak as to the specific use cases that you've encountered, but performance wise, I have found Python to be a fine choice for several ML services.

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#52
post #45

Earlier quoted context omitted.

Beginner approachability seems to be the key feature. Possibly also integration with external libraries.

That's my take on it, but I've ran into people praising it like it was alien theory of everything dropped by gods as a gift. I like python but I'm a bit fed up with the mobthink (how surprising).

Another factor, I think, is that a heck of a lot of people don't think they will still be doing this for a long time.

Programming is something interesting and fun they are going to do for a few years while young, until (pick one) {their band takes off, someone funds their startup idea and they hire others to do the programming while they generate genius ideas and run the business, they get promoted to a high paying executive position that involved management and architecture and others do the coding, their podcast becomes a hit and they can live off that, the small company they work at IPOs or gets bought and they make enough to retire at 30, etc).

So they learn a fairly easy language that has lots of libraries that cover most things you do in a routine developer job.

...and before they know it they are 50-60 and still writing a lot of code, and realizing that if they had known they would still be doing this 30-40 years later they would have been better off if they had learned and used and gotten good with some of the languages that have a reputation of being very productive but hard to learn.

I'd also add spreadsheets and database to that. At one point I was the database guy at work, because no one else was available. I learned enough SQL to get by, but was in no way a database expert. Heck, we had to pick job titles at one point that described what we did to have on the business cards the company was giving us, and I put down "Database Roustabout" [1], which should give you an idea of where I stood. That was 20 years and I'm still the database guy at work. It would have been a lot better if sometime early on I had said "I'm going to become really good at SQL even though I'm sure someone else will become database guy in a year or so".

[1] Roustabout. NOUN. An unskilled or casual laborer. (North American) A circus laborer.

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#53

Not to start a flamewar, every time I see a python talk (pycon or else), with fancy tricks like metaclasses.. all I can think is that, well, CLOS would have been perfectly fit for this too. I know people are tired of the "lisp/smalltalk did it better" but what features of python are not possible (or hard) in CL[OS] ? ps: how many CL shops are out there ? I'd work near free just to try a CL team once.

Please email hello@atlas.engineer with your details. We are a CL shop responsible for Nyxt browser. Thanks for your time!

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#54

Not to start a flamewar, every time I see a python talk (pycon or else), with fancy tricks like metaclasses.. all I can think is that, well, CLOS would have been perfectly fit for this too. I know people are tired of the "lisp/smalltalk did it better" but what features of python are not possible (or hard) in CL[OS] ? ps: how many CL shops are out there ? I'd work near free just to try a CL team once.

It might serve to evaluate why you feel the way you feel on a deeper level. Based only on your comments here I don't think any ire is justified.

For someone to to even make the determination that "Lisp did my better" they must

A. Have a comprehensive knowledge of both Python and Lisp.

B. Have some understanding of the history of the languages.

C. Understand the problem on an intrinsic, fundamental level that enables them to evaluate which approach is better.

D. Generalize the problem to a broader scope to demonstrate why one language is better on a broader level.

E. Understand every other language ever used so when they show why Lisp does it better, they can defend themselves when someone comes up and tells them, "actually, Pascal does this even better yet."

Furthermore, it doesn't really matter what language did it better. The point of most talks is simply to demonstrate how to solve some problem in a certain language. If every talk started with "you can do this in Python, and I'll show you how, but you should probably just switch to Lisp because it does it better," that isn't very helpful.

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#55

Not to start a flamewar, every time I see a python talk (pycon or else), with fancy tricks like metaclasses.. all I can think is that, well, CLOS would have been perfectly fit for this too. I know people are tired of the "lisp/smalltalk did it better" but what features of python are not possible (or hard) in CL[OS] ? ps: how many CL shops are out there ? I'd work near free just to try a CL team once.

It might serve to evaluate why you feel the way you feel on a deeper level. Based only on your comments here I don't think any ire is justified. For someone to to even make the determination that "Lisp did my better" they must A. Have a comprehensive knowledge of both Python and Lisp. B. Have some understanding of the history of the languages. C. Understand the problem on an intrinsic, fundamental level that enables…

Oh I don't feel ire, maybe some form of frustration at best (i'm not young enough anymore to get angry for a talk :)

It's more about the 'wheel reinvention' syndrome that creates fatigue in me.

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#56
post #47
post #40

Earlier quoted context omitted.

There's quite a few C/C++ libraries for those things, right? Integrating them with proper FFI (of the kind that Chez has, for example - or LuaJIT, for that matter) seems hardly difficult...although differential equations or optimization problems may be better served without any language interfaces whatsoever since they involve functional parameterization. That generally sucks with mixed-language solutions, to the ext…

"seems hardly difficult" and "could probably use" is seldom faster than "out of the box" and "already nicely integrated"

Maybe, but the latter definitely isn't the case with Python, especially in case of PyPy (or at least it wasn't the case the last time I tried that), so there's that.

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#57
There is popular python environment where you do not restart the environment after an edit: Jupyter notebooks. This comes with its own set of problems, which CL also has, but I still find notebooks a worthwhile mindset for writing applications. There’s no need to equate python with the script mindset.

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#59

Earlier quoted context omitted.

> do sparse matrix computations on massive matrices This is completely impossible to do in the Python language, unless you resort to external tooling written in C or Fortran. Sure, you can call these codes from Python, as you can call them from any other language.

This is really splitting hairs isn't it? Plenty of languages are not bootstrapped. Isn't that essentially the same thing?

No, nothing to do with bootstraping, this is completely different. My point is that you cannot develop the very algorithms that you are using. Numerical math is not only about using ready-made algorithms, it is mostly about implementing new algorithms. For example, if you invent a new matrix factorization algorithm, it is very likely that you cannot implement it in Python (or if you can, it will be either very slow or very cumbersome). Python+numpy is not a natural way to write many numerical algorithms, based on explicit loops and new conditions inside them. Whereas in Fortran or in C, the implementation is likely to be much simpler, natural and fast.

Re: Python vs Common Lisp, workflow and ecosystem (2019)

#60
post #45

Not to start a flamewar, every time I see a python talk (pycon or else), with fancy tricks like metaclasses.. all I can think is that, well, CLOS would have been perfectly fit for this too. I know people are tired of the "lisp/smalltalk did it better" but what features of python are not possible (or hard) in CL[OS] ? ps: how many CL shops are out there ? I'd work near free just to try a CL team once.

Beginner approachability seems to be the key feature. Possibly also integration with external libraries.

This is my impression, too. When I was TAing an intro CS course back in university, I saw students new to programming struggling with Lisp (specifically Scheme in this case) much earlier in the learning process than even C.

This manifested in a few spots. The first is, yes, s-expressions. Yes, yes, I know, s-expressions are integral to the power of lisp, and they're really not hard to read once you get used to them. All of that is beside the point. The reality I saw on the ground, when teaching people to program, is that even people who have no prior programming experience whatsoever, and therefore no preconceptions to get over, have a harder time grasping s-expressions than they do algol-style syntax. I don't know why. I didn't have the same problem myself. But it's a real phenomenon that I struggled to help people through on a regular basis, and the lisp community's defensiveness about it is not going to make it go away.

Arbitrary-seeming names with zero mnemonic value is another problem. Car, cdr, progn, etc. - it takes a special kind of personality to not be put off by this sort of stuff. Not everyone has that kind of personality. Not everyone should have that kind of personality.

Finally, all the hair-splitty (at least to a newcomer) distinctions to contend with. =, eq, eql, equal, and equalp, or let, let* and letrec. Sure, there are reasons for these distinctions. But a language that can get by without quite so many of them is going to be a lot more attractive to newcomers. Even if it comes at the cost of footguns, if they're unlikey to be discovered until later.

Post reply on HN