Julia 初尝试#
[!note]
The Julia Programming Language (julialang.org) | Julia 中文社区 (julialang.org)
Scientific computing has traditionally required the highest performance, yet domain experts have largely moved to slower dynamic languages for daily work. We believe there are many good reasons to prefer dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off and provide a single environment productive enough for prototyping and efficient enough for deploying performance-intensive applications. The Julia programming language fills this role: it is a flexible dynamic language, appropriate for scientific and numerical computing, with performance comparable to traditional statically-typed languages.
Because Julia's compiler is different from the interpreters used for languages like Python or R, you may find that Julia's performance is unintuitive at first. If you find that something is slow, we highly recommend reading through the Performance Tips section before trying anything else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C.
个人推荐直接通过 winget 下载,这种方式是通过安装 juliaup
管理工具来下载,指令如下
[!tip]
Windows 也可以通过官网的可执行文件进行下载,这里就不做介绍了,移步官网下载页面有更加详细的内容。Julia 中文社区中提供的下载方式并不全面,需要访问英文官网获取全部咨询。
当你有使用 Windows Terminal 软件时,juliaup
安装会自动将 Julia 添加到你的 Terminal 中,
现在就可以直接通过 julia
指令来启动 Julia 了,退出方式为快捷键 Ctrl + D
或者输入 exit()
皆可。
你还可以使用 juliaup
工具来检查本机 Julia 环境,
Pluto.jl#
笔者因为课程需求,使用了 Julia 中的一个名为 Pluto.jl 的 Notebook,功能类似于 Python 的 Jupyter Notebook,Julia 还有一个同类产品的项目叫做 Binder。
Pluto Installation#
直接参考官网 下载页面,在安装并运行 Julia 后执行指令 import Pkg; Pkg.add("Pluto")
和 import Pluto; Pluto.run()
即可完成安装并启动 Pluto 的页面,默认页面在 http://localhost:1234/ 位置。
Julia Practice#
[!note]
TODO!
Grammer#
function#
Data Structure#
创建日期: March 12, 2024