Start to learn Julia recently. And do not want to use console ever.
How can I install a new package from IDE, with no use of console commands? I'm using Juno, but I'm opened to change IDE if Juno does not support such a feature. Than the question is - what IDE does?
You can evaluate commands from a script. Just type Pkg.add into a script and Ctrl+Enter on it. But I don't think avoiding the console entirely is a good way to program though!
Write a script
Pkg.add("Distributions")
and run it.
Related
I have to compile a Julia script and use opencv-python in it.
If it is feasible, how to compile?
What should I use? >PackageCompiler?
This may be possible with PackageCompiler.jl. You will likely need to set up some artifacts as detailed here: https://julialang.github.io/PackageCompiler.jl/dev/apps/#Artifacts-1
You can find out more about the Julia Artifacts system here: https://julialang.github.io/Pkg.jl/v1/artifacts/
It may also be worth opening an issue and asking on the PackageCompiler.jl repo if there has been any work or tests with combining Julia and Python via PackageCompiler so as to avoid going down a dead end.
is there any way to play inform7 from the command line? I'd like to write some automated test script that plays the play with certain commands and don't want to do it manually. Is there any way to do that?
This is easiest to do with the CLI Linux package of Inform 7. It contains a perl CLI script you can run, but you may also like to consider this alternative script I wrote: https://github.com/i7/kerkerkruip/blob/master/tools/build-i7-project
You can invoke this with
build-i7-project -p "Project Folder"
(Leave off the .inform.)
You can also run the binaries which are installed with the IDE packages by themselves instead of installing the CLI Linux package. The command line options are probably mostly the same in other operating systems, but you may need to change them slightly. If you can't get it to work, compare with what the Inform 7 IDE says when you build with it.
If what you really want to do is periodically run some test scripts that verify that your work is still performing as expected, then Inform 7 has the capability do do that from within the IDE. Take a look at chapter 24.2 of Writing with Inform for details. In combination with good use of the Skein, this should handle the more common unit-testing requirements.
Of course, if you're doing something more outré, running bash scripts from the command line may wind up being the way to go. Still, don't do any more work than you have to. :)
In another question:
Juno IDE for Julia, how to interact?
One of the answers stated:
You can't enter commands into the console in Juno--that's for displaying output. Commands can be submitted from within the editor by setting your cursor in the line to submit and pressing Ctrl+Enter or Shift+Enter. The value will then be displayed in a small popup next to the line and the output will be printed to the console if you have the console visible.
Note that the inability to use the console as you desire is by design. See here for information about the console from the Juno docs.
I am encountering an issue that might make this design decision a bit impractical at times.
First, let me say that I am new to Julia and Juno (not to coding, just trying to learn Julia now), so there might be a way to fix this and I do not know about it.
I am using the package RCall, that allows to include R code into Julia, so I am trying to install some R packages. One of the packages is asking me a "y/n:" question and I cannot answer it because I cannot access the console, and sending code from the editor to the console using command+Enter is blocked (because the console line is executing).
To reproduce this issue (note that R 3.2.0 or above needs to be installed, and I had to restart Juno after installing RCall for it to work):
Pkg.add("RCall")
Pkg.build("RCall")
restart Juno
using RCall
reval("install.packages(\"rgdal\")")
A pop-up will appear asking to select a mirror, just choose 0 and OK. Then the package is asking me if I want to install some dependencies "y/n:" and the whole execution is blocked.
I guess that this can be fixed just by using Julia from the command line (and forgetting about Juno), but I like to use IDEs.
Do you have any ideas about how to circumvent this issue? or another IDE for Julia?
I recently came across with this awesome IDE, Juno for Julia. I have setup the IDE properly and it is successfully connecting to Julia. However, I'm facing with a small problem: How am I supposed to get data from STDIN in Juno using say, readline(STDIN)?
Appreciated!
Lighttable / Juno doesn't supply an input console. But the Julia REPL (command line version) does. I find it best to have both open. In asyncronous mode you can put trow-away code, shell commands (";") and command help ("?") in REPL and keep-code in Juno, and they share variables. You just can't run async in this case, since you want Juno to stop and wait.
On Windows default setting, you need to Evaluation -> Kill Julia
and then Ctrl+Space -> Julia: Connect to a running session. Leave out just '#async' when you want to wait for input.
If there is a better way already, I'd like to know too. Source: http://discuss.junolab.org/t/how-to-read-user-input-for-julia/110
Ok this is a pretty simple question. I am new to Python and have been using JES up to this point. I just downloaded Sublime 2 and love it. But in JES there was a command that would open your code in the editor in the command console (load program). I know how to open the command console (ctrl `), but is there a way other than copying and pasting to get the code into the command console?
The Ctrl` console in ST2 uses the internal version of Python that comes with the program, Python 2.6, not the system version(s) you may have installed yourself. It's fine for some stuff, but it is outdated, and there is no (easy/intended) way to install third-party modules.
SublimeREPL is what you need. It supports Python 2 and 3 (including IPython), as well as a bunch of other languages if you're a polyglot. It basically runs a Python interpreter in another tab, which you can interact with directly, just like at the command line or via IDLE, and you can also send selected text, files, lines, or blocks (functions/classes) to the running REPL. It is available through Package Control, which you should install anyway, if you haven't come across it yet.
If up to this point you've just used JES and haven't installed a version of Python from python.org then you'll want to do that before installing SublimeREPL.