# Julia from the perspective of a pythonista

**URL:** <https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956>\
**Category:** General Usage\
**Tags:** feedback\
**Created:** [February 24, 2021, 7:45pm UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956 "2021-02-24T19:45:59Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [February 24, 2021, 11:34pm UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/21 "2021-02-24T23:34:05Z")

</div>

Yeah. This would be really nice. Also, if we had a new “Docs for beginners” section, it would be an easier sell to make a lot of the existing docs a little terser. Right now our docs are fairly verbose, which can make it easy to miss stuff.

---

<div class="post-metadata">

**Author:** ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)\
**Post date:** [February 24, 2021, 11:40pm UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/22 "2021-02-24T23:40:41Z")

</div>

I am genuinely curious about how you found your way to Julia for this use-case. Usually people looking to do ML/DL will hit upon one of the relevant community channels (e.g. #flux-bridged, #mlj on Slack or #domain:ml here). Then if something like “what is the Julia equivalent to Sympy?” came up, it would be much easier to redirect to ModellingToolkit because a) the maintainership overlaps and b) most of us are familiar with it. Likewise for questions about IDE startup and performance. I don’t mean to imply you took the wrong path, but it does seem like you’ve put in a great deal more time than the average “Python vs Julia” poster (which is a good thing, thanks for such a detailed post) and I’m surprised we weren’t able to address more of your concerns before this as they came up.

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [February 25, 2021, 8:04am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/23 "2021-02-25T08:04:09Z")

</div>

Strange. I just timed it on my computer, starting VSCode, the Julia REPL and executing `println("Hello World!")` took for me 8 seconds in total.

Edit: I tested with Windows 10 native (no WSL), Julia 1.6.  
The 30 seconds for Python is also very slow, could it be related to WSL? Are you using WSL 1 or 2?

---

<div class="post-metadata">

**Author:** ![dariush-bahrami](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Post date:** [February 25, 2021, 8:35am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/24 "2021-02-25T08:35:34Z")

</div>

> [@Oscar\_Smith](#):
>
> “Docs for beginners”

The word “beginer” should not imply that parts of Julia’s language are considered high-level content and that the existing documentation is sufficient for those parts.  
Documentation should generally be written on the assumption that the reader does not already know something and wants to learn by reading the text of the documentation.

> [@Oscar\_Smith](#):
>
> Right now our docs are fairly verbose

I agree with you that the documentation is verbose, I think the reason most of the sections are verbose is that the author is trying to impress the reader rather than a technical explanation of the features of the language.

---

<div class="post-metadata">

**Author:** ![dariush-bahrami](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Post date:** [February 25, 2021, 8:46am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/25 "2021-02-25T08:46:10Z")

</div>

> [@ToucheSir](#):
>
> I am genuinely curious about how you found your way to Julia for this use-case.

Honestly, I do not feel the need for a special package in Julia for my work. Because in the field of data science and machine learning, Python libraries are more than enough for practical and research work.  
I like Julia as a language with unique features. I like to learn the language itself, apart from the packages written for it, and if I’m looking for packages for the things I like, it 's because I want to see what interesting things people have written in that language.  
When you look at language from this perspective, the first source you look for is usually the language documentation itself.

---

<div class="post-metadata">

**Author:** ![dariush-bahrami](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Post date:** [February 25, 2021, 8:51am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/26 "2021-02-25T08:51:27Z")

</div>

> [@lungben](#):
>
> could it be related to WSL?

I do not think so, I first tested Julia on Windows and it worked similarly to the results I posted. Then I said to myself, maybe Julia is not very good for Windows, and then I decided to install it in WSL.

> [@lungben](#):
>
> Are you using WSL 1 or 2?

Its WSL2

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 25, 2021, 8:51am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/27 "2021-02-25T08:51:47Z")

</div>

> [@dariush-bahrami](#):
>
> I think the reason most of the sections are verbose is that the author is trying to impress the reader rather than a technical explanation of the features of the language.

I doubt that anyone is trying to impress here. One reason for the verbosity of the documentation is that historically it was both a “tutorial” and a technical documentation and has been a strange mixture ever since. Maybe we should split these two variants at some point. One readable, verbose “getting started tutorial” and one technical documentation.

---

<div class="post-metadata">

**Author:** ![dariush-bahrami](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Post date:** [February 25, 2021, 8:53am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/28 "2021-02-25T08:53:38Z")

</div>

> [@carstenbauer](#):
>
> Maybe we should split these two variants at some point. One readable, verbose “getting started tutorial” and one technical documentation.

Yes, it will be great.

---

<div class="post-metadata">

**Author:** ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Post date:** [February 25, 2021, 9:05am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/29 "2021-02-25T09:05:39Z")

</div>

Hey @dariush-bahrami ,

welcome to the community and thanks for your feedback. It’s very much appreciated.  
I’m wondering whether you always execute a file directly in VS-code or the command line. I think the more standard way (after using Julia for quite some time) is to open the REPL and then use `include` to execute the file or include and track it using [https://github.com/timholy/Revise.jl](https://github.com/timholy/Revise.jl)  
This is by no means a critique of your current way of doing things more a critique to us who don’t publicly show others our workflow 😉

Regarding some of your other points:  
I agree that the number of packages isn’t that big yet and there are still quite a lot of packages missing whereas for others there are quite some which are unmaintained and overlapping. I do think that the PyCall package can be helpful as one can write stuff that is using multiple dispatch and speed on some additional code outside of a package in Julia and can use the size of the Python community to ones advantage in combining their two strength.

Hope you’re giving Julia another chance 🙂

---

<div class="post-metadata">

**Author:** ![yha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yha/32/3502_2.png) [@yha](https://discourse.julialang.org/u/yha)\
**Post date:** [February 25, 2021, 10:27am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/30 "2021-02-25T10:27:09Z")

</div>

> [@lungben](#):
>
> Strange. I just timed it on my computer, starting VSCode, the Julia REPL and executing `println("Hello World!")` took for me 8 seconds in total.

Is that by typing the command directly in the REPL?  
I find that execution of code from the editor using Alt+Enter (“Execute Code and Move”) or Shift+Enter (“Execute Code Cell and Move”) remains unresponsive for quite a while after the REPL is already up and responding.

---

<div class="post-metadata">

**Author:** ![dariush-bahrami](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Post date:** [February 25, 2021, 10:50am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/31 "2021-02-25T10:50:12Z")

</div>

> [@Wikunia](#):
>
> I’m wondering whether you always execute a file directly in VS-code or the command line.

I am currently using the REPL or Jupyter environment to learn Julia. But these environments are not suitable for writing modular code and packages.

> [@Wikunia](#):
>
> I think the more standard way (after using Julia for quite some time) is to open the REPL and then use `include` to execute the file

Thanks for your suggestion, I will try this

> [@Wikunia](#):
>
> I do think that the PyCall package can be helpful as one can write stuff that is using multiple dispatch and speed on some additional code outside of a package in Julia and can use the size of the Python community to ones advantage in combining their two strength.

I do not agree with you, because for most problems you will probably find a Python package, and if you want to use Python to solve problems in Julia, Julia will never find the character it deserves. In addition, you can use Python to call Python code. I think the PyCall package has been overused.

> [@Wikunia](#):
>
> Hope you’re giving Julia another chance 🙂

For now, despite all the problems I have mentioned, I enjoy learning Julia.

---

<div class="post-metadata">

**Author:** ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Post date:** [February 25, 2021, 10:53am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/32 "2021-02-25T10:53:09Z")

</div>

As a shameless plug you might find part of my blog post interesting about workflow with Revise [Julia Basics: REPL & Revise](https://opensourc.es/blog/basics-repl-revise/)  
I think most of us package developers use it all the time and load the Julia REPL once in the morning and leave it open for the rest 😉

---

<div class="post-metadata">

**Author:** ![dariush-bahrami](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Post date:** [February 25, 2021, 10:54am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/33 "2021-02-25T10:54:09Z")

</div>

Thank you, I will definitely try it.

---

<div class="post-metadata">

**Author:** ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Post date:** [February 25, 2021, 11:05am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/34 "2021-02-25T11:05:00Z")

</div>

> [@dariush-bahrami](#):
>
> I do not agree with you, because for most problems you will probably find a Python package, and if you want to use Python to solve problems in Julia, Julia will never find the character it deserves. In addition, you can use Python to call Python code. I think the PyCall package has been overused.

I have only tried PyCall recently so I’m not using it frequently I just find it quite interesting but one can probably argue the other way around works as well. Haven’t tried that though so I’m not sure how well it works.  
For my personal project it was just that I used a lot of packages that I find very nice in Julia and was missing one thing I couldn’t find and found out how to do it in Python.  
The main point is probably if more than 5% percent or even 10% of your code needs Python library then you might want to look into just using Python if it doesn’t have big downsides based on their huge community and number of packages. If you only need Python for one or two function calls inside your code because Julia is lacking that package then it’s nice that PyCall exists.

---

<div class="post-metadata">

**Author:** ![dariush-bahrami](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Post date:** [February 25, 2021, 11:14am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/35 "2021-02-25T11:14:29Z")

</div>

> [@Wikunia](#):
>
> The main point is probably if more than 5% percent or even 10% of your code needs Python library then you might want to look into just using Python if it doesn’t have big downsides based on their huge community and number of packages. If you only need Python for one or two function calls inside your code because Julia is lacking that package then it’s nice that PyCall exists.

I agree with you, but not everyone uses PyCall this way. By overuse, I mean that they use PyCall to port a complete package to Julia as a wrapper for packages in Python. This is not a bad thing in itself, the problem starts with eliminating the need to write new packages in Julia.

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [February 25, 2021, 11:30am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/36 "2021-02-25T11:30:14Z")

</div>

Yes, I typed it directly into the REPL.  
Also right-clicking on a .jl file and select “Julia: Execute File” is rather fast for me.  
Alt+Enter / Shift+Enter takes also for me a while after VSCode startup because it seems to wait until the indexing of Julia packages is finished - looks like this issue: [[FR] Make inline eval responsive during "indexing packages" · Issue #1962 · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/issues/1962)

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 25, 2021, 11:33am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/37 "2021-02-25T11:33:03Z")

</div>

> [@dariush-bahrami](#):
>
> By overuse, I mean that they use PyCall to port a complete package to Julia as a wrapper for packages in Python. This is not a bad thing in itself, the problem starts with eliminating the need to write new packages in Julia.

I’m curious, do you have an/a few example/s?

---

<div class="post-metadata">

**Author:** ![dariush-bahrami](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariush-bahrami](https://discourse.julialang.org/u/dariush-bahrami)\
**Post date:** [February 25, 2021, 11:43am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/38 "2021-02-25T11:43:49Z")

</div>

> [@carstenbauer](#):
>
> I’m curious, do you have an/a few example/s?

> **[GitHub - malmaud/TensorFlow.jl: A Julia wrapper for TensorFlow](https://github.com/malmaud/TensorFlow.jl)**
>
> A Julia wrapper for TensorFlow. Contribute to malmaud/TensorFlow.jl development by creating an account on GitHub.

> **[GitHub - JuliaPy/SymPy.jl: Julia interface to SymPy via PyCall](https://github.com/JuliaPy/SymPy.jl)**
>
> Julia interface to SymPy via PyCall. Contribute to JuliaPy/SymPy.jl development by creating an account on GitHub.

> **[GitHub - jverzani/PySide.jl: julia interface for accessing Qt via PyCall and...](https://github.com/jverzani/PySide.jl)**
>
> julia interface for accessing Qt via PyCall and PySide - GitHub - jverzani/PySide.jl: julia interface for accessing Qt via PyCall and PySide

> **[GitHub - rjrosati/SymbolicTensors.jl: Manipulate tensors symbolically in...](https://github.com/rjrosati/SymbolicTensors.jl)**
>
> Manipulate tensors symbolically in Julia! Currently needs a SymPy dependency, but work is ongoing to change the backend to SymbolicUtils.jl - GitHub - rjrosati/SymbolicTensors.jl: Manipulate tensor...

> **[GitHub - pygae/GAlgebra.jl: Julia interface to GAlgebra via PyCall](https://github.com/pygae/GAlgebra.jl)**
>
> Julia interface to GAlgebra via PyCall. Contribute to pygae/GAlgebra.jl development by creating an account on GitHub.

> **[GitHub - ichatzinikolaidis/CasADi.jl: Julia interface to CasADi via PyCall](https://github.com/ichatzinikolaidis/CasADi.jl)**
>
> Julia interface to CasADi via PyCall. Contribute to ichatzinikolaidis/CasADi.jl development by creating an account on GitHub.

> **[GitHub - rdeits/PyLCM.jl: Julia bindings for LCM, the Lightweight...](https://github.com/rdeits/PyLCM.jl)**
>
> Julia bindings for LCM, the Lightweight Communications and Marshalling library, via PyCall - GitHub - rdeits/PyLCM.jl: Julia bindings for LCM, the Lightweight Communications and Marshalling library...

> **[GitHub - beacon-biosignals/PyMNE.jl: Julia interface to MNE-Python via...](https://github.com/beacon-biosignals/PyMNE.jl)**
>
> Julia interface to MNE-Python via PythonCall . Contribute to beacon-biosignals/PyMNE.jl development by creating an account on GitHub.

> **[GitHub - wookay/BlenderPlot.jl: a prototype version of the 📊 plot on Blender...](https://github.com/wookay/BlenderPlot.jl)**
>
> a prototype version of the 📊 plot on Blender using PyCall - GitHub - wookay/BlenderPlot.jl: a prototype version of the 📊 plot on Blender using PyCall

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [February 25, 2021, 11:58am UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/39 "2021-02-25T11:58:37Z")

</div>

> [@dariush-bahrami](#):
>
> [malmaud/TensorFlow.jl](https://github.com/malmaud/TensorFlow.jl)

For interest:  
As the co-author of TensorFlow.jl, do note that it was made for julia 0.4, which was when julia’s ecosystem was still young.  
It’s now basically feature frozen, due to the fact that I have moved on to working on Julia tools like Flux.jl  
These days there are a bunch of strong julia alternatives.  
Flux.jl, KNet.jl, Avalon.jl (nicely all of which wrap NNLib.jl for many operations)

It’s also not correct to characterize it as a wrapper of python.  
It doesn’t really use PyCall, not for most things.  
It wraps the LibTensorFlow C-API, for over ten thousand operations.  
Just like the python tensorflow library does.  
(It technically uses PyCall, but only for a single graph manipulation that doesn’t actually have a C library back-end)  
It’s (IMO) a good example of a library that is much easier to write in julia than other languages.  
It uses julia’s metaprogramming to generate the wrappers of all the API.  
For a while it was a few features ahead of the python tensorflow library, supporting things like `xs[i; mask]` when writing that in python would have been a bunch of calls to less idiomatic operations like `gathernd`.

* * *

I think more generally you will find that most of those libraries listed do have pure julia alternatives.  
In some cases because they are old, and julia alternatives were not written.  
in some cases because people have a particular liking the python API, or that they want it as a baseline, or that there is just the gains of a pure julia implementation is less than doing some other thing.  
(No need to reinvent the wheel)

For interest, my employer has what is probably the largest production Julia code base (~450K LOC).  
Last time I checked the only python dependency we have was for intereacting with SOAP.  
At some point we plan to make a julia library for that, or wrap a C library.  
Makes sense that there wouldn’t be a julia library, SOAP is almost a legacy format these days.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [February 25, 2021, 12:20pm UTC](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956/40 "2021-02-25T12:20:16Z")

</div>

> [@dariush-bahrami](#):
>
> I think the reason most of the sections are verbose is that the author is trying to impress the reader rather than a technical explanation of the features of the language.

Can you give specifics? Which parts of the documentation are written to impress rather than inform?

[Previous page](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956.md?page=1)

[Next page](https://discourse.julialang.org/t/julia-from-the-perspective-of-a-pythonista/55956.md?page=3)
