TWiR quote of the week


#343

You should really read the whole conversation.


#344

Manish reminisces on his blog:

Back in these days, we had none of this newfangled “stability” business. The compiler broke your code every two weeks. Of course, you wouldn’t know that because the compiler would usually crash before it could tell you that your code was broken! Sigils roamed the lands freely, and cargo was but a newborn child which was destined to eventually end the tyranny of Makefiles.


#345

rustc uses llvm to share pocky without the use of hands

—randomly generated by the mcc_ebooks Twitter bot


#346

I really hate the phrase “fighting”. Calling it a fight doesn’t do justice to the conversations you have with the borrow checker when you use Rust every day. You don’t fight with the borrow checker, because there isn’t a fight to win. It’s far more elegant, more precise. It’s fencing; you fence with the borrow checker, with ripostes and parries and well-aimed thrusts. And sometimes, you get to the end and you realize you lose anyway because the thing you were trying to do was fundamentally wrong. And it’s okay, because it’s just fencing, and you’re a little wiser, a little better-honed, a little more practiced for your next bout

kaosjester on HN


As much as I fight with it, the borrow checker is really awesome
How low-level is Rust?
#347

#348

Clippy is for those of you who have become desensitized to the constant whining of the Rust compiler and need a higher dosage of whininess to be kept on their toes. Clippy is for those perfectionists amongst you who want to know every minute thing wrong with their code so that they can fix it. But really, Clippy is for everyone.


#349

@tomaka in IRC (#rust around the same time as this post)

Here is an example of what I call a “complex type”:
vulkano::command_buffer::AutoCommandBufferBuilder<(((((((((), vulkano::command_buffer::cmd::CmdBeginRenderPass<std::sync::Arc<vulkano::framebuffer::RenderPass<Boxvulkano::framebuffer::RenderPassDesc>>, std::sync::Arc<vulkano::framebuffer::Framebuffer<std::sync::Arc<vulkano::framebuffer::RenderPassmain::scope::CustomRenderPassDesc>, (std::sync::Arcvulkano::image::SwapchainImage,)>>>), vulkano::command_buffer::cmd::CmdBindVertexBuffers<std::sync::Arc<vulkano::buffer::CpuAccessibleBuffer<[main::Vertex]>>>), vulkano::command_buffer::cmd::CmdPushConstants<(), std::sync::Arc<vulkano::pipeline::GraphicsPipeline<vulkano::pipeline::vertex::SingleBufferDefinitionmain::Vertex, vulkano::descriptor::pipeline_layout::PipelineLayout<vulkano::descriptor::pipeline_layout::PipelineLayoutDescUnion<main::vs::Layout, main::fs::Layout>>, std::sync::Arc<vulkano::framebuffer::RenderPassmain::scope::CustomRenderPassDesc>>>>), vulkano::command_buffer::cmd::CmdBindDescriptorSets<(), std::sync::Arc<vulkano::pipeline::GraphicsPipeline<vulkano::pipeline::vertex::SingleBufferDefinitionmain::Vertex, vulkano::descriptor::pipeline_layout::PipelineLayout<vulkano::descriptor::pipeline_layout::PipelineLayoutDescUnion<main::vs::Layout, main::fs::Layout>>, std::sync::Arc<vulkano::framebuffer::RenderPassmain::scope::CustomRenderPassDesc>>>>), vulkano::command_buffer::cmd::CmdSetState),vulkano::command_buffer::cmd::CmdBindPipeline<std::sync::Arc<vulkano::pipeline::GraphicsPipeline<vulkano::pipeline::vertex::SingleBufferDefinitionmain::Vertex, vulkano::descriptor::pipeline_layout::PipelineLayout<vulkano::descriptor::pipeline_layout::PipelineLayoutDescUnion<main::vs::Layout, main::fs::Layout>>, std::sync::Arc<vulkano::framebuffer::RenderPassmain::scope::CustomRenderPassDesc>>>>), vulkano::command_buffer::cmd::CmdDrawRaw), ulkano::command_buffer::cmd::CmdEndRenderPass)>
So good luck using a type alias


#350

Aaaaaaaaaaaaaaand… compiler error.


#351

@gurry


#352

I really like the comments from people who visit /r/rust on reddit thinking it’s a videogame’s subreddit. I found this one extremely funny:

For a second i tought i was on the subreddit of the videogame Rust 
and i was so confused about all this.

I was like damn, you guys really go deep into the details of the game programming
and stuff but what about gameplay and balance, i want something concrete.

I think i need to go to bed.

Source


#353

My mom says I can only use Rust from 4-6pm on Sundays.

/u/tehmicdrop


#354

I see it as a progression — if some functionality grows too big, it gets its own module. If the module grows too big, its moved into a crate in the same repo and workspace, and if that has life on its own, its moved to a separate repo as a project on its own.


#355

A. Shipilëv via Twitter:

/me is patiently waiting for Reddit and HN threads mocking Java.
“LOL, those Java guys have to disable their GC! They are reinventing Rust!”


#356

Should you write data structures in Rust? If you just want to use them,
get one of those available in std or on crates.io. Otherwise, knock
yourself out; if you don’t, the borrow checker likely will.

llogiq


#357

" I really love rust - there are so many constraints from the compiler like its my birthday. "
Multi crate repository vs multiple repositories


#358

https://news.ycombinator.com/item?id=13670495


#359

said here


#360

There is not better Rust Evangelism than real C code.


#361

From the “Rust and OOP” thread.


#362
<raynold> ahh it's a wonderful day. rust is the best
<bstrie> raynold: you're halfway to a haiku
<bstrie> day so wonderful / rust programming is the best / it's snowing on mt. fuji
<mbrubeck> fn foo(U) -> T / where T: FromIterator / <Item=U>
<mbrubeck> (`U` is an allusion to the "sUmmer", obviously)
<bstrie> mbrubeck: it's... so beautiful ;_;