HN user

sillonleon

6 karma
Posts0
Comments2
View on HN
No posts found.
Try Julia 12 years ago

Julia is very fast, 0.12 second, 0.60 second for sbcl (lisp)

julia>function haz(n) s = 0 for i in 1:n if i % 2 == 0 s = s+1 else s = s-1 end end s end haz (generic function with 1 method)

julia> @elapsed haz(10^8) 0.12459633

Compare with lisp sbcl on the same machine:

(defun haz(n) (let ((s 0)) (declare (optimize (speed 3) (safety 0)) (fixnum n s)) (loop for i fixnum from 1 upto n do (if (zerop (mod n 2)) (incf n) (decf n)) finally (return s))))

Try Julia 12 years ago

The Server version of Ubuntu or the 12.04 version does not have the add-apt-repository command. How can i add a PPA to the server without this command? Answer in http://askubuntu.com/questions/38021/how-to-add-a-ppa-on-a-s...

There are several options, I chose the one with sudo gedit /etc/apt/sources.list and

1514 sudo gedit /etc/apt/sources.list 1515 sudo apt-get update #not needed 1516 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3D3D3ACC 1517 sudo apt-get update 1518 sudo apt-get install julia (there are broken dependencies) 1519 sudo apt-get install libopenblas-base 1520 sudo apt-get update 1521 sudo apt-get install libopenblas-base 1522 sudo apt-get install libatlas-base-dev 1523 sudo apt-get install libopenblas-base 1524 sudo apt-get install julia 1525 julia 1526 history | tail 1527 history | tail -n 20