User Tools

Site Tools


cs330_f2016:julia

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cs330_f2016:julia [2016/08/04 20:17]
dcostello created
cs330_f2016:julia [2021/06/30 23:42] (current)
Line 1: Line 1:
 ====Julia==== ====Julia====
-http://​docs.julialang.org/​en/​release-0.4/manual/+We are using Julia V 1.0\\ 
 + 
 +https://​learnxinyminutes.com/​docs/​julia/​ 
 + 
 +https://​docs.julialang.org/​en/​v1.0
 + 
 +====Julia IDE==== 
 + 
 +In class, I've been using the 
 +[[https://​github.com/JunoLab/uber-juno/​blob/​master/​setup.md|uber-juno]] IDE. 
 + 
 +Note that on a Mac, you need to have the xcode command line developer tools installed (and you need to have accepted the license agreement).
  
 ===Provided tools=== ===Provided tools===
Line 10: Line 21:
  
 The repl module exports a single function repl(Source) which takes the name of the modle you wish to test. For example to test the Rudimentary interpreter If i had named my moudle RudInt I would call Repl.repl("​RudInt"​). It also allows you interp expressions,​ parse expressions,​ test single cases, test multiple exprs using files, and reload your module after making changes. Run help to get further information. ​ The repl module exports a single function repl(Source) which takes the name of the modle you wish to test. For example to test the Rudimentary interpreter If i had named my moudle RudInt I would call Repl.repl("​RudInt"​). It also allows you interp expressions,​ parse expressions,​ test single cases, test multiple exprs using files, and reload your module after making changes. Run help to get further information. ​
 +
 +===Test Files===
 +Test:
 +<code lisp>
 +(+ 1 2);
 +(* 1 2);
 +(- 1 2);
 +(with 3);
 +parse(+ 1 2);
 +</​code>​
 +Answers:
 +<code lisp>
 +3;
 +2;
 +-1;
 +error:​REGEX_FOR_ERROR_MSG;​
 +Binop(op(+),​ Num(1), Num(2);
 +</​code>​
 +
 +To test errors, simply use error:​EXPECTED_MESSAGE,​ where expected_message is a regular expression to match to.
 +
 +When returning custom defined types, like in the line above, the testing function automatically removes module namespace. So RudInt.Binop(....) would fail.
 +
cs330_f2016/julia.1470341843.txt.gz · Last modified: 2021/06/30 23:40 (external edit)