News for hackers. Stuff that matters.
Re:New Machine Learning Gems for Ruby by cutler on Sunday June 20, 2021 @01:22AM (#27567349)
... and Clojure. These two stand out as the most elegantly designed creativity-enhancing programming languages. The rest are mainly a set of constraints. Python is the VHS of programming languages with its pathetic lambdas.
Re:New Machine Learning Gems for Ruby by toxik on Sunday June 20, 2021 @05:57AM (#27568606)
This may surprise you, but using lambda is considered a sign of bad programming practice in Python.

In general, this whole thread completely misses the point Python makes. Do not invite “clever” language (ab)use. Do the straightforward thing.

Re:New Machine Learning Gems for Ruby by cutler on Sunday June 20, 2021 @09:45AM (#27569891)
> This may surprise you, but using lambda is considered a sign of bad programming practice in Python

Only by its BDFL. Most languages consider lambdas to be first class so why not let the user decide?

Re:New Machine Learning Gems for Ruby by toxik on Sunday June 20, 2021 @11:42AM (#27571141)
Because the user makes poor choices, that’s the point - don’t do the clever thing, do the straightforward thing. Lambdas are discouraged in Python, and that’s not just something Guido van Rossum thinks (who, by the way, is not BDFL - there is none anymore and there hasn’t been for a long time now.)
Re:New Machine Learning Gems for Ruby by cutler on Sunday June 20, 2021 @05:45PM (#27574189)
If lambdas are clever then so is most Node.js code. Guido may have stepped down but he was responsible for this "Pythonic" attitude to lambdas. It's like the Python community is parodying Matz with "Guido hates FP therefore we hate FP".
Re:New Machine Learning Gems for Ruby by arcturus17 on Sunday June 20, 2021 @05:29AM (#27568481)
Lambda syntax is indeed horrible in Python. I hope some day they do something to fix it… Otherwise I really enjoy the language and the ecosystem.
Re:New Machine Learning Gems for Ruby by truth_ on Sunday June 20, 2021 @01:54AM (#27567506)
What do you think about Elixir in this context? Is it not "creativity-enhancing" enough?
Re:New Machine Learning Gems for Ruby by cutler on Sunday June 20, 2021 @09:49AM (#27569930)
Elixir doesn't have an array/vector implementation. Instead it has to borrow Eralng's ugly offering or hack Map with numeric keys as in PHP.
Re:New Machine Learning Gems for Ruby by beakerbreaker on Sunday June 20, 2021 @10:19AM (#27570256)
There is some exciting development on that front by building on XLA.

https://github.com/elixir-nx/nx/tree/main/nx

Re:New Machine Learning Gems for Ruby by cutler on Sunday June 20, 2021 @11:09AM (#27570768)
So I can get a cutting-edge PyTorch/TF multi-dimensional array with Nx but Elixir itself still has no basic built-in vector? I don't get it.