I'm trying to run a very simple Julia program containing only println("Hello world") in Juno IDE. It seems the code keeps running and no output is ever produced. However, when I type the snippet in the REPL window it immediately produces the desired output. I looked into the following tutorial in order to set up Juno in Atom on a 64-bit windows 10 pc.
https://www.youtube.com/watch?v=s8EFeY0odlQ&list=PLJ39kWiJXSiyegKeVd-praE_jOv6sgCn5
Any suggestion will be highly appreciated
Related
When trying to execute any commands from MATLAB.jl in julia, the matlab command window opens, and Julia immediately exits with no errors, warnings, or messages. Has anyone else encountered this before? I'm working on translating some MATLAB code to julia and using MATLAB.jl to check that the sparse matrices are the same for both pieces of code.
I'm on a Windows computer and have tried following the instructions on the MATLAB.jl github repo. I've also tried adding Matlab to path and executing the code from the Julia REPL, but keep encountering the same problem.
I can get mxarray executes, however, trying it seems like anything which requires a matlab session causes julia to quit, e.g. mxcall, md"", and MSession.
Was able to solve the problem by opening julia through the command prompt as an administrator and running ] build MATLAB and ] test MATLAB. If the terminal was not opened as administrator, it would build, however, during the testing it would return exit error: 3765269347, which seems to be a windows-specific internal process error.
After this has been done, MATLAB.jl seems to work even when it is not opened directly with admin rights.
I wanted to profile my code in Julia and I installed the package "ProfileView.jl". However, when I run the code the windows is popping for a second and closing immediately.
I have run the script from VS Code and also from the terminal. The code I am profiling is:
using ProfileView
#profview Mesh,MatPointData, AnalysisConstants = setupfunc(T)
In general, you should run ProfileView interactively in a REPL, not as part of a script. If you're using VSCode, you want to start the Julia REPL (Ctrl-Shift-P and then Julia: Start REPL); from the terminal, you want to run an interactive session, i.e., $ julia and not $ julia somescript.jl.
If you simply must use a script (again, not recommended because you'll lose access to some nice interactive functionality in ProfileView), see https://juliagraphics.github.io/Gtk.jl/latest/manual/nonreplusage/.
If I run this Code on Python3 (Anaconda Jupyter 6.0.0) I'm getting logged out automatically. I use a Mac with macOS Mojave.
The code is from the book "How to think like a Computer Scientist". So I'm at the beginning to learn some python.
I already tried to delete the turtle.py files in the library, but it didn't work either.
import turtle
window = turtle.Screen()
alex = turtle.Turtle()
alex.forward(50)
alex.left(90)
alex.forward(30)
window.mainloop()
When I run the code I get logged out. When I log in again, Jupyter just shows a window with "error".
This is more a by-pass than an answer as I am still trying to figure it out myself. I have a macbook and am experiencing the same behavior with PyCharm and Anaconda.
If you want to learn python, the code above runs fine if you instead install the base python interpreter from https://www.python.org/. It includes the turtle module and you can change it in your IDE so that this new interpreter is the default rather than Anaconda. If I figure it out what is happening with Anaconda before someone else, I will let you know.
I am trying to call an exe file created with Fortran and the gfortran compiler in R. However, R does not show the same output on my two computers.
Let's say I have a very simple Fortran code :
program Main
write(*,*) 'Hello World !'
end
I created an exe file using gfortran, giving : hello.exe
Then, when i call the exe in R using :
shell('hello.exe')
on my first computer, i get the 'Hello World !' printed in the R console, while on the other one, the code works, but nothing is printed, and I don't understand why. I guess something must be different between the two computers by I don't know what (both use the same R and gfortran versions).
Finally, I found the solution. I thought that both computers shared the same version of R but it was not the case. The one that prints the message runs with R 3.5.0 while the other runs with a previous version.
Surprisingly, it is apparently not possible to display the messages with previous versions of R.
the Julia (i'm using 0.6.2) REPL makes it possible to do some work and then execute
julia> using IJulia
julia> notebook(dir=pwd(), detached=true)
which nicely launches jupyter in the directory specified by dir.
is it possible from the REPL to include a specific notebook to open ?
This worked for me recently (julia v 1.5.1, macOS 10.14):
using IJulia
notebook(dir="/path/to/directory/with/my/notebook",detached=true)
One thing I noticed is starting jupyter in the background, julia doesn't give you a link to where to open the notebook in the browser.
I was able to open http://localhost:8888/ in my browser to find the notebook, although I thought there was a URL token needed. This link in the browser also worked:
file:///$HOME/Library/Jupyter/runtime/nbserver-12912-open.html
I got this from the REPL documentation:
?notebook
#search: notebook
# notebook(; dir=homedir(), detached=false)
# ..etc
this kinda works (but feels like a hack):
julia> ;jupyter notebook someJuliaNotebook.ipynb 2>/dev/null &
which produces a relatively clutter free terminal window i can keep using.