216 results for "":
The quest for ooc.vim
I’ve spent the past few weeks after rock 0.9.8’s release working on some of the neglected aspects of ooc, namely tooling support and performance.
My kingdom for a vim plug-in!
Well, technically, ooc.vim is a few years old, and it was even updated a few times to match new ooc features. But unfortunately, so far, it was limited to syntax highlighting.
The virtue of unsynn
Addressing the rumors
There have been rumors going around, in the Reddit thread for facet, my take on reflection in Rust, which happened a bit too early, but here we are, cat’s out of the bag, let’s talk about it!
Rumors that I, podcaster/youtuber fasterthanlime, want to kill serde, serialization / deserialization framework loved by many and which contributed greatly to Rust’s success, and I just wanted to address those rumors and say that…
Proc macro support in rust-analyzer for nightly rustc versions
I don’t mean to complain. Doing software engineering for a living is a situation of extreme privilege. But there’s something to be said about how alienating it can be at times.
Once, just once, I want to be able to answer someone’s “what are you working on?” question with “see that house? it wasn’t there last year. I built that”.
Instead for now, I have to answer with: “well you see… support for proc macros was broken in rust-analyzer for folks who used a nightly rustc toolchain, due to incompatibilities in the bridge (which is an unstable interface in the first place), and it’s bound to stay broken for the foreseeable future, not specifically because of technical challenges, but mostly because of human and organizational challenges, and I think I’ve found a way forward that will benefit everyone.”
Getting in and out of trouble with Rust futures
I started experimenting with asynchronous Rust code back when futures 0.1
was all we had - before async/await
. I was a Rust baby then (I’m at least
a toddler now), so I quickly drowned in a sea of .and_then
, .map_err
and Either<A, B>
.
But that’s all in the past! I guess!
Now everything is fine, and things go smoothly. For the most part. But even
with async/await
, there are still some cases where the compiler diagnostics are,
just, so much.
The promise of Rust
The part that makes Rust scary is the part that makes it unique.
And it’s also what I miss in other programming languages — let me explain!
Rust syntax starts simple.
This function prints a number:
fn show(n: i64) {
println!("n = {n}");
}
And this program calls that function — it looks like any C-family language so far, we got parentheses, we got curly brackets, we got, uhh…
Day 2 (Advent of Code 2022)
Part 1
In the day 2 challenge, we’re playing Rock Papers Scissors.
We’re given a strategy guide like so:
A Y
B X
C Z
Left column is “their move”: A means Rock, B means Paper, C means Scissors. Right column is “our move”: X means Rock, Y means Paper, Z means Scissors.
Each line corresponds to a turn, and we must calculate the total score we get. Picking “Rock” gives 1 point, “Paper” gives 2 points, and “Scissors” gives 3. Losing the round gives 0 points, drawing gives 3, winning it gives 6.
The perils of ooc arguments
The ooc language is known to be friendly to C libraries, and we have a slew of them covered on GitHub, but one common hurdle is how to correctly declare extern functions.
Argument types
For an ooc function prototype, there are many types of arguments. You can go with regular variable declarations, like so:
something: func (a: Int, b: Int, c: String)
But in this case, a
and b
have the same type, so you can also use multi-declarations
to shorten it a bit:
Twitch fell behind
So you want to do live streams. Are you sure? Okay. Let’s talk about it.
Let’s talk numbers
Being a “content creator” (sorry for those who hate that term) is a job, for sure, and many people do it, successfully, full-time, they pay rent with it etc.
Platforms like Twitch & YouTube would have you think that, if you put in enough effort, you can grow your channel from nothing to 🎉 profitable ✨ in just a few short years.