ozkriff.games 🦀
219 subscribers
161 photos
8 videos
173 links
👋 I'm @ozkriff: Rust zealot, hobby game developer, fan of turn based games, one of arewegameyet.rs' maintainers and gamedev.rs' editors. ex-Wargaming, ex-JetBrains.

See the pinned message for more info and links: https://xn--r1a.website/ozkriff_games/4
Download Telegram
Forwarded from Блог*
#prog #rust #article

Stop writing Rust linked list libraries!

tl;dr:

Don’t write a Rust linked list library: they are hard to do well, and usually useless.

Use
VecDeque, which is great. If you actually need more than VecDeque can do, use one of the handful of libraries that actually offer a significantly more useful API.

If you are writing your own data structure, check if someone has done it already, and consider
slotmap or generation_arena, (or maybe Rc/Arc).
👍31
ozkriff.games 🦀
# Yes... Ha Ha Ha... YES! Sickos Ferris by aldeka (creator of Ferris)
# Ferris ❤️ Turbo.fish!

Another cool silly art piece by aldeka :D
😁7👍2🔥1
# 🤒

Caught a cold, great. Even though the weather in Armenia is much warmer than in SPb, it's still getting chilly here and turns out I'm not used to living without central heating at all. Note to future self: wear more warm clothes even at home and use more electric heating.
9
This media is not supported in your browser
VIEW IN TELEGRAM
# IntelliJ Rust Changelog #183 💡

Highlights:

- Intention previews and quick-fixes are now supported.
- Completion, navigation and other code insight features now work for intra-doc links (WIP, not all cases are supported).
- Derive proc-macro expansion is enabled in nightly plugin builds.

https://intellij-rust.github.io/2022/11/21/changelog-183

/r/rust discussion
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3
# November Dailyart Sketches #2

The second bunch of Nov sketches: a bear, a cartoonish old man's head, a guy standing with his hands crossed, and a DD-like swordsman.
👍5
Forwarded from Блог*
#prog #rust #article

Safely writing code that isn't thread-safe

One of the nice things about the Rust programming language is that it makes it easier to write correct concurrent (e.g. threaded) programs – to the degree that Rust’s slogan has been, at times, “fearless concurrency.”

But I’d like to tell you about the other side of Rust, which I think is under-appreciated. Rust enables you to write programs that are not concurrent. This feature is missing from most other languages, and is a source of much complexity and bugs.

“But wait,” you might be saying, “of course I can write code that isn’t concurrent in Java or Python or C!”

Can you, though? You can certainly write code that ignores concurrency, and would malfunction if (say) used from multiple threads simultaneously. But that’s not the same thing as writing code that isn’t concurrent – code that simply can’t be used concurrently, by compiler guarantee.

In Rust, you can. Let’s look at why you can do it, and why it’s awesome.
👍6
# cargo-deny

For those of you that may not be aware yet: cargo-deny has built-in support for detecting multiple versions of the same dependency. And it also can ban specific dependencies, discover vulnerabilities, do a license checkup, etc. It even has a ready Github Action, so please consider using it.
👍6🤔2
# JetBrains Survey: How Rust and C/C++ Ecosystems Coexist?

Hi, folks! Please participate in our short survey:

https://jb.gg/rust_cpp

> We’d like to learn from Rust developers about their experience and best practices with C and C++ code in their Rust code base. Share your experience with us via the survey and get a chance to win a prize!
🔥2
# November Dailyart Sketches #3

The third bunch of Nov sketches: a happy catblob, tower and shed isometric tiles, and a couple of skin tents
👍52🔥1😱1
# Google: Memory Safe Languages in Android 13

https://security.googleblog.com/2022/12/memory-safe-languages-in-android-13.html

> There are approximately 1.5 million total lines of Rust code in AOSP ... To date, there have been zero memory safety vulnerabilities discovered in Android’s Rust code.
> ...
> In general, use of unsafe in Android’s Rust appears to be working as intended. It’s used rarely, and when it is used, it’s encapsulating behavior that’s easier to reason about and review for safety.
> ...
> As the amount of new memory-unsafe code entering Android has decreased, so too has the number of memory safety vulnerabilities. From 2019 to 2022 it has dropped from 76% down to 35% of Android’s total vulnerabilities. 2022 is the first year where memory safety vulnerabilities do not represent a majority of Android’s vulnerabilities.

/r/rust discussion
🔥12
# Sleep Timer

I've only recently discovered for myself "sleep timer" apps. Now I can drown out all the anxious thoughts before sleep with an audiobook or a long YouTube video without the need to tediously search the place I fell asleep the next day, amazing! 😴

Settled with https://play.google.com/store/apps/details?id=ch.pboos.android.SleepTimer for now since it works with all the players I use and has the shake-to-wake function, so you can just shake the phone if you haven't fallen asleep quite yet - much better UX than trying to unlock the phone in the dark.
👍1🤔1
# /r/rust: "Is Crypto No Longer Leading Industry for Rust?

tldr: kinda yes and it's great

https://reddit.com/r/rust/comments/zb0bw7/crypto_no_longer_the_leading_industry_for_rust

Not sure about the "leading industry" phrasing but cryptocurrency/bc-related jobs used to totally dominate the rusty job offerings and it was a common source of complaints. Glad to see that the trend is changing.
🎉9🤯1
# Rustacean Station Podcast: Presser with Gray Olson

https://rustacean-station.org/episode/gray-olson

> Allen Wyma talks with Gray Olson, developer of Presser, a library that aims to make it easier to safely work with byte buffers.

- 00:00 - Gray’s background and introduction
- 04:18 - Gray’s art and graphic designing work for Embark Studio
- 08:40 - Ray tracing and fractals
- 13:44 - The most expensive process in a video game
- 16:48 - Vector graphics are so hard on the GPU
- 18:57 - What makes triangles very useful in drawing and designing
- 22:41 - Matrix math as a fundamental building block of computer graphics
- 28:13 - Understanding the concept of uninitialized memory and why Presser is necessary
- 36:31 - LLVM’s “No Uninitialized Memory” attribute.
- 39:06 - Rust’s virtual machine
- 40:52 - Allocating memory for data
- 49:34 - Safety invariants and validity invariants in the Rust ecosystem
- 53:19 - How to use unsafe code in a way that does not violate the validity invariant of Rust
- 1:04:01 - Embark Studio’s mission to enable those who play games to also modify the game worlds they play in
- 1:07:27 - Embark Studio’s Rust game projects
- 1:09:08 - Parting thoughts
👍2
# IntelliJ Rust Changelog #184 💡

https://intellij-rust.github.io/2022/12/05/changelog-184

Highlights:

- Function-like and derive proc macro expansion is finally enabled by default now! 🎉
- Show coerced types via "View | Type Info" action (ctrl+shift+p)
- Support short intra-doc links (in the [link] format)
- Experimentally set special environment variables when invoking proc-macro during completion so proc-macro's authors could use them for providing additional IDE-specific logic for custom completion (example).

/r/rust discussion
Please open Telegram to view this post
VIEW IN TELEGRAM
🎉5
# Update on JetBrains’ Statement on Ukraine

https://blog.jetbrains.com/blog/2022/12/06/update-on-jetbrains-statement-on-ukraine (followup on the March statement)

TLDR: All sales and R&D activities in Russia & Belarus stopped, all offices in Russia shut down, and liquidation papers for the Russian legal entity filed. The majority (800+) of Russian employees were relocated to Germany/Netherlands/Armenia/Serbia/Cyprus with families&pets, others decided to part ways with the company.
12😁1