[Ilugc] Julia, I Love You

  • From: arun289@xxxxxxxxx (Arun Venkataswamy)
  • Date: Mon, 2 Apr 2012 12:19:10 +0530

On Mon, Apr 2, 2012 at 11:49 AM, Shrinivasan T <tshrinivasan at gmail.com>wrote:

http://julialang.org/
 It may be useful when high performance is the requirement.


Not just performance, it is also damn good in `readable` code

The subtle connection of this sample code  in their page to their namesake
`Julia`(sets) is super cool :)
Julia sets are curves/point sets in fractal planes (planes with fractal
dimensions - how cool is a 2.46 dimension - A human mind can only interpret
integer dimensions, this is 1D, 2D and 3D spaces) which satisfies a
limiting function.
That limiting function is:

function mandel(z)
    c = z
    maxiter = 80
    for n = 1:maxiter
        if abs(z) > 2
            return n-1
        end
        z = z^2 + c
    end
    return maxiter
end

The readability of this code is incredible. Considering the variables `c`
and `z` are complex numbers with real and imaginary coefficients.

Regards,
Arun


-- 

Arun Venkataswamy

"?????? ????? ????, ???????? ??????" - ???????
Known is a drop, Unknown is an ocean

A mash up I made from NASA's APOD website...
Want to see some wonders of our universe?
http://apodweekly.com and a chrome app
here<https://chrome.google.com/webstore/detail/mfkbdbbekhjhpheecjldjbleaifedneh>
.

Other related posts: