This article in the Rspotify series describes my journey of basically rewriting the entirety of this Rust library; around 13 months of work (in my free time), starting at September 2020, up until October 2021. I think this has given me enough experience for an article regarding API design on Rust, and perhaps those who attempt the same in the future can take some ideas and save time. Specially con
κeenã§ããRustã§ã¡ãã£ã¨ããããã ãã©ä½¿ãå´ã®èªç±åº¦ãé«ãã¦å®å ¨ãªBuilderãã¿ã¼ã³ãæãä»ããã®ã§ç´¹ä»ãã¾ããã â»2017-02-11T13:18:58Z+09:00 æä¸é¨ã«è¿½è¨ãã¾ãã ç®çã³ã¼ã 以ä¸ã®ãããªæ§é ä½ã®ãã«ãã¼ãä½ãããã¨ãã¾ãã #[derive(Debug)] struct Person { id: u32, name: String, age: u32, address: Option<String>, zipcode: Option<String>, } struct PersonBuilder { id: Option<u32>, name: Option<String>, age: Option<u32>, address: Option<String>, zipcode: Option<String>, } impl PersonBuild
追è¨ï¼ããããªãã§ããã¾ãã«ãé·ãã®ã§ãé åæ¼ç®ã«ç¦ç¹ãçµã£ã¦ãããRustã£ã½ããã®æ°æã¡ã強調ããå§å¦¹ç·¨ãæ¸ãã¾ãããæã£åãæ©ãé°å²æ°ãæ´ã¿ããæ¹ã¯ãã¡ããã©ããã TL;DR GHC 9.0 ãã Haskell ã«å ¥ã£ãç·ååï¼Linear Typesï¼ã®æ©è½ãä¸é¨å²ã¨ã¬ãããªä½¿ã£ã¦ã¿ãã®ã§ãLinear Haskell ã®ç¾å¨ã®ä½¿ãå¿å°ã¨å°æ¥ã®å±æãå ±åãããã 使ããã¨æãã°ä½¿ãã段éã«ããããã©ãä¸é¨ãã°ãããããã¾ã è¨èªæ©è½é¢ã§å®è£ ã追ãä»ãã¦ããªãé¨åããã£ã¦ãå¿«é©ã«æ¸ããããã«ãªãã«ã¯ããã¡ãã£ã¨æããããããã§ãå®ç¨ãããã¨æãã°ã§ããã¬ãã«ã«ãããã Rustã®ããã«ãªãã«ã¯Linear Constraintsã«æå¾ ã æ´æ°å±¥æ´ 2023/12/15 11:45 å§å¦¹ç·¨ã¸ã®ãªã³ã¯è¿½å ã 2023/10/01 12:30 ç·åæ§ãç´å¾ãã¦ãããªãå ´åã® \eta-å±
Note: Sections 2.0 and 3.0 of this article were added in response to comments on Hacker News and Reddit. Since its inception on 2000-05-29, SQLite has been implemented in generic C. C was and continues to be the best language for implementing a software library like SQLite. There are no plans to recode SQLite in any other programming language at this time. The reasons why C is the best language to
paild 社ã§ãæä¼ãããã¦ãã yuki ã§ããååã«å¼ãç¶ã Dependency Injection ç¥ã㦠DI ã®è©±é¡ãæ¸ãã¦ããããã¨æãã¾ããä»å㯠Rust ã«ããã DI ã«ã¤ãã¦ããããã¨èãã¦ã¿ã¾ãããä»åç´¹ä»ããå®è£ ã¯ããªãåç´ãªä¾ãç¨ãããã®ã§ããã®è¨äºããããã«ã¿ãªããã®ã¢ããªã±ã¼ã·ã§ã³ã®å®è£ ç¶æ³ã«åããã¦ããã¤ã工夫ã¯å¿ è¦ã«ãªãããããã¾ããããã ãã¨ã£ãããã¨ãã¦ã¯ååãªãã®ã«ãªã£ã¦ããã¨æãã®ã§ãDI ã§ãå°ãã®æ¹ã¯ãã²åèã«ãã¦ã¿ã¦ãã ããã ä»åå®è£ ãããã¢ããªã±ã¼ã·ã§ã³ã®ãé¡ã«ã¤ã㦠ä»åç´¹ä»ããææ³ã®ç¨®å¥ã«ã¤ã㦠ã³ã³ã¹ãã©ã¯ã¿ã¤ã³ã¸ã§ã¯ã·ã§ã³ éçãã£ã¹ããããç¨ãããã® åçãã£ã¹ããããç¨ãããã® éçãã£ã¹ãããã¨åçãã£ã¹ãããã®å©ç¹ã»æ¬ ç¹ shaku ï¼DI ã³ã³ããï¼ãç¨ããã¤ã³ã¸ã§ã¯ã·ã§ã³ shaku ã®å©ç¹ã»æ¬ ç¹ ä½è«: DI
H(uman-friendly) 㪠grep ã³ãã³ã hgrep ãã¤ããã¾ããï¼ github.com '\w+ ã§æ¤ç´¢ããæã®åºå ãã¡ã¤ã«ãç¹å®ã®ãã¿ã¼ã³ã§æ¤ç´¢ãï¼ãããããç®æãæ§æãã¤ã©ã¤ãããã³ã¼ãçã§è¡¨ç¤ºãã¾ãï¼è¶ ãã£ããè¨ãã¨ï¼ripgrep ã§æ¤ç´¢ã㦠bat ã§ãããç®æä»è¿ã表示ãããããªæãã§ãï¼ grep -C ã«ããã³ã³ããã¹ã表示ã«ä¼¼ã¦ãã¾ããï¼ãããè¡ãè¿ãæã¯1ã¤ã®ã³ã¼ãçã«ã¾ã¨ããï¼å¨å²ä½è¡ã表示ãããããã¥ã¼ãªã¹ãã£ãã¯ã«å°ãè³¢ã決ãã¦ãããªã©ï¼ã¡ãã£ã¨åºåã¯å·¥å¤«ãã¦ãã¾ãï¼ åæ© æå ã®ãªãã¸ããªã§ã³ã¼ããæ¤ç´¢ããæ㯠åç´ã« grep ã§æ¤ç´¢ãã¦ãããçµæãçºãã grep | fzf ã®ããã«æ¤ç´¢çµæã fzf ã§çµãè¾¼ãã ããã¬ãã¥ã¼ãã vim $(grep -l ...) ã®ããã«æ¤ç´¢çµæãã¨ãã£ã¿ã§éã ãããã使ãåãã¦ããã®ã§ãã
ããã¯å¤©ä¹ ä¿ Advent Calendar 2022 äºæ¥ç®ã®è¨äºã§ããææ¥ã¯ä¼æ¥ãªã®ã§ããã¿ã§ãã æ¬è¨äºã¯å ¨é¨ GNU/Linux ã«ããã¦ã®è©±ã§ãELF å®è¡å¯è½å½¢å¼ã®ãã¡ã¤ã«ã®ãã¨ãæãã¦ãã¤ããªã¨å¼ã³ã¾ãã Rust ã§æ¸ããããã°ã©ã ããã«ããã¦é å¸ããããã¨ãããã§ãããããµã¼ãã¼ã¢ããªã±ã¼ã·ã§ã³ãªã©ã¨ãªãã°ã³ã³ããã¤ã¡ã¼ã¸ãé å¸ããã®ãã¾ã£ã¨ãã«æãã¾ãããã³ãã³ãã©ã¤ã³ã¢ããªã±ã¼ã·ã§ã³ã¨ãªãã¨å®è¡ã®æ軽ããèµ·åãªã¼ãã¼ãããã¸ã®é æ ®ãããã¯ããã¤ããªãé å¸ããå¿ è¦ãåºã¦ããã¨æãã¾ããä¸æ¹ã§ Rust ã§ãã«ããããã¤ããªã¯[1]ã·ã¹ãã ã® glibc ã«åçãªã³ã¯ããã¦ãããå¯æ¬æ§ãä½ãå¯è½æ§ãããã¾ããã¤ã¾ãããã«ãããç°å¢ãã glibc ã®ãã¼ã¸ã§ã³ãä½ãç°å¢ã§ãã®ãã¤ããªã¯åããªãå¯è½æ§ãããã¨ãããã¨ã§ããå®ä¾ãè¦ã¦ã¿ã¾ããããä¸ã®ããã°ã©ã [2]㯠Deb
Rustã®ãã¬ã¤ãï¼ä»¥éRustãã¬ã¤ãã¨ã¤ãªãã¦å¼ã¶ãã¨ã«ããï¼ã¯ä¸ä½ä½ãªã®ããæ§ã ãªä»è¨èªã®æ¦å¿µãéãã¦èª¿ã¹ã¦ãããããã£ã¨ï¼ããã¯ããã§ãããã®ã ãï¼çµè«ãåºãã®ã§æ¸ãã¦ãããã¨æãã ã¾ããRustãã¬ã¤ãã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ãªã®ããMixInãªã®ããã¯ãã¾ããã¬ã¤ããªã®ãã¨ãããã¨ã«ã¤ãã¦æ¸ãç´ãããã£ãã®ã§ãããã¤ãã§ã«æ¸ãã Rustã®ãã¬ã¤ãã«ãããå¦å® åç½®ã Rustã®ãã¬ã¤ãã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ã¯ãªã Rustã®ãã¬ã¤ãã¯Javaã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ã¯ãªã Rustã®ãã¬ã¤ãã¯C#ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ã¯ãªã Rustã®ãã¬ã¤ãã¯MixInã§ã¯ãªã Rustã®ãã¬ã¤ãã¯ãã¬ã¤ãã§ã¯ãªã Rustã®ãã¬ã¤ãã¯ãé«ã«ã¤ã³ãå¤ç¸ã®ãªãåã¯ã©ã¹ãã ã£ã æ ¹æ 1: åã¯ã©ã¹ã¨ç¨æ³ãåãã§ãã æ ¹æ 2: éè¤ããé¢æ°ããã£ãéã®æåãåã Rustã®ãã¬ã¤ãã§ã¯é«ã«ã¤ã³ãå¤ç¸ãã§ããª
ãã¤ã¯ã©ã¹æ±äººTOPITè¨äºä¸è¦§Rustã§Webã¢ããªã±ã¼ã·ã§ã³ã®ããã¯ã¨ã³ããéçºããã«ã¯Â â åã·ã¹ãã ã®å ç¢æ§ã¨æè»æ§ãæ¥åã·ã¹ãã ã«ãï¼ Rustã§Webã¢ããªã±ã¼ã·ã§ã³ã®ããã¯ã¨ã³ããéçºããã«ã¯Â â åã·ã¹ãã ã®å ç¢æ§ã¨æè»æ§ãæ¥åã·ã¹ãã ã«ãï¼ å®å ¨æ§ã«å¤§ããªç¹å¾´ãããããã°ã©ãã³ã°è¨èªRustã¯ãCè¨èªãC++ã«ä»£ããã·ã¹ãã è¨è¿°è¨èªã¨ãã¦æ³¨ç®ããã¦ãã¾ããããããããã®å®å ¨æ§ã¨ããã©ã¼ãã³ã¹ã®é«ãã«ããããã¸ãã¹ã¢ããªã±ã¼ã·ã§ã³ã®æ§ç¯ã«ãæ¡ç¨ããã¦ãã¾ãããã®è¨äºã§ã¯ãã£ãã£æ ªå¼ä¼ç¤¾ã«ããäºä¾ãç´¹ä»ãã¾ãã ããã«ã¡ã¯ããã£ãã£æ ªå¼ä¼ç¤¾ããã¯ã¨ã³ãã¨ã³ã¸ãã¢ã®æ¾ç°ã¨ç³ãã¾ãã ãã£ãã£æ ªå¼ä¼ç¤¾ã§ã¯ããã¢ãã¥ããç£æ¥ã®ããã³ã·ã£ã«ã解æ¾ããããããã·ã§ã³ã¨ãã¦ã製é æ¥åéã«é¢é£ãããã¾ãã¾ãªã½ããã¦ã§ã¢ã®éçºãè¡ã£ã¦ãã¾ããã¾ãããã®ããã®ä¸»è¦ãªéçºè¨èªã¨ãã¦Rustãæ¡ç¨
ã¯ããã« ããã«ã¡ã¯nasaã¡ããã§ãã goroutineä½ãåããã!async/awaitä½ãåããã!ã¨ãªã£ãã®ã§ãããããæ¯è¼ãã¤ã¤ç解ãæ·±ãã¦ã¿ãããã¨ããèãã®ãã¨Go, Rustã®ä¸¦è¡ããã°ã©ãã³ã°ã®è§£èª¬è¨äºãæ¸ãã¦ã¿ã¾ããã ã¨ããã©ãããµãã£ã¨ãã¦ãããããè£è¶³ãææãè²°ããã¨å¤§å¤å©ããã¾ãã ä»å話ãã㨠goroutineã¨ã¯çµå±ä½ãªã® Goã®ä¸¦è¡å¦çã®ä»çµã¿ goroutine(Go)ã¨async/await(Rust)ã®æ¯è¼ Goã®ã©ã³ã¿ã¤ã ãRustã®ã©ã³ã¿ã¤ã ã®è©± 話ããªãã㨠æ§æã®éãã«ã¤ãã¦ã¯ç¹ã«è§¦ããªã ã©ã¡ããåªãã¦ããã¨ãè¨ã話ã¯ããªã ãã¼ã¹ã«ãªã£ã¦ããææ³ã«ã¤ãã¦ã¯ç¹ã«è§¦ããªã TL;DR Goã«ã¯æ¨æºã®ã©ã³ã¿ã¤ã ãããããRustã§ã¯ã©ã³ã¿ã¤ã ã©ã¤ãã©ãªã使ãå¿ è¦ãããã Goã¯ã©ã³ã¿ã¤ã ãä¸æåéã管çããããRustã§ã¯ããã°ã©ãã¼ã管
I struggled for years with a chronic misunderstanding of Go. I kept trying to compare it to the usual suspects in the "next systems language" crowd (D, Rust, Zig). That wasn't quite right.Once I realized that its sweet spot is large-ish services that you want closer to the metal than Java but for which would be silly to go as low level as C++, Go fans started making a whole lot more sense to me. I
What_killed_Haskell_could_kill_Rust.md At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again. What killed Haskell, could kill Rust, too What killed Haskell, could kill Rust, too. Why wo
Iâm porting the TypeScript Type Checker tsc to Go, and not Rust. As the creator of SWC, an extensible Rust platform, this might sound strange. Let me explain. Why port tsc?# As TypeScript continues to rise in adoption, large projects are facing a dilemma: type checking is one of the slowest parts of their workflow. Developers want type safety without the tradeoff of slower iteration cycles. The Ty
æ¦è¦ 2^n-1 åã®æ°ã¯ã¡ã«ã»ã³ãæ°ã¨å¼ã°ããæ´ã«ç´ æ°ã§ããå ´åã«ã¡ã«ã»ã³ãç´ æ°ã¨ããã¾ããæ¬è¨äºã§ã¯ãã¡ã«ã»ã³ãæ°ã«å¯¾ããé«éãªç´ æ°å¤å®æ³ã§ãããªã¥ã«ã»ã¬ã¼ãã¼ãã¹ãããRustã®ä»»æ精度æ¼ç®ç¨ã¯ã¬ã¼ã rug ãå©ç¨ãã¦å®è£ ãã¾ãã å®è¡ç°å¢ CPU: Intel Core i7 1.8GHz ã¡ã¢ãª: 16GB OS(ãã¹ã): Windows 10 Home 21H1 WSL2: Ubuntu 20.04.3 rustc: Ver. 1.55.0 cargo: Ver. 1.55.0 符å·ä»ãæ´æ°åã®ç¯å²ã«ã¤ã㦠Rustã«ã¯çµã¿è¾¼ã¿ã®æ´æ°åã¨ã㦠8,\,16,\,32,\,64,\,128 ãããæ´æ°[1]ããããã符å·ä»ãã»ç¬¦å·ãªãã§åãã£ã¦ãã¾ã[2]ããã®ãã¡ç¬¦å·ä»ãæ´æ°ã¯ãä»ã®å¤ãã®è¨èªã¨åæ§ã2ã®è£æ°ã«ãã£ã¦è² ã®æ°ã表ç¾ããã¾ãããããã£ã¦ããããæ° n = 8,
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}