From 508979a4515fee9f52d0492b01e20c1b58e3306c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enes=20Ayd=C4=B1n?= Date: Wed, 10 Sep 2025 00:35:18 +0300 Subject: [PATCH] tr: day 2 afternoon translation with GEMINI :) (#2816) I had Google Gemini do this Turkish translation again. I gave Gemini my previous translations and the part I wanted it to translate as two separate PO files. As a prompt, I told it to stick to my terminology and methodology. Then, I went through the output that Gemini produced one by one. I estimated that I corrected a small percentage of the entire translation, around 5-10% (for this pr). NOTE: I opened this branch in this PR via "Enes1313:tr-translation-of-day-2-morning" . This PR can be reviewed when the PR for #2809 is finished. Part of #500 --- po/tr.po | 2737 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 2301 insertions(+), 436 deletions(-) diff --git a/po/tr.po b/po/tr.po index 08ec8894..2b2b207c 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" -"POT-Creation-Date: 2025-07-06T18:27:10+03:00\n" -"PO-Revision-Date: 2025-07-06 17:14+0300\n" +"POT-Creation-Date: 2025-09-05T21:05:34+03:00\n" +"PO-Revision-Date: 2025-07-19 00:57+0300\n" "Last-Translator: akerem@protonmail.com\n" "Language-Team: Turkish \n" "Language: tr\n" @@ -105,7 +105,7 @@ msgstr "Alıştırma: Fibonacci" #: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md #: src/references/solution.md src/user-defined-types/solution.md #: src/pattern-matching/solution.md src/methods-and-traits/solution.md -#: src/generics/solution.md src/std-types/solution.md src/closures/solution.md +#: src/generics/solution.md src/closures/solution.md src/std-types/solution.md #: src/std-traits/solution.md src/memory-management/solution.md #: src/smart-pointers/solution.md src/borrowing/solution.md #: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md @@ -280,11 +280,11 @@ msgstr "Değerleri Eşleştirmek" #: src/SUMMARY.md src/pattern-matching.md msgid "Destructuring Structs" -msgstr "Yapıların (Struct) Çözümlenmesi" +msgstr "Yapıların Çözümlenmesi (Destructuring Structs)" #: src/SUMMARY.md src/pattern-matching.md msgid "Destructuring Enums" -msgstr "Enum'ların (Struct) Çözümlenmesi" +msgstr "Enum'ların Çözümlenmesi (Destructuring)" #: src/SUMMARY.md src/pattern-matching.md #: src/pattern-matching/let-control-flow.md @@ -334,7 +334,7 @@ msgstr "İlişkili Türler" #: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md msgid "Deriving" -msgstr "Türetme" +msgstr "Türetme (Deriving)" #: src/SUMMARY.md src/methods-and-traits.md msgid "Exercise: Generic Logger" @@ -377,6 +377,27 @@ msgstr "Alıştırma: Genelleştirilmiş (Generic) `min`" 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/closures.md +msgid "Closures" +msgstr "Çevreleyiciler (Closures)" + +#: src/SUMMARY.md src/closures.md src/closures/syntax.md +msgid "Closure Syntax" +msgstr "Çevreleyici Sözdizimi (Closure Syntax)" + +#: src/SUMMARY.md src/closures.md src/closures/capturing.md +msgid "Capturing" +msgstr "Yakalama (Capturing)" + +#: src/SUMMARY.md src/closures.md +msgid "Closure Traits" +msgstr "Çevreleyici Özellikler (Closure Traits)" + +#: src/SUMMARY.md src/closures.md src/closures/exercise.md +msgid "Exercise: Log Filter" +msgstr "Alıştırma: Kaydedici (Log) Filtresi" + #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-2-afternoon.md src/std-types.md msgid "Standard Library Types" @@ -415,27 +436,6 @@ msgstr "`HashMap`" msgid "Exercise: Counter" msgstr "Alıştırma: Sayıcı" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-2-afternoon.md src/closures.md -msgid "Closures" -msgstr "Çevreleyiciler (Closures)" - -#: src/SUMMARY.md src/closures.md src/closures/syntax.md -msgid "Closure Syntax" -msgstr "Çevreleyici Sözdizimi (Closure Syntax)" - -#: src/SUMMARY.md src/closures.md src/closures/capturing.md -msgid "Capturing" -msgstr "Yakalama (Capturing)" - -#: src/SUMMARY.md src/closures.md -msgid "Closure Traits" -msgstr "Çevreleyici Özellikler (Closure Traits)" - -#: src/SUMMARY.md src/closures.md src/closures/exercise.md -msgid "Exercise: Log Filter" -msgstr "Alıştırma: Kaydedici (Log) Filtresi" - #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-2-afternoon.md src/std-traits.md msgid "Standard Library Traits" @@ -456,7 +456,7 @@ msgstr "`From` ve `Into`" #: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md msgid "Casting" -msgstr "Tür Çevirimi" +msgstr "Tür Dönüştürme (Casting)" #: src/SUMMARY.md src/std-traits/read-and-write.md msgid "`Read` and `Write`" @@ -676,6 +676,7 @@ msgstr "Gün 4: Öğleden Sonra" #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-4-afternoon.md src/error-handling.md +#: src/idiomatic/welcome.md msgid "Error Handling" msgstr "Hata İşleme" @@ -699,7 +700,7 @@ msgstr "`Error` Özelliği (Trait)" msgid "`thiserror`" msgstr "`thiserror`" -#: src/SUMMARY.md src/error-handling/anyhow.md +#: src/SUMMARY.md src/error-handling/anyhow.md src/idiomatic/welcome.md msgid "`anyhow`" msgstr "`anyhow`" @@ -756,7 +757,8 @@ msgstr "Alıştırma: FFI Sarmalayıcı" msgid "Android" msgstr "Android" -#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/android/setup.md src/chromium/setup.md msgid "Setup" msgstr "Kurulum (Setup)" @@ -849,6 +851,8 @@ msgid "Logging" msgstr "Kayıt Tutma (Logging)" #: src/SUMMARY.md src/android/interoperability.md +#: src/unsafe-deep-dive/motivations.md +#: src/unsafe-deep-dive/motivations/interop.md msgid "Interoperability" msgstr "Birlikte Çalışabilirlik (Interoperability)" @@ -1411,6 +1415,83 @@ msgstr "İptal (Cancellation)" msgid "Broadcast Chat Application" msgstr "Yayımlamalı Sohbet Uygulaması" +#: src/SUMMARY.md src/running-the-course/course-structure.md +msgid "Idiomatic Rust" +msgstr "" + +#: src/SUMMARY.md src/idiomatic/welcome.md +#: src/idiomatic/leveraging-the-type-system.md +msgid "Leveraging the Type System" +msgstr "" + +#: src/SUMMARY.md src/idiomatic/leveraging-the-type-system.md +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +#, fuzzy +msgid "Newtype Pattern" +msgstr "Tür Durum Deseni" + +#: src/SUMMARY.md +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "Semantic Confusion" +msgstr "" + +#: src/SUMMARY.md +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md +msgid "Parse, Don't Validate" +msgstr "" + +#: src/SUMMARY.md +#, fuzzy +msgid "Is It Encapsulated?" +msgstr "Kapsülleme (Encapsulation)" + +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/unsafe-deep-dive/motivations.md +#, fuzzy +msgid "Motivations" +msgstr "Motivasyon" + +#: src/SUMMARY.md src/unsafe-deep-dive/motivations.md +#: src/unsafe-deep-dive/motivations/data-structures.md +#, fuzzy +msgid "Data Structures" +msgstr "Veri Yapılarında Ömürler" + +#: src/SUMMARY.md src/unsafe-deep-dive/motivations.md +#: src/unsafe-deep-dive/motivations/performance.md +msgid "Performance" +msgstr "" + +#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/unsafe-deep-dive/foundations.md +#, fuzzy +msgid "Foundations" +msgstr "Fonksiyonlar" + +#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md +#, fuzzy +msgid "What is unsafe?" +msgstr "Rust Nedir?" + +#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "When is unsafe used?" +msgstr "" + +#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md +#, fuzzy +msgid "Data structures are safe" +msgstr "Default, yapı güncelleme sözdizimi (struct update syntax)" + +#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md +msgid "Actions might not be" +msgstr "" + +#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "Less powerful than it seems" +msgstr "" + #: src/SUMMARY.md msgid "Final Words" msgstr "Son sözler" @@ -1772,7 +1853,7 @@ msgstr "1. Gün Sabah (2 saat 10 dakika, aralar dahil)" #: 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 +#: src/concurrency/welcome-async.md src/idiomatic/welcome.md msgid "Segment" msgstr "Bölüm" @@ -1781,7 +1862,7 @@ msgstr "Bölüm" #: 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/generics.md src/welcome-day-2-afternoon.md -#: src/std-types.md src/closures.md src/std-traits.md src/welcome-day-3.md +#: src/closures.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 @@ -1791,18 +1872,22 @@ msgstr "Bölüm" #: 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 +#: src/concurrency/async-exercises.md src/idiomatic/welcome.md +#: src/idiomatic/leveraging-the-type-system.md +#: src/unsafe-deep-dive/motivations.md src/unsafe-deep-dive/foundations.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/references.md src/user-defined-types.md src/pattern-matching.md -#: src/generics.md src/std-types.md src/closures.md src/std-traits.md +#: src/generics.md src/closures.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 +#: src/idiomatic/leveraging-the-type-system.md +#: src/unsafe-deep-dive/motivations.md msgid "5 minutes" msgstr "5 dakika" @@ -1850,7 +1935,7 @@ msgstr "2. Gün Sabah (2 saat 45 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/references.md src/welcome-day-2.md src/methods-and-traits.md -#: src/std-types.md src/closures.md src/welcome-day-3.md src/borrowing.md +#: src/closures.md src/std-types.md src/welcome-day-3.md src/borrowing.md #: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md #: src/error-handling.md msgid "3 minutes" @@ -2031,6 +2116,7 @@ msgstr "Sabah (3 saat 20 dakika, aralar dahil)" #: src/error-handling.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 +#: src/idiomatic/leveraging-the-type-system.md msgid "20 minutes" msgstr "20 dakika" @@ -2047,6 +2133,56 @@ msgstr "1 saat 10 dakika" msgid "Afternoon (3 hours and 30 minutes, including breaks)" msgstr "Öğleden Sonra (3 saat 30 dakika, aralar dahil)" +#: src/running-the-course/course-structure.md +#, fuzzy +msgid "" +"The [Idiomatic Rust](../idiomatic/welcome.md) deep dive is a 2-day class on " +"Rust idioms and patterns." +msgstr "" +"[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 "" +"You should be familiar with the material in [Rust Fundamentals](../welcome-" +"day-1.md) before starting this course." +msgstr "" + +#: src/running-the-course/course-structure.md +msgid "course outline Idiomatic Rust" +msgstr "" + +#: src/running-the-course/course-structure.md +msgid "Unsafe (Work in Progress)" +msgstr "" + +#: src/running-the-course/course-structure.md +msgid "" +"The [Unsafe](../unsafe-deep-dive/welcome.md) deep dive is a two-day class on " +"the _unsafe_ Rust language. It covers the fundamentals of Rust's safety " +"guarantees, the motivation for `unsafe`, review process for `unsafe` code, " +"FFI basics, and building data structures that the borrow checker would " +"normally reject." +msgstr "" + +#: src/running-the-course/course-structure.md +#, fuzzy +msgid "Day 1 Morning (1 hour, including breaks)" +msgstr "2. Gün Öğleden Sonra (4 saat, aralar dahil)" + +#: src/running-the-course/course-structure.md 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 src/unsafe-deep-dive/foundations.md +msgid "2 minutes" +msgstr "2 dakika" + +#: src/running-the-course/course-structure.md src/idiomatic/welcome.md +#, fuzzy +msgid "25 minutes" +msgstr "5 dakika" + #: src/running-the-course/course-structure.md msgid "Format" msgstr "Format" @@ -2323,16 +2459,8 @@ msgstr "" "adında farklı bir IDE de mevcuttur." #: src/cargo.md -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 " -"command would be:" +msgid "On Debian/Ubuntu, you can install `rustup` via `apt`:" msgstr "" -"Debian/Ubuntu'da ayrıca `apt` aracılığıyla Cargo'yu, Rust kaynak kodunu ve " -"[Rust biçimlendiricisini (formatter)](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 "" @@ -2731,7 +2859,7 @@ msgstr "" #: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md #: src/welcome-day-4.md src/concurrency/welcome.md -#: src/concurrency/welcome-async.md +#: src/concurrency/welcome-async.md src/idiomatic/welcome.md msgid "Schedule" msgstr "Zamanlama (Schedule)" @@ -2820,7 +2948,7 @@ 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/closures.md src/std-traits.md src/memory-management.md +#: src/closures.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 #: src/concurrency/threads.md src/concurrency/channels.md @@ -2828,25 +2956,22 @@ msgstr "Bu bölüm yaklaşık 15 dakika sürmelidir. İçeriği:" #: 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 +#: src/idiomatic/leveraging-the-type-system.md +#: src/unsafe-deep-dive/motivations.md src/unsafe-deep-dive/foundations.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/closures.md src/memory-management.md +#: src/closures.md src/std-types.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 +#: src/unsafe-deep-dive/foundations.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 "" "Rust is a new programming language which had its [1.0 release in 2015]" @@ -3398,8 +3523,8 @@ msgid "" "Functions will be covered in more detail later." msgstr "" "İlk defa `main` dışında bir fonksiyon görüyoruz, ancak anlamı açık: üç " -"tamsayı alır ve bir tamsayı döndürür. Fonksiyonlar daha sonra daha detaylı " -"olarak ele alınacaktır." +"tamsayı alır ve bir tamsayı geri döndürür. Fonksiyonlar daha sonra daha " +"detaylı olarak ele alınacaktır." #: src/types-and-values/arithmetic.md msgid "Arithmetic is very similar to other languages, with similar precedence." @@ -3898,10 +4023,10 @@ msgid "" "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)." +"`loop`'un önemsiz olmayan (non-trivial) bir değer geri 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 "" @@ -3925,7 +4050,7 @@ msgid "" "programming languages), then a return type." msgstr "" "Bildirim (declaration) parametrelerinin ardından bir tür (bazı programlama " -"dillerinin tersi) ve ardından bir dönüş türü gelir." +"dillerinin tersi) ve ardından bir geri dönüş türü gelir." #: src/control-flow-basics/functions.md msgid "" @@ -3946,9 +4071,9 @@ msgid "" "Some functions have no return value, and return the 'unit type', `()`. The " "compiler will infer this if the return type is omitted." msgstr "" -"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." +"Bazı fonksiyonların geri dönüş değeri (return value) yoktur ve 'birim türü " +"(unit type)', `()` geri döndürürler. Eğer geri dönüş türü yazılmazsa, " +"derleyici birim türünü çıkarım (infer) yapacaktır." #: src/control-flow-basics/functions.md msgid "" @@ -4266,6 +4391,14 @@ 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/arrays.md +msgid "" +"Arrays are not heap-allocated. They are regular values with a fixed size " +"known at compile time, meaning they go on the stack. This can be different " +"from what students expect if they come from a garbage collected language, " +"where arrays may be heap allocated by default." +msgstr "" + #: src/tuples-and-arrays/tuples.md msgid "Like arrays, tuples have a fixed length." msgstr "Diziler gibi, demetlerin (tuple) de sabit bir uzunluğu vardır." @@ -4898,6 +5031,13 @@ msgstr "" "(mutable) referans kullanarak döngü de dönmemizdir; bu da `for` döngüsünün " "her elemana değiştirilebilir (mutable) referanslar vermesini sağlar." +#: src/references/solution.md +msgid "" +"It is also possible to take slice references here, e.g., `fn " +"magnitude(vector: &[f64]) -> f64`. This makes the function more general, at " +"the cost of a runtime length check." +msgstr "" + #: src/user-defined-types.md src/std-types.md src/std-traits.md #: src/memory-management.md msgid "This segment should take about 1 hour. It contains:" @@ -5060,6 +5200,12 @@ msgstr "" "her kullanımda yeniden doğrulamanız gerekmiyor: `PhoneNumber(String)` veya " "`OddNumber(u32)`." +#: src/user-defined-types/tuple-structs.md +msgid "" +"The newtype pattern is covered extensively in the [\"Idiomatic Rust\" module]" +"(../idiomatic/leveraging-the-type-system/newtype-pattern.md)." +msgstr "" + #: src/user-defined-types/tuple-structs.md msgid "" "Demonstrate how to add a `f64` value to a `Newtons` type by accessing the " @@ -5745,11 +5891,13 @@ msgstr "" "etmek istediğimizde önemli ve gereklidir." #: src/pattern-matching/match.md +#, fuzzy msgid "" -"They are not the same as separate `if` expression inside of the match arm. " -"An `if` expression inside of the branch block (after `=>`) happens after the " -"match arm is selected. Failing the `if` condition inside of that block won't " -"result in other arms of the original `match` expression being considered." +"Match guards are different from `if` expressions after the `=>`. An `if` " +"expression is evaluated after the match arm is selected. Failing the `if` " +"condition inside of that block won't result in other arms of the original " +"`match` expression being considered. In the following example, the wildcard " +"pattern `_ =>` is never even attempted." msgstr "" "Bunlar, eşleşme kolunun (match arm) içindeki ayrı bir `if` ifadesiyle aynı " "değildir. Dal (branch) bloğunun içindeki bir `if` ifadesi (`=>`'dan sonra), " @@ -5757,6 +5905,14 @@ msgstr "" "başarısız olması, orijinal `match` ifadesinin diğer kollarının dikkate " "alınmasıyla sonuçlanmaz." +#: src/pattern-matching/match.md +msgid "\"Uppercase\"" +msgstr "" + +#: src/pattern-matching/match.md +msgid "\"Bug: this is never printed\"" +msgstr "" + #: src/pattern-matching/match.md msgid "" "The condition defined in the guard applies to every expression in a pattern " @@ -5878,9 +6034,10 @@ msgstr "" "değerler özel (exclusive) referanslar haline gelir." #: src/pattern-matching/destructuring-structs.md +#, fuzzy 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 " +"spot. Try changing the `2` in the first arm to a variable, and see that it " "subtly doesn't work. Change it to a `const` and see it working again." msgstr "" "Bir yakalanan(capture) değer ile bir sabit (constant) ifade arasındaki " @@ -5932,7 +6089,7 @@ msgid "" "a `match`." msgstr "" "`if`/`else` ifadesi, daha sonra bir `match` ile açılan (unpacked) bir enum " -"döndürüyor." +"geri döndürüyor." #: src/pattern-matching/destructuring-enums.md msgid "" @@ -6057,9 +6214,9 @@ msgid "" "all items." msgstr "" "Burada [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct." -"String.html#method.pop) dize boşalana kadar `Some(c)` döndürür, ardından " -"`None` döndürür. `while let` tüm öğeler arasında adımlamaya (iterating) " -"devam etmemizi sağlar." +"String.html#method.pop) dize boşalana kadar `Some(c)` geri döndürür, " +"ardından `None` geri döndürür. `while let` tüm öğeler arasında adımlamaya " +"(iterating) devam etmemizi sağlar." #: src/pattern-matching/let-control-flow/while-let.md msgid "" @@ -6099,7 +6256,7 @@ msgid "" "let_else.html). The \"else\" case must diverge (`return`, `break`, or panic " "- anything but falling off the end of the block)." msgstr "" -"Bir deseni eşleştirip fonksiyondan geri dönmenin yaygın durumu için [`let " +"Bir deseni eşleştirip fonksiyondan geri döndürmenin yaygın durumu için [`let " "else`](https://doc.rust-lang.org/rust-by-example/flow_control/let_else.html) " "kullanın. \"else\" durumu farklı olmalıdır (diverge) (`return`, `break` veya " "`panic` - bloğun sonundan çıkmak dışında her şey)." @@ -6132,9 +6289,10 @@ msgid "" "where you try to get a value out of a `Result`, returning an error if the " "`Result` was `Err`." msgstr "" -"Bu erken dönüş tabanlı kontrol akışı (early return-based control flow), Rust " -"hata işleme (error handling) kodunda yaygındır; burada bir `Result`'tan bir " -"değer almaya çalışırsınız ve `Result` `Err` ise bir hata döndürürsünüz." +"Bu erken geri döndürme tabanlı kontrol akışı (early return-based control " +"flow), Rust hata işleme (error handling) kodunda yaygındır; burada bir " +"`Result`'tan bir değer almaya çalışırsınız ve `Result` `Err` ise bir hata " +"geri döndürürsünüz." #: src/pattern-matching/let-control-flow/let-else.md msgid "" @@ -6405,7 +6563,7 @@ msgstr "" #: src/methods-and-traits/traits.md msgid "/// Return a sentence from this pet.\n" -msgstr "/// Bu evcil hayvandan bir cümle döndürün.\n" +msgstr "/// Bu evcil hayvandan bir cümle geri döndürün.\n" #: src/methods-and-traits/traits.md msgid "/// Print a string to the terminal greeting this pet.\n" @@ -6634,11 +6792,12 @@ msgstr "" "üzerindeki mesajları yoksayacak bir `VerbosityFilter` türü yazmaktır." #: src/methods-and-traits/exercise.md +#, fuzzy msgid "" "This is a common pattern: a struct wrapping a trait implementation and " "implementing that same trait, adding behavior in the process. In the " -"\"Generics\" segment this afternoon, we will see how to make the wrapper " -"generic over the wrapped type." +"\"Generics\" segment, we will see how to make the wrapper generic over the " +"wrapped type." msgstr "" "Bu yaygın bir desendir: bir özellik gerçekleştirmesini (trait " "implementation) saran ve aynı özelliği gerçekleştiren, süreçte davranış " @@ -6735,8 +6894,8 @@ msgid "" "Rust infers a type for T based on the types of the arguments and return " "value." msgstr "" -"Rust, argümanların ve dönüş değerinin türlerine dayanarak T için bir tür " -"çıkarır (infers)." +"Rust, argümanların ve geri dönüş değerinin türlerine dayanarak T için bir " +"tür çıkarır (infers)." #: src/generics/generic-functions.md msgid "" @@ -6758,9 +6917,9 @@ msgstr "" "Bu, C++ şablonlarına (templates) benzer, ancak Rust, genelleştirilmiş " "(generic) fonksiyonu kısmen de olsa anında derler, bu nedenle bu fonksiyon " "kısıtlamalarla (constraints) eşleşen tüm türler için geçerli olmalıdır. " -"Örneğin, `cond` yanlışsa `left + right` döndürmek için `pick`'i değiştirmeyi " -"deneyin. Yalnızca tamsayılarla `pick` örneği kullanılsa bile, Rust bunu yine " -"de geçersiz kabul eder. C++ bunu yapmanıza izin verirdi." +"Örneğin, `cond` yanlışsa `left + right` geri döndürmek için `pick`'i " +"değiştirmeyi deneyin. Yalnızca tamsayılarla `pick` örneği kullanılsa bile, " +"Rust bunu yine de geçersiz kabul eder. C++ bunu yapmanıza izin verirdi." #: src/generics/generic-functions.md msgid "" @@ -6838,7 +6997,7 @@ msgid "" msgstr "" "Belirli alan türü (concrete field type) üzerinde soyutlama yapmak için " "genelleştirmeleri (generics) kullanabilirsiniz. Önceki bölümün alıştırmasına " -"dönersek:" +"geri dönersek:" #: src/generics/generic-data.md msgid "" @@ -7006,10 +7165,10 @@ msgid "" ">()`." msgstr "" "Geri dönüş konumunda (return position) çıkarım (inference) yapmak zordur. " -"`impl Foo` döndüren bir fonksiyon, döndürdüğü belirli olan türü kaynakta " -"yazmadan seçer. `collect() -> B` gibi genelleştirilmiş bir tür döndüren " -"bir fonksiyon, `B`'yi sağlayan herhangi bir türü geri döndürebilir ve " -"çağıranın, `let x: Vec<_> = foo.collect()` veya tür belirteciyle (turbo " +"`impl Foo` geri döndüren bir fonksiyon, geri döndürdüğü belirli olan türü " +"kaynakta yazmadan seçer. `collect() -> B` gibi genelleştirilmiş bir tür " +"döndüren bir fonksiyon, `B`'yi sağlayan herhangi bir türü geri döndürebilir " +"ve çağıranın, `let x: Vec<_> = foo.collect()` veya tür belirteciyle (turbo " "balığı / turbofish) ile `foo.collect::>()` gibi birini seçmesi " "gerekebilir." @@ -7183,6 +7342,336 @@ msgstr "" "Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 50 dakika sürmelidir. " "İçeriği:" +#: src/closures.md src/concurrency/threads.md src/concurrency/shared-state.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/closures/syntax.md +msgid "Closures are created with vertical bars: `|..| ..`." +msgstr "Çevreleyiciler (closures) dikey çubuklarla oluşturulur: `|..| ..`." + +#: src/closures/syntax.md +msgid "// Argument and return type can be inferred for lightweight syntax:\n" +msgstr "" +"// Hafif sözdizimi (lightweight syntax) için, argüman ve geri dönüş türü " +"çıkarımı yapılabilir:\n" + +#: src/closures/syntax.md +msgid "// Or we can specify types and bracket the body to be fully explicit:\n" +msgstr "" +"// Veya türleri belirtebilir ve tamamen açık (fully explicit) olmak için " +"gövdeyi parantez içine alabiliriz:\n" + +#: src/closures/syntax.md +msgid "" +"The arguments go between the `|..|`. The body can be surrounded by `{ .. }`, " +"but if it is a single expression these can be omitted." +msgstr "" +"Argümanlar `|..|` arasına girer. Gövde `{ .. }` içine alınır., ancak tek bir " +"ifade (expression) ise bunlar atlanabilir." + +#: src/closures/syntax.md +msgid "" +"Argument types are optional, and are inferred if not given. The return type " +"is also optional, but can only be written if using `{ .. }` around the body." +msgstr "" +"Argüman türleri isteğe bağlıdır ve eğer verilmezse türler çıkarım " +"(inference) yapılır. Geri dönüş türü (return type) de isteğe bağlıdır, ancak " +"yalnızca gövdenin etrafında `{ .. }` varsa yazılabilir." + +#: src/closures/syntax.md +msgid "" +"The examples can both be written as mere nested functions instead -- they do " +"not capture any variables from their lexical environment. We will see " +"captures next." +msgstr "" +"Örneklerin her ikisi de bunun yerine sadece iç içe fonksiyonlar olarak " +"yazılabilir -- çünkü bulundukları sözcüksel ortamdan (lexical environment) " +"herhangi bir değişkeni yakalamazlar. Yakalamayı (capturing) bir sonraki " +"adımda göreceğiz." + +#: src/closures/syntax.md +msgid "" +"The ability to store functions in variables doesn't just apply to closures, " +"regular functions can be put in variables and then invoked the same way that " +"closures can: [Example in the playground](https://play.rust-lang.org/?" +"version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda)." +msgstr "" +"Fonksiyonları değişkenlerde saklama yeteneği sadece çevreleyicilere " +"(closures) özgü değildir, düzenli (regular) fonksiyonlar da değişkenlere " +"konulabilir ve ardından çevreleyicilerle aynı şekilde çağrılabilir: [Deneme " +"alanında (playground) örnek](https://play.rust-lang.org/?" +"version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda)." + +#: src/closures/syntax.md +msgid "" +"The linked example also demonstrates that closures that don't capture " +"anything can also coerce to a regular function pointer." +msgstr "" +"Bağlantısı verilen örnek ayrıca hiçbir şey yakalamayan (capture) " +"çevreleyicilerin (closures) de düzenli bir fonksiyon göstericisine (regular " +"function pointer) dönüştürülebileceğini (coerce) göstermektedir." + +#: src/closures/capturing.md +msgid "" +"A closure can capture variables from the environment where it was defined." +msgstr "" +"Bir çevreleyici (closure), tanımlandığı ortamdan değişkenleri yakalayabilir " +"(capture)." + +#: src/closures/capturing.md +msgid "" +"By default, a closure captures values by reference. Here `max_value` is " +"captured by `clamp`, but still available to `main` for printing. Try making " +"`max_value` mutable, changing it, and printing the clamped values again. Why " +"doesn't this work?" +msgstr "" +"Varsayılan olarak, bir çevreleyici (closure) değerleri referans yoluyla " +"yakalar. Burada `max_value`, `clamp` tarafından yakalanır, ancak yazdırma " +"için `main`'de hala kullanılabilir. `max_value` değişkenini değiştirilebilir " +"(mutable) yapmayı, değiştirmeyi ve değerleri tekrar yazdırmayı deneyin. Bu " +"neden işe yaramıyor?" + +#: src/closures/capturing.md +msgid "" +"If a closure mutates values, it will capture them by mutable reference. Try " +"adding `max_value += 1` to `clamp`." +msgstr "" +"Bir çevreleyici (closure) değerleri değiştirirse, onları değiştirilebilir " +"(mutable) referans yoluyla yakalar. `clamp`'e `max_value += 1` eklemeyi " +"deneyin." + +#: src/closures/capturing.md +msgid "" +"You can force a closure to move values instead of referencing them with the " +"`move` keyword. This can help with lifetimes, for example if the closure " +"must outlive the captured values (more on lifetimes later)." +msgstr "" +"Bir çevreleyiciyi (closure), `move` anahtar kelimesiyle değerleri referans " +"almak yerine taşımaya (move) zorlayabilirsiniz. Bu, ömürlerle (lifetimes) " +"ilgili yardımcı olabilir, örneğin çevreleyici yakalanan değerlerden daha " +"uzun yaşamalıysa (ömürler hakkında daha sonra daha fazla bilgi)." + +#: src/closures/capturing.md +msgid "" +"This looks like `move |v| ..`. Try adding this keyword and see if `main` can " +"still access `max_value` after defining `clamp`." +msgstr "" +"Bu, `move |v| ..` gibi görünüyor. Bu anahtar kelimeyi eklemeyi deneyin ve " +"`clamp`'i tanımladıktan sonra `main`'in hala `max_value`'e erişip " +"erişemediğini görün." + +#: src/closures/capturing.md +msgid "" +"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 "" +"Varsayılan olarak, çevreleyiciler (closures) dış kapsamdan (outer scope) her " +"değişkeni, yapabildikleri en az talepkar erişim biçimiyle yakalarlar " +"(mümkünse paylaşılan (shared) referansla, sonra özel (exclusive) referansla, " +"sonra taşıma (move) ile). `move` anahtar kelimesi, değerle yakalamayı " +"(move)zorlar." + +#: src/closures/traits.md +msgid "Closure traits" +msgstr "Çevreleyici özellikleri (Closure traits)" + +#: src/closures/traits.md +msgid "" +"Closures or lambda expressions have types which cannot be named. However, " +"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn." +"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and " +"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:" +msgstr "" +"Çevreleyicilerin (closures) veya lambda ifadelerinin isimlendirilemeyen " +"türleri vardır. Ancak, özel [`Fn`](https://doc.rust-lang.org/std/ops/trait." +"Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html) ve " +"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) " +"özelliklerini (traits) gerçekleştirirler (implement):" + +#: src/closures/traits.md +msgid "" +"The special types `fn(..) -> T` refer to function pointers - either the " +"address of a function, or a closure that captures nothing." +msgstr "" +"Özel `fn(..) -> T` türleri, fonksiyon göstericilerine (function pointers) " +"referans verir - ya bir fonksiyonun adresi ya da hiçbir şey yakalamayan " +"(capture) bir çevreleyici (closure)." + +#: src/closures/traits.md +msgid "\"Calling {func_name}({input}): {}\"" +msgstr "\"Çağrılıyor {func_name}({input}): {}\"" + +#: src/closures/traits.md +msgid "\"-itis\"" +msgstr "\"sendromu\"" + +#: src/closures/traits.md +msgid "\"{x}{suffix}\"" +msgstr "\"{x} {suffix}\"" + +#: src/closures/traits.md +msgid "\"add_suffix\"" +msgstr "\"add_suffix\"" + +#: src/closures/traits.md +msgid "\"senior\"" +msgstr "\"son sınıf\"" + +#: src/closures/traits.md +#, fuzzy +msgid "\"appendix\"" +msgstr "\"apandis\"" + +#: src/closures/traits.md +msgid "\"/\"" +msgstr "\"/\"" + +#: src/closures/traits.md +msgid "\"accumulate\"" +msgstr "\"accumulate\"" + +#: src/closures/traits.md +msgid "\"red\"" +msgstr "\"kırmızı\"" + +#: src/closures/traits.md +msgid "\"green\"" +msgstr "\"yeşil\"" + +#: src/closures/traits.md +msgid "\"blue\"" +msgstr "\"mavi\"" + +#: src/closures/traits.md +msgid "\"take_and_reverse\"" +msgstr "\"take_and_reverse\"" + +#: src/closures/traits.md +msgid "\"reversed: \"" +msgstr "\"ters çevrilmiş: \"" + +#: src/closures/traits.md +msgid "" +"An `Fn` (e.g. `add_suffix`) 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 "" +"Bir `Fn` (ör. `add_suffix`) yakalanan değerleri (captured values) ne tüketir " +"ne de değiştirir. Sadece çevreleyiciye (closure) paylaşılan bir referans " +"(shared reference) gerektirerek çağrılabilir, bu da çevreleyicinin tekrar " +"tekrar ve hatta eş zamanlı olarak (concurrently) yürütülebileceği anlamına " +"gelir." + +#: src/closures/traits.md +msgid "" +"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 "" +"Bir `FnMut` (ör. `accumulate`) yakalanan değerleri (captured values) " +"değiştirebilir. Çevreleyici (closure) nesnesine özel (exclusive) referans " +"yoluyla erişilir, bu nedenle tekrar tekrar çağrılabilir ancak eş zamanlı " +"olarak (concurrently) çağrılamaz." + +#: src/closures/traits.md +msgid "" +"If you have an `FnOnce` (e.g. `take_and_reverse`), you may only call it " +"once. Doing so consumes the closure and any values captured by move." +msgstr "" +"Eğer bir `FnOnce`'ınız varsa (ör. `take_and_reverse`), onu yalnızca bir kez " +"çağırabilirsiniz. Bunu yapmak, çevreleyiciyi (closure) ve taşıma (move) ile " +"yakalanan tüm değerleri tüketir." + +#: src/closures/traits.md +msgid "" +"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. " +"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can " +"use an `Fn` wherever an `FnMut` or `FnOnce` is called for." +msgstr "" +"`FnMut`, `FnOnce`'ın bir alt türüdür. `Fn`, `FnMut` ve `FnOnce`'ın bir alt " +"türüdür. Yani, `FnOnce`'ın istendiği her yerde bir `FnMut` kullanabilirsiniz " +"ve `FnMut` veya `FnOnce`'ın istendiği her yerde bir `Fn` kullanabilirsiniz." + +#: src/closures/traits.md +msgid "" +"When you define a function that takes a closure, you should take `FnOnce` if " +"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows " +"the most flexibility for the caller." +msgstr "" +"Bir çevreleyici (closure) alan bir fonksiyon tanımladığınızda, " +"yapabiliyorsanız `FnOnce` (yani onu bir kez çağırırsınız), değilse `FnMut` " +"ve son olarak `Fn` almalısınız. Bu, çağırana (caller) en fazla esnekliği " +"sağlar." + +#: src/closures/traits.md +msgid "" +"In contrast, when you have a closure, the most flexible you can have is `Fn` " +"(which can be passed to a consumer of any of the 3 closure traits), then " +"`FnMut`, and lastly `FnOnce`." +msgstr "" +"Buna karşılık, bir çevreleyiciniz (closure) olduğunda, sahip olabileceğiniz " +"en esnek olan `Fn`'dir (3 çevreleyici özelliğinin (trait) herhangi birinin " +"tüketicisine geçirilebilir), sonra `FnMut` ve son olarak `FnOnce`." + +#: src/closures/traits.md +msgid "" +"The compiler also infers `Copy` (e.g. for `add_suffix`) and `Clone` (e.g. " +"`take_and_reverse`), depending on what the closure captures. Function " +"pointers (references to `fn` items) implement `Copy` and `Fn`." +msgstr "" +"Derleyici ayrıca, çevreleyicinin (closure) ne yakaladığına bağlı olarak " +"`Copy` (ör. `add_suffix` için) ve `Clone` (ör. `take_and_reverse`) çıkarımı " +"yapar (infers). Fonksiyon göstericileri (`fn` öğelerine referanslar) " +"`Copy`'yi ve `Fn`'yi gerçekleştirir (implement)." + +#: src/closures/exercise.md +msgid "" +"Building on the generic logger from this morning, implement a `Filter` which " +"uses a closure to filter log messages, sending those which pass the " +"filtering predicate to an inner logger." +msgstr "" +"Bu sabahki genel kaydediciden (logger) yola çıkarak, kayıt mesajlarını " +"filtrelemek için bir çevreleyici (closure) kullanan bir `Filter` " +"gerçekleştirin (implement), filtreleme koşulunu geçenleri bir iç kaydediciye " +"(logger) gönderin." + +#: src/closures/exercise.md +msgid "// TODO: Define and implement `Filter`.\n" +msgstr "// TODO: `Filter`'ı tanımlayın ve gerçekleştirin (implement).\n" + +#: src/closures/exercise.md src/closures/solution.md +msgid "\"yikes\"" +msgstr "\"berbat\"" + +#: src/closures/exercise.md src/closures/solution.md +msgid "\"yikes, something went wrong\"" +msgstr "\"berbat, bir şeyler ters gitti\"" + +#: src/closures/exercise.md src/closures/solution.md +msgid "\"uhoh\"" +msgstr "\"eyvah\"" + +#: src/closures/solution.md +msgid "/// Only log messages matching a filtering predicate.\n" +msgstr "" +"/// Yalnızca bir filtreleme koşuluyla eşleşen günlük mesajlarını kaydet.\n" + +#: src/closures/solution.md +msgid "" +"Note that the `P: Fn(u8, &str) -> bool` bound on the first `Filter` impl " +"block isn't strictly necessary, but it helps with type inference when " +"calling `new`. Demonstrate removing it and showing how the compiler now " +"needs type annotations for the closure passed to `new`." +msgstr "" +"İlk `Filter` impl bloğundaki `P: Fn(u8, &str) -> bool` sınırının kesinlikle " +"gerekli olmadığını, ancak `new` çağrılırken tür çıkarımına (type inference) " +"yardımcı olduğunu unutmayın. Onu kaldırmayı gösterin ve derleyicinin şimdi " +"`new`'e geçirilen çevreleyici (closure) için tür ek açıklamalarına (type " +"annotations) nasıl ihtiyaç duyduğunu gösterin." + #: src/std-types.md src/std-types/option.md msgid "Option" msgstr "Option" @@ -7208,6 +7697,9 @@ msgid "" "For each of the slides in this section, spend some time reviewing the " "documentation pages, highlighting some of the more common methods." msgstr "" +"Bu bölümdeki slaytların her biri için, dokümantasyon sayfalarını gözden " +"geçirerek biraz zaman ayırın ve daha yaygın metotlardan bazılarını öne " +"çıkarın." #: src/std-types/std.md msgid "" @@ -7215,45 +7707,61 @@ msgid "" "types used by Rust libraries and programs. This way, two libraries can work " "together smoothly because they both use the same `String` type." msgstr "" +"Rust, Rust kütüphaneleri ve programları tarafından kullanılan bir dizi ortak " +"türün oluşturulmasına yardımcı olan bir standart kütüphane ile birlikte " +"gelir. Bu şekilde, her hangi iki kütüphane aynı `String` türünü kullandığı " +"için sorunsuzca birlikte çalışabilir." #: src/std-types/std.md msgid "" "In fact, Rust contains several layers of the Standard Library: `core`, " "`alloc` and `std`." msgstr "" +"Aslında Rust, Standart Kütüphanenin birkaç katmanını içerir: `core`, `alloc` " +"ve `std`." #: src/std-types/std.md msgid "" "`core` includes the most basic types and functions that don't depend on " "`libc`, allocator or even the presence of an operating system." msgstr "" +"`core`, `libc`'ye, tahsis ediciye (allocator) ve hatta bir işletim " +"sisteminin varlığına bağlı olmayan en temel türleri ve fonksiyonları içerir." #: src/std-types/std.md msgid "" "`alloc` includes types which require a global heap allocator, such as `Vec`, " "`Box` and `Arc`." msgstr "" +"`alloc`, `Vec`, `Box` ve `Arc` gibi global bir dinamik bellek tahsis " +"edicisini (heap allocator) gerektiren türleri içerir." #: src/std-types/std.md msgid "" "Embedded Rust applications often only use `core`, and sometimes `alloc`." msgstr "" +"Gömülü Rust uygulamaları genellikle sadece `core` ve bazen de `alloc` " +"kullanır." #: src/std-types/docs.md msgid "Rust comes with extensive documentation. For example:" -msgstr "" +msgstr "Rust, kapsamlı bir dokümantasyonla birlikte gelir. Örneğin:" #: src/std-types/docs.md msgid "" "All of the details about [loops](https://doc.rust-lang.org/stable/reference/" "expressions/loop-expr.html)." msgstr "" +"[Döngüler](https://doc.rust-lang.org/stable/reference/expressions/loop-expr." +"html) hakkındaki tüm ayrıntılar." #: src/std-types/docs.md msgid "" "Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive." "u8.html)." msgstr "" +"[`u8`](https://doc.rust-lang.org/stable/std/primitive.u8.html) gibi ilkel " +"türler (primitive types)." #: src/std-types/docs.md msgid "" @@ -7261,14 +7769,19 @@ msgid "" "option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/" "std/collections/struct.BinaryHeap.html)." msgstr "" +"[`Option`](https://doc.rust-lang.org/stable/std/option/enum.Option.html) " +"veya [`BinaryHeap`](https://doc.rust-lang.org/stable/std/collections/struct." +"BinaryHeap.html) gibi standart kütüphane türleri." #: src/std-types/docs.md msgid "Use `rustup doc --std` or to view the documentation." msgstr "" +"Dokümantasyonu görüntülemek için `rustup doc --std` veya " +"kullanın." #: src/std-types/docs.md msgid "In fact, you can document your own code:" -msgstr "" +msgstr "Aslında, kendi kodunuzu belgeleyebilirsiniz:" #: src/std-types/docs.md msgid "" @@ -7277,6 +7790,9 @@ msgid "" "///\n" "/// If the second argument is zero, the result is false.\n" msgstr "" +"/// İlk argümanın ikinci argümana bölünüp bölünemeyeceğini belirle.\n" +"///\n" +"/// İkinci argüman sıfır ise, sonuç yanlıştır.\n" #: src/std-types/docs.md msgid "" @@ -7285,24 +7801,36 @@ msgid "" "(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is " "idiomatic to document all public items in an API using this pattern." msgstr "" +"İçerikler Markdown olarak işlenir. Yayınlanan tüm Rust kütüphane kasaları " +"(crates), [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) " +"aracı kullanılarak [`docs.rs`](https://docs.rs) adresinde otomatik olarak " +"belgelenir. Bir API'deki tüm genel (public) öğeleri bu deseni kullanarak " +"belgelemek, tercih edilen yaklaşımdır (idiomatic)." #: src/std-types/docs.md msgid "" "To document an item from inside the item (such as inside a module), use `//!" "` or `/*! .. */`, called \"inner doc comments\":" msgstr "" +"Bir öğeyi, öğenin içinden (bir modülün içi gibi) belgelemek için \"iç " +"doküman yorumları (inner doc comments)\" olarak adlandırılan `//!` veya `/" +"*! .. */` kullanın:" #: src/std-types/docs.md msgid "" "//! This module contains functionality relating to divisibility of " "integers.\n" msgstr "" +"//! Bu modül, tamsayıların bölünebilirliği ile ilgili fonksiyonellik " +"içerir.\n" #: src/std-types/docs.md msgid "" "Show students the generated docs for the `rand` crate at ." msgstr "" +"Öğrencilere adresindeki `rand` kasası (crate) için " +"oluşturulmuş belgeleri gösterin." #: src/std-types/option.md msgid "" @@ -7310,44 +7838,57 @@ msgid "" "type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/" "stable/std/string/struct.String.html#method.find) returns an `Option`." msgstr "" +"Daha önce `Option`'nin bazı kullanımlarını görmüştük. Ya `T` türünde bir " +"değer saklar ya da hiçbir şey saklamaz. Örneğin, [`String::find`](https://" +"doc.rust-lang.org/stable/std/string/struct.String.html#method.find) bir " +"`Option` geri döndürür." #: src/std-types/option.md msgid "\"Löwe 老虎 Léopard Gepardi\"" -msgstr "" +msgstr "\"Löwe 老虎 Léopard Gepardi\"" #: src/std-types/option.md msgid "'é'" -msgstr "" +msgstr "'é'" #: src/std-types/option.md msgid "'Z'" -msgstr "" +msgstr "'Z'" #: src/std-types/option.md msgid "\"Character not found\"" -msgstr "" +msgstr "\"Karakter bulunamadı\"" #: src/std-types/option.md msgid "`Option` is widely used, not just in the standard library." msgstr "" +"`Option` sadece standart kütüphanede kullanılır gibi bir şey yoktur, yaygın " +"olarak kullanılır." #: src/std-types/option.md msgid "" "`unwrap` will return the value in an `Option`, or panic. `expect` is similar " "but takes an error message." msgstr "" +"`unwrap`, bir `Option` içindeki değeri geri döndürür veya paniğe (panic) " +"neden olur. `expect` benzerdir ancak bir hata mesajı (error message) alır." #: src/std-types/option.md msgid "" "You can panic on None, but you can't \"accidentally\" forget to check for " "None." msgstr "" +"None durumunda panik alabilirsiniz, ancak None'ı kontrol etmeyi " +"\"yanlışlıkla\" unutamazsınız." #: src/std-types/option.md msgid "" "It's common to `unwrap`/`expect` all over the place when hacking something " "together, but production code typically handles `None` in a nicer fashion." msgstr "" +"Bir şeyler üzerinde çalışırken her yerde `unwrap`/`expect` kullanmak " +"yaygındır, ancak üretim (production) kodu genellikle `None`'ı daha şık bir " +"şekilde ele alır." #: src/std-types/option.md msgid "" @@ -7357,6 +7898,12 @@ msgid "" "uses NULL to represent the `None` variant, and thus can be stored in the " "same memory as `&T`." msgstr "" +"\"Niş/oyuk optimizasyonu (niche optimization)\", T'nin geçerli bir değeri " +"olmayan bir gösterimi (representation) varsa, `Option`'nin genellikle " +"bellekte `T` ile aynı boyuta sahip olduğu anlamına gelir. Örneğin, bir " +"referans NULL olamaz, bu nedenle `Option<&T>` `None` varyantını temsil etmek " +"için otomatik olarak NULL kullanır ve bu sayede `&T` ile aynı bellekte " +"saklanabilir." #: src/std-types/result.md msgid "" @@ -7364,22 +7911,26 @@ msgid "" "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 "" +"`Result`, `Option`'a benzer, ancak her biri farklı bir enum varyantına sahip " +"bir işlemin başarısını veya başarısızlığını belirtir. Genelleştirilmiştir " +"(generic): `Result`; burada `T`, `Ok` varyantında kullanılır ve `E`, " +"`Err` varyantında görünür." #: src/std-types/result.md src/error-handling/result.md msgid "\"diary.txt\"" -msgstr "" +msgstr "\"günlük.txt\"" #: src/std-types/result.md src/error-handling/result.md msgid "\"Dear diary: {contents} ({bytes} bytes)\"" -msgstr "" +msgstr "\"Sevgili günlük: {contents} ({bytes} bayt)\"" #: src/std-types/result.md src/error-handling/result.md msgid "\"Could not read file content\"" -msgstr "" +msgstr "\"Dosya içeriği okunamadı\"" #: src/std-types/result.md src/error-handling/result.md msgid "\"The diary could not be opened: {err}\"" -msgstr "" +msgstr "\"Günlük açılamadı: {err}\"" #: src/std-types/result.md msgid "" @@ -7388,6 +7939,11 @@ msgid "" "case where an error should never happen, `unwrap()` or `expect()` can be " "called, and this is a signal of the developer intent too." msgstr "" +"`Option`'da olduğu gibi, başarılı değer `Result`'ın içinde yer alır ve " +"geliştiriciyi onu açıkça (explicitly) çıkarmaya zorlar. Bu, hata kontrolünü " +"teşvik eder. Bir hatanın asla olmaması gereken durumlarda, `unwrap()` veya " +"`expect()` çağrılabilir ve bu aynı zamanda geliştiricinin niyetinin de bir " +"işaretidir." #: src/std-types/result.md msgid "" @@ -7395,18 +7951,25 @@ msgid "" "is worth mentioning. It contains a lot of convenience methods and functions " "that help functional-style programming." msgstr "" +"`Result` dokümantasyonunu okumanız tavsiye edilir. Kurs sırasında değil, ama " +"bahsetmeye değer. Fonksiyonel tarzda programlamaya yardımcı olan birçok " +"kullanışlı metot ve fonksiyon içerir." #: src/std-types/result.md msgid "" "`Result` is the standard type to implement error handling as we will see on " "Day 4." msgstr "" +"`Result`, 4. Günde göreceğimiz gibi hata işlemeyi (error handling) " +"gerçekleştirmek (implement) için standart türdür." #: src/std-types/string.md msgid "" "[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a " "growable UTF-8 encoded string:" msgstr "" +"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) türü, " +"büyüyebilir, UTF-8 olarak kodlanmış bir dizedir (string):" #: src/std-types/string.md src/std-traits/comparisons.md #: src/std-traits/read-and-write.md src/memory-management/review.md @@ -7416,23 +7979,23 @@ msgstr "\"Merhaba\"" #: src/std-types/string.md msgid "\"s1: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"s1: uzunluk = {}, kapasite = {}\"" #: src/std-types/string.md msgid "'!'" -msgstr "" +msgstr "'!'" #: src/std-types/string.md msgid "\"s2: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"s2: uzunluk = {}, kapasite = {}\"" #: src/std-types/string.md msgid "\"🇨🇭\"" -msgstr "" +msgstr "\"🇹🇷\"" #: src/std-types/string.md msgid "\"s3: len = {}, number of chars = {}\"" -msgstr "" +msgstr "\"s3: uzunluk = {}, karakter sayısı = {}\"" #: src/std-types/string.md msgid "" @@ -7440,18 +8003,26 @@ msgid "" "string/struct.String.html#deref-methods-str), which means that you can call " "all `str` methods on a `String`." msgstr "" +"`String`, [`Deref`](https://doc.rust-lang.org/std/string/" +"struct.String.html#deref-methods-str) özelliğini gerçekleştirir (implement), " +"bu da bir `String` üzerinde tüm `str` metotlarını çağırabileceğiniz anlamına " +"gelir." #: src/std-types/string.md msgid "" "`String::new` returns a new empty string, use `String::with_capacity` when " "you know how much data you want to push to the string." msgstr "" +"`String::new` yeni bir boş dize geri döndürür, dizeye ne kadar veri eklemek " +"istediğinizi bildiğinizde `String::with_capacity` kullanın." #: src/std-types/string.md msgid "" "`String::len` returns the size of the `String` in bytes (which can be " "different from its length in characters)." msgstr "" +"`String::len`, `String`'in bayt cinsinden boyutunu geri döndürür (bu, " +"karakter cinsinden uzunluğundan farklı olabilir)." #: src/std-types/string.md msgid "" @@ -7460,34 +8031,48 @@ msgid "" "to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/" "unicode_segmentation/struct.Graphemes.html)." msgstr "" +"`String::chars`, gerçek karakterler üzerinde bir adımlayıcı (iterator) geri " +"döndürür. [yazıbirim (grapheme) kümeleri](https://docs.rs/unicode-" +"segmentation/latest/unicode_segmentation/struct.Graphemes.html) nedeniyle " +"bir `char`'ın bir insanın \"karakter\" olarak kabul edeceği şeyden farklı " +"olabileceğini unutmayın." #: src/std-types/string.md msgid "" "When people refer to strings they could either be talking about `&str` or " "`String`." msgstr "" +"İnsanlar dizelerden (strings) bahsettiğinde, ya `&str` ya da `String`'den " +"bahsediyor olabilirler." #: src/std-types/string.md msgid "" "When a type implements `Deref`, the compiler will let you " "transparently call methods from `T`." msgstr "" +"Bir tür `Deref`'yi gerçekleştirdiğinde (implement), derleyici " +"`T`'den metotları şeffaf bir şekilde çağırmanıza izin verir." #: src/std-types/string.md msgid "" "We haven't discussed the `Deref` trait yet, so at this point this mostly " "explains the structure of the sidebar in the documentation." msgstr "" +"`Deref` özelliğini (trait) henüz tartışmadık, bu yüzden bu noktada bu " +"çoğunlukla dokümantasyondaki kenar çubuğunun yapısını (neden String türünün " +"altında str metodlarının da görüldüğünü) açıklar." #: src/std-types/string.md msgid "" "`String` implements `Deref` which transparently gives it " "access to `str`'s methods." msgstr "" +"`String`, `Deref` özelliğini gerçekleştirir (implement) ve bu " +"ona şeffaf bir şekilde `str`'nin metotlarına erişim sağlar." #: src/std-types/string.md msgid "Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`." -msgstr "" +msgstr "`let s3 = s1.deref();` ve `let s3 = &*s1;` yazıp karşılaştırın." #: src/std-types/string.md msgid "" @@ -7495,22 +8080,29 @@ msgid "" "operations you see supported on vectors are also supported on `String`, but " "with some extra guarantees." msgstr "" +"`String`, bir bayt vektörü etrafında bir sarmalayıcı (wrapper) olarak " +"gerçekleştirilmiştir (implement), vektörlerde desteklenen birçok işlem " +"`String`'de de desteklenir, ancak bazı ek garantilerle." #: src/std-types/string.md msgid "Compare the different ways to index a `String`:" -msgstr "" +msgstr "Bir `String`'e erimenin farklı yollarını karşılaştırın:" #: src/std-types/string.md msgid "" "To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, " "out-of-bounds." msgstr "" +"`i`'nin sınırlar içinde veya dışında olduğu `s3.chars().nth(i).unwrap()` " +"kullanarak bir karaktere erişmek." #: src/std-types/string.md msgid "" "To a substring by using `s3[0..4]`, where that slice is on character " "boundaries or not." msgstr "" +"Bu dilimin (slice) karakter sınırlarına denk gelip gelmediği durumlarda " +"`s3[0..4]` kullanarak bir alt dizeye erişmek." #: src/std-types/string.md msgid "" @@ -7520,36 +8112,45 @@ msgid "" "`Display`, so anything that can be formatted can also be converted to a " "string." msgstr "" +"Birçok tür, [`to_string`](https://doc.rust-lang.org/std/string/trait." +"ToString.html#tymethod.to_string) metodu ile bir dizeye dönüştürülebilir. Bu " +"özellik (trait), `Display`'i gerçekleştiren (implement) tüm türler için " +"otomatik olarak gerçekleştirilir, bu nedenle biçimlendirilebilen (format) " +"her şey bir dizeye de dönüştürülebilir." #: src/std-types/vec.md msgid "" "[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard " "resizable heap-allocated buffer:" msgstr "" +"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html), standart yeniden " +"boyutlandırılabilir dinamik bellekten tahsis edilen arabellektir (heap-" +"allocated buffer):" #: src/std-types/vec.md msgid "\"v1: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"v1: uzunluk = {}, kapasite = {}\"" #: src/std-types/vec.md msgid "\"v2: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"v2: uzunluk = {}, kapasite = {}\"" #: src/std-types/vec.md msgid "// Canonical macro to initialize a vector with elements.\n" msgstr "" +"// Bir vektörü elemanlarla ilklendirmek (initialize) için standart makro.\n" #: src/std-types/vec.md msgid "// Retain only the even elements.\n" -msgstr "" +msgstr "// Sadece çift elemanları tut.\n" #: src/std-types/vec.md msgid "\"{v3:?}\"" -msgstr "" +msgstr "\"{v3:?}\"" #: src/std-types/vec.md msgid "// Remove consecutive duplicates.\n" -msgstr "" +msgstr "// Ardışık kopyaları sil.\n" #: src/std-types/vec.md msgid "" @@ -7557,6 +8158,9 @@ msgid "" "struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice " "methods on a `Vec`." msgstr "" +"`Vec`, [`Deref`](https://doc.rust-lang.org/std/vec/struct.Vec." +"html#deref-methods-%5BT%5D) özelliğini gerçekleştirir (implement), bu da bir " +"`Vec` üzerinde dilim (slice) metotlarını çağırabileceğiniz anlamına gelir." #: src/std-types/vec.md msgid "" @@ -7564,6 +8168,10 @@ msgid "" "it contains is stored on the heap. This means the amount of data doesn't " "need to be known at compile time. It can grow or shrink at runtime." msgstr "" +"`Vec`, `String` ve `HashMap` ile birlikte bir koleksiyon türüdür. İçerdiği " +"veriler dinamik bellekte (heap) saklanır. Bu, veri miktarının derleme " +"zamanında bilinmesi gerekmediği anlamına gelir. Çalışma zamanında " +"büyüyebilir veya küçülebilir." #: src/std-types/vec.md msgid "" @@ -7571,12 +8179,18 @@ msgid "" "explicitly. As always with Rust type inference, the `T` was established " "during the first `push` call." msgstr "" +"`Vec`'nin de genelleştirilmiş (generic) bir tür olduğuna, ancak `T`'yi " +"açıkça belirtmek zorunda olmadığınıza dikkat edin. Rust tür çıkarımında " +"(type inference) her zaman olduğu gibi, `T` ilk `push` çağrısı sırasında " +"belirlenmiştir." #: src/std-types/vec.md msgid "" "`vec![...]` is a canonical macro to use instead of `Vec::new()` and it " "supports adding initial elements to the vector." msgstr "" +"`vec![...]`, `Vec::new()` yerine kullanılacak standart bir makrodur ve " +"vektöre başlangıç elemanları eklemeyi destekler." #: src/std-types/vec.md msgid "" @@ -7584,57 +8198,59 @@ msgid "" "Alternatively, using `get` will return an `Option`. The `pop` function will " "remove the last element." msgstr "" - -#: src/std-types/vec.md -msgid "" -"Slices are covered on day 3. For now, students only need to know that a " -"value of type `Vec` gives access to all of the documented slice methods, too." -msgstr "" +"Vektörün elemanlarına erişmek için `[` `]` kullanırsınız, ancak sınırlar " +"dışındaysa paniğe (panic) neden olurlar. Alternatif olarak, `get` kullanmak " +"bir `Option` geri döndürür. `pop` fonksiyonu son elemanı siler." #: src/std-types/hashmap.md msgid "Standard hash map with protection against HashDoS attacks:" msgstr "" +"HashDoS saldırılarına karşı korumalı standart özet haritası (hash map):" #: src/std-types/hashmap.md msgid "\"Adventures of Huckleberry Finn\"" -msgstr "" +msgstr "\"Fadiş\"" #: src/std-types/hashmap.md msgid "\"Grimms' Fairy Tales\"" -msgstr "" +msgstr "\"Dede Korkut Hikayeleri\"" #: src/std-types/hashmap.md msgid "\"Pride and Prejudice\"" -msgstr "" +msgstr "\"Aşk-ı Memnu\"" #: src/std-types/hashmap.md msgid "\"Les Misérables\"" -msgstr "" +msgstr "\"İnce Mehmed\"" #: src/std-types/hashmap.md msgid "\"We know about {} books, but not Les Misérables.\"" -msgstr "" +msgstr "\"{} kitap hakkında bilgimiz var, ama İnce Mehmed hakkında yok.\"" #: src/std-types/hashmap.md msgid "\"Alice's Adventure in Wonderland\"" -msgstr "" +msgstr "\"Keloğlan Masalları \"" #: src/std-types/hashmap.md msgid "\"{book}: {count} pages\"" -msgstr "" +msgstr "\"{book}: {count} sayfa\"" #: src/std-types/hashmap.md msgid "\"{book} is unknown.\"" -msgstr "" +msgstr "\"{book} bilinmiyor.\"" #: src/std-types/hashmap.md msgid "// Use the .entry() method to insert a value if nothing is found.\n" msgstr "" +"// Eğer bir şey bulunmazsa bir değer eklemek için .entry() metodunu " +"kullanın.\n" #: src/std-types/hashmap.md msgid "" "`HashMap` is not defined in the prelude and needs to be brought into scope." msgstr "" +"`HashMap`, başlangıç (prelude) kısmında tanımlı değildir ve kapsama (scope) " +"alınması gerekir." #: src/std-types/hashmap.md msgid "" @@ -7642,18 +8258,21 @@ msgid "" "hashmap and if not return an alternative value. The second line will insert " "the alternative value in the hashmap if the book is not found." msgstr "" +"Aşağıdaki kod satırlarını deneyin. İlk satır bir kitabın hash haritasında " +"olup olmadığına bakar ve yoksa alternatif bir değer geri döndürür. İkinci " +"satır, kitap bulunmazsa alternatif değeri hash haritasına ekler." #: src/std-types/hashmap.md msgid "\"Harry Potter and the Sorcerer's Stone\"" -msgstr "" +msgstr "\"Osmanlı Cadısı\"" #: src/std-types/hashmap.md msgid "\"The Hunger Games\"" -msgstr "" +msgstr "\"Gri Gökyüzü \"" #: src/std-types/hashmap.md msgid "Unlike `vec!`, there is unfortunately no standard `hashmap!` macro." -msgstr "" +msgstr "`vec!`'in aksine, maalesef standart bir `hashmap!` makrosu yoktur." #: src/std-types/hashmap.md msgid "" @@ -7662,12 +8281,19 @@ msgid "" "From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows " "us to easily initialize a hash map from a literal array:" msgstr "" +"Ancak, Rust 1.56'dan beri, HashMap [`From<[(K, V); N]>`](https://doc.rust-" +"lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C%5B(K,+V);" +"+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E) özelliğini (trait) " +"gerçekleştirir (implement), bu da bir özet haritasını (hash map) bir " +"değişmez (literal) diziden kolayca ilklendirmemize (initialize) olanak tanır:" #: src/std-types/hashmap.md msgid "" "Alternatively HashMap can be built from any `Iterator` which yields key-" "value tuples." msgstr "" +"Alternatif olarak HashMap, anahtar-değer (key-value) demetleri (tuple) " +"üreten herhangi bir `Iterator`'dan oluşturulabilir." #: src/std-types/hashmap.md msgid "" @@ -7676,6 +8302,10 @@ msgid "" "Rust docs. Show students the docs for this type, and the helpful link back " "to the `keys` method." msgstr "" +"Bu tür, `std::collections::hash_map::Keys` gibi birkaç \"metoda özgü\" geri " +"dönüş türüne sahiptir. Bu türler genellikle Rust belgelerindeki aramalarda " +"görünür. Öğrencilere bu türün belgelerini ve `keys` metoduna geri dönen " +"yardımcı bağlantıyı gösterin." #: src/std-types/exercise.md msgid "" @@ -7684,6 +8314,10 @@ msgid "" "stable/std/collections/struct.HashMap.html) to keep track of which values " "have been seen and how many times each one has appeared." msgstr "" +"Bu alıştırmada çok basit bir veri yapısı alıp onu genelleştirilmiş (generic) " +"hale getireceksiniz. Hangi değerlerin görüldüğünü ve her birinin kaç kez " +"göründüğünü takip etmek için bir [`std::collections::HashMap`](https://doc." +"rust-lang.org/stable/std/collections/struct.HashMap.html) kullanır." #: src/std-types/exercise.md msgid "" @@ -7691,6 +8325,10 @@ msgid "" "values. Make the struct and its methods generic over the type of value being " "tracked, that way `Counter` can track any type of value." msgstr "" +"`Counter`'ın ilk sürümü sadece `u32` değerleri için çalışacak şekilde sabit " +"kodlanmıştır. Yapıyı ve metotlarını, izlenen değerin türü üzerinde " +"genelleştirme (generic) yapın, bu şekilde `Counter` her tür değeri " +"izleyebilir." #: src/std-types/exercise.md msgid "" @@ -7698,281 +8336,43 @@ msgid "" "stable/std/collections/struct.HashMap.html#method.entry) method to halve the " "number of hash lookups required to implement the `count` method." msgstr "" +"Eğer erken bitirirseniz, `count` metodunu gerçekleştirmek (implement) için " +"gereken özet (hash) arama sayısını yarıya indirmek için [`entry`](https://" +"doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.entry) " +"metodunu kullanmayı deneyin." #: src/std-types/exercise.md src/std-types/solution.md msgid "" "/// Counter counts the number of times each value of type T has been seen.\n" -msgstr "" +msgstr "/// Counter, T türündeki her bir değerin kaç kez görüldüğünü sayar.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Create a new Counter.\n" -msgstr "" +msgstr "/// Yeni bir Counter oluştur.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Count an occurrence of the given value.\n" -msgstr "" +msgstr "/// Verilen değerin bir tekrarını say.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Return the number of times the given value has been seen.\n" -msgstr "" +msgstr "/// Verilen değerin kaç kez görüldüğünü geri döndür.\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"saw {} values equal to {}\"" -msgstr "" +msgstr "\"{} değer {}`e eşit görüldü\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"apple\"" -msgstr "" +msgstr "\"elma\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"orange\"" -msgstr "" +msgstr "\"portakal\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"got {} apples\"" -msgstr "" - -#: src/closures.md src/concurrency/threads.md src/concurrency/shared-state.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/closures/syntax.md -msgid "Closures are created with vertical bars: `|..| ..`." -msgstr "" - -#: src/closures/syntax.md -msgid "// Argument and return type can be inferred for lightweight syntax:\n" -msgstr "" - -#: src/closures/syntax.md -msgid "// Or we can specify types and bracket the body to be fully explicit:\n" -msgstr "" - -#: src/closures/syntax.md -msgid "" -"The arguments go between the `|..|`. The body can be surrounded by `{ .. }`, " -"but if it is a single expression these can be omitted." -msgstr "" - -#: src/closures/syntax.md -msgid "" -"Argument types are optional, and are inferred if not given. The return type " -"is also optional, but can only be written if using `{ .. }` around the body." -msgstr "" - -#: src/closures/syntax.md -msgid "" -"The examples can both be written as mere nested functions instead -- they do " -"not capture any variables from their lexical environment. We will see " -"captures next." -msgstr "" - -#: src/closures/syntax.md -msgid "" -"The ability to store functions in variables doesn't just apply to closures, " -"regular functions can be put in variables and then invoked the same way that " -"closures can: [Example in the playground](https://play.rust-lang.org/?" -"version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda)." -msgstr "" - -#: src/closures/syntax.md -msgid "" -"The linked example also demonstrates that closures that don't capture " -"anything can also coerce to a regular function pointer." -msgstr "" - -#: src/closures/capturing.md -msgid "" -"A closure can capture variables from the environment where it was defined." -msgstr "" - -#: src/closures/capturing.md -msgid "" -"By default, a closure captures values by reference. Here `max_value` is " -"captured by `clamp`, but still available to `main` for printing. Try making " -"`max_value` mutable, changing it, and printing the clamped values again. Why " -"doesn't this work?" -msgstr "" - -#: src/closures/capturing.md -msgid "" -"If a closure mutates values, it will capture them by mutable reference. Try " -"adding `max_value += 1` to `clamp`." -msgstr "" - -#: src/closures/capturing.md -msgid "" -"You can force a closure to move values instead of referencing them with the " -"`move` keyword. This can help with lifetimes, for example if the closure " -"must outlive the captured values (more on lifetimes later)." -msgstr "" - -#: src/closures/capturing.md -msgid "" -"This looks like `move |v| ..`. Try adding this keyword and see if `main` can " -"still access `max_value` after defining `clamp`." -msgstr "" - -#: src/closures/capturing.md -msgid "" -"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/closures/traits.md -msgid "Closure traits" -msgstr "Çevreleyici özellikler (Closures traits)" - -#: src/closures/traits.md -msgid "" -"Closures or lambda expressions have types which cannot be named. However, " -"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn." -"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and " -"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:" -msgstr "" - -#: src/closures/traits.md -msgid "" -"The special types `fn(..) -> T` refer to function pointers - either the " -"address of a function, or a closure that captures nothing." -msgstr "" - -#: src/closures/traits.md -msgid "\"Calling {func_name}({input}): {}\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"-itis\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"{x}{suffix}\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"add_suffix\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"senior\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"appenix\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"/\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"accumulate\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"red\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"green\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"blue\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"take_and_reverse\"" -msgstr "" - -#: src/closures/traits.md -msgid "\"reversed: \"" -msgstr "" - -#: src/closures/traits.md -msgid "" -"An `Fn` (e.g. `add_suffix`) 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/closures/traits.md -msgid "" -"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/closures/traits.md -msgid "" -"If you have an `FnOnce` (e.g. `take_and_reverse`), you may only call it " -"once. Doing so consumes the closure and any values captured by move." -msgstr "" - -#: src/closures/traits.md -msgid "" -"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. " -"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can " -"use an `Fn` wherever an `FnMut` or `FnOnce` is called for." -msgstr "" - -#: src/closures/traits.md -msgid "" -"When you define a function that takes a closure, you should take `FnOnce` if " -"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows " -"the most flexibility for the caller." -msgstr "" - -#: src/closures/traits.md -msgid "" -"In contrast, when you have a closure, the most flexible you can have is `Fn` " -"(which can be passed to a consumer of any of the 3 closure traits), then " -"`FnMut`, and lastly `FnOnce`." -msgstr "" - -#: src/closures/traits.md -msgid "" -"The compiler also infers `Copy` (e.g. for `add_suffix`) and `Clone` (e.g. " -"`take_and_reverse`), depending on what the closure captures. Function " -"pointers (references to `fn` items) implement `Copy` and `Fn`." -msgstr "" - -#: src/closures/exercise.md -msgid "" -"Building on the generic logger from this morning, implement a `Filter` which " -"uses a closure to filter log messages, sending those which pass the " -"filtering predicate to an inner logger." -msgstr "" - -#: src/closures/exercise.md -msgid "// TODO: Define and implement `Filter`.\n" -msgstr "" - -#: src/closures/exercise.md src/closures/solution.md -msgid "\"yikes\"" -msgstr "" - -#: src/closures/exercise.md src/closures/solution.md -msgid "\"yikes, something went wrong\"" -msgstr "" - -#: src/closures/exercise.md src/closures/solution.md -msgid "\"uhoh\"" -msgstr "" - -#: src/closures/solution.md -msgid "/// Only log messages matching a filtering predicate.\n" -msgstr "" - -#: src/closures/solution.md -msgid "" -"Note that the `P: Fn(u8, &str) -> bool` bound on the first `Filter` impl " -"block isn't strictly necessary, but it helps with type inference when " -"calling `new`. Demonstrate removing it and showing how the compiler now " -"needs type annotations for the closure passed to `new`." -msgstr "" +msgstr "\"{} elma alındı\"" #: src/std-traits.md msgid "From and Into" @@ -7984,33 +8384,40 @@ msgstr "Read ve Write" #: src/std-traits.md msgid "Default, struct update syntax" -msgstr "Varsayılan, yapı (struct) güncelleme sözdizimi" +msgstr "Default, yapı güncelleme sözdizimi (struct update syntax)" #: src/std-traits.md msgid "" "As with the standard-library types, spend time reviewing the documentation " "for each trait." msgstr "" +"Standart kütüphane türlerinde olduğu gibi, her bir özellik (trait) için de " +"dokümantasyonu gözden geçirmeye zaman ayırın." #: src/std-traits.md msgid "This section is long. Take a break midway through." -msgstr "" +msgstr "Bu bölüm uzun. Ortasında bir mola verin." #: src/std-traits/comparisons.md msgid "" "These traits support comparisons between values. All traits can be derived " "for types containing fields that implement these traits." msgstr "" +"Bu özellikler (traits), değerler arasında karşılaştırmaları destekler. Tüm " +"özellikler, bu özellikleri gerçekleştiren (implement) alanlar içeren türler " +"için türetilebilir." #: src/std-traits/comparisons.md msgid "`PartialEq` and `Eq`" -msgstr "" +msgstr "`PartialEq` ve `Eq`" #: src/std-traits/comparisons.md msgid "" "`PartialEq` is a partial equivalence relation, with required method `eq` and " "provided method `ne`. The `==` and `!=` operators will call these methods." msgstr "" +"`PartialEq`, gerekli metot `eq` ve sağlanan metot `ne` ile kısmi bir denklik " +"ilişkisidir. `==` ve `!=` operatörleri bu metotları çağırır." #: src/std-traits/comparisons.md msgid "" @@ -8018,32 +8425,42 @@ msgid "" "and implies `PartialEq`. Functions that require full equivalence will use " "`Eq` as a trait bound." msgstr "" +"`Eq` tam bir denklik ilişkisidir (yansımalı, simetrik ve geçişme) " +"(reflexive, symmetric, and transitive) ve `PartialEq` özelliğini kapsar " +"(imply). Tam denklik gerektiren fonksiyonlar, bir özellik sınırı (trait " +"bound) olarak `Eq` kullanır." #: src/std-traits/comparisons.md msgid "`PartialOrd` and `Ord`" -msgstr "" +msgstr "`PartialOrd` ve `Ord`" #: src/std-traits/comparisons.md msgid "" "`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is " "used to implement the `<`, `<=`, `>=`, and `>` operators." msgstr "" +"`PartialOrd`, `partial_cmp` metoduyla kısmi bir sıralama tanımlar. `<`, " +"`<=`, `>=` ve `>` operatörlerini gerçekleştirmek (implement) için kullanılır." #: src/std-traits/comparisons.md msgid "`Ord` is a total ordering, with `cmp` returning `Ordering`." -msgstr "" +msgstr "`Ord`, `cmp`'nin `Ordering` geri döndürdüğü tam bir sıralamadır." #: src/std-traits/comparisons.md msgid "" "`PartialEq` can be implemented between different types, but `Eq` cannot, " "because it is reflexive:" msgstr "" +"`PartialEq` farklı türler arasında gerçekleştirilebilir (implement), ancak " +"`Eq` yansımalı (reflexive) olduğu için gerçekleştirilemez:" #: src/std-traits/comparisons.md msgid "" "In practice, it's common to derive these traits, but uncommon to implement " "them." msgstr "" +"Pratikte bu özellikleri (traits) türetmek (derive) yaygındır, ancak onları " +"gerçekleştirmek (implement) yaygın değildir." #: src/std-traits/comparisons.md msgid "" @@ -8052,25 +8469,34 @@ msgid "" "references to two different things can compare as equal if the values " "pointed to are the same:" msgstr "" +"Rust'ta referansları karşılaştırırken, gösterdikleri şeylerin değerini " +"karşılaştırır, referansların kendilerini DEĞİL. Bu, gösterilen değerler " +"aynıysa, iki farklı şeye yapılan referansların eşit olarak " +"karşılaştırılabileceği anlamına gelir:" #: src/std-traits/operators.md msgid "" "Operator overloading is implemented via traits in [`std::ops`](https://doc." "rust-lang.org/std/ops/index.html):" msgstr "" +"Operatör yüklemesi (overloading), [`std::ops`](https://doc.rust-lang.org/std/" +"ops/index.html)'deki özellikler (traits) aracılığıyla gerçekleştirilir " +"(implement):" #: src/std-traits/operators.md msgid "\"{p1:?} + {p2:?} = {:?}\"" -msgstr "" +msgstr "\"{p1:?} + {p2:?} = {:?}\"" #: src/std-traits/operators.md src/memory-management/drop.md msgid "Discussion points:" -msgstr "" +msgstr "Tartışma noktaları:" #: src/std-traits/operators.md msgid "" "You could implement `Add` for `&Point`. In which situations is that useful?" msgstr "" +"`&Point` için `Add`'i gerçekleştirebilirsiniz (implement). Bu hangi " +"durumlarda kullanışlıdır?" #: src/std-traits/operators.md msgid "" @@ -8078,12 +8504,17 @@ msgid "" "the operator is not `Copy`, you should consider overloading the operator for " "`&T` as well. This avoids unnecessary cloning on the call site." msgstr "" +"Cevap: `Add:add`, `self`'i tüketir. Operatörü yüklediğiniz `T` türü `Copy` " +"değilse, operatörü `&T` için de yüklemey yapmayı (overloading) " +"düşünmelisiniz. Bu, çağrı yerleride (call site) gereksiz klonlamayı önler." #: src/std-traits/operators.md msgid "" "Why is `Output` an associated type? Could it be made a type parameter of the " "method?" msgstr "" +"`Output` neden bir ilişkili türdür (associated type)? Metodun bir tür " +"parametresi yapılabilir miydi?" #: src/std-traits/operators.md msgid "" @@ -8091,12 +8522,17 @@ msgid "" "associated types (like `Output`) are controlled by the implementer of a " "trait." msgstr "" +"Kısa cevap: Fonksiyon tür parametreleri çağıran (caller) tarafından kontrol " +"edilir, ancak ilişkili türler (`Output` gibi) bir özelliğin (trait) " +"gerçekleştiricisi (implementer) tarafından kontrol edilir." #: src/std-traits/operators.md msgid "" "You could implement `Add` for two different types, e.g. `impl Add<(i32, " "i32)> for Point` would add a tuple to a `Point`." msgstr "" +"İki farklı tür için `Add` gerçekleştirebilirsiniz (implement), örn. `impl " +"Add<(i32, i32)> for Point`, bu bir `Point`'e bir demet (tuple) eklerdi." #: src/std-traits/operators.md msgid "" @@ -8105,6 +8541,10 @@ msgid "" "negates each bit of the number, which arithmetically is equivalent to " "subtracting it from -1: `!5 == -6`." msgstr "" +"`Not` özelliği (`!` operatörü), C ailesi dillerindeki aynı operatör gibi " +"\"boole'laştırmadığı\" için dikkat çekicidir; bunun yerine, tamsayı türleri " +"için sayının her bitini olumsuzlar, bu da aritmetik olarak onu -1'den " +"çıkarmaya eşdeğerdir: `!5 == -6`." #: src/std-traits/from-and-into.md msgid "" @@ -8113,10 +8553,14 @@ msgid "" "facilitate type conversions. Unlike `as`, these traits correspond to " "lossless, infallible conversions." msgstr "" +"Türler, tür dönüşümlerini kolaylaştırmak için [`From`](https://doc.rust-lang." +"org/std/convert/trait.From.html) ve [`Into`](https://doc.rust-lang.org/std/" +"convert/trait.Into.html) özelliklerini gerçekleştirir (implement). `as`'in " +"aksine, bu özellikler (traits) kayıpsız, hatasız dönüşümlere karşılık gelir." #: src/std-traits/from-and-into.md msgid "\"{s}, {addr}, {one}, {bigger}\"" -msgstr "" +msgstr "\"{s}, {addr}, {one}, {bigger}\"" #: src/std-traits/from-and-into.md msgid "" @@ -8124,12 +8568,17 @@ msgid "" "automatically implemented when [`From`](https://doc.rust-lang.org/std/" "convert/trait.From.html) is implemented:" msgstr "" +"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) " +"gerçekleştirildiğinde (implement) [`Into`](https://doc.rust-lang.org/std/" +"convert/trait.Into.html) otomatik olarak gerçekleştirilir:" #: src/std-traits/from-and-into.md msgid "" "That's why it is common to only implement `From`, as your type will get " "`Into` implementation too." msgstr "" +"Bu yüzden sadece `From`'u gerçekleştirmek (implement) yaygındır, çünkü " +"türünüz `Into` gerçekleştirmesini de alacaktır." #: src/std-traits/from-and-into.md msgid "" @@ -8138,24 +8587,31 @@ msgid "" "Your function will accept types that implement `From` and those that _only_ " "implement `Into`." msgstr "" +"\"Bir `String`'e dönüştürülebilen herhangi bir şey\" gibi bir fonksiyon " +"argümanı girdi türü bildirirken, kural tam tersidir, `Into` kullanmalısınız. " +"Fonksiyonunuz `From`'u gerçekleştiren (implement) türleri ve _sadece_ " +"`Into`'yu gerçekleştirenleri kabul edecektir." #: src/std-traits/casting.md msgid "" "Rust has no _implicit_ type conversions, but does support explicit casts " "with `as`. These generally follow C semantics where those are defined." msgstr "" +"Rust'ta _örtük (implicit)_ tür dönüşümleri yoktur, ancak `as` ile açık " +"(explicit) tür dönüştürmelerini (casts) destekler. Bunlar genellikle " +"tanımlandıkları yerlerde C semantiğini takip eder." #: src/std-traits/casting.md msgid "\"as u16: {}\"" -msgstr "" +msgstr "\"u16 olarak: {}\"" #: src/std-traits/casting.md msgid "\"as i16: {}\"" -msgstr "" +msgstr "\"i16 olarak: {}\"" #: src/std-traits/casting.md msgid "\"as u8: {}\"" -msgstr "" +msgstr "\"u8 olarak: {}\"" #: src/std-traits/casting.md msgid "" @@ -8163,6 +8619,10 @@ msgid "" "platforms. This might not match your intuition for changing sign or casting " "to a smaller type -- check the docs, and comment for clarity." msgstr "" +"`as`'in sonuçları Rust'ta _her zaman_ tanımlıdır ve platformlar arasında " +"tutarlıdır. Bu, işaret (sign) değiştirme veya daha küçük bir türe dönüştürme " +"(cast) konusundaki sezginizle uyuşmayabilir -- belgeleri kontrol edin ve " +"açıklık için yorum yapın." #: src/std-traits/casting.md msgid "" @@ -8173,6 +8633,12 @@ msgid "" "selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what " "was in the high bits)." msgstr "" +"`as` ile dönüştürme (cast), yanlış kullanılması kolay olan nispeten keskin " +"bir araçtır ve gelecekteki bakım çalışmaları (maintenance work) kullanılan " +"türleri veya türlerdeki değer aralıklarını değiştirdikçe ince hataların " +"kaynağı olabilir. Tür dnüştürmesi en iyi, niyetin koşulsuz olarak kesmeyi " +"belirtmek olduğu durumlarda kullanılır (örneğin, yüksek bitlerde ne olursa " +"olsun bir `u64`'ün alt 32 bitini `as u32` ile seçmek)." #: src/std-traits/casting.md msgid "" @@ -8181,10 +8647,15 @@ msgid "" "casts, `TryFrom` and `TryInto` are available when you want to handle casts " "that fit differently from those that don't." msgstr "" +"Hatasız tür dönüştürmeleri (cast) için (örneğin `u32`'den `u64`'e), " +"dönüşümün gerçekten hatasız olduğunu doğrulamak için `as` yerine `From` veya " +"`Into` kullanmayı tercih edin. Hatalı olabilecek dönüştürmeler (cast) için, " +"uyan ve uymayan dnüştürmeleri (cast) ele almak istediğinizde `TryFrom` ve " +"`TryInto` mevcuttur." #: src/std-traits/casting.md msgid "Consider taking a break after this slide." -msgstr "" +msgstr "Bu slayttan sonra bir mola vermeyi düşünün." #: src/std-traits/casting.md msgid "" @@ -8192,10 +8663,15 @@ msgid "" "be lost is generally discouraged, or at least deserves an explanatory " "comment." msgstr "" +"`as`, C++'daki bir statik dönüştürmeye (static cast) benzer. Veri kaybı " +"olabilecek durumlarda `as` kullanımı genellikle önerilmez veya en azından " +"açıklayıcı bir yorumu hak eder." #: src/std-traits/casting.md msgid "This is common in casting integers to `usize` for use as an index." msgstr "" +"Bu, tamsayıları bir indeks olarak kullanmak üzere `usize`'a dönüştürürken " +"yaygındır." #: src/std-traits/read-and-write.md msgid "" @@ -8203,36 +8679,41 @@ msgid "" "[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can " "abstract over `u8` sources:" msgstr "" +"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) ve [`BufRead`]" +"(https://doc.rust-lang.org/std/io/trait.BufRead.html) kullanarak, `u8` " +"kaynakları üzerinde soyutlama yapabilirsiniz:" #: src/std-traits/read-and-write.md msgid "b\"foo\\nbar\\nbaz\\n\"" -msgstr "" +msgstr "b\"foo\\nbar\\nbaz\\n\"" #: src/std-traits/read-and-write.md msgid "\"lines in slice: {}\"" -msgstr "" +msgstr "\"dilimdeki (slice) satırlar: {}\"" #: src/std-traits/read-and-write.md msgid "\"lines in file: {}\"" -msgstr "" +msgstr "\"dosyadaki satırlar: {}\"" #: src/std-traits/read-and-write.md msgid "" "Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets " "you abstract over `u8` sinks:" msgstr "" +"Benzer şekilde, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) " +"`u8` alıcıları (sinks) üzerinde soyutlama yapmanızı sağlar:" #: src/std-traits/read-and-write.md msgid "\"\\n\"" -msgstr "" +msgstr "\"\\n\"" #: src/std-traits/read-and-write.md msgid "\"Logged: {buffer:?}\"" -msgstr "" +msgstr "\"Kaydedildi: {buffer:?}\"" #: src/std-traits/default.md msgid "The `Default` Trait" -msgstr "" +msgstr "`Default` Özelliği (Trait)" #: src/std-traits/default.md msgid "" @@ -8240,46 +8721,58 @@ msgid "" "trait produces a default value for a type." msgstr "" "[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " -"özelliği (trait) bir tür için varsayılan bir değer üretir." +"özelliği (trait), bir tür için varsayılan bir değer üretir." #: src/std-traits/default.md msgid "\"John Smith\"" -msgstr "" +msgstr "\"Evliya Çelebi\"" #: src/std-traits/default.md msgid "\"Y is set!\"" -msgstr "" +msgstr "\"Y ayarlandı!\"" #: src/std-traits/default.md msgid "" "It can be implemented directly or it can be derived via `#[derive(Default)]`." msgstr "" +"Doğrudan gerçekleştirilebilir (implement) veya `#[derive(Default)]` " +"aracılığıyla türetilebilir." #: src/std-traits/default.md msgid "" "A derived implementation will produce a value where all fields are set to " "their default values." msgstr "" +"Türetilmiş bir gerçekleştirme (implementation), tüm alanların varsayılan " +"değerlerine ayarlandığı bir değer üretecektir." #: src/std-traits/default.md msgid "This means all types in the struct must implement `Default` too." msgstr "" +"Bu, yapıdaki (struct) tüm türlerin de `Default`'u gerçekleştirmesi " +"(implement) gerektiği anlamına gelir." #: src/std-traits/default.md msgid "" "Standard Rust types often implement `Default` with reasonable values (e.g. " "`0`, `\"\"`, etc)." msgstr "" +"Standart Rust türleri genellikle `Default`'u makul değerlerle (ör. `0`, " +"`\"\"`, vb.) gerçekleştirir (implement)." #: src/std-traits/default.md msgid "The partial struct initialization works nicely with default." msgstr "" +"Kısmi yapı ilklendirmesi (partial struct initialization), default özelliği " +"ile güzel çalışır." #: src/std-traits/default.md msgid "" "The Rust standard library is aware that types can implement `Default` and " "provides convenience methods that use it." msgstr "" +"Rust standart kütüphanesi, türlerin `Default`'u gerçekleştirebileceğinin " +"(implement) farkındadır ve onu kullanan kullanışlı metotlar sağlar." #: src/std-traits/default.md msgid "" @@ -8287,6 +8780,9 @@ msgid "" "book/ch05-01-defining-structs.html#creating-instances-from-other-instances-" "with-struct-update-syntax)." msgstr "" +"`..` sözdizimine [yapı güncelleme sözdizimi (struct update syntax)](https://" +"doc.rust-lang.org/book/ch05-01-defining-structs.html#creating-instances-from-" +"other-instances-with-struct-update-syntax) denir." #: src/std-traits/exercise.md msgid "" @@ -8295,24 +8791,31 @@ msgid "" "implement the missing bits. Only rotate ASCII alphabetic characters, to " "ensure the result is still valid UTF-8." msgstr "" +"Bu örnekte, klasik [\"ROT13\" şifresini](https://en.wikipedia.org/wiki/" +"ROT13) gerçekleştireceksiniz (implement). Bu kodu deneme alanına " +"(playground) kopyalayın ve eksik kısımları gerçekleştirin. Sonucun hala " +"geçerli UTF-8 olduğundan emin olmak için yalnızca ASCII alfabetik " +"karakterleri döndürün." #: src/std-traits/exercise.md msgid "// Implement the `Read` trait for `RotDecoder`.\n" -msgstr "" +msgstr "// `RotDecoder` için `Read` özelliğini (trait) gerçekleştirin.\n" #: src/std-traits/exercise.md src/std-traits/solution.md msgid "\"Gb trg gb gur bgure fvqr!\"" -msgstr "" +msgstr "\"B gnensn ineznx tnlrfvlyr!\"" #: src/std-traits/exercise.md src/std-traits/solution.md msgid "\"To get to the other side!\"" -msgstr "" +msgstr "\"O tarafa varmak gayesiyle!\"" #: src/std-traits/exercise.md msgid "" "What happens if you chain two `RotDecoder` instances together, each rotating " "by 13 characters?" msgstr "" +"Her biri 13 karakter kaydırma (ROT13) yapan iki adet RotDecoder örneğini " +"ardı ardına (biri diğerinin çıktısını okuyarak) çalıştırırsan ne olur?" #: src/welcome-day-3.md msgid "Welcome to Day 3" @@ -11925,6 +12428,7 @@ msgstr "" #: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md #: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md #: src/bare-metal/aps/logging/using.md +#: src/unsafe-deep-dive/motivations/interop.md msgid "\"C\"" msgstr "" @@ -12283,6 +12787,13 @@ msgstr "" msgid "\"files: {:#?}\"" msgstr "" +#: src/unsafe-rust/exercise.md +msgid "" +"FFI binding code is typically generated by tools like [bindgen](https://" +"github.com/rust-lang/rust-bindgen), rather than being written manually as we " +"are doing here. However, bindgen can't run in an online playground." +msgstr "" + #: src/unsafe-rust/solution.md msgid "\"Invalid path: {err}\"" msgstr "" @@ -12518,7 +13029,7 @@ msgstr "" msgid "We will look at `rust_binary` and `rust_library` next." msgstr "" -#: src/android/build-rules.md +#: src/android/build-rules.md src/idiomatic/leveraging-the-type-system.md msgid "Additional items speaker may mention:" msgstr "" @@ -12869,12 +13380,6 @@ msgstr "" msgid "\"com.example.birthdayservice-rust\"" msgstr "" -#: src/android/aidl/example-service/service.md -#: src/android/aidl/example-service/server.md -#: src/android/aidl/example-service/client.md -msgid "\"libbinder_rs\"" -msgstr "" - #: src/android/aidl/example-service/service.md msgid "" "Point out the path to the generated `IBirthdayService` trait, and explain " @@ -17135,7 +17640,7 @@ msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" -"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken " +"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs are 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." @@ -19302,6 +19807,7 @@ msgid "" msgstr "" #: src/concurrency/channels.md src/concurrency/async-control-flow.md +#: src/unsafe-deep-dive/motivations.md msgid "This segment should take about 20 minutes. It contains:" msgstr "Bu bölüm yaklaşık 20 dakika sürmelidir. İçeriği:" @@ -20214,11 +20720,11 @@ msgid "// Function has not begun yet.\n" msgstr "" #: src/concurrency/async/state-machine.md -msgid "// Waitig for first `.await` to complete.\n" +msgid "// Waiting for first `.await` to complete.\n" msgstr "" #: src/concurrency/async/state-machine.md -msgid "// Waitig for second `.await` to complete.\n" +msgid "// Waiting for second `.await` to complete.\n" msgstr "" #: src/concurrency/async/state-machine.md @@ -20295,6 +20801,7 @@ msgid "" msgstr "" #: src/concurrency/async/state-machine.md +#: src/unsafe-deep-dive/foundations/less-powerful.md msgid "\"{n}\"" msgstr "\"{n}\"" @@ -20312,12 +20819,6 @@ msgid "" "github.com/hyperium/tonic) for gRPC." msgstr "" -#: 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/concurrency/async/runtimes.md msgid "[smol](https://docs.rs/smol/latest/smol/): simple and lightweight" msgstr "" @@ -21059,8 +21560,8 @@ msgid "" "[dependencies]\n" "futures-util = { version = \"0.3.31\", features = [\"sink\"] }\n" "http = \"1.3.1\"\n" -"tokio = { version = \"1.45.1\", features = [\"full\"] }\n" -"tokio-websockets = { version = \"0.11.4\", features = [\"client\", " +"tokio = { version = \"1.47.1\", features = [\"full\"] }\n" +"tokio-websockets = { version = \"0.12.1\", features = [\"client\", " "\"fastrand\", \"server\", \"sha1_smol\"] }\n" "```" msgstr "" @@ -21246,6 +21747,1360 @@ msgstr "" msgid "\"From server: {}\"" msgstr "" +#: src/idiomatic/welcome.md +#, fuzzy +msgid "Welcome to Idiomatic Rust" +msgstr "Comprehensive Rust'a Hoş Geldiniz 🦀" + +#: src/idiomatic/welcome.md +msgid "" +"[Rust Fundamentals](../welcome-day-1.md) introduced Rust syntax and core " +"concepts. We now want to go one step further: how do you use Rust " +"_effectively_ in your projects? What does _idiomatic_ Rust look like?" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"This course is opinionated: we will nudge you towards some patterns, and " +"away from others. Nonetheless, we do recognize that some projects may have " +"different needs. We always provide the necessary information to help you " +"make informed decisions within the context and constraints of your own " +"projects." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "⚠️ This course is under **active development**." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"The material may change frequently and there might be errors that have not " +"yet been spotted. Nonetheless, we encourage you to browse through and " +"provide early feedback!" +msgstr "" + +#: src/idiomatic/welcome.md +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 25 minutes. It " +"contains:" +msgstr "" +"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 45 dakika sürmelidir. " +"İçeriği:" + +#: src/idiomatic/welcome.md +msgid "" +"The course will cover the topics listed below. Each topic may be covered in " +"one or more slides, depending on its complexity and relevance." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Foundations of API design" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Golden rule: prioritize clarity and readability at the callsite. People will " +"spend much more time reading the call sites than declarations of the " +"functions being called." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Make your API predictable" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Follow naming conventions (case conventions, prefer vocabulary precedented " +"in the standard library - e.g., methods should be called \"push\" not " +"\"push_back\", \"is_empty\" not \"empty\" etc.)" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Know the vocabulary types and traits in the standard library, and use them " +"in your APIs. If something feels like a basic type/algorithm, check in the " +"standard library first." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Use well-established API design patterns that we will discuss later in this " +"class (e.g., newtype, owned/view type pairs, error handling)" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Write meaningful and effective doc comments (e.g., don't merely repeat the " +"method name with spaces instead of underscores, don't repeat the same " +"information just to fill out every markdown tag, provide usage examples)" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Leveraging the type system" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Short recap on enums, structs and type aliases" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Newtype pattern and encapsulation: parse, don't validate" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Extension traits: avoid the newtype pattern when you want to provide " +"additional behaviour" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"RAII, scope guards and drop bombs: using `Drop` to clean up resources, " +"trigger actions or enforce invariants" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"\"Token\" types: force users to prove they've performed a specific action" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"The typestate pattern: enforce correct state transitions at compile-time" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Using the borrow checker to enforce invariants that have nothing to do with " +"memory ownership" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "OwnedFd/BorrowedFd in the standard library" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "[Branded types](https://plv.mpi-sws.org/rustbelt/ghostcell/paper.pdf)" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Don't fight the borrow checker" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"\"Owned\" types and \"view\" types: `&str` and `String`, `Path` and " +"`PathBuf`, etc." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Don't hide ownership requirements: avoid hidden `.clone()`, learn to love " +"`Cow`" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Split types along ownership boundaries" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Structure your ownership hierarchy like a tree" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Strategies to manage circular dependencies: reference counting, using " +"indexes instead of references" +msgstr "" + +#: src/idiomatic/welcome.md +#, fuzzy +msgid "Interior mutability (Cell, RefCell)" +msgstr "İç Değişebilirlik (Interior Mutability)" + +#: src/idiomatic/welcome.md +msgid "Working with lifetime parameters on user-defined data types" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Polymorphism in Rust" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "A quick refresher on traits and generic functions" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Rust has no inheritance: what are the implications?" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Using enums for polymorphism" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Using traits for polymorphism" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Using composition" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "How do I pick the most appropriate pattern?" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Working with generics" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Generic type parameter in a function or trait object as an argument?" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Trait bounds don't have to refer to the generic parameter" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Type parameters in traits: should it be a generic parameter or an associated " +"type?" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Macros: a valuable tool to DRY up code when traits are not enough (or too " +"complex)" +msgstr "" + +#: src/idiomatic/welcome.md +msgid "What is the purpose of errors? Recovery vs. reporting." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Result vs. Option" +msgstr "" + +#: src/idiomatic/welcome.md +#, fuzzy +msgid "Designing good errors:" +msgstr "Kütüphane Tasarlama" + +#: src/idiomatic/welcome.md +msgid "Determine the error scope." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Capture additional context as the error flows upwards, crossing scope " +"boundaries." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Leverage the `Error` trait to keep track of the full error chain." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "Leverage `thiserror` to reduce boilerplate when defining error types." +msgstr "" + +#: src/idiomatic/welcome.md +msgid "" +"Distinguish fatal errors from recoverable errors using `Result, FatalError>`." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"Rust's type system is _expressive_: you can use types and traits to build " +"abstractions that make your code harder to misuse." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"In some cases, you can go as far as enforcing correctness at _compile-time_, " +"with no runtime overhead." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"Types and traits can model concepts and constraints from your business " +"domain. With careful design, you can improve the clarity and maintainability " +"of the entire codebase." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"Rust's type system borrows a lot of ideas from functional programming " +"languages." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"For example, Rust's enums are known as \"algebraic data types\" in languages " +"like Haskell and OCaml. You can take inspiration from learning material " +"geared towards functional languages when looking for guidance on how to " +"design with types. [\"Domain Modeling Made Functional\"](https://pragprog." +"com/titles/swdddf/domain-modeling-made-functional/) is a great resource on " +"the topic, with examples written in F#." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"Despite Rust's functional roots, not all functional design patterns can be " +"easily translated to Rust." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"For example, you must have a solid grasp on a broad selection of advanced " +"topics to design APIs that leverage higher-order functions and higher-kinded " +"types in Rust." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"Evaluate, on a case-by-case basis, whether a more imperative approach may be " +"easier to implement. Consider using in-place mutation, relying on Rust's " +"borrow-checker and type system to control what can be mutated, and where." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"The same caution should be applied to object-oriented design patterns. Rust " +"doesn't support inheritance, and object decomposition should take into " +"account the constraints introduced by the borrow checker." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +msgid "" +"Mention that type-level programming can be often used to create \"zero-cost " +"abstractions\", although the label can be misleading: the impact on compile " +"times and code complexity may be significant." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system.md +#: src/unsafe-deep-dive/foundations.md +#, fuzzy +msgid "This segment should take about 25 minutes. It contains:" +msgstr "Bu bölüm yaklaşık 15 dakika sürmelidir. İçeriği:" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +msgid "A _newtype_ is a wrapper around an existing type, often a primitive:" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +msgid "/// A unique user identifier, implemented as a newtype around `u64`.\n" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +msgid "" +"Unlike type aliases, newtypes aren't interchangeable with the wrapped type:" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "// 🛠️❌\n" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +msgid "" +"The Rust compiler won't let you use methods or operators defined on the " +"underlying type either:" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +msgid "" +"Students should have encountered the newtype pattern in the \"Fundamentals\" " +"course, when they learned about [tuple structs](../../user-defined-types/" +"tuple-structs.md)." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +msgid "Run the example to show students the error message from the compiler." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +msgid "" +"Modify the example to use a typealias instead of a newtype, such as `type " +"MessageId = u64`. The modified example should compile, thus highlighting the " +"differences between the two approaches." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md +msgid "" +"Stress that newtypes, out of the box, have no behaviour attached to them. " +"You need to be intentional about which methods and operators you are willing " +"to forward from the underlying type. In our `UserId` example, it is " +"reasonable to allow comparisons between `UserId`s, but it wouldn't make " +"sense to allow arithmetic operations like addition or subtraction." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "" +"When a function takes multiple arguments of the same type, call sites are " +"unclear:" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "// [...]\n" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "\"password\"" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "\"username\"" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "" +"// In another part of the codebase, we swap arguments by mistake.\n" +"// Bug (best case), security vulnerability (worst case)\n" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "The newtype pattern can prevent this class of errors at compile time:" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "" +"Run both examples to show students the successful compilation for the " +"original example, and the compiler error returned by the modified example." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "" +"Stress the _semantic_ angle. The newtype pattern should be leveraged to use " +"distinct types for distinct concepts, thus ruling out this class of errors " +"entirely." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "" +"Nonetheless, note that there are legitimate scenarios where a function may " +"take multiple arguments of the same type. In those scenarios, if correctness " +"is of paramount importance, consider using a struct with named fields as " +"input:" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "" +"// No need to check the definition of the `login` function to spot the " +"issue.\n" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md +msgid "" +"Users are forced, at the callsite, to assign values to each field, thus " +"increasing the likelihood of spotting bugs." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md +msgid "The newtype pattern can be leveraged to enforce _invariants_." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md +msgid "// Other validation checks...\n" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md +msgid "" +"The newtype pattern, combined with Rust's module and visibility system, can " +"be used to _guarantee_ that instances of a given type satisfy a set of " +"invariants." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md +msgid "" +"In the example above, the raw `String` stored inside the `Username` struct " +"can't be accessed directly from other modules or crates, since it's not " +"marked as `pub` or `pub(in ...)`. Consumers of the `Username` type are " +"forced to use the `new` method to create instances. In turn, `new` performs " +"validation, thus ensuring that all instances of `Username` satisfy those " +"checks." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md +msgid "" +"The `as_str` method allows consumers to access the raw string representation " +"(e.g., to store it in a database). However, consumers can't modify the " +"underlying value since `&str`, the returned type, restricts them to read-" +"only access." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md +msgid "Type-level invariants have second-order benefits." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md +msgid "" +"The input is validated once, at the boundary, and the rest of the program " +"can rely on the invariants being upheld. We can avoid redundant validation " +"and \"defensive programming\" checks throughout the program, reducing noise " +"and improving performance." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "Is It Truly Encapsulated?" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "" +"You must evaluate _the entire API surface_ exposed by a newtype to determine " +"if invariants are indeed bullet-proof. It is crucial to consider all " +"possible interactions, including trait implementations, that may allow users " +"to bypass validation checks." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "// Validation checks...\n" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "// ‼️\n" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "" +"`DerefMut` allows users to get a mutable reference to the wrapped value." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "" +"The mutable reference can be used to modify the underlying data in ways that " +"may violate the invariants enforced by `Username::new`!" +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "" +"When auditing the API surface of a newtype, you can narrow down the review " +"scope to methods and traits that provide mutable access to the underlying " +"data." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "Remind students of privacy boundaries." +msgstr "" + +#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md +msgid "" +"In particular, functions and methods defined in the same module of the " +"newtype can access its underlying data directly. If possible, move the " +"newtype definition to its own separate module to reduce the scope of the " +"audit." +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +#, fuzzy +msgid "Welcome to Unsafe Rust" +msgstr "1. Gün'e Hoş Geldiniz" + +#: src/unsafe-deep-dive/welcome.md +msgid "IMPORTANT: THIS MODULE IS IN AN EARLY STAGE OF DEVELOPMENT" +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "" +"Please do not consider this module of Comprehensive Rust to be complete. " +"With that in mind, your feedback, comments, and especially your concerns, " +"are very welcome." +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "" +"To comment on this module's development, please use the [GitHub issue " +"tracker](https://github.com/google/comprehensive-rust/issues)." +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "" +"The `unsafe` keyword is easy to type, but hard to master. When used " +"appropriately, it forms a useful and indeed essential part of the Rust " +"programming language." +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "" +"By the end of this deep dive, you'll know how to work with `unsafe` code, " +"review others' changes that include the `unsafe` keyword, and produce your " +"own." +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +#, fuzzy +msgid "What you'll learn:" +msgstr "Ne görüyorsunuz:" + +#: src/unsafe-deep-dive/welcome.md +msgid "What the terms undefined behavior, soundness, and safety mean" +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "Why the `unsafe` keyword exists in the Rust language" +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "How to write your own code using `unsafe` safely" +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "How to review `unsafe` code" +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "Links to other sections of the course" +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "The `unsafe` keyword has treatment in:" +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "" +"_Rust Fundamentals_, the main module of Comprehensive Rust, includes a " +"session on [Unsafe Rust](../unsafe-rust.html) in its last day." +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "" +"_Rust in Chromium_ discusses how to [interoperate with C++](../chromium/" +"interoperability-with-cpp.md). Consult that material if you are looking into " +"FFI." +msgstr "" + +#: src/unsafe-deep-dive/welcome.md +msgid "" +"_Bare Metal Rust_ uses unsafe heavily to interact with the underlying host, " +"among other things." +msgstr "" + +#: src/unsafe-deep-dive/setup.md +msgid "Setting Up" +msgstr "" + +#: src/unsafe-deep-dive/setup.md +#, fuzzy +msgid "Local Rust installation" +msgstr "Kurulum" + +#: src/unsafe-deep-dive/setup.md +msgid "" +"You should have a Rust compiler installed that supports the 2024 edition of " +"the language, which is any version of rustc higher than 1.84." +msgstr "" + +#: src/unsafe-deep-dive/setup.md +msgid "(Optional) Create a local instance of the course" +msgstr "" + +#: src/unsafe-deep-dive/setup.md +msgid "" +"```console\n" +"$ git clone --depth=1 https://github.com/google/comprehensive-rust.git\n" +"Cloning into 'comprehensive-rust'...\n" +"...\n" +"$ cd comprehensive-rust\n" +"$ cargo install-tools\n" +"...\n" +"$ cargo serve # then open http://127.0.0.1:3000/ in a browser\n" +"```" +msgstr "" + +#: src/unsafe-deep-dive/setup.md +msgid "" +"Ask everyone to confirm that everyone is able to execute `rustc` with a " +"version older that 1.87." +msgstr "" + +#: src/unsafe-deep-dive/setup.md +msgid "" +"For those people who do not, tell them that we'll resolve that in the break." +msgstr "" + +#: src/unsafe-deep-dive/motivations.md +msgid "We know that writing code without the guarantees that Rust provides ..." +msgstr "" + +#: src/unsafe-deep-dive/motivations.md +msgid "" +"“Use-after-free (UAF), integer overflows, and out of bounds (OOB) reads/" +"writes comprise 90% of vulnerabilities with OOB being the most common.”" +msgstr "" + +#: src/unsafe-deep-dive/motivations.md +msgid "" +"\\--— **Jeff Vander Stoep and Chong Zang**, Google. \"[Queue the Hardening " +"Enhancements](https://security.googleblog.com/2019/05/queue-hardening-" +"enhancements.html)\"" +msgstr "" + +#: src/unsafe-deep-dive/motivations.md +msgid "... so why is `unsafe` part of the language?" +msgstr "" + +#: src/unsafe-deep-dive/motivations.md +#, fuzzy +msgid "1 minute" +msgstr "15 dakika" + +#: src/unsafe-deep-dive/motivations.md +msgid "" +"The `unsafe` keyword exists because there is no compiler technology " +"available today that makes it obsolete. Compilers cannot verify everything." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"TODO: Refactor this content into multiple slides as this slide is intended " +"as an introduction to the motivations only, rather than to be an elaborate " +"discussion of the whole problem." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "Language interoperability allows you to:" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "Call functions written in other languages from Rust" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "Write functions in Rust that are callable from other languages" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "However, this requires unsafe." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +#, fuzzy +msgid "\"{a:?}\"" +msgstr "\"{:?}\"" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"The Rust compiler can't enforce any safety guarantees for programs that it " +"hasn't compiled, so it delegates that responsibility to you through the " +"unsafe keyword." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"The code example we're seeing shows how to call the random function provided " +"by libc within Rust. libc is available to scripts in the Rust Playground." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "This uses Rust's _foreign function interface_." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"This isn't the only style of interoperability, however it is the method " +"that's needed if you want to work between Rust and some other language in a " +"zero cost way. Another important strategy is message passing." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"Message passing avoids unsafe, but serialization, allocation, data transfer " +"and parsing all take energy and time." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "Answers to questions" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"_Where does \"random\" come from?_ \n" +"libc is dynamically linked to Rust programs by default, allowing our code to " +"rely on its symbols, including `random`, being available to our program." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"_What is the \"safe\" keyword?_ \n" +"It allows callers to call the function without needing to wrap that call in " +"`unsafe`. The [`safe` function qualifier](https://doc.rust-lang.org/stable/" +"edition-guide/rust-2024/unsafe-extern.html) was introduced in the 2024 " +"edition of Rust and can only be used within `extern` blocks. It was " +"introduced because `unsafe` became a mandatory qualifier for `extern` blocks " +"in that edition." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"_What is the [`std::ffi::c_long`](https://doc.rust-lang.org/std/ffi/type." +"c_long.html) type?_ \n" +"According to the C standard, an integer that's at least 32 bits wide. On " +"today's systems, It's an `i32` on Windows and an `i64` on Linux." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +#, fuzzy +msgid "Consideration: type safety" +msgstr "entegrasyon testi:" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"Modify the code example to remove the need for type casting later. Discuss " +"the potential UB - long's width is defined by the target." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "Changes from the original:" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"It's also possible to completely ignore the intended type and create " +"undefined behavior in multiple ways. The code below produces output most of " +"the time, but generally results in a stack overflow. It may also produce " +"illegal `char` values. Although `char` is represented in 4 bytes (32 bits), " +"[not all bit patterns are permitted as a `char`](https://doc.rust-lang.org/" +"std/primitive.char.html#validity-and-layout)." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"Stress that the Rust compiler will trust that the wrapper is telling the " +"truth." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"Attempting to print a `[char; 2]` from randomly generated input will often " +"produce strange output, including:" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"Mention that type safety is generally not a large concern in practice. Tools " +"that produce wrappers automatically, i.e. bindgen, are excellent at reading " +"header files and producing values of the correct type." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "Consideration: Ownership and lifetime management" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"While libc's `random` function doesn't use pointers, many do. This creates " +"many more possibilities for unsoundness." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "both sides might attempt to free the memory (double free)" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "both sides can attempt to write to the data" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"For example, some C libraries expose functions that write to static buffers " +"that are re-used between calls." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"/// Create a formatted time based on time `t`, including trailing newline.\n" +" /// Read `man 3 ctime` details.\n" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +#, fuzzy +msgid "\"now (1): {}\"" +msgstr "\"u16 olarak: {}\"" + +#: src/unsafe-deep-dive/motivations/interop.md +#, fuzzy +msgid "\"future: {}\"" +msgstr "\"beş: {}\"" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "\"now (2): {}\"" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "_Aside:_ Lifetimes in the `format_timestamp()` function" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"Neither `'a`, nor `'static`, correctly describe the lifetime of the string " +"that's returned. Rust treats it as an immutable reference, but subsequent " +"calls to `ctime` will overwrite the static buffer that the string occupies." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "Consideration: Representation mismatch" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"Different programming languages have made different design decisions and " +"this can create impedance mismatches between different domains." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "" +"Consider string handling. C++ defines `std::string`, which has an " +"incompatible memory layout with Rust's `String` type. `String` also requires " +"text to be encoded as UTF-8, whereas `std::string` does not. In C, text is " +"represented by a null-terminated sequence of bytes (`char*`)." +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +#, fuzzy +msgid "b\"Hello, C\\0\"" +msgstr "\"Merhaba \"" + +#: src/unsafe-deep-dive/motivations/interop.md +#, fuzzy +msgid "b\"Hello, Rust\"" +msgstr "\"Rust dilinden merhaba!\"" + +#: src/unsafe-deep-dive/motivations/interop.md +msgid "\"{c}\"" +msgstr "" + +#: src/unsafe-deep-dive/motivations/interop.md +#, fuzzy +msgid "\"{rust}\"" +msgstr "\"rust\"" + +#: src/unsafe-deep-dive/motivations/data-structures.md +msgid "Some families of data structures are impossible to create in safe Rust." +msgstr "" + +#: src/unsafe-deep-dive/motivations/data-structures.md +msgid "graphs" +msgstr "" + +#: src/unsafe-deep-dive/motivations/data-structures.md +msgid "bit twiddling" +msgstr "" + +#: src/unsafe-deep-dive/motivations/data-structures.md +msgid "self-referential types" +msgstr "" + +#: src/unsafe-deep-dive/motivations/data-structures.md +#, fuzzy +msgid "intrusive data structures" +msgstr "Veri Yapılarında Ömürler" + +#: src/unsafe-deep-dive/motivations/data-structures.md +msgid "" +"Graphs: General-purpose graphs cannot be created as they may need to " +"represent cycles. Cycles are impossible for the type system to reason about." +msgstr "" + +#: src/unsafe-deep-dive/motivations/data-structures.md +msgid "" +"Bit twiddling: Overloading bits with multiple meanings. Examples include " +"using the NaN bits in `f64` for some other purpose or the higher-order bits " +"of pointers on `x86_64` platforms. This is somewhat common when writing " +"language interpreters to keep representations within the word size the " +"target platform." +msgstr "" + +#: src/unsafe-deep-dive/motivations/data-structures.md +msgid "Self-referential types are too hard for the borrow checker to verify." +msgstr "" + +#: src/unsafe-deep-dive/motivations/data-structures.md +msgid "" +"Intrusive data structures: store structural metadata (like pointers to other " +"elements) inside the elements themselves, which requires careful handling of " +"aliasing." +msgstr "" + +#: src/unsafe-deep-dive/motivations/performance.md +msgid "TODO: Stub for now" +msgstr "" + +#: src/unsafe-deep-dive/motivations/performance.md +msgid "" +"It's easy to think of performance as the main reason for unsafe, but high " +"performance code makes up the minority of unsafe blocks." +msgstr "" + +#: src/unsafe-deep-dive/foundations.md +msgid "Some fundamental concepts and terms." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "What is “unsafety”?" +msgstr "Rust Nedir?" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Unsafe Rust is a superset of Safe Rust." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Let's create a list of things that are enabled by the `unsafe` keyword." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Definitions from authoritative docs:" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "From the [unsafe keyword's documentation]():" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Code or interfaces whose memory safety cannot be verified by the type system." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "..." +msgstr "// ...\n" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Here are the abilities Unsafe Rust has in addition to Safe Rust:" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "Dereference raw pointers" +msgstr "Ham Göstericilerinin İçeriği (Dereferencing)" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "Implement unsafe traits" +msgstr "Emniyetsiz Özelliklerin (Unsafe Traits) Gerçekleştirilmesi" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "Call unsafe functions" +msgstr "Emniyetsiz (Unsafe) Fonksiyonları Çağırma" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Mutate statics (including external ones)" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Access fields of unions" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "From the [reference](https://doc.rust-lang.org/reference/unsafety.html)" +msgstr "" +"[Rust Referansına](https://doc.rust-lang.org/reference/type-layout.html) " +"bakın." + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"The following language level features cannot be used in the safe subset of " +"Rust:" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "Dereferencing a raw pointer." +msgstr "Ham Göstericilerinin İçeriği (Dereferencing)" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Reading or writing a mutable or external static variable." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Accessing a field of a union, other than to assign to it." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Calling an unsafe function (including an intrinsic or foreign function)." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Calling a safe function marked with a target_feature from a function that " +"does not have a target_feature attribute enabling the same features (see " +"attributes.codegen.target_feature.safety-restrictions)." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "Implementing an unsafe trait." +msgstr "Emniyetsiz Özelliklerin (Unsafe Traits) Gerçekleştirilmesi" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "Declaring an extern block." +msgstr "\"Sonraki bloktan çıkılıyor\"" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Applying an unsafe attribute to an item." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +#, fuzzy +msgid "Group exercise" +msgstr "Alıştırmalar hakkında" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"You may have a group of learners who are not familiar with each other yet. " +"This is a way for you to gather some data about their confidence levels and " +"the psychological safety that they're feeling." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Part 1: Informal definition" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Use this to gauge the confidence level of the group. If they are uncertain, " +"then tailor the next section to be more directed." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Ask the class: **By raising your hand, indicate if you would feel " +"comfortable defining unsafe?**" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "If anyone's feeling confident, allow them to try to explain." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Part 2: Evidence gathering" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Ask the class to spend 3-5 minutes." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Find a use of the unsafe keyword. What contract/invariant/pre-condition is " +"being established or satisfied?" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Write down terms that need to be defined (unsafe, memory safety, soundness, " +"undefined behavior)" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Part 3: Write a working definition" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Part 4: Remarks" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "Mention that we'll be reviewing our definition at the end of the day." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Note: Avoid detailed discussion about precise semantics of memory safety" +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"It's possible that the group will slide into a discussion about the precise " +"semantics of what memory safety actually is and how define pointer validity. " +"This isn't a productive line of discussion. It can undermine confidence in " +"less experienced learners." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Perhaps refer people who wish to discuss this to the discussion within the " +"official [documentation for pointer types](https://doc.rust-lang.org/std/ptr/" +"index.html#safety) (excerpt below) as a place for further research." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "" +"Many functions in [this module](https://doc.rust-lang.org/std/ptr/index." +"html) take raw pointers as arguments and read from or write to them. For " +"this to be safe, these pointers must be _valid_ for the given access." +msgstr "" + +#: src/unsafe-deep-dive/foundations/what-is-unsafe.md +msgid "The precise rules for validity are not determined yet." +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "" +"The unsafe keyword indicates that the programmer is responsible for " +"upholding Rust's safety guarantees." +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "The keyword has two roles:" +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "define pre-conditions that must be satisfied" +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "" +"assert to the compiler (= promise) that those defined pre-conditions are " +"satisfied" +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +#, fuzzy +msgid "Further references" +msgstr "Paylaşılan (Shared) Referanslar" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +#, fuzzy +msgid "" +"[The unsafe keyword chapter of the Rust Reference](https://doc.rust-lang.org/" +"reference/unsafe-keyword.html)" +msgstr "" +"[Rust Referansına](https://doc.rust-lang.org/reference/type-layout.html) " +"bakın." + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "Places where pre-conditions can be defined (Role 1)" +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "" +"[unsafe functions](https://doc.rust-lang.org/reference/unsafe-keyword." +"html#unsafe-functions-unsafe-fn) (`unsafe fn foo() { ... }`). Example: " +"`get_unchecked` method on slices, which requires callers to verify that the " +"index is in-bounds." +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +#, fuzzy +msgid "" +"unsafe traits (`unsafe trait`). Examples: [`Send`](https://doc.rust-lang.org/" +"std/marker/trait.Send.html) and [`Sync`](https://doc.rust-lang.org/std/" +"marker/trait.Sync.html) marker traits in the standard library." +msgstr "" +"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) ve [`BufRead`]" +"(https://doc.rust-lang.org/std/io/trait.BufRead.html) kullanarak, `u8` " +"kaynakları üzerinde soyutlama yapabilirsiniz:" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "Places where pre-conditions must be satisfied (Role 2)" +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "unsafe blocks (`unafe { ... }`)" +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +#, fuzzy +msgid "implementing unsafe traits (`unsafe impl`)" +msgstr "Emniyetsiz Özelliklerin (Unsafe Traits) Gerçekleştirilmesi" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "access external items (`unsafe extern`)" +msgstr "" + +#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md +msgid "" +"adding [unsafe attributes](https://doc.rust-lang.org/reference/attributes." +"html) o an item. Examples: [`export_name`](https://doc.rust-lang.org/" +"reference/abi.html#the-export_name-attribute), [`link_section`](https://doc." +"rust-lang.org/reference/abi.html#the-link_section-attribute) and " +"[`no_mangle`](https://doc.rust-lang.org/reference/abi.html#the-no_mangle-" +"attribute). Usage: `#[unsafe(no_mangle)]`" +msgstr "" + +#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md +msgid "Data structures are safe ..." +msgstr "" + +#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md +msgid "Data structures are inert. They cannot do any harm by themselves." +msgstr "" + +#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md +msgid "Safe Rust code can create raw pointers:" +msgstr "" + +#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md +#: src/unsafe-deep-dive/foundations/actions-might-not-be.md +msgid "\"{safe:p}\"" +msgstr "" + +#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md +msgid "" +"Consider a raw pointer to an integer, i.e., the value `safe` is the raw " +"pointer type `*const i64`. Raw pointers can be out-of-bounds, misaligned, or " +"be null. But the unsafe keyword is not required when creating them." +msgstr "" + +#: src/unsafe-deep-dive/foundations/actions-might-not-be.md +msgid "... but actions on them might not be" +msgstr "" + +#: src/unsafe-deep-dive/foundations/actions-might-not-be.md +msgid "Modify the example to de-reference `safe` without an `unsafe` block." +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "The `unsafe` keyword does not allow you to break Rust." +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "b\"RUST\"" +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "Suggested outline" +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "Request that someone explains what `std::mem::transmute` does" +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "Discuss why it doesn't compile" +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "Fix the code" +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "Expected compiler output" +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "Suggested change" +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "Notes on less familiar Rust" +msgstr "" + +#: src/unsafe-deep-dive/foundations/less-powerful.md +msgid "" +"the `b` prefix on a string literal marks it as byte slice (`&[u8]`) rather " +"than a string slice (`&str`)" +msgstr "" + #: src/thanks.md msgid "" "_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and " @@ -21778,6 +23633,12 @@ msgid "" "book which describes the Rust grammar and memory model." msgstr "" +#: src/other-resources.md +msgid "" +"[Rust API Guidelines](https://rust-lang.github.io/api-guidelines/): " +"recommendations on how to design APIs." +msgstr "" + #: src/other-resources.md msgid "More specialized guides hosted on the official Rust site:" msgstr "" @@ -21923,6 +23784,26 @@ msgid "" "directory for details, including the license terms." 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 command would be:" +#~ msgstr "" +#~ "Debian/Ubuntu'da ayrıca `apt` aracılığıyla Cargo'yu, Rust kaynak kodunu " +#~ "ve [Rust biçimlendiricisini (formatter)](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:" + +#~ msgid "" +#~ "Slices are covered on day 3. For now, students only need to know that a " +#~ "value of type `Vec` gives access to all of the documented slice methods, " +#~ "too." +#~ msgstr "" +#~ "Dilimler (slices) 3. günde ele alınacak. Şimdilik, öğrencilerin sadece " +#~ "`Vec` türündeki bir değerin, belgelenmiş tüm dilim (slice) metotlarına da " +#~ "erişim sağladığını bilmeleri yeterlidir." + #~ msgid "Scopes and Shadowing" #~ msgstr "Kapsamlar (Scopes) ve Gölgeleme (Shadowing)" @@ -22156,9 +24037,6 @@ msgstr "" #~ 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)" @@ -23130,13 +25008,6 @@ msgstr "" #~ "}\n" #~ "```" -#~ msgid "" -#~ "See the [Rust Reference](https://doc.rust-lang.org/reference/type-layout." -#~ "html)." -#~ msgstr "" -#~ "[Rust Referansına](https://doc.rust-lang.org/reference/type-layout.html) " -#~ "bakın." - #~ msgid "Day 1: Afternoon Exercises" #~ msgstr "Gün 1: Öğleden Sonra Alıştırmaları" @@ -23266,9 +25137,6 @@ msgstr "" #~ msgid "Day 2 Morning Exercises" #~ msgstr "2. Gün Sabah Alıştırmaları" -#~ msgid "Designing a Library" -#~ msgstr "Kütüphane Tasarlama" - #~ msgid "([back to exercise](health-statistics.md))" #~ msgstr "([egzersize geri dön](health-statistics.md))" @@ -23307,9 +25175,6 @@ msgstr "" #~ msgid "generics:" #~ msgstr "jenerikler:" -#~ msgid "integration test:" -#~ msgstr "entegrasyon testi:" - #~ msgid "main function:" #~ msgstr "main fonksiyonu:"