Julia進階通用[7]動態程式語言,佢最初係為咗滿足高效能數值分析計算科學嘅需要而設計,唔需要分別編譯速度快,[8][9][10][11]都可用喺用戶端同伺服器嘅Web用途[12][13]、低階系統程式設計或用作規約語言[14]

Julia
編程範式多範式多分派程序式函數式元程式設計多階段程式設計英文Multi-stage_programming命令式函數式物件導向式
設計者Jeff Bezanson, Stefan Karpinski, Viral Shah, Alan Edelman等
第一次出現2012年, 12年之前 (2012)[1]
穩定版本
1.4.0[2] / 2020年3月21號, 4年之前 (2020-03-21)
預覽版本
1.4.0-rc2[3] / 2020年2月24號, 4年之前 (2020-02-24)
系統平台x86-64IA-32ARM v8(64位元)CUDAARM (32位元)PowerPC網頁瀏覽器 (JavaScriptWebAssembly)[4]
操作系統macOSWindowsLinuxFreeBSD[5]Android[6]
軟件授權MIT許可證
副檔名.jl
網站JuliaLang.org
啟發語言
MatlabR (語言),同埋PythonLispshell

Julia設計獨特之處有參數多型嘅型別系統、完全動態語言中嘅類型同埋佢多分派嘅核心程式設計法。佢容許並行平行分散式計算,並直接呼叫CFortran庫而唔用黏合程式碼

Julia有垃圾回收機制,[15] 使用及早求值,包含咗用喺浮點計算、線性代數亂數生成正規表示式符合嘅高效庫。有好多庫可用,其中啲(如用喺快速傅立葉變換嘅庫)已經預先捆綁喺Julia裏面。[16]

編輯

[17]

呢個專案大概喺2009年中開始。

功能 編輯

主要用喺數值計算。

特點 編輯

  • 核心語言極細。標準庫係用Julia語言本身寫嘅。
  • 呼叫好多其餘成熟嘅高效能基礎程式碼。如線性代數亂數生成快速傅立葉變換、字串處理。(重增加緊……)
  • 豐富嘅用喺建立或描述物件嘅類型語法
  • 高效能,近靜態編譯型語言。包括用戶自訂類型等
  • 為平行計算同分散式計算而設計
  • 輕量級協程
  • 優雅嘅可延伸嘅類型轉換/提升
  • 支援Unicode,包括但不限於UTF-8
  • 可直接呼叫C函式(唔需要包裝或係藉助特殊嘅API
  • 有類似shell嘅行程管理能力
  • 有類似Lisp巨集同埋其餘超編程工具

編輯

曼德博集合

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

隨機矩陣統計

function randmatstat(t)
    n = 5
    v = zeros(t)
    w = zeros(t)
    for i = 1:t
        a = randn(n,n)
        b = randn(n,n)
        c = randn(n,n)
        d = randn(n,n)
        P = [a b c d]
        Q = [a b; c d]
        v[i] = trace((P.'*P)^4)
        w[i] = trace((Q.'*Q)^4)
    end
    std(v)/mean(v), std(w)/mean(w)
end

睇埋  編輯

參考資料 編輯

  1. "Why We Created Julia". Julia website. February 2012. 喺7 February 2013搵到.
  2. "v1.4.0". Github.com. 2020-03-21. 喺2020-03-24搵到.
  3. "v1.4.0-rc2". Github.com. 2020-02-24. 喺2020-03-24搵到.
  4. Fischer, Keno (2019-07-22). "Running julia on wasm". 喺2019-07-25搵到.
  5. "Download Julia - Currently supported platforms". Julia. 喺2020-03-24搵到.
  6. "The Julia Language: A fresh approach to technical computing. Termux/Android". Github. 喺2020-03-24搵到.
  7. "The Julia Language" (official website). General Purpose [..] Julia lets you write UIs, statically compile your code, or even deploy it on a webserver.
  8. Bryant, Avi (15 October 2012). "Matlab, R, and Julia: Languages for data analysis". O'Reilly Strata. 原著喺2013-05-24歸檔. 喺2018-09-22搵到.
  9. Singh, Vicky (23 August 2015). "Julia Programming Language – A True Python Alternative". Technotification.
  10. Krill, Paul (18 April 2012). "New Julia language seeks to be the C for scientists". InfoWorld.
  11. Finley, Klint (3 February 2014). "Out in the Open: Man Creates One Programming Language to Rule Them All". Wired.
  12. "Escher : With Escher you can build beautiful Web Uls entirely in Julia". Shasi.github.io. 原著喺2016-03-04歸檔. 喺2017-05-31搵到.
  13. "Getting Started with Node Julia · Node Julia". Node-julia.readme.io. 喺2017-05-31搵到.
  14. Moss, Robert (26 June 2015). "Using Julia as a Specification Language for the Next-Generation Airborne Collision Avoidance System". 原著喺1 July 2015歸檔. 喺29 June 2015搵到. Airborne collision avoidance system
  15. "Suspending Garbage Collection for Performance...good idea or bad idea?". Groups.google.com. 喺2017-05-31搵到.
  16. (now available with using FFTW in current versions; that dependency is one of many moved out of the standard library to a package because it is GPL licensed, and thus is not included in Julia 1.0 by default.) "Remove the FFTW bindings from Base by ararslan · Pull Request #21956 · JuliaLang/julia". GitHub (英文). 喺2018-03-01搵到.
  17. Why We Created Julia 互聯網檔案館歸檔,歸檔日期2012-04-23.

連出去  編輯