投稿時間:2022-09-19 09:13:22 RSSフィード2022-09-19 09:00 分まとめ(18件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 未経験からプログラミングを学んでITエンジニアになった理由は? 100人調査の結果 https://www.itmedia.co.jp/business/articles/2209/15/news149.html itmedia 2022-09-19 08:30:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 駅での困りごと 「エレベーターが少ない」「駅員がいない」を抑えた1位は? https://www.itmedia.co.jp/business/articles/2209/19/news029.html itmedia 2022-09-19 08:30:00
AWS AWS - Japan JAPAN RUGBY LEAGUE ONE の映像管理システム事例ご紹介 | AWS メディアセミナー 2022 Q3 https://www.youtube.com/watch?v=-uZtvIgwXYM japanrugbyleagueone 2022-09-18 23:49:04
AWS AWS - Japan AXNでの放送素材納品システムのクラウド化事例 | AWS メディアセミナー 2022 Q3 https://www.youtube.com/watch?v=S7vS8MzQq6g AXNでの放送素材納品システムのクラウド化事例AWSメディアセミナーQAWSメディアセミナーQこの事例がすごい。 2022-09-18 23:44:56
AWS AWS - Japan ABEMA NEWSにおけるクラウドライブプロダクションの取り組みと運用事例 | AWS メディアセミナー 2022 Q3 https://www.youtube.com/watch?v=jZy01ZzggNc ABEMANEWSにおけるクラウドライブプロダクションの取り組みと運用事例AWSメディアセミナーQAWSメディアセミナーQこの事例がすごい。 2022-09-18 23:44:05
AWS AWS - Japan スポーツ分析向け映像サービスでのAWS活用 | AWS メディアセミナー 2022 Q3 https://www.youtube.com/watch?v=Z-cXsYruFwM スポーツ分析向け映像サービスでのAWS活用AWSメディアセミナーQAWSメディアセミナーQこの事例がすごい。 2022-09-18 23:41:04
Azure Azureタグが付けられた新着投稿 - Qiita AzureAD Join した Windows 11 に RDP できる環境を Azure CLI で作ってみた https://qiita.com/mnrst/items/412dac20ca6beabe7513 azureadjoin 2022-09-19 08:57:21
海外TECH DEV Community Learning Rust - Merkel Tree https://dev.to/msedzins/learning-rust-merkel-tree-9p Learning Rust Merkel TreeRecently in my spare time I ve started to learn Rust and as an exercise I ve decided to implement a Merkel Tree Wiki Sounds easy but it s turned out to be a real adventure In this post I m sharing some of my experiences Step I ve started with preparing the data structures Here is something really basic that would work with many languages struct MerkelTree leaves Vec lt MerkelNode gt struct MerkelNode parent Option lt MerkelNode gt hash String Merkel Tree consists of list of nodes labelled as leaves Each leaf contains hash of the corresponding data block and link to the parent node Parent node groups two leaves binary tree and contains hash of their hashes It also contains link to its parent node which groups two nodes at higher level That rule is repeated upwards until we end up with a single node at the top root node It contains so called root hash and it has no parent Needless to say the structures I ve designed didn t work The error said struct MerkelNode recursive type has infinite sizeIt s turned out to be quite well known error in Rust At compile time it needs to know how much space a type takes up Which is not possible with the approach I ve taken There is an easy solution to that problem described here Enabling recursive types with boxes So let s try it out Step I ve used box smart pointer which allows storing data on the heap In that way my structure has a known fixed size at compile time struct MerkelNode parent Option lt Box lt MerkelNode gt gt hash String The code above compiles so I was happy to start implementation However even after a few hours I was still not able to make my code compile The problem was not with the logic The problem was that I was not able to express what I wanted in the way that was acceptable by Rust Then it came to me it just can t work and the problem is with the structures again Two core rules in Rust say Each value in Rust has an owner There can only be one owner at a time But in my case I have for example two leaves that point to the same parent Which one of them is owner of the parent Step Ok I can t have two owners so it means I have to borrow values and use references struct MerkelNode parent Option lt Box lt amp MerkelNode gt gt hash String However above code will not compile because references in structures require using lifetimes struct MerkelNode lt a gt parent Option lt Box lt amp a MerkelNode lt a gt gt gt hash String The code looks a bit cluttered but at least it compiles Let s continue with implementation then After another few hours once again I came to conclusion it can t work this way I can borrow the value multiple times That s fine But what about this rule Each value in Rust has an owner Looks like I don t have an owner now I mean I have it somewhere along the line but I don t have any dedicated place to store it for the entire duration of the program Step At that point of time I ve come to conclusion that I was doing something fundamentally wrong There must be a pattern in Rust that will allow me to do what I want After some googling I finally found this The Reference Counted Smart PointerIt provides the multiple ownership capability whoa Definition of the structure looks like this struct MerkelNode parent Option lt Rc lt MerkelNode gt gt hash String Now finally I can have two owners for the same parent node There is only one final catch here Rc lt T gt allows sharing the data for reading only It is not sufficient in my case because once I created the node I need to modify it with the pointer to the parent which is not known at the time of creation After an hour or so Step It turns out there is an interior mutability pattern in Rust that will allow me to do exactly what I need The final definition of the structure looks like this struct MerkelNode parent Option lt Rc lt RefCell lt MerkelNode gt gt gt hash String With this structure I was able to implement working solution I m sure there is a lot ot things still to be optimised in my code but today I call it a day and celebrate 2022-09-18 23:08:36
海外TECH CodeProject Latest Articles libpe - PE32/PE32+ Binaries Viewer Library https://www.codeproject.com/Articles/5205732/libpe-PE32-PE32plus-Binaries-Viewer-Library information 2022-09-18 23:51:00
ニュース BBC News - Home Queen's funeral: Queue for Queen's coffin closed to new entrants https://www.bbc.co.uk/news/uk-62951092?at_medium=RSS&at_campaign=KARANGA entrantsseveral 2022-09-18 23:50:22
ニュース BBC News - Home MOTD2 analysis: Gabriel Jesus is the 'game-changer' for Arsenal, says Alan Shearer https://www.bbc.co.uk/sport/av/football/62948563?at_medium=RSS&at_campaign=KARANGA MOTD analysis Gabriel Jesus is the x game changer x for Arsenal says Alan ShearerMOTD pundit Alan Shearer says Gabriel Jesus is the game changer for Arsenal as he analyses the forward s performance against Brentford 2022-09-18 23:28:22
ニュース BBC News - Home The Queen's funeral: Which businesses are open and closed? https://www.bbc.co.uk/news/business-62879563?at_medium=RSS&at_campaign=KARANGA funeral 2022-09-18 23:01:23
北海道 北海道新聞 久保、先制点アシスト サッカーのスペイン1部 https://www.hokkaido-np.co.jp/article/733131/ 共同 2022-09-19 08:24:56
北海道 北海道新聞 台風14号北上、北海道内19日から21日にかけ大雨 https://www.hokkaido-np.co.jp/article/733081/ 北海道内 2022-09-19 08:24:34
北海道 北海道新聞 日本、韓国下し3位 野球のU18W杯最終日 https://www.hokkaido-np.co.jp/article/733122/ 韓国 2022-09-19 08:21:12
北海道 北海道新聞 堂安、後半途中までプレー ドイツ1部、フライブルク https://www.hokkaido-np.co.jp/article/733132/ 後半途中 2022-09-19 08:21:00
北海道 北海道新聞 古江は3位、渋野28位 米女子ゴルフ最終日 https://www.hokkaido-np.co.jp/article/733130/ 女子ゴルフ 2022-09-19 08:21:00
ビジネス 東洋経済オンライン 働く母親の罪悪感「マミーギルト」から逃れる方法 家庭内のトラブルは母親が働いているせい? | 自衛隊員も学ぶ!メンタルチューニング | 東洋経済オンライン https://toyokeizai.net/articles/-/618082?utm_source=rss&utm_medium=http&utm_campaign=link_back 人間関係 2022-09-19 08:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)