Julia First Steps (Not an advert, just a few links, pls dont block the post)

Hi,
I am new to Julia, coming from an R / Matlab background, but apparently I am too stupid to use it. I know its much to ask, but the only thing I wanted to do is getting this very well documented code to run: (https:// github .com/dscotthunter/Fantasy-Hockey-IP-Code/blob/master/README.md)
After having problems using the Console from Julia and hours of trying to get the code to run, I joined this subreddit and found repl dot it and hoped my problems would be solved. it didnt. I implemeted the code, followed the README from Github, imported the packages but I just keep getting errors. I am at the end of my nerves. I know its much to ask, but would anybody here in the sub so kind to look if he or she is able to get this code to run? Here is the link:
https://repl.it/join/dtmcbrqy-christian1337

Thank you really much in advance. I am tying all this for the whole day now and the clock for my bachelor thesis is ticking.

after importing all packages and running the code (last a few minutes, but its supposed to run this long) i get this error: https: //m.imgur.com/gallery/TKalrhz

as I am a new user, I edited the links so i could post more than two. I will try them here in the comments again. yes i know its not a subreddit.

Sorry about that, the post got flagged as spam. I restored it but can’t see any images so it’s hard to figure out what you’re having trouble with.

I took a quick look at the github repo you mentioned. It looks like it hasn’t been updated for three years. That means that it will not work with the latest version of julia or the julia packages that repo’s code depends on. You might have to go all the way back to julia 0.4 to run that code as is. You could download julia 0.4 pretty easily but it might be more work to track down the appropriate versions of the optimization packages you’d need.

3 Likes

I dont know why the links are not working. I have the same problem myself now. I will try to post them again in this comment. The error i get is like this.


you can reproduce the error by heading to https:// repl.it/join/dtmcbrqy-christian1337 (you have to restore the link, I am not able to post links as a new user) and running the code

ah I see. Thank you! I found the old version, downloading it rn, is there by any chance a documentation for it?

Yes, you can find the docs for that version at Julia Documentation — Julia Language 0.4.8-pre documentation. Just for fun, I also downloaded julia 0.4 and followed the instructions in the readme of https://github.com/dscotthunter/Fantasy-Hockey-IP-Code. There were some warnings but, impressively, running the sample code in that repository just worked after installing the required packages. Pretty cool.

However, if you’re planning to write any of your own code based on that repo and the paper it goes with, I would strongly advise learning to use JuMP in julia 1.2 and writing your own code from there. All that old code, including the old version of julia itself, is unsupported. It’ll be a lot easier to get help if you’re working with up to date tools.

1 Like

Thank your for trying this out! It seems like my problems with the code are more connected to the general use of Julia. With the old version i am not able to execute this code in the Julia interface:

$ git clone https://github.com/dscotthunter/Fantasy-Hockey-IP-Code

I think I will start by learning how to use Julia with some other projects and hope to get a better understanding how to run files/scripts and use packages and then try to get this project to run or rewrite it to use it with the supported Julia versions

No problem. I think getting a general feel for julia first is a good approach. One extra tip: the command you mentioned in your last post is not meant to be run from a julia prompt. It’s a git command meant to be run from the shell prompt on a Unix-like system or from something like git bash on Windows. Nothing julia specific there. If you’re going to be getting into programming in any language, learning to use git is very useful.

If you just want to learn about Julia, and JuMP in particular, you can also look at the collection of JuMP notebooks that should work with more recent versions of Julia.

EDIT: Apparently the above is now superseded by JuMPTutorials.jl

Hello @Christian_Schumacher and welcome! We are very friendly here.
Please think about doing this - the presentations from JuliaCon are very good. Have a look here and watch any of them which interest you.
https://www.youtube.com/user/JuliaLanguage

Also as people in this thread have said. Julia is now stable and has reached the 1.0 version.
The latest version is v1.2.0 which should introduce NO breaking changes from v1.0
We can sense that you are getting frustrated with trying to get some code working which was for an older version of Julia.

Let us know if we can help you get running in a REPL environment, with Jupyter notebooks or with VSCode/Atom.
Have you looked at https://www.juliabox.com/ and https://nextjournal.com/

1 Like

Previous threads trying to work with

include

I have no clue what Fantasy Hockey is, but someone interested in it and learning Julia could turn forking and updating this repository into a learning experience.

I would recommend the following:

  1. fork the repository (as far as I can tell the license allows building on this code)

  2. add a Project.toml file (see https://julialang.github.io/Pkg.jl/dev/creating-packages/ )

  3. separate runtime and library code

  4. set up unit tests

  5. integrate with Travis

2 Likes