Vasco Costa
vascocosta.bsky.social
Vasco Costa
@vascocosta.bsky.social
🦀 Developer | 🔧 Engineer | 🏁 Petrolhead | 🌍 Explorer

I like technology, computers, programming, solving problems, math, science, motorsport, traveling... Jack of all trades, master of almost none.
As a rustacean I must say I'm enjoying using TypeScript's neverthrow. In a way, the way it allows Result composition is even neater than Rust's.

No more try/catch/throw spaghetti code again. Makes TypeScript a bit more palatable for Rust lovers.

#rustlang #typescript
May 21, 2025 at 7:07 PM
That good feeling when you nail a good #rustlang one-liner that may not be the most readable but is so damn neat...
April 27, 2025 at 6:26 PM
Today on the 40th anniversary of Ayrton #Senna's maiden #F1 win during the 1985 F1 Portuguese GP at the soaked wet #Estoril Circuit, I had the chance to see his Lotus 97T/2 (the original chassis he raced). Happy fan standing next to the mythical #12 machine I remember watching on TV as a kid.
April 21, 2025 at 6:00 PM
Released v0.6.0 of zircon, a simple IRC library written in Zig.

Add support for TOPIC, RPL_TOPIC and RPL_NOTOPIC
Add support for ERR_CHANOPRIVSNEEDED
Add support for ERR_ERRONEUSNICKNAME
Add support for ERR_NOSUCHCHANNEL
Add support for ERR_NOSUCHNICK

#ziglang

github.com/vascocosta/z...
GitHub - vascocosta/zircon: A simple IRC library written in Zig.
A simple IRC library written in Zig. Contribute to vascocosta/zircon development by creating an account on GitHub.
github.com
April 16, 2025 at 8:14 PM
For those learning or refreshing their knowledge about #rustlang who enjoy reading on their e-reader, here's a list of freely available books in ePub format, including "The Rust Programming Language":

dieterplex.github.io/rust-ebooksh...
The Rust Language & Ecosystem - The Rust eBookshelf
dieterplex.github.io
April 16, 2025 at 8:50 AM
This is a good-hearted piggyback on a previous post by @rkuris.bsky.social.

OK #golang experts who don't know #rustlang! Without running this code and with one eye closed, how many of these modify their parent's data value?

Playground: play.rust-lang.org?version=stab...
April 10, 2025 at 8:51 AM
Rust makes me a better Zig coder when it comes to naive memory errors.

Zig makes me a better Rust coder when it comes to hidden allocation awareness.

I love both, for different reasons and projects.

#ruslang #ziglang
April 8, 2025 at 8:07 PM
Getting back to Zig I really appreciate how easy it is to read code.

There's a good balance between useful abstractions (like tagged unions) and overly abstracted code which you struggle to unpack when reading.

Zig nails the sweet spot in this area like no other language in my opinion.

#ziglang
April 3, 2025 at 8:22 AM
I can't emphasise how much I miss rust-analyzer / cargo check when I'm coding in other languages, like for instance Zig.

The small mistakes it catches right away, like an enum variant missing on a match/switch statement saves a lot of time, by avoiding compilation to find out.

#rustlang
March 29, 2025 at 10:16 PM
One fair use case for LLMs is to ask it to analyse some old codebase of which I don't remember the core concepts and provide me a summary of how it works from a high level point of view.

It's like travelling back in time and remember what was my thought process back then. Helpful.

#ai #llm
March 27, 2025 at 8:39 AM
Gleam makes FP accessible to normal coders. The familiar simplicity of the syntax does wonders. It's simple like Go with many Rust goodies.

It makes FP fun again for people like me that tried other FP languages but didn't feel like it was their cup of tea.

Thank you so much @lpil.uk. 🙂

#gleamlang
March 25, 2025 at 6:50 PM
Just a warm thank you and salutation to all my followers.

Being used to so much pointless arguing in other platforms, from IRC to X, I can't help but notice how civilised and enjoyable @bsky.app is.

Remember, it's OK to disagree and constructively debate, but waste no time with senseless fights.
March 23, 2025 at 8:17 PM
Getting back to Rust after a couple of days in Gleam I feel "dirty" when using &mut. 🤫

Nah, not really, used sparingly where it makes sense it's both faster and acceptable.

It's a pleasure to use both languages for recreational programming, depending on my mood.

#rustlang #gleamlang
March 21, 2025 at 9:18 PM
❯ gleam new reverse-args

We were not able to create your project as `reverse-args` does not have the
correct format. Project names ... may
only contain lowercase letters, numbers and underscores.

Would you like to name your project 'reverse_args' instead?

I love how strict gleam is.

#gleamlang
March 18, 2025 at 9:53 PM
Hello Gleam users!

Tell me a few reasons for learning Gleam.

Right now I'm a Rust coder who finds some Gleam concepts remarkably similar, albeit from a garbage collected perspective. It feels like a higher level, cousin of Rust.

How mature is the ecosystem around it?

#rustlang #gleamlang
March 16, 2025 at 3:43 PM
Great qualy performances by McLaren, Verstappen, Albon, Tsunoda and Bortoleto.

#f1 #formula1
March 15, 2025 at 6:06 AM
Fizz Buzz is always a nice way to showcase the expressiveness of pattern matching in Rust in a simple way:

fn fizz_buzz(n: u32) -> &'static str {
match (n % 3, n % 5) {
(0, 0) => "Fizz Buzz",
(0, _) => "Fizz",
(_, 0) => "Buzz",
_ => "None",
}
}

#rustlang
March 14, 2025 at 2:38 PM
This is my 33rd F1 season as a fan!

Still as hyped as in 1993.

Who else is going to watch FP1 live despite the schedule?

#f1 #formula1
March 14, 2025 at 12:21 AM
Who else has projects called programming_lang_x_playground like for instance rust_playground, go_playground or python_playground for the sake of toying around with programming languages when you have no real project to work on?
March 2, 2025 at 8:42 PM
Reposted by Vasco Costa
you may like cargo-sweep! recursively cleans all `target/` build directories: crates.io/crates/cargo...
crates.io: Rust Package Registry
crates.io
March 1, 2025 at 4:58 PM
core::mem
pub fn take(dest: &mut T) -> T
where
T: Default,

For when you need to take ownership of some non-copyable struct field, like when you must use a function that cannot take a reference. This is better than cloning, since it's just a move without a new allocation.

#rustlang #rusttips
February 22, 2025 at 4:19 PM