{"id":1545,"date":"2015-03-21T23:07:40","date_gmt":"2015-03-22T06:07:40","guid":{"rendered":"http:\/\/zackmdavis.net\/blog\/?p=1545"},"modified":"2015-03-21T23:07:40","modified_gmt":"2015-03-22T06:07:40","slug":"xxx-ii","status":"publish","type":"post","link":"http:\/\/zackmdavis.net\/blog\/2015\/03\/xxx-ii\/","title":{"rendered":"XXX II"},"content":{"rendered":"<pre><code>\/\/ XXX: old_io is probably facing deprecation if names mean anything\r\n#![feature(old_io)]\r\nuse std::old_io;\r\nuse std::collections::HashMap;\r\n\r\nfn main() {\r\n    let things_to_ask_about = [\"name\", \"age\", \"username\"];\r\n    let mut collected_information = HashMap::new();\r\n    for askable in things_to_ask_about.iter() {\r\n        println!(\"What is your {}?\", askable);\r\n        let input = old_io::stdin()\r\n            .read_line()\r\n            .ok().expect(\"failure message here\");\r\n        \/\/ XXX EVIDENCE OF MY IMPENDING DEATH in these moments when I\r\n        \/\/ want to scream with the righteous fury of a person who has\r\n        \/\/ been genuinely wronged, on the topic of what the fuck is wrong\r\n        \/\/ with this bullshit language where you can't even trim a string\r\n        \/\/ because \"`input` does not live long enough\" this and \"borrowed\r\n        \/\/ value is only valid for the block suffix following statement 1\r\n        \/\/ at 21:48\" that\r\n        \/\/\r\n        \/\/ But what the fuck is wrong with this bullshit language is in\r\n        \/\/ the map, not the territory\r\n        \/\/\r\n        \/\/ on the balance of available evidence, doesn't it seem more\r\n        \/\/ likely that the borrow checker is smarter than you, or that\r\n        \/\/ the persons who wrote the borrow checker are smarter than you?\r\n        \/\/\r\n        \/\/ and if you can't even follow their work even after several\r\n        \/\/ scattered hours of dutifully trying to RTFM, will an\r\n        \/\/ increasingly competitive global Economy remain interested in\r\n        \/\/ keeping you alive and happy in the decades to come?\r\n        \/\/\r\n        \/\/ I am not a person who has been genuinely wronged, just a man\r\n        \/\/ not smart enough to know any better\r\n        collected_information.insert(askable, input.trim());\r\n    }\r\n\r\n    for (askable, response) in collected_information.iter() {\r\n        println!(\"You claimed that your {} is {}.\", askable, response);\r\n    }\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ XXX: old_io is probably facing deprecation if names mean anything #![feature(old_io)] use std::old_io; use std::collections::HashMap; fn main() { let things_to_ask_about = [\"name\", \"age\", \"username\"]; let mut collected_information = HashMap::new(); for askable in things_to_ask_about.iter() { println!(\"What is your {}?\", askable); &hellip; <a href=\"http:\/\/zackmdavis.net\/blog\/2015\/03\/xxx-ii\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[75],"_links":{"self":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/1545"}],"collection":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/comments?post=1545"}],"version-history":[{"count":1,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/1545\/revisions"}],"predecessor-version":[{"id":1546,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/1545\/revisions\/1546"}],"wp:attachment":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/media?parent=1545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/categories?post=1545"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/tags?post=1545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}