need help naming a variable. I'm basically splitting a string into exactly two parts (not necessarily equal lengths). I need variable names for the first part and second part. Should I just use first_part and second_part? Is there a better option than "part"?

I much be searching through the word list more often than I did in the old version or something like that

Show thread

I tried my hand at re-writing a Rust tool I wrote in 2018, with an eye toward improving speed and code readability. Hilariously, it's seems to be much slower! (Haven't bothered with benchmarks or tests yet)

github.com/sts10/compound-pass

FYI 'The Abyss' is on Amazon Prime and it holds up.

What are you favorite movies involving boats/submarines/oceans?

Are We Yeet Yet?

> This is a tracking page to see if/when yeet becomes a reserved keyword in Rust.

areweyeetyet.rs/

h/t lobste.rs/s/3i5r6d/are_we_yeet

"Reducing Rust Incremental Compilation Times on macOS by 70%"

This blog post advocates for "[configuring] split-debuginfo to skip the dsymutil process" to speed up compile time.

jakedeichert.com/blog/reducing

Curious what is lost if you do that?

h/t lobste.rs/s/csftqj/reducing_ru

. @bugaevc helped me explore more efficient ways of writing a function that splits a string on a given character. There was a pretty clear winner... unless you've got an idea for an approach we didn't think of.

github.com/sts10/splitter

Show thread

I'm trying to find the word list that croc (github.com/schollz/croc) uses to generate passphrases, but I can't find it in the repo? Any hints?

WhatsApp may be down for some users theverge.com/2021/3/19/2234040

Signal says their "registrations are through the roof; welcome everyone! Solidarity to the folks working on the WhatsApp outage."

twitter.com/signalapp/status/1

These dynamics are (still) interesting to me!

Snyder cut take 

The Snyder Cut is pretty bad!

update: I understand now that Python has this pattern:

bar = 'something' if foo else 'something else'

Thanks for those who chimed in!

This is fine and nice! But, I'd argue, not nearly as flexible (meant to be one-line) or readable (order of keywords is strange) as the Rust approach.

Show thread

surprised to find that one of the things I miss most from Rust that's apparently not in Python is ability to assign a new variable directly with a proper (multiline-if-necessary) if/else statement. It nicely ensures that the variable will have a value after it's done, right?

In Rust:
let bar = if foo { "something" } else { "something else" };

nice to see the Rust lang folks launch an effort to improve how the language handles/supports async (something I continue to struggle with, and made it easier for me to move away from Rust)

> Our goal is to engage the entire community in a collective act of the imagination: how can we make the end-to-end experience of using Async I/O not only a pragmatic choice, but a joyful one?

blog.rust-lang.org/2021/03/18/

In Python, I've got a list of entries where each one, simplified, look like this

entry = {'foo': [{'bar': 'String that I want'}]}

Is there a way to get that String I want without a bunch of if statements that check against `is not None`? In Ruby I'd use the dig method.

Show older
Octodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!