{"id":2167,"date":"2015-12-07T14:13:43","date_gmt":"2015-12-07T06:13:43","guid":{"rendered":"https:\/\/gergely.imreh.net\/blog\/?p=2167"},"modified":"2015-12-08T13:18:51","modified_gmt":"2015-12-08T05:18:51","slug":"lotm-rust-results","status":"publish","type":"post","link":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/","title":{"rendered":"Language of the Month: Rust, the results"},"content":{"rendered":"<p>Every now and then I do a &#8220;Language of the Month&#8221; feature when I spend one month to learn a new programming language. This last month in November\u00a0<a href=\"https:\/\/gergely.imreh.net\/blog\/2015\/11\/language-of-the-month-rust\/\">I&#8217;ve spent with Rust<\/a>, and it&#8217;s time to take stock. Will look at the impression I had in this short time, show one project that I get done in Rust, and some ideas what I&#8217;d like to do with Rust in the future!<\/p>\n<h2>Experience<\/h2>\n<p>According to my time log, I have spent about 20 hours this month learning Rust. That&#8217;s way too little to have a good understanding, but definitely enough to have some educated guesses (and excitement, and horror , as appropriate). This time I&#8217;m generally very impressed as Rust comes across as indeed a very modern and smart language, although that modernness is mostly in the tooling and non-essential parts. It is also changing very quickly, for good and bad. Here are some, admittedly subjective and incomplete list of observations. Good is what I like, Bad what&#8217;s less nice IMHO, and Ugly is what&#8217;s imperfect or confusing (at this stage of my Rust learning):<\/p>\n<h3>Good<\/h3>\n<p>It&#8217;s great to see that <strong>documentation<\/strong> is a not an afterthought, but a <a href=\"https:\/\/doc.rust-lang.org\/stable\/book\/documentation.html\">core part<\/a>, that is making use a lot of modern development experience. Having a standard way to include example code in docstrings and actual tests are run on them to make sure the examples are also up-to-date with the code is a very cool concept. Also being able to auto-generate HTML documentation from the code is probably going to be standard in most new languages (I think <a href=\"http:\/\/golang.org\/\">Go<\/a> does that also, and other languages have gained similar optional tools)<\/p>\n<p><!--more--><\/p>\n<p>It&#8217;s also great to see how <strong>testing<\/strong> is a not an afterthought either. There are <a href=\"https:\/\/doc.rust-lang.org\/stable\/book\/testing.html\">a bunch of different ways<\/a> of including tests (in the same file, test file, directory with test, in documentation&#8230;), though most of the time there&#8217;s probably one way that fits the project the best and can use that.<\/p>\n<p>Rust has some very interesting foundations, mostly on top of the <a href=\"https:\/\/doc.rust-lang.org\/stable\/book\/references-and-borrowing.html\">memory model<\/a> and <a href=\"https:\/\/doc.rust-lang.org\/stable\/book\/traits.html\">traits<\/a>, that take quite a bit of time to wrap one&#8217;s head around (I&#8217;m not there yet), but goes a very long way to <strong>eliminate programming by accident<\/strong> (or <a href=\"https:\/\/en.wikipedia.org\/wiki\/Programming_by_permutation\">programming by permutation<\/a>): it makes the it much harder to write something, see whether it works as hoped, and if not, then try to change something little and try again. Here it does not really work anymore as there are way too many things that have to be correct for the code to run, and the best to get there is to <em>actually understand<\/em> how the code should work.<\/p>\n<p><strong>Traits<\/strong> are intriguing, <a href=\"https:\/\/doc.rust-lang.org\/stable\/book\/traits.html\">they<\/a> remind me a bit of Python&#8217;s <a href=\"https:\/\/en.wikipedia.org\/wiki\/Duck_typing\">duck typing<\/a>, though only similar. This also includes <a href=\"https:\/\/doc.rust-lang.org\/book\/generics.html\">generics<\/a>, or parametric polymorphism.\u00a0<a href=\"http:\/\/manishearth.github.io\/blog\/2015\/05\/27\/wrapper-types-in-rust-choosing-your-guarantees\/\">Composed types<\/a> are also the bomb &#8211; once you understand it and stop doing permutations of them to try to get the code to compile. :)<\/p>\n<p>Interesting use <strong>semicolons<\/strong>, \u00a0in particular for returning value when it is omitted on the last expression in a function (a bit like <a href=\"https:\/\/en.wikipedia.org\/wiki\/MATLAB\">Matlab<\/a>, where it is used as which function results to print on the debug console, and which just use silently).<\/p>\n<p>Having a way to mark <strong>unimplemented<\/strong>\u00a0sections (as <a href=\"https:\/\/doc.rust-lang.org\/std\/macro.unimplemented!.html\">part of the standard library<\/a>) is very pragmatic, I&#8217;m sure it came out of a lot of engineering experience.<\/p>\n<p><a href=\"https:\/\/doc.rust-lang.org\/book\/strings.html\">Strings<\/a> being <strong>UTF-8 by default<\/strong> is a great choice and probably necessary nowadays, even if more complex. (Python goes a long way, but not quite there yet)<\/p>\n<p>I&#8217;m glad to see that <strong>lists can have trailing commas<\/strong> after the last element. That&#8217;s a little thing, but boy how much I cannot stand Javascript lists because of the lack of this leniency.<\/p>\n<p><strong>Macros<\/strong> are a whole different level of power, if and when <a href=\"https:\/\/doc.rust-lang.org\/stable\/book\/macros.html\">understood<\/a>. It feels strange sometimes to mix &#8220;normal&#8221; functions and method with something that is just &#8220;sort of like a function&#8221;, but this is all part of the metal model. I see that they are useful, though they also come across as necessary only because of the design principles used in the language (and its relative verbosity). That also mean, that advanced Rust probably makes more use of macros than beginner&#8217;s Rust.<\/p>\n<p><a href=\"https:\/\/doc.rust-lang.org\/stable\/book\/enums.html\">Enums<\/a> are data types containing a list of variants. <strong>Coverage checking in enum matching<\/strong>\u00a0(&#8220;did I handle all possible cases?&#8221;) shows again that plenty of lessons learned are put to use in making Rust.<\/p>\n<p><strong>Loop labels<\/strong> are cool too, they can come handy with <a href=\"http:\/\/rustbyexample.com\/flow_control\/loop\/nested.html\">nested loops<\/a>\u00a0to handle things clearly with less boilerplate \/ extra variables.<\/p>\n<p><strong>Cargo<\/strong> is a very interesting <a href=\"https:\/\/crates.io\/\">package manager<\/a>. Have separate concept for binaries and libraries, for debug and release builds, running tests, lint, documentation, set up cross-compiling, and so on. I can also see from bits and pieces that there&#8217;s a lot to learn about this too to enable really cool use cases.<\/p>\n<h3>Bad<\/h3>\n<p>Most of the difficulty I had was connected to the combined fact of Rust is <strong>pretty new and changes quickly<\/strong>. Because of this others&#8217; projects where I found answers to my questions could be already obsolete, the docs don&#8217;t go into enough detail to actually understand things well enough without a lot of practical trial and error, could find a programming pattern for a problem and it being already removed from the language, or the fact that (I think) the nightly builds are recommended to be used as they have the latest features enabled? This of course is not all bad, I feel that being a Rust developer now one could really leave a mark and contribute, learn a lot in unchartered territory and teach a lot of people because too few teachers are out there. It&#8217;s only troublesome when one just want to &#8220;solve a problem&#8221;, but then maybe other language is better to use.<\/p>\n<p>Would love to see <strong>more documentation<\/strong> (and actual practical examples) to explore the memory model, reference and borrowing, traits, macros &#8211; these most powerful and useful parts of the language. This is connected to the previous step, and I think it&#8217;s up to us users to use them more, boil the examples down by experience and write the things up&#8230;<\/p>\n<h3>Ugly<\/h3>\n<p><strong>Type declarations<\/strong> are required for functions, but for variable assignments they are inferred. The <a href=\"https:\/\/doc.rust-lang.org\/book\/functions.html\">docs say<\/a> it&#8217;s a sweet spot, but it strikes me a bit of schizophrenic. I often find that adding an explicit type to assignments makes things work a lot better here.<\/p>\n<p>I find the <strong>docstrings<\/strong> hard to get going, eg. making them compatible to generate the library docs from inline documentation. I might have done something wrong, but even the example code in the Rust book does not seem to play with doc generation very well. Also include example code and testing code in the docstrings and the confusion amplifies.<\/p>\n<p>The <strong>difference of method syntax<\/strong> between <a href=\"https:\/\/doc.rust-lang.org\/book\/method-syntax.html\">associated functions and method calls<\/a>\u00a0is probably a necessary one, it still feels somehow a bit of mental burden to carry (at least in the beginning, I&#8217;m sure it&#8217;s a beginner&#8217;s issue).<\/p>\n<p><strong>Diverging functions<\/strong> are an interesting beast too: there&#8217;s a <a href=\"https:\/\/doc.rust-lang.org\/reference.html#diverging-functions\">different declaration<\/a> for functions that have no return value. I kinda see how doing things this way can fit Rust&#8217;s model of doing things, but is it really necessary to create a whole new concept and different patterns for it? I guess this case could be handled conceptually in many ways and this is just one&#8230;<\/p>\n<p><strong>Need to import types<\/strong> from the standard library to be able to use some of their features, but some other features work automatically. This feels a bit of a halfway solution, though, might be necessary to keep the resulting binaries down (by not including what&#8217;s not needed), but that could probably be achieved more automatically?<\/p>\n<p><strong>Attributes<\/strong> are flags in the code to (sort of) <a href=\"http:\/\/rustbyexample.com\/attribute.html\">tell Rust<\/a> to how to handle the different code sections. Enabling debug mode, adding info about tests (that the next test should actually fail to consider it a pass, etc..), and a lot more. They are very powerful so could be considered good, but there are so many of them and so sparsely discussed most of the time that they belong for me more to this section. Need more documentation, I believe.<\/p>\n<h2>Project: Bitmessage Proof-of-Work library<\/h2>\n<p>I wanted to actually do a project in Rust for practical experience. To do something short but still somewhat useful, I decided to create a <a href=\"https:\/\/bitmessage.org\/wiki\/Main_Page\">Bitmessage<\/a>\u00a0proof-of-work (PoW) library. I&#8217;ve already worked on it for a bit for other projects (trying to make some \u00a0OpenGL, and Parallella accelerated versions) so it was kinda familiar and tractable task in during the month.<\/p>\n<p>The Bitmessage <a href=\"https:\/\/bitmessage.org\/wiki\/Proof_of_work\">proof of work<\/a> in pseudocode is something like:<\/p>\n<pre class=\"lang:default decode:true\" title=\"Bitmessage proof-of-work pseudocode\">initialHash = hash(dataToCheck)\r\nresultHash = hash(hash( nonce || initialHash ))\r\ntrialValue = the first eight bytes of resultHash converted to an integer<\/pre>\n<p>where &#8220;hash&#8221; is <a href=\"https:\/\/en.wikipedia.org\/wiki\/SHA-2\">SHA512<\/a>, and the trialValue is compared to a target calculated from \u00a0the time-to-live of the message to be sent.<\/p>\n<p>I took most of the inspiration from the Python version of this in the reference client, that reads:<\/p>\n<pre class=\"lang:python decode:true\" title=\"Bitmessage Proof-of-Work in Python\">trialValue, = unpack('&gt;Q',hashlib.sha512(hashlib.sha512(pack('&gt;Q',nonce) + initialHash).digest()).digest()[0:8])<\/pre>\n<p>Hard to beat a practical one-liner for clarity, but there&#8217;s a bit to say about performance.<\/p>\n<p>I ended up creating <a href=\"https:\/\/github.com\/imrehg\/bmpow-rust\">bmpow-rust<\/a>, that runs multithreaded calculation for this algorithm, using the <a href=\"https:\/\/github.com\/DaGenix\/rust-crypto\">rust-crypto<\/a>. I&#8217;ve been through quite a bit of trial and error, both for the PoW algorithm and the threading.<\/p>\n<p>For the PoW the hardest part was casting the data into suitable types that the different functions can pass them around correctly. How to get data from a caller in a shared library, how to <a href=\"https:\/\/github.com\/BurntSushi\/byteorder\">set the endiannes<\/a>, how to pass it to the hasing function, then get the data out again. I know the current version is not great, especially as some modifications to the code that I think should not change the outcome actually does end up with changing it.<\/p>\n<p>Basic threading\u00a0\u00a0is dead simple as Rust promises it to be, but then the issue I had there is how to send data out of the different threads when a thread finds the right nonce and signal to the other threads to stop working. <a href=\"http:\/\/rustbyexample.com\/std_misc\/channels.html\">Channels<\/a> are there to help (and they are brilliant), but the the memory model (borrowing and referencing) didn&#8217;t fit to how I thought it should be. Tried out 2-3 other libraries that implement similar messaging methods between threads, but in the end it turned out that channels are indeed the right choice &#8211; the trick was that I didn&#8217;t need to explicitly shut down threads, they were killed when the calling function finished, making the whole setup much simpler. I know I should add some more error checking into the code for niceness, though I think not strictly required by the problem being solved (and race conditions doesn&#8217;t matter, if multiple threads find nonces, any of them are suitable).<\/p>\n<p>The result is this (likely horrifyingly bad) code to find the right nonce (so it does more than the pseudocode above):<\/p>\n<pre class=\"lang:rust decode:true \" title=\"Bitmessage proof-of-work worker\">fn bmpow(target: u64, hash: [u8; 64], starter: u64, stepsize: u64, chan_out: Sender&lt;u64&gt;) {\r\n    let mut nonce: u64 = starter;\r\n    let mut algoresult;\r\n\r\n    loop {\r\n        let mut wtr = vec![];\r\n        let mut result: [u8; 64] = [0; 64];\r\n        let mut hasher_inner = Sha512::new();\r\n        let mut hasher_outer = Sha512::new();\r\n\r\n        nonce += stepsize;\r\n        match wtr.write_u64::&lt;BigEndian&gt;(nonce) {\r\n            Ok(_) =&gt; {},\r\n            Err(e) =&gt; { println!(\"error writing endian: {}\", e) },\r\n        }\r\n        hasher_inner.input(&amp;wtr);\r\n        hasher_inner.input(&amp;hash);\r\n\r\n        hasher_inner.result(&amp;mut result);\r\n        hasher_outer.input(&amp;result);\r\n\r\n        let mut result_outer: [u8; 64] = [0; 64];\r\n        hasher_outer.result(&amp;mut result_outer);\r\n\r\n        let mut r2 = vec![0; 64];\r\n        hasher_outer.result(&amp;mut r2);\r\n        let mut rdr = Cursor::new(r2);\r\n        \/\/ Converting from BigEndian to the endinannes of the system\r\n        algoresult = rdr.read_u64::&lt;BigEndian&gt;().unwrap();\r\n        if algoresult &lt; target {\r\n            chan_out.send(nonce).unwrap();\r\n            return;\r\n        }\r\n    }\r\n}<\/pre>\n<p>The resulting library is pretty good, compared to the multithreaded Python solution that clocks in ~400,000 check\/s on my X201, on single thread it does 800,000+ check\/s. When using multiple threads, it does not scale linearly, though, and much more variable: I&#8217;m getting 800,000 &#8211; 1,800,000 hash\/s, different on each run. I guess spreading the work between cores is not very consistent in Rust yet? Will need to investigate more as the \u00a0higher performance would be very nice to have reliably.<\/p>\n<p>In the meantime, the <a href=\"https:\/\/github.com\/imrehg\/bmpow-rust\">library is available on Github<\/a>. Feel free to send me a bitmessage at <span class=\"lang:default decode:true crayon-inline \">BM-NBooR8MZhawaba2hW6nwPHvNiQKrTVCB<\/span>\u00a0.<\/p>\n<h2>Future<\/h2>\n<p>I&#8217;ll definitely explore Rust more, it&#8217;s a very interesting language, and even through the difficulties understanding some parts I felt a strange happiness working with it. It feels good, even though I don&#8217;t quite know why, yet.<\/p>\n<p>Some projects that I took a note to do (eventually):<\/p>\n<p>An <strong>IPython kernel<\/strong> for Rust. Not sure whether it really makes sense, or even possible, but when I see s<a href=\"https:\/\/github.com\/ipython\/ipython\/wiki\/IPython-kernels-for-other-languages\">o many languages listed<\/a> to have kernels for <a href=\"http:\/\/jupyter.org\/\">IPython\/Jupyter<\/a>, it has to be!<\/p>\n<p>Rust is aimed to be a systems programming language, and it&#8217;s fun to see how people use it to cross-compile for different architectures. Combining inspiration from <a href=\"http:\/\/www.randomhacks.net\/bare-metal-rust\/\">Bare Metal Rust<\/a>\u00a0and some other language&#8217;s demo to cross-compile for the Pebble (lost the link), thinking about making <strong>Rust binding for the Pebble SDK<\/strong> to make watchfaces and apps in Rust. This is not a fully formed idea, and there other who already done some first steps (e.g. <a href=\"https:\/\/github.com\/franc0is\/RustyPebble\">a Pebble app written in Rust<\/a>), but I&#8217;m sure there&#8217;s a lot more path to map.<\/p>\n<p>These are just samples, more ideas will likely come as I have more projects to do (boy, do I have a lot of projects already that I want to do&#8230;)<\/p>\n<h2>Links of Note<\/h2>\n<p>Some links that might be useful for others as well:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/kud1ing\/awesome-rust\">Awesome Rust<\/a>: a collection of awesome rust code and resources, a lot of things!<\/li>\n<li><a href=\"https:\/\/play.rust-lang.org\/\">Rust Playground<\/a><\/li>\n<li><a href=\"https:\/\/crates.io\/\">Cargo<\/a>, though I&#8217;m sure every Rust programmer knows this<\/li>\n<li><a href=\"http:\/\/rustbyexample.com\/\">Rust by Example<\/a><\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/reference.html\">Rust Reference<\/a>, the <a href=\"https:\/\/doc.rust-lang.org\/std\/\">Rust Standard Library<\/a><\/li>\n<li><a href=\"http:\/\/lucumr.pocoo.org\/2015\/5\/27\/rust-for-pythonistas\/\">Rust for Pythonistas<\/a>, <a href=\"https:\/\/www.gitbook.com\/book\/aminb\/rust-for-c\/details\">Rust for C++ Programmers<\/a><\/li>\n<\/ul>\n<p>Similar writeups than this:<\/p>\n<ul>\n<li><a href=\"http:\/\/zsiciarz.github.io\/24daysofrust\/\">24 Days of Rust<\/a>\u00a0(might be a bit old now, though)<\/li>\n<li><a href=\"http:\/\/scattered-thoughts.net\/blog\/2015\/06\/04\/three-months-of-rust\/\">Three Months of Rust<\/a><\/li>\n<\/ul>\n<p>Also, thanks for <a href=\"https:\/\/this-week-in-rust.org\/\">This Week in Rust<\/a> to mention my the previous post of this Language of the Month feature, and all the people who left a comment there to educate me about Rust, really appreciated!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every now and then I do a &#8220;Language of the Month&#8221; feature when I spend one month to learn a new programming language. This last month in November\u00a0I&#8217;ve spent with Rust, and it&#8217;s time to take stock. Will look at the impression I had in this short time, show one project that I get done [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2133,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[185,44,182],"class_list":["post-2167","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prog","tag-bitmessage","tag-lotm","tag-rust"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Language of the Month: Rust, the results - ClickedyClick<\/title>\n<meta name=\"description\" content=\"Learning a new programming language for a month, using it for some real-world projects, and sharing the experience.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Language of the Month: Rust, the results - ClickedyClick\" \/>\n<meta property=\"og:description\" content=\"Learning a new programming language for a month, using it for some real-world projects, and sharing the experience.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/\" \/>\n<meta property=\"og:site_name\" content=\"ClickedyClick\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/gergely.imreh\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/gergely.imreh\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-07T06:13:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-12-08T05:18:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2015\/11\/Mozilla_Rust_header.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"604\" \/>\n\t<meta property=\"og:image:height\" content=\"270\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gergely Imreh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@imrehg\" \/>\n<meta name=\"twitter:site\" content=\"@imrehg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gergely Imreh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/\"},\"author\":{\"name\":\"Gergely Imreh\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#\\\/schema\\\/person\\\/42391e2ae52c8ed76b37be509a5707b0\"},\"headline\":\"Language of the Month: Rust, the results\",\"datePublished\":\"2015-12-07T06:13:43+00:00\",\"dateModified\":\"2015-12-08T05:18:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/\"},\"wordCount\":2260,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#\\\/schema\\\/person\\\/42391e2ae52c8ed76b37be509a5707b0\"},\"image\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/Mozilla_Rust_header.jpg\",\"keywords\":[\"bitmessage\",\"lotm\",\"rust\"],\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/\",\"url\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/\",\"name\":\"Language of the Month: Rust, the results - ClickedyClick\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/Mozilla_Rust_header.jpg\",\"datePublished\":\"2015-12-07T06:13:43+00:00\",\"dateModified\":\"2015-12-08T05:18:51+00:00\",\"description\":\"Learning a new programming language for a month, using it for some real-world projects, and sharing the experience.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/Mozilla_Rust_header.jpg\",\"contentUrl\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/Mozilla_Rust_header.jpg\",\"width\":604,\"height\":270},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2015\\\/12\\\/lotm-rust-results\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Language of the Month: Rust, the results\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/\",\"name\":\"ClickedyClick\",\"description\":\"Life in real, complex and digital.\",\"publisher\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#\\\/schema\\\/person\\\/42391e2ae52c8ed76b37be509a5707b0\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#\\\/schema\\\/person\\\/42391e2ae52c8ed76b37be509a5707b0\",\"name\":\"Gergely Imreh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g\",\"caption\":\"Gergely Imreh\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g\"},\"description\":\"Physicist, hacker. Enjoys avant-guarde literature probably a bit too much. Open source advocate and contributor, both for software and hardware. Follow these posts on the Fediverse by @gergely@gergely.imreh.net\",\"sameAs\":[\"https:\\\/\\\/gergely.imreh.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/gergely.imreh\",\"https:\\\/\\\/www.instagram.com\\\/imrehg\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/gergelyimreh\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@GergelyImreh\"],\"url\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/author\\\/gergely\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Language of the Month: Rust, the results - ClickedyClick","description":"Learning a new programming language for a month, using it for some real-world projects, and sharing the experience.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/","og_locale":"en_GB","og_type":"article","og_title":"Language of the Month: Rust, the results - ClickedyClick","og_description":"Learning a new programming language for a month, using it for some real-world projects, and sharing the experience.","og_url":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/","og_site_name":"ClickedyClick","article_publisher":"https:\/\/www.facebook.com\/gergely.imreh","article_author":"https:\/\/www.facebook.com\/gergely.imreh","article_published_time":"2015-12-07T06:13:43+00:00","article_modified_time":"2015-12-08T05:18:51+00:00","og_image":[{"width":604,"height":270,"url":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2015\/11\/Mozilla_Rust_header.jpg","type":"image\/jpeg"}],"author":"Gergely Imreh","twitter_card":"summary_large_image","twitter_creator":"@imrehg","twitter_site":"@imrehg","twitter_misc":{"Written by":"Gergely Imreh","Estimated reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/#article","isPartOf":{"@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/"},"author":{"name":"Gergely Imreh","@id":"https:\/\/gergely.imreh.net\/blog\/#\/schema\/person\/42391e2ae52c8ed76b37be509a5707b0"},"headline":"Language of the Month: Rust, the results","datePublished":"2015-12-07T06:13:43+00:00","dateModified":"2015-12-08T05:18:51+00:00","mainEntityOfPage":{"@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/"},"wordCount":2260,"commentCount":7,"publisher":{"@id":"https:\/\/gergely.imreh.net\/blog\/#\/schema\/person\/42391e2ae52c8ed76b37be509a5707b0"},"image":{"@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/#primaryimage"},"thumbnailUrl":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2015\/11\/Mozilla_Rust_header.jpg","keywords":["bitmessage","lotm","rust"],"articleSection":["Programming"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/","url":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/","name":"Language of the Month: Rust, the results - ClickedyClick","isPartOf":{"@id":"https:\/\/gergely.imreh.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/#primaryimage"},"image":{"@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/#primaryimage"},"thumbnailUrl":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2015\/11\/Mozilla_Rust_header.jpg","datePublished":"2015-12-07T06:13:43+00:00","dateModified":"2015-12-08T05:18:51+00:00","description":"Learning a new programming language for a month, using it for some real-world projects, and sharing the experience.","breadcrumb":{"@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/#primaryimage","url":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2015\/11\/Mozilla_Rust_header.jpg","contentUrl":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2015\/11\/Mozilla_Rust_header.jpg","width":604,"height":270},{"@type":"BreadcrumbList","@id":"https:\/\/gergely.imreh.net\/blog\/2015\/12\/lotm-rust-results\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gergely.imreh.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Language of the Month: Rust, the results"}]},{"@type":"WebSite","@id":"https:\/\/gergely.imreh.net\/blog\/#website","url":"https:\/\/gergely.imreh.net\/blog\/","name":"ClickedyClick","description":"Life in real, complex and digital.","publisher":{"@id":"https:\/\/gergely.imreh.net\/blog\/#\/schema\/person\/42391e2ae52c8ed76b37be509a5707b0"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gergely.imreh.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/gergely.imreh.net\/blog\/#\/schema\/person\/42391e2ae52c8ed76b37be509a5707b0","name":"Gergely Imreh","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g","caption":"Gergely Imreh"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g"},"description":"Physicist, hacker. Enjoys avant-guarde literature probably a bit too much. Open source advocate and contributor, both for software and hardware. Follow these posts on the Fediverse by @gergely@gergely.imreh.net","sameAs":["https:\/\/gergely.imreh.net\/","https:\/\/www.facebook.com\/gergely.imreh","https:\/\/www.instagram.com\/imrehg\/","https:\/\/www.linkedin.com\/in\/gergelyimreh\/","https:\/\/www.youtube.com\/@GergelyImreh"],"url":"https:\/\/gergely.imreh.net\/blog\/author\/gergely\/"}]}},"_links":{"self":[{"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/posts\/2167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/comments?post=2167"}],"version-history":[{"count":15,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/posts\/2167\/revisions"}],"predecessor-version":[{"id":2182,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/posts\/2167\/revisions\/2182"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/media\/2133"}],"wp:attachment":[{"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/media?parent=2167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/categories?post=2167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/tags?post=2167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}