Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Backspace 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.


Of 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.


Well, 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.


Intuitive 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.


But 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.


No, 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.


FWIW before using Pkg.<something>, you usually need to do "using Pkg" first, that may have been the issue with the 'Pkg not defined' error.


That does make sense, however it doesn't help the case for it being a particularly good tutorial.


Agree about that. And I'm not wild about the idea of having to do a special incantation before using the package system anyway, myself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: