5 ms·
Languages to improve your Python
- pmoriarty 11y agoThey missed Scheme, one of the most elegant and powerful languages in existence.
- agentultra 11y agoBut 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.
- dec0dedab0de 11y agoI 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.
- TeMPOraL 11y agoI think they chose Hy over other Lisps because of closer Python interop. After all, the post is aimed towards Python programmers.
- agumonkey 11y agohy is cute, but there's another skywalker: pixie.
- amyjess 11y agoNot just Scheme, but given how important metaprogramming is to Python, I was hoping there would be more Lisp dialects in the list.
- jdimov9 11y agoHow 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.
- chc 11y agoThat seems like a pretty fair label for what decorators do.
- rudolf0 11y agoThey 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.
- agentultra 11y agoYou'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.
- chc 11y agoThat 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.
- agentultra 11y agoThat'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!
- dude17172009 11y agoEdit: 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.
- dec0dedab0de 11y agoAnother 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.
- Thrymr 11y agoThey didn't miss it: "Array-oriented data processing: MATLAB/Octave, Julia"
- greghendershott 11y agoI'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.)
- patrickmay 11y agoSQL is missing from their list. A solid understanding of its capabilities is important. Developers should know when to use it and when not to.
- baldfat 11y agoBUT SQL is so old /sarcasm. It drives me nuts when people who should know better can't just jump on notepad and write a simple query in SQL. They spend half an hour looking how to do what a basic 101 SQL code could solve in 30 seconds.
- ised 11y agoI once read that Python, like Pascal, was intended to be a "teaching language". Is this true?
- maxerickson 11y agoNo. It was heavily influenced by one though: http://python-history.blogspot.com/2009/01/personal-history-part-1-cwi.html http://python-history.blogspot.com/2009/01/personal-history-...
- qznc 11y agoNo. https://en.wikipedia.org/wiki/History_of_Python https://en.wikipedia.org/wiki/History_of_Python
- sotojuan 11y agoNo. It's just used in universities for teaching programming and Computer Science because it's easy to learn.
- sotojuan 11y agoNo. It's just used in universities for teaching programming and Computer Science because it's easy to learn.
- nanoojaboo 11y agowhat about NanooJaboo?
- radiowave 11y agoInteractive programming environment: Smalltalk
- netcraft 11y agoanother one for the gradual typing would be core.typed https://github.com/clojure/core.typed https://github.com/clojure/core.typed
- Bostonian 11y agoIn the section "Array-oriented data processing", Fortran should be included. Fortran 95 (and the earlier Fortran 90) has array operations, and Fortran 2003 supports object-oriented programming. The gfortran compiler, which is part of gcc, implements all of Fortran 95 and almost all of Fortran 2003. Fortran is also one the primary languages in which statistical algorithms have been coded.
- baldfat 11y agoI am a self-taught programmer/hacker and the best thing I ever learned was Racket. http://racket-lang.org/ http://racket-lang.org/ Here is what got me off the ground. The first unit is learning ML and the second unit was Racket. https://www.youtube.com/user/afigfigueira/playlists?shelf_id=6&sort=dd&view=50 https://www.youtube.com/user/afigfigueira/playlists?shelf_id... This is from a Coursera Course that is not being offered right now. It covers a lot of different languages but the Racket and ML parts are a great starting point. I liked this book - http://www.amazon.com/Realm-Racket-Learn-Program-Game-ebook/dp/B00DHRV584/ref=mt_kindle?_encoding=UTF8&me= http://www.amazon.com/Realm-Racket-Learn-Program-Game-ebook/... If that is too simple there always is http://www.amazon.com/How-Design-Programs-Introduction-Programming/dp/0262062186/ref=la_B000AQ3UQU_1_4?s=books&ie=UTF8&qid=1444664197&sr=1-4 http://www.amazon.com/How-Design-Programs-Introduction-Progr... I prefer seeing people code and talk about it so the videos are great.
- cponeill 11y agoI took this course last year and loved it. As a self taught developer as well, these videos really helped me understand some concepts that I still hadn't wrapped my head around yet.
- dwenzek 11y agoI like the call to tribal pride to build a better language and more constructive community. I like too the fair descriptions of the major Python's alternative programming approaches and languages, even if this list is incomplete.