Re:My Python Development Environment, 2020 Edition
by behnamoh on Monday November 11, 2019 @08:48PM
(#21510799)
And not just Python, try writing a small script in Haskell or Clojure and you'll see how much burden there is to setup their environments.
[ Parent
| on HN ]
Re:My Python Development Environment, 2020 Edition
by zmmmmm on Tuesday November 12, 2019 @12:39AM
(#21511793)
People hate on Gradle endlessly, but the fact that 99% of my JVM based applications can be successfully launched including entirely self-contained dependencies with
./gradlew run
is a huge boon and one of the things that keeps me sticking with the ecosystem.
Re:My Python Development Environment, 2020 Edition
by baaym on Tuesday November 12, 2019 @01:57AM
(#21512082)
You kind of mentioned this yourself already, but this boon is more of a feature of the JVM (the classpath) rather than the dependency manager.
If Python would have a similar concept rather than depending on a global module location we would be able to replicate the same developer ergonomics as we have for the JVM.
Re:My Python Development Environment, 2020 Edition
by whateveracct on Monday November 11, 2019 @10:38PM
(#21511327)
Well with Haskell and Clojure, many people just use a pretty plain text editor + a REPL and maybe. And for Haskell at least, that's super easy to install. I suppose there isn't One True Way, but each of the popular options (cabal, Nix+cabal, stack) are only a couple steps.
Haskell with new-style cabal works like a charm with `cabal init` for package setup. And then ghci from there will give you...
- expression evaluation ofc
- type-at-point via type hole annotations
- Laziness inspector via :print
- Breakpoint debugger (someone just posted a nice Reddit text post about it today)
- Package information of terms via :info (and :load $MODULE to get any top-level term in $MODULE into repl scope)
- Docs via :doc (this is pretty new)
- Module export lists via :browse
off the top of my head
Re:My Python Development Environment, 2020 Edition
by ghostwriter on Tuesday November 12, 2019 @08:36AM
(#21513930)
In Haskell that would be (given Stack is not shipped with your OS's package manager, which is extremely rare):
$ curl -sSL https://get.haskellstack.org/ | sh
$ stack install turtle
$ cat >> ./hello.hs <<EOL
#!/usr/bin/env stack
-- stack --resolver lts-14.14 script
{-# LANGUAGE OverloadedStrings #-}
import Turtle
main = echo "Hello, world!"
EOL
$ chmod u+x ./hello.hs
$ ./hello.hs
Hello, world!
With Nix it would be even simpler.