4 ms·
I decided to work along with the ThinkJulia tutorial until I got to the first case study: Turtles. The ThinkJulia package installed fine, but the tutorial does
by cptnapalm 7y ago
I decided to work along with the ThinkJulia tutorial until I got to the first case study: Turtles. The ThinkJulia package installed fine, but the tutorial doesn't tell you how to get out of package install mode. After trying 'quit' and 'exit', a Ctrl-D got me out of julia.
Started it up again, proceeded with 'using ThinkJulia' which spit out a warning about updating a manifest file and to try 'Pkg.resolve()' which I did. It gave me an error, 'Pkg not defined'. Spent a few minutes failing to get the turtle, but did somehow wind up back in pkg mode which I still don't know how to get out of. To hell with that tutorial.
- KenoFischer 7y agoBackspace gets out of REPL modes, though I agree that that isn't necessarily obvious for people not used to this kind of modality. I'm sure the ThinkJulia folks would appreciate a note so they can improve the tutorial: https://github.com/BenLauwens/ThinkJulia.jl/issues https://github.com/BenLauwens/ThinkJulia.jl/issues.
- cptnapalm 7y agoOf the four or so tutorials I took a peek at, only the one on qualitative economics mentioned the backspace as how to get out of pkg mode. I'm left wondering what's wrong with Escape. The authors don't seem to have touched it since their O'Reilly book was published.
- DNF2 7y agoWell, you get into the pkg mode by typing `]`, so from an intuitive standpoint you get out by deleting that character. When you're in any REPL mode there is a character typed at the beginning of your line that renders as a mode. Delete it, and it goes away. I think it makes more sense than escape, actually, but everyone is so used to using escape that it's not too strange to not think of it.
- cptnapalm 7y agoIntuitive to me: press a button toggles a mode. Hit the button again to toggle again. Also intuitive to me: press a button to toggle a mode, hit Escape to escape that mode. Not intuitive to me: press a button to toggle a mode. Press Backspace to erase a character that isn't on the screen.
- DNF2 7y agoBut didn't it become more intuitive when I explained it? 'Type something to enter a mode, delete it to exit'. I'm pretty used to invisible characters, but I just think it makes sense. Anyway, you really just need to hear it once, and then it should stick.
- cptnapalm 7y agoNo, I still don't find anything intuitive about it. It's not hard to memorize, but I still don't find it an intuitive or sensible method for exiting.
- sixbrx 7y agoFWIW before using Pkg.<something>, you usually need to do "using Pkg" first, that may have been the issue with the 'Pkg not defined' error.