-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
translate completely #12
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,285 @@ | ||||||
|
||||||
# 基本(Essentials) | ||||||
|
||||||
## 介紹 | ||||||
|
||||||
Julia 的標準函式庫包含了一系列的方法並且其之巨集(Macro)十分適合運用於數據運算。除此之外,它也如同其他常見的程式語言一樣用途廣泛。隨著越來越多的可使用的套件,可用的額外函式也隨之增加。 | ||||||
以下將按照函式的使用時機為各別主題,列出標準函式庫中的函式: | ||||||
|
||||||
附註: | ||||||
* 除了內置模組(例如:`Pkg`,`Collections`,`Test`和`Profile`)中的函式之外,此處列載的所有函式都可直接在程式中使用。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* 若要使用內置模組之函式,需使用 `import Module` 來匯入模組,並且使用 `Module.fn(x)` 來呼叫該模組中的函式。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* 又或者,可藉由使用 `using Module`,將會匯入所有 `Module` 中的函式到當前的命名空間(`namespace`)。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* 依據慣例,部分函式命名以感嘆號(`!`)做結尾會變更它們的參數。一些函數保有變更的(例如:`sort!`),也有未變更的(例如:`sort`)版本。 | ||||||
|
||||||
## 隨時可使用之函式 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 這個翻譯覺得不適合,不過我目前也想不到其他翻譯。 |
||||||
|
||||||
```@docs | ||||||
Base.exit | ||||||
Base.quit | ||||||
Base.atexit | ||||||
Base.atreplinit | ||||||
Base.isinteractive | ||||||
Base.whos | ||||||
Base.summarysize | ||||||
Base.edit(::AbstractString, ::Integer) | ||||||
Base.edit(::Any) | ||||||
Base.@edit | ||||||
Base.less(::AbstractString) | ||||||
Base.less(::Any) | ||||||
Base.@less | ||||||
Base.clipboard(::Any) | ||||||
Base.clipboard() | ||||||
Base.reload | ||||||
Base.require | ||||||
Base.compilecache | ||||||
Base.__precompile__ | ||||||
Base.include | ||||||
Base.include_string | ||||||
Base.include_dependency | ||||||
Base.Docs.apropos | ||||||
Base.which(::Any, ::Any) | ||||||
Base.which(::Symbol) | ||||||
Base.@which | ||||||
Base.methods | ||||||
Base.methodswith | ||||||
Base.@show | ||||||
Base.versioninfo | ||||||
Base.workspace | ||||||
ans | ||||||
``` | ||||||
|
||||||
## 物件(Objects) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 大家熟悉的中文翻譯就不需要再加上英文附註。 |
||||||
|
||||||
```@docs | ||||||
Core.:(===) | ||||||
Core.isa | ||||||
Base.isequal(::Any, ::Any) | ||||||
Base.isequal(::Nullable, ::Nullable) | ||||||
Base.isless | ||||||
Base.isless(::Nullable, ::Nullable) | ||||||
Base.ifelse | ||||||
Base.lexcmp | ||||||
Base.lexless | ||||||
Core.typeof | ||||||
Core.tuple | ||||||
Base.ntuple | ||||||
Base.object_id | ||||||
Base.hash | ||||||
Base.finalizer | ||||||
Base.finalize | ||||||
Base.copy | ||||||
Base.deepcopy | ||||||
Core.isdefined | ||||||
Base.convert | ||||||
Base.promote | ||||||
Base.oftype | ||||||
Base.widen | ||||||
Base.identity | ||||||
``` | ||||||
|
||||||
## 型別(Types) | ||||||
|
||||||
```@docs | ||||||
Base.supertype | ||||||
Core.issubtype | ||||||
Base.:(<:) | ||||||
Base.:(>:) | ||||||
Base.subtypes | ||||||
Base.typemin | ||||||
Base.typemax | ||||||
Base.realmin | ||||||
Base.realmax | ||||||
Base.maxintfloat | ||||||
Base.sizeof(::Type) | ||||||
Base.eps(::Type{<:AbstractFloat}) | ||||||
Base.eps(::AbstractFloat) | ||||||
Base.promote_type | ||||||
Base.promote_rule | ||||||
Core.getfield | ||||||
Core.setfield! | ||||||
Base.fieldoffset | ||||||
Core.fieldtype | ||||||
Base.isimmutable | ||||||
Base.isbits | ||||||
Base.isleaftype | ||||||
Base.typejoin | ||||||
Base.typeintersect | ||||||
Base.Val | ||||||
Base.Enums.@enum | ||||||
Base.instances | ||||||
``` | ||||||
|
||||||
## 一般函式(General Functions) | ||||||
|
||||||
```@docs | ||||||
Core.Function | ||||||
Base.method_exists | ||||||
Core.applicable | ||||||
Core.invoke | ||||||
Base.invokelatest | ||||||
Base.:(|>) | ||||||
Base.:(∘) | ||||||
``` | ||||||
|
||||||
## 語法(Syntax) | ||||||
|
||||||
```@docs | ||||||
Core.eval | ||||||
Base.@eval | ||||||
Base.evalfile | ||||||
Base.esc | ||||||
Base.@inbounds | ||||||
Base.@inline | ||||||
Base.@noinline | ||||||
Base.gensym | ||||||
Base.@gensym | ||||||
Base.@polly | ||||||
Base.parse(::Any, ::Any) | ||||||
Base.parse(::Any) | ||||||
``` | ||||||
|
||||||
## 可為 Null 的型別(Nullables) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 這個不必翻譯。 |
||||||
|
||||||
```@docs | ||||||
Base.Nullable | ||||||
Base.get(::Nullable, ::Any) | ||||||
Base.isnull | ||||||
Base.unsafe_get | ||||||
``` | ||||||
|
||||||
## 系統(System) | ||||||
|
||||||
```@docs | ||||||
Base.run | ||||||
Base.spawn | ||||||
Base.DevNull | ||||||
Base.success | ||||||
Base.process_running | ||||||
Base.process_exited | ||||||
Base.kill(::Base.Process, ::Integer) | ||||||
Base.Sys.set_process_title | ||||||
Base.Sys.get_process_title | ||||||
Base.readandwrite | ||||||
Base.ignorestatus | ||||||
Base.detach | ||||||
Base.Cmd | ||||||
Base.setenv | ||||||
Base.withenv | ||||||
Base.pipeline(::Any, ::Any, ::Any, ::Any...) | ||||||
Base.pipeline(::Base.AbstractCmd) | ||||||
Base.Libc.gethostname | ||||||
Base.getipaddr | ||||||
Base.Libc.getpid | ||||||
Base.Libc.time() | ||||||
Base.time_ns | ||||||
Base.tic | ||||||
Base.toc | ||||||
Base.toq | ||||||
Base.@time | ||||||
Base.@timev | ||||||
Base.@timed | ||||||
Base.@elapsed | ||||||
Base.@allocated | ||||||
Base.EnvHash | ||||||
Base.ENV | ||||||
Base.is_unix | ||||||
Base.is_apple | ||||||
Base.is_linux | ||||||
Base.is_bsd | ||||||
Base.is_windows | ||||||
Base.Sys.windows_version | ||||||
Base.@static | ||||||
``` | ||||||
|
||||||
## 錯誤(Errors) | ||||||
|
||||||
```@docs | ||||||
Base.error | ||||||
Core.throw | ||||||
Base.rethrow | ||||||
Base.backtrace | ||||||
Base.catch_backtrace | ||||||
Base.assert | ||||||
Base.@assert | ||||||
Base.ArgumentError | ||||||
Base.AssertionError | ||||||
Core.BoundsError | ||||||
Base.DimensionMismatch | ||||||
Core.DivideError | ||||||
Core.DomainError | ||||||
Base.EOFError | ||||||
Core.ErrorException | ||||||
Core.InexactError | ||||||
Core.InterruptException | ||||||
Base.KeyError | ||||||
Base.LoadError | ||||||
Base.MethodError | ||||||
Base.NullException | ||||||
Core.OutOfMemoryError | ||||||
Core.ReadOnlyMemoryError | ||||||
Core.OverflowError | ||||||
Base.ParseError | ||||||
Base.ProcessExitedException | ||||||
Core.StackOverflowError | ||||||
Base.SystemError | ||||||
Core.TypeError | ||||||
Core.UndefRefError | ||||||
Core.UndefVarError | ||||||
Base.InitError | ||||||
Base.retry | ||||||
Base.ExponentialBackOff | ||||||
``` | ||||||
|
||||||
## 事件(Events) | ||||||
|
||||||
```@docs | ||||||
Base.Timer(::Function, ::Real, ::Real) | ||||||
Base.Timer | ||||||
Base.AsyncCondition | ||||||
Base.AsyncCondition(::Function) | ||||||
``` | ||||||
|
||||||
## 映射(Reflection) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 一般是都翻成反射 |
||||||
|
||||||
```@docs | ||||||
Base.module_name | ||||||
Base.module_parent | ||||||
Base.current_module | ||||||
Base.fullname | ||||||
Base.names | ||||||
Core.nfields | ||||||
Base.fieldnames | ||||||
Base.fieldname | ||||||
Base.datatype_module | ||||||
Base.datatype_name | ||||||
Base.isconst | ||||||
Base.function_name | ||||||
Base.function_module(::Function) | ||||||
Base.function_module(::Any, ::Any) | ||||||
Base.functionloc(::Any, ::Any) | ||||||
Base.functionloc(::Method) | ||||||
Base.@functionloc | ||||||
``` | ||||||
|
||||||
## 內部核心(Internals) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 建議「內部功能」 |
||||||
|
||||||
```@docs | ||||||
Base.gc | ||||||
Base.gc_enable | ||||||
Base.macroexpand | ||||||
Base.@macroexpand | ||||||
Base.expand | ||||||
Base.code_lowered | ||||||
Base.@code_lowered | ||||||
Base.code_typed | ||||||
Base.@code_typed | ||||||
Base.code_warntype | ||||||
Base.@code_warntype | ||||||
Base.code_llvm | ||||||
Base.@code_llvm | ||||||
Base.code_native | ||||||
Base.@code_native | ||||||
Base.precompile | ||||||
``` | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建議「基本功能」