I got a couple more bits done with cargo-sandbox, a sandboxed wrapper around #rust 's cargo.

Went ahead and posted to reddit + lobsters. Feel free to post elsewhere and let me know, I don't check many sites tbh.

reddit.com/r/rust/comments/101

lobste.rs/s/owyoac/releasing_c

"Google’s ad business helps fund dangerous disinformation that puts public health and democracy at risk around the world, earns money from millions of gun ads while publicly claiming to block them, and allowed a sanctioned Russian ad tech company to harvest data on potentially millions of people, including possibly those in Ukraine, putting their security and privacy at risk."
@ProPublica
propublica.org/article/google-

Dipping a toe with my first “real” post. This story is from July, but I thought it might be of interest to folks who don’t normally follow math news or who might want to see the war in Ukraine from another perspective. I traveled to Switzerland to report and photograph this profile of Maryna Viazovska, who this year became the second woman to win a Fields Medal in the award’s 86-year history. quantamagazine.org/ukrainian-m

Many of the journalists Elon suspended today on Twitter are here on #Mastodon. Please follow and boost:

Drew Harwell, Washington Post
@drewharwell

Donie O’Sullivan, CNN
@donieosullivan

Steve Herman, VOA
@w7voa

Micah Lee, Intercept
@micahflee

Tony Webster
@tony

Matt Binder, Mashable
@MattBinder

#freepress #journalism #journalists #news

Day 11: "Monkey in the Middle"

The parsing of input was fairly hacky on this one. Could have probably made use of regexes. Interesting part two on figuring out the common divisor to keep values sane.

In Rust, best not to iterate over mutable vectors while also mutating those same elements. Keep the references immutable and return calculations instead of mutating in place.

Puzzle: adventofcode.com/2022/day/11

Solution:
github.com/haruska/aoc22/blob/

Show thread

@Schneems Just curious, you licensed your book "How to Open Source" as CC BY-NC-SA 4.0. Doesn't that effectively eliminate copy protections (assuming attribution and free digital copies)? Have you found it to be a problem? As the author, have you seen improvements from the community? Have folks re-mixed your work and published it?

One thing I appreciate about @Popehat 's writeup on exiting Twitter is that it captures something most articles in this genre only indirectly allude to:

It's not just that these platforms (and other things in our lives) are transitory, or that they can change. It's that we change, too. And maybe we don't always realize how much of a mismatch there is between who we are 𝘯𝘰𝘸 and what we once enjoyed, until the latter suddenly becomes something fundamentally different.

popehat.substack.com/p/goodbye

“Someone with a 1-hr car commute needs to earn 40% more to be as happy as someone with a short walk to work. On the other hand, if someone shifts from a long commute to a walk, their happiness increases as much as if they’d fallen in love.” #CityMakingMath
50 reasons why everyone should want more walkable streets & cities, in Fast Company:
fastcompany.com/3062989/50-rea
#cities #walking #walkablecities #urbanism

Day 10: "Cathode-Ray Tube"

Learned about VecDeque collection in rust for use as a queue. Most challenging part of this puzzle was understanding the wording to part two 😅

Puzzle: adventofcode.com/2022/day/10

Solution: github.com/haruska/aoc22/blob/

Show thread

Day 9: "Rope Bridge"

Came to a pretty elegant solution on this one. Just need to store the current points the knots are at (i32) and iterate through them.

Puzzle: adventofcode.com/2022/day/9

Solution:
github.com/haruska/aoc22/blob/

Show thread

Day 8: "Treetop Tree House"

Took a very unoptimized approach to this one but it worked fine for a smaller input.

Puzzle: adventofcode.com/2022/day/8

Solution:
github.com/haruska/aoc22/blob/

Show thread

Day 7: "No Space Left On Device"

This was particularly challenging in Rust due to the need for Rc/RefCell wrapping of nodes in the tree. Certainly a case where would shine.

Borrowing, cloning, unwrapping... definitely felt the borrow checker pain on this one.

Puzzle: adventofcode.com/2022/day/7

Solution:
github.com/haruska/aoc22/blob/

Show thread

Chris and I worked to make Ruby faster for the past decade, him with TruffleRuby and me with JRuby. We always talked optimization strategies at conferences, and he was always sharing ideas. I'm in shock about this, having just chatted with him at @rubyconf. A terrible loss.
---
RT @flavorjones
I'm heartbroken to share this news about our dear friend and colleague, @ChrisGSeaton.
twitter.com/flavorjones/status

While I do think Twitter is basically done as a serious open source contributor, there was one final comment that I kinda wish had been included:

"But on the other hand, open source is designed to be resilient. The fact that we can be grateful to the amazing Tweeps that have contributed over the years, and then fork the project and give it new life without Twitter, is open source working exactly as intended."

I'm very optimistic those projects can find new homes.

zdnet.com/article/twitter-turn

Day 6: "Tuning Trouble"

Seemed much easier than the other five puzzles to date. One interesting find was using all_unique() on an iterator of a slice of bytes. Made the solution fairly trivial.

Puzzle: adventofcode.com/2022/day/6

Solution: github.com/haruska/aoc22/blob/

Show thread

The 2022 State of #Rust Survey is now open!
blog.rust-lang.org/2022/12/05/
Please take the 5 to 20 minutes it takes to fill it in! Your responses are incredibly useful to set the direction of the project and gauge our progress!

Day 5: "Supply Stacks"

Interesting part of this puzzle was parsing the multi-part input. Ended up using Serde serde.rs and Recap github.com/softprops/recap crates for parsing lines to structs using regex named capture groups. Worked really well for this type of free-form input text.

Puzzle: adventofcode.com/2022/day/5

Solution: github.com/haruska/aoc22/blob/

Show thread
Show older
Haruska Mastodon

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