å€äŒã¿ ã§ããïŒçããã¯å€äŒã¿ã®å®¿é¡ã...ãã£ããšçµããããŠããŸã掟ã§ããïŒã³ãã³ãé²ãã掟...ïŒãããšãæçµæ¥ã«ãŸãšããŠçä»ãã掟ã§ããããïŒ
ç§ã¯ãã¡ããæçµæ¥ãŸã§æºã蟌ã掟ã§ã
ä»æ¥ã¯ãããªæ§åã§ãããæ ã®çè ã®ãããããè¬çœªãããŠããã ãããèšäºãæžããŠãããŸã
TL;DR
- 100 Exercises To Learn Rust ãé¡æã«èšäºæçš¿ãã©ãœã³ã«åå ãã
-
2024/7/17ãŸã§ã«éã«åããäžéå端ãªç¶æ
ã§38èšäºæçš¿ããŠããŸã£ã
- æçµæ¥ã«äžæ°ã«33èšäºæçš¿ããã®ã§ããã®æªè¡ã®ããŠããŠãå šãŠè©±ããŸã...
- æ·±ãåçããèšäºããã©ãã·ã¥ã¢ããã㊠æšæ¥ ããããå šãŠãå®æããã
Qiita Engineer Festa 2024 ã«åå ããŠããŸãã
ãã3é±éã(ïŒ)åã§ããã2024幎6æ10æ¥ãã2024幎7æ17æ¥ã®38æ¥éã Qiita Engineer Festa 2024 ãšããQiitaã®ç¥å žãéãããå€ãã®ãŠãŒã¶ãŒã»äŒæ¥ãããã£ãŠèšäºãåºããŠããŸããã
Qiitanã°ããºãå¿ ãè²°ããèšäºæçš¿ãã©ãœã³ïŒ
æšå¹ŽåºŠã«ã¯ãªãã£ãã€ãã³ãã«ã èšäºæçš¿ãã©ãœã³ ããããŸããããã®äŒç»ã§ã¯ãFestaæéäžã« 38èšäº æçš¿ããããšã Qiitan ã°ããºã å¿ ã è²°ããããã§ãïŒ
Qiita Engineer Festa ãªãªãžãã«ã°ããºã»ãã
- Qiitanã¬ãããã¿
- Qiitanã¹ãã¬ã¹ããŒã«
- QiitanããŒãã£ãã
- ç¹èšãµã€ãå ã«Qiita IDãæ²èŒ
ããããïŒã»ããïŒ 38èšäºæçš¿ããã°å¿ ãè²°ãããšãããªããæçš¿ããã£ãŠãããããããªããããšããããã§çè ã®38(+α)æ¥éã®æŠããå§ãŸããŸããã
çè 㯠Rust奜ã ãªã®ã§ãããŸããŸãã®æèŠããã 100 Exercises To Learn Rust ãé¡æãšããŠãèšäºãæžãå§ããŸããïŒ
ãããããããšãšè¬çœª
ãã©ãœã³ã«åå ããã®ã¯è¯ãã§ãããçè ã¯èªåã宿é¡ã¯æºã蟌ãã§ããäžæ°ã«çµããããæ æ°äººéã§ããããšããã£ããå¿ããŠãããŸããã
æåã®5èšäºãŸã§ã¯é 調ã«æçš¿ããŠããã®ã§ããã以éæçµæ¥ãŸã§1èšäºãæçš¿ããã宿é¡ãããšãèšäºæçš¿ãæºããŸãããŸãã...
ãããŠ...ããŒã«ã掻çšãæçµæ¥ã«33èšäº(å 19èšäºæªå®æ)ãäžæ°ã«Qiitaã«æçš¿ããŸãã1...
...
...
...
倧å€ç³ãèš³ããããŸããã§ãã...
ã°ããºæ¬²ããã«çŠå¿ããããããŠããŸã£ãããã§ããæ¬åœã¯å®èµ°ããŠããªãã®ã«å®èµ°ããããªãããŠãå³ã ãããå®èµ°è ãšããŠãµã€ãã«ååãèŒããŠãããããšããäžå±ãè ã«ãªã£ãŠããŸããŸãã...
ãããããŸã§ã®çµç·¯
ãªããããªããšã«ãªã£ãŠããŸã£ãããåçã蟌ããŠä»¥äžã«çµç·¯ãæžããŠããããšæããŸãã
5èšäºæçš¿ãŸã§
æçš¿ãã©ãœã³ã«èšäºãæçš¿ãã€ã€ãããèã£ãºããå 容ã®èšäºã§ãã©ãœã³å®èµ°ãããã°ããºæ¬²ããã«åå ããŠãã人ãšæãããŠå«ã ããã¡ãããšã³ãã¥ããã£ã«è²¢ç®ããèšäºã«ãããããšæã£ãŠããçè ã¯ãã¯ãªãªãã£ãåªå ããŠããŸããèšäºå·çã«ãããæéçã³ã¹ãã床å€èŠããŠåãçµã¿ãŸãããæçµæ¥ãšã¯çéã§ãããä»æãã°ãããééãã§ãæçš¿ããããããŒã¹ã»ç¯å²ã»å 容ã§ãµã¹ãããã«ãªç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ã»ç¶ç¶çããªããªãŒãç®æãã¹ãã ã£ãã®ã§ãã
1èšäºç®ãã5èšäºç®ã¯ããªãäžå¯§ã«åãçµãã§ããŸããã5èšäºç® 2ã¯ç¹ã«ãªã¿ã¯èªããé ·ãããŠãExercises To Learn Rustã«å šç¶é¢ä¿ãªãUFCSã®è©±ãšãããã¡ãã£ãŠãŸã
6èšäºä»¥éæçš¿ã§ããªããªã£ãçç±ãã¯ãªãªãã£ã®ããã§ããããé¡æã®ãExercises To Learn Rustãã®åé¡ãå ã«çµããããŠããèšäºãæžããæ¹ããåé¡éã®ã€ãªãããæèããŠæžããã®ã§ã¯ãªãªãã£ãäžããããšããå€æãããèšäºæçš¿èªäœã®å€å°ã®é 延ã蚱容ããŠããŸã£ãã®ã§ãã ã ããä»ãŸã§ã®äººçã§å®¿é¡ãæºã蟌ãŸãªãã£ãå€äŒã¿ã¯ãªãã£ã ãšããã®ã«...ããããªãåé¡ã¯é£ã°ããçããèŠãŠæ©ãåãã¡ããæ¹ãåãã®ã«ããããã§ããªãã¿ã€ãã ã£ãããã§ãã
Qiita CLIãšcargo scriptã®æŽ»çš
ãŸãã3èšäºç®2ãŸã§ã¯æ°èŠèšäºãã³ããã§äœæããŠããã®ã§ãããã³ããç¹æã®ãã¹(ãªã³ã¯ã匵ãééãããªã©)ãããããã§æµç³ã«èŠãããªã£ãŠãããããQiita CLIãšããããŒã«ããèšäºãæçš¿ããããšãšããæå ã®ãšãã£ã¿ã«ãŠã¹ã¯ãªãããåãããŠãã³ãã¬ãŒãããèšäºã®éªšçµã¿ãäœæããããšã«ããŸããã
èšäºçæã¹ã¯ãªããã«çšããèšèªã®åè£ã«ã¯è²ã ãããŸãããçãããªãäœã䜿ããŸããïŒbashïŒPythonïŒGo...ïŒ...ã©ãã§ããªãïŒããã§ãããã æã楜ã«CLIããŒã«ãçšæã§ãã cargo script ãè¯ãã«æ±ºãŸã£ãŠããŸãïŒ æ代ã¯Rustã§ã
- åèèšäºæ§: Rustãã¹ã¯ãªããèšèªãšããŠäœ¿ã£ãŠã¿ãã
- åèæè: ãRustãâšCLIã¢ããªåãã¯ã¬ãŒã4éžâš ~ clap, dialoguer, indicatif, console ~
é·ãã§ããã¹ã¯ãªãããèŒãã¡ãããŸãïŒ(ãã£ããæžããã®ã§)
#!/usr/bin/env -S cargo +nightly -q -Zscript run --release --manifest-path
---
[dependencies]
clap = { version = "4.5.7", features = ["derive"] }
handlebars = "5.1.2"
toml = "0.8.14"
serde = { version = "1.0.203", features = ["derive"] }
anyhow = "1.0.86"
tokio = { version = "1.38.0", features = ["full"] }
reqwest = "0.12.4"
dialoguer = "0.11.0"
---
use anyhow::Result;
use clap::Parser;
use std::path::PathBuf;
use serde::{Serialize, Deserialize};
use std::fs;
use handlebars::{Handlebars, no_escape};
use dialoguer::Confirm;
#[derive(Parser, Debug)]
struct Args {
#[arg(short = 'f', long = "target-file")]
target: PathBuf,
#[arg(short = 't', long = "template", default_value = "./template.md")]
template: PathBuf,
#[arg(short, long)]
output: Option<PathBuf>,
}
#[derive(Debug, Serialize, Deserialize)]
struct Prev {
number: u32,
title: String,
id: String,
}
#[derive(Debug, Deserialize)]
struct Topic {
title: String,
path: String,
jp_title: String,
}
impl Topic {
async fn to_render(self) -> Result<TopicForRender> {
let Self { title, path, jp_title } = self;
let url = format!("https://raw.githubusercontent.com/mainmatter/100-exercises-to-learn-rust/main/exercises/{}/src/lib.rs", path);
let librs = reqwest::get(&url)
.await?
.text()
.await?
.trim()
.to_string();
Ok(TopicForRender {
title,
path,
jp_title,
librs,
})
}
}
#[derive(Debug, Serialize)]
struct TopicForRender {
title: String,
path: String,
jp_title: String,
librs: String,
}
#[derive(Debug, Deserialize)]
struct Content {
number: u32,
title: String,
prev: Prev,
topics: Vec<Topic>,
}
impl Content {
async fn to_render(self) -> Result<ContentForRender> {
let Self { number, title, prev, topics: ts } = self;
let mut topics = Vec::with_capacity(ts.len());
for topic in ts {
let res = topic.to_render().await?;
topics.push(res);
}
Ok(ContentForRender {
number,
title,
prev,
topics,
})
}
}
#[derive(Debug, Serialize)]
struct ContentForRender {
number: u32,
title: String,
prev: Prev,
topics: Vec<TopicForRender>,
}
#[tokio::main]
async fn main() -> Result<()> {
let Args {
target,
template,
output,
} = Args::parse();
let template = fs::read_to_string(&template)?;
let content = fs::read_to_string(&target)?;
let content: Content = toml::from_str(&content)?;
let content_for_render: ContentForRender = content.to_render().await?;
let mut handlebars = Handlebars::new();
handlebars.set_strict_mode(true);
handlebars.register_escape_fn(no_escape);
let res = handlebars.render_template(&template, &content_for_render)?;
match output {
Some(p) => {
if p.exists() {
println!("{} exists.", p.display());
let conf = Confirm::new()
.with_prompt("Are you sure you want to overwrite this file?")
.interact()?;
if !conf {
return Ok(());
}
}
fs::write(p, res)?;
},
None => {
println!("{}", res);
}
}
Ok(())
}
ãã®ã¹ã¯ãªããã¯åŒæ°ãšããŠãã³ãã¬ãŒããã¡ã€ã«( template
å€æ°ã«ãã¹ãæ ŒçŽ)ãšèšäºã®ãã©ã³ãã¡ã€ã«( target
å€æ°ã«ãã¹ãæ ŒçŽ)ãåããŸãã
---
title: "\U0001F980100 Exercises To Learn Rustã«ææŠã{{number}}ã {{title}}"
tags:
- Rust
private: false
updated_at: ''
id: null
organization_url_name: yumemi
slide: false
ignorePublish: false
---
åã®èšäº
- [ã0ã æºå](https://qiita.com/namn1125/items/bd1b4cd028874189a3c1) â åå
- ...
- [ã{{prev.number}}ã {{prev.title}}](https://qiita.com/namn1125/items/{{prev.id}}) â åå
- ã{{number}}ã {{title}} â ä»å
[100 Exercise To Learn Rust](https://rust-exercises.com/) æŒç¿ç¬¬{{number}}åã«ãªããŸãïŒ
ä»åã®é¢é£ããŒãž
{{#each topics}}
- [{{this.title}}](https://rust-exercises.com/{{this.path}})
{{/each}}
{{#each topics}}
# [[{{this.path}}](https://github.com/mainmatter/100-exercises-to-learn-rust/blob/main/exercises/{{this.path}}/src/lib.rs)] {{this.jp_title}}
- [{{this.title}}](https://rust-exercises.com/{{this.path}})
åé¡ã¯ãã¡ãã§ãã
'''rust:lib.rs
{{this.librs}}
'''
<details><summary>ãã¹ããå«ããå
šäœ</summary>
'''rust:lib.rs
{{this.librs}}
'''
</details>
## 解説
'''rust:lib.rs
'''
{{/each}}
ã§ã¯æ¬¡ã®åé¡ã«è¡ããŸãããïŒ
次ã®èšäº: (Comming soon...)
number = 3
title = "ã«ãŒãã»ãªãŒããŒãããŒ"
[prev]
number = 2
title = "ifã»ãããã¯ã»æŒç¿"
id = "13870965e8273bc87bce"
[[topics]]
title = "2.6. Loops: while"
path = "02_basic_calculator/06_while"
jp_title = "while"
[[topics]]
title = "2.7. Loops: for"
path = "02_basic_calculator/07_for"
jp_title = "for"
[[topics]]
title = "2.8. Overflow and underflow"
path = "02_basic_calculator/08_overflow"
jp_title = "ãªãŒããŒãããŒ"
ãã©ã³ãã¡ã€ã«ã«ã¯ä»¥äžã®æ å ±ãèšèŒããŠããŸãã
- èšäºçªå·ã»ã¿ã€ãã«
- åã®èšäºã®æ å ±
- ä»å解ãåé¡ã®ã¿ã€ãã«ãšExercises To Learn Rustããã¥ã¡ã³ãå ã®ãªã³ã¯
Exercises To Learn Rustã®åé¡ã1èšäºããã2ïœ3å解ãæ¹éã§é²ããŠããããã®ãã©ã³ã§ã¯ [[topics]]
ã»ã¯ã·ã§ã³ã3ã€ãããŸããååé¡ã«èšå®ãããŠããããã°ã©ã ãExercises To Learn Rustã®GitHubããreqwest
ã§ååŸããhandlebars
ã«ãã£ãŠãã³ãã¬ãŒãããã¬ã³ããªã³ã°ããŠããŸãïŒ
次ã®ããã«ããŠå®è¡ããããšã§ãèšäºã®éªšçµã¿ãçæãããŸãïŒ
chmod 755 render.rs
./render.rs -- -f plans/plan3.toml --template ./template.md
åºåãããèšäºéªšçµã¿ (æµç³ã«é·ãã®ã§æãããã¿)
---
title: "\U0001F980100 Exercises To Learn Rustã«ææŠã3ã ã«ãŒãã»ãªãŒããŒãããŒ"
tags:
- Rust
private: false
updated_at: ''
id: null
organization_url_name: yumemi
slide: false
ignorePublish: false
---
åã®èšäº
- [ã0ã æºå](https://qiita.com/namn1125/items/bd1b4cd028874189a3c1) â åå
- ...
- [ã2ã ifã»ãããã¯ã»æŒç¿](https://qiita.com/namn1125/items/13870965e8273bc87bce) â åå
- ã3ã ã«ãŒãã»ãªãŒããŒãã㌠â ä»å
[100 Exercise To Learn Rust](https://rust-exercises.com/) æŒç¿ç¬¬3åã«ãªããŸãïŒ
ä»åã®é¢é£ããŒãž
- [2.6. Loops: while](https://rust-exercises.com/02_basic_calculator/06_while)
- [2.7. Loops: for](https://rust-exercises.com/02_basic_calculator/07_for)
- [2.8. Overflow and underflow](https://rust-exercises.com/02_basic_calculator/08_overflow)
# [[02_basic_calculator/06_while](https://github.com/mainmatter/100-exercises-to-learn-rust/blob/main/exercises/02_basic_calculator/06_while/src/lib.rs)] while
- [2.6. Loops: while](https://rust-exercises.com/02_basic_calculator/06_while)
åé¡ã¯ãã¡ãã§ãã
'''rust:lib.rs
// Rewrite the factorial function using a `while` loop.
pub fn factorial(n: u32) -> u32 {
// The `todo!()` macro is a placeholder that the compiler
// interprets as "I'll get back to this later", thus
// suppressing type errors.
// It panics at runtime.
todo!()
}
#[cfg(test)]
mod tests {
use crate::factorial;
#[test]
fn first() {
assert_eq!(factorial(0), 1);
}
#[test]
fn second() {
assert_eq!(factorial(1), 1);
}
#[test]
fn third() {
assert_eq!(factorial(2), 2);
}
#[test]
fn fifth() {
assert_eq!(factorial(5), 120);
}
}
'''
<details><summary>ãã¹ããå«ããå
šäœ</summary>
'''rust:lib.rs
// Rewrite the factorial function using a `while` loop.
pub fn factorial(n: u32) -> u32 {
// The `todo!()` macro is a placeholder that the compiler
// interprets as "I'll get back to this later", thus
// suppressing type errors.
// It panics at runtime.
todo!()
}
#[cfg(test)]
mod tests {
use crate::factorial;
#[test]
fn first() {
assert_eq!(factorial(0), 1);
}
#[test]
fn second() {
assert_eq!(factorial(1), 1);
}
#[test]
fn third() {
assert_eq!(factorial(2), 2);
}
#[test]
fn fifth() {
assert_eq!(factorial(5), 120);
}
}
'''
</details>
## 解説
'''rust:lib.rs
'''
# [[02_basic_calculator/07_for](https://github.com/mainmatter/100-exercises-to-learn-rust/blob/main/exercises/02_basic_calculator/07_for/src/lib.rs)] for
- [2.7. Loops: for](https://rust-exercises.com/02_basic_calculator/07_for)
åé¡ã¯ãã¡ãã§ãã
'''rust:lib.rs
// Rewrite the factorial function using a `for` loop.
pub fn factorial(n: u32) -> u32 {
todo!()
}
#[cfg(test)]
mod tests {
use crate::factorial;
#[test]
fn first() {
assert_eq!(factorial(0), 1);
}
#[test]
fn second() {
assert_eq!(factorial(1), 1);
}
#[test]
fn third() {
assert_eq!(factorial(2), 2);
}
#[test]
fn fifth() {
assert_eq!(factorial(5), 120);
}
}
'''
<details><summary>ãã¹ããå«ããå
šäœ</summary>
'''rust:lib.rs
// Rewrite the factorial function using a `for` loop.
pub fn factorial(n: u32) -> u32 {
todo!()
}
#[cfg(test)]
mod tests {
use crate::factorial;
#[test]
fn first() {
assert_eq!(factorial(0), 1);
}
#[test]
fn second() {
assert_eq!(factorial(1), 1);
}
#[test]
fn third() {
assert_eq!(factorial(2), 2);
}
#[test]
fn fifth() {
assert_eq!(factorial(5), 120);
}
}
'''
</details>
## 解説
'''rust:lib.rs
'''
# [[02_basic_calculator/08_overflow](https://github.com/mainmatter/100-exercises-to-learn-rust/blob/main/exercises/02_basic_calculator/08_overflow/src/lib.rs)] ãªãŒããŒãããŒ
- [2.8. Overflow and underflow](https://rust-exercises.com/02_basic_calculator/08_overflow)
åé¡ã¯ãã¡ãã§ãã
'''rust:lib.rs
// Customize the `dev` profile to wrap around on overflow.
// Check Cargo's documentation to find out the right syntax:
// https://doc.rust-lang.org/cargo/reference/profiles.html
//
// For reasons that we'll explain later, the customization needs to be done in the `Cargo.toml`
// at the root of the repository, not in the `Cargo.toml` of the exercise.
pub fn factorial(n: u32) -> u32 {
let mut result = 1;
for i in 1..=n {
result *= i;
}
result
}
#[cfg(test)]
mod tests {
use crate::factorial;
#[test]
fn twentieth() {
// 20! is 2432902008176640000, which is too large to fit in a u32
// With the default dev profile, this will panic when you run `cargo test`
// We want it to wrap around instead
assert_eq!(factorial(20), 2_192_834_560);
// âïž
// A large number literal using underscores to improve readability!
}
#[test]
fn first() {
assert_eq!(factorial(0), 1);
}
#[test]
fn second() {
assert_eq!(factorial(1), 1);
}
#[test]
fn third() {
assert_eq!(factorial(2), 2);
}
#[test]
fn fifth() {
assert_eq!(factorial(5), 120);
}
}
'''
<details><summary>ãã¹ããå«ããå
šäœ</summary>
'''rust:lib.rs
// Customize the `dev` profile to wrap around on overflow.
// Check Cargo's documentation to find out the right syntax:
// https://doc.rust-lang.org/cargo/reference/profiles.html
//
// For reasons that we'll explain later, the customization needs to be done in the `Cargo.toml`
// at the root of the repository, not in the `Cargo.toml` of the exercise.
pub fn factorial(n: u32) -> u32 {
let mut result = 1;
for i in 1..=n {
result *= i;
}
result
}
#[cfg(test)]
mod tests {
use crate::factorial;
#[test]
fn twentieth() {
// 20! is 2432902008176640000, which is too large to fit in a u32
// With the default dev profile, this will panic when you run `cargo test`
// We want it to wrap around instead
assert_eq!(factorial(20), 2_192_834_560);
// âïž
// A large number literal using underscores to improve readability!
}
#[test]
fn first() {
assert_eq!(factorial(0), 1);
}
#[test]
fn second() {
assert_eq!(factorial(1), 1);
}
#[test]
fn third() {
assert_eq!(factorial(2), 2);
}
#[test]
fn fifth() {
assert_eq!(factorial(5), 120);
}
}
'''
</details>
## 解説
'''rust:lib.rs
'''
ã§ã¯æ¬¡ã®åé¡ã«è¡ããŸãããïŒ
次ã®èšäº: (Comming soon...)
Rustã«ããcargo scriptã¯ã以äžã®éšåã§ä»èšèªã«ããã¹ã¯ãªãããã䟿å©ã§ããæ¯é䜿ã£ãŠã¿ãŠãã ããïŒ(VSCodeã§RLSã«ããè£å®ãå¹ããªãã®ãé£ç¹ã§ãã...)
- 宣èšçã«æžãã
-
clap
ã®ãé°ã§ã³ãã³ãã©ã€ã³åŒæ°ããserde
ã®ãé°ã§ãã©ã³ãã¡ã€ã«ãã¹ã¯ãªãããã¡ã€ã«ã®æ§é ããããã宣èšçã«æžããŠããããŸãRustã®åŒ·ãåä»ãã«ããããªããŒã·ã§ã³åŠçã®èšè¿°ã極åçããŠããŸããderive
ãã¯ãæ匷ïŒïŒïŒ
-
- WORA (Write Once Run Anywhere)
-
Cargo.toml
ã®å 容ãçŽæ¥ã¹ã¯ãªããå ã«èšè¿°ããŠããã®ã§ããã®ã¹ã¯ãªãããå¥ãªãã·ã³ã«æã£ãŠãã£ãŠã倧äœåããŸãïŒããå€ããªã£ãŠããŸã£ããšããŠããåœæã®ã¯ã¬ãŒããåç §ããã°è¯ãã®ã§å®¹æã«ä¿®æ£ã§ããŸãïŒ
-
çæã¹ã¯ãªããã®ãé°ã§äžã åé¡ãã³ããããªããŠè¯ããªã£ãã®ã§ãããªã楜ã«ãªããŸããïŒãããä»æãã°èšäºçæã¹ã¯ãªãããçšæããããšããåé¡ããå ã«è§£ããŠããŸãã°èšäºã¯ãã€ã§ãæžããããšããæèã«ç¹ããæºã蟌ãã§ããŸã£ãèŠå ã«ãªã£ãŠãããããããŸããã(ãŸãå°å ¥ããŠããªãã£ãããªãããå®èµ°ã¯ç¡çã ã£ãæ°ãããŸãã...)
ïœ 7æ11æ¥ãããŸã§
ã¢ãµã€ã³ããããããžã§ã¯ããå¿ãããªã£ãŠããŠãéå€åŸã«åé¡ãã¡ãŸã¡ãŸè§£ããŠããŸããã ãã®é1èšäºãæçš¿ããŠããŸããã§ãã ãããšäžé±éåã£ãããšããã¿ã€ãã³ã°ã®7æ11æ¥ãããããæçµåé¡ãçµãããŸããïŒèšäºã¯ãŸã å šãæžããŠããŸããïŒ
7æ13æ¥ããã®äžé£äŒ
å¯ãéãæããã§ïŒèšäºå·çãšã¹ãã©ãã¥ãŒã³ããã£ãŠããŸãããæ¯æãã«ã²ãŒã ã¯å€§åã§ããããã
ãããã®æç¹ã§é ããåãçµãã§ããŠã¯éã«åããªãããšãããã£ãŠããã®ã§ã ããã«åŽåãæããã«33èšäºæžãäžããã ã®ã¿ã«éç¹ã眮ããŠããŸãããã²ãŒã ããªããããŸãæºãŸã£ã宿é¡ã«åãçµã...å®å šã«å€äŒã¿æçµæ¥è¿ãã®å°äžåŠçã®æ°åã§ãã...
次ã®å®ç§(ç¬)ãªé åºã§èšäºãæžãããšã«ããŸããã
- ãŸããæ°ããªã¹ã¯ãªããã䜿ããåè¿°ãã骚çµã¿ãäœãããã©ã³ãèªåçæããã (èªåçæã®èªåçæã¿ãããª...)
- ãã®åŸã骚çµã¿ãäœãåé¡ã®ãåçã®ã¿ãèŒããŠããããã®æ¹æ³ãªãæèåæ¢ã§äœæ¥ã§ãã
- æåŸã«ãåçã«ã€ããŠè§£èª¬ãä»ããŠãã
ã2ã®æç¹ã§ãšããããèšäºãšããŠã®äœè£ã¯æŽã...ïŒQiitaå çã«ã¯å±ãããªãã¯ã...ïŒããšããããã§ãé£äŒäžã¯2ãŸã§ã¯ãªããšããŠã§ãçµããããããšãç®æããŸãã...ïŸïŸïŸïŸïŸïŸïœ¶ïœ¯ïŸ...
ãããŠæçµæ¥...ð¿åå£ãª33èšäºåææçš¿ð¿ïŒ
19èšäºãŸã§ã¯è§£èª¬ãŸã§ä»ãããã(ã€ãŸããããŒããã©ãœã³ã«ã€ããŠã¯ã¡ãããšéæããŠããŸãã)ã®ã§ãããæ®ãã®èšäºã«ä»®çœ®ã1ã®æèšãæ®ãããŸãŸçµå±çµããããããšãã§ããããšãããã ã°ããºæ¬²ããã«17æ¥ã®21æãããã«äžæ°ã«33èšäºæçš¿ããŸãã ...
æçš¿ã«ã¯ãQiita CLIã®GitHub Actions ã䜿çšããŸãããã¡ãŸã¡ãŸæã§æçš¿ããŠããã®ã§ã¯éã«åããªãïŒ ãšããæãããã main
ãã©ã³ãã«çµ±åããããQiitaåŽã«ãåæ ãããããã«ããŸããã
倩眰
æªå®æãªã®ã«ãé¢ãããããããå®èµ°è ã®ããã«æ¯ãèãããšãã...ãããªçè ã«å€©çœ°ãäžããŸããïŒ
GitHub Actionsã§ã®æçš¿ã§ã¯èšäºé ãæå®ãããªãããã ãã¡ããã¡ããªé çªã§æçš¿ãããŠããŸã£ãã®ã§ãïŒïŒïŒïŒïŒ
ãã®ç¬éãçè ã®ãœãŠã«ãžã§ã ã¯æ¿ããããé女åããããŸãã...
ãäžèº«ã®ãªãèšäºãäžæ£ã«çšæããŠã°ããºããããäžå±ããªãŠãŒã¶ãŒã«ãªã£ãŠããŸã£ã...ã
ãRustã¿ã°ããã©ããŒããŠãããŠãŒã¶ãŒã®æ¹ã ã®TLã«ããšãã§ããªããã€ãºãæµããŠããŸã£ã...ã
ããã...å ã ãªãã®ããã«èšäºãæžãå§ãããã ã£ã...ã³ãã¥ããã£ã«è²¢ç®ããããã§ã¯ãªãã£ãã®ã...ã
38æ¥éå¯ãéãæããã§ã¹ãã©ãã¥ãŒã³ãããªããèšäºå·çããŠããåªåãããã ä»äººã«è¿·æããããã ãã®è¡çºã«æãäžãããããã«ã¯éãç©æ¬²ãšæ¿èªæ¬²æ±ã®ç£ããã äžäººäœãã ããšãªã£ã...
...ãšããããšã ã¯çœ®ããŠãããŠããå®å šã«åäžãªæå»ã§æçš¿ãããŠããŸã£ããããã«èšäºã«æ£ããé åºãä»ãããã ãã¿ã€ã ã©ã€ã³ããã€ããŒãžãAPIããã®ååŸå šãŠã§ ç°ãªãé çªã§è¡šç€º ãããããã«ãªã£ãŠããŸããŸãã3...ïŒ
ããŒãžã«ãã£ãŠååŸé ãç°ãªãããšããã idãåºå®ããŠäžŠã¹æ¿ããããšãå¶ãã ãé çªéãã«èšäºãæ²èŒã§ããªããªã£ãŠããŸããšããã倩眰ãäžã£ãã®ã§ãã...ð¥º
ãã®åŸ æ¹å¿ãšæºæ
éæ³ã£ãŠã®ã¯ãã培é 培尟èªåã ãã®æã¿ãå¶ããããã®ãããªãã ã
ãã誰ã«ãé Œããªãã誰ã«ããã£ãŠãããå¿ èŠããªã
17æ¥ãéããŠããã¯ããã©ãã誰ãèªã¿ã¯ããªãã ããããšå²ãåã£ãŠ(èªã¿ãããã»ç°¡æœãããã)ã¯ãªãªãã£ãæåªå ããŠèšäºãæžãããšã«ããŸããïŒãããäžéå端ãªèšäºãæçš¿ããŠããŸã£ãããšãžã®æºæã«ãªãã ãããšããæãããããŸãããèªå·±æºè¶³ãããããªãã§ãããããããŸãããèªå·±æºè¶³ã®ããã«èšäºãæžãäžããããšã«ããŸãã...ããããå®æãŸã§3é±éãããããšã¯æããŸããã§ããã
ãšã«ãããç¡äº(ïŒ)ã«æšæ¥38èšäºã«é¢ãããŸãšãèšäºãåºãããšãã§ããŸããïŒ
ãŸãšãã»ææ
çµæçã«ãå®ã«2ã¶æè¿ãæ ŒéããŠããããã§ã...ãã®ååŸãããããšãå€ãã£ãã§ãã
è¯ãããšããã£ã
ãã©ãœã³ã«åå ããŠãããããããããããããããããã§ããªããæ¿èªæ¬²æ±ã¢ã³ã¹ã¿ãŒã®èªåã¯ãããŸã§è©±ããããã«éå ã¡ããŠããŸã£ãããã§ãããåå ããŠããã£ããªããšæã£ãããšããããŸããã
ããã¯ãéã«ãããããæ±ããªãããããèªç±ã«æžãããããšã§ããäŸãã°ç¬¬4åã®UFCSã®è©±ã®ããã«ãããŠã±ãªãã ãããªã...ããšæã£ãŠç ãããŠããããã¿éãã奜ããªã¿ã€ãã³ã°ã§ååã«æ¯ãããã®ãããã£ãã§ããæ®æ®µã§ããªãã¢ãŠãããããä¿é²ããŠããã ãšããç¹ã§ã¯ãèšäºæçš¿ãã©ãœã³ã¯ããªãè¯ãå·çæ©äŒã ã£ããªãšæããŸãïŒ
åç
ä»åã®åçã掻ããããŸããèªåã®æ æ°ãªæ§æ Œã¯å€åæ²»ããªãã®ã§ãå¬ã«éãããQiitaã¢ããã³ãã«ã¬ã³ããŒã§ã¯ãããåå ããå Žåã€ãã³ãéå§åã«å šèšäºæžãäžããŠããããšãèªããŸããä»æ¥ããé 匵ããŸãïŒ
ããšã¹ãã©ãã¥ãŒã³ã¯ã»ã©ã»ã©ã«ããŸãïŒ
...ãšããããã§ãã°ããºæ¬²ããã«ãºã«ãããçè ã®é¡æ«ã話ããŸãã...ã©ã®å£ãèšããšããæãã§ãããèªè ã®çãããå€äŒã¿ã®å®¿é¡ã¯æºããªãããã«æ°ãã€ããŸãããããããŸã§èªãã§ããã ãããããšãããããŸããïŒ
-
æªå®æèšäºã¯ããæ©ãã«å·®ãæ¿ããŸãïŒããšããæèšãå ¥ããŠæçš¿ããŠããŸãã...äŸ â© â©2
-
0å§ãŸããªã®ã§èšäºçªå·ã¯-1ãããŠããŸãã â© â©2
-
ãã®ä»¶ã«ã€ããŠå ¬åŒã«åãåããããšããããšãŠãäžå¯§ã«èª¿æ»ããŠããã ããŸãããå¿ããã瀌ç³ãäžããŸã ã¡ãªã¿ã«å¥ãªåãåãããã©ãŒã ã§èããŠããŠããã®åŸã«ç¥ã£ãã®ã§ãããã®æã®å 容㯠Qiita Discussions ã§èããæ¹ãè¯ããããã§ãããCLIã®Actionsã«ã€ããŠæ¹åæ¡ãæãã€ããããªæ°ãããã®ã§ãããæãã€ãããæçš¿ããŠã¿ãããšæããŸãïŒ â©