diff --git a/po/tr.po b/po/tr.po index ffd561f29584..c4a031b4cb90 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" -"POT-Creation-Date: 2024-04-07T05:11:51+03:00\n" -"PO-Revision-Date: 2024-04-09 12:31+0300\n" +"POT-Creation-Date: 2024-12-10T14:46:21+03:00\n" +"PO-Revision-Date: 2024-12-11 13:44+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" "Language: tr\n" @@ -10,7 +10,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.5\n" #: src/SUMMARY.md src/index.md msgid "Welcome to Comprehensive Rust 🦀" @@ -34,7 +34,7 @@ msgstr "Çeviriler" #: src/SUMMARY.md src/cargo.md msgid "Using Cargo" -msgstr "Cargo Kullanımı" +msgstr "Cargo'yu Kullanmak" #: src/SUMMARY.md msgid "Rust Ecosystem" @@ -52,47 +52,52 @@ msgstr "Cargo'nun Yerel (Local) Olarak Çalıştırılması" msgid "Day 1: Morning" msgstr "Gün 1: Sabah" -#: src/SUMMARY.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md +#: src/welcome-day-4.md src/concurrency/welcome-async.md msgid "Welcome" msgstr "Hoş Geldiniz" -#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md +#: src/types-and-values/hello-world.md msgid "Hello, World" msgstr "Merhaba, Dünya" -#: src/SUMMARY.md src/hello-world/what-is-rust.md +#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md msgid "What is Rust?" msgstr "Rust Nedir?" -#: src/SUMMARY.md src/hello-world/benefits.md +#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md msgid "Benefits of Rust" msgstr "Rust'ın Faydaları" -#: src/SUMMARY.md src/hello-world/playground.md +#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md msgid "Playground" msgstr "Deneme Alanı (Playground)" -#: src/SUMMARY.md src/types-and-values.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1.md src/types-and-values.md msgid "Types and Values" msgstr "Türler ve Değerler" -#: src/SUMMARY.md src/types-and-values/variables.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md msgid "Variables" msgstr "Değişkenler" -#: src/SUMMARY.md src/types-and-values/values.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md msgid "Values" msgstr "Değerler" -#: src/SUMMARY.md src/types-and-values/arithmetic.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md msgid "Arithmetic" msgstr "Aritmetik" -#: src/SUMMARY.md src/types-and-values/inference.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md msgid "Type Inference" msgstr "Tür Çıkarımı" -#: src/SUMMARY.md src/types-and-values/exercise.md +#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md msgid "Exercise: Fibonacci" msgstr "Alıştırma: Fibonacci" @@ -109,7 +114,8 @@ msgstr "Alıştırma: Fibonacci" msgid "Solution" msgstr "Çözüm" -#: src/SUMMARY.md src/control-flow-basics.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1.md src/control-flow-basics.md msgid "Control Flow Basics" msgstr "Kontrol Akışı Temelleri" @@ -117,7 +123,7 @@ msgstr "Kontrol Akışı Temelleri" msgid "`if` Expressions" msgstr "`if` İfadeleri" -#: src/SUMMARY.md src/control-flow-basics/loops.md +#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md msgid "Loops" msgstr "Döngüler" @@ -137,7 +143,8 @@ msgstr "`break` ve `continue`" msgid "Labels" msgstr "Etiketler" -#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md +#: src/SUMMARY.md src/control-flow-basics.md +#: src/control-flow-basics/blocks-and-scopes.md msgid "Blocks and Scopes" msgstr "Bloklar ve Kapsamlar" @@ -145,15 +152,17 @@ msgstr "Bloklar ve Kapsamlar" msgid "Scopes and Shadowing" msgstr "Kapsamlar (Scopes) ve Gölgeleme (Shadowing)" -#: src/SUMMARY.md src/control-flow-basics/functions.md +#: src/SUMMARY.md src/control-flow-basics.md +#: src/control-flow-basics/functions.md msgid "Functions" msgstr "Fonksiyonlar" -#: src/SUMMARY.md src/control-flow-basics/macros.md +#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md msgid "Macros" msgstr "Makrolar" -#: src/SUMMARY.md src/control-flow-basics/exercise.md +#: src/SUMMARY.md src/control-flow-basics.md +#: src/control-flow-basics/exercise.md msgid "Exercise: Collatz Sequence" msgstr "Alıştırma: Collatz Sekansı" @@ -161,120 +170,133 @@ msgstr "Alıştırma: Collatz Sekansı" msgid "Day 1: Afternoon" msgstr "Gün 1: Öğleden Sonra" -#: src/SUMMARY.md src/tuples-and-arrays.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md msgid "Tuples and Arrays" msgstr "Demetler (Tuples) ve Diziler (Arrays)" -#: src/SUMMARY.md src/tuples-and-arrays/arrays.md +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md msgid "Arrays" msgstr "Diziler" -#: src/SUMMARY.md src/tuples-and-arrays/tuples.md +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md msgid "Tuples" msgstr "Demetler" -#: src/SUMMARY.md src/tuples-and-arrays/iteration.md +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md msgid "Array Iteration" -msgstr "Dizi İterasyonu" +msgstr "Dizi Adımlama (Iteration)" -#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md +#: src/SUMMARY.md src/tuples-and-arrays.md +#: src/tuples-and-arrays/destructuring.md msgid "Patterns and Destructuring" msgstr "Desenler ve Çözümlenme (Destructuring)" -#: src/SUMMARY.md src/tuples-and-arrays/exercise.md +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md msgid "Exercise: Nested Arrays" msgstr "Alıştırma: İçiçe Diziler" -#: src/SUMMARY.md src/references.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1-afternoon.md src/references.md msgid "References" msgstr "Referanslar" -#: src/SUMMARY.md src/references/shared.md +#: src/SUMMARY.md src/references.md src/references/shared.md msgid "Shared References" msgstr "Paylaşılan Referanslar" -#: src/SUMMARY.md src/references/exclusive.md +#: src/SUMMARY.md src/references.md src/references/exclusive.md msgid "Exclusive References" msgstr "Özel (Exclusive) Referanslar" -#: src/SUMMARY.md -msgid "Slices: `&[T]`" -msgstr "Dilimler: `&[T]`" +#: src/SUMMARY.md src/references.md src/references/slices.md +msgid "Slices" +msgstr "Dilimler (Slices)" -#: src/SUMMARY.md src/references/strings.md +#: src/SUMMARY.md src/references.md src/references/strings.md msgid "Strings" msgstr "Dizeler (Strings)" -#: src/SUMMARY.md src/references/exercise.md +#: src/SUMMARY.md src/references.md src/references/exercise.md msgid "Exercise: Geometry" msgstr "Alıştırma: Geometri" -#: src/SUMMARY.md src/user-defined-types.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-1-afternoon.md src/user-defined-types.md msgid "User-Defined Types" msgstr "Kullanıcı Tanımlı Türler" -#: src/SUMMARY.md src/user-defined-types/named-structs.md +#: src/SUMMARY.md src/user-defined-types.md +#: src/user-defined-types/named-structs.md msgid "Named Structs" msgstr "İsimli Yapılar" -#: src/SUMMARY.md src/user-defined-types/tuple-structs.md +#: src/SUMMARY.md src/user-defined-types.md +#: src/user-defined-types/tuple-structs.md msgid "Tuple Structs" msgstr "Demet Yapıları (Tuple Structs)" -#: src/SUMMARY.md src/user-defined-types/enums.md -#: src/pattern-matching/destructuring.md +#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md +#: src/pattern-matching/destructuring-enums.md msgid "Enums" msgstr "Enumlar" -#: src/SUMMARY.md -msgid "Static" -msgstr "Static" - #: src/SUMMARY.md msgid "Const" msgstr "Const" -#: src/SUMMARY.md src/user-defined-types/aliases.md +#: src/SUMMARY.md src/user-defined-types.md +msgid "Static" +msgstr "Static" + +#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md msgid "Type Aliases" msgstr "Tür Eş İsimleri (Type Aliases)" -#: src/SUMMARY.md src/user-defined-types/exercise.md +#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md msgid "Exercise: Elevator Events" -msgstr "Alıştırma: Asansör Etkinlikleri" +msgstr "Alıştırma: Asansör Olayları" #: src/SUMMARY.md msgid "Day 2: Morning" msgstr "Gün 2: Sabah" -#: src/SUMMARY.md src/pattern-matching.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2.md src/pattern-matching.md msgid "Pattern Matching" msgstr "Desen Eşleştirme" -#: src/SUMMARY.md src/pattern-matching/match.md +#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md msgid "Matching Values" -msgstr "Değerleri Eşleştirme" +msgstr "Değerleri Eşleştirmek" + +#: src/SUMMARY.md src/pattern-matching.md +msgid "Destructuring Structs" +msgstr "Yapıların (Struct) Çözümlenmesi" -#: src/SUMMARY.md src/pattern-matching/destructuring.md -msgid "Destructuring" -msgstr "Çözümlenme" +#: src/SUMMARY.md src/pattern-matching.md +msgid "Destructuring Enums" +msgstr "Enum'ların (Struct) Çözümlenmesi" -#: src/SUMMARY.md src/pattern-matching/let-control-flow.md +#: src/SUMMARY.md src/pattern-matching.md +#: src/pattern-matching/let-control-flow.md msgid "Let Control Flow" msgstr "Let'li Kontrol Akışı" -#: src/SUMMARY.md src/pattern-matching/exercise.md +#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md msgid "Exercise: Expression Evaluation" msgstr "Alıştırma: İfade Değerlendirmesi" -#: src/SUMMARY.md src/methods-and-traits.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2.md src/methods-and-traits.md msgid "Methods and Traits" msgstr "Metotlar ve Özellikler (Traits)" -#: src/SUMMARY.md src/methods-and-traits/methods.md +#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md msgid "Methods" msgstr "Metotlar" -#: src/SUMMARY.md src/methods-and-traits/traits.md +#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md msgid "Traits" msgstr "Özellikler (Traits)" @@ -283,7 +305,6 @@ msgid "Implementing Traits" msgstr "Özelliklerin (Traits) Gerçekleştirimi" #: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md -#, fuzzy msgid "Supertraits" msgstr "Üstözellikler (Supertraits)" @@ -291,23 +312,28 @@ msgstr "Üstözellikler (Supertraits)" msgid "Associated Types" msgstr "İlişkili Türler" -#: src/SUMMARY.md src/methods-and-traits/deriving.md +#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md msgid "Deriving" msgstr "Türetme" -#: src/SUMMARY.md +#: src/SUMMARY.md src/methods-and-traits.md msgid "Exercise: Generic Logger" msgstr "Alıştırma: Genel Kaydedici" -#: src/SUMMARY.md src/generics.md +#: src/SUMMARY.md +msgid "Day 2: Afternoon" +msgstr "Gün 2: Öğleden Sonra" + +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2-afternoon.md src/generics.md msgid "Generics" msgstr "Jenerikler" -#: src/SUMMARY.md src/generics/generic-functions.md +#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md msgid "Generic Functions" msgstr "Jenerik Fonksiyonlar" -#: src/SUMMARY.md src/generics/generic-data.md +#: src/SUMMARY.md src/generics.md src/generics/generic-data.md msgid "Generic Data Types" msgstr "Jenerik Veri Türleri" @@ -315,7 +341,7 @@ msgstr "Jenerik Veri Türleri" msgid "Generic Traits" msgstr "Jenerik Özellikler (Traits)" -#: src/SUMMARY.md src/generics/trait-bounds.md +#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md msgid "Trait Bounds" msgstr "Özellik (Trait) Sınırları" @@ -323,23 +349,24 @@ msgstr "Özellik (Trait) Sınırları" msgid "`impl Trait`" msgstr "`impl Trait`" +#: src/SUMMARY.md src/generics/dyn-trait.md +msgid "`dyn Trait`" +msgstr "`dyn Trait`" + #: src/SUMMARY.md src/generics/exercise.md msgid "Exercise: Generic `min`" msgstr "Alıştırma: Jenerik `min`" -#: src/SUMMARY.md -msgid "Day 2: Afternoon" -msgstr "Gün 2: Öğleden Sonra" - -#: src/SUMMARY.md src/std-types.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2-afternoon.md src/std-types.md msgid "Standard Library Types" msgstr "Standart Kütüphane Türleri" -#: src/SUMMARY.md src/std-types/std.md +#: src/SUMMARY.md src/std-types.md src/std-types/std.md msgid "Standard Library" msgstr "Standart Kütüphane" -#: src/SUMMARY.md src/std-types/docs.md +#: src/SUMMARY.md src/std-types.md src/std-types/docs.md msgid "Documentation" msgstr "Dokümantasyon" @@ -347,7 +374,7 @@ msgstr "Dokümantasyon" msgid "`Option`" msgstr "`Option`" -#: src/SUMMARY.md +#: src/SUMMARY.md src/error-handling/result.md msgid "`Result`" msgstr "`Result`" @@ -364,19 +391,21 @@ msgstr "`Vec`" msgid "`HashMap`" msgstr "`HashMap`" -#: src/SUMMARY.md src/std-types/exercise.md +#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md msgid "Exercise: Counter" msgstr "Alıştırma: Sayıcı" -#: src/SUMMARY.md src/std-traits.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-2-afternoon.md src/std-traits.md msgid "Standard Library Traits" msgstr "Standart Kütüphanedeki Özellikler (Traits)" -#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md +#: src/concurrency/welcome-async.md msgid "Comparisons" msgstr "Karşılaştırmalar" -#: src/SUMMARY.md src/std-traits/operators.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md msgid "Operators" msgstr "Operatörler" @@ -384,9 +413,9 @@ msgstr "Operatörler" msgid "`From` and `Into`" msgstr "`From` ve `Into`" -#: src/SUMMARY.md src/std-traits/casting.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md msgid "Casting" -msgstr "Casting" +msgstr "Tür Çevirimi" #: src/SUMMARY.md src/std-traits/read-and-write.md msgid "`Read` and `Write`" @@ -396,11 +425,11 @@ msgstr "`Read` ve `Write`" msgid "`Default`, struct update syntax" msgstr "`Default`, yapı (struct) güncelleme sözdizimi" -#: src/SUMMARY.md src/std-traits/closures.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md msgid "Closures" -msgstr "Kapanışlar (Closures)" +msgstr "Çevreleyiciler (Closures)" -#: src/SUMMARY.md src/std-traits/exercise.md +#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md msgid "Exercise: ROT13" msgstr "Alıştırma: ROT13" @@ -408,23 +437,24 @@ msgstr "Alıştırma: ROT13" msgid "Day 3: Morning" msgstr "Gün 3: Sabah" -#: src/SUMMARY.md src/memory-management.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-3.md src/memory-management.md msgid "Memory Management" msgstr "Bellek Yönetimi" -#: src/SUMMARY.md src/memory-management/review.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md msgid "Review of Program Memory" msgstr "Program Belleğinin Gözden Geçirilmesi" -#: src/SUMMARY.md src/memory-management/approaches.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md msgid "Approaches to Memory Management" msgstr "Bellek Yönetimine Yaklaşımlar" -#: src/SUMMARY.md src/memory-management/ownership.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md msgid "Ownership" msgstr "Sahiplik" -#: src/SUMMARY.md src/memory-management/move.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md msgid "Move Semantics" msgstr "Taşıma Semantiği" @@ -432,7 +462,7 @@ msgstr "Taşıma Semantiği" msgid "`Clone`" msgstr "`Clone`" -#: src/SUMMARY.md src/memory-management/copy-types.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md msgid "Copy Types" msgstr "Kopyalanan Türler" @@ -440,11 +470,12 @@ msgstr "Kopyalanan Türler" msgid "`Drop`" msgstr "`Drop`" -#: src/SUMMARY.md src/memory-management/exercise.md +#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md msgid "Exercise: Builder Type" msgstr "Alıştırma: İnşa Edici / Yapıcı Tür (Builder Type)" -#: src/SUMMARY.md src/smart-pointers.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-3.md src/smart-pointers.md msgid "Smart Pointers" msgstr "Akıllı Göstericiler" @@ -457,11 +488,11 @@ msgstr "`Box`" msgid "`Rc`" msgstr "`Rc`" -#: src/SUMMARY.md src/smart-pointers/trait-objects.md -msgid "Trait Objects" -msgstr "Özellik Nesneleri" +#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md +msgid "Owned Trait Objects" +msgstr "Sahipli Özellik Nesneleri (Owned Trait Objects)" -#: src/SUMMARY.md src/smart-pointers/exercise.md +#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md msgid "Exercise: Binary Tree" msgstr "Alıştırma: İkili Ağaç" @@ -469,43 +500,49 @@ msgstr "Alıştırma: İkili Ağaç" msgid "Day 3: Afternoon" msgstr "Gün 3: Öğleden Sonra" -#: src/SUMMARY.md src/borrowing.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-3-afternoon.md src/borrowing.md msgid "Borrowing" msgstr "Ödünç Alma" -#: src/SUMMARY.md src/borrowing/shared.md +#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md msgid "Borrowing a Value" msgstr "Bir Değeri Ödünç Alma" -#: src/SUMMARY.md src/borrowing/borrowck.md +#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md msgid "Borrow Checking" msgstr "Ödünç Alma Kontrolü" -#: src/SUMMARY.md src/borrowing/interior-mutability.md +#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md +msgid "Borrow Errors" +msgstr "Ödünç Alma Hataları" + +#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md msgid "Interior Mutability" -msgstr "İç (Interior) Değiştirilebilirlik" +msgstr "İç Değişebilirlik (Interior Mutability)" -#: src/SUMMARY.md src/borrowing/exercise.md +#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md msgid "Exercise: Health Statistics" msgstr "Alıştırma: Sağlık İstatistikleri" -#: src/SUMMARY.md src/lifetimes.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-3-afternoon.md src/lifetimes.md msgid "Lifetimes" msgstr "Ömürler (Lifetimes)" -#: src/SUMMARY.md src/lifetimes/lifetime-annotations.md +#: src/SUMMARY.md src/lifetimes.md src/lifetimes/lifetime-annotations.md msgid "Lifetime Annotations" msgstr "Ömür için Ek Açıklamalar (Annotations)" -#: src/SUMMARY.md +#: src/SUMMARY.md src/lifetimes.md msgid "Lifetime Elision" msgstr "Ömür Atlaması (Elision)" -#: src/SUMMARY.md +#: src/SUMMARY.md src/lifetimes.md msgid "Struct Lifetimes" msgstr "Yapıların Ömürleri" -#: src/SUMMARY.md src/lifetimes/exercise.md +#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md msgid "Exercise: Protobuf Parsing" msgstr "Alıştırma: Protobuf Ayrıştırma" @@ -513,9 +550,10 @@ msgstr "Alıştırma: Protobuf Ayrıştırma" msgid "Day 4: Morning" msgstr "Gün 4: Sabah" -#: src/SUMMARY.md src/iterators.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4.md src/iterators.md msgid "Iterators" -msgstr "Adımlayıcıyılar (Iterators)" +msgstr "Adımlayıcılar (Iterators)" #: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md msgid "`Iterator`" @@ -529,19 +567,20 @@ msgstr "`IntoIterator`" msgid "`FromIterator`" msgstr "`FromIterator`" -#: src/SUMMARY.md src/iterators/exercise.md +#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md msgid "Exercise: Iterator Method Chaining" msgstr "Alıştırma: Adımlayıcı Metot Zincirleme" -#: src/SUMMARY.md src/modules.md src/modules/modules.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4.md src/modules.md src/modules/modules.md msgid "Modules" msgstr "Modüller" -#: src/SUMMARY.md src/modules/filesystem.md +#: src/SUMMARY.md src/modules.md src/modules/filesystem.md msgid "Filesystem Hierarchy" msgstr "Dosya Sistemi Hiyerarşisi" -#: src/SUMMARY.md src/modules/visibility.md +#: src/SUMMARY.md src/modules.md src/modules/visibility.md msgid "Visibility" msgstr "Görünürlük" @@ -549,27 +588,28 @@ msgstr "Görünürlük" msgid "`use`, `super`, `self`" msgstr "`use`, `super`, `self`" -#: src/SUMMARY.md src/modules/exercise.md +#: src/SUMMARY.md src/modules.md src/modules/exercise.md msgid "Exercise: Modules for a GUI Library" msgstr "Alıştırma: Bir GUI Kütüphanesi için Modüller" -#: src/SUMMARY.md src/testing.md src/chromium/testing.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4.md src/testing.md src/chromium/testing.md msgid "Testing" msgstr "Test Etme" -#: src/SUMMARY.md +#: src/SUMMARY.md src/testing.md msgid "Test Modules" msgstr "Test Modülleri" -#: src/SUMMARY.md src/testing/other.md +#: src/SUMMARY.md src/testing.md src/testing/other.md msgid "Other Types of Tests" msgstr "Diğer Test Türleri" -#: src/SUMMARY.md src/testing/lints.md +#: src/SUMMARY.md src/testing.md src/testing/lints.md msgid "Compiler Lints and Clippy" -msgstr "Derleyicinin Tüyleri ve Clippy Aracı" +msgstr "Derleyici Tüyleri (Lint) ve Clippy Aracı" -#: src/SUMMARY.md src/testing/exercise.md +#: src/SUMMARY.md src/testing.md src/testing/exercise.md msgid "Exercise: Luhn Algorithm" msgstr "Alıştırma: Luhn Algrotiması" @@ -577,19 +617,20 @@ msgstr "Alıştırma: Luhn Algrotiması" msgid "Day 4: Afternoon" msgstr "Gün 4: Öğleden Sonra" -#: src/SUMMARY.md src/error-handling.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4-afternoon.md src/error-handling.md msgid "Error Handling" msgstr "Hata İşleme" -#: src/SUMMARY.md src/error-handling/panics.md +#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md msgid "Panics" msgstr "Panic'ler" -#: src/SUMMARY.md src/error-handling/try.md +#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md msgid "Try Operator" msgstr "Try Operatörü" -#: src/SUMMARY.md src/error-handling/try-conversions.md +#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md msgid "Try Conversions" msgstr "Try Dönüşümleri" @@ -597,47 +638,52 @@ msgstr "Try Dönüşümleri" msgid "`Error` Trait" msgstr "`Error` Özelliği (Trait)" -#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md -msgid "`thiserror` and `anyhow`" -msgstr "`thiserror` ve `anyhow`" +#: src/SUMMARY.md src/error-handling/thiserror.md +msgid "`thiserror`" +msgstr "`thiserror`" + +#: src/SUMMARY.md src/error-handling/anyhow.md +msgid "`anyhow`" +msgstr "`anyhow`" #: src/SUMMARY.md msgid "Exercise: Rewriting with `Result`" msgstr "Alıştırma: `Result` ile Yeniden Yazma" -#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md msgid "Unsafe Rust" msgstr "Emniyetsiz (Unsafe) Rust" -#: src/SUMMARY.md +#: src/SUMMARY.md src/unsafe-rust.md msgid "Unsafe" msgstr "Emniyetsiz" -#: src/SUMMARY.md src/unsafe-rust/dereferencing.md +#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md msgid "Dereferencing Raw Pointers" msgstr "Ham Göstericilerinin İçeriği (Dereferencing)" -#: src/SUMMARY.md src/unsafe-rust/mutable-static.md +#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md msgid "Mutable Static Variables" -msgstr "Değiştirilebilir Statik Değişkenler" +msgstr "Değişebilir Statik Değişkenler" -#: src/SUMMARY.md src/unsafe-rust/unions.md +#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md msgid "Unions" msgstr "Birlikler (Unions)" -#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md +#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md msgid "Unsafe Functions" msgstr "Emniyetsiz Fonksiyonlar" -#: src/SUMMARY.md +#: src/SUMMARY.md src/unsafe-rust.md msgid "Unsafe Traits" msgstr "Emniyetsiz Özellikler (Traits)" -#: src/SUMMARY.md +#: src/SUMMARY.md src/unsafe-rust.md msgid "Exercise: FFI Wrapper" -msgstr "Alıştırma: FFI Sarıcı" +msgstr "Alıştırma: FFI Sarmalayıcı" -#: src/SUMMARY.md src/bare-metal/android.md +#: src/SUMMARY.md msgid "Android" msgstr "Android" @@ -805,12 +851,6 @@ msgstr "Android için inşa: Rust" msgid "With Java" msgstr "Java ile" -#: src/SUMMARY.md src/exercises/android/morning.md -#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md -#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md -msgid "Exercises" -msgstr "Egzersizler" - #: src/SUMMARY.md msgid "Chromium" msgstr "Chromium" @@ -835,7 +875,8 @@ msgstr "Chromium C++'dan Rust Koduna Bağımlılık" msgid "Visual Studio Code" msgstr "Visual Studio Code" -#: src/SUMMARY.md src/exercises/chromium/third-party.md +#: src/SUMMARY.md src/lifetimes/exercise.md +#: src/exercises/chromium/third-party.md msgid "Exercise" msgstr "Alıştırma" @@ -944,7 +985,7 @@ msgstr "Alıştırma Çözümleri" #: src/SUMMARY.md msgid "Bare Metal: Morning" -msgstr "Yalın Metal (Bare Metal): Sabah" +msgstr "Yalın Sistem (Bare Metal): Sabah" #: src/SUMMARY.md src/bare-metal/no_std.md msgid "`no_std`" @@ -998,18 +1039,28 @@ msgstr "Hata Ayıklama" msgid "Other Projects" msgstr "Diğer Projeler" +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md +#: src/concurrency/welcome.md src/concurrency/sync-exercises.md +#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md +msgid "Exercises" +msgstr "Alıştırmalar" + #: src/SUMMARY.md src/exercises/bare-metal/compass.md #: src/exercises/bare-metal/solutions-morning.md msgid "Compass" msgstr "Pusula" -#: src/SUMMARY.md +#: src/SUMMARY.md src/concurrency/sync-exercises.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises.md +#: src/concurrency/async-exercises/solutions.md msgid "Solutions" msgstr "Çözümler" #: src/SUMMARY.md msgid "Bare Metal: Afternoon" -msgstr "Yalın Metal (Bare Metal): Öğleden Sonra" +msgstr "Yalın Sistem (Bare Metal): Öğleden Sonra" #: src/SUMMARY.md msgid "Application Processors" @@ -1055,7 +1106,7 @@ msgstr "Sürücü" msgid "Using It" msgstr "Onu Kullan" -#: src/SUMMARY.md src/bare-metal/aps/exceptions.md +#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md msgid "Exceptions" msgstr "İstisnalar" @@ -1083,6 +1134,10 @@ msgstr "`tinyvec`" msgid "`spin`" msgstr "`spin`" +#: src/SUMMARY.md src/bare-metal/android.md +msgid "Bare-Metal on Android" +msgstr "Android'de Yalın Sistem (Bare Metal)" + #: src/SUMMARY.md msgid "`vmbase`" msgstr "`vmbase`" @@ -1095,23 +1150,36 @@ msgstr "RTC Sürücüsü" msgid "Concurrency: Morning" msgstr "Eşzamanlılık: Sabah" -#: src/SUMMARY.md src/concurrency/threads.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome.md src/concurrency/threads.md msgid "Threads" msgstr "İş Parçacıkları (Threads)" -#: src/SUMMARY.md src/concurrency/scoped-threads.md +#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md +msgid "Plain Threads" +msgstr "Temel İş Parçacıkları (Plain Threads)" + +#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md msgid "Scoped Threads" msgstr "Kapsamlı İş Parçacıkları (Threads)" -#: src/SUMMARY.md src/concurrency/channels.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome.md src/concurrency/channels.md msgid "Channels" msgstr "Kanallar" -#: src/SUMMARY.md src/concurrency/channels/unbounded.md +#: src/SUMMARY.md src/concurrency/channels.md +#: src/concurrency/channels/senders-receivers.md +msgid "Senders and Receivers" +msgstr "Vericiler ve Alıcılar" + +#: src/SUMMARY.md src/concurrency/channels.md +#: src/concurrency/channels/unbounded.md msgid "Unbounded Channels" msgstr "Sınırsız Kanallar" -#: src/SUMMARY.md src/concurrency/channels/bounded.md +#: src/SUMMARY.md src/concurrency/channels.md +#: src/concurrency/channels/bounded.md msgid "Bounded Channels" msgstr "Sınırlı Kanallar" @@ -1119,6 +1187,11 @@ msgstr "Sınırlı Kanallar" msgid "`Send` and `Sync`" msgstr "`Send` ve `Sync`" +#: src/SUMMARY.md src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md +msgid "Marker Traits" +msgstr "Marker Özellikleri (Traits)" + #: src/SUMMARY.md src/concurrency/send-sync/send.md msgid "`Send`" msgstr "`Send`" @@ -1127,34 +1200,39 @@ msgstr "`Send`" msgid "`Sync`" msgstr "`Sync`" -#: src/SUMMARY.md src/concurrency/send-sync/examples.md +#: src/SUMMARY.md src/concurrency/send-sync.md +#: src/concurrency/send-sync/examples.md msgid "Examples" msgstr "Örnekler" -#: src/SUMMARY.md src/concurrency/shared_state.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome.md src/concurrency/shared-state.md msgid "Shared State" msgstr "Paylaşımlı Durum (State)" -#: src/SUMMARY.md src/concurrency/shared_state/arc.md +#: src/SUMMARY.md src/concurrency/shared-state/arc.md msgid "`Arc`" msgstr "`Arc`" -#: src/SUMMARY.md src/concurrency/shared_state/mutex.md +#: src/SUMMARY.md src/concurrency/shared-state/mutex.md msgid "`Mutex`" msgstr "`Mutex`" #: src/SUMMARY.md src/memory-management/review.md -#: src/error-handling/try-conversions.md -#: src/concurrency/shared_state/example.md +#: src/error-handling/try-conversions.md src/concurrency/shared-state.md +#: src/concurrency/shared-state/example.md msgid "Example" msgstr "Örnek" -#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md +#: src/SUMMARY.md src/concurrency/sync-exercises.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises.md msgid "Dining Philosophers" msgstr "Filozofların Akşam Yemeği" -#: src/SUMMARY.md src/exercises/concurrency/link-checker.md +#: src/SUMMARY.md src/concurrency/sync-exercises.md +#: src/concurrency/sync-exercises/link-checker.md msgid "Multi-threaded Link Checker" msgstr "Çok İş Parçacıklı Link Denetleyicisi" @@ -1162,69 +1240,79 @@ msgstr "Çok İş Parçacıklı Link Denetleyicisi" msgid "Concurrency: Afternoon" msgstr "Eşzamanlılık: Öğleden Sonra" -#: src/SUMMARY.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome-async.md src/concurrency/async.md msgid "Async Basics" msgstr "Async Temelleri" -#: src/SUMMARY.md src/async/async-await.md +#: src/SUMMARY.md src/concurrency/async/async-await.md msgid "`async`/`await`" msgstr "`async`/`await`" -#: src/SUMMARY.md src/async/futures.md +#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md msgid "Futures" msgstr "Future Özellikleri (Traits)" -#: src/SUMMARY.md src/async/runtimes.md +#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md msgid "Runtimes" msgstr "Çalışma Zamanları" -#: src/SUMMARY.md src/async/runtimes/tokio.md +#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md msgid "Tokio" msgstr "Tokio Kasası" -#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md -#: src/exercises/concurrency/chat-app.md +#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/async.md src/concurrency/async/tasks.md +#: src/concurrency/async-exercises/chat-app.md msgid "Tasks" msgstr "Görevler" -#: src/SUMMARY.md src/async/channels.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md +msgid "Channels and Control Flow" +msgstr "Kanallar ve Kontrol Akışı" + +#: src/SUMMARY.md src/concurrency/async-control-flow.md +#: src/concurrency/async-control-flow/channels.md msgid "Async Channels" msgstr "Async Kanalları" -#: src/SUMMARY.md -msgid "Control Flow" -msgstr "Kontrol Akışı" - -#: src/SUMMARY.md src/async/control-flow/join.md +#: src/SUMMARY.md src/concurrency/async-control-flow.md +#: src/concurrency/async-control-flow/join.md msgid "Join" msgstr "Join" -#: src/SUMMARY.md src/async/control-flow/select.md +#: src/SUMMARY.md src/concurrency/async-control-flow.md +#: src/concurrency/async-control-flow/select.md msgid "Select" msgstr "Select" -#: src/SUMMARY.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md msgid "Pitfalls" msgstr "Tuzaklar" -#: src/SUMMARY.md +#: src/SUMMARY.md src/concurrency/async-pitfalls.md msgid "Blocking the Executor" msgstr "Yürütücünün/Çalıştırıcının (Executor) Engellenmesi" -#: src/SUMMARY.md src/async/pitfalls/pin.md +#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md msgid "`Pin`" msgstr "`Pin`" -#: src/SUMMARY.md src/async/pitfalls/async-traits.md +#: src/SUMMARY.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "Async Traits" msgstr "Async Özellikleri (Traits)" -#: src/SUMMARY.md src/async/pitfalls/cancellation.md +#: src/SUMMARY.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "Cancellation" msgstr "İptal (Cancellation)" -#: src/SUMMARY.md src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/SUMMARY.md src/concurrency/async-exercises.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "Broadcast Chat Application" msgstr "Yayımlamalı Sohbet Uygulaması" @@ -1236,6 +1324,7 @@ msgstr "Son sözler" msgid "Thanks!" msgstr "Teşekkürler!" +#. Please keep { #glossary } untranslated. #: src/SUMMARY.md src/glossary.md msgid "Glossary" msgstr "Sözlük" @@ -1289,7 +1378,16 @@ msgstr "" "kontrol edin." #: src/index.md -#, fuzzy +msgid "" +"The course is available in other languages. Select your preferred language " +"in the top right corner of the page or check the [Translations](running-the-" +"course/translations.md) page for a list of all available translations." +msgstr "" +"Kurs diğer dillerde de mevcuttur. Sayfanın sağ üst köşesinden tercih " +"ettiğiniz dili seçin veya tüm mevcut çevirilerin listesi için [Çeviriler]" +"(running-the-course/translations.md) sayfasını kontrol edin." + +#: src/index.md msgid "The course is also available [as a PDF](comprehensive-rust.pdf)." msgstr "Kurs ayrıca [PDF olarak](comprehensive-rust.pdf) da mevcuttur." @@ -1352,21 +1450,21 @@ msgid "" "(embedded) development. Both microcontrollers and application processors are " "covered." msgstr "" -"[Yalın-metal](bare-metal.md): Yalın metal (gömülü) geliştirme için Rust'ın " +"[Yalın-metal](bare-metal.md): Yalın sistem (gömülü) geliştirme için Rust'ın " "kullanımına ilişkin tam günlük bir ders. Hem mikrodenetleyiciler hem de " "uygulama işlemcileri kapsanmaktadır." #: src/index.md msgid "" -"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We " -"cover both classical concurrency (preemptively scheduling using threads and " -"mutexes) and async/await concurrency (cooperative multitasking using " -"futures)." +"[Concurrency](concurrency/welcome.md): a whole-day class on concurrency in " +"Rust. We cover both classical concurrency (preemptively scheduling using " +"threads and mutexes) and async/await concurrency (cooperative multitasking " +"using futures)." msgstr "" -"[Eşzamanlılık](concurrency.md): Rust'ta eşzamanlılık üzerine tam günlük bir " -"ders. Hem klasik eşzamanlılığı (iş parçacıkları ve mutexleri kullanarak " -"kesintili/geçişli zamanlama) hem de async/await eşzamanlılığını (future " -"özelliklerini kullanarak işbirlikçi çoklu görev) ele alıyoruz." +"[Eşzamanlılık](concurrency/welcome.md): Rust'ta eşzamanlılık üzerine tam " +"günlük bir ders. Hem klasik eşzamanlılığı (iş parçacıkları ve muteksleri " +"kullanarak kesintili/geçişli zamanlama) hem de async/await eşzamanlılığını " +"(future özelliklerini kullanarak işbirlikçi çoklu görev) ele alıyoruz." #: src/index.md msgid "Non-Goals" @@ -1525,8 +1623,8 @@ msgid "" "information in the standard library." msgstr "" "İnsanların alıştırmaları kendi başlarına veya küçük gruplar halinde " -"çözmelerine izin verin. Genellikle sabah ve öğleden sonra egzersizlere 30-45 " -"dakika harcıyoruz (çözümleri gözden geçirme (review) zamanı da dahil). " +"çözmelerine izin verin. Genellikle sabah ve öğleden sonra alıştırmalara " +"30-45 dakika harcıyoruz (çözümleri gözden geçirme (review) zamanı da dahil). " "İnsanlara takılıp kalmadıklarını veya yardımcı olabileceğiniz bir konu olup " "olmadığını sorduğunuzdan emin olun. Birkaç kişinin aynı sorunu yaşadığını " "gördüğünüzde bunu sınıfa söyleyin ve bir çözüm önerin; örneğin insanlara " @@ -1574,130 +1672,126 @@ msgstr "Kurs programı:" msgid "Day 1 Morning (2 hours and 5 minutes, including breaks)" msgstr "1. Gün Sabah (2 saat 5 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Welcome](../welcome-day-1.md) (5 minutes)" -msgstr "[Hoş Geldiniz](../welcome-day-1.md) (5 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Hello, World](../hello-world.md) (15 minutes)" -msgstr "[Merhaba, Dünya](../hello-world.md) (15 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Types and Values](../types-and-values.md) (40 minutes)" -msgstr "[Türler ve Değerler](../types-and-values.md) (40 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/welcome-day-1-afternoon.md src/welcome-day-2.md +#: src/welcome-day-2-afternoon.md src/welcome-day-3.md +#: src/welcome-day-3-afternoon.md src/welcome-day-4.md +#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md +#: src/concurrency/welcome-async.md +msgid "Segment" +msgstr "Bölüm" -#: src/running-the-course/course-structure.md -msgid "[Control Flow Basics](../control-flow-basics.md) (40 minutes)" -msgstr "[Kontrol Akışı Temelleri](../control-flow-basics.md) (40 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md +#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md +#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md +#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md +#: src/std-types.md src/std-traits.md src/welcome-day-3.md +#: src/memory-management.md src/smart-pointers.md +#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md +#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md +#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md +#: src/concurrency/welcome.md src/concurrency/threads.md +#: src/concurrency/channels.md src/concurrency/send-sync.md +#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md +#: src/concurrency/welcome-async.md src/concurrency/async.md +#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-exercises.md +msgid "Duration" +msgstr "Süre" + +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md +#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md +#: src/memory-management.md src/smart-pointers.md src/lifetimes.md +#: src/iterators.md src/modules.md src/testing.md src/error-handling.md +#: src/unsafe-rust.md src/concurrency/shared-state.md +#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md +msgid "5 minutes" +msgstr "5 dakika" + +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md +#: src/references.md src/user-defined-types.md src/methods-and-traits.md +#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md +#: src/concurrency/shared-state.md +msgid "15 minutes" +msgstr "15 dakika" + +#: src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/welcome-day-4.md +msgid "40 minutes" +msgstr "40 dakika" #: src/running-the-course/course-structure.md msgid "Day 1 Afternoon (2 hours and 35 minutes, including breaks)" msgstr "1. Gün Öğleden Sonra (2 saat 35 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)" -msgstr "[Demetler ve Diziler](../tuples-and-arrays.md) (35 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[References](../references.md) (55 minutes)" -msgstr "[Referanslar](../references.md) (55 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[User-Defined Types](../user-defined-types.md) (50 minutes)" -msgstr "[Kullanıcı Tanımlı Türler](../user-defined-types.md) (50 dakika)" - -#: src/running-the-course/course-structure.md -msgid "Day 2 Morning (2 hours and 55 minutes, including breaks)" -msgstr "2. Gün Sabah (2 saat 55 dakika, aralar dahil)" - -#: src/running-the-course/course-structure.md -msgid "[Welcome](../welcome-day-2.md) (3 minutes)" -msgstr "[Hoş Geldiniz](../welcome-day-2.md) (3 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md +msgid "35 minutes" +msgstr "35 dakika" -#: src/running-the-course/course-structure.md -msgid "[Pattern Matching](../pattern-matching.md) (1 hour)" -msgstr "[Desen Eşleştirme](../pattern-matching.md) (1 saat)" +#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md +#: src/welcome-day-3.md src/welcome-day-3-afternoon.md +#: src/concurrency/welcome-async.md +msgid "55 minutes" +msgstr "55 dakika" -#: src/running-the-course/course-structure.md -msgid "[Methods and Traits](../methods-and-traits.md) (50 minutes)" -msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md +#: src/welcome-day-2.md src/welcome-day-3-afternoon.md +msgid "50 minutes" +msgstr "50 dakika" #: src/running-the-course/course-structure.md -msgid "[Generics](../generics.md) (40 minutes)" -msgstr "[Jenerikler](../generics.md) (40 dakika)" +msgid "Day 2 Morning (2 hours and 10 minutes, including breaks)" +msgstr "2. Gün Sabah (2 saat 10 dakika, aralar dahil)" + +#: src/running-the-course/course-structure.md src/hello-world.md +#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md +#: src/welcome-day-2.md src/methods-and-traits.md src/std-types.md +#: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md +#: src/testing.md src/error-handling.md +msgid "3 minutes" +msgstr "3 dakika" + +#: src/running-the-course/course-structure.md src/welcome-day-2.md +#: src/welcome-day-2-afternoon.md src/welcome-day-3.md +msgid "1 hour" +msgstr "1 saat" #: src/running-the-course/course-structure.md -msgid "Day 2 Afternoon (3 hours and 10 minutes, including breaks)" -msgstr "2. Gün Öğleden Sonra (3 saat 10 dakika, aralar dahil)" +msgid "Day 2 Afternoon (3 hours and 15 minutes, including breaks)" +msgstr "2. Gün Öğleden Sonra (3 saat 15 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Standard Library Types](../std-types.md) (1 hour and 20 minutes)" -msgstr "[Standart Kütüphanedeki Türler](../std-types.md) (1 saat 20 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md +#: src/welcome-day-4.md +msgid "45 minutes" +msgstr "45 dakika" -#: src/running-the-course/course-structure.md -msgid "[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)" -msgstr "" -"[Standart Kütüphanedeki Özellikler](../std-traits.md) (1 saat 40 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md +#: src/concurrency/welcome.md src/concurrency/welcome-async.md +msgid "1 hour and 10 minutes" +msgstr "1 saat 10 dakika" #: src/running-the-course/course-structure.md msgid "Day 3 Morning (2 hours and 20 minutes, including breaks)" msgstr "3. Gün Sabah (2 saat 20 dakika, aralar dahil)" #: src/running-the-course/course-structure.md -msgid "[Welcome](../welcome-day-3.md) (3 minutes)" -msgstr "[Hoş Geldiniz](../welcome-day-3.md) (3 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Memory Management](../memory-management.md) (1 hour)" -msgstr "[Bellek Yönetimi](../memory-management.md) (1 saat)" - -#: src/running-the-course/course-structure.md -msgid "[Smart Pointers](../smart-pointers.md) (55 minutes)" -msgstr "[Akıllı Göstericiler](../smart-pointers.md) (55 dakika)" - -#: src/running-the-course/course-structure.md -msgid "Day 3 Afternoon (1 hour and 50 minutes, including breaks)" -msgstr "3. Gün Öğleden Sonra (1 saat 50 dakika, aralar dahil)" - -#: src/running-the-course/course-structure.md -msgid "[Borrowing](../borrowing.md) (50 minutes)" -msgstr "[Ödünç Alma](../borrowing.md) (50 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Lifetimes](../lifetimes.md) (50 minutes)" -msgstr "[Ömürler](../lifetimes.md) (50 dakika)" +msgid "Day 3 Afternoon (1 hour and 55 minutes, including breaks)" +msgstr "3. Gün Öğleden Sonra (1 saat 55 dakika, aralar dahil)" #: src/running-the-course/course-structure.md msgid "Day 4 Morning (2 hours and 40 minutes, including breaks)" msgstr "4. Gün Sabah (2 saat 40 dakika, aralar dahil)" #: src/running-the-course/course-structure.md -msgid "[Welcome](../welcome-day-4.md) (3 minutes)" -msgstr "[Hoş Geldiniz](../welcome-day-4.md) (3 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Iterators](../iterators.md) (45 minutes)" -msgstr "[Adımlayıcılar](../iterators.md) (45 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Modules](../modules.md) (40 minutes)" -msgstr "[Modüller](../modules.md) (40 dakika)" - -#: src/running-the-course/course-structure.md -msgid "[Testing](../testing.md) (45 minutes)" -msgstr "[Test Etme](../testing.md) (45 dakika)" - -#: src/running-the-course/course-structure.md -msgid "Day 4 Afternoon (2 hours and 10 minutes, including breaks)" -msgstr "4. Gün Öğleden Sonra (2 saat 10 dakika, aralar dahil)" - -#: src/running-the-course/course-structure.md -msgid "[Error Handling](../error-handling.md) (55 minutes)" -msgstr "[Hata İşleme](../error-handling.md) (55 dakika)" +msgid "Day 4 Afternoon (2 hours and 20 minutes, including breaks)" +msgstr "4. Gün Öğleden Sonra (2 saat 20 dakika, aralar dahil)" -#: src/running-the-course/course-structure.md -msgid "[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)" -msgstr "[Emniyetsiz Rust](../unsafe-rust.md) (1 saat 5 dakika)" +#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md +msgid "1 hour and 5 minutes" +msgstr "1 saat 5 dakika" #: src/running-the-course/course-structure.md msgid "Deep Dives" @@ -1782,7 +1876,7 @@ msgstr "" #: src/running-the-course/course-structure.md msgid "Bare-Metal Rust" -msgstr "Yalın-Metal (Bare-metal) Rust" +msgstr "Yalın-Sistem (Bare-metal) Rust" #: src/running-the-course/course-structure.md msgid "" @@ -1790,7 +1884,7 @@ msgid "" "using Rust for bare-metal (embedded) development. Both microcontrollers and " "application processors are covered." msgstr "" -"[Yalın-Metal Rust](../bare-metal.md) ayrıntılı incelemesi, yalın metal " +"[Yalın-Sistem Rust](../bare-metal.md) ayrıntılı incelemesi, yalın sistem " "(gömülü) geliştirme için Rust kullanımına ilişkin tam günlük bir derstir. " "Hem mikrodenetleyiciler hem de uygulama işlemcileri kapsanmaktadır." @@ -1812,11 +1906,12 @@ msgstr "Rust'ta Eşzamanlılık" #: src/running-the-course/course-structure.md msgid "" -"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class " -"on classical as well as `async`/`await` concurrency." +"The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day " +"class on classical as well as `async`/`await` concurrency." msgstr "" -"[Rust'ta Eşzamanlılık](../concurrency.md) ayrıntılı incelemesi, klasik ve " -"aynı zamanda `async`/`await` eşzamanlılığı üzerine tam günlük bir derstir." +"[Rust'ta Eşzamanlılık](../concurrency/welcome.md) ayrıntılı incelemesi, " +"klasik ve aynı zamanda `async`/`await` eşzamanlılığı üzerine tam günlük bir " +"derstir." #: src/running-the-course/course-structure.md msgid "" @@ -1828,6 +1923,34 @@ msgstr "" "hazır hale getirilmesine ihtiyacınız olacak. Daha sonra örnekleri denemek " "için kopyalayıp `src/main.rs` dosyasına yapıştırabilirsiniz:" +#: src/running-the-course/course-structure.md +msgid "Morning (3 hours and 20 minutes, including breaks)" +msgstr "Sabah (3 saat 20 dakika, aralar dahil)" + +#: src/running-the-course/course-structure.md src/pattern-matching.md +#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md +#: src/testing.md src/error-handling.md src/unsafe-rust.md +#: src/concurrency/welcome.md src/concurrency/sync-exercises.md +#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md +msgid "30 minutes" +msgstr "30 dakika" + +#: src/running-the-course/course-structure.md src/methods-and-traits.md +#: src/std-types.md src/memory-management.md src/borrowing.md +#: src/concurrency/welcome.md src/concurrency/sync-exercises.md +#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-exercises.md +msgid "20 minutes" +msgstr "20 dakika" + +#: src/running-the-course/course-structure.md src/concurrency/welcome.md +msgid "Send and Sync" +msgstr "Send ve Sync" + +#: src/running-the-course/course-structure.md +msgid "Afternoon (3 hours and 20 minutes, including breaks)" +msgstr "Öğleden Sonra (3 saat 20 dakika, aralar dahil)" + #: src/running-the-course/course-structure.md msgid "Format" msgstr "Format" @@ -1845,36 +1968,20 @@ msgid "There are several useful keyboard shortcuts in mdBook:" msgstr "Bu mdBook'ta birkaç kullanışlı klavye kısayolu vardır:" #: src/running-the-course/keyboard-shortcuts.md -msgid "Arrow-Left" -msgstr "Yön Oku-Sol" - -#: src/running-the-course/keyboard-shortcuts.md -msgid ": Navigate to the previous page." -msgstr ": Önceki sayfaya gidin." - -#: src/running-the-course/keyboard-shortcuts.md -msgid "Arrow-Right" -msgstr "Yön Oku-Sağ" +msgid "Arrow-Left: Navigate to the previous page." +msgstr "Arrow-Left: Önceki sayfaya gidin." #: src/running-the-course/keyboard-shortcuts.md -msgid ": Navigate to the next page." -msgstr ": Sonraki sayfaya gidin." - -#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md -msgid "Ctrl + Enter" -msgstr "Ctrl + Enter" - -#: src/running-the-course/keyboard-shortcuts.md -msgid ": Execute the code sample that has focus." -msgstr ": Odaklı kod örneğini yürütün." +msgid "Arrow-Right: Navigate to the next page." +msgstr "Arrow-Right: Sonraki sayfaya gidin." #: src/running-the-course/keyboard-shortcuts.md -msgid "s" -msgstr "s" +msgid "Ctrl + Enter: Execute the code sample that has focus." +msgstr "Ctrl + Enter: Odaklı kod örneğini yürütün." #: src/running-the-course/keyboard-shortcuts.md -msgid ": Activate the search bar." -msgstr ": Arama çubuğunu etkinleştirin." +msgid "s: Activate the search bar." +msgstr "s: Arama çubuğunu etkinleştirin." #: src/running-the-course/translations.md msgid "" @@ -1900,8 +2007,7 @@ msgid "" "by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/" "wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/" "kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://" -"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]" -"(https://github.com/nodmp)." +"github.com/superwhd), @SketchK, and [@nodmp](https://github.com/nodmp)." msgstr "" "[Çince (Basitleştirilmiş)](https://google.github.io/comprehensive-rust/zh-" "CN/) yazanlar: [@suetfei](https://github.com/suetfei), [@wnghl](https://" @@ -1924,6 +2030,32 @@ msgstr "" "[@kuanhungchen](https://github.com/kuanhungchen) ve [@johnathan79717]" "(https://github.com/johnathan79717)." +#: src/running-the-course/translations.md +msgid "" +"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" +"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" +"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://" +"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) " +"and [@mehrad77](https://github.com/mehrad77)." +msgstr "" +"[Farsça](https://google.github.io/comprehensive-rust/fa/) yazanlar: " +"[@DannyRavi](https://github.com/DannyRavi), [@javad-jafari](https://github." +"com/javad-jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi]" +"(https://github.com/moaminsharifi), [@hamidrezakp](https://github.com/" +"hamidrezakp) ve [@mehrad77](https://github.com/mehrad77)." + +#: src/running-the-course/translations.md +msgid "" +"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" +"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/" +"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) " +"and [@kantasv](https://github.com/kantasv)." +msgstr "" +"[Japonca](https://google.github.io/comprehensive-rust/ja/) yazanlar: " +"[@CoinEZ-JPN](https://github.com/CoinEZ), [@momotaro1105](https://github.com/" +"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) ve " +"[@kantasv](https://github.com/kantasv)." + #: src/running-the-course/translations.md msgid "" "[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]" @@ -1932,7 +2064,7 @@ msgid "" "com/namhyung)." msgstr "" "[Korece](https://google.github.io/comprehensive-rust/ko/) yazanlar: " -"[@keispace](https://github.com/keispace), [@jiyongp](https://github.com) /" +"[@keispace](https://github.com/keispace), [@jiyongp](https://github.com/" "jiyongp), [@jooyunghan](https://github.com/jooyunghan) ve [@namhyung]" "(https://github.com/namhyung)." @@ -1944,6 +2076,30 @@ msgstr "" "[Bengalce](https://google.github.io/comprehensive-rust/bn/) yazanlar: " "[@raselmandol](https://github.com/raselmandol)." +#: src/running-the-course/translations.md +msgid "" +"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-" +"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/" +"yaremam) and [@reta](https://github.com/reta)." +msgstr "" +"[Ukraynaca](https://google.github.io/comprehensive-rust/uk/) yazanlar: [@git-" +"user-cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/" +"yaremam) ve [@reta](https://github.com/reta)." + +#: src/running-the-course/translations.md +msgid "" +"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" +"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" +"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://" +"github.com/moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) " +"and [@mehrad77](https://github.com/mehrad77)." +msgstr "" +"[Farsça](https://google.github.io/comprehensive-rust/fa/) yazanlar: " +"[@DannyRavi](https://github.com/DannyRavi), [@javad-jafari](https://github." +"com/javad-jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi]" +"(https://github.com/moaminsharifi), [@hamidrezakp](https://github.com/" +"hamidrezakp) ve [@mehrad77](https://github.com/mehrad77)." + #: src/running-the-course/translations.md msgid "" "Use the language picker in the top-right corner to switch between languages." @@ -1962,6 +2118,14 @@ msgstr "" "Devam eden çok sayıda çeviri var. En son güncellenen çevirilere bağlantı " "veriyoruz:" +#: src/running-the-course/translations.md +msgid "" +"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]" +"(https://github.com/younies)" +msgstr "" +"[Arapça](https://google.github.io/comprehensive-rust/ar/) yazanlar: " +"[@younies](https://github.com/younies)" + #: src/running-the-course/translations.md msgid "" "[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]" @@ -1973,10 +2137,12 @@ msgstr "" #: src/running-the-course/translations.md msgid "" "[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]" -"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)." +"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and " +"[@AdrienBaudemont](https://github.com/AdrienBaudemont)." msgstr "" "[Fransızca](https://google.github.io/comprehensive-rust/fr/) yazanlar: " -"[@KookaS](https://github.com/KookaS) ve [@vcaen](https://github.com) /vcaen)." +"[@KookaS](https://github.com/KookaS), [@vcaen](https://github.com/vcaen) ve " +"[@AdrienBaudemont](https://github.com/AdrienBaudemont)." #: src/running-the-course/translations.md msgid "" @@ -1984,19 +2150,9 @@ msgid "" "(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw)." msgstr "" "[Almanca](https://google.github.io/comprehensive-rust/de/) yazanlar: " -"[@Throvn](https://github.com/Throvn) ve [@ronaldfw](https://github.com) /" +"[@Throvn](https://github.com/Throvn) ve [@ronaldfw](https://github.com/" "ronaldfw)." -#: src/running-the-course/translations.md -msgid "" -"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" -"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/" -"momotaro1105)." -msgstr "" -"[Japonca](https://google.github.io/comprehensive-rust/ja/) yazanlar: " -"[@CoinEZ-JPN](https://github.com/CoinEZ) ve [@momotaro1105](https://github) ." -"com/momotaro1105)." - #: src/running-the-course/translations.md msgid "" "[Italian](https://google.github.io/comprehensive-rust/it/) by " @@ -2007,6 +2163,19 @@ msgstr "" "[@henrythebuilder](https://github.com/henrythebuilder) ve [@detro](https://" "github.com/detro)." +#: src/running-the-course/translations.md +msgid "" +"The full list of translations with their current status is also available " +"either [as of their last update](https://google.github.io/comprehensive-rust/" +"translation-report.html) or [synced to the latest version of the course]" +"(https://google.github.io/comprehensive-rust/synced-translation-report.html)." +msgstr "" +"Çevirilerin tam listesi ve güncel durumları [son güncelleme tarihi " +"itibarıyla](https://google.github.io/comprehensive-rust/translation-report." +"html) veya [kursun en son sürümüyle senkronize edilmiş olarak](https://" +"google.github.io/comprehensive-rust/synced-translation-report.html) da " +"mevcuttur." + #: src/running-the-course/translations.md msgid "" "If you want to help with this effort, please see [our instructions](https://" @@ -2075,13 +2244,23 @@ msgstr "" msgid "" "On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust " "formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this " -"gets you an outdated rust version and may lead to unexpected behavior. The " +"gets you an outdated Rust version and may lead to unexpected behavior. The " "command would be:" msgstr "" -"Debian/Ubuntu'da ayrıca Cargo'yu, Rust kaynak kodunu ve [Rust " -"biçimlendiriciyi](https://github.com/rust-lang/rustfmt) `apt` aracılığıyla " -"yükleyebilirsiniz. Ancak bu, eski bir Rust sürümüne sahip olmanızı sağlar ve " -"beklenmeyen davranışlara yol açabilir. Komut şöyle olacaktır:" +"Debian/Ubuntu'da ayrıca `apt` aracılığıyla Cargo'yu, Rust kaynak kodunu ve " +"[Rust biçimlendiricisini](https://github.com/rust-lang/rustfmt) " +"kurabilirsiniz. Ancak bu size eski bir Rust sürümü verir ve beklenmeyen " +"davranışlara yol açabilir. Komut şu şekilde olacaktır:" + +#: src/cargo.md +msgid "" +"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this " +"may provide an outdated version. Therefore, it is recommended to install " +"Rust from the official site." +msgstr "" +"Mac işletim sisteminde Rust'ı yüklemek için [Homebrew](https://brew.sh/)'i " +"kullanabilirsiniz, ancak bu eski bir sürüm sağlayabilir. Bu nedenle Rust'ı " +"resmi sitesinden kurmanız önerilir." #: src/cargo/rust-ecosystem.md msgid "The Rust Ecosystem" @@ -2130,9 +2309,9 @@ msgstr "" "yapmanıza olanak tanır." #: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md -#: src/references/exclusive.md src/pattern-matching/destructuring.md -#: src/memory-management/move.md src/error-handling/try.md src/android/setup.md -#: src/async/async-await.md +#: src/references/exclusive.md src/memory-management/move.md +#: src/error-handling/try.md src/android/setup.md +#: src/concurrency/async/async-await.md msgid "Key points:" msgstr "Anahtar noktalar:" @@ -2276,9 +2455,9 @@ msgid "" "which can be executed through your browser. This makes the setup much easier " "and ensures a consistent experience for everyone." msgstr "" -"Bu eğitimde çoğunlukla Rust dilini tarayıcınız üzerinden " -"çalıştırabileceğiniz örnekler üzerinden inceleyeceğiz. Bu, kurulumu çok daha " -"kolay hale getirir ve herkes için tutarlı bir deneyim sağlar." +"Bu eğitimde çoğunlukla Rust dilini tarayıcınız üzerinden yürütebileceğiniz " +"örnekler üzerinden inceleyeceğiz. Bu, kurulumu çok daha kolay hale getirir " +"ve herkes için tutarlı bir deneyim sağlar." #: src/cargo/code-samples.md msgid "" @@ -2286,7 +2465,7 @@ msgid "" "the exercises. On the last day, we will do a larger exercise which shows you " "how to work with dependencies and for that you need Cargo." msgstr "" -"Cargo'nun kurulumu hala teşvik edilmektedir: egzersizleri yapmanızı " +"Cargo'nun kurulumu hala teşvik edilmektedir: alıştırmaları yapmanızı " "kolaylaştıracaktır. Son gün, bağımlılıklarla nasıl çalışacağınızı ve bunun " "için Cargo'ya ihtiyacınız olduğunu gösteren daha büyük bir alıştırma " "yapacağız." @@ -2300,12 +2479,12 @@ msgid "\"Edit me!\"" msgstr "\"Düzenle beni!\"" #: src/cargo/code-samples.md -msgid "You can use " -msgstr "Odak metin kutusundayken kodu yürütmek için " - -#: src/cargo/code-samples.md -msgid " to execute the code when focus is in the text box." -msgstr " kullanabilirsiniz.." +msgid "" +"You can use Ctrl + Enter to execute the code when focus is in the " +"text box." +msgstr "" +"Metin kutusu odaklanmışken kodu çalıştırmak için Ctrl + Enter " +"tuşlarını kullanabilirsiniz." #: src/cargo/code-samples.md msgid "" @@ -2320,7 +2499,7 @@ msgid "" "The embedded playgrounds cannot execute unit tests. Copy-paste the code and " "open it in the real Playground to demonstrate unit tests." msgstr "" -"Gömülü deneme alanları (playgrounds) birim testleri gerçekleştiremez. Birim " +"Gömülü deneme alanları (playgrounds) birim testlerini yürütemez. Birim " "testlerini göstermek için kodu kopyalayıp yapıştırın ve gerçek Deneme " "Alanında (Playground) açın." @@ -2474,39 +2653,18 @@ msgstr "" "çözümlenmesi (destructuring)." #: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md -#: src/welcome-day-4.md +#: src/welcome-day-4.md src/concurrency/welcome.md +#: src/concurrency/welcome-async.md msgid "Schedule" msgstr "Zamanlama (Schedule)" -#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md -#: src/welcome-day-2-afternoon.md src/welcome-day-3.md -#: src/welcome-day-3-afternoon.md src/welcome-day-4.md -#: src/welcome-day-4-afternoon.md -msgid "In this session:" -msgstr "Bu oturumda:" - -#: src/welcome-day-1.md -msgid "[Welcome](./welcome-day-1.md) (5 minutes)" -msgstr "[Hoş Geldiniz](./welcome-day-1.md) (5 dakika)" - -#: src/welcome-day-1.md -msgid "[Hello, World](./hello-world.md) (15 minutes)" -msgstr "[Merhaba, Dünya](./hello-world.md) (15 dakika)" - -#: src/welcome-day-1.md -msgid "[Types and Values](./types-and-values.md) (40 minutes)" -msgstr "[Türler ve Değerler](./types-and-values.md) (40 dakika)" - -#: src/welcome-day-1.md -msgid "[Control Flow Basics](./control-flow-basics.md) (40 minutes)" -msgstr "[Kontrol Akışı Temelleri](./control-flow-basics.md) (40 dakika)" - #: src/welcome-day-1.md msgid "" "Including 10 minute breaks, this session should take about 2 hours and 5 " -"minutes" +"minutes. It contains:" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürecektir" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 5 dakika sürmelidir. " +"İçeriği:" #: src/welcome-day-1.md msgid "Please remind the students that:" @@ -2574,34 +2732,43 @@ msgid "" msgstr "" "Eğer bunu bir sınıfta öğretiyorsanız, burası programın üzerinden geçmek için " "iyi bir yerdir. Her bölümün sonunda bir alıştırma ve ardından bir ara " -"olduğunu unutmayın. Aradan sonra egzersiz çözümünü tamamlamayı planlayın. " +"olduğunu unutmayın. Aradan sonra alıştırma çözümünü tamamlamayı planlayın. " "Burada listelenen zamanlar kursun programa uygun devam etmesi için bir " "öneridir. Esnek olmaktan ve gerektiği gibi ayarlamaktan çekinmeyin!" +#: src/hello-world.md src/concurrency/send-sync.md +msgid "This segment should take about 15 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 15 dakika sürmelidir. İçeriği:" + #: src/hello-world.md src/types-and-values.md src/control-flow-basics.md #: src/tuples-and-arrays.md src/references.md src/user-defined-types.md #: src/pattern-matching.md src/methods-and-traits.md src/generics.md #: src/std-types.md src/std-traits.md src/memory-management.md #: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md #: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md -msgid "In this segment:" -msgstr "Bu bölümde:" - -#: src/hello-world.md -msgid "[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)" -msgstr "[Rust Nedir?](./hello-world/what-is-rust.md) (10 dakika)" - -#: src/hello-world.md -msgid "[Benefits of Rust](./hello-world/benefits.md) (3 minutes)" -msgstr "[Rust'ın Faydaları](./hello-world/benefits.md) (3 dakika)" - -#: src/hello-world.md -msgid "[Playground](./hello-world/playground.md) (2 minutes)" -msgstr "[Deneme Alanı](./hello-world/playground.md) (2 dakika)" - -#: src/hello-world.md -msgid "This segment should take about 15 minutes" -msgstr "Bu bölüm yaklaşık 15 dakika sürecektir" +#: src/concurrency/threads.md src/concurrency/channels.md +#: src/concurrency/send-sync.md src/concurrency/shared-state.md +#: src/concurrency/sync-exercises.md src/concurrency/async.md +#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md +#: src/concurrency/async-exercises.md +msgid "Slide" +msgstr "Slayt" + +#: src/hello-world.md src/references.md src/user-defined-types.md +#: src/pattern-matching.md src/methods-and-traits.md src/generics.md +#: src/std-types.md src/std-traits.md src/memory-management.md +#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md +#: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md +#: src/concurrency/shared-state.md src/concurrency/async.md +#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md +msgid "10 minutes" +msgstr "10 dakika" + +#: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md +#: src/memory-management.md src/concurrency/channels.md +#: src/concurrency/send-sync.md +msgid "2 minutes" +msgstr "2 dakika" #: src/hello-world/what-is-rust.md msgid "" @@ -2694,7 +2861,7 @@ msgid "" "_Compile time memory safety_ - whole classes of memory bugs are prevented at " "compile time" msgstr "" -"_Derleme zamanı bellek güvenliği_ - derleme zamanında tüm bellek hataları " +"_Derleme zamanı bellek emniyeti_ - derleme zamanında tüm bellek hataları " "sınıfları önlenir" #: src/hello-world/benefits.md @@ -2703,7 +2870,7 @@ msgstr "İlklendirilmemiş değişken yok." #: src/hello-world/benefits.md msgid "No double-frees." -msgstr "Double free ((adresi iki kez serbest bırakma)) yok." +msgstr "Adresi iki kez serbest bırakma (double free) yok." #: src/hello-world/benefits.md msgid "No use-after-free." @@ -2766,7 +2933,7 @@ msgstr "Sıfır maliyetli soyutlamalar." #: src/hello-world/benefits.md msgid "Great compiler errors." -msgstr "Mükemmel derleyici hatala mesajları." +msgstr "Mükemmel derleyici hata mesajları." #: src/hello-world/benefits.md msgid "Built-in dependency manager." @@ -2806,22 +2973,22 @@ msgstr "" "C veya C++ deneyimi: Rust, ödünç alma denetleyicisi (borrow checker) " "aracılığıyla tüm _çalışma zamanı hatalarını(runtime errors)_ ortadan " "kaldırır. C ve C++'daki gibi performans elde edersiniz bununla birlikte " -"bellek güvenliği sorunları yaşamazsınız. Ayrıca desen eşleştirme (pattern " -"matching) ve yerleşik bağımlılık yönetimi (dependency management) gibi " -"yapılara sahip modern bir dil elde edersiniz." +"bellek emniyetsizliği sorunları yaşamazsınız. Ayrıca desen eşleştirme " +"(pattern matching) ve yerleşik bağımlılık yönetimi (dependency management) " +"gibi yapılara sahip modern bir dil elde edersiniz." #: src/hello-world/benefits.md msgid "" "Experience with Java, Go, Python, JavaScript...: You get the same memory " "safety as in those languages, plus a similar high-level language feeling. In " "addition you get fast and predictable performance like C and C++ (no garbage " -"collector) as well as access to low-level hardware (should you need it)" +"collector) as well as access to low-level hardware (should you need it)." msgstr "" -"Java, Go, Python, JavaScript... deneyimi: Bu dillerdekiyle aynı bellek " -"emniyetine (safety) ve ayrıca benzer yüksek seviyeli dil hissine sahip " -"olursunuz. Ayrıca, C ve C++ (çöp toplayıcı yok) gibi hızlı ve öngörülebilir " -"performansın yanı sıra düşük seviyeli donanıma erişim (ihtiyaç duymanız " -"halinde) elde edersiniz." +"Java, Go, Python, JavaScript... ile deneyim: Bu dillerdekiyle aynı bellek " +"emniyetine (safety) ve benzer bir yüksek seviyeli dil hissini elde " +"edersiniz. Ayrıca C ve C++ gibi hızlı ve öngörülebilir performans (çöp " +"toplayıcı yok) ve düşük seviyeli donanıma erişim (ihtiyaç duymanız halinde) " +"elde edersiniz." #: src/hello-world/playground.md msgid "" @@ -2877,34 +3044,9 @@ msgstr "" "oluşturulan asm kodu hakkında daha fazla bilgi edinmek isteyen ileri düzey " "öğrenciler için faydalıdır." -#: src/types-and-values.md -msgid "[Hello, World](./types-and-values/hello-world.md) (5 minutes)" -msgstr "[Merhaba, Dünya](./types-and-values/hello-world.md) (5 dakika)" - -#: src/types-and-values.md -msgid "[Variables](./types-and-values/variables.md) (5 minutes)" -msgstr "[Değişkenler](./types-and-values/variables.md) (5 dakika)" - -#: src/types-and-values.md -msgid "[Values](./types-and-values/values.md) (5 minutes)" -msgstr "[Değerler](./types-and-values/values.md) (5 dakika)" - -#: src/types-and-values.md -msgid "[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)" -msgstr "[Aritmetik](./types-and-values/arithmetic.md) (3 dakika)" - -#: src/types-and-values.md -msgid "[Type Inference](./types-and-values/inference.md) (3 minutes)" -msgstr "[Tür Çıkarımı](./types-and-values/inference.md) (3 dakika)" - -#: src/types-and-values.md -msgid "[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)" -msgstr "[Alıştırma: Fibonacci](./types-and-values/exercise.md) (15 dakika)" - -#: src/types-and-values.md src/control-flow-basics.md src/generics.md -#: src/modules.md -msgid "This segment should take about 40 minutes" -msgstr "Bu bölüm yaklaşık 40 dakika sürecektir" +#: src/types-and-values.md src/control-flow-basics.md src/modules.md +msgid "This segment should take about 40 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 40 dakika sürmelidir. İçeriği:" #: src/types-and-values/hello-world.md msgid "" @@ -2933,7 +3075,7 @@ msgstr "" #: src/types-and-values/hello-world.md msgid "The `main` function is the entry point of the program." -msgstr "'main' fonksiyon programın giriş noktasıdır (entry point)." +msgstr "`main` fonksiyon programın giriş noktasıdır (entry point)." #: src/types-and-values/hello-world.md msgid "Rust has hygienic macros, `println!` is an example of this." @@ -3009,7 +3151,7 @@ msgid "" "Rust provides type safety via static typing. Variable bindings are made with " "`let`:" msgstr "" -"Rust, statik tür özelliğine sahip olmasıyla tür güvenliği sağlar. Değişken " +"Rust, statik tür özelliğine sahip olmasıyla tür emniyeti sağlar. Değişken " "bağlamaları (binding) `let` ile yapılır:" #: src/types-and-values/variables.md src/control-flow-basics/loops/for.md @@ -3030,9 +3172,9 @@ msgid "" "Uncomment the `x = 20` to demonstrate that variables are immutable by " "default. Add the `mut` keyword to allow changes." msgstr "" -"Değişkenlerin varsayılan olarak değişmez (immutable) olduğunu göstermek için " -"`x = 20`'in yorum satırını kaldırın. Değişikliklere izin vermek için `mut` " -"anahtar kelimesini ekleyin." +"Değişkenlerin varsayılan olarak değişemez (immutable) olduğunu göstermek " +"için `x = 20`'in yorum satırını kaldırın. Değişikliklere izin vermek için " +"`mut` anahtar kelimesini ekleyin." #: src/types-and-values/variables.md msgid "" @@ -3050,7 +3192,7 @@ msgid "" "each type." msgstr "" "Burada bazı temel yerleşik türler ve her türün değişmez değerlerinin " -"sözdizimi (syntax) verilmiştir." +"(literal values) sözdizimi (syntax) verilmiştir." #: src/types-and-values/values.md src/unsafe-rust/exercise.md msgid "Types" @@ -3177,12 +3319,12 @@ msgstr "" #: src/types-and-values/arithmetic.md msgid "" "What about integer overflow? In C and C++ overflow of _signed_ integers is " -"actually undefined, and might do different things on different platforms or " -"compilers. In Rust, it's defined." +"actually undefined, and might do unknown things at runtime. In Rust, it's " +"defined." msgstr "" "Peki, tamsayı taşması ne olacak? C ve C++'da _işaretli_ tamsayıların taşması " -"aslında tanımsızdır (undefined) ve farklı platformlarda veya derleyicilerde " -"farklı şeyler olabilir. Rust'ta bu tanımlanmıştır." +"aslında tanımsızdır (undefined) ve çalışma zamanında bilinmeyen şeyler " +"olabilir. Rust'ta ise bu tanımlıdır." #: src/types-and-values/arithmetic.md msgid "" @@ -3253,13 +3395,13 @@ msgstr "" #: src/types-and-values/exercise.md msgid "" -"The first and second Fibonacci numbers are both `1`. For n>2, the n'th " -"Fibonacci number is calculated recursively as the sum of the n-1'th and " -"n-2'th Fibonacci numbers." +"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci " +"number is calculated recursively as the sum of the n-1'th and n-2'th " +"Fibonacci numbers." msgstr "" -"Birinci ve ikinci Fibonacci sayılarının her ikisi de `1`'dir. n>2 için, " -"n'inci Fibonacci sayısı yinelemeli olarak n-1'inci ve n-2'inci Fibonacci " -"sayılarının toplamı olarak hesaplanır." +"Fibonacci dizisi `[0,1]` ile başlar. n>1 için, n'inci Fibonacci sayısı " +"yinelemeli olarak n-1'inci ve n-2'inci Fibonacci sayılarının toplamı olarak " +"hesaplanır." #: src/types-and-values/exercise.md msgid "" @@ -3286,38 +3428,29 @@ msgid "\"fib({n}) = {}\"" msgstr "\"fib({n}) = {}\"" #: src/control-flow-basics.md -msgid "[if Expressions](./control-flow-basics/if.md) (4 minutes)" -msgstr "[if İfadeleri](./control-flow-basics/if.md) (4 dakika)" +msgid "if Expressions" +msgstr "if İfadeleri" + +#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md +#: src/concurrency/async-control-flow.md +msgid "4 minutes" +msgstr "4 dakika" #: src/control-flow-basics.md -msgid "[Loops](./control-flow-basics/loops.md) (5 minutes)" -msgstr "[Döngüler](./control-flow-basics/loops.md) (5 dakika)" +msgid "break and continue" +msgstr "break ve continue" #: src/control-flow-basics.md -msgid "" -"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)" -msgstr "" -"[break ve continue](./control-flow-basics/break-continue.md) (4 dakika)" +msgid "We will now cover the many kinds of flow control found in Rust." +msgstr "Şimdi, Rust'ta bulunan birçok akış kontrol çeşitlerini ele alacağız." #: src/control-flow-basics.md msgid "" -"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)" +"Most of this will be very familiar to what you have seen in other " +"programming languages." msgstr "" -"[Bloklar ve Kapsamlar](./control-flow-basics/blocks-and-scopes.md) (5 dakika)" - -#: src/control-flow-basics.md -msgid "[Functions](./control-flow-basics/functions.md) (3 minutes)" -msgstr "[Fonksiyonlar](./control-flow-basics/functions.md) (3 dakika)" - -#: src/control-flow-basics.md -msgid "[Macros](./control-flow-basics/macros.md) (2 minutes)" -msgstr "[Makrolar](./control-flow-basics/macros.md) (2 dakika)" - -#: src/control-flow-basics.md -msgid "" -"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)" -msgstr "" -"[Alıştırma: Collatz Sekansı](./control-flow-basics/exercise.md) (15 dakika)" +"Bunların çoğu diğer programlama dillerinde gördüklerinize çok tanıdık " +"gelecektir." #: src/control-flow-basics/if.md msgid "`if` expressions" @@ -3376,13 +3509,15 @@ msgstr "" #: src/control-flow-basics/if.md msgid "" -"When `if` is used in an expression, the expression must have a `;` to " -"separate it from the next statement. Remove the `;` before `println!` to see " -"the compiler error." +"An `if` expression should be used in the same way as the other expressions. " +"For example, when it is used in a `let` statement, the statement must be " +"terminated with a `;` as well. Remove the `;` before `println!` to see the " +"compiler error." msgstr "" -"Bir ifadede `if` kullanıldığında, ifadeyi bir sonraki ifadeden ayırmak için " -"ifadenin `;` olması gerekir. Derleyici hatasını görmek için `println!`den " -"önceki `;` işaretini kaldırın." +"Bir `if` ifadesi diğer ifadelerle aynı şekilde kullanılmalıdır. Örneğin, bir " +"`let` ifadesinde kullanıldığında, ifadenin `;` ile de sonlandırılması " +"gerekir. Derleyici hatasını görmek için `println!`'den önceki `;`'yi " +"kaldırın." #: src/control-flow-basics/loops.md msgid "There are three looping keywords in Rust: `while`, `loop`, and `for`:" @@ -3401,7 +3536,7 @@ msgid "" msgstr "" "[`while` anahtar kelimesi](https://doc.rust-lang.org/reference/expressions/" "loop-expr.html#predicate-loops) diğer dillerdeki gibi işler ve koşul doğru " -"olduğu sürece döngü gövdesini çalıştırır." +"olduğu sürece döngü gövdesini yürütür (execute)." #: src/control-flow-basics/loops.md msgid "\"Final x: {x}\"" @@ -3432,11 +3567,11 @@ msgstr "" #: src/control-flow-basics/loops/for.md msgid "" -"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for " -"an inclusive range." +"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax " +"for an inclusive range." msgstr "" -"`for` döngüsünün yalnızca `4`'e kadar adım attığını unutmayın. Kapalı aralık " -"için `1..=5` sözdizimini gösterin." +"İlk `for` döngüsünün yalnızca `4`e kadar adım attığını unutmayın. Kapalı bir " +"aralık için `1..=5` sözdizimini gösterin." #: src/control-flow-basics/loops/loop.md msgid "" @@ -3450,6 +3585,14 @@ msgstr "" msgid "\"{i}\"" msgstr "\"{i}\"" +#: src/control-flow-basics/loops/loop.md +msgid "" +"The `loop` statement works like a `while true` loop. Use it for things like " +"servers which will serve connections forever." +msgstr "" +"`loop` deyimi `while true` döngüsü gibi çalışır. Bağlantılara sonsuza kadar " +"hizmet edecek sunucular gibi şeyler için kullanın." + #: src/control-flow-basics/break-continue.md msgid "" "If you want to immediately start the next iteration use [`continue`](https://" @@ -3461,24 +3604,36 @@ msgstr "" #: src/control-flow-basics/break-continue.md msgid "" "If you want to exit any kind of loop early, use [`break`](https://doc.rust-" -"lang.org/reference/expressions/loop-expr.html#break-expressions). For " +"lang.org/reference/expressions/loop-expr.html#break-expressions). With " "`loop`, this can take an optional expression that becomes the value of the " "`loop` expression." msgstr "" -"Bir döngüden erken çıkmak istiyorsanız [`break`](https://doc.rust-lang.org/" -"reference/expressions/loop-expr.html#break-expressions) kullanın. `loop` " -"için bu, `loop` ifadesinin değeri haline gelen isteğe bağlı bir ifadeyi " -"(optional expression) alabilir." +"Herhangi bir döngüden erken çıkmak istiyorsanız, [`break`](https://doc.rust-" +"lang.org/reference/expressions/loop-expr.html#break-expressions) kullanın. " +"`loop` ile, `loop` ifadesinin değeri haline gelen isteğe bağlı bir ifade " +"alabilir." #: src/control-flow-basics/break-continue.md src/std-traits/exercise.md #: src/std-traits/solution.md src/smart-pointers/trait-objects.md -#: src/modules/exercise.md src/modules/solution.md -#: src/android/build-rules/library.md +#: src/borrowing/interior-mutability.md src/modules/exercise.md +#: src/modules/solution.md src/android/build-rules/library.md #: src/android/interoperability/cpp/rust-bridge.md -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "\"{}\"" msgstr "\"{}\"" +#: src/control-flow-basics/break-continue.md +msgid "" +"Note that `loop` is the only looping construct which can return a non-" +"trivial value. This is because it's guaranteed to only return at a `break` " +"statement (unlike `while` and `for` loops, which can also return when the " +"condition fails)." +msgstr "" +"`loop`'un önemsiz olmayan (non-trivial) bir değer döndüren tek döngüsel yapı " +"olduğunu unutmayın. Bunun nedeni, en az bir `break` ifadesinde sonlanmasının " +"garantili olmasıdır (koşul başarısız olduğunda da sonlanabilen `while` ve " +"`for` döngülerinin aksine)." + #: src/control-flow-basics/break-continue/labels.md msgid "" "Both `continue` and `break` can optionally take a label argument which is " @@ -3492,14 +3647,12 @@ msgid "\"elements searched: {elements_searched}\"" msgstr "\"aranan öğeler: {elements_searched}\"" #: src/control-flow-basics/break-continue/labels.md -msgid "" -"Note that `loop` is the only looping construct which returns a non-trivial " -"value. This is because it's guaranteed to be entered at least once (unlike " -"`while` and `for` loops)." -msgstr "" -"`loop`'un önemsiz olmayan (non-trivial) bir değer döndüren tek döngüsel yapı " -"olduğunu unutmayın. Bunun nedeni, en az bir kez girilmesinin (`while` ve " -"`for` döngülerinden farklı olarak) garanti altında olmasıdır ." +msgid "Labeled break also works on arbitrary blocks, e.g." +msgstr "Etiketli break, keyfi olarak yazılan bloklarda da çalışır, örneğin." + +#: src/control-flow-basics/break-continue/labels.md +msgid "\"This line gets skipped\"" +msgstr "\"Bu satır geçilece\"" #: src/control-flow-basics/blocks-and-scopes.md msgid "Blocks" @@ -3552,7 +3705,6 @@ msgstr "\"önce: {a}\"" #: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md #: src/generics/solution.md src/std-traits/from-and-into.md -#: src/lifetimes/solution.md msgid "\"hello\"" msgstr "\"merhaba\"" @@ -3580,12 +3732,12 @@ msgstr "" #: src/control-flow-basics/blocks-and-scopes/scopes.md msgid "" "Shadowing is different from mutation, because after shadowing both " -"variable's memory locations exist at the same time. Both are available under " +"variables' memory locations exist at the same time. Both are available under " "the same name, depending where you use it in the code." msgstr "" -"Gölgeleme mutasyondan farklıdır çünkü gölgeleme sonrasında her iki " -"değişkenin hafıza konumları aynı anda mevcuttur. Her ikisi de kodda nerede " -"kullandığınıza bağlı olarak aynı ad altında mevcuttur." +"Gölgeleme (shadowing) mutasyondan (mutation) farklıdır çünkü gölgeleme " +"sonrasında her iki değişkenin de bellek konumları aynı anda mevcuttur. Her " +"ikisi de kodda nerede kullandığınıza bağlı olarak aynı ad altında mevcuttur." #: src/control-flow-basics/blocks-and-scopes/scopes.md msgid "A shadowing variable can have a different type." @@ -3624,11 +3776,11 @@ msgstr "" #: src/control-flow-basics/functions.md msgid "" "Some functions have no return value, and return the 'unit type', `()`. The " -"compiler will infer this if the `-> ()` return type is omitted." +"compiler will infer this if the return type is omitted." msgstr "" -"Bazı fonksiyonların geri dönüş değeri (return value) yoktur ve 'birim türü' " -"olan `()` değerini döndürür. Eğer `->()` dönüş tipi atlanırsa derleyici bunu " -"anlayacaktır." +"Bazı fonksiyonların dönüş değeri (return value) yoktur ve 'birim türü (unit " +"type)', `()` döndürürler. Eğer dönüş türü yazılmazsa, derleyici birim türünü " +"çıkarım (infer) yapacaktır." #: src/control-flow-basics/functions.md msgid "" @@ -3692,7 +3844,7 @@ msgid "" "panic." msgstr "" "`todo!()` kodun bir kısmını henüz uygulanmamış (not-yet-implemented) olarak " -"işaretler. Eğer çalıştırılırsa, paniğe neden olur." +"işaretler. Eğer yürütülürse (execute), paniğe neden olur." #: src/control-flow-basics/macros.md msgid "" @@ -3700,7 +3852,7 @@ msgid "" "panic." msgstr "" "`unreachable!()` kodun bir kısmını erişilemez (unreachable) olarak " -"işaretler. Eğer çalıştırılırsa, paniğe neden olur." +"işaretler. Eğer yürütülürse, paniğe neden olur." #: src/control-flow-basics/macros.md msgid "\"{n}! = {}\"" @@ -3727,154 +3879,58 @@ msgstr "" #: src/control-flow-basics/exercise.md msgid "" "The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is " -"defined as follows, for an arbitrary n" +"defined as follows, for an arbitrary n1 greater than zero:" msgstr "" -"[Collatz sanısı](https://en.wikipedia.org/wiki/Collatz_conjecture) şu " -"şekilde tanımlanır, keyfi bir" - -#: src/control-flow-basics/exercise.md -msgid "1" -msgstr "1" - -#: src/control-flow-basics/exercise.md -msgid " greater than zero:" -msgstr " sıfırdan büyük sayısı için:" - -#: src/control-flow-basics/exercise.md -msgid "If _n" -msgstr "If _n" - -#: src/control-flow-basics/exercise.md -msgid "i" -msgstr "i" +"[Collatz sanısı](https://en.wikipedia.org/wiki/Collatz_conjecture), sıfırdan " +"büyük herhangi bir n1 için aşağıdaki şekilde tanımlanır:" #: src/control-flow-basics/exercise.md -msgid "_ is 1, then the sequence terminates at _n" -msgstr "_ 1 ise, o zaman sekans bu sayıda sonlanır, _n" - -#: src/control-flow-basics/exercise.md -msgid "_." -msgstr "_." - -#: src/control-flow-basics/exercise.md -msgid "_ is even, then _n" -msgstr "_ çifttir, o zaman _n" - -#: src/control-flow-basics/exercise.md -msgid "i+1" -msgstr "i+1" - -#: src/control-flow-basics/exercise.md -msgid " = n" -msgstr " = n" - -#: src/control-flow-basics/exercise.md -msgid " / 2_." -msgstr " / 2_." - -#: src/control-flow-basics/exercise.md -msgid "_ is odd, then _n" -msgstr "_ tektir, o zaman _n" - -#: src/control-flow-basics/exercise.md -msgid " = 3 * n" -msgstr " = 3 * n" - -#: src/control-flow-basics/exercise.md -msgid " + 1_." -msgstr " + 1_." - -#: src/control-flow-basics/exercise.md -msgid "For example, beginning with _n" -msgstr "Örneğin, başlangıcımız _n" - -#: src/control-flow-basics/exercise.md -msgid "_ = 3:" -msgstr "_ = 3:" - -#: src/control-flow-basics/exercise.md -msgid "3 is odd, so _n" -msgstr "3 tektir, yani _n" - -#: src/control-flow-basics/exercise.md -msgid "2" -msgstr "2" - -#: src/control-flow-basics/exercise.md -msgid "_ = 3 * 3 + 1 = 10;" -msgstr "_ = 3 * 3 + 1 = 10;" - -#: src/control-flow-basics/exercise.md -msgid "10 is even, so _n" -msgstr "10 çifttir, yani _n" - -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md -msgid "3" -msgstr "3" - -#: src/control-flow-basics/exercise.md -msgid "_ = 10 / 2 = 5;" -msgstr "_ = 10 / 2 = 5;" +msgid "" +"If _ni_ is 1, then the sequence terminates at _ni_." +msgstr "Eğer _ni_ 1 ise, dizi _ni_'de sonlanır." #: src/control-flow-basics/exercise.md -msgid "5 is odd, so _n" -msgstr "5 tektir, yani _n" - -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md -msgid "4" -msgstr "4" +msgid "If _ni_ is even, then _ni+1 = ni / 2_." +msgstr "" +"Eğer _ni_ çift ise, o zaman _ni+1 = ni / 2_." #: src/control-flow-basics/exercise.md -msgid "_ = 3 * 5 + 1 = 16;" -msgstr "_ = 3 * 5 + 1 = 16;" +msgid "" +"If _ni_ is odd, then _ni+1 = 3 * ni + 1_." +msgstr "" +"Eğer _ni_ tek sayı ise _ni+1 = 3 * ni + 1_." #: src/control-flow-basics/exercise.md -msgid "16 is even, so _n" -msgstr "16 çifttir, yani _n" +msgid "For example, beginning with _n1_ = 3:" +msgstr "Örneğin, _n1_ = 3 ile başalrsak:" #: src/control-flow-basics/exercise.md -msgid "5" -msgstr "5" +msgid "3 is odd, so _n2_ = 3 * 3 + 1 = 10;" +msgstr "3 tek sayıdır, dolayısıyla _n2_ = 3 * 3 + 1 = 10;" #: src/control-flow-basics/exercise.md -msgid "_ = 16 / 2 = 8;" -msgstr "_ = 16 / 2 = 8;" +msgid "10 is even, so _n3_ = 10 / 2 = 5;" +msgstr "10 çift sayıdır, dolayısıyla _n3_ = 10 / 2 = 5;" #: src/control-flow-basics/exercise.md -msgid "8 is even, so _n" -msgstr "8 çifttir, yani _n" - -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md -msgid "6" -msgstr "6" +msgid "5 is odd, so _n4_ = 3 * 5 + 1 = 16;" +msgstr "5 tek sayıdır, dolayısıyla _n4_ = 3 * 5 + 1 = 16;" #: src/control-flow-basics/exercise.md -msgid "_ = 8 / 2 = 4;" -msgstr "_ = 8 / 2 = 4;" +msgid "16 is even, so _n5_ = 16 / 2 = 8;" +msgstr "16 çift sayıdır, dolayısıyla _n5_ = 16 / 2 = 8;" #: src/control-flow-basics/exercise.md -msgid "4 is even, so _n" -msgstr "4 çifttir, yani _n" +msgid "8 is even, so _n6_ = 8 / 2 = 4;" +msgstr "8 çift sayıdır, dolayısıyla _n6_ = 8 / 2 = 4;" #: src/control-flow-basics/exercise.md -msgid "7" -msgstr "7" +msgid "4 is even, so _n7_ = 4 / 2 = 2;" +msgstr "4 çift sayıdır, dolayısıyla _n7_ = 4 / 2 = 2;" #: src/control-flow-basics/exercise.md -msgid "_ = 4 / 2 = 2;" -msgstr "_ = 4 / 2 = 2;" - -#: src/control-flow-basics/exercise.md -msgid "2 is even, so _n" -msgstr "2 çifttir, yani _n" - -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md -msgid "8" -msgstr "8" - -#: src/control-flow-basics/exercise.md -msgid "_ = 1; and" -msgstr "_ = 1; ve" +msgid "2 is even, so _n8_ = 1; and" +msgstr "2 çifttir, bu yüzden _n8_ = 1; ve" #: src/control-flow-basics/exercise.md msgid "the sequence terminates." @@ -3892,7 +3948,8 @@ msgstr "" msgid "/// Determine the length of the collatz sequence beginning at `n`.\n" msgstr "/// `n`'den başlayan collatz sekansının uzunluğunu belirle.\n" -#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md +#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md +#: src/concurrency/threads/scoped.md msgid "\"Length: {}\"" msgstr "\"Length: {}\"" @@ -3901,50 +3958,24 @@ msgstr "\"Length: {}\"" msgid "Welcome Back" msgstr "Tekrar Hoş Geldiniz" -#: src/welcome-day-1-afternoon.md -msgid "[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)" -msgstr "[Demetler ve Diziler](./tuples-and-arrays.md) (35 dakika)" - -#: src/welcome-day-1-afternoon.md -msgid "[References](./references.md) (55 minutes)" -msgstr "[Referanslar](../references.md) (55 dakika)" - -#: src/welcome-day-1-afternoon.md -msgid "[User-Defined Types](./user-defined-types.md) (50 minutes)" -msgstr "[Kullanıcı Tanımlı Türler](./user-defined-types.md) (50 dakika)" - #: src/welcome-day-1-afternoon.md msgid "" "Including 10 minute breaks, this session should take about 2 hours and 35 " -"minutes" +"minutes. It contains:" msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 35 dakika sürecektir" +"10 dakikalık aralar, bu oturum yaklaşık 2 saat 35 dakika sürmelidir. İçeriği:" #: src/tuples-and-arrays.md -msgid "[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)" -msgstr "" +msgid "This segment should take about 35 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 35 dakika sürmelidir. İçeriği:" #: src/tuples-and-arrays.md msgid "" -"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 " -"minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "This segment should take about 35 minutes" +"We have seen how primitive types work in Rust. Now it's time for you to " +"start building new composite types." msgstr "" +"Rust'ta (primitive) ilkel türlerin nasıl çalıştığını gördük. Şimdi yeni " +"bileşik (composite) türler oluşturmaya başlamanın zamanı geldi." #: src/tuples-and-arrays/arrays.md msgid "" @@ -3954,6 +3985,11 @@ msgid "" "different types. Slices, which have a size determined at runtime, are " "covered later." msgstr "" +"Bir `[T; N]` dizi türünün değeri , aynı `T` türdeki `N` (derleme zamanı " +"sabiti) öğelerini/elemanlarını tutar. Dizinin uzunluğunun _türünün parçası_ " +"olduğuna dikkat edin, bu da `[u8; 3]' ve '[u8; 4]` dizilerinin iki farklı " +"tür olarak kabul edildiği anlamına gelir. Dilimler (slices), ki çalışma " +"zamanında belirlenen bir boyuta sahiptir, daha sonra ele alınacaktır." #: src/tuples-and-arrays/arrays.md msgid "" @@ -3961,10 +3997,14 @@ msgid "" "runtime. Rust can usually optimize these checks away, and they can be " "avoided using unsafe Rust." msgstr "" +"Sınırların dışında bir dizi öğesine erişmeyi deneyin. Dizi erişimleri " +"çalışma zamanında (runtime) kontrol edilir. Rust genellikle bu kontrolleri " +"optimize edebilir ve emniyetsiz Rust (unsafe Rust) kullanılarak bu " +"kontrollerden kaçınılabilir." #: src/tuples-and-arrays/arrays.md msgid "We can use literals to assign values to arrays." -msgstr "" +msgstr "Dizilere değer atamak için değişmezleri (literals) kullanabiliriz." #: src/tuples-and-arrays/arrays.md msgid "" @@ -3974,49 +4014,73 @@ msgid "" "only implement the debug output. This means that we must use debug output " "here." msgstr "" +"`println!` makrosu `?` biçim (format) parametresiyle hata ayıklama " +"gerçekleştirimini/uyarlamasını (implementation) ister: `{}` varsayılan " +"çıktıyı verir, `{:?}` hata ayıklama çıktısını verir. Tamsayılar (integer) ve " +"dizeler (string) gibi türler varsayılan çıktıyı uygular (default output), " +"ancak diziler (arrays) yalnızca hata ayıklama çıktısını (debug output) " +"uygular. Bu, bahsi geçen kodda hata ayıklama çıktısını kullanmamız gerektiği " +"anlamına gelir." #: src/tuples-and-arrays/arrays.md msgid "" "Adding `#`, eg `{a:#?}`, invokes a \"pretty printing\" format, which can be " "easier to read." msgstr "" +"`#` eklemek, örneğin `{a:#?}`, okunması daha kolay olabilecek \"güzel " +"yazdırma (pretty printing)\" biçimini (format) çağırır." #: src/tuples-and-arrays/tuples.md msgid "Like arrays, tuples have a fixed length." -msgstr "" +msgstr "Diziler gibi, demetlerin (tuple) de sabit bir uzunluğu vardır." #: src/tuples-and-arrays/tuples.md msgid "Tuples group together values of different types into a compound type." msgstr "" +"Demetler farklı türdeki değerleri bir bileşik tür (compound type) halinde " +"gruplandırır." #: src/tuples-and-arrays/tuples.md msgid "" "Fields of a tuple can be accessed by the period and the index of the value, " "e.g. `t.0`, `t.1`." msgstr "" +"Bir demetin alanlarına (fields) nokta ve değerin indeksi ile erişilebilir, " +"örneğin `t.0`, `t.1`." #: src/tuples-and-arrays/tuples.md msgid "" "The empty tuple `()` is referred to as the \"unit type\" and signifies " "absence of a return value, akin to `void` in other languages." msgstr "" +"Boş demet `()`, \"birim türü (unit type)\" olarak anılır ve, diğer " +"dillerdeki `void`'e benzer şekilde, bir geri dönüş değerinin (return value) " +"bulunmadığını belirtir." #: src/tuples-and-arrays/iteration.md msgid "The `for` statement supports iterating over arrays (but not tuples)." msgstr "" +"'for' deyimi diziler üzerinde adımlamayı/dolaşmayı destekler (ancak demetler " +"(tuples) üzerinde desteklemez)." #: src/tuples-and-arrays/iteration.md msgid "" "This functionality uses the `IntoIterator` trait, but we haven't covered " "that yet." msgstr "" +"Bu fonksiyonellik `IntoIterator` özelliğini (trait) kullanıyor, ancak bunu " +"henüz ele almadık." #: src/tuples-and-arrays/iteration.md msgid "" "The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!" -"` macros. These are always checked while, debug-only variants like " +"` macros. These are always checked, while debug-only variants like " "`debug_assert!` compile to nothing in release builds." msgstr "" +"`assert_ne!` makrosu burada yenidir. Ayrıca `assert_eq!` ve `assert!` " +"makroları da vardır. Bunlar her zaman kontrol edilirken, `debug_assert!` " +"gibi yalnızca hata ayıklama varyantları sürüm inşasında (release build) " +"hiçbir şeye derlenmez." #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4024,16 +4088,22 @@ msgid "" "extract the inner values into local variables. This can be done manually by " "directly accessing the inner values:" msgstr "" +"Demetler (tuples) ve diğer yapılandırılmış değerlerle (structured values) " +"çalışırken, içteki değerleri yerel (local) değişkenlere çıkarmayı istemek " +"yaygındır. Bu, doğrudan iç değerlere erişilerek elle yapılabilir:" #: src/tuples-and-arrays/destructuring.md msgid "\"left: {left}, right: {right}\"" -msgstr "" +msgstr "\"sol: {left}, sağ: {right}\"" #: src/tuples-and-arrays/destructuring.md msgid "" "However, Rust also supports using pattern matching to destructure a larger " "value into its constituent parts:" msgstr "" +"Ancak, Rust daha büyük bir değeri kendisini oluşturan parçalara çözümlemek " +"(destructure) için desen eşleştirmeyi (pattern matching) kullanmayı da " +"destekliyor:" #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4041,12 +4111,18 @@ msgid "" "statically verify that the value on the right of `=` has the same structure " "as the pattern." msgstr "" +"Burada kullanılan desenler \"reddedilemez (irrefutable)\"dir, yani derleyici " +"`=` sağındaki değerin desenle aynı yapıya sahip olduğunu statik olarak " +"doğrulayabilir." #: src/tuples-and-arrays/destructuring.md msgid "" "A variable name is an irrefutable pattern that always matches any value, " "hence why we can also use `let` to declare a single variable." msgstr "" +"Bir değişken adı, her zaman herhangi bir değerle eşleşen reddedilemez " +"(irrefutable) bir desendir, bu nedenle tek bir değişkeni bildirmek için " +"`let`'i kullanabiliriz." #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4054,88 +4130,81 @@ msgid "" "comparison and destructuring to happen at the same time. This form of " "pattern matching will be discussed in more detail later." msgstr "" +"Rust ayrıca koşullu ifadelerde desenlerin (patterns) kullanılmasını " +"destekleyerek eşitlik karşılaştırmasının (comparison) ve çözümlenmenin " +"(destructuring) aynı anda gerçekleşmesine olanak tanır. Bu desen eşleştirme " +"stili daha sonra daha ayrıntılı olarak tartışılacaktır." #: src/tuples-and-arrays/destructuring.md msgid "" "Edit the examples above to show the compiler error when the pattern doesn't " "match the value being matched on." msgstr "" +"Desenin (pattern) eşleştirilen değerle eşleşmediğinde oluşacak derleyici " +"hatasını göstermek için yukarıdaki örnekleri düzenleyin." #: src/tuples-and-arrays/exercise.md msgid "Arrays can contain other arrays:" -msgstr "" +msgstr "Diziler başka diziler de içerebilir:" #: src/tuples-and-arrays/exercise.md msgid "What is the type of this variable?" -msgstr "" +msgstr "Bu değişkenin türü nedir?" #: src/tuples-and-arrays/exercise.md msgid "" "Use an array such as the above to write a function `transpose` which will " "transpose a matrix (turn rows into columns):" msgstr "" - -#: src/tuples-and-arrays/exercise.md -msgid "Hard-code both functions to operate on 3 × 3 matrices." -msgstr "" +"Bir matrisin devrini yapacak (satırları sütunlara çevirecek) `transpose` " +"fonksiyonu yazmak için yukarıdaki gibi bir dizi kullanın:" #: src/tuples-and-arrays/exercise.md msgid "" "Copy the code below to and implement the " -"functions:" +"function. This function only operates on 3x3 matrices." msgstr "" +"Aşağıdaki kodu adresine kopyalayın ve " +"fonksiyonu uygulayın (implement). Bu fonksiyon yalnızca 3x3'lük matrislerde " +"çalışır." #: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md #: src/unsafe-rust/exercise.md msgid "// TODO: remove this when you're done with your implementation.\n" msgstr "" +"// TODO: uyarlamanız (implementation) bittiğinde bu yorum satırını silin.\n" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "//\n" -msgstr "" +msgstr "//\n" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "// <-- the comment makes rustfmt add a newline\n" -msgstr "" +msgstr "// <-- bu yorum, rustfmt'nin yeni satır eklemesini sağlar\n" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "\"matrix: {:#?}\"" -msgstr "" +msgstr "\"matrix: {:#?}\"" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "\"transposed: {:#?}\"" -msgstr "" - -#: src/references.md -msgid "[Shared References](./references/shared.md) (10 minutes)" -msgstr "" - -#: src/references.md -msgid "[Exclusive References](./references/exclusive.md) (10 minutes)" -msgstr "" - -#: src/references.md -msgid "[Slices: &\\[T\\]](./references/slices.md) (10 minutes)" -msgstr "[Dilimler: &\\[T\\]](../references/slices.md) (10 dakika)" +msgstr "\"transposed: {:#?}\"" -#: src/references.md -msgid "[Strings](./references/strings.md) (10 minutes)" -msgstr "[Dizgeler](./references/strings.md) (10 dakika)" - -#: src/references.md -msgid "[Exercise: Geometry](./references/exercise.md) (15 minutes)" -msgstr "" - -#: src/references.md src/smart-pointers.md src/error-handling.md -msgid "This segment should take about 55 minutes" -msgstr "" +#: src/references.md src/smart-pointers.md src/borrowing.md +#: src/concurrency/async-pitfalls.md +msgid "This segment should take about 55 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 55 dakika sürmelidir. İçerir:" #: src/references/shared.md msgid "" -"A reference provides a way to access another value without taking " -"responsibility for the value, and is also called \"borrowing\". Shared " -"references are read-only, and the referenced data cannot change." +"A reference provides a way to access another value without taking ownership " +"of the value, and is also called \"borrowing\". Shared references are read-" +"only, and the referenced data cannot change." msgstr "" +"Bir referans, değerin sahipliğini almadan başka bir değere erişmenin bir " +"yolunu sağlar ve \"ödünç alma (borrowing)\" olarak da adlandırılır. " +"Paylaşılan referanslar (shared reference) salt okunurdur (read-only) ve " +"referans edilen veriler değiştirilemez." #: src/references/shared.md msgid "" @@ -4143,10 +4212,22 @@ msgid "" "with the `&` operator. The `*` operator \"dereferences\" a reference, " "yielding its value." msgstr "" +"`T` türüne yönelik paylaşılan referansın türü `&T`'dir. `&` operatörüyle bir " +"referans değeri (reference value) oluşturulur. `*` operatörü bir referansın " +"içeriğine eriştirir (dereference) ve onun değerini verir." #: src/references/shared.md msgid "Rust will statically forbid dangling references:" msgstr "" +"Rust, boşa düşen referansları (dangling references) statik olarak " +"yasaklayacaktır:" + +#: src/references/shared.md +msgid "" +"References can never be null in Rust, so null checking is not necessary." +msgstr "" +"Rust'ta referanslar hiçbir zaman null olamaz, bu yüzden null kontrolü (null " +"checking) gerekli değildir." #: src/references/shared.md msgid "" @@ -4155,6 +4236,11 @@ msgid "" "access the value, but is still \"owned\" by the original variable. The " "course will get into more detail on ownership in day 3." msgstr "" +"Bir referansın, atıfta bulunduğu (refer) değeri \"ödünç aldığı (barrow)\" " +"söylenir ve bu, göstericilere aşina olmayan öğrenciler için iyi bir " +"modeldir: kod, değere erişmek için referansı kullanabilir, ancak değer yine " +"de orijinal değişken tarafından \"sahiplidir (owned)\". Kurs, 3. günde " +"sahiplik (ownership) konusunda daha ayrıntılı bilgi verecektir." #: src/references/shared.md msgid "" @@ -4164,12 +4250,20 @@ msgid "" "cover how Rust prevents the memory-safety bugs that come from using raw " "pointers." msgstr "" +"Referanslar göstericiler (pointers) olarak uyarlanır/uygulanır (implement) " +"ve önemli bir avantaj şudur ki, gösterdikleri şeyin boyutundan çok daha " +"küçük olabilmeleridir. C veya C++'a aşina olan öğrenciler referansları " +"göstericiler olarak tanıyacaklardır. Kursun ilerleyen bölümlerinde Rust'ın, " +"ham göstericilerin (raw pointers) kullanılmasından kaynaklanan bellek " +"emniyeti hatalarını (memory-safety bugs) nasıl önlediği ele alınacaktır." #: src/references/shared.md msgid "" "Rust does not automatically create references for you - the `&` is always " "required." msgstr "" +"Rust sizin için otomatik olarak referans oluşturmaz. `&` her zaman " +"gereklidir." #: src/references/shared.md msgid "" @@ -4177,6 +4271,9 @@ msgid "" "methods (try `r.is_ascii()`). There is no need for an `->` operator like in " "C++." msgstr "" +"Rust bazı durumlarda, özellikle de metotları çağırırken (`r.is_ascii()`'i " +"deneyin) otomatik olarak referansın içeriğine erişecektir (auto-" +"dereference). C++'daki gibi `->` operatörüne gerek yoktur." #: src/references/shared.md msgid "" @@ -4185,12 +4282,20 @@ msgid "" "different from C++, where assignment to a reference changes the referenced " "value." msgstr "" +"Bu örnekte, `r` değiştirilebilir (mutable) olduğundan ona tekrar atama " +"yapılabilir (reassigned) (`r = &b`). Bunun `r`'yi yeniden bağladığını (re-" +"bind) ve böylece başka bir şeye atıfta bulunduğunu (refer) unutmayın. Bu C++ " +"dilinden, bir referansa atamanın (assignment) referans verilenin değerini " +"değiştirmesinden, farklıdır." #: src/references/shared.md msgid "" "A shared reference does not allow modifying the value it refers to, even if " "that value was mutable. Try `*r = 'X'`." msgstr "" +"Paylaşılan bir referans (shared reference), atıfta bulunduğu (refer) değerin " +"değiştirilmesine (modify), bu değer değiştirilebilir (mutable) olsa bile, " +"izin vermez. `*r = 'X'`'i deneyin." #: src/references/shared.md msgid "" @@ -4199,16 +4304,26 @@ msgid "" "a reference to `point`, but `point` will be deallocated when the function " "returns, so this will not compile." msgstr "" +"Rust, yeterince uzun süre hayatta olmalarını sağlamak için tüm referansların " +"ömrülerini (lifetime) takip eder. Emniyetli Rust'ta boşa çıkan referanslar " +"(dangling reference) oluşamaz. `x_axis` fonksiyonu, `point`'e bir referans " +"geri döndürecekti, ancak fonksiyon geri döndüğünde `point` için tahsis " +"edilen alan geri verileceğinden (deallocation) bu kod derlenmeyecektir." #: src/references/shared.md msgid "We will talk more about borrowing when we get to ownership." msgstr "" +"Sahipliğe (ownership) geçince ödünç alma (borrowing) konusunu daha detaylı " +"konuşacağız." #: src/references/exclusive.md msgid "" "Exclusive references, also known as mutable references, allow changing the " "value they refer to. They have type `&mut T`." msgstr "" +"Değiştirilebilir referanslar (mutable reference) olarak da bilinen özel " +"(exclusive) referanslar, atıfta bulundukları (refer) değerin " +"değiştirilmesine olanak tanır. `&mut T` türüne sahiplerdir." #: src/references/exclusive.md msgid "" @@ -4218,6 +4333,11 @@ msgid "" "exists. Try making an `&point.0` or changing `point.0` while `x_coord` is " "alive." msgstr "" +"\"Özel (exclusive)\", değere erişmek için yalnızca bu referansın " +"kullanılabileceği anlamına gelir. Aynı anda başka hiçbir referans " +"(paylaşılan veya özel olsun farketmez) mevcut olamaz ve özel referans " +"(exclusive) varken atıfta bulunan değere erişilemez. `x_coord` hayattayken " +"bir `&point.0` oluşturmayı veya `point.0`'ı değiştirmeyi deneyin." #: src/references/exclusive.md msgid "" @@ -4226,28 +4346,28 @@ msgid "" "bound to different values, while the second represents an exclusive " "reference to a mutable value." msgstr "" - -#: src/references/slices.md -msgid "Slices" -msgstr "Dilimler (Slices)" +"`let mut x_coord: &i32` ve `let x_coord: &mut i32` arasındaki farka dikkat " +"ettiğinizden emin olun. Birincisi, farklı değerlere bağlanabilen (bind) " +"paylaşılan bir referansı (shared reference) temsil ederken, ikincisi, " +"değiştirilebilir bir değere (mutable value) özel bir referansı (exclusive " +"reference) temsil eder (represent)." #: src/references/slices.md msgid "A slice gives you a view into a larger collection:" msgstr "" +"Bir dilim (slice) size daha büyük bir koleksiyonun içinden bir görüntü verir:" #: src/references/slices.md msgid "Slices borrow data from the sliced type." -msgstr "" - -#: src/references/slices.md -msgid "Question: What happens if you modify `a[3]` right before printing `s`?" -msgstr "" +msgstr "Dilimler (slice), dilimlenmiş türden verileri ödünç alır (borrowing)." #: src/references/slices.md msgid "" "We create a slice by borrowing `a` and specifying the starting and ending " "indexes in brackets." msgstr "" +"`a`'yı ödünç alıp (borrowing) başlangıç ​​ve bitiş indekslerini köşeli " +"parantez içinde belirterek bir dilim (slice) oluşturuyoruz." #: src/references/slices.md msgid "" @@ -4255,17 +4375,24 @@ msgid "" "starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are " "identical." msgstr "" +"Dilim (slice) indeks 0'da başlıyorsa, Rust'ın aralık sözdizimi (range " +"syntax) başlangıç indeksini kullanmamaya izin verir; bu, `&a[0..a.len()]` ve " +"`&a[..a.len()]`dilimlerinin aynı olduğu anlamına gelir." #: src/references/slices.md msgid "" "The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are " "identical." msgstr "" +"Aynı şey bitiş indeksi için de geçerlidir, dolayısıyla `&a[2..a.len()]` ve " +"`&a[2..]` aynıdır." #: src/references/slices.md msgid "" "To easily create a slice of the full array, we can therefore use `&a[..]`." msgstr "" +"Tüm bir dizinin dilimini (slice) kolayca oluşturmak için `&a[..]`'ı " +"kullanabiliriz." #: src/references/slices.md msgid "" @@ -4273,33 +4400,35 @@ msgid "" "(`&[i32]`) no longer mentions the array length. This allows us to perform " "computation on slices of different sizes." msgstr "" +"`s`,`i32`'lerin bir dilimine (slice) referanstır. `s` (`&[i32]`) türünün " +"artık dizi uzunluğundan bahsetmediğine dikkat edin. Bu bize farklı " +"boyutlardaki dilimler üzerinde hesaplama yapmamızı sağlar." #: src/references/slices.md msgid "" "Slices always borrow from another object. In this example, `a` has to remain " "'alive' (in scope) for at least as long as our slice." msgstr "" - -#: src/references/slices.md -msgid "" -"The question about modifying `a[3]` can spark an interesting discussion, but " -"the answer is that for memory safety reasons you cannot do it through `a` at " -"this point in the execution, but you can read the data from both `a` and `s` " -"safely. It works before you created the slice, and again after the " -"`println`, when the slice is no longer used." -msgstr "" +"Dilimler (slice) her zaman başka bir nesneden ödünç alır (borrow). Bu " +"örnekte `a`'nın en azından dilimimiz (slice) kadar 'canlı " +"(alive)' (kapsamında) kalması gerekiyor." #: src/references/strings.md msgid "We can now understand the two string types in Rust:" -msgstr "" +msgstr "Artık Rust'taki iki dize (string) türünü anlayabiliyoruz:" #: src/references/strings.md msgid "`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`." msgstr "" +"`&str`, `&[u8]`e benzer şekilde, UTF-8 olarak kodlanmış baytların bir " +"dilimidir (slice)." #: src/references/strings.md -msgid "`String` is an owned, heap-allocated buffer of UTF-8 bytes." +msgid "" +"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec`." msgstr "" +"`String`, `Vec`ye benzer şekildedir, UTF-8 olarak kodlanmış baytlardan " +"oluşan sahipli bir arabellektir." #: src/references/strings.md src/std-traits/read-and-write.md msgid "\"World\"" @@ -4307,7 +4436,7 @@ msgstr "\"Dünya\"" #: src/references/strings.md msgid "\"s1: {s1}\"" -msgstr "" +msgstr "\"s1: {s1}\"" #: src/references/strings.md msgid "\"Hello \"" @@ -4315,11 +4444,11 @@ msgstr "\"Merhaba \"" #: src/references/strings.md src/memory-management/move.md msgid "\"s2: {s2}\"" -msgstr "" +msgstr "\"s2: {s2}\"" #: src/references/strings.md msgid "\"s3: {s3}\"" -msgstr "" +msgstr "\"s3: {s3}\"" #: src/references/strings.md msgid "" @@ -4327,12 +4456,19 @@ msgid "" "encoded string data stored in a block of memory. String literals " "(`\"Hello\"`), are stored in the program’s binary." msgstr "" +"`&str`, bir bellek bloğunda saklanan UTF-8 olarak kodlanmış dize (string) " +"verilerine değiştirilemez (immutable) referans olan bir dize dilimi (string " +"slice) sunar. Dize değişmezleri (string literals) (`\"Hello\"`), programın " +"ikili (binary) dosyasında saklanır." #: src/references/strings.md msgid "" "Rust's `String` type is a wrapper around a vector of bytes. As with a " "`Vec`, it is owned." msgstr "" +"Rust'ın `String` türü, baytlardan oluşan bir vektörün bir sarmalayıcı " +"türüdür. Bir `Vec` gibi, bu türden veri `String` türü tarafından " +"sahiplidir (owned)." #: src/references/strings.md msgid "" @@ -4340,12 +4476,19 @@ msgid "" "literal; `String::new()` creates a new empty string, to which string data " "can be added using the `push()` and `push_str()` methods." msgstr "" +"Diğer birçok türde olduğu gibi, `String::from()` bir dize değişmezinden " +"(string literal) bir string oluşturur; `String::new()` yeni bir boş dize " +"oluşturur ve dizeye veriler `push()` ve `push_str()` metotları kullanılarak " +"eklenebilir." #: src/references/strings.md msgid "" "The `format!()` macro is a convenient way to generate an owned string from " "dynamic values. It accepts the same format specification as `println!()`." msgstr "" +"`format!()` makrosu, dinamik değerlerden sahipli bir dize oluşturmak için " +"uygun bir yoldur. Aynı biçimin `println!()` makrosundaki gibi aynı biçim " +"tanımlamasını kabul eder." #: src/references/strings.md msgid "" @@ -4354,6 +4497,12 @@ msgid "" "boundaries, the expression will panic. The `chars` iterator iterates over " "characters and is preferred over trying to get character boundaries right." msgstr "" +"`String`'den `&str` dilimlerini (slices) `&` ve isteğe bağlı olarak aralık " +"seçimi (range selection) ile ödünç alabilirsiniz (barrow). Karakter " +"sınırlarının dışını da kapsayacak bir bayt aralığı seçerseniz, ifade " +"(expression) paniğe neden olacaktır. `chars` adımlayıcısı, karakterler " +"üzerinde adımlama yapar ve karakter sınırlarını doğru bulmaya çalışmak " +"yerine tercih edilir." #: src/references/strings.md msgid "" @@ -4362,10 +4511,17 @@ msgid "" "equivalent of `std::string` from C++ (main difference: it can only contain " "UTF-8 encoded bytes and will never use a small-string optimization)." msgstr "" +"C++ programcıları için: `&str`'yi C++'daki `std::string_view` olarak " +"düşünün, ancak her zaman bellekteki geçerli bir dizeye işaret eder. Rust " +"dilindeki `String`, C++'daki `std::string`'in kabaca eşdeğeridir (ana fark: " +"yalnızca UTF-8 olarak kodlanmış baytlar içerebilir ve asla küçük dize " +"optimizasyonu / small-string optimization kullanmaz)." #: src/references/strings.md msgid "Byte strings literals allow you to create a `&[u8]` value directly:" msgstr "" +"Bayt dizelerinden değişmezler (Byte strings literals), doğrudan bir `&[u8]` " +"değeri oluşturmanıza olanak tanır:" #: src/references/strings.md msgid "" @@ -4373,6 +4529,10 @@ msgid "" "`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal " "amount of `#` on either side of the quotes:" msgstr "" +"Ham (raw) dizeler, kaçış karakterlerininin devre dışı bırakıldığı bir `&str` " +"değeri oluşturmanıza olanak tanır: `r\"\\n\" == \"\\\\n\"`. Dizenin içindeki " +"çift tırnakları, dizeyi oluşturan tırnakların her iki tarafınaa eşit sayıda " +"`#` karakteri koyarak görebilirsiniz:" #: src/references/exercise.md msgid "" @@ -4380,6 +4540,9 @@ msgid "" "representing a point as `[f64;3]`. It is up to you to determine the function " "signatures." msgstr "" +"3 boyutlu geometri için, bir noktayı `[f64;3]` olarak temsil eden birkaç " +"yardımcı fonksiyon oluşturacağız. Fonksiyon imzalarını belirlemek size " +"kalmış." #: src/references/exercise.md msgid "" @@ -4389,112 +4552,100 @@ msgid "" "square\n" "// root, like `v.sqrt()`.\n" msgstr "" +"// Bir vektörün büyüklüğünü, koordinatlarının karelerini toplayarak " +"hesaplayın\n" +"// ve karekökünü alın. Karekökü hesaplamak için `sqrt()` metodunu kullanın,\n" +"// örneğin `v.sqrt()` gibi.\n" #: src/references/exercise.md msgid "" "// Normalize a vector by calculating its magnitude and dividing all of its\n" "// coordinates by that magnitude.\n" msgstr "" +"// Bir vektörü, büyüklüğünü hesaplayarak ve tüm koordinatlarını bu " +"büyüklüğe\n" +"// bölererek normalize edin.\n" #: src/references/exercise.md msgid "// Use the following `main` to test your work.\n" msgstr "" +"// Çalışmanızı test etmek için aşağıdaki `main` fonksiyonunu kullanın.\n" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of a unit vector: {}\"" -msgstr "" +msgstr "\"Birim vektörünün büyüklüğü: {}\"" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of {v:?}: {}\"" -msgstr "" +msgstr "\"{v:?} vektörünün büyüklüğü: {}\"" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of {v:?} after normalization: {}\"" -msgstr "" +msgstr "\"Normalize edildikten sonra {v:?} vektörünün büyüklüğü: {}\"" #: src/references/solution.md msgid "/// Calculate the magnitude of the given vector.\n" -msgstr "" +msgstr "/// Verilen vektörün büyüklüğünü hesaplayın.\n" #: src/references/solution.md msgid "" "/// Change the magnitude of the vector to 1.0 without changing its " "direction.\n" -msgstr "" +msgstr "/// Vektörün büyüklüğünü, yönünü değiştirmeden 1.0'a değiştirin.\n" -#: src/user-defined-types.md -msgid "[Named Structs](./user-defined-types/named-structs.md) (10 minutes)" -msgstr "" - -#: src/user-defined-types.md -msgid "[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)" -msgstr "" - -#: src/user-defined-types.md -msgid "[Enums](./user-defined-types/enums.md) (5 minutes)" -msgstr "" - -#: src/user-defined-types.md -msgid "[Static](./user-defined-types/static.md) (5 minutes)" -msgstr "[Static](./user-defined-types/static.md) (5 dakika)" - -#: src/user-defined-types.md -msgid "[Type Aliases](./user-defined-types/aliases.md) (2 minutes)" -msgstr "" - -#: src/user-defined-types.md -msgid "" -"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)" -msgstr "" - -#: src/user-defined-types.md src/methods-and-traits.md src/borrowing.md -#: src/lifetimes.md -msgid "This segment should take about 50 minutes" -msgstr "" +#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md +msgid "This segment should take about 50 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 50 dakika sürmelidir. İçeriği:" #: src/user-defined-types/named-structs.md msgid "Like C and C++, Rust has support for custom structs:" msgstr "" +"C ve C++ dillerindeki gibi Rust'ın da özel (kullanıcı tanımlı) yapılara " +"desteği vardır:" #: src/user-defined-types/named-structs.md msgid "\"{} is {} years old\"" -msgstr "" +msgstr "\"{} {} yaşında\"" #: src/user-defined-types/named-structs.md #: src/android/interoperability/with-c/bindgen.md msgid "\"Peter\"" -msgstr "" +msgstr "\"Peter\"" #: src/user-defined-types/named-structs.md msgid "\"Avery\"" -msgstr "" +msgstr "\"Avery\"" #: src/user-defined-types/named-structs.md msgid "\"Jackie\"" -msgstr "" +msgstr "\"Jackie\"" #: src/user-defined-types/named-structs.md src/user-defined-types/enums.md #: src/pattern-matching/match.md src/methods-and-traits/methods.md msgid "Key Points:" -msgstr "" +msgstr "Önemli Noktalar:" #: src/user-defined-types/named-structs.md msgid "Structs work like in C or C++." -msgstr "" +msgstr "Yapılar C veya C++'daki gibi çalışır." #: src/user-defined-types/named-structs.md msgid "Like in C++, and unlike in C, no typedef is needed to define a type." msgstr "" +"C++'daki gibi ve C'den farklı olarak, bir türü tanımlamak için typedef'e " +"gerek yoktur." #: src/user-defined-types/named-structs.md msgid "Unlike in C++, there is no inheritance between structs." -msgstr "" +msgstr "C++'dan farklı olarak yapılar arasında kalıtım (inheritance) yoktur." #: src/user-defined-types/named-structs.md msgid "" "This may be a good time to let people know there are different types of " "structs." msgstr "" +"Bu, insanlara farklı yapı türleri olduğunu duyurmak için iyi bir zaman " +"olabilir." #: src/user-defined-types/named-structs.md msgid "" @@ -4502,18 +4653,25 @@ msgid "" "trait on some type but don’t have any data that you want to store in the " "value itself." msgstr "" +"Sıfır boyutlu (zero-sized) yapılar (örn. `struct Foo;'), bir özelliği " +"(trait) bazı türlere uygularken kullanılabilir, ancak değerin kendisinde " +"saklamak istediğiniz herhangi bir veri yoktur." #: src/user-defined-types/named-structs.md msgid "" "The next slide will introduce Tuple structs, used when the field names are " "not important." msgstr "" +"Sonraki slaytta alan adları (field names) önemli olmadığında kullanılan " +"Demet (Tupe) yapıları tanıtılacaktır." #: src/user-defined-types/named-structs.md msgid "" "If you already have variables with the right names, then you can create the " "struct using a shorthand." msgstr "" +"Eğer zaten doğru adlara sahip değişkenleriniz varsa, o zaman yapıyı bir " +"kısaltma kullanarak oluşturabilirsiniz." #: src/user-defined-types/named-structs.md msgid "" @@ -4521,99 +4679,123 @@ msgid "" "old struct without having to explicitly type it all out. It must always be " "the last element." msgstr "" +"`..avery` sözdizimi, eski yapıdaki alanların çoğunu, hepsini açıkça " +"yazmamıza gerek kalmadan kopyalamamıza olanak tanır. Bu her zaman son öğe " +"olmalıdır." #: src/user-defined-types/tuple-structs.md msgid "If the field names are unimportant, you can use a tuple struct:" msgstr "" +"Alan adları (field names) önemsizse demet (tuple) yapısını kullanabilirsiniz:" #: src/user-defined-types/tuple-structs.md msgid "\"({}, {})\"" -msgstr "" +msgstr "\"({}, {})\"" #: src/user-defined-types/tuple-structs.md msgid "This is often used for single-field wrappers (called newtypes):" msgstr "" +"Bu genellikle tek alanlı sarmalayıcılar (single-field wrappers - newtype " +"deseni olarak adlandırılır) için kullanılır:" #: src/user-defined-types/tuple-structs.md msgid "\"Ask a rocket scientist at NASA\"" -msgstr "" +msgstr "\"NASA'daki bir roket bilim adamına sorun\"" #: src/user-defined-types/tuple-structs.md #: src/android/interoperability/cpp/cpp-bridge.md #: src/bare-metal/microcontrollers/type-state.md -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "// ...\n" -msgstr "" +msgstr "// ...\n" #: src/user-defined-types/tuple-structs.md msgid "" "Newtypes are a great way to encode additional information about the value in " "a primitive type, for example:" msgstr "" +"Yeni tür (newtype) deseni, ilkel (primitive) bir türdeki değer hakkındaki ek " +"bilgileri kodlamanın harika bir yoludur, örneğin:" #: src/user-defined-types/tuple-structs.md msgid "The number is measured in some units: `Newtons` in the example above." -msgstr "" +msgstr "Sayı bazı birimlerde ölçülür: Yukarıdaki örnekte `Newtons`." #: src/user-defined-types/tuple-structs.md msgid "" "The value passed some validation when it was created, so you no longer have " "to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`." msgstr "" +"Değer, oluşturulduğunda bir miktar doğrulamadan geçti, bu nedenle artık onu " +"her kullanımda yeniden doğrulamanız gerekmiyor: `PhoneNumber(String)` veya " +"`OddNumber(u32)`." #: src/user-defined-types/tuple-structs.md msgid "" "Demonstrate how to add a `f64` value to a `Newtons` type by accessing the " "single field in the newtype." msgstr "" +"Yeni türde desenindeki tek alana erişerek bir `Newtons` türüne `f64` " +"değerinin nasıl ekleneceğini gösterin." #: src/user-defined-types/tuple-structs.md msgid "" "Rust generally doesn’t like inexplicit things, like automatic unwrapping or " "for instance using booleans as integers." msgstr "" +"Rust genellikle bir nesnenin değerinin otomatik çözülmesini (automatic " +"unwrapping) veya boole değerlerini tamsayı olarak kullanmak gibi açık " +"olmayan şeylerden hoşlanmaz." #: src/user-defined-types/tuple-structs.md msgid "Operator overloading is discussed on Day 3 (generics)." -msgstr "" +msgstr "Operatör yüklemesi 3. günde (jenerikler) tartışıldı." #: src/user-defined-types/tuple-structs.md msgid "" "The example is a subtle reference to the [Mars Climate Orbiter](https://en." "wikipedia.org/wiki/Mars_Climate_Orbiter) failure." msgstr "" +"Örnek, [Mars İklim Yörünge Aracı](https://en.wikipedia.org/wiki/" +"Mars_Climate_Orbiter) hatasına incelikli bir göndermedir." #: src/user-defined-types/enums.md msgid "" "The `enum` keyword allows the creation of a type which has a few different " "variants:" msgstr "" +"'enum' anahtar sözcüğü birkaç farklı varyanta sahip bir türün yaratılmasına " +"olanak sağlar:" #: src/user-defined-types/enums.md msgid "// Simple variant\n" -msgstr "" +msgstr "// Basit (simple) varyant\n" #: src/user-defined-types/enums.md msgid "// Tuple variant\n" -msgstr "" +msgstr "// Demet (Tuple) varyantı\n" #: src/user-defined-types/enums.md msgid "// Struct variant\n" -msgstr "" +msgstr "// Yapı (Struct) varyantı\n" #: src/user-defined-types/enums.md -msgid "\"On this turn: {:?}\"" -msgstr "" +msgid "\"On this turn: {player_move:?}\"" +msgstr "\"Sıradaki hamle: {player_move:?}\"" #: src/user-defined-types/enums.md msgid "Enumerations allow you to collect a set of values under one type." msgstr "" +"Numaralandırmalar, bir dizi değeri tek bir tür altında toplamanıza olanak " +"tanır." #: src/user-defined-types/enums.md msgid "" "`Direction` is a type with variants. There are two values of `Direction`: " "`Direction::Left` and `Direction::Right`." msgstr "" +"`Direction`, varyantları olan bir türdür. `Direction`'ın iki değeri vardır: " +"`Direction::Left` ve `Direction::Right`." #: src/user-defined-types/enums.md msgid "" @@ -4621,16 +4803,24 @@ msgid "" "Rust will store a discriminant so that it knows at runtime which variant is " "in a `PlayerMove` value." msgstr "" +"`PlayerMove` üç varyantı olan bir türdür. Rust, varyant değerlerine (variant " +"payloads) ek olarak, çalışma zamanında hangi varyantın `PlayerMove` " +"değerinde olduğunu bilmesi için bir ayırıcı (discriminant) da depolayacaktır." #: src/user-defined-types/enums.md msgid "This might be a good time to compare structs and enums:" msgstr "" +"Bu, yapıları ve numaralandırmaları karşılaştırmak için iyi bir zaman " +"olabilir:" #: src/user-defined-types/enums.md msgid "" "In both, you can have a simple version without fields (unit struct) or one " "with different types of fields (variant payloads)." msgstr "" +"Her ikisinde de, alanları olmayan basit bir versiyona (birim yapı) veya " +"farklı alan türlerine sahip bir versiyona (varyant yükleri) sahip " +"olabilirsiniz." #: src/user-defined-types/enums.md msgid "" @@ -4638,14 +4828,17 @@ msgid "" "structs but then they wouldn’t be the same type as they would if they were " "all defined in an enum." msgstr "" +"Bir enum'ın farklı varyantlarını ayrı yapılarla bile uygulayabilirsiniz " +"ancak o zaman da hepsi bir enum'da tanımlanmış olduğunda olacağı gibi aynı " +"türde olmazlardı." #: src/user-defined-types/enums.md msgid "Rust uses minimal space to store the discriminant." -msgstr "" +msgstr "Rust, ayırıcıyı (discriminant) depolamak için minimum alan kullanır." #: src/user-defined-types/enums.md msgid "If necessary, it stores an integer of the smallest required size" -msgstr "" +msgstr "Gerekirse, gereken en küçük boyuttaki bir tam sayıyı depolar" #: src/user-defined-types/enums.md msgid "" @@ -4654,29 +4847,37 @@ msgid "" "optimization\"). For example, `Option<&u8>` stores either a pointer to an " "integer or `NULL` for the `None` variant." msgstr "" +"İzin verilen varyant değerleri tüm bit desenlerini kapsamıyorsa, ayırıcıyı " +"kodlamak için geçersiz bit desenleri kullanır (\"niş/oyuk/niche " +"optimizasyonu\"). Örneğin, `Option<&u8>`, `None` varyantı için bir tamsayıya " +"gösterici veya `NULL` depolar." #: src/user-defined-types/enums.md msgid "" "You can control the discriminant if needed (e.g., for compatibility with C):" msgstr "" +"Gerekirse ayırıcıyı kontrol edebilirsiniz (örneğin, C ile uyumluluk için):" #: src/user-defined-types/enums.md msgid "" "Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 " "bytes." -msgstr "" +msgstr "`repr` olmadan, ayırıcı tür 2 baytlık olur, çünkü 10001 2 bayta sığar." #: src/user-defined-types/enums.md src/user-defined-types/static.md #: src/memory-management/review.md src/memory-management/move.md -#: src/smart-pointers/box.md src/borrowing/shared.md +#: src/memory-management/copy-types.md src/borrowing/shared.md +#: src/error-handling/result.md src/error-handling/anyhow.md msgid "More to Explore" -msgstr "" +msgstr "Daha Fazlasını Keşfedin" #: src/user-defined-types/enums.md msgid "" "Rust has several optimizations it can employ to make enums take up less " "space." msgstr "" +"Rust, enum'ların daha az yer kaplamasını sağlamak için kullanabileceği " +"çeşitli optimizasyonlara sahiptir." #: src/user-defined-types/enums.md msgid "" @@ -4684,6 +4885,9 @@ msgid "" "option/#representation), Rust guarantees that `size_of::()` equals " "`size_of::>()`." msgstr "" +"Null gösterici optimizasyonu: [Bazı türler](https://doc.rust-lang.org/std/" +"option/#representation) için, Rust `size_of::()`'nin `size_of::" +">()`'ye eşit olduğunu garanti eder." #: src/user-defined-types/enums.md msgid "" @@ -4691,16 +4895,66 @@ msgid "" "like in practice. It's important to note that the compiler provides no " "guarantees regarding this representation, therefore this is totally unsafe." msgstr "" +"Bitsel gösterimin pratikte nasıl _görünebileceğini_ göstermek istiyorsanız " +"örnek kod aşağıdadır. Derleyicinin bu gösterimle (representation) ilgili " +"hiçbir garanti sağlamadığını, dolayısıyla bunun tamamen emniyetsiz olduğunu " +"belirtmek önemlidir." + +#: src/user-defined-types/const.md +msgid "`const`" +msgstr "`const`" + +#: src/user-defined-types/const.md +msgid "" +"Constants are evaluated at compile time and their values are inlined " +"wherever they are used:" +msgstr "" +"Sabitler (constants) derleme zamanında (compile-time) değerlendirilir ve " +"değerleri kullanıldıkları her yerde satır içi (inline) olarak belirtilir:" + +#: src/user-defined-types/const.md +msgid "" +"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" +"vs-static.html) these are inlined upon use." +msgstr "" +"[Rust RFC Book'a](https://rust-lang.github.io/rfcs/0246-const-vs-static." +"html) göre bunlar kullanım sırasında satır içidir (inline)." + +#: src/user-defined-types/const.md +msgid "" +"Only functions marked `const` can be called at compile time to generate " +"`const` values. `const` functions can however be called at runtime." +msgstr "" +"Sadece `const` olarak işaretlenen fonksiyonlar derleme zamanında çağrılarak " +"`const` değerler üretilebilir. Ancak `const` fonksiyonlar çalışma zamanında " +"da çağrılabilir." + +#: src/user-defined-types/const.md +msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`" +msgstr "" +"`const`'un C++'ın `constexpr`'ına anlamsal olarak benzer davrandığını " +"belirtin" + +#: src/user-defined-types/const.md +msgid "" +"It isn't super common that one would need a runtime evaluated constant, but " +"it is helpful and safer than using a static." +msgstr "" +"Çalışma zamanında değerlendirilen (evaluate) bir sabite (constant) ihtiyaç " +"duyulması çok yaygın bir durum değildir, ancak statik kullanmaktan daha " +"yararlı ve daha emniyetlidir." #: src/user-defined-types/static.md msgid "`static`" -msgstr "" +msgstr "`static`" #: src/user-defined-types/static.md msgid "" "Static variables will live during the whole execution of the program, and " "therefore will not move:" msgstr "" +"Statik değişkenler programın tüm yürütmesi (execution) boyunca yaşayacak ve " +"bu nedenle taşınmayacaklar:" #: src/user-defined-types/static.md msgid "\"Welcome to RustOS 3.14\"" @@ -4708,7 +4962,7 @@ msgstr "\"RustOS 3.14'e Hoş Geldiniz\"" #: src/user-defined-types/static.md msgid "\"{BANNER}\"" -msgstr "" +msgstr "\"{BANNER}\"" #: src/user-defined-types/static.md msgid "" @@ -4719,16 +4973,24 @@ msgid "" "globally-scoped value does not have a reason to need object identity, " "`const` is generally preferred." msgstr "" +"[Rust RFC Kitabında](https://rust-lang.github.io/rfcs/0246-const-vs-static." +"html) belirtildiği gibi, statik kullanımı satır içi (inline) özelliği vermez " +"ve gerçek bir ilişkili bellek konumuna sahiptir. Bu, emniyetsiz ve gömülü " +"kod için yararlıdır ve değişken, program yürütmesinin tamamı boyunca yaşar. " +"Global kapsamlı (globally-scoped) bir değerin nesne kimliğine ihtiyaç " +"duyması için bir nedeni olmadığında, genellikle `const` tercih edilir." #: src/user-defined-types/static.md msgid "`static` is similar to mutable global variables in C++." -msgstr "" +msgstr "`statik`, C++'daki değişebilir olan global değişkenlere benzer." #: src/user-defined-types/static.md msgid "" "`static` provides object identity: an address in memory and state as " "required by types with interior mutability such as `Mutex`." msgstr "" +"`static`, `Mutex` gibi iç değişebilirliğe sahip türlerin gerektirdiği " +"şekilde bellekteki bir adres ve durumu nesneye kimlik olarak sağlar." #: src/user-defined-types/static.md msgid "" @@ -4736,56 +4998,43 @@ msgid "" "`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-" "lang.org/std/sync/struct.Mutex.html), atomic or similar." msgstr "" +"Çünkü `static` değişkenlere herhangi bir iş parçacığından " +"erişilebildiğinden, bunların `Sync` olması gerekir. İç değişebilirlik " +"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html), atomik veya " +"benzer yöntemlerle mümkündür." #: src/user-defined-types/static.md msgid "Thread-local data can be created with the macro `std::thread_local`." msgstr "" - -#: src/user-defined-types/const.md -msgid "`const`" -msgstr "" - -#: src/user-defined-types/const.md -msgid "" -"Constants are evaluated at compile time and their values are inlined " -"wherever they are used:" -msgstr "" - -#: src/user-defined-types/const.md -msgid "" -"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" -"vs-static.html) these are inlined upon use." -msgstr "" - -#: src/user-defined-types/const.md -msgid "" -"Only functions marked `const` can be called at compile time to generate " -"`const` values. `const` functions can however be called at runtime." -msgstr "" - -#: src/user-defined-types/const.md -msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`" -msgstr "" - -#: src/user-defined-types/const.md -msgid "" -"It isn't super common that one would need a runtime evaluated constant, but " -"it is helpful and safer than using a static." -msgstr "" +"İş parçacığı için yerel (thread-local) veriler `std::thread_local` makrosu " +"ile oluşturulabilir." #: src/user-defined-types/aliases.md msgid "" "A type alias creates a name for another type. The two types can be used " "interchangeably." msgstr "" +"Bir tür eş ismi, başka bir tür için bir isim oluşturur. Her iki tür de " +"birbirinin yerine kullanılabilir." #: src/user-defined-types/aliases.md msgid "// Aliases are more useful with long, complex types:\n" msgstr "" +"// Eş isimler (aliases) uzun ve karmaşık türlerde daha kullanışlıdır:\n" #: src/user-defined-types/aliases.md -msgid "C programmers will recognize this as similar to a `typedef`." +msgid "" +"A [newtype](tuple-structs.html) is often a better alternative since it " +"creates a distinct type. Prefer `struct InventoryCount(usize)` to `type " +"InventoryCount = usize`." msgstr "" +"[Bir yeni tür deseni (newtype)](tuple-structs.html) genellikle farklı bir " +"tür oluşturduğu için daha iyi bir seçenektir. `type InventoryCount = usize` " +"yerine `struct InventoryCount(usize)`'ı tercih edin." + +#: src/user-defined-types/aliases.md +msgid "C programmers will recognize this as similar to a `typedef`." +msgstr "C programcıları bunun, `typedef`'e benzer olduğunu anlayacaklardır." #: src/user-defined-types/exercise.md msgid "" @@ -4794,6 +5043,10 @@ msgid "" "various events. Use `#[derive(Debug)]` to allow the types to be formatted " "with `{:?}`." msgstr "" +"Bir asansör kontrol sistemindeki bir olayı temsil etmek için bir veri yapısı " +"oluşturacağız. Çeşitli olayları yapılandırmak için türleri ve fonksiyonları " +"tanımlamak size kalmış. Türlerin `{:?}` ile biçimlendirilmesine izin vermek " +"için `#[derive(Debug)]` kullanın." #: src/user-defined-types/exercise.md msgid "" @@ -4801,97 +5054,102 @@ msgid "" "`main` runs without errors. The next part of the course will cover getting " "data out of these structures." msgstr "" +"Bu alıştırma yalnızca, `main`'in hatasız çalışması için veri yapıları " +"oluşturmayı ve doldurmayı gerektirir. Kursun bir sonraki kısmı bu yapılardan " +"veri almayı kapsayacaktır." #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "" "/// An event in the elevator system that the controller must react to.\n" -msgstr "" +msgstr "/// Asansör sisteminde kontrolörün tepki vermesi gereken bir olay.\n" #: src/user-defined-types/exercise.md msgid "// TODO: add required variants\n" -msgstr "" +msgstr "// TODO: gerekli değişkeleri (variant) ekle\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// A direction of travel.\n" msgstr "" +"/// Bir seyahat yönü.\n" +"\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car has arrived on the given floor.\n" -msgstr "" +msgstr "/// Araba verilen kata ulaşmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car doors have opened.\n" -msgstr "" +msgstr "/// Araba kapıları açılmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car doors have closed.\n" -msgstr "" +msgstr "/// Araba kapıları kapanmış durumda.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "" "/// A directional button was pressed in an elevator lobby on the given " "floor.\n" -msgstr "" +msgstr "/// Verilen kattaki asansör lobisinde yön düğmesine basıldı.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// A floor button was pressed in the elevator car.\n" -msgstr "" +msgstr "/// Asansör kabininde bir kat düğmesine basıldı.\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"A ground floor passenger has pressed the up button: {:?}\"" -msgstr "" +msgstr "\"Zemin kattaki bir yolcu yukarı düğmesine basmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car has arrived on the ground floor: {:?}\"" -msgstr "" +msgstr "\"Araba zemin kata ulaşmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car door opened: {:?}\"" -msgstr "" +msgstr "\"Araba kapısı açıldı: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"A passenger has pressed the 3rd floor button: {:?}\"" -msgstr "" +msgstr "\"Bir yolcu 3. katın düğmesine basmış durumda: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car door closed: {:?}\"" -msgstr "" +msgstr "\"Araba kapısı kapandı: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car has arrived on the 3rd floor: {:?}\"" -msgstr "" +msgstr "\"Araba 3. kata ulaşmış durumda: {:?}\"" #: src/user-defined-types/solution.md msgid "/// A button was pressed.\n" -msgstr "" +msgstr "/// Bir düğmeye basıldı.\n" #: src/user-defined-types/solution.md msgid "/// The car has arrived at the given floor.\n" -msgstr "" +msgstr "/// Araba verilen kata ulaşmış durumda.\n" #: src/user-defined-types/solution.md msgid "/// The car's doors have opened.\n" -msgstr "" +msgstr "/// Arabanın kapıları açık durumda.\n" #: src/user-defined-types/solution.md msgid "/// The car's doors have closed.\n" -msgstr "" +msgstr "/// Arabanın kapıları kapalı durumda.\n" #: src/user-defined-types/solution.md msgid "/// A floor is represented as an integer.\n" -msgstr "" +msgstr "/// Bir kat tamsayı olarak temsil edilir.\n" #: src/user-defined-types/solution.md msgid "/// A user-accessible button.\n" -msgstr "" +msgstr "/// Kullanıcının erişebileceği bir düğme.\n" #: src/user-defined-types/solution.md msgid "/// A button in the elevator lobby on the given floor.\n" -msgstr "" +msgstr "/// Verilem katta asansör lobisinde bulunan bir düğme.\n" #: src/user-defined-types/solution.md msgid "/// A floor button within the car.\n" -msgstr "" +msgstr "/// Arabanın içindeki bir kat düğmesi.\n" #: src/welcome-day-2.md msgid "Welcome to Day 2" @@ -4924,50 +5182,17 @@ msgid "" "Standard library types and traits: a tour of Rust's rich standard library." msgstr "" -#: src/welcome-day-2.md -msgid "[Welcome](./welcome-day-2.md) (3 minutes)" -msgstr "" - -#: src/welcome-day-2.md -msgid "[Pattern Matching](./pattern-matching.md) (1 hour)" -msgstr "" - -#: src/welcome-day-2.md -msgid "[Methods and Traits](./methods-and-traits.md) (50 minutes)" -msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" - -#: src/welcome-day-2.md -msgid "[Generics](./generics.md) (40 minutes)" -msgstr "" - #: src/welcome-day-2.md msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 55 " -"minutes" -msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 55 dakika sürecektir" - -#: src/pattern-matching.md -msgid "[Matching Values](./pattern-matching/match.md) (10 minutes)" -msgstr "" - -#: src/pattern-matching.md -msgid "[Destructuring](./pattern-matching/destructuring.md) (10 minutes)" -msgstr "" - -#: src/pattern-matching.md -msgid "[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)" -msgstr "" - -#: src/pattern-matching.md -msgid "" -"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 " -"minutes)" +"Including 10 minute breaks, this session should take about 2 hours and 10 " +"minutes. It contains:" msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmelidir. " +"İçeriği:" -#: src/pattern-matching.md src/memory-management.md -msgid "This segment should take about 1 hour" -msgstr "" +#: src/pattern-matching.md src/std-types.md src/memory-management.md +msgid "This segment should take about 1 hour. It contains:" +msgstr "Bu bölüm yaklaşık 1 saat sürmelidir. İçeriği:" #: src/pattern-matching/match.md msgid "" @@ -5102,102 +5327,118 @@ msgid "" "with an `|`." msgstr "" -#: src/pattern-matching/destructuring.md -msgid "Like tuples, structs and enums can also be destructured by matching:" +#: src/pattern-matching/match.md +msgid "More To Explore" +msgstr "Daha Fazlasını Keşfedin" + +#: src/pattern-matching/match.md +msgid "" +"Another piece of pattern syntax you can show students is the `@` syntax " +"which binds a part of a pattern to a variable. For example:" +msgstr "" + +#: src/pattern-matching/match.md +msgid "\"outer: {outer:?}, inner: {inner}\"" +msgstr "" + +#: src/pattern-matching/match.md +msgid "" +"In this example `inner` has the value 123 which it pulled from the `Option` " +"via destructuring, `outer` captures the entire `Some(inner)` expression, so " +"it contains the full `Option::Some(123)`. This is rarely used but can be " +"useful in more complex patterns." msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md msgid "Structs" msgstr "Yapılar (Structs)" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md +msgid "Like tuples, Struct can also be destructured by matching:" +msgstr "" + +#: src/pattern-matching/destructuring-structs.md msgid "\"x.0 = 1, b = {b}, y = {y}\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md msgid "\"y = 2, x = {i:?}\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md msgid "\"y = {y}, other fields were ignored\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-structs.md +msgid "Change the literal values in `foo` to match with the other patterns." +msgstr "" + +#: src/pattern-matching/destructuring-structs.md +msgid "Add a new field to `Foo` and make changes to the pattern as needed." +msgstr "" + +#: src/pattern-matching/destructuring-structs.md +msgid "" +"The distinction between a capture and a constant expression can be hard to " +"spot. Try changing the `2` in the second arm to a variable, and see that it " +"subtly doesn't work. Change it to a `const` and see it working again." +msgstr "" + +#: src/pattern-matching/destructuring-enums.md +msgid "Like tuples, enums can also be destructured by matching:" +msgstr "" + +#: src/pattern-matching/destructuring-enums.md msgid "" "Patterns can also be used to bind variables to parts of your values. This is " "how you inspect the structure of your types. Let us start with a simple " "`enum` type:" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "\"cannot divide {n} into two equal parts\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "\"{n} divided in two is {half}\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "\"sorry, an error happened: {msg}\"" msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "Here we have used the arms to _destructure_ the `Result` value. In the first " "arm, `half` is bound to the value inside the `Ok` variant. In the second " "arm, `msg` is bound to the error message." msgstr "" -#: src/pattern-matching/destructuring.md -msgid "Change the literal values in `foo` to match with the other patterns." -msgstr "" - -#: src/pattern-matching/destructuring.md -msgid "Add a new field to `Foo` and make changes to the pattern as needed." -msgstr "" - -#: src/pattern-matching/destructuring.md -msgid "" -"The distinction between a capture and a constant expression can be hard to " -"spot. Try changing the `2` in the second arm to a variable, and see that it " -"subtly doesn't work. Change it to a `const` and see it working again." -msgstr "" - -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "The `if`/`else` expression is returning an enum that is later unpacked with " "a `match`." msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "You can try adding a third variant to the enum definition and displaying the " "errors when running the code. Point out the places where your code is now " "inexhaustive and how the compiler tries to give you hints." msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "The values in the enum variants can only be accessed after being pattern " "matched." msgstr "" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring-enums.md msgid "" "Demonstrate what happens when the search is inexhaustive. Note the advantage " "the Rust compiler provides by confirming when all cases are handled." msgstr "" -#: src/pattern-matching/destructuring.md -msgid "" -"Save the result of `divide_in_two` in the `result` variable and `match` it " -"in a loop. That won't compile because `msg` is consumed when matched. To fix " -"it, match `&result` instead of `result`. That will make `msg` a reference so " -"it won't be consumed. This [\"match ergonomics\"](https://rust-lang.github." -"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to " -"support older Rust, replace `msg` with `ref msg` in the pattern." -msgstr "" - #: src/pattern-matching/let-control-flow.md msgid "" "Rust has a few control flow constructs which differ from other languages. " @@ -5209,12 +5450,12 @@ msgid "`if let` expressions" msgstr "`if let` ifadeleri" #: src/pattern-matching/let-control-flow.md -msgid "`while let` expressions" -msgstr "`while let` ifadeleri" +msgid "`let else` expressions" +msgstr "`let else` ifadeleri" #: src/pattern-matching/let-control-flow.md -msgid "`match` expressions" -msgstr "`match` ifadeleri" +msgid "`while let` expressions" +msgstr "`while let` ifadeleri" #: src/pattern-matching/let-control-flow.md msgid "" @@ -5224,13 +5465,9 @@ msgid "" msgstr "" #: src/pattern-matching/let-control-flow.md -msgid "\"slept for {:?}\"" +msgid "\"slept for {duration:?}\"" msgstr "" -#: src/pattern-matching/let-control-flow.md -msgid "`let else` expressions" -msgstr "`let else` ifadeleri" - #: src/pattern-matching/let-control-flow.md msgid "" "For the common case of matching a pattern and returning from the function, " @@ -5240,7 +5477,7 @@ msgid "" msgstr "" #: src/pattern-matching/let-control-flow.md -msgid "\"got None\"" +msgid "\"not a hex digit\"" msgstr "" #: src/pattern-matching/let-control-flow.md @@ -5248,7 +5485,7 @@ msgid "\"got empty string\"" msgstr "" #: src/pattern-matching/let-control-flow.md -msgid "\"not a hex digit\"" +msgid "\"got None\"" msgstr "" #: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md @@ -5333,33 +5570,18 @@ msgstr "" #: src/pattern-matching/exercise.md msgid "" -"The `Box` type here is a smart pointer, and will be covered in detail later " -"in the course. An expression can be \"boxed\" with `Box::new` as seen in the " -"tests. To evaluate a boxed expression, use the deref operator (`*`) to " -"\"unbox\" it: `eval(*boxed_expr)`." -msgstr "" - -#: src/pattern-matching/exercise.md -msgid "" -"Some expressions cannot be evaluated and will return an error. The standard " -"[`Result`](https://doc.rust-lang.org/std/result/enum.Result." -"html) type is an enum that represents either a successful value " -"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail " -"later." +"An example of a small arithmetic expression could be `10 + 20`, which " +"evaluates to `30`. We can represent the expression as a tree:" msgstr "" #: src/pattern-matching/exercise.md msgid "" -"Copy and paste the code into the Rust playground, and begin implementing " -"`eval`. The final product should pass the tests. It may be helpful to use " -"`todo!()` and get the tests to pass one-by-one. You can also skip a test " -"temporarily with `#[ignore]`:" +"A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, " +"which evaluate to `85`. We represent this as a much bigger tree:" msgstr "" #: src/pattern-matching/exercise.md -msgid "" -"If you finish early, try writing a test that results in division by zero or " -"integer overflow. How could you handle this with `Result` instead of a panic?" +msgid "In code, we will represent the tree with two types:" msgstr "" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md @@ -5378,29 +5600,37 @@ msgstr "" msgid "/// A literal value\n" msgstr "" -#: src/pattern-matching/exercise.md src/pattern-matching/solution.md -msgid "\"division by zero\"" +#: src/pattern-matching/exercise.md +msgid "" +"The `Box` type here is a smart pointer, and will be covered in detail later " +"in the course. An expression can be \"boxed\" with `Box::new` as seen in the " +"tests. To evaluate a boxed expression, use the deref operator (`*`) to " +"\"unbox\" it: `eval(*boxed_expr)`." msgstr "" -#: src/pattern-matching/solution.md -msgid "\"expr: {:?}\"" +#: src/pattern-matching/exercise.md +msgid "" +"Some expressions cannot be evaluated and will return an error. The standard " +"[`Result`](https://doc.rust-lang.org/std/result/enum.Result." +"html) type is an enum that represents either a successful value " +"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail " +"later." msgstr "" -#: src/methods-and-traits.md -msgid "[Methods](./methods-and-traits/methods.md) (10 minutes)" +#: src/pattern-matching/exercise.md +msgid "" +"Copy and paste the code into the Rust playground, and begin implementing " +"`eval`. The final product should pass the tests. It may be helpful to use " +"`todo!()` and get the tests to pass one-by-one. You can also skip a test " +"temporarily with `#[ignore]`:" msgstr "" -#: src/methods-and-traits.md -msgid "[Traits](./methods-and-traits/traits.md) (15 minutes)" -msgstr "[Özellikler](../methods-and-traits/traits.md) (15 dakika)" - -#: src/methods-and-traits.md -msgid "[Deriving](./methods-and-traits/deriving.md) (3 minutes)" +#: src/pattern-matching/exercise.md src/pattern-matching/solution.md +msgid "\"division by zero\"" msgstr "" -#: src/methods-and-traits.md -msgid "" -"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)" +#: src/pattern-matching/solution.md +msgid "\"expr: {expr:?}\"" msgstr "" #: src/methods-and-traits/methods.md @@ -5430,7 +5660,7 @@ msgid "\"Lap {idx}: {lap} sec\"" msgstr "" #: src/methods-and-traits/methods.md -msgid "// Exclusive ownership of self\n" +msgid "// Exclusive ownership of self (covered later)\n" msgstr "" #: src/methods-and-traits/methods.md @@ -5562,12 +5792,12 @@ msgstr "" msgid "\"Oh you're a cutie! What's your name? {}\"" msgstr "" -#: src/methods-and-traits/traits/implementing.md +#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md #: src/smart-pointers/trait-objects.md msgid "\"Woof, my name is {}!\"" msgstr "" -#: src/methods-and-traits/traits/implementing.md +#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md #: src/smart-pointers/trait-objects.md msgid "\"Fido\"" msgstr "" @@ -5600,7 +5830,6 @@ msgid "" msgstr "" #: src/methods-and-traits/traits/supertraits.md -#: src/async/control-flow/select.md msgid "\"Rex\"" msgstr "" @@ -5622,7 +5851,7 @@ msgid "" msgstr "" #: src/methods-and-traits/traits/associated-types.md -#: src/async/control-flow/join.md +#: src/lifetimes/lifetime-elision.md msgid "\"{:?}\"" msgstr "\"{:?}\"" @@ -5661,7 +5890,7 @@ msgid "// Debug trait adds support for printing with `{:?}`.\n" msgstr "" #: src/methods-and-traits/deriving.md -msgid "\"{:?} vs. {:?}\"" +msgid "\"{p1:?} vs. {p2:?}\"" msgstr "" #: src/methods-and-traits/deriving.md @@ -5685,7 +5914,7 @@ msgstr "" #: src/methods-and-traits/exercise.md msgid "" -"However, the `StderrLogger` given below logs all messages, regardless of " +"However, the `StdoutLogger` given below logs all messages, regardless of " "verbosity. Your task is to write a `VerbosityFilter` type that will ignore " "messages above a maximum verbosity." msgstr "" @@ -5705,6 +5934,10 @@ msgstr "" msgid "\"verbosity={verbosity}: {message}\"" msgstr "" +#: src/methods-and-traits/exercise.md +msgid "// TODO: Define and implement `VerbosityFilter`.\n" +msgstr "" + #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md msgid "\"FYI\"" msgstr "" @@ -5713,33 +5946,33 @@ msgstr "" msgid "\"Uhoh\"" msgstr "" -#: src/methods-and-traits/exercise.md -msgid "// TODO: Define and implement `VerbosityFilter`.\n" -msgstr "" - #: src/methods-and-traits/solution.md msgid "/// Only log messages up to the given verbosity level.\n" msgstr "" -#: src/generics.md -msgid "[Generic Functions](./generics/generic-functions.md) (5 minutes)" +#: src/welcome-day-2-afternoon.md +msgid "" +"Including 10 minute breaks, this session should take about 3 hours and 15 " +"minutes. It contains:" msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 15 dakika sürmelidir. " +"İçeriği:" -#: src/generics.md -msgid "[Generic Data Types](./generics/generic-data.md) (10 minutes)" -msgstr "" +#: src/generics.md src/iterators.md src/testing.md +msgid "This segment should take about 45 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 45 dakika sürmelidir. İçeriği:" #: src/generics.md -msgid "[Trait Bounds](./generics/trait-bounds.md) (10 minutes)" -msgstr "" +msgid "impl Trait" +msgstr "impl Trait" #: src/generics.md -msgid "[impl Trait](./generics/impl-trait.md) (5 minutes)" -msgstr "" +msgid "dyn Trait" +msgstr "dyn Trait" #: src/generics.md -msgid "[Exercise: Generic min](./generics/exercise.md) (10 minutes)" -msgstr "" +msgid "Exercise: Generic min" +msgstr "Alıştırma: Jenerik min" #: src/generics/generic-functions.md msgid "" @@ -5756,7 +5989,7 @@ msgid "\"picked a number: {:?}\"" msgstr "" #: src/generics/generic-functions.md -msgid "\"picked a tuple: {:?}\"" +msgid "\"picked a string: {:?}\"" msgstr "" #: src/generics/generic-functions.md @@ -5773,6 +6006,12 @@ msgid "" "value." msgstr "" +#: src/generics/generic-functions.md +msgid "" +"In this example we only use the primitive types `i32` and `&str` for `T`, " +"but we can use any type here, including user-defined types:" +msgstr "" + #: src/generics/generic-functions.md msgid "" "This is similar to C++ templates, but Rust partially compiles the generic " @@ -5793,10 +6032,6 @@ msgstr "" msgid "You can use generics to abstract over the concrete field type:" msgstr "" -#: src/generics/generic-data.md -msgid "// fn set_x(&mut self, x: T)\n" -msgstr "" - #: src/generics/generic-data.md msgid "\"{integer:?} and {float:?}\"" msgstr "" @@ -5866,7 +6101,7 @@ msgstr "" #: src/generics/generic-traits.md msgid "" "Implementations of the trait do not need to cover all possible type " -"parameters. Here, `Foo::From(\"hello\")` would not compile because there is " +"parameters. Here, `Foo::from(\"hello\")` would not compile because there is " "no `From<&str>` implementation for `Foo`." msgstr "" @@ -5893,11 +6128,11 @@ msgid "" msgstr "" #: src/generics/trait-bounds.md -msgid "You can do this with `T: Trait` or `impl Trait`:" +msgid "You can do this with `T: Trait`:" msgstr "" #: src/generics/trait-bounds.md -msgid "// struct NotClonable;\n" +msgid "// struct NotCloneable;\n" msgstr "" #: src/generics/trait-bounds.md @@ -5905,7 +6140,7 @@ msgid "\"{pair:?}\"" msgstr "" #: src/generics/trait-bounds.md -msgid "Try making a `NonClonable` and passing it to `duplicate`." +msgid "Try making a `NonCloneable` and passing it to `duplicate`." msgstr "" #: src/generics/trait-bounds.md @@ -5995,6 +6230,71 @@ msgid "" "the error message shows." msgstr "" +#: src/generics/dyn-trait.md +msgid "" +"In addition to using traits for static dispatch via generics, Rust also " +"supports using them for type-erased, dynamic dispatch via trait objects:" +msgstr "" + +#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md +msgid "\"Miau!\"" +msgstr "" + +#: src/generics/dyn-trait.md +msgid "// Uses generics and static dispatch.\n" +msgstr "" + +#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md +msgid "\"Hello, who are you? {}\"" +msgstr "\"Merhaba, nasılsın? {}\"" + +#: src/generics/dyn-trait.md +msgid "// Uses type-erasure and dynamic dispatch.\n" +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"Generics, including `impl Trait`, use monomorphization to create a " +"specialized instance of the function for each different type that the " +"generic is instantiated with. This means that calling a trait method from " +"within a generic function still uses static dispatch, as the compiler has " +"full type information and can resolve which type's trait implementation to " +"use." +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual " +"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). " +"This means that there's a single version of `fn dynamic` that is used " +"regardless of what type of `Pet` is passed in." +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"When using `dyn Trait`, the trait object needs to be behind some kind of " +"indirection. In this case it's a reference, though smart pointer types like " +"`Box` can also be used (this will be demonstrated on day 3)." +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"At runtime, a `&dyn Pet` is represented as a \"fat pointer\", i.e. a pair of " +"two pointers: One pointer points to the concrete object that implements " +"`Pet`, and the other points to the vtable for the trait implementation for " +"that type. When calling the `talk` method on `&dyn Pet` the compiler looks " +"up the function pointer for `talk` in the vtable and then invokes the " +"function, passing the pointer to the `Dog` or `Cat` into that function. The " +"compiler doesn't need to know the concrete type of the `Pet` in order to do " +"this." +msgstr "" + +#: src/generics/dyn-trait.md +msgid "" +"A `dyn Trait` is considered to be \"type-erased\", because we no longer have " +"compile-time knowledge of what the concrete type is." +msgstr "" + #: src/generics/exercise.md msgid "" "In this short exercise, you will implement a generic `min` function that " @@ -6038,55 +6338,25 @@ msgid "" "Ordering.html) enum." msgstr "" -#: src/welcome-day-2-afternoon.md -msgid "[Standard Library Types](./std-types.md) (1 hour and 20 minutes)" -msgstr "" - -#: src/welcome-day-2-afternoon.md -msgid "[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)" -msgstr "" - -#: src/welcome-day-2-afternoon.md -msgid "" -"Including 10 minute breaks, this session should take about 3 hours and 10 " -"minutes" -msgstr "" - -#: src/std-types.md -msgid "[Standard Library](./std-types/std.md) (3 minutes)" -msgstr "" - -#: src/std-types.md -msgid "[Documentation](./std-types/docs.md) (5 minutes)" -msgstr "" - -#: src/std-types.md -msgid "[Option](./std-types/option.md) (10 minutes)" -msgstr "" - -#: src/std-types.md -msgid "[Result](./std-types/result.md) (10 minutes)" -msgstr "" - -#: src/std-types.md -msgid "[String](./std-types/string.md) (10 minutes)" +#: src/std-types.md src/std-types/option.md +msgid "Option" msgstr "" -#: src/std-types.md -msgid "[Vec](./std-types/vec.md) (10 minutes)" +#: src/std-types.md src/std-types/result.md src/error-handling.md +msgid "Result" msgstr "" -#: src/std-types.md -msgid "[HashMap](./std-types/hashmap.md) (10 minutes)" -msgstr "" +#: src/std-types.md src/std-types/string.md +msgid "String" +msgstr "String" #: src/std-types.md -msgid "[Exercise: Counter](./std-types/exercise.md) (20 minutes)" -msgstr "" +msgid "Vec" +msgstr "Vec" #: src/std-types.md -msgid "This segment should take about 1 hour and 20 minutes" -msgstr "" +msgid "HashMap" +msgstr "HashMap" #: src/std-types.md msgid "" @@ -6147,6 +6417,10 @@ msgid "" "std/collections/struct.BinaryHeap.html)." msgstr "" +#: src/std-types/docs.md +msgid "Use `rustup doc --std` or to view the documentation." +msgstr "" + #: src/std-types/docs.md msgid "In fact, you can document your own code:" msgstr "" @@ -6185,10 +6459,6 @@ msgid "" "rand>." msgstr "" -#: src/std-types/option.md -msgid "Option" -msgstr "" - #: src/std-types/option.md msgid "" "We have already seen some use of `Option`. It stores either a value of " @@ -6240,35 +6510,33 @@ msgstr "" #: src/std-types/option.md msgid "" -"The niche optimization means that `Option` often has the same size in " -"memory as `T`." -msgstr "" - -#: src/std-types/result.md -msgid "Result" +"The \"niche optimization\" means that `Option` often has the same size in " +"memory as `T`, if there is some representation that is not a valid value of " +"T. For example, a reference cannot be NULL, so `Option<&T>` automatically " +"uses NULL to represent the `None` variant, and thus can be stored in the " +"same memory as `&T`." msgstr "" #: src/std-types/result.md msgid "" "`Result` is similar to `Option`, but indicates the success or failure of an " -"operation, each with a different type. This is similar to the `Res` defined " -"in the expression exercise, but generic: `Result` where `T` is used in " -"the `Ok` variant and `E` appears in the `Err` variant." +"operation, each with a different enum variant. It is generic: `Result` " +"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant." msgstr "" -#: src/std-types/result.md +#: src/std-types/result.md src/error-handling/result.md msgid "\"diary.txt\"" msgstr "" -#: src/std-types/result.md +#: src/std-types/result.md src/error-handling/result.md msgid "\"Dear diary: {contents} ({bytes} bytes)\"" msgstr "" -#: src/std-types/result.md +#: src/std-types/result.md src/error-handling/result.md msgid "\"Could not read file content\"" msgstr "" -#: src/std-types/result.md +#: src/std-types/result.md src/error-handling/result.md msgid "\"The diary could not be opened: {err}\"" msgstr "" @@ -6293,19 +6561,15 @@ msgid "" "Day 4." msgstr "" -#: src/std-types/string.md -msgid "String" -msgstr "String" - #: src/std-types/string.md msgid "" -"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the " -"standard heap-allocated growable UTF-8 string buffer:" +"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a " +"growable UTF-8 encoded string:" msgstr "" #: src/std-types/string.md src/std-traits/read-and-write.md #: src/memory-management/review.md src/testing/unit-tests.md -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "\"Hello\"" msgstr "\"Merhaba\"" @@ -6568,19 +6832,6 @@ msgid "" "value tuples." msgstr "" -#: src/std-types/hashmap.md -msgid "" -"We are showing `HashMap`, and avoid using `&str` as key to make " -"examples easier. Using references in collections can, of course, be done, " -"but it can lead into complications with the borrow checker." -msgstr "" - -#: src/std-types/hashmap.md -msgid "" -"Try removing `to_string()` from the example above and see if it still " -"compiles. Where do you think we might run into issues?" -msgstr "" - #: src/std-types/hashmap.md msgid "" "This type has several \"method-specific\" return types, such as `std::" @@ -6644,41 +6895,22 @@ msgstr "" msgid "\"got {} apples\"" msgstr "" -#: src/std-traits.md -msgid "[Comparisons](./std-traits/comparisons.md) (10 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[Operators](./std-traits/operators.md) (10 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[From and Into](./std-traits/from-and-into.md) (10 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[Casting](./std-traits/casting.md) (5 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[Read and Write](./std-traits/read-and-write.md) (10 minutes)" -msgstr "" - -#: src/std-traits.md -msgid "[Default, struct update syntax](./std-traits/default.md) (5 minutes)" -msgstr "" +#: src/std-traits.md src/concurrency/sync-exercises.md +#: src/concurrency/async-exercises.md +msgid "This segment should take about 1 hour and 10 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 1 saat 10 dakika sürmelidir. İçeriği:" #: src/std-traits.md -msgid "[Closures](./std-traits/closures.md) (20 minutes)" -msgstr "" +msgid "From and Into" +msgstr "From ve Into" #: src/std-traits.md -msgid "[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)" -msgstr "" +msgid "Read and Write" +msgstr "Read ve Write" #: src/std-traits.md -msgid "This segment should take about 1 hour and 40 minutes" -msgstr "" +msgid "Default, struct update syntax" +msgstr "Varsayılan, yapı (struct) güncelleme sözdizimi" #: src/std-traits.md msgid "" @@ -6746,7 +6978,7 @@ msgid "" msgstr "" #: src/std-traits/operators.md -msgid "\"{:?} + {:?} = {:?}\"" +msgid "\"{p1:?} + {p2:?} = {:?}\"" msgstr "" #: src/std-traits/operators.md src/memory-management/drop.md @@ -6784,11 +7016,20 @@ msgid "" "i32)> for Point` would add a tuple to a `Point`." msgstr "" +#: src/std-traits/operators.md +msgid "" +"The `Not` trait (`!` operator) is notable because it does not \"boolify\" " +"like the same operator in C-family languages; instead, for integer types it " +"negates each bit of the number, which arithmetically is equivalent to " +"subtracting it from -1: `!5 == -6`." +msgstr "" + #: src/std-traits/from-and-into.md msgid "" "Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From." "html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to " -"facilitate type conversions:" +"facilitate type conversions. Unlike `as`, these traits correspond to " +"lossless, infallible conversions." msgstr "" #: src/std-traits/from-and-into.md @@ -6904,7 +7145,7 @@ msgid "\"\\n\"" msgstr "" #: src/std-traits/read-and-write.md -msgid "\"Logged: {:?}\"" +msgid "\"Logged: {buffer:?}\"" msgstr "" #: src/std-traits/default.md @@ -6933,8 +7174,7 @@ msgstr "" msgid "\"{almost_default_struct:#?}\"" msgstr "" -#: src/std-traits/default.md src/lifetimes/exercise.md -#: src/lifetimes/solution.md +#: src/std-traits/default.md msgid "\"{:#?}\"" msgstr "" @@ -6985,38 +7225,39 @@ msgid "" msgstr "" #: src/std-traits/closures.md -msgid "\"Calling function on {input}\"" +msgid "\"Calling {func_name}({input}): {}\"" msgstr "" #: src/std-traits/closures.md -msgid "\"add_3: {}\"" +msgid "\"add_3\"" msgstr "" #: src/std-traits/closures.md -msgid "\"accumulate: {}\"" +msgid "\"accumulate\"" msgstr "" #: src/std-traits/closures.md -msgid "\"multiply_sum: {}\"" +msgid "\"multiply_sum\"" msgstr "" #: src/std-traits/closures.md msgid "" -"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or " -"perhaps captures nothing at all. It can be called multiple times " -"concurrently." +"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can " +"be called needing only a shared reference to the closure, which means the " +"closure can be executed repeatedly and even concurrently." msgstr "" #: src/std-traits/closures.md msgid "" -"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it " -"multiple times, but not concurrently." +"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure " +"object is accessed via exclusive reference, so it can be called repeatedly " +"but not concurrently." msgstr "" #: src/std-traits/closures.md msgid "" -"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It " -"might consume captured values." +"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. " +"Doing so consumes the closure and any values captured by move." msgstr "" #: src/std-traits/closures.md @@ -7036,19 +7277,23 @@ msgstr "" #: src/std-traits/closures.md msgid "" "In contrast, when you have a closure, the most flexible you can have is `Fn` " -"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`." +"(which can be passed to a consumer of any of the 3 closure traits), then " +"`FnMut`, and lastly `FnOnce`." msgstr "" #: src/std-traits/closures.md msgid "" "The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. " -"`multiply_sum`), depending on what the closure captures." +"`multiply_sum`), depending on what the closure captures. Function pointers " +"(references to `fn` items) implement `Copy` and `Fn`." msgstr "" #: src/std-traits/closures.md msgid "" -"By default, closures will capture by reference if they can. The `move` " -"keyword makes them capture by value." +"By default, closures will capture each variable from an outer scope by the " +"least demanding form of access they can (by shared reference if possible, " +"then exclusive reference, then by move). The `move` keyword forces capture " +"by value." msgstr "" #: src/std-traits/closures.md src/smart-pointers/trait-objects.md @@ -7111,57 +7356,21 @@ msgstr "" msgid "Smart pointers: standard library pointer types." msgstr "" -#: src/welcome-day-3.md -msgid "[Welcome](./welcome-day-3.md) (3 minutes)" -msgstr "" - -#: src/welcome-day-3.md -msgid "[Memory Management](./memory-management.md) (1 hour)" -msgstr "" - -#: src/welcome-day-3.md -msgid "[Smart Pointers](./smart-pointers.md) (55 minutes)" -msgstr "" - -#: src/welcome-day-3.md +#: src/welcome-day-3.md src/welcome-day-4-afternoon.md msgid "" "Including 10 minute breaks, this session should take about 2 hours and 20 " -"minutes" -msgstr "" - -#: src/memory-management.md -msgid "[Review of Program Memory](./memory-management/review.md) (5 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "" -"[Approaches to Memory Management](./memory-management/approaches.md) (10 " -"minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Ownership](./memory-management/ownership.md) (5 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Move Semantics](./memory-management/move.md) (5 minutes)" +"minutes. It contains:" msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 20 dakika sürmelidir. " +"İçeriği:" -#: src/memory-management.md -msgid "[Clone](./memory-management/clone.md) (2 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Copy Types](./memory-management/copy-types.md) (5 minutes)" -msgstr "" - -#: src/memory-management.md -msgid "[Drop](./memory-management/drop.md) (10 minutes)" +#: src/memory-management.md src/memory-management/clone.md +msgid "Clone" msgstr "" #: src/memory-management.md -msgid "[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)" -msgstr "" +msgid "Drop" +msgstr "Drop" #: src/memory-management/review.md msgid "Programs allocate memory in two ways:" @@ -7283,9 +7492,8 @@ msgid "" msgstr "" #: src/memory-management/approaches.md -msgid "" -"Typically implemented with reference counting, garbage collection, or RAII." -msgstr "" +msgid "Typically implemented with reference counting or garbage collection." +msgstr "Genellikle referans sayımı veya çöp toplama ile uygulanır." #: src/memory-management/approaches.md msgid "Rust offers a new mix:" @@ -7369,7 +7577,7 @@ msgstr "" msgid "An assignment will transfer _ownership_ between variables:" msgstr "" -#: src/memory-management/move.md +#: src/memory-management/move.md src/concurrency/async-control-flow/select.md msgid "\"Hello!\"" msgstr "\"Merhaba!\"" @@ -7427,11 +7635,12 @@ msgid "" "parameter. This transfers ownership:" msgstr "" -#: src/memory-management/move.md +#: src/memory-management/move.md src/memory-management/clone.md msgid "\"Hello {name}\"" msgstr "\"Merhaba {name}\"" -#: src/memory-management/move.md src/android/interoperability/java.md +#: src/memory-management/move.md src/memory-management/clone.md +#: src/android/aidl/types/parcelables.md src/android/interoperability/java.md msgid "\"Alice\"" msgstr "\"Alice\"" @@ -7550,10 +7759,6 @@ msgid "" "which is being copied or moved." msgstr "" -#: src/memory-management/clone.md -msgid "Clone" -msgstr "" - #: src/memory-management/clone.md msgid "" "Sometimes you _want_ to make a copy of a value. The `Clone` trait " @@ -7563,8 +7768,7 @@ msgstr "" #: src/memory-management/clone.md msgid "" "The idea of `Clone` is to make it easy to spot where heap allocations are " -"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::" -"new`." +"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`." msgstr "" #: src/memory-management/clone.md @@ -7573,6 +7777,18 @@ msgid "" "and return later to try to optimize those clones away." msgstr "" +#: src/memory-management/clone.md +msgid "" +"`clone` generally performs a deep copy of the value, meaning that if you e." +"g. clone an array, all of the elements of the array are cloned as well." +msgstr "" + +#: src/memory-management/clone.md +msgid "" +"The behavior for `clone` is user-defined, so it can perform custom cloning " +"logic if needed." +msgstr "" + #: src/memory-management/copy-types.md msgid "" "While move semantics are the default, certain types are copied by default:" @@ -7639,6 +7855,14 @@ msgstr "" msgid "Show that it works if you clone `p1` instead." msgstr "" +#: src/memory-management/copy-types.md +msgid "" +"Shared references are `Copy`/`Clone`, mutable references are not. This is " +"because Rust requires that mutable references be exclusive, so while it's " +"valid to make a copy of a shared reference, creating a copy of a mutable " +"reference would violate Rust's borrowing rules." +msgstr "" + #: src/memory-management/drop.md msgid "The `Drop` Trait" msgstr "" @@ -7653,8 +7877,8 @@ msgstr "" msgid "\"Dropping {}\"" msgstr "" -#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"a\"" msgstr "" @@ -7828,32 +8052,20 @@ msgid "\"4.0\"" msgstr "" #: src/memory-management/exercise.md src/memory-management/solution.md -msgid "\"serde: {serde:?}\"" -msgstr "" - -#: src/memory-management/solution.md -msgid "\"0.1\"" -msgstr "" - -#: src/smart-pointers.md -msgid "[Box" -msgstr "" - -#: src/smart-pointers.md -msgid "](./smart-pointers/box.md) (10 minutes)" +msgid "\"serde: {serde:?}\"" msgstr "" -#: src/smart-pointers.md -msgid "[Rc](./smart-pointers/rc.md) (5 minutes)" +#: src/memory-management/solution.md +msgid "\"0.1\"" msgstr "" #: src/smart-pointers.md -msgid "[Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)" -msgstr "" +msgid "Box" +msgstr "Box" #: src/smart-pointers.md -msgid "[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)" -msgstr "" +msgid "Rc" +msgstr "Rc" #: src/smart-pointers/box.md msgid "" @@ -7874,7 +8086,8 @@ msgstr "" #: src/smart-pointers/box.md msgid "" -"Recursive data types or data types with dynamic sizes need to use a `Box`:" +"Recursive data types or data types with dynamic sizes cannot be stored " +"inline without a pointer indirection. `Box` accomplishes that indirection:" msgstr "" #: src/smart-pointers/box.md @@ -7923,8 +8136,8 @@ msgstr "" #: src/smart-pointers/box.md msgid "" -"have a type whose size that can't be known at compile time, but the Rust " -"compiler wants to know an exact size." +"have a type whose size can't be known at compile time, but the Rust compiler " +"wants to know an exact size." msgstr "" #: src/smart-pointers/box.md @@ -7955,43 +8168,11 @@ msgid "" "storing the value directly." msgstr "" -#: src/smart-pointers/box.md -msgid "Niche Optimization" -msgstr "Niche Optimizasyonu" - #: src/smart-pointers/box.md msgid "" "Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. " "This makes `Box` one of the types that allow the compiler to optimize " -"storage of some enums." -msgstr "" - -#: src/smart-pointers/box.md -msgid "" -"For example, `Option>` has the same size, as just `Box`, because " -"compiler uses NULL-value to discriminate variants instead of using explicit " -"tag ([\"Null Pointer Optimization\"](https://doc.rust-lang.org/std/option/" -"#representation)):" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Just box\"" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Optional box\"" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Size of just_box: {}\"" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Size of optional_box: {}\"" -msgstr "" - -#: src/smart-pointers/box.md -msgid "\"Size of none: {}\"" +"storage of some enums (the \"niche optimization\")." msgstr "" #: src/smart-pointers/rc.md @@ -8011,7 +8192,7 @@ msgstr "" #: src/smart-pointers/rc.md msgid "" -"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc." +"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc." "rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded " "context." msgstr "" @@ -8057,18 +8238,11 @@ msgstr "" #: src/smart-pointers/trait-objects.md msgid "" -"Trait objects allow for values of different types, for instance in a " -"collection:" -msgstr "" - -#: src/smart-pointers/trait-objects.md -msgid "\"Miau!\"" +"We previously saw how trait objects can be used with references, e.g `&dyn " +"Pet`. However, we can also use trait objects with smart pointers like `Box` " +"to create an owned trait object: `Box`." msgstr "" -#: src/smart-pointers/trait-objects.md -msgid "\"Hello, who are you? {}\"" -msgstr "\"Merhaba, nasılsın? {}\"" - #: src/smart-pointers/trait-objects.md msgid "Memory layout after allocating `pets`:" msgstr "" @@ -8203,7 +8377,7 @@ msgid "" msgstr "" #: src/smart-pointers/exercise.md -msgid "// Implement `new`, `insert`, `len`, and `has`.\n" +msgid "// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\n" msgstr "" #: src/smart-pointers/exercise.md src/smart-pointers/solution.md @@ -8214,36 +8388,13 @@ msgstr "" msgid "\"bar\"" msgstr "" -#: src/welcome-day-3-afternoon.md -msgid "[Borrowing](./borrowing.md) (50 minutes)" -msgstr "" - -#: src/welcome-day-3-afternoon.md -msgid "[Lifetimes](./lifetimes.md) (50 minutes)" -msgstr "[Ömürler](./lifetimes.md) (50 dakika)" - #: src/welcome-day-3-afternoon.md msgid "" -"Including 10 minute breaks, this session should take about 1 hour and 50 " -"minutes" -msgstr "" -"Bu oturum 10 dakikalık aralar dahil yaklaşık 1 saat 50 dakika sürecektir" - -#: src/borrowing.md -msgid "[Borrowing a Value](./borrowing/shared.md) (10 minutes)" -msgstr "" - -#: src/borrowing.md -msgid "[Borrow Checking](./borrowing/borrowck.md) (10 minutes)" -msgstr "" - -#: src/borrowing.md -msgid "[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)" -msgstr "" - -#: src/borrowing.md -msgid "[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)" +"Including 10 minute breaks, this session should take about 1 hour and 55 " +"minutes. It contains:" msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 1 saat 55 dakika sürmelidir. " +"İçeriği:" #: src/borrowing/shared.md msgid "" @@ -8266,14 +8417,15 @@ msgid "" msgstr "" #: src/borrowing/shared.md -msgid "Notes on stack returns:" +msgid "Notes on stack returns and inlining:" msgstr "" #: src/borrowing/shared.md msgid "" "Demonstrate that the return from `add` is cheap because the compiler can " -"eliminate the copy operation. Change the above code to print stack addresses " -"and run it on the [Playground](https://play.rust-lang.org/?" +"eliminate the copy operation, by inlining the call to add into main. Change " +"the above code to print stack addresses and run it on the [Playground]" +"(https://play.rust-lang.org/?" "version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) " "or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the " "\"DEBUG\" optimization level, the addresses should change, while they stay " @@ -8281,15 +8433,17 @@ msgid "" msgstr "" #: src/borrowing/shared.md -msgid "The Rust compiler can do return value optimization (RVO)." +msgid "" +"The Rust compiler can do automatic inlining, that can be disabled on a " +"function level with `#[inline(never)]`." msgstr "" #: src/borrowing/shared.md msgid "" -"In C++, copy elision has to be defined in the language specification because " -"constructors can have side effects. In Rust, this is not an issue at all. If " -"RVO did not happen, Rust will always perform a simple and efficient `memcpy` " -"copy." +"Once disabled, the printed address will change on all optimization levels. " +"Looking at Godbolt or Playground, one can see that in this case, the return " +"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up " +"the point will be returned in 2 registers (eax and edx)." msgstr "" #: src/borrowing/borrowck.md @@ -8347,6 +8501,28 @@ msgid "" "this often results in \"fighting with the borrow checker.\"" msgstr "" +#: src/borrowing/examples.md +msgid "" +"As a concrete example of how these borrowing rules prevent memory errors, " +"consider the case of modifying a collection while there are references to " +"its elements:" +msgstr "" + +#: src/borrowing/examples.md +msgid "\"{elem}\"" +msgstr "\"{elem}\"" + +#: src/borrowing/examples.md +msgid "Similarly, consider the case of iterator invalidation:" +msgstr "" + +#: src/borrowing/examples.md +msgid "" +"In both of these cases, modifying the collection by pushing new elements " +"into it can potentially invalidate existing references to the collection's " +"elements if the collection has to reallocate." +msgstr "" + #: src/borrowing/interior-mutability.md msgid "" "In some situations, it's necessary to modify data behind a shared (read-" @@ -8361,29 +8537,56 @@ msgid "" "all while still ensuring safety, typically by performing a runtime check." msgstr "" +#: src/borrowing/interior-mutability.md +msgid "`Cell`" +msgstr "" + +#: src/borrowing/interior-mutability.md +msgid "" +"`Cell` wraps a value and allows getting or setting the value using only a " +"shared reference to the `Cell`. However, it does not allow any references to " +"the inner value. Since there are no references, borrowing rules cannot be " +"broken." +msgstr "" + +#: src/borrowing/interior-mutability.md +msgid "// Note that `cell` is NOT declared as mutable.\n" +msgstr "" + #: src/borrowing/interior-mutability.md msgid "`RefCell`" msgstr "`RefCell`" #: src/borrowing/interior-mutability.md -msgid "\"graph: {root:#?}\"" +msgid "" +"`RefCell` allows accessing and mutating a wrapped value by providing " +"alternative types `Ref` and `RefMut` that emulate `&T`/`&mut T` without " +"actually being Rust references." msgstr "" #: src/borrowing/interior-mutability.md -msgid "\"graph sum: {}\"" +msgid "" +"These types perform dynamic checks using a counter in the `RefCell` to " +"prevent existence of a `RefMut` alongside another `Ref`/`RefMut`." msgstr "" #: src/borrowing/interior-mutability.md -msgid "`Cell`" +msgid "" +"By implementing `Deref` (and `DerefMut` for `RefMut`), these types allow " +"calling methods on the inner value without allowing references to escape." msgstr "" #: src/borrowing/interior-mutability.md msgid "" -"`Cell` wraps a value and allows getting or setting the value, even with a " -"shared reference to the `Cell`. However, it does not allow any references to " -"the value. Since there are no references, borrowing rules cannot be broken." +"// This triggers an error at runtime.\n" +" // let other = cell.borrow();\n" +" // println!(\"{}\", *other);\n" msgstr "" +#: src/borrowing/interior-mutability.md +msgid "\"{cell:?}\"" +msgstr "\"{cell:?}\"" + #: src/borrowing/interior-mutability.md msgid "" "The main thing to take away from this slide is that Rust provides _safe_ " @@ -8401,9 +8604,9 @@ msgstr "" #: src/borrowing/interior-mutability.md msgid "" -"`Rc` only allows shared (read-only) access to its contents, since its " -"purpose is to allow (and count) many references. But we want to modify the " -"value, so we need interior mutability." +"The extra block in the `RefCell` example is to end the borrow created by the " +"call to `borrow_mut` before we print the cell. Trying to print a borrowed " +"`RefCell` just shows the message `\"{borrowed}\"`." msgstr "" #: src/borrowing/interior-mutability.md @@ -8415,16 +8618,9 @@ msgstr "" #: src/borrowing/interior-mutability.md msgid "" -"Demonstrate that reference loops can be created by adding `root` to `subtree." -"children`." -msgstr "" - -#: src/borrowing/interior-mutability.md -msgid "" -"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments " -"`self.value` and calls the same method on its children. This will panic in " -"the presence of the reference loop, with `thread 'main' panicked at 'already " -"borrowed: BorrowMutError'`." +"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` " +"can't be passed between threads. This prevents two threads trying to access " +"the cell at once." msgstr "" #: src/borrowing/exercise.md @@ -8462,24 +8658,6 @@ msgstr "" msgid "\"I'm {} and my age is {}\"" msgstr "" -#: src/lifetimes.md -msgid "" -"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)" -msgstr "" -"[Ömür için Ek Açıklamalar](./lifetimes/lifetime-annotations.md) (10 dakika)" - -#: src/lifetimes.md -msgid "[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)" -msgstr "[Ömür Atlaması (Elision)](./lifetimes/lifetime-elision.md) (5 dakika)" - -#: src/lifetimes.md -msgid "[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)" -msgstr "[Yapı Ömürleri](./lifetimes/struct-lifetimes.md) (5 dakika)" - -#: src/lifetimes.md -msgid "[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)" -msgstr "[Alıştırma: Protobuf Ayrıştırma](./lifetimes/exercise.md) (30 dakika)" - #: src/lifetimes/lifetime-annotations.md msgid "" "A reference has a _lifetime_, which must not \"outlive\" the value it refers " @@ -8678,50 +8856,64 @@ msgstr "" msgid "We'll use the following proto:" msgstr "" +#: src/lifetimes/exercise.md +msgid "Messages" +msgstr "" + #: src/lifetimes/exercise.md msgid "" "A proto message is encoded as a series of fields, one after the next. Each " "is implemented as a \"tag\" followed by the value. The tag contains a field " "number (e.g., `2` for the `id` field of a `Person` message) and a wire type " -"defining how the payload should be determined from the byte stream." +"defining how the payload should be determined from the byte stream. These " +"are combined into a single integer, as decoded in `unpack_tag` below." msgstr "" #: src/lifetimes/exercise.md -msgid "" -"Integers, including the tag, are represented with a variable-length encoding " -"called VARINT. Luckily, `parse_varint` is defined for you below. The given " -"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and " -"to parse a message into a series of calls to those callbacks." +msgid "Varint" msgstr "" #: src/lifetimes/exercise.md msgid "" -"What remains for you is to implement the `parse_field` function and the " -"`ProtoMessage` trait for `Person` and `PhoneNumber`." +"Integers, including the tag, are represented with a variable-length encoding " +"called VARINT. Luckily, `parse_varint` is defined for you below." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Invalid varint\"" +#: src/lifetimes/exercise.md +msgid "Wire Types" msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Invalid wire-type\"" +#: src/lifetimes/exercise.md +msgid "" +"Proto defines several wire types, only two of which are used in this " +"exercise." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Unexpected EOF\"" +#: src/lifetimes/exercise.md +msgid "" +"The `Varint` wire type contains a single varint, and is used to encode proto " +"values of type `int32` such as `Person.id`." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Invalid length\"" +#: src/lifetimes/exercise.md +msgid "" +"The `Len` wire type contains a length expressed as a varint, followed by a " +"payload of that number of bytes. This is used to encode proto values of type " +"`string` such as `Person.name`. It is also used to encode proto values " +"containing sub-messages such as `Person.phones`, where the payload contains " +"an encoding of the sub-message." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Unexpected wire-type)\"" +#: src/lifetimes/exercise.md +msgid "" +"The given code also defines callbacks to handle `Person` and `PhoneNumber` " +"fields, and to parse a message into a series of calls to those callbacks." msgstr "" -#: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "\"Invalid string (not UTF-8)\"" +#: src/lifetimes/exercise.md +msgid "" +"What remains for you is to implement the `parse_field` function and the " +"`ProtoMessage` trait for `Person` and `PhoneNumber`." msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md @@ -8734,7 +8926,10 @@ msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "" -"//I64, -- not needed for this exercise\n" +"// The I64 WireType indicates that the value is precisely 8 bytes in\n" +" // little-endian order containing a 64-bit signed integer or double " +"type.\n" +" //I64, -- not needed for this exercise\n" " /// The Len WireType indicates that the value is a length represented as " "a\n" " /// VARINT followed by exactly that number of bytes.\n" @@ -8742,8 +8937,10 @@ msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "" -"/// The I32 WireType indicates that the value is precisely 4 bytes in\n" -" /// little-endian order containing a 32-bit signed integer.\n" +"// The I32 WireType indicates that the value is precisely 4 bytes in\n" +" // little-endian order containing a 32-bit signed integer or float " +"type.\n" +" //I32, -- not needed for this exercise\n" msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md @@ -8754,6 +8951,10 @@ msgstr "" msgid "//I64(i64), -- not needed for this exercise\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "//I32(i32), -- not needed for this exercise\n" +msgstr "" + #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "/// A field, containing the field number and its value.\n" msgstr "" @@ -8762,11 +8963,39 @@ msgstr "" msgid "//1 => WireType::I64, -- not needed for this exercise\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "//5 => WireType::I32, -- not needed for this exercise\n" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Invalid wire type: {value}\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Expected string to be a `Len` field\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Invalid string\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Expected bytes to be a `Len` field\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Expected `u64` to be a `Varint` field\"" +msgstr "" + #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "" "/// Parse a VARINT, returning the parsed value and the remaining bytes.\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Not enough bytes for varint\"" +msgstr "" + #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "" "// This is the last byte of the VARINT, so convert it to\n" @@ -8777,6 +9006,10 @@ msgstr "" msgid "// More than 7 bytes is invalid.\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Too many bytes for varint\"" +msgstr "" + #: src/lifetimes/exercise.md src/lifetimes/solution.md msgid "/// Convert a tag into a field number and a WireType.\n" msgstr "" @@ -8808,17 +9041,67 @@ msgstr "" msgid "// TODO: Implement ProtoMessage for Person and PhoneNumber.\n" msgstr "" +#: src/lifetimes/exercise.md src/lifetimes/solution.md src/modules/exercise.md +#: src/modules/solution.md src/testing/unit-tests.md src/testing/solution.md +msgid "\"\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"beautiful name\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"Evan\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"+1234-777-9090\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"home\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "// Put that all together into a single parse.\n" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"maxwell\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"+1202-555-1212\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"+1800-867-5308\"" +msgstr "" + +#: src/lifetimes/exercise.md src/lifetimes/solution.md +msgid "\"mobile\"" +msgstr "" + +#: src/lifetimes/exercise.md +msgid "" +"In this exercise there are various cases where protobuf parsing might fail, " +"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in " +"the data buffer. In normal Rust code we'd handle this with the `Result` " +"enum, but for simplicity in this exercise we panic if any errors are " +"encountered. On day 4 we'll cover error handling in Rust in more detail." +msgstr "" + #: src/lifetimes/solution.md -msgid "// Unwrap error because `value` is definitely 4 bytes long.\n" +msgid "\"len not a valid `usize`\"" msgstr "" #: src/lifetimes/solution.md -msgid "// skip everything else\n" +msgid "\"Unexpected EOF\"" msgstr "" #: src/lifetimes/solution.md -msgid "b\"hello\"" -msgstr "b\"merhaba\"" +msgid "// skip everything else\n" +msgstr "" #: src/welcome-day-4.md msgid "Welcome to Day 4" @@ -8850,48 +9133,25 @@ msgid "" "Unsafe Rust: the escape hatch when you can't express yourself in safe Rust." msgstr "" -#: src/welcome-day-4.md -msgid "[Welcome](./welcome-day-4.md) (3 minutes)" -msgstr "" - -#: src/welcome-day-4.md -msgid "[Iterators](./iterators.md) (45 minutes)" -msgstr "" - -#: src/welcome-day-4.md -msgid "[Modules](./modules.md) (40 minutes)" -msgstr "" - -#: src/welcome-day-4.md -msgid "[Testing](./testing.md) (45 minutes)" -msgstr "" - #: src/welcome-day-4.md msgid "" "Including 10 minute breaks, this session should take about 2 hours and 40 " -"minutes" +"minutes. It contains:" msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 40 dakika sürmelidir. " +"İçeriği:" #: src/iterators.md -msgid "[Iterator](./iterators/iterator.md) (5 minutes)" -msgstr "" - -#: src/iterators.md -msgid "[IntoIterator](./iterators/intoiterator.md) (5 minutes)" -msgstr "" +msgid "Iterator" +msgstr "Iterator" #: src/iterators.md -msgid "[FromIterator](./iterators/fromiterator.md) (5 minutes)" -msgstr "" - -#: src/iterators.md -msgid "" -"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)" -msgstr "" +msgid "IntoIterator" +msgstr "IntoIterator" -#: src/iterators.md src/testing.md -msgid "This segment should take about 45 minutes" -msgstr "Bu bölüm yaklaşık 45 dakika sürecektir" +#: src/iterators.md src/iterators/fromiterator.md +msgid "FromIterator" +msgstr "FromIterator" #: src/iterators/iterator.md msgid "" @@ -8978,10 +9238,6 @@ msgid "" "over references to elements of `some_vector`." msgstr "" -#: src/iterators/fromiterator.md -msgid "FromIterator" -msgstr "FromIterator" - #: src/iterators/fromiterator.md msgid "" "[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) " @@ -9044,25 +9300,8 @@ msgid "" "/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\n" msgstr "" -#: src/modules.md -msgid "[Modules](./modules/modules.md) (3 minutes)" -msgstr "" - -#: src/modules.md -msgid "[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)" -msgstr "" - -#: src/modules.md -msgid "[Visibility](./modules/visibility.md) (5 minutes)" -msgstr "" - -#: src/modules.md -msgid "[use, super, self](./modules/paths.md) (10 minutes)" -msgstr "" - -#: src/modules.md -msgid "" -"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)" +#: src/modules.md src/modules/paths.md +msgid "use, super, self" msgstr "" #: src/modules/modules.md @@ -9104,7 +9343,7 @@ msgstr "" #: src/modules/filesystem.md msgid "" -"This tells rust that the `garden` module content is found at `src/garden." +"This tells Rust that the `garden` module content is found at `src/garden." "rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/" "vegetables.rs`." msgstr "" @@ -9243,10 +9482,6 @@ msgid "" "its descendants)." msgstr "" -#: src/modules/paths.md -msgid "use, super, self" -msgstr "" - #: src/modules/paths.md msgid "" "A module can bring symbols from another module into scope with `use`. You " @@ -9381,11 +9616,6 @@ msgstr "" msgid "\"+-{:-`, `Display`, and the `Error` trait." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "" -"`thiserror` is often used in libraries to create custom error types that " -"implement `From`." +#: src/error-handling/thiserror.md +msgid "\"I/O error: {0}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "" -"`anyhow` is often used by applications to help with error handling in " -"functions, including adding contextual information to your errors." +#: src/error-handling/thiserror.md src/error-handling/anyhow.md +msgid "\"Found no username in {0}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Found no username in {0}\"" +#: src/error-handling/thiserror.md src/error-handling/anyhow.md +msgid "//fs::write(\"config.dat\", \"\").unwrap();\n" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Failed to open {path}\"" +#: src/error-handling/thiserror.md src/error-handling/anyhow.md +msgid "\"Username: {username}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Failed to read\"" +#: src/error-handling/thiserror.md src/error-handling/anyhow.md +msgid "\"Error: {err:?}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Username: {username}\"" +#: src/error-handling/thiserror.md +msgid "" +"The `Error` derive macro is provided by `thiserror`, and has lots of useful " +"attributes to help define error types in a compact way." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "\"Error: {err:?}\"" +#: src/error-handling/thiserror.md +msgid "The message from `#[error]` is used to derive the `Display` trait." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "`thiserror`" +#: src/error-handling/thiserror.md +msgid "" +"Note that the (`thiserror::`)`Error` derive macro, while it has the effect " +"of implementing the (`std::error::`)`Error` trait, is not the same this; " +"traits and macros do not share a namespace." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "" -"The `Error` derive macro is provided by `thiserror`, and has lots of useful " -"attributes to help define error types in a compact way." +"The [`anyhow`](https://docs.rs/anyhow/) crate provides a rich error type " +"with support for carrying additional contextual information, which can be " +"used to provide a semantic trace of what the program was doing leading up to " +"the error." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "The `std::error::Error` trait is derived automatically." +#: src/error-handling/anyhow.md +msgid "" +"This can be combined with the convenience macros from [`thiserror`](https://" +"docs.rs/thiserror/) to avoid writing out trait impls explicitly for custom " +"error types." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "The message from `#[error]` is used to derive the `Display` trait." +#: src/error-handling/anyhow.md +msgid "\"Failed to open {path}\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "`anyhow`" +#: src/error-handling/anyhow.md +msgid "\"Failed to read\"" msgstr "" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "" "`anyhow::Error` is essentially a wrapper around `Box`. As such " "it's again generally not a good choice for the public API of a library, but " "is widely used in applications." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "`anyhow::Result` is a type alias for `Result`." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md -msgid "" -"Actual error type inside of it can be extracted for examination if necessary." -msgstr "" - -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "" -"Functionality provided by `anyhow::Result` may be familiar to Go " -"developers, as it provides similar usage patterns and ergonomics to `(T, " -"error)` from Go." +"Functionality provided by `anyhow::Error` may be familiar to Go developers, " +"as it provides similar behavior to the Go `error` type and `Result` is much like a Go `(T, error)` (with the convention that " +"only one element of the pair is meaningful)." msgstr "" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/anyhow.md msgid "" "`anyhow::Context` is a trait implemented for the standard `Result` and " "`Option` types. `use anyhow::Context` is necessary to enable `.context()` " "and `.with_context()` on those types." msgstr "" -#: src/error-handling/exercise.md -msgid "Exercise: Rewriting with Result" +#: src/error-handling/anyhow.md +msgid "" +"`anyhow::Error` has support for downcasting, much like `std::any::Any`; the " +"specific error type stored inside can be extracted for examination if " +"desired with [`Error::downcast`](https://docs.rs/anyhow/latest/anyhow/struct." +"Error.html#method.downcast)." msgstr "" #: src/error-handling/exercise.md @@ -10139,13 +10416,14 @@ msgid "" "The following implements a very simple parser for an expression language. " "However, it handles errors by panicking. Rewrite it to instead use idiomatic " "error handling and propagate errors to a return from `main`. Feel free to " -"use `thiserror` and `anyhow`." +"use [`thiserror`](https://docs.rs/thiserror) and [`anyhow`](https://docs.rs/" +"anyhow)." msgstr "" #: src/error-handling/exercise.md msgid "" -"HINT: start by fixing error handling in the `parse` function. Once that is " -"working correctly, update `Tokenizer` to implement " +"**Hint:** start by fixing error handling in the `parse` function. Once that " +"is working correctly, update `Tokenizer` to implement " "`Iterator>` and handle that in the parser." msgstr "" @@ -10194,7 +10472,7 @@ msgid "\"Unexpected end of input\"" msgstr "" #: src/error-handling/exercise.md -msgid "\"Invalid 32-bit integer'\"" +msgid "\"Invalid 32-bit integer\"" msgstr "" #: src/error-handling/exercise.md @@ -10229,39 +10507,6 @@ msgstr "" msgid "\"Invalid number\"" msgstr "" -#: src/unsafe-rust.md -msgid "[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "" -"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Unions](./unsafe-rust/unions.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)" -msgstr "" - -#: src/unsafe-rust.md -msgid "This segment should take about 1 hour and 5 minutes" -msgstr "" - #: src/unsafe-rust/unsafe.md msgid "The Rust language has two parts:" msgstr "" @@ -10337,12 +10582,12 @@ msgstr "" #: src/unsafe-rust/dereferencing.md msgid "" -"// Safe because r1 and r2 were obtained from references and so are\n" -" // guaranteed to be non-null and properly aligned, the objects " -"underlying\n" -" // the references from which they were obtained are live throughout the\n" -" // whole unsafe block, and they are not accessed either through the\n" -" // references or concurrently through any other pointers.\n" +"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\n" +" // be non-null and properly aligned, the objects underlying the " +"references\n" +" // from which they were obtained are live throughout the whole unsafe\n" +" // block, and they are not accessed either through the references or\n" +" // concurrently through any other pointers.\n" msgstr "" #: src/unsafe-rust/dereferencing.md @@ -10433,6 +10678,11 @@ msgid "" "static variables:" msgstr "" +#: src/unsafe-rust/mutable-static.md +msgid "" +"// SAFETY: There are no other threads which could be accessing `COUNTER`.\n" +msgstr "" + #: src/unsafe-rust/mutable-static.md msgid "\"COUNTER: {COUNTER}\"" msgstr "" @@ -10508,8 +10758,8 @@ msgstr "" #: src/unsafe-rust/unsafe-functions.md msgid "" -"// Safe because the indices are in the correct order, within the bounds of\n" -" // the string slice, and lie on UTF-8 sequence boundaries.\n" +"// SAFETY: The indices are in the correct order, within the bounds of the\n" +" // string slice, and lie on UTF-8 sequence boundaries.\n" msgstr "" #: src/unsafe-rust/unsafe-functions.md @@ -10521,8 +10771,10 @@ msgid "\"char count: {}\"" msgstr "" #: src/unsafe-rust/unsafe-functions.md -msgid "// Undefined behavior if abs misbehaves.\n" -msgstr "// Undefined behavior if abs misbehaves.\n" +msgid "" +"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\n" +" // requirements.\n" +msgstr "" #: src/unsafe-rust/unsafe-functions.md msgid "\"Absolute value of -3 according to C: {}\"" @@ -10556,7 +10808,7 @@ msgid "" msgstr "" #: src/unsafe-rust/unsafe-functions.md -msgid "// Safe because ...\n" +msgid "// SAFETY: ...\n" msgstr "" #: src/unsafe-rust/unsafe-functions.md @@ -10566,11 +10818,11 @@ msgstr "" #: src/unsafe-rust/unsafe-functions.md msgid "" "`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can " -"create UB if the range is incorrect. `abs` is incorrect for a different " -"reason: it is an external function (FFI). Calling external functions is " -"usually only a problem when those functions do things with pointers which " -"might violate Rust's memory model, but in general any C function might have " -"undefined behaviour under any arbitrary circumstances." +"create UB if the range is incorrect. `abs` is unsafe for a different reason: " +"it is an external function (FFI). Calling external functions is usually only " +"a problem when those functions do things with pointers which might violate " +"Rust's memory model, but in general any C function might have undefined " +"behaviour under any arbitrary circumstances." msgstr "" #: src/unsafe-rust/unsafe-functions.md @@ -10606,7 +10858,7 @@ msgstr "" #: src/unsafe-rust/unsafe-traits.md msgid "" "For example, the `zerocopy` crate has an unsafe trait that looks [something " -"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):" +"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.IntoBytes.html):" msgstr "" #: src/unsafe-rust/unsafe-traits.md @@ -10617,7 +10869,7 @@ msgid "" msgstr "" #: src/unsafe-rust/unsafe-traits.md -msgid "// Safe because u32 has a defined representation and no padding.\n" +msgid "// SAFETY: `u32` has a defined representation and no padding.\n" msgstr "" #: src/unsafe-rust/unsafe-traits.md @@ -10628,7 +10880,7 @@ msgstr "" #: src/unsafe-rust/unsafe-traits.md msgid "" -"The actual safety section for `AsBytes` is rather longer and more " +"The actual safety section for `IntoBytes` is rather longer and more " "complicated." msgstr "" @@ -10638,7 +10890,7 @@ msgstr "" #: src/unsafe-rust/exercise.md msgid "Safe FFI Wrapper" -msgstr "Güvenli FFI Sarıcı (Wrapper)" +msgstr "Emniyetli FFI Sarıcı (Wrapper)" #: src/unsafe-rust/exercise.md msgid "" @@ -10818,7 +11070,7 @@ msgstr "" msgid "// Keep calling readdir until we get a NULL pointer back.\n" msgstr "" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md msgid "// Call closedir as needed.\n" msgstr "" @@ -10840,7 +11092,7 @@ msgid "// SAFETY: path.as_ptr() cannot be NULL.\n" msgstr "" #: src/unsafe-rust/solution.md -msgid "\"Could not open {:?}\"" +msgid "\"Could not open {path:?}\"" msgstr "" #: src/unsafe-rust/solution.md @@ -10860,7 +11112,9 @@ msgid "" msgstr "" #: src/unsafe-rust/solution.md -msgid "// SAFETY: self.dir is not NULL.\n" +msgid "" +"// Call closedir as needed.\n" +" // SAFETY: self.dir is never NULL.\n" msgstr "" #: src/unsafe-rust/solution.md @@ -10914,14 +11168,6 @@ msgid "" "existing code as needed)." msgstr "" -#: src/android.md -msgid "" -"We will attempt to call Rust from one of your own projects today. So try to " -"find a little corner of your code base where we can move some lines of code " -"to Rust. The fewer dependencies and \"exotic\" types the better. Something " -"that parses some raw bytes would be ideal." -msgstr "" - #: src/android.md msgid "" "The speaker may mention any of the following given the increased use of Rust " @@ -10931,25 +11177,25 @@ msgstr "" #: src/android.md msgid "" "Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-" -"over-http3-in-android.html)" +"over-http3-in-android.html)." msgstr "" #: src/android.md msgid "" "Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/" -"appendix/rutabaga_gfx.html)" +"appendix/rutabaga_gfx.html)." msgstr "" #: src/android.md msgid "" "Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-" -"rust-binder-v1-0-08ba9197f637@google.com/)" +"rust-binder-v1-0-08ba9197f637@google.com/)." msgstr "" #: src/android.md msgid "" "Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-" -"rust-in-android.html)" +"rust-in-android.html)." msgstr "" #: src/android/setup.md @@ -10964,6 +11210,14 @@ msgid "" "setup/start) for details." msgstr "" +#: src/android/setup.md +msgid "" +"The code on the following pages can be found in the [`src/android/` " +"directory](https://github.com/google/comprehensive-rust/tree/main/src/" +"android) of the course material. Please `git clone` the repository to follow " +"along." +msgstr "" + #: src/android/setup.md msgid "" "Cuttlefish is a reference Android device designed to work on generic Linux " @@ -11082,20 +11336,8 @@ msgstr "" #: src/android/build-rules.md msgid "" -"Soong has many similarities to Bazel, which is the open-source variant of " -"Blaze (used in google3)." -msgstr "" - -#: src/android/build-rules.md -msgid "" -"There is a plan to transition [Android](https://source.android.com/docs/" -"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource." -"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/" -"build/bazel/introduction) to Bazel." -msgstr "" - -#: src/android/build-rules.md -msgid "Learning Bazel-like build rules is useful for all Rust OS developers." +"Soong has many similarities to [Bazel](https://bazel.build/), which is the " +"open-source variant of Blaze (used in google3)." msgstr "" #: src/android/build-rules.md @@ -11247,6 +11489,16 @@ msgstr "" msgid "You can create new AIDL servers in Rust." msgstr "" +#: src/android/aidl.md +msgid "AIDL is what enables Android apps to interact with each other." +msgstr "" + +#: src/android/aidl.md +msgid "" +"Since Rust is supported as a first-class citizen in this ecosystem, Rust " +"services can be called by any other process on the phone." +msgstr "" + #: src/android/aidl/birthday-service.md msgid "" "To illustrate how to use Rust with Binder, we're going to walk through the " @@ -11264,6 +11516,8 @@ msgstr "" #: src/android/aidl/example-service/interface.md #: src/android/aidl/example-service/service-bindings.md +#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md +#: src/android/aidl/types/file-descriptor.md msgid "" "_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" msgstr "" @@ -11308,14 +11562,12 @@ msgid "Generated Service API" msgstr "" #: src/android/aidl/example-service/service-bindings.md -msgid "" -"Binder generates a trait corresponding to the interface definition. trait to " -"talk to the service." +msgid "Binder generates a trait for each interface definition." msgstr "" #: src/android/aidl/example-service/service-bindings.md -msgid "_Generated trait_:" -msgstr "_Generated trait_:" +msgid "_out/soong/.intermediates/.../birthdayservice/IBirthdayService.rs_:" +msgstr "" #: src/android/aidl/example-service/service-bindings.md msgid "" @@ -11323,12 +11575,6 @@ msgid "" "this trait to talk to the service." msgstr "" -#: src/android/aidl/example-service/service-bindings.md -msgid "" -"The generated bindings can be found at `out/soong/.intermediates//`." -msgstr "" - #: src/android/aidl/example-service/service-bindings.md msgid "" "Point out how the generated function signature, specifically the argument " @@ -11351,9 +11597,14 @@ msgstr "" #: src/android/aidl/example-service/service.md #: src/android/aidl/example-service/changing-implementation.md +#: src/android/aidl/types/file-descriptor.md msgid "_birthday_service/src/lib.rs_:" msgstr "" +#: src/android/aidl/example-service/service.md +msgid "//! Implementation of the `IBirthdayService` AIDL interface.\n" +msgstr "" + #: src/android/aidl/example-service/service.md msgid "/// The `IBirthdayService` implementation.\n" msgstr "" @@ -11509,6 +11760,8 @@ msgstr "" #: src/android/aidl/example-service/client.md #: src/android/aidl/example-service/changing-implementation.md +#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md +#: src/android/aidl/types/file-descriptor.md msgid "_birthday_service/src/client.rs_:" msgstr "" @@ -11777,8 +12030,8 @@ msgstr "`Vec`" msgid "" "In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` " "becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. " -"int\\[3\\]\\[4\\]). In the Java backend, fixed-size arrays are represented " -"as array types." +"`int[3][4]`). In the Java backend, fixed-size arrays are represented as " +"array types." msgstr "" #: src/android/aidl/types/arrays.md @@ -11793,14 +12046,8 @@ msgstr "" #: src/android/aidl/types/objects.md msgid "" -"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider." -"aidl**:" -msgstr "" - -#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md -#: src/android/aidl/types/file-descriptor.md -msgid "" -"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:" +"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider." +"aidl_:" msgstr "" #: src/android/aidl/types/objects.md @@ -11811,11 +12058,6 @@ msgstr "" msgid "/** The same thing, but using `IBinder`. */" msgstr "" -#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md -#: src/android/aidl/types/file-descriptor.md -msgid "**birthday_service/src/client.rs**:" -msgstr "" - #: src/android/aidl/types/objects.md msgid "/// Rust struct implementing the `IBirthdayInfoProvider` interface.\n" msgstr "" @@ -11844,8 +12086,7 @@ msgid "Binder for Rust supports sending parcelables directly:" msgstr "" #: src/android/aidl/types/parcelables.md -msgid "" -"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:" +msgid "_birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl_:" msgstr "" #: src/android/aidl/types/parcelables.md @@ -11882,10 +12123,6 @@ msgstr "" msgid "// Create a `ParcelFileDescriptor` from the file and send it.\n" msgstr "" -#: src/android/aidl/types/file-descriptor.md -msgid "**birthday_service/src/lib.rs**:" -msgstr "" - #: src/android/aidl/types/file-descriptor.md msgid "" "// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\n" @@ -12032,7 +12269,13 @@ msgid "" msgstr "" #: src/android/testing/googletest.md -msgid "This just scratches the surface, there are many builtin matchers." +msgid "" +"This just scratches the surface, there are many builtin matchers. Consider " +"going through the first chapter of [\"Advanced testing for Rust " +"applications\"](https://rust-exercises.com/advanced-testing/), a self-guided " +"Rust course: it provides a guided introduction to the library, with " +"exercises to help you get comfortable with `googletest` macros, its matchers " +"and its overall philosophy." msgstr "" #: src/android/testing/googletest.md @@ -12194,6 +12437,12 @@ msgstr "" msgid "The logs show up in `adb logcat`:" msgstr "" +#: src/android/logging.md +msgid "" +"The logger implementation in `liblogger` is only needed in the final binary, " +"if you're logging from a library you only need the `log` facade crate." +msgstr "" + #: src/android/interoperability.md msgid "" "Rust has excellent support for interoperability with other languages. This " @@ -12234,8 +12483,8 @@ msgstr "" #: src/android/interoperability/with-c.md msgid "" -"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/" -"safe-ffi-wrapper.md)." +"We already saw this in the [Safe FFI Wrapper exercise](../../unsafe-rust/" +"exercise.md)." msgstr "" #: src/android/interoperability/with-c.md @@ -12357,7 +12606,13 @@ msgid "//! Bindgen demo.\n" msgstr "" #: src/android/interoperability/with-c/bindgen.md -msgid "// SAFETY: `print_card` is safe to call with a valid `card` pointer.\n" +msgid "" +"// SAFETY: The pointer we pass is valid because it came from a Rust\n" +" // reference, and the `name` it contains refers to `name` above which " +"also\n" +" // remains valid. `print_card` doesn't store either pointer to use " +"later\n" +" // after it returns.\n" msgstr "" #: src/android/interoperability/with-c/bindgen.md @@ -12407,7 +12662,9 @@ msgid "//! Rust FFI demo.\n" msgstr "" #: src/android/interoperability/with-c/rust.md -msgid "/// Analyze the numbers.\n" +msgid "" +"/// Analyze the numbers.\n" +"// SAFETY: There is no other global function of this name.\n" msgstr "" #: src/android/interoperability/with-c/rust.md @@ -12474,9 +12731,9 @@ msgstr "" #: src/android/interoperability/with-c/rust.md msgid "" -"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol " -"will just be the name of the function. You can also use `#[export_name = " -"\"some_name\"]` to specify whatever name you want." +"`#[unsafe(no_mangle)]` disables Rust's usual name mangling, so the exported " +"symbol will just be the name of the function. You can also use " +"`#[unsafe(export_name = \"some_name\")]` to specify whatever name you want." msgstr "" #: src/android/interoperability/cpp.md @@ -12936,7 +13193,9 @@ msgid "//! Rust <-> Java FFI demo.\n" msgstr "" #: src/android/interoperability/java.md -msgid "/// HelloWorld::hello method implementation.\n" +msgid "" +"/// HelloWorld::hello method implementation.\n" +"// SAFETY: There is no other global function of this name.\n" msgstr "" #: src/android/interoperability/java.md @@ -12987,24 +13246,17 @@ msgstr "\"HelloWorld\"" msgid "Finally, you can build, sync, and run the binary:" msgstr "" -#: src/exercises/android/morning.md +#: src/android/interoperability/java.md msgid "" -"This is a group exercise: We will look at one of the projects you work with " -"and try to integrate some Rust into it. Some suggestions:" -msgstr "" - -#: src/exercises/android/morning.md -msgid "Call your AIDL service with a client written in Rust." +"The `unsafe(no_mangle)` attribute instructs Rust to emit the " +"`Java_HelloWorld_hello` symbol exactly as written. This is important so that " +"Java can recognize the symbol as a `hello` method on the `HelloWorld` class." msgstr "" -#: src/exercises/android/morning.md -msgid "Move a function from your project to Rust and call it." -msgstr "" - -#: src/exercises/android/morning.md +#: src/android/interoperability/java.md msgid "" -"No solution is provided here since this is open-ended: it relies on someone " -"in the class having a piece of code which you can turn in to Rust on the fly." +"By default, Rust will mangle (rename) symbols so that a binary can link in " +"two versions of the same Rust crate." msgstr "" #: src/chromium.md @@ -13523,7 +13775,7 @@ msgstr "" #: src/chromium/build-rules/vscode.md msgid "" -"Demo **type annotations** (there are quote a few nice examples in the " +"Demo **type annotations** (there are quite a few nice examples in the " "`QrCode::with_bits` method)" msgstr "" @@ -13544,6 +13796,12 @@ msgid "" "containing:" msgstr "" +#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "// SAFETY: There is no other global function of this name.\n" +msgstr "" + #: src/exercises/chromium/build-rules.md msgid "" "**Important**: note that `no_mangle` here is considered a type of unsafety " @@ -13587,8 +13845,8 @@ msgstr "" #: src/exercises/chromium/build-rules.md msgid "" -"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/" -"abi.html#the-no_mangle-attribute)" +"Information about [`#[unsafe(no_mangle)]`](https://doc.rust-lang.org/beta/" +"reference/abi.html#the-no_mangle-attribute)" msgstr "" #: src/exercises/chromium/build-rules.md @@ -13619,9 +13877,9 @@ msgstr "" #: src/exercises/chromium/build-rules.md msgid "" -"`allow_unsafe = true` is required here because `#[no_mangle]` might allow " -"Rust to generate two functions with the same name, and Rust can no longer " -"guarantee that the right one is called." +"`allow_unsafe = true` is required here because `#[unsafe(no_mangle)]` might " +"allow Rust to generate two functions with the same name, and Rust can no " +"longer guarantee that the right one is called." msgstr "" #: src/exercises/chromium/build-rules.md @@ -14223,7 +14481,7 @@ msgstr "" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" "Modify your previous `hello_from_rust` function to remove `extern \"C\"` and " -"`#[no_mangle]`. This is now just a standard Rust function." +"`#[unsafe(no_mangle)]`. This is now just a standard Rust function." msgstr "" #: src/exercises/chromium/interoperability-with-cpp.md @@ -15091,7 +15349,7 @@ msgstr "" msgid "" "For the microcontroller part of the course we will use the [BBC micro:bit]" "(https://microbit.org/) v2 as an example. It's a [development board](https://" -"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller " +"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller " "with some LEDs and buttons, an I2C-connected accelerometer and compass, and " "an on-board SWD debugger." msgstr "" @@ -15134,6 +15392,10 @@ msgstr "" msgid "`Display`, `Debug`, `write!`..." msgstr "" +#: src/bare-metal/no_std.md +msgid "`Error`" +msgstr "" + #: src/bare-metal/no_std.md msgid "`panic!`, `assert_eq!`..." msgstr "" @@ -15166,10 +15428,6 @@ msgstr "" msgid "`String`, `CString`, `format!`" msgstr "" -#: src/bare-metal/no_std.md -msgid "`Error`" -msgstr "" - #: src/bare-metal/no_std.md msgid "`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`" msgstr "" @@ -15246,8 +15504,7 @@ msgid "" msgstr "" #: src/bare-metal/alloc.md -msgid "" -"// Safe because `HEAP` is only used here and `entry` is only called once.\n" +msgid "// SAFETY: `HEAP` is only used here and `entry` is only called once.\n" msgstr "" #: src/bare-metal/alloc.md @@ -15340,8 +15597,8 @@ msgstr "" #: src/bare-metal/microcontrollers/mmio.md msgid "" -"// Safe because the pointers are to valid peripheral control registers, and\n" -" // no aliases exist.\n" +"// SAFETY: The pointers are to valid peripheral control registers, and no\n" +" // aliases exist.\n" msgstr "" #: src/bare-metal/microcontrollers/mmio.md @@ -15502,7 +15759,7 @@ msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" "The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a " -"number of traits covering common microcontroller peripherals." +"number of traits covering common microcontroller peripherals:" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md @@ -15510,30 +15767,37 @@ msgid "GPIO" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "ADC" +msgid "PWM" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "I2C, SPI, UART, CAN" +msgid "Delay timers" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "RNG" +msgid "I2C and SPI buses and devices" msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "Timers" +msgid "" +"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken " +"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-" +"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://" +"crates.io/crates/rand_core) respectively." msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md -msgid "Watchdogs" +msgid "" +"Other crates then implement [drivers](https://github.com/rust-embedded/" +"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an " +"accelerometer driver might need an I2C or SPI device instance." msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" -"Other crates then implement [drivers](https://github.com/rust-embedded/" -"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an " -"accelerometer driver might need an I2C or SPI bus implementation." +"The traits cover using the peripherals but not initialising or configuring " +"them, as initialisation and configuration is usually highly platform-" +"specific." msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md @@ -15544,8 +15808,15 @@ msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" -"There is work in progress on an `async` version of `embedded-hal`, but it " -"isn't stable yet." +"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides " +"async versions of the traits." +msgstr "" + +#: src/bare-metal/microcontrollers/embedded-hal.md +msgid "" +"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides " +"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/" +"crates/nb) crate." msgstr "" #: src/bare-metal/microcontrollers/probe-rs.md @@ -15647,12 +15918,12 @@ msgid "[RTIC](https://rtic.rs/)" msgstr "" #: src/bare-metal/microcontrollers/other-projects.md -msgid "\"Real-Time Interrupt-driven Concurrency\"" +msgid "\"Real-Time Interrupt-driven Concurrency\"." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md msgid "" -"Shared resource management, message passing, task scheduling, timer queue" +"Shared resource management, message passing, task scheduling, timer queue." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md @@ -15660,7 +15931,7 @@ msgid "[Embassy](https://embassy.dev/)" msgstr "" #: src/bare-metal/microcontrollers/other-projects.md -msgid "`async` executors with priorities, timers, networking, USB" +msgid "`async` executors with priorities, timers, networking, USB." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md @@ -15670,7 +15941,7 @@ msgstr "" #: src/bare-metal/microcontrollers/other-projects.md msgid "" "Security-focused RTOS with preemptive scheduling and Memory Protection Unit " -"support" +"support." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md @@ -15680,11 +15951,11 @@ msgstr "" #: src/bare-metal/microcontrollers/other-projects.md msgid "" "Microkernel RTOS from Oxide Computer Company with memory protection, " -"unprivileged drivers, IPC" +"unprivileged drivers, IPC." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md -msgid "[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)" +msgid "[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)." msgstr "" #: src/bare-metal/microcontrollers/other-projects.md @@ -15728,7 +15999,7 @@ msgid "" "serial port." msgstr "" -#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md +#: src/exercises/bare-metal/morning.md msgid "" "After looking at the exercises, you can look at the [solutions](solutions-" "morning.md) provided." @@ -15765,9 +16036,9 @@ msgstr "" #: src/exercises/bare-metal/compass.md msgid "" -"The LSM303AGR driver needs something implementing the `embedded_hal::" -"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/" -"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this." +"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::" +"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/" +"microbit/hal/struct.Twim.html) struct implements this." msgstr "" #: src/exercises/bare-metal/compass.md @@ -15903,9 +16174,8 @@ msgid "" ".global entry\n" "entry:\n" " /*\n" -" * Load and apply the memory management configuration, ready to enable " -"MMU and\n" -" * caches.\n" +" * Load and apply the memory management configuration, ready to\n" +" * enable MMU and caches.\n" " */\n" " adrp x30, idmap\n" " msr ttbr0_el1, x30\n" @@ -15923,9 +16193,9 @@ msgid "" " mov_i x30, .Lsctlrval\n" "\n" " /*\n" -" * Ensure everything before this point has completed, then invalidate " -"any\n" -" * potentially stale local TLB entries before they start being used.\n" +" * Ensure everything before this point has completed, then\n" +" * invalidate any potentially stale local TLB entries before they\n" +" * start being used.\n" " */\n" " isb\n" " tlbi vmalle1\n" @@ -15934,9 +16204,8 @@ msgid "" " isb\n" "\n" " /*\n" -" * Configure sctlr_el1 to enable MMU and cache and don't proceed until " -"this\n" -" * has completed.\n" +" * Configure sctlr_el1 to enable MMU and cache and don't proceed\n" +" * until this has completed.\n" " */\n" " msr sctlr_el1, x30\n" " isb\n" @@ -16052,8 +16321,8 @@ msgstr "" #: src/bare-metal/aps/inline-assembly.md msgid "" -"// Safe because this only uses the declared registers and doesn't do\n" -" // anything with memory.\n" +"// SAFETY: this only uses the declared registers and doesn't do anything\n" +" // with memory.\n" msgstr "" #: src/bare-metal/aps/inline-assembly.md @@ -16115,8 +16384,8 @@ msgstr "" #: src/bare-metal/aps/inline-assembly.md msgid "" -"This `main` function needs to be `#[no_mangle]` and `extern \"C\"` because " -"it is called from our entry point in `entry.S`." +"This `main` function needs to be `#[unsafe(no_mangle)]` and `extern \"C\"` " +"because it is called from our entry point in `entry.S`." msgstr "" #: src/bare-metal/aps/inline-assembly.md @@ -16140,7 +16409,11 @@ msgid "Volatile memory access for MMIO" msgstr "" #: src/bare-metal/aps/mmio.md -msgid "Use `pointer::read_volatile` and `pointer::write_volatile`." +msgid "" +"Use [`pointer::read_volatile`](https://doc.rust-lang.org/stable/core/" +"primitive.pointer.html#method.read_volatile) and [`pointer::write_volatile`]" +"(https://doc.rust-lang.org/stable/core/primitive.pointer.html#method." +"write_volatile)." msgstr "" #: src/bare-metal/aps/mmio.md @@ -16149,7 +16422,7 @@ msgstr "" #: src/bare-metal/aps/mmio.md msgid "" -"`addr_of!` lets you get fields of structs without creating an intermediate " +"Use `&raw` to get fields of structs without creating an intermediate " "reference." msgstr "" @@ -16173,10 +16446,14 @@ msgid "" "dereference it." msgstr "" +#: src/bare-metal/aps/mmio.md +msgid "Use `&raw` to get struct field pointers from a pointer to the struct." +msgstr "" + #: src/bare-metal/aps/mmio.md msgid "" -"Use the `addr_of!` macro to get struct field pointers from a pointer to the " -"struct." +"For compatibility with old versions of Rust you can use the [`addr_of!`]" +"(https://doc.rust-lang.org/stable/core/ptr/macro.addr_of.html) macro instead." msgstr "" #: src/bare-metal/aps/uart.md @@ -16217,7 +16494,7 @@ msgstr "" #: src/bare-metal/aps/uart.md msgid "" -"// Safe because we know that the base address points to the control\n" +"// SAFETY: We know that the base address points to the control\n" " // registers of a PL011 device which is appropriately mapped.\n" msgstr "" @@ -16264,9 +16541,8 @@ msgid "" msgstr "" #: src/bare-metal/aps/uart/traits.md -#: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because it just contains a pointer to device memory, which can be\n" +"// SAFETY: `Uart` just contains a pointer to device memory, which can be\n" "// accessed from any context.\n" msgstr "" @@ -16327,6 +16603,10 @@ msgstr "" msgid "RSR" msgstr "" +#: src/bare-metal/aps/better-uart.md +msgid "4" +msgstr "4" + #: src/bare-metal/aps/better-uart.md msgid "0x18" msgstr "" @@ -16347,6 +16627,10 @@ msgstr "" msgid "ILPR" msgstr "" +#: src/bare-metal/aps/better-uart.md +msgid "8" +msgstr "8" + #: src/bare-metal/aps/better-uart.md msgid "0x24" msgstr "" @@ -16367,6 +16651,10 @@ msgstr "" msgid "FBRD" msgstr "" +#: src/bare-metal/aps/better-uart.md +msgid "6" +msgstr "6" + #: src/bare-metal/aps/better-uart.md msgid "0x2c" msgstr "" @@ -16435,6 +16723,10 @@ msgstr "" msgid "DMACR" msgstr "" +#: src/bare-metal/aps/better-uart.md +msgid "3" +msgstr "3" + #: src/bare-metal/aps/better-uart.md msgid "There are also some ID registers which have been omitted for brevity." msgstr "" @@ -16519,8 +16811,8 @@ msgstr "" #: src/bare-metal/aps/better-uart/driver.md msgid "" -"// Safe because we know that self.registers points to the control\n" -" // registers of a PL011 device which is appropriately mapped.\n" +"// SAFETY: We know that self.registers points to the control registers\n" +" // of a PL011 device which is appropriately mapped.\n" msgstr "" #: src/bare-metal/aps/better-uart/driver.md @@ -16529,13 +16821,19 @@ msgid "" " /// received.\n" msgstr "" +#: src/bare-metal/aps/better-uart/driver.md +msgid "" +"// SAFETY: We know that self.registers points to the control\n" +" // registers of a PL011 device which is appropriately mapped.\n" +msgstr "" + #: src/bare-metal/aps/better-uart/driver.md msgid "// TODO: Check for error conditions in bits 8-11.\n" msgstr "" #: src/bare-metal/aps/better-uart/driver.md msgid "" -"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual " +"Note the use of `&raw const` / `&raw mut` to get pointers to individual " "fields without creating an intermediate reference, which would be unsound." msgstr "" @@ -16557,8 +16855,8 @@ msgstr "" #: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\n" -" // and nothing else accesses that address range.\n" +"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\n" +" // nothing else accesses that address range.\n" msgstr "" #: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md @@ -16569,7 +16867,8 @@ msgstr "" msgid "b'\\r'" msgstr "" -#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md +#: src/bare-metal/aps/better-uart/using.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "b'\\n'" msgstr "" @@ -16578,7 +16877,7 @@ msgid "b'q'" msgstr "" #: src/bare-metal/aps/better-uart/using.md -msgid "\"Bye!\"" +msgid "\"\\n\\nBye!\"" msgstr "" #: src/bare-metal/aps/better-uart/using.md @@ -16673,7 +16972,7 @@ msgid "[oreboot](https://github.com/oreboot/oreboot)" msgstr "" #: src/bare-metal/aps/other-projects.md -msgid "\"coreboot without the C\"" +msgid "\"coreboot without the C\"." msgstr "" #: src/bare-metal/aps/other-projects.md @@ -16693,7 +16992,7 @@ msgstr "" #: src/bare-metal/aps/other-projects.md msgid "" "Initialisation, UART driver, simple bootloader, JTAG, exception levels, " -"exception handling, page tables" +"exception handling, page tables." msgstr "" #: src/bare-metal/aps/other-projects.md @@ -16915,9 +17214,9 @@ msgstr "vmbase" #: src/bare-metal/android/vmbase.md msgid "" "For VMs running under crosvm on aarch64, the [vmbase](https://android." -"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/" -"master/vmbase/) library provides a linker script and useful defaults for the " -"build rules, along with an entry point, UART console logging and more." +"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/" +"libs/libvmbase/) library provides a linker script and useful defaults for " +"the build rules, along with an entry point, UART console logging and more." msgstr "" #: src/bare-metal/android/vmbase.md @@ -16936,7 +17235,7 @@ msgstr "" msgid "We will write a driver for the PL031 real-time clock device." msgstr "" -#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md +#: src/exercises/bare-metal/afternoon.md msgid "" "After looking at the exercises, you can look at the [solutions](solutions-" "afternoon.md) provided." @@ -17062,15 +17361,15 @@ msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\n" +"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\n" " // addresses of a GICv3 distributor and redistributor respectively, and\n" " // nothing else accesses those address ranges.\n" msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\n" -" // and nothing else accesses that address range.\n" +"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\n" +" // nothing else accesses that address range.\n" msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md @@ -17157,8 +17456,8 @@ msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"// Safe because we know that self.registers points to the control\n" -" // registers of a PL031 device which is appropriately mapped.\n" +"// SAFETY: We know that self.registers points to the control registers\n" +" // of a PL031 device which is appropriately mapped.\n" msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md @@ -17195,235 +17494,264 @@ msgstr "" msgid "/// Clears a pending interrupt, if any.\n" msgstr "" -#: src/concurrency.md +#: src/exercises/bare-metal/solutions-afternoon.md +msgid "" +"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\n" +"// accessed from any context.\n" +msgstr "" + +#: src/concurrency/welcome.md msgid "Welcome to Concurrency in Rust" msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md msgid "" "Rust has full support for concurrency using OS threads with mutexes and " "channels." msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md msgid "" "The Rust type system plays an important role in making many concurrency bugs " "compile time bugs. This is often referred to as _fearless concurrency_ since " "you can rely on the compiler to ensure correctness at runtime." msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md src/concurrency/welcome-async.md +msgid "" +"Including 10 minute breaks, this session should take about 3 hours and 20 " +"minutes. It contains:" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 3 saat 20 dakika sürmelidir. " +"İçeriği:" + +#: src/concurrency/welcome.md msgid "" "Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc." msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md msgid "" "The type system gives us safety for concurrency without any special features." msgstr "" -#: src/concurrency.md +#: src/concurrency/welcome.md msgid "" "The same tools that help with \"concurrent\" access in a single thread (e." "g., a called function that might mutate an argument or save references to it " "to read later) save us from multi-threading issues." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads.md src/concurrency/shared-state.md +#: src/concurrency/async.md +msgid "This segment should take about 30 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 30 dakika sürmelidir. İçeriği:" + +#: src/concurrency/threads/plain.md msgid "Rust threads work similarly to threads in other languages:" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "\"Count in thread: {i}!\"" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "\"Main thread: {i}\"" msgstr "" -#: src/concurrency/threads.md -msgid "Threads are all daemon threads, the main thread does not wait for them." +#: src/concurrency/threads/plain.md +msgid "" +"Spawning new threads does not automatically delay program termination at the " +"end of `main`." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Thread panics are independent of each other." msgstr "" -#: src/concurrency/threads.md -msgid "Panics can carry a payload, which can be unpacked with `downcast_ref`." -msgstr "" - -#: src/concurrency/threads.md -msgid "Rust thread APIs look not too different from e.g. C++ ones." +#: src/concurrency/threads/plain.md +msgid "" +"Panics can carry a payload, which can be unpacked with [`Any::downcast_ref`]" +"(https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref)." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Run the example." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "5ms timing is loose enough that main and spawned threads stay mostly in " "lockstep." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Notice that the program ends before the spawned thread reaches 10!" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" -"This is because main ends the program and spawned threads do not make it " +"This is because `main` ends the program and spawned threads do not make it " "persist." msgstr "" -#: src/concurrency/threads.md -msgid "Compare to pthreads/C++ std::thread/boost::thread if desired." +#: src/concurrency/threads/plain.md +msgid "Compare to `pthreads`/C++ `std::thread`/`boost::thread` if desired." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "How do we wait around for the spawned thread to complete?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) " "returns a `JoinHandle`. Look at the docs." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct." "JoinHandle.html#method.join) method that blocks." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for " "the thread to finish and have the program count all the way to 10." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Now what if we want to return a value?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Look at docs again:" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s " "closure returns `T`" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct." "JoinHandle.html#method.join) returns `thread::Result`" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "Use the `Result` return value from `handle.join()` to get access to the " "returned value." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Ok, what about the other case?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Trigger a panic in the thread. Note that this doesn't panic `main`." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "Access the panic payload. This is a good time to talk about [`Any`](https://" "doc.rust-lang.org/std/any/index.html)." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Now we can return values from threads! What about taking inputs?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Capture something by reference in the thread closure." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "An error message indicates we must move it." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "Move it in, see we can compute and then return a derived value." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "If we want to borrow?" msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "" "Main kills child threads when it returns, but another function would just " "return and leave them running." msgstr "" -#: src/concurrency/threads.md +#: src/concurrency/threads/plain.md msgid "That would be stack use-after-return, which violates memory safety!" msgstr "" -#: src/concurrency/threads.md -msgid "How do we avoid this? see next slide." +#: src/concurrency/threads/plain.md +msgid "How do we avoid this? See next slide." msgstr "" -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "Normal threads cannot borrow from their environment:" msgstr "" -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "" "However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/" "fn.scope.html) for this:" msgstr "" -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "" "The reason for that is that when the `thread::scope` function completes, all " "the threads are guaranteed to be joined, so they can return borrowed data." msgstr "" -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads/scoped.md msgid "" "Normal Rust borrowing rules apply: you can either borrow mutably by one " "thread, or immutably by any number of threads." msgstr "" -#: src/concurrency/channels.md +#: src/concurrency/channels.md src/concurrency/async-control-flow.md +msgid "This segment should take about 20 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 20 dakika sürmelidir. İçeriği:" + +#: src/concurrency/channels/senders-receivers.md msgid "" -"Rust channels have two parts: a `Sender` and a `Receiver`. The two " -"parts are connected via the channel, but you only see the end-points." +"Rust channels have two parts: a [`Sender`](https://doc.rust-lang.org/std/" +"sync/mpsc/struct.Sender.html) and a [`Receiver`](https://doc.rust-lang." +"org/std/sync/mpsc/struct.Receiver.html). The two parts are connected via the " +"channel, but you only see the end-points." msgstr "" -#: src/concurrency/channels.md +#: src/concurrency/channels/senders-receivers.md msgid "\"Received: {:?}\"" msgstr "" -#: src/concurrency/channels.md +#: src/concurrency/channels/senders-receivers.md msgid "" -"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` " -"implement `Clone` (so you can make multiple producers) but `Receiver` does " -"not." +"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) stands for " +"Multi-Producer, Single-Consumer. `Sender` and `SyncSender` implement `Clone` " +"(so you can make multiple producers) but `Receiver` does not." msgstr "" -#: src/concurrency/channels.md +#: src/concurrency/channels/senders-receivers.md msgid "" -"`send()` and `recv()` return `Result`. If they return `Err`, it means the " +"[`send()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#method." +"send) and [`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver." +"html#method.recv) return `Result`. If they return `Err`, it means the " "counterpart `Sender` or `Receiver` is dropped and the channel is closed." msgstr "" #: src/concurrency/channels/unbounded.md -msgid "You get an unbounded and asynchronous channel with `mpsc::channel()`:" +msgid "" +"You get an unbounded and asynchronous channel with [`mpsc::channel()`]" +"(https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html):" msgstr "" #: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md @@ -17442,63 +17770,88 @@ msgstr "" msgid "\"Main: got {msg}\"" msgstr "" +#: src/concurrency/channels/unbounded.md +msgid "" +"An unbounded channel will allocate as much space as is necessary to store " +"pending messages. The `send()` method will not block the calling thread." +msgstr "" + +#: src/concurrency/channels/unbounded.md +msgid "" +"A call to `send()` will abort with an error (that is why it returns " +"`Result`) if the channel is closed. A channel is closed when the receiver is " +"dropped." +msgstr "" + #: src/concurrency/channels/bounded.md msgid "" -"With bounded (synchronous) channels, `send` can block the current thread:" +"With bounded (synchronous) channels, [`send()`](https://doc.rust-lang.org/" +"std/sync/mpsc/struct.SyncSender.html#method.send) can block the current " +"thread:" msgstr "" #: src/concurrency/channels/bounded.md msgid "" -"Calling `send` will block the current thread until there is space in the " +"Calling `send()` will block the current thread until there is space in the " "channel for the new message. The thread can be blocked indefinitely if there " "is nobody who reads from the channel." msgstr "" #: src/concurrency/channels/bounded.md msgid "" -"A call to `send` will abort with an error (that is why it returns `Result`) " -"if the channel is closed. A channel is closed when the receiver is dropped." +"Like unbounded channels, a call to `send()` will abort with an error if the " +"channel is closed." msgstr "" #: src/concurrency/channels/bounded.md msgid "" "A bounded channel with a size of zero is called a \"rendezvous channel\". " -"Every send will block the current thread until another thread calls `recv`." +"Every send will block the current thread until another thread calls " +"[`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver." +"html#method.recv)." msgstr "" #: src/concurrency/send-sync.md +msgid "Send" +msgstr "Send" + +#: src/concurrency/send-sync.md +msgid "Sync" +msgstr "Sync" + +#: src/concurrency/send-sync/marker-traits.md msgid "" "How does Rust know to forbid shared access across threads? The answer is in " "two traits:" msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "" "[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` " "is `Send` if it is safe to move a `T` across a thread boundary." msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "" "[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` " "is `Sync` if it is safe to move a `&T` across a thread boundary." msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "" -"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The " -"compiler will automatically derive them for your types as long as they only " -"contain `Send` and `Sync` types. You can also implement them manually when " -"you know it is valid." +"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). " +"The compiler will automatically derive them for your types as long as they " +"only contain `Send` and `Sync` types. You can also implement them manually " +"when you know it is valid." msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "" "One can think of these traits as markers that the type has certain thread-" "safety properties." msgstr "" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync/marker-traits.md msgid "They can be used in the generic constraints as normal traits." msgstr "" @@ -17621,13 +17974,15 @@ msgstr "" #: src/concurrency/send-sync/examples.md msgid "" -"These types are thread-safe, but they cannot be moved to another thread:" +"These types are safe to access (via shared references) from multiple " +"threads, but they cannot be moved to another thread:" msgstr "" #: src/concurrency/send-sync/examples.md msgid "" "`MutexGuard`: Uses OS level primitives which must be deallocated on " -"the thread which created them." +"the thread which created them. However, an already-locked mutex can have its " +"guarded variable read by any thread with which the guard is shared." msgstr "" #: src/concurrency/send-sync/examples.md @@ -17650,119 +18005,108 @@ msgid "" "considerations." msgstr "" -#: src/concurrency/shared_state.md -msgid "" -"Rust uses the type system to enforce synchronization of shared data. This is " -"primarily done via two types:" -msgstr "" - -#: src/concurrency/shared_state.md -msgid "" -"[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic " -"reference counted `T`: handles sharing between threads and takes care to " -"deallocate `T` when the last reference is dropped," -msgstr "" +#: src/concurrency/shared-state.md +msgid "Arc" +msgstr "Arc" -#: src/concurrency/shared_state.md -msgid "" -"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures " -"mutually exclusive access to the `T` value." -msgstr "" +#: src/concurrency/shared-state.md +msgid "Mutex" +msgstr "Mutex" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared " "read-only access via `Arc::clone`:" msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "\"{thread_id:?}: {v:?}\"" msgstr "" -#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md msgid "\"v: {v:?}\"" msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "`Arc` stands for \"Atomic Reference Counted\", a thread safe version of `Rc` " "that uses atomic operations." msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "`Arc` implements `Clone` whether or not `T` does. It implements `Send` " "and `Sync` if and only if `T` implements them both." msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "`Arc::clone()` has the cost of atomic operations that get executed, but " "after that the use of the `T` is free." msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "" "Beware of reference cycles, `Arc` does not use a garbage collector to detect " "them." msgstr "" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared-state/arc.md msgid "`std::sync::Weak` can help." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures " "mutual exclusion _and_ allows mutable access to `T` behind a read-only " "interface (another form of [interior mutability](../../borrowing/interior-" -"mutability)):" +"mutability.md)):" msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "\"v: {:?}\"" msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "Notice how we have a [`impl Sync for Mutex`](https://doc.rust-" "lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket " "implementation." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "`Mutex` in Rust looks like a collection with just one element --- the " "protected data." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "It is not possible to forget to acquire the mutex before accessing the " "protected data." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "You can get an `&mut T` from an `&Mutex` by taking the lock. The " "`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" -"`Mutex` implements both `Send` and `Sync` iff (if and only if) `T` " -"implements `Send`." +"`Mutex` implements both `Send` and `Sync` if and only if `T` implements " +"`Send`." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "A read-write lock counterpart: `RwLock`." msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "Why does `lock()` return a `Result`?" msgstr "" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared-state/mutex.md msgid "" "If the thread that held the `Mutex` panicked, the `Mutex` becomes " "\"poisoned\" to signal that the data it protected might be in an " @@ -17771,65 +18115,51 @@ msgid "" "You can call `into_inner()` on the error to recover the data regardless." msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "Let us see `Arc` and `Mutex` in action:" msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "// use std::sync::{Arc, Mutex};\n" msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "Possible solution:" msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "Notable parts:" msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "" "`v` is wrapped in both `Arc` and `Mutex`, because their concerns are " "orthogonal." msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "" "Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state " "between threads." msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "" "`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another " "thread. Note `move` was added to the lambda signature." msgstr "" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared-state/example.md msgid "" "Blocks are introduced to narrow the scope of the `LockGuard` as much as " "possible." msgstr "" -#: src/exercises/concurrency/morning.md -msgid "Let us practice our new concurrency skills with" -msgstr "" - -#: src/exercises/concurrency/morning.md -msgid "Dining philosophers: a classic problem in concurrency." -msgstr "" - -#: src/exercises/concurrency/morning.md -msgid "" -"Multi-threaded link checker: a larger project where you'll use Cargo to " -"download dependencies and then check links in parallel." -msgstr "" - -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "The dining philosophers problem is a classic problem in concurrency:" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "" "Five philosophers dine together at the same table. Each philosopher has " "their own place at the table. There is a fork between each plate. The dish " @@ -17841,102 +18171,101 @@ msgid "" "down both forks." msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "" "You will need a local [Cargo installation](../../cargo/running-locally.md) " "for this exercise. Copy the code below to a file called `src/main.rs`, fill " "out the blanks, and test that `cargo run` does not deadlock:" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "// left_fork: ...\n" " // right_fork: ...\n" " // thoughts: ...\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Eureka! {} has a new idea!\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "// Pick up forks...\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"{} is eating...\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Socrates\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Hypatia\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Plato\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Aristotle\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/sync-exercises/solutions.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Pythagoras\"" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "// Create forks\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "// Create philosophers\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "// Make each of them think and eat 100 times\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/sync-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "// Output their thoughts\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "You can use the following `Cargo.toml`:" msgstr "" -#: src/exercises/concurrency/dining-philosophers.md +#: src/concurrency/sync-exercises/dining-philosophers.md msgid "" "```toml\n" "[package]\n" @@ -17946,7 +18275,19 @@ msgid "" "```" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/dining-philosophers.md +msgid "" +"Encourage students to focus first on implementing a solution that \"mostly\" " +"works." +msgstr "" + +#: src/concurrency/sync-exercises/dining-philosophers.md +msgid "" +"The deadlock in the simplest solution is a general concurrency problem and " +"highlights that Rust does not automatically prevent this sort of bug." +msgstr "" + +#: src/concurrency/sync-exercises/link-checker.md msgid "" "Let us use our new knowledge to create a multi-threaded link checker. It " "should start at a webpage and check that links on the page are valid. It " @@ -17954,7 +18295,7 @@ msgid "" "until all pages have been validated." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/" "reqwest/). You will also need a way to find links, we can use [`scraper`]" @@ -17962,22 +18303,22 @@ msgid "" "we will use [`thiserror`](https://docs.rs/thiserror/)." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "Create a new Cargo project and `reqwest` it as a dependency with:" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "If `cargo add` fails with `error: no such subcommand`, then please edit the " "`Cargo.toml` file by hand. Add the dependencies listed below." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "The `cargo add` calls will update the `Cargo.toml` file to look like this:" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "```toml\n" "[package]\n" @@ -17994,130 +18335,122 @@ msgid "" "```" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "You can now download the start page. Try with a small site such as `https://" "www.google.org/`." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "Your `src/main.rs` file should look something like this:" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"request error: {0}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"bad http response: {0}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"Checking {:#}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"href\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"On {base_url:#}: ignored unparsable {href:?}: {err}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/link-checker.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"https://www.google.org\"" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "\"Links: {links:#?}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "\"Could not extract links: {err:#}\"" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "Run the code in `src/main.rs` with" msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "Use threads to check the links in parallel: send the URLs to be checked to a " "channel and let a few threads check the URLs in parallel." msgstr "" -#: src/exercises/concurrency/link-checker.md +#: src/concurrency/sync-exercises/link-checker.md msgid "" "Extend this to recursively extract links from all pages on the `www.google." "org` domain. Put an upper limit of 100 pages or so so that you don't end up " "being blocked by the site." msgstr "" -#: src/exercises/concurrency/solutions-morning.md -msgid "Concurrency Morning Exercise" -msgstr "" - -#: src/exercises/concurrency/solutions-morning.md -msgid "([back to exercise](dining-philosophers.md))" +#: src/concurrency/sync-exercises/link-checker.md +msgid "" +"This is a complex exercise and intended to give students an opportunity to " +"work on a larger project than others. A success condition for this exercise " +"is to get stuck on some \"real\" issue and work through it with the support " +"of other students or the instructor." msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"{} is trying to eat\"" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "" "// To avoid a deadlock, we have to break the symmetry\n" " // somewhere. This will swap the forks without deinitializing\n" " // either of them.\n" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"{thought}\"" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "Link Checker" msgstr "" -#: src/exercises/concurrency/solutions-morning.md -msgid "([back to exercise](link-checker.md))" -msgstr "" - -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "" "/// Determine whether links within the given page should be extracted.\n" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "" "/// Mark the given page as visited, returning false if it had already\n" " /// been visited.\n" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "// The sender got dropped. No more commands coming in.\n" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"Got crawling error: {:#}\"" msgstr "" -#: src/exercises/concurrency/solutions-morning.md +#: src/concurrency/sync-exercises/solutions.md msgid "\"Bad URLs: {:#?}\"" msgstr "" -#: src/async.md -msgid "Async Rust" -msgstr "" - -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "\"Async\" is a concurrency model where multiple tasks are executed " "concurrently by executing each task until it would block, then switching to " @@ -18127,88 +18460,84 @@ msgid "" "primitives for efficiently identifying I/O that is able to proceed." msgstr "" -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "Rust's asynchronous operation is based on \"futures\", which represent work " "that may be completed in the future. Futures are \"polled\" until they " "signal that they are complete." msgstr "" -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "Futures are polled by an async runtime, and several different runtimes are " "available." msgstr "" -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "Python has a similar model in its `asyncio`. However, its `Future` type is " "callback-based, and not polled. Async Python programs require a \"loop\", " "similar to a runtime in Rust." msgstr "" -#: src/async.md +#: src/concurrency/welcome-async.md msgid "" "JavaScript's `Promise` is similar, but again callback-based. The language " "runtime implements the event loop, so many of the details of Promise " "resolution are hidden." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async.md +msgid "async/await" +msgstr "async/await" + +#: src/concurrency/async/async-await.md msgid "" "At a high level, async Rust code looks very much like \"normal\" sequential " "code:" msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "\"Count is: {i}!\"" msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "Note that this is a simplified example to show the syntax. There is no long " "running operation or any real concurrency in it!" msgstr "" -#: src/async/async-await.md -msgid "What is the return type of an async call?" -msgstr "" - -#: src/async/async-await.md -msgid "Use `let future: () = async_main(10);` in `main` to see the type." -msgstr "" - -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "The \"async\" keyword is syntactic sugar. The compiler replaces the return " "type with a future." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "You cannot make `main` async, without additional instructions to the " "compiler on how to use the returned future." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "You need an executor to run async code. `block_on` blocks the current thread " "until the provided future has run to completion." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "`.await` asynchronously waits for the completion of another operation. " "Unlike `block_on`, `.await` doesn't block the current thread." msgstr "" -#: src/async/async-await.md +#: src/concurrency/async/async-await.md msgid "" "`.await` can only be used inside an `async` function (or block; these are " "introduced later)." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a " "trait, implemented by objects that represent an operation that may not be " @@ -18216,7 +18545,7 @@ msgid "" "doc.rust-lang.org/std/task/enum.Poll.html)." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "An async function returns an `impl Future`. It's also possible (but " "uncommon) to implement `Future` for your own types. For example, the " @@ -18224,76 +18553,76 @@ msgid "" "joining to it." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "The `.await` keyword, applied to a Future, causes the current async function " "to pause until that Future is ready, and then evaluates to its output." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "The `Future` and `Poll` types are implemented exactly as shown; click the " "links to show the implementations in the docs." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "We will not get to `Pin` and `Context`, as we will focus on writing async " "code, rather than building new async primitives. Briefly:" msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "`Context` allows a Future to schedule itself to be polled again when an " "event occurs." msgstr "" -#: src/async/futures.md +#: src/concurrency/async/futures.md msgid "" "`Pin` ensures that the Future isn't moved in memory, so that pointers into " "that future remain valid. This is required to allow references to remain " "valid after an `.await`." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "A _runtime_ provides support for performing operations asynchronously (a " "_reactor_) and is responsible for executing futures (an _executor_). Rust " "does not have a \"built-in\" runtime, but several options are available:" msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of " "functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://" "github.com/hyperium/tonic) for gRPC." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "[async-std](https://async.rs/): aims to be a \"std for async\", and includes " "a basic runtime in `async::task`." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "[smol](https://docs.rs/smol/latest/smol/): simple and lightweight" msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "Several larger applications have their own runtimes. For example, [Fuchsia]" "(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-" "async/src/lib.rs) already has one." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "Note that of the listed runtimes, only Tokio is supported in the Rust " "playground. The playground also does not permit any I/O, so most interesting " "async things can't run in the playground." msgstr "" -#: src/async/runtimes.md +#: src/concurrency/async/runtimes.md msgid "" "Futures are \"inert\" in that they do not do anything (not even start an I/O " "operation) unless there is an executor polling them. This differs from JS " @@ -18301,66 +18630,66 @@ msgid "" "used." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "Tokio provides:" msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "A multi-threaded runtime for executing asynchronous code." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "An asynchronous version of the standard library." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "A large ecosystem of libraries." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "\"Count in task: {i}!\"" msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "\"Main task: {i}\"" msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "With the `tokio::main` macro we can now make `main` async." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "The `spawn` function creates a new, concurrent \"task\"." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "**Further exploration:**" msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "" "Why does `count_to` not (usually) get to 10? This is an example of async " "cancellation. `tokio::spawn` returns a handle which can be awaited to wait " "until it finishes." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "Try `count_to(10).await` instead of spawning." msgstr "" -#: src/async/runtimes/tokio.md +#: src/concurrency/async/runtimes/tokio.md msgid "Try awaiting the task returned from `tokio::spawn`." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "Rust has a task system, which is a form of lightweight threading." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "A task has a single top-level future which the executor polls to make " "progress. That future may have one or more nested futures that its `poll` " @@ -18369,170 +18698,155 @@ msgid "" "and an I/O operation." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"127.0.0.1:0\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"listening on port {}\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"connection from {addr:?}\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "b\"Who are you?\\n\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"socket error\"" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "\"Thanks for dialing in, {name}!\\n\"" msgstr "" -#: src/async/tasks.md src/async/control-flow/join.md +#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md msgid "" "Copy this example into your prepared `src/main.rs` and run it from there." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "Try connecting to it with a TCP connection tool like [nc](https://www.unix." "com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/" "telnet/)." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "Ask students to visualize what the state of the example server would be with " "a few connected clients. What tasks exist? What are their Futures?" msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "This is the first time we've seen an `async` block. This is similar to a " "closure, but does not take any arguments. Its return value is a Future, " "similar to an `async fn`." msgstr "" -#: src/async/tasks.md +#: src/concurrency/async/tasks.md msgid "" "Refactor the async block into a function, and improve the error handling " "using `?`." msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "" "Several crates have support for asynchronous channels. For instance `tokio`:" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"Received {count} pings so far.\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"ping_handler complete\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"Failed to send ping.\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"Sent {} pings so far.\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "\"Something went wrong in ping handler task.\"" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "Change the channel size to `3` and see how it affects the execution." msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "" "Overall, the interface is similar to the `sync` channels as seen in the " -"[morning class](concurrency/channels.md)." +"[morning class](../channels.md)." msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "Try removing the `std::mem::drop` call. What happens? Why?" msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "" "The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that " "implement both `sync` and `async` `send` and `recv`. This can be convenient " "for complex applications with both IO and heavy CPU processing tasks." msgstr "" -#: src/async/channels.md +#: src/concurrency/async-control-flow/channels.md msgid "" "What makes working with `async` channels preferable is the ability to " "combine them with other `future`s to combine them and create complex control " "flow." msgstr "" -#: src/async/control-flow.md -msgid "Futures Control Flow" -msgstr "" - -#: src/async/control-flow.md -msgid "" -"Futures can be combined together to produce concurrent compute flow graphs. " -"We have already seen tasks, that function as independent threads of " -"execution." -msgstr "" - -#: src/async/control-flow.md -msgid "[Join](control-flow/join.md)" -msgstr "" - -#: src/async/control-flow.md -msgid "[Select](control-flow/select.md)" -msgstr "" - -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "" "A join operation waits until all of a set of futures are ready, and returns " "a collection of their results. This is similar to `Promise.all` in " "JavaScript or `asyncio.gather` in Python." msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "\"https://google.com\"" msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "\"https://httpbin.org/ip\"" msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "\"https://play.rust-lang.org/\"" msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "\"BAD_URL\"" msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md +msgid "\"{page_sizes_dict:?}\"" +msgstr "" + +#: src/concurrency/async-control-flow/join.md msgid "" "For multiple futures of disjoint types, you can use `std::future::join!` but " "you must know how many futures you will have at compile time. This is " "currently in the `futures` crate, soon to be stabilised in `std::future`." msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "" "The risk of `join` is that one of the futures may never resolve, this would " "cause your program to stall." msgstr "" -#: src/async/control-flow/join.md +#: src/concurrency/async-control-flow/join.md msgid "" "You can also combine `join_all` with `join!` for instance to join all " "requests to an http service as well as a database query. Try adding a " @@ -18541,7 +18855,7 @@ msgid "" "demonstrates `join!`." msgstr "" -#: src/async/control-flow/select.md +#: src/concurrency/async-control-flow/select.md msgid "" "A select operation waits until any of a set of futures is ready, and " "responds to that future's result. In JavaScript, this is similar to `Promise." @@ -18549,7 +18863,7 @@ msgid "" "FIRST_COMPLETED)`." msgstr "" -#: src/async/control-flow/select.md +#: src/concurrency/async-control-flow/select.md msgid "" "Similar to a match statement, the body of `select!` has a number of arms, " "each of the form `pattern = future => statement`. When a `future` is ready, " @@ -18558,91 +18872,53 @@ msgid "" "of the `select!` macro." msgstr "" -#: src/async/control-flow/select.md -msgid "\"Felix\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Failed to send cat.\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Failed to send dog.\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Failed to receive winner\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Winner is {winner:?}\"" +#: src/concurrency/async-control-flow/select.md +msgid "\"got: {msg}\"" msgstr "" -#: src/async/control-flow/select.md -msgid "" -"In this example, we have a race between a cat and a dog. " -"`first_animal_to_finish_race` listens to both channels and will pick " -"whichever arrives first. Since the dog takes 50ms, it wins against the cat " -"that take 500ms." +#: src/concurrency/async-control-flow/select.md +msgid "\"timeout\"" msgstr "" -#: src/async/control-flow/select.md -msgid "" -"You can use `oneshot` channels in this example as the channels are supposed " -"to receive only one `send`." +#: src/concurrency/async-control-flow/select.md +msgid "\"Failed to send greeting\"" msgstr "" -#: src/async/control-flow/select.md -msgid "" -"Try adding a deadline to the race, demonstrating selecting different sorts " -"of futures." +#: src/concurrency/async-control-flow/select.md +msgid "\"Listener failed\"" msgstr "" -#: src/async/control-flow/select.md +#: src/concurrency/async-control-flow/select.md msgid "" -"Note that `select!` drops unmatched branches, which cancels their futures. " -"It is easiest to use when every execution of `select!` creates new futures." +"The `listener` async block here is a common form: wait for some async event, " +"or for a timeout. Change the `sleep` to sleep longer to see it fail. Why " +"does the `send` also fail in this situation?" msgstr "" -#: src/async/control-flow/select.md +#: src/concurrency/async-control-flow/select.md msgid "" -"An alternative is to pass `&mut future` instead of the future itself, but " -"this can lead to issues, further discussed in the pinning slide." +"`select!` is also often used in a loop in \"actor\" architectures, where a " +"task reacts to events in a loop. That has some pitfalls, which will be " +"discussed in the next segment." msgstr "" -#: src/async/pitfalls.md -msgid "Pitfalls of async/await" -msgstr "" - -#: src/async/pitfalls.md +#: src/concurrency/async-pitfalls.md msgid "" "Async / await provides convenient and efficient abstraction for concurrent " "asynchronous programming. However, the async/await model in Rust also comes " "with its share of pitfalls and footguns. We illustrate some of them in this " -"chapter:" -msgstr "" - -#: src/async/pitfalls.md -msgid "[Blocking the Executor](pitfalls/blocking-executor.md)" -msgstr "" - -#: src/async/pitfalls.md -msgid "[Pin](pitfalls/pin.md)" -msgstr "" - -#: src/async/pitfalls.md -msgid "[Async Traits](pitfalls/async-traits.md)" +"chapter." msgstr "" -#: src/async/pitfalls.md -msgid "[Cancellation](pitfalls/cancellation.md)" -msgstr "" +#: src/concurrency/async-pitfalls.md +msgid "Pin" +msgstr "Pin" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "Blocking the executor" msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Most async runtimes only allow IO tasks to run concurrently. This means that " "CPU blocking tasks will block the executor and prevent other tasks from " @@ -18650,39 +18926,39 @@ msgid "" "possible." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "\"future {id} slept for {duration_ms}ms, finished after {}ms\"" msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "\"current_thread\"" msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Run the code and see that the sleeps happen consecutively rather than " "concurrently." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "The `\"current_thread\"` flavor puts all tasks on a single thread. This " "makes the effect more obvious, but the bug is still present in the multi-" "threaded flavor." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Another fix would be to `tokio::task::spawn_blocking` which spawns an actual " "thread and transforms its handle into a future without blocking the executor." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "You should not think of tasks as OS threads. They do not map 1 to 1 and most " "executors will allow many tasks to run on a single OS thread. This is " @@ -18692,27 +18968,27 @@ msgid "" "situations." msgstr "" -#: src/async/pitfalls/blocking-executor.md +#: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Use sync mutexes with care. Holding a mutex over an `.await` may cause " "another task to block, and that task may be running on the same thread." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Async blocks and functions return types implementing the `Future` trait. The " "type returned is the result of a compiler transformation which turns local " "variables into data stored inside the future." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Some of those variables can hold pointers to other local variables. Because " "of that, the future should never be moved to a different memory location, as " "it would invalidate those pointers." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "To prevent moving the future type in memory, it can only be polled through a " "pinned pointer. `Pin` is a wrapper around a reference that disallows all " @@ -18720,95 +18996,95 @@ msgid "" "location." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "// A work item. In this case, just sleep for the given time and respond\n" "// with a message on the `respond_on` channel.\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "// A worker which listens for work on a queue and performs it.\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "// Pretend to work.\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "\"failed to send response\"" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "// TODO: report number of iterations every 100ms\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "// A requester which requests work and waits for it to complete.\n" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "\"failed to send on work queue\"" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "\"failed waiting for response\"" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "\"work result for iteration {i}: {resp}\"" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "You may recognize this as an example of the actor pattern. Actors typically " "call `select!` in a loop." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "This serves as a summation of a few of the previous lessons, so take your " "time with it." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to " "the `select!`. This will never execute. Why?" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Instead, add a `timeout_fut` containing that future outside of the `loop`:" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "This still doesn't work. Follow the compiler errors, adding `&mut` to the " "`timeout_fut` in the `select!` to work around the move, then using `Box::" "pin`:" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "This compiles, but once the timeout expires it is `Poll::Ready` on every " "iteration (a fused future would help with this). Update to reset " -"`timeout_fut` every time it expires." +"`timeout_fut` every time it expires:" msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Box allocates on the heap. In some cases, `std::pin::pin!` (only recently " "stabilized, with older code often using `tokio::pin!`) is also an option, " "but that is difficult to use for a future that is reassigned." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Another alternative is to not use `pin` at all but spawn another task that " "will send to a `oneshot` channel every 100ms." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "Data that contains pointers to itself is called self-referential. Normally, " "the Rust borrow checker would prevent self-referential data from being " @@ -18817,83 +19093,94 @@ msgid "" "borrow checker." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "`Pin` is a wrapper around a reference. An object cannot be moved from its " "place using a pinned pointer. However, it can still be moved through an " "unpinned pointer." msgstr "" -#: src/async/pitfalls/pin.md +#: src/concurrency/async-pitfalls/pin.md msgid "" "The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of " "`&mut Self` to refer to the instance. That's why it can only be called on a " "pinned pointer." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Async methods in traits are were stabilized only recently, in the 1.75 " -"release. This required support for using return-position `impl Trait` (RPIT) " -"in traits, as the desugaring for `async fn` includes `-> impl Future`." +"Async methods in traits are were stabilized in the 1.75 release. This " +"required support for using return-position `impl Trait` in traits, as the " +"desugaring for `async fn` includes `-> impl Future`." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"However, even with the native support today there are some pitfalls around " -"`async fn` and RPIT in traits:" +"However, even with the native support, there are some pitfalls around `async " +"fn`:" msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Return-position impl Trait captures all in-scope lifetimes (so some patterns " -"of borrowing cannot be expressed)" +"Return-position `impl Trait` captures all in-scope lifetimes (so some " +"patterns of borrowing cannot be expressed)." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Traits whose methods use return-position `impl trait` or `async` are not " -"`dyn` compatible." +"Async traits cannot be used with [trait objects](../../smart-pointers/trait-" +"objects.md) (`dyn Trait` support)." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-" -"trait/latest/async_trait/) provides a workaround through a macro, with some " -"caveats:" +"The [async_trait](https://docs.rs/async-trait/) crate provides a workaround " +"for `dyn` support through a macro, with some caveats:" msgstr "" -#: src/async/pitfalls/async-traits.md -msgid "\"running all sleepers..\"" +#: src/concurrency/async-pitfalls/async-traits.md +msgid "\"Running all sleepers...\"" msgstr "" -#: src/async/pitfalls/async-traits.md -msgid "\"slept for {}ms\"" +#: src/concurrency/async-pitfalls/async-traits.md +msgid "\"Slept for {} ms\"" msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md msgid "" "`async_trait` is easy to use, but note that it's using heap allocations to " "achieve this. This heap allocation has performance overhead." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md +msgid "" +"The challenges in language support for `async trait` are too deep to " +"describe in-depth in this class. See [this blog post](https://" +"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-" +"hard/) by Niko Matsakis if you are interested in digging deeper. See also " +"these keywords:" +msgstr "" + +#: src/concurrency/async-pitfalls/async-traits.md msgid "" -"The challenges in language support for `async trait` are deep Rust and " -"probably not worth describing in-depth. Niko Matsakis did a good job of " -"explaining them in [this post](https://smallcultfollowing.com/babysteps/" -"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in " -"digging deeper." +"[RPIT](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-" +"return-types): short for [return-position `impl Trait`](../../generics/impl-" +"trait.md)." msgstr "" -#: src/async/pitfalls/async-traits.md +#: src/concurrency/async-pitfalls/async-traits.md +msgid "" +"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits." +"html): short for return-position `impl Trait` in trait (RPIT in trait)." +msgstr "" + +#: src/concurrency/async-pitfalls/async-traits.md msgid "" "Try creating a new sleeper struct that will sleep for a random amount of " -"time and adding it to the Vec." +"time and adding it to the `Vec`." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "Dropping a future implies it can never be polled again. This is called " "_cancellation_ and it can occur at any `await` point. Care is needed to " @@ -18901,123 +19188,105 @@ msgid "" "example, it shouldn't deadlock or lose data." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "\"not UTF-8\"" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "\"hi\\nthere\\n\"" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "\"tick!\"" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "The compiler doesn't help with cancellation-safety. You need to read API " "documentation and consider what state your `async fn` holds." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "Unlike `panic` and `?`, cancellation is part of normal control flow (vs " "error-handling)." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "The example loses parts of the string." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "Whenever the `tick()` branch finishes first, `next()` and its `buf` are " "dropped." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "`LinesReader` can be made cancellation-safe by making `buf` part of the " "struct:" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "// prefix buf and bytes with self.\n" msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval." "html#method.tick) is cancellation-safe because it keeps track of whether a " "tick has been 'delivered'." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait." "AsyncReadExt.html#method.read) is cancellation-safe because it either " "returns or doesn't read data." msgstr "" -#: src/async/pitfalls/cancellation.md +#: src/concurrency/async-pitfalls/cancellation.md msgid "" "[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait." "AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ " "cancellation-safe. See its documentation for details and alternatives." msgstr "" -#: src/exercises/concurrency/afternoon.md -msgid "" -"To practice your Async Rust skills, we have again two exercises for you:" -msgstr "" - -#: src/exercises/concurrency/afternoon.md -msgid "" -"Dining philosophers: we already saw this problem in the morning. This time " -"you are going to implement it with Async Rust." -msgstr "" - -#: src/exercises/concurrency/afternoon.md -msgid "" -"A Broadcast Chat Application: this is a larger project that allows you " -"experiment with more advanced Async Rust features." -msgstr "" - -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "Dining Philosophers --- Async" msgstr "Filozofların Akşam Yemeği --- Async" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" -"See [dining philosophers](dining-philosophers.md) for a description of the " -"problem." +"See [dining philosophers](../sync-exercises/dining-philosophers.md) for a " +"description of the problem." msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "As before, you will need a local [Cargo installation](../../cargo/running-" "locally.md) for this exercise. Copy the code below to a file called `src/" "main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "// Keep trying until we have both forks\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/dining-philosophers.md +#: src/concurrency/async-exercises/solutions.md msgid "// Make them think and eat\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "Since this time you are using Async Rust, you'll need a `tokio` dependency. " "You can use the following `Cargo.toml`:" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "```toml\n" "[package]\n" @@ -19031,17 +19300,17 @@ msgid "" "```" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "" "Also note that this time you have to use the `Mutex` and the `mpsc` module " "from the `tokio` crate." msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/concurrency/async-exercises/dining-philosophers.md msgid "Can you make your implementation single-threaded?" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "In this exercise, we want to use our new knowledge to implement a broadcast " "chat application. We have a chat server that the clients connect to and " @@ -19050,7 +19319,7 @@ msgid "" "that it receives to all the clients." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/" "sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]" @@ -19058,15 +19327,15 @@ msgid "" "and the server." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Create a new Cargo project and add the following dependencies:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "_Cargo.toml_:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "```toml\n" "[package]\n" @@ -19075,57 +19344,57 @@ msgid "" "edition = \"2021\"\n" "\n" "[dependencies]\n" -"futures-util = { version = \"0.3.30\", features = [\"sink\"] }\n" +"futures-util = { version = \"0.3.31\", features = [\"sink\"] }\n" "http = \"1.1.0\"\n" -"tokio = { version = \"1.37.0\", features = [\"full\"] }\n" -"tokio-websockets = { version = \"0.7.0\", features = [\"client\", " +"tokio = { version = \"1.41.1\", features = [\"full\"] }\n" +"tokio-websockets = { version = \"0.10.1\", features = [\"client\", " "\"fastrand\", \"server\", \"sha1_smol\"] }\n" "```" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "The required APIs" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "You are going to need the following functions from `tokio` and " "[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes " "to familiarize yourself with the API." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/" "trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for " "asynchronously reading messages from a Websocket Stream." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/" "trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for " "asynchronously sending messages on a Websocket Stream." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines." "html#method.next_line): for asynchronously reading user messages from the " "standard input." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/" "struct.Sender.html#method.subscribe): for subscribing to a broadcast channel." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Two binaries" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Normally in a Cargo project, you can have only one binary, and one `src/main." "rs` file. In this project, we need two binaries. One for the client, and one " @@ -19136,80 +19405,80 @@ msgid "" "targets.html#binaries))." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Copy the following server and client code into `src/bin/server.rs` and `src/" "bin/client.rs`, respectively. Your task is to complete these files as " "described below." msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "_src/bin/server.rs_:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "// TODO: For a hint, see the description of the task below.\n" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "\"127.0.0.1:2000\"" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "\"listening on port 2000\"" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "\"New connection from {addr:?}\"" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "// Wrap the raw TCP stream into a websocket.\n" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "_src/bin/client.rs_:" msgstr "" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/chat-app.md +#: src/concurrency/async-exercises/solutions.md msgid "\"ws://127.0.0.1:2000\"" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Running the binaries" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Run the server with:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "and the client with:" msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Implement the `handle_connection` function in `src/bin/server.rs`." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Hint: Use `tokio::select!` for concurrently performing two tasks in a " "continuous loop. One task receives messages from the client and broadcasts " "them. The other sends messages received by the server to the client." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "Complete the main function in `src/bin/client.rs`." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Hint: As before, use `tokio::select!` in a continuous loop for concurrently " "performing two tasks: (1) reading user messages from standard input and " @@ -19217,68 +19486,50 @@ msgid "" "displaying them for the user." msgstr "" -#: src/exercises/concurrency/chat-app.md +#: src/concurrency/async-exercises/chat-app.md msgid "" "Optional: Once you are done, change the code to broadcast messages to all " "clients, but the sender of the message." msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md -msgid "Concurrency Afternoon Exercise" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md -msgid "([back to exercise](dining-philosophers-async.md))" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "" -"// If we didn't get the left fork, drop the right fork if we\n" -" // have it and let other tasks make progress.\n" +"// Keep trying until we have both forks\n" +" // Pick up forks...\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md -msgid "" -"// If we didn't get the right fork, drop the left fork and let\n" -" // other tasks make progress.\n" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "// The locks are dropped here\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "// tx is dropped here, so we don't need to explicitly drop it later\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Here is a thought: {thought}\"" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md -msgid "([back to exercise](chat-app.md))" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "\"Welcome to chat! Type a message\"" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "" "// A continuous loop for concurrently performing two tasks: (1) receiving\n" " // messages from `ws_stream` and broadcasting them, and (2) receiving\n" " // messages on `bcast_rx` and sending them to the client.\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "\"From client {addr:?} {text:?}\"" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "// Continuous loop for concurrently sending and receiving messages.\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/concurrency/async-exercises/solutions.md msgid "\"From server: {}\"" msgstr "" @@ -19296,6 +19547,14 @@ msgid "" "comprehensive-rust/discussions). We would love to hear from you." msgstr "" +#: src/thanks.md +msgid "" +"Thank you for reading the speaker notes! We hope they have been useful. If " +"you find pages without notes, please send us a PR and link it to [issue " +"#1083](https://github.com/google/comprehensive-rust/issues/1083). We are " +"also very grateful for fixes and improvements to the existing notes." +msgstr "" + #: src/glossary.md msgid "" "The following is a glossary which aims to give a short definition of many " @@ -19303,10 +19562,11 @@ msgid "" "the English original." msgstr "" +#. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting. #: src/glossary.md msgid "" "allocate: \n" -"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md)." +"Dynamic memory allocation on [the heap](memory-management/review.md)." msgstr "" #: src/glossary.md @@ -19315,6 +19575,13 @@ msgid "" "Information that is passed into a function or method." msgstr "" +#: src/glossary.md +msgid "" +"associated type: \n" +"A type associated with a specific trait. Useful for defining the " +"relationship between types." +msgstr "" + #: src/glossary.md msgid "" "Bare-metal Rust: \n" @@ -19325,13 +19592,13 @@ msgstr "" #: src/glossary.md msgid "" "block: \n" -"See [Blocks](control-flow/blocks.md) and _scope_." +"See [Blocks](control-flow-basics/blocks-and-scopes.md) and _scope_." msgstr "" #: src/glossary.md msgid "" "borrow: \n" -"See [Borrowing](ownership/borrowing.md)." +"See [Borrowing](borrowing/shared.md)." msgstr "" #: src/glossary.md @@ -19380,7 +19647,7 @@ msgstr "" #: src/glossary.md msgid "" "Concurrency in Rust: \n" -"See [Concurrency in Rust](concurrency.md)." +"See [Concurrency in Rust](concurrency/welcome.md)." msgstr "" #: src/glossary.md @@ -19648,8 +19915,8 @@ msgstr "" #: src/glossary.md msgid "" "string: \n" -"A data type storing textual data. See [`String` vs `str`](basic-syntax/" -"string-slices.html) for more." +"A data type storing textual data. See [Strings](references/strings.html) for " +"more." msgstr "" #: src/glossary.md @@ -19744,7 +20011,7 @@ msgstr "" msgid "" "unsafe: \n" "The subset of Rust which allows you to trigger _undefined behavior_. See " -"[Unsafe Rust](unsafe.html)." +"[Unsafe Rust](unsafe-rust/unsafe.md)." msgstr "" #: src/glossary.md @@ -19839,9 +20106,9 @@ msgstr "" #: src/other-resources.md msgid "" -"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/" -"rust_for_c/): covers Rust from the perspective of developers who write " -"firmware in C." +"[Rust for Embedded C Programmers](https://opentitan.org/book/doc/" +"rust_for_c_devs.html): covers Rust from the perspective of developers who " +"write firmware in C." msgstr "" #: src/other-resources.md @@ -19865,6 +20132,14 @@ msgid "" "and async/await are also covered." msgstr "" +#: src/other-resources.md +msgid "" +"[Advanced testing for Rust applications](https://rust-exercises.com/advanced-" +"testing/): a self-paced workshop that goes beyond Rust's built-in testing " +"framework. It covers `googletest`, snapshot testing, mocking as well as how " +"to write your own custom test harness." +msgstr "" + #: src/other-resources.md msgid "" "[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-" @@ -19935,6 +20210,418 @@ msgid "" "directory for details, including the license terms." msgstr "" +#~ msgid "Slices: `&[T]`" +#~ msgstr "Dilimler: `&[T]`" + +#~ msgid "`thiserror` and `anyhow`" +#~ msgstr "`thiserror` ve `anyhow`" + +#~ msgid "Control Flow" +#~ msgstr "Kontrol Akışı" + +#~ msgid "[Welcome](../welcome-day-1.md) (5 minutes)" +#~ msgstr "[Hoş Geldiniz](../welcome-day-1.md) (5 dakika)" + +#~ msgid "[Hello, World](../hello-world.md) (15 minutes)" +#~ msgstr "[Merhaba, Dünya](../hello-world.md) (15 dakika)" + +#~ msgid "[Types and Values](../types-and-values.md) (40 minutes)" +#~ msgstr "[Türler ve Değerler](../types-and-values.md) (40 dakika)" + +#~ msgid "[Control Flow Basics](../control-flow-basics.md) (40 minutes)" +#~ msgstr "[Kontrol Akışı Temelleri](../control-flow-basics.md) (40 dakika)" + +#~ msgid "[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)" +#~ msgstr "[Demetler ve Diziler](../tuples-and-arrays.md) (35 dakika)" + +#~ msgid "[References](../references.md) (55 minutes)" +#~ msgstr "[Referanslar](../references.md) (55 dakika)" + +#~ msgid "[User-Defined Types](../user-defined-types.md) (50 minutes)" +#~ msgstr "[Kullanıcı Tanımlı Türler](../user-defined-types.md) (50 dakika)" + +#~ msgid "[Welcome](../welcome-day-2.md) (3 minutes)" +#~ msgstr "[Hoş Geldiniz](../welcome-day-2.md) (3 dakika)" + +#~ msgid "[Pattern Matching](../pattern-matching.md) (1 hour)" +#~ msgstr "[Desen Eşleştirme](../pattern-matching.md) (1 saat)" + +#~ msgid "[Methods and Traits](../methods-and-traits.md) (50 minutes)" +#~ msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" + +#~ msgid "Day 2 Afternoon (4 hours, including breaks)" +#~ msgstr "2. Gün Öğleden Sonra (4 saat, aralar dahil)" + +#~ msgid "[Generics](../generics.md) (40 minutes)" +#~ msgstr "[Jenerikler](../generics.md) (40 dakika)" + +#~ msgid "[Standard Library Types](../std-types.md) (1 hour and 20 minutes)" +#~ msgstr "[Standart Kütüphanedeki Türler](../std-types.md) (1 saat 20 dakika)" + +#~ msgid "[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)" +#~ msgstr "" +#~ "[Standart Kütüphanedeki Özellikler](../std-traits.md) (1 saat 40 dakika)" + +#~ msgid "[Welcome](../welcome-day-3.md) (3 minutes)" +#~ msgstr "[Hoş Geldiniz](../welcome-day-3.md) (3 dakika)" + +#~ msgid "[Memory Management](../memory-management.md) (1 hour)" +#~ msgstr "[Bellek Yönetimi](../memory-management.md) (1 saat)" + +#~ msgid "[Smart Pointers](../smart-pointers.md) (55 minutes)" +#~ msgstr "[Akıllı Göstericiler](../smart-pointers.md) (55 dakika)" + +#~ msgid "[Borrowing](../borrowing.md) (55 minutes)" +#~ msgstr "[Ödünç Alma](../borrowing.md) (55 dakika)" + +#~ msgid "[Lifetimes](../lifetimes.md) (50 minutes)" +#~ msgstr "[Ömürler](../lifetimes.md) (50 dakika)" + +#~ msgid "[Welcome](../welcome-day-4.md) (3 minutes)" +#~ msgstr "[Hoş Geldiniz](../welcome-day-4.md) (3 dakika)" + +#~ msgid "[Iterators](../iterators.md) (45 minutes)" +#~ msgstr "[Adımlayıcılar](../iterators.md) (45 dakika)" + +#~ msgid "[Modules](../modules.md) (40 minutes)" +#~ msgstr "[Modüller](../modules.md) (40 dakika)" + +#~ msgid "[Testing](../testing.md) (45 minutes)" +#~ msgstr "[Test Etme](../testing.md) (45 dakika)" + +#~ msgid "[Error Handling](../error-handling.md) (55 minutes)" +#~ msgstr "[Hata İşleme](../error-handling.md) (55 dakika)" + +#~ msgid "[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)" +#~ msgstr "[Emniyetsiz Rust](../unsafe-rust.md) (1 saat 5 dakika)" + +#~ msgid "Arrow-Left" +#~ msgstr "Yön Oku-Sol" + +#~ msgid "Arrow-Right" +#~ msgstr "Yön Oku-Sağ" + +#~ msgid "Ctrl + Enter" +#~ msgstr "Ctrl + Enter" + +#~ msgid "s" +#~ msgstr "s" + +#~ msgid "You can use " +#~ msgstr "Odak metin kutusundayken kodu yürütmek için " + +#~ msgid "In this session:" +#~ msgstr "Bu oturumda:" + +#~ msgid "[Welcome](./welcome-day-1.md) (5 minutes)" +#~ msgstr "[Hoş Geldiniz](./welcome-day-1.md) (5 dakika)" + +#~ msgid "[Hello, World](./hello-world.md) (15 minutes)" +#~ msgstr "[Merhaba, Dünya](./hello-world.md) (15 dakika)" + +#~ msgid "[Types and Values](./types-and-values.md) (40 minutes)" +#~ msgstr "[Türler ve Değerler](./types-and-values.md) (40 dakika)" + +#~ msgid "[Control Flow Basics](./control-flow-basics.md) (40 minutes)" +#~ msgstr "[Kontrol Akışı Temelleri](./control-flow-basics.md) (40 dakika)" + +#~ msgid "In this segment:" +#~ msgstr "Bu bölümde:" + +#~ msgid "[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)" +#~ msgstr "[Rust Nedir?](./hello-world/what-is-rust.md) (10 dakika)" + +#~ msgid "[Benefits of Rust](./hello-world/benefits.md) (3 minutes)" +#~ msgstr "[Rust'ın Faydaları](./hello-world/benefits.md) (3 dakika)" + +#~ msgid "[Playground](./hello-world/playground.md) (2 minutes)" +#~ msgstr "[Deneme Alanı](./hello-world/playground.md) (2 dakika)" + +#~ msgid "[Hello, World](./types-and-values/hello-world.md) (5 minutes)" +#~ msgstr "[Merhaba, Dünya](./types-and-values/hello-world.md) (5 dakika)" + +#~ msgid "[Variables](./types-and-values/variables.md) (5 minutes)" +#~ msgstr "[Değişkenler](./types-and-values/variables.md) (5 dakika)" + +#~ msgid "[Values](./types-and-values/values.md) (5 minutes)" +#~ msgstr "[Değerler](./types-and-values/values.md) (5 dakika)" + +#~ msgid "[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)" +#~ msgstr "[Aritmetik](./types-and-values/arithmetic.md) (3 dakika)" + +#~ msgid "[Type Inference](./types-and-values/inference.md) (3 minutes)" +#~ msgstr "[Tür Çıkarımı](./types-and-values/inference.md) (3 dakika)" + +#~ msgid "[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)" +#~ msgstr "[Alıştırma: Fibonacci](./types-and-values/exercise.md) (15 dakika)" + +#~ msgid "[if Expressions](./control-flow-basics/if.md) (4 minutes)" +#~ msgstr "[if İfadeleri](./control-flow-basics/if.md) (4 dakika)" + +#~ msgid "[Loops](./control-flow-basics/loops.md) (5 minutes)" +#~ msgstr "[Döngüler](./control-flow-basics/loops.md) (5 dakika)" + +#~ msgid "" +#~ "[break and continue](./control-flow-basics/break-continue.md) (4 minutes)" +#~ msgstr "" +#~ "[break ve continue](./control-flow-basics/break-continue.md) (4 dakika)" + +#~ msgid "[Functions](./control-flow-basics/functions.md) (3 minutes)" +#~ msgstr "[Fonksiyonlar](./control-flow-basics/functions.md) (3 dakika)" + +#~ msgid "[Macros](./control-flow-basics/macros.md) (2 minutes)" +#~ msgstr "[Makrolar](./control-flow-basics/macros.md) (2 dakika)" + +#~ msgid "" +#~ "[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 " +#~ "minutes)" +#~ msgstr "" +#~ "[Alıştırma: Collatz Sekansı](./control-flow-basics/exercise.md) (15 " +#~ "dakika)" + +#~ msgid "1" +#~ msgstr "1" + +#~ msgid " greater than zero:" +#~ msgstr " sıfırdan büyük sayısı için:" + +#~ msgid "If _n" +#~ msgstr "If _n" + +#~ msgid "i" +#~ msgstr "i" + +#~ msgid "_." +#~ msgstr "_." + +#~ msgid "_ is even, then _n" +#~ msgstr "_ çifttir, o zaman _n" + +#~ msgid "i+1" +#~ msgstr "i+1" + +#~ msgid " = n" +#~ msgstr " = n" + +#~ msgid " / 2_." +#~ msgstr " / 2_." + +#~ msgid "_ is odd, then _n" +#~ msgstr "_ tektir, o zaman _n" + +#~ msgid " = 3 * n" +#~ msgstr " = 3 * n" + +#~ msgid " + 1_." +#~ msgstr " + 1_." + +#~ msgid "_ = 3:" +#~ msgstr "_ = 3:" + +#~ msgid "3 is odd, so _n" +#~ msgstr "3 tektir, yani _n" + +#~ msgid "2" +#~ msgstr "2" + +#~ msgid "_ = 3 * 3 + 1 = 10;" +#~ msgstr "_ = 3 * 3 + 1 = 10;" + +#~ msgid "10 is even, so _n" +#~ msgstr "10 çifttir, yani _n" + +#~ msgid "_ = 10 / 2 = 5;" +#~ msgstr "_ = 10 / 2 = 5;" + +#~ msgid "5 is odd, so _n" +#~ msgstr "5 tektir, yani _n" + +#~ msgid "_ = 3 * 5 + 1 = 16;" +#~ msgstr "_ = 3 * 5 + 1 = 16;" + +#~ msgid "16 is even, so _n" +#~ msgstr "16 çifttir, yani _n" + +#~ msgid "5" +#~ msgstr "5" + +#~ msgid "_ = 16 / 2 = 8;" +#~ msgstr "_ = 16 / 2 = 8;" + +#~ msgid "8 is even, so _n" +#~ msgstr "8 çifttir, yani _n" + +#~ msgid "_ = 8 / 2 = 4;" +#~ msgstr "_ = 8 / 2 = 4;" + +#~ msgid "4 is even, so _n" +#~ msgstr "4 çifttir, yani _n" + +#~ msgid "7" +#~ msgstr "7" + +#~ msgid "_ = 4 / 2 = 2;" +#~ msgstr "_ = 4 / 2 = 2;" + +#~ msgid "2 is even, so _n" +#~ msgstr "2 çifttir, yani _n" + +#~ msgid "_ = 1; and" +#~ msgstr "_ = 1; ve" + +#~ msgid "[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)" +#~ msgstr "[Demetler ve Diziler](./tuples-and-arrays.md) (35 dakika)" + +#~ msgid "[References](./references.md) (55 minutes)" +#~ msgstr "[Referanslar](../references.md) (55 dakika)" + +#~ msgid "[User-Defined Types](./user-defined-types.md) (50 minutes)" +#~ msgstr "[Kullanıcı Tanımlı Türler](./user-defined-types.md) (50 dakika)" + +#~ msgid "[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)" +#~ msgstr "[Diziler](./tuples-and-arrays/arrays.md) (5 dakika)" + +#~ msgid "[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)" +#~ msgstr "[Demetler](./tuples-and-arrays/tuples.md) (5 dakika)" + +#~ msgid "[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)" +#~ msgstr "[Dizide Dolaşma](./tuples-and-arrays/iteration.md) (3 dakika)" + +#~ msgid "" +#~ "[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 " +#~ "minutes)" +#~ msgstr "" +#~ "[Desenler ve Çözümleme](./tuples-and-arrays/destructuring.md) (5 dakika)" + +#~ msgid "" +#~ "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)" +#~ msgstr "" +#~ "[Alıştırma: İç İçe Diziler](./tuples-and-arrays/exercise.md) (15 dakika)" + +#~ msgid "[Shared References](./references/shared.md) (10 minutes)" +#~ msgstr "[Paylaşılan Referanslar](./references/shared.md) (10 dakika)" + +#~ msgid "[Exclusive References](./references/exclusive.md) (10 minutes)" +#~ msgstr "[Özel Referanslar](./references/exclusive.md) (10 dakika)" + +#~ msgid "[Slices: &\\[T\\]](./references/slices.md) (10 minutes)" +#~ msgstr "[Dilimler: &\\[T\\]](../references/slices.md) (10 dakika)" + +#~ msgid "[Strings](./references/strings.md) (10 minutes)" +#~ msgstr "[Dizgeler](./references/strings.md) (10 dakika)" + +#~ msgid "[Exercise: Geometry](./references/exercise.md) (15 minutes)" +#~ msgstr "[Alıştırma: Geometri](./references/exercise.md) (15 dakika)" + +#~ msgid "" +#~ "Question: What happens if you modify `a[3]` right before printing `s`?" +#~ msgstr "" +#~ "Soru: `a[3]`'ü `s`'yi yazdırmadan hemen önce değiştirirseniz (modify) ne " +#~ "olur?" + +#~ msgid "" +#~ "The question about modifying `a[3]` can spark an interesting discussion, " +#~ "but the answer is that for memory safety reasons you cannot do it through " +#~ "`a` at this point in the execution, but you can read the data from both " +#~ "`a` and `s` safely. It works before you created the slice, and again " +#~ "after the `println`, when the slice is no longer used." +#~ msgstr "" +#~ "`a[3]`'ün değiştirilmesiyle (modify) ilgili soru ilginç bir tartışmayı " +#~ "ateşleyebilir, ancak cevap şu ki, bellek emniyeti nedenleriyle yürütmenin " +#~ "(execution) bu noktasında bunu `a` aracılığıyla yapamazsınız, ancak " +#~ "verileri hem `a`'dan hem de `s`'den emniyetli bir şekilde " +#~ "okuyabilirsiniz. Dilim (slice) oluşturulmadan önce ve dilim " +#~ "kullanılmayacaksa`println`'den sonra `a[3]` değiştirilebilir." + +#~ msgid "`String` is an owned, heap-allocated buffer of UTF-8 bytes." +#~ msgstr "" +#~ "`String`, UTF-8 olarak kodlanmış baytların dinamik bellekten tahsis " +#~ "edildiği (heap-allocated) sahipli (owned) bir arabellektir (buffer)" + +#~ msgid "[Named Structs](./user-defined-types/named-structs.md) (10 minutes)" +#~ msgstr "[İsimli Yapılar](./user-defined-types/named-structs.md) (10 dakika)" + +#~ msgid "[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)" +#~ msgstr "[Demet Yapıları](./user-defined-types/tuple-structs.md) (10 dakika)" + +#~ msgid "[Enums](./user-defined-types/enums.md) (5 minutes)" +#~ msgstr "[Enum'lar](./user-defined-types/enums.md) (5 dakika)" + +#~ msgid "[Static](./user-defined-types/static.md) (5 minutes)" +#~ msgstr "[Static](./user-defined-types/static.md) (5 dakika)" + +#~ msgid "[Type Aliases](./user-defined-types/aliases.md) (2 minutes)" +#~ msgstr "[Tür Eş İsimleri](./user-defined-types/aliases.md) (2 minutes)" + +#~ msgid "" +#~ "[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)" +#~ msgstr "" +#~ "[Alıştırma: Asansör Olayları](./user-Definition-types/exercise.md) (15 " +#~ "dakika)" + +#~ msgid "[Methods and Traits](./methods-and-traits.md) (50 minutes)" +#~ msgstr "[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)" + +#~ msgid "`match` expressions" +#~ msgstr "`match` ifadeleri" + +#~ msgid "[Traits](./methods-and-traits/traits.md) (15 minutes)" +#~ msgstr "[Özellikler](../methods-and-traits/traits.md) (15 dakika)" + +#~ msgid "Including 10 minute breaks, this session should take about 4 hours" +#~ msgstr "Bu oturum 10 dakikalık aralar dahil yaklaşık 4 saat sürmelidir" + +#~ msgid "This segment should take about 1 hour and 40 minutes" +#~ msgstr "Bu bölüm yaklaşık 1 saat 40 dakika sürmeli" + +#~ msgid "Niche Optimization" +#~ msgstr "Niche Optimizasyonu" + +#~ msgid "[Borrowing](./borrowing.md) (55 minutes)" +#~ msgstr "[Ödünç Alma](../borrowing.md) (55 dakika)" + +#~ msgid "[Lifetimes](./lifetimes.md) (50 minutes)" +#~ msgstr "[Ömürler](./lifetimes.md) (50 dakika)" + +#~ msgid "" +#~ "[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)" +#~ msgstr "" +#~ "[Ömür için Ek Açıklamalar](./lifetimes/lifetime-annotations.md) (10 " +#~ "dakika)" + +#~ msgid "[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)" +#~ msgstr "" +#~ "[Ömür Atlaması (Elision)](./lifetimes/lifetime-elision.md) (5 dakika)" + +#~ msgid "[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)" +#~ msgstr "[Yapı Ömürleri](./lifetimes/struct-lifetimes.md) (5 dakika)" + +#~ msgid "[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)" +#~ msgstr "" +#~ "[Alıştırma: Protobuf Ayrıştırma](./lifetimes/exercise.md) (30 dakika)" + +#~ msgid "b\"hello\"" +#~ msgstr "b\"merhaba\"" + +#~ msgid "Luhn Algorithm" +#~ msgstr "Luhn Algrotiması" + +#~ msgid "_Generated trait_:" +#~ msgstr "_Generated trait_:" + +#~ msgid "" +#~ "Including 10 minute breaks, this session should take about 2 hours and 55 " +#~ "minutes" +#~ msgstr "" +#~ "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 55 dakika sürmeli" + +#~ msgid "Hard-code both functions to operate on 3 × 3 matrices." +#~ msgstr "" +#~ "Her iki işlevi de 3 × 3 matris üzerinde çalışacak şekilde sabit kodlayın." + +#~ msgid "// Undefined behavior if abs misbehaves.\n" +#~ msgstr "// Undefined behavior if abs misbehaves.\n" + #~ msgid "Static and Const" #~ msgstr "Static ve Const" @@ -20065,9 +20752,6 @@ msgstr "" #~ msgid "Enum Sizes" #~ msgstr "Enum Boyutları" -#~ msgid "Novel Control Flow" -#~ msgstr "Yeni Kontrol Akışları" - #~ msgid "if let expressions" #~ msgstr "if let İfadeleri" @@ -20077,9 +20761,6 @@ msgstr "" #~ msgid "match expressions" #~ msgstr "match ifadeleri" -#~ msgid "Destructuring Structs" -#~ msgstr "Yapıların (Struct) Çözümlenmesi" - #~ msgid "Destructuring Arrays" #~ msgstr "Dizilerin Çözümlenmesi" @@ -20122,30 +20803,18 @@ msgstr "" #~ msgid "Field Shorthand Syntax" #~ msgstr "Alanlara İlk Değer Verme Kısaltması'nın Sözdizimi (Syntax)" -#~ msgid "Method Receiver" -#~ msgstr "Metot Alıcısı" - #~ msgid "Storing Books" #~ msgstr "Kitapların Saklanması" #~ msgid "Option and Result" #~ msgstr "Option ve Result" -#~ msgid "Vec" -#~ msgstr "Vec" - -#~ msgid "HashMap" -#~ msgstr "HashMap" - #~ msgid "Box" #~ msgstr "Box" #~ msgid "Recursive Data Types" #~ msgstr "Özyinelemeli Veri Türleri" -#~ msgid "Rc" -#~ msgstr "Rc" - #~ msgid "Iterators and Ownership" #~ msgstr "Adımlayıcılar (Iterators) ve Sahiplik" @@ -20161,18 +20830,9 @@ msgstr "" #~ msgid "Default Methods" #~ msgstr "Varsayılan Metotlar" -#~ msgid "impl Trait" -#~ msgstr "impl Trait" - #~ msgid "Important Traits" #~ msgstr "Önemli Özellikler (Traits)" -#~ msgid "Iterator" -#~ msgstr "Iterator" - -#~ msgid "From and Into" -#~ msgstr "From ve Into" - #~ msgid "Default" #~ msgstr "Default" @@ -20233,27 +20893,6 @@ msgstr "" #~ msgid "spin" #~ msgstr "spin" -#~ msgid "Send and Sync" -#~ msgstr "Send ve Sync" - -#~ msgid "Send" -#~ msgstr "Send" - -#~ msgid "Sync" -#~ msgstr "Sync" - -#~ msgid "Arc" -#~ msgstr "Arc" - -#~ msgid "Mutex" -#~ msgstr "Mutex" - -#~ msgid "async/await" -#~ msgstr "async/await" - -#~ msgid "Pin" -#~ msgstr "Pin" - #~ msgid "Day 1 Morning" #~ msgstr "1. Gün Sabah" @@ -20295,8 +20934,8 @@ msgstr "" #~ msgid "Day 3: Generics, traits, error handling, testing, and unsafe Rust." #~ msgstr "" -#~ "3. Gün: Jenerikler, özellikler (traits), hata işleme, testler ve güvenli " -#~ "olmayan (unsafe) Rust." +#~ "3. Gün: Jenerikler, özellikler (traits), hata işleme, testler ve " +#~ "emniyetsiz (unsafe) Rust." #~ msgid "" #~ "```rust,editable\n" @@ -20487,7 +21126,8 @@ msgstr "" #~ msgid "" #~ "It is possible to produce memory leaks in (safe) Rust. Some examples are:" #~ msgstr "" -#~ "(Güvenli) Rust'ta bellek sızıntılarının oluşması mümkündür. Bazı örnekler:" +#~ "(Emniyetli) Rust'ta bellek sızıntılarının oluşması mümkündür. Bazı " +#~ "örnekler:" #~ msgid "" #~ "You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box." @@ -20770,9 +21410,6 @@ msgstr "" #~ msgid "control flow:" #~ msgstr "kontrol akışı:" -#~ msgid "enumeration:" -#~ msgstr "numaralandırma:" - #~ msgid "error handling:" #~ msgstr "hata işleme:"