News for hackers. Stuff that matters.
Re:The rules behing Rust functions by cratermoon on Sunday September 14, 2025 @10:12AM (#45239849)
To the author of this blog post: please write the code examples as syntax-colored text, and definitely not as images. I'd love to copy the code and paste it into the Rust playground or godbolt, so I can see exactly what the compiler does and how the code behaves. I can't do that with screenshots of code.
Re:The rules behing Rust functions by CamJN on Sunday September 14, 2025 @01:52PM (#45241792)
You can on Apple’s OSs, and some googling suggests you can do it on windows too if you save the image and open in the image viewer. Therefore I’d be surprised if you couldn’t get it working on various linux distros too...
Re:The rules behing Rust functions by Klonoar on Sunday September 14, 2025 @03:51PM (#45242707)
You have to understand how ridiculous this answer sounds.

This is a technical forum. There is an expectation of how things are shared. Images and relying on built in OCR is not anywhere in line with that expectation.

Re:The rules behing Rust functions by Jaxan on Sunday September 14, 2025 @01:56PM (#45241831)
Still it would be nice if the author used the right format for the job.
Re:The rules behing Rust functions by hagen_dogs on Sunday September 14, 2025 @05:34PM (#45243432)
I wrote a script for linux you can use to get around this, but also easy enough to vibe code for other platforms: https://github.com/doomdagadiggiedahdah/ss2txt
Re:The rules behing Rust functions by cuongleqq on Friday September 19, 2025 @12:18AM (#45297901)
Hi, author here.

I didn't know my post was submitted here. So sorry for the late answer.

The problem with code on substack is that they don't have syntax highlight which make reading the code a pain :( Let me see how to improve it in the next posts.

Thank you for reading!