Comprehensive Rust(繁体中文)
Comprehensive Rust Martin Geisler 目录 歡迎參加 Comprehensive Rust 課程 10 1 講授課程 12 1.1 課程架構 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.2 鍵盤快速鍵 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2 使用 Cargo 17 2.1 Rust 生態系統 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2 本訓練課程的程式碼範例 . 第 1 天:上午 20 3 歡迎參加第 1 天課程 21 4 Hello, World 22 4.1 什麼是 Rust? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2 Rust 的優點 . . . . . . . . . . . . . . . . . . . . . . . . . .0 码力 | 358 页 | 1.41 MB | 10 月前3Hello 算法 1.2.0 繁体中文 Rust 版
Hello 演算法 Rust 語言版 作者:靳宇棟(@krahets) 程式碼審閱:伍志豪(@night‑cruise)、榮怡(@rongyi) Release 1.2.0 2024‑12‑06 序 兩年前,我在力扣上分享了“劍指 Offer”系列題解,受到了許多讀者的鼓勵與支持。在與讀者交流期間,我 最常被問到的一個問題是“如何入門演算法”。漸漸地,我對這個問題產生了濃厚的興趣。 位元組。 ‧ Go 語言的 string 型別在內部使用 UTF‑8 編碼。Go 語言還提供了 rune 型別,它用於表示單個 Unicode 碼點。 ‧ Rust 語言的 str 和 String 型別在內部使用 UTF‑8 編碼。Rust 也提供了 char 型別,用於表示單個 Unicode 碼點。 需要注意的是,以上討論的都是字串在程式語言中的儲存方式,這和字串如何在檔案中儲存或在網路中傳輸 0, 0, 0, 0] let slice: &[i32] = &[0; 5]; // 在 Rust 中,指定長度時([i32; 5])為陣列,不指定長度時(&[i32])為切片 // 由於 Rust 的陣列被設計為在編譯期確定長度,因此只能使用常數來指定長度 // Vector 是 Rust 一般情況下用作動態陣列的型別 // 為了方便實現擴容 extend() 方法,以下將 vector0 码力 | 388 页 | 18.82 MB | 10 月前3julia 1.13.0 DEV
install juliaup in a shell with root privileges. cargo (Windows, Mac and Linux) To install Julia via Rust's cargo, run: cargo install juliaupChapter 4 Variables A variable, in Julia, is a name associated Base.AsyncCondition() wait(cond) The callback you pass to C should only execute a ccall to :uv_async_send, passing cond.handle as the argument, taking care to avoid any allocations or other interactions interactions with the Julia runtime. Note that events may be coalesced, so multiple calls to uv_async_send may result in a single wakeup notification to the condition. 28.17 More About Callbacks For more0 码力 | 2058 页 | 7.45 MB | 3 月前3Julia 1.11.4
install juliaup in a shell with root privileges. cargo (Windows, Mac and Linux) To install Julia via Rust's cargo, run: cargo install juliaupChapter 4 Variables A variable, in Julia, is a name associated other operations that use f(x): julia> g(x) = f(x) g (generic function with 1 method) julia> t = @async f(wait()); yield(); Now we add some new methods to f(x): julia> f(x::Int) = "definition for Int" julia> g(1) "definition for Int" julia> fetch(schedule(t, 1)) "original definition" julia> t = @async f(wait()); yield(); julia> fetch(schedule(t, 1)) "definition for Int" 13.6 Design Patterns with0 码力 | 2007 页 | 6.73 MB | 3 月前3Julia 1.11.5 Documentation
install juliaup in a shell with root privileges. cargo (Windows, Mac and Linux) To install Julia via Rust's cargo, run: cargo install juliaupChapter 4 Variables A variable, in Julia, is a name associated other operations that use f(x): julia> g(x) = f(x) g (generic function with 1 method) julia> t = @async f(wait()); yield(); Now we add some new methods to f(x): julia> f(x::Int) = "definition for Int" julia> g(1) "definition for Int" julia> fetch(schedule(t, 1)) "original definition" julia> t = @async f(wait()); yield(); julia> fetch(schedule(t, 1)) "definition for Int" 13.6 Design Patterns with0 码力 | 2007 页 | 6.73 MB | 3 月前3Julia 1.11.6 Release Notes
install juliaup in a shell with root privileges. cargo (Windows, Mac and Linux) To install Julia via Rust's cargo, run: cargo install juliaupChapter 4 Variables A variable, in Julia, is a name associated other operations that use f(x): julia> g(x) = f(x) g (generic function with 1 method) julia> t = @async f(wait()); yield(); Now we add some new methods to f(x): julia> f(x::Int) = "definition for Int" julia> g(1) "definition for Int" julia> fetch(schedule(t, 1)) "original definition" julia> t = @async f(wait()); yield(); julia> fetch(schedule(t, 1)) "definition for Int" 13.6 Design Patterns with0 码力 | 2007 页 | 6.73 MB | 3 月前3julia 1.12.0 beta1
install juliaup in a shell with root privileges. cargo (Windows, Mac and Linux) To install Julia via Rust's cargo, run: cargo install juliaupChapter 4 Variables A variable, in Julia, is a name associated other operations that use f(x): julia> g(x) = f(x) g (generic function with 1 method) julia> t = @async f(wait()); yield(); Now we add some new methods to f(x): julia> f(x::Int) = "definition for Int" julia> g(1) "definition for Int" julia> fetch(schedule(t, 1)) "original definition" julia> t = @async f(wait()); yield(); julia> fetch(schedule(t, 1)) "definition for Int" 13.6 Design Patterns with0 码力 | 2047 页 | 7.41 MB | 3 月前3Julia 1.12.0 RC1
install juliaup in a shell with root privileges. cargo (Windows, Mac and Linux) To install Julia via Rust's cargo, run: cargo install juliaupChapter 4 Variables A variable, in Julia, is a name associated Base.AsyncCondition() wait(cond) The callback you pass to C should only execute a ccall to :uv_async_send, passing cond.handle as the argument, taking care to avoid any allocations or other interactions interactions with the Julia runtime. Note that events may be coalesced, so multiple calls to uv_async_send may result in a single wakeup notification to the condition. 28.17 More About Callbacks For more0 码力 | 2057 页 | 7.44 MB | 3 月前3Julia 1.12.0 Beta4
install juliaup in a shell with root privileges. cargo (Windows, Mac and Linux) To install Julia via Rust's cargo, run: cargo install juliaupChapter 4 Variables A variable, in Julia, is a name associated Base.AsyncCondition() wait(cond) The callback you pass to C should only execute a ccall to :uv_async_send, passing cond.handle as the argument, taking care to avoid any allocations or other interactions interactions with the Julia runtime. Note that events may be coalesced, so multiple calls to uv_async_send may result in a single wakeup notification to the condition. 28.17 More About Callbacks For more0 码力 | 2057 页 | 7.44 MB | 3 月前3Julia 1.12.0 Beta3
install juliaup in a shell with root privileges. cargo (Windows, Mac and Linux) To install Julia via Rust's cargo, run: cargo install juliaupChapter 4 Variables A variable, in Julia, is a name associated Base.AsyncCondition() wait(cond) The callback you pass to C should only execute a ccall to :uv_async_send, passing cond.handle as the argument, taking care to avoid any allocations or other interactions interactions with the Julia runtime. Note that events may be coalesced, so multiple calls to uv_async_send may result in a single wakeup notification to the condition. 28.17 More About Callbacks For more0 码力 | 2057 页 | 7.44 MB | 3 月前3
共 24 条
- 1
- 2
- 3