News for hackers. Stuff that matters.
Re:Languages to improve your Python by pmoriarty on Tuesday October 13, 2015 @10:08AM (#10380537)
They missed Scheme, one of the most elegant and powerful languages in existence.
Re:Languages to improve your Python by greghendershott on Tuesday October 13, 2015 @12:06PM (#10381368)
I'd suggest Racket, a descendant of Scheme.

- It is really easy to download, install, and be coding in 5 minutes.

- There's a nice GUI IDE, if that's your cup of tea. (Also I maintain racket-mode for Emacs.)

- It is "batteries included" (maybe not compared to Python (!), but definitely compared to most Schemes).

- You can write everything from command-line programs that launch quickly, to GUI apps, to web apps.

And particularly why I mention it here:

- You can explore many approaches mentioned in the OP: functional, gradual typing, object-oriented, lazy evaluation, datalog, and more. (Ultimately, Racket is "a programming-language programming language". Although you can ignore that level of abstraction and simply use it as a very nice lisp.)

Re:Languages to improve your Python by agentultra on Tuesday October 13, 2015 @10:20AM (#10380619)
But they did mention Hy, a lisp dialect written in Python. I find this hy-larious.

It certainly is one way to learn Python better as you'll be working, indirectly, in its abstract syntax tree. You can do this in plain Python but the ast module is woefully under-documented and rarely used.

Re:Languages to improve your Python by TeMPOraL on Tuesday October 13, 2015 @11:11AM (#10380980)
I think they chose Hy over other Lisps because of closer Python interop. After all, the post is aimed towards Python programmers.
Re:Languages to improve your Python by dec0dedab0de on Tuesday October 13, 2015 @10:37AM (#10380720)
I recently used the ast module to find imports to see which lines in "pip freeze" are actually necessary for any given file/directory. It was pretty neat, and I hope I have a reason to use it again.
Re:Languages to improve your Python by agumonkey on Tuesday October 13, 2015 @11:21AM (#10381045)
hy is cute, but there's another skywalker: pixie.
Re:Languages to improve your Python by amyjess on Tuesday October 13, 2015 @10:29AM (#10380669)
Not just Scheme, but given how important metaprogramming is to Python, I was hoping there would be more Lisp dialects in the list.
Re:Languages to improve your Python by jdimov9 on Tuesday October 13, 2015 @10:58AM (#10380878)
How important is metaprogramming to Python? Frankly, in my 16+ years as Python developer, I have never seen anything that can be remotely described as metaprogramming in Python, except in academic code and experimental GitHub projects.
Re:Languages to improve your Python by agentultra on Tuesday October 13, 2015 @11:50AM (#10381246)
You've probably used it without knowing. It's not typically useful in application code but quite useful in libraries.

The ABC module, collections, frozenset. Basically anywhere we add custom types or generate new classes to instantiate.

Re:Languages to improve your Python by chc on Tuesday October 13, 2015 @01:52PM (#10382161)
That surprises me. What does frozenset have to do with metaprogramming? I thought it was just a variant of a hash table or something like that.
Re:Languages to improve your Python by agentultra on Tuesday October 13, 2015 @02:16PM (#10382349)
That's an oops on my part. Chalk it up to a baby who likes to wake up at 4:45am and a toddler who wakes up at 7.

frozenset is just a built-in immutable set type with a nice hashing algorithm for the kinds of workloads you'd expect. It's defined in Objects/setobject.c and is a nice read.

I was just rambling and I've used frozenset in metaprogramming code when constructing classes via decorators to implement Lattice types with decorated monotone/morphism methods.

Sorry for the confusion!

Re:Languages to improve your Python by chc on Tuesday October 13, 2015 @11:10AM (#10380969)
That seems like a pretty fair label for what decorators do.
Re:Languages to improve your Python by rudolf0 on Tuesday October 13, 2015 @04:54PM (#10383408)
They are a form of metaprogramming, but other than decorators, Python generally discourages other kinds of metaprogramming. Metaclasses are reserved for very specific use-cases, and monkey patching or re-opening class definitions are almost always considered anti-patterns.
Re:Languages to improve your Python by dude17172009 on Tuesday October 13, 2015 @10:33AM (#10380692)
Edit: Missed Octave in the list. Too quick in my reading.

Original:

  Another language they might have missed for use with SciPy/Python Notebook: Matlab/WolframAlpha/Octave.
Re:Languages to improve your Python by dec0dedab0de on Tuesday October 13, 2015 @10:35AM (#10380701)
Another language they might have missed for use with SciPy/Python Notebook: Matlab/WolframAlpha/Octave.

I think part of the point was to support other Open Source languages.

Re:Languages to improve your Python by Thrymr on Tuesday October 13, 2015 @10:37AM (#10380719)
They didn't miss it: "Array-oriented data processing: MATLAB/Octave, Julia"