Tux Machines

Programming Leftovers

Posted by Roy Schestowitz on Apr 18, 2023

=> OpenBSD Filesystems Talk and Memory Leak/Misbehaviour Detection | Microsoft, Crime, Security, and FUD

Processing a complex syntax with Rust’s declarative macros

=> ↺ Processing a complex syntax with Rust’s declarative macros

I am by no means a Rust expert, and I’m no expert on declarative macros. I was merely solving an issue I had: there was a lot of redundancy in the way my error types were coded. I didn’t want to repeat the same coding patterns all the time, yet the types also seemed too heterogenous for declarative macros. And going with procedural macros wasn’t worth the effort in this case.
After some experimentation I figured out how declarative macros could work in this scenario after all. I doubt that this approach is very original, and maybe I solved something in a sub-optimal way. I couldn’t find any helpful online sources however, which is why I’m documenting this in my own article. Edit: After publishing this article, I found that the pattern used here is called TT munching.

Rust Foundation so sorry for scaring the C out of you with trademark crackdown talk

=> ↺ Rust Foundation so sorry for scaring the C out of you with trademark crackdown talk

The foundation, which steers the memory-safe programming language, had proposed fresh rules on the use of the word Rust and its logo, which included the recommendation that people not use 'Rust' in their Rust crate names, eg: vulture-rs would be preferred over vulture-rust. These draft changes triggered a backlash.

A series of ever-bigger problems

=> ↺ A series of ever-bigger problems

From your boss’s perspective it’s the same thing, though: you’re solving a problem for them that they then don’t have to worry about anymore. It’s “I gave that ticket to Anna, she’ll take care of it”, then “I put Anna on it, she’ll implement this with the new junior dev”, then “Anna’s our domain expert there, she says we should do X”, then “Those teams? Yeah, Anna works with them and makes sure they perform well and solve the business problems we have in this area”.

The curse of being good in IT

=> ↺ The curse of being good in IT

Most devs are average, but many strong opinions in IT are shared by people that are better than average. Because of this, there is a gap between what most people need, and what they get told to do.
You may not notice it, but it's very possible you are making your life more difficult than it should be. To avoid the trap of dealing with more complexity than is good for you, you should always re-calibrate whatever you read and hear to your context. This calls for more introspection than you think.

A list of programming playgrounds

=> ↺ A list of programming playgrounds

I really like using (and making!) programming playgrounds, and I got thinking the other day about how I didn’t have a great list of playgrounds to refer to. So I asked on Mastodon for links to cool playgrounds.

How to Use Django Template Filters

=> ↺ How to Use Django Template Filters

Django is a powerful Python web framework loaded with many useful built-in features that make building complex web-focused products a lot easier; one such feature is its templating engine.
The Django templating engine allows you to build reusable and dynamic HTML pages that change based on data passed to the template language. It provides filters that are used to transform data in the HTML templates. Template filters can be used to transform the values of variables and tag arguments.

=> gemini.tuxmachines.org

Proxy Information
Original URL
gemini://gemini.tuxmachines.org/n/2023/04/18/Programming_Leftovers.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-GB
Capsule Response Time
139.98276 milliseconds
Gemini-to-HTML Time
1.245211 milliseconds

This content has been proxied by September (ba2dc).