# 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.
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.
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.
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!
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
The third bunch of Nov sketches: a happy catblob, tower and shed isometric tiles, and a couple of skin tents
👍5❤2🔥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
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.
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.
Google Play
Sleep Timer (Turn music off) - Apps on Google Play
Sleep Timer lets you fall asleep to your favorite music.
👍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.
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.
Reddit
From the rust community on Reddit
Explore this post and more from the rust community
🎉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
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
Rustacean Station
Presser with Gray Olson :: Rustacean Station
Come journey with us into the weird, wonderful, and wily world of Rust.
👍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
- 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
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.
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.
The JetBrains Blog
Update on JetBrains’ Statement on Ukraine - The JetBrains Blog
As a response to the Russian Federation's invasion of Ukraine, we announced that we would be suspending all R&D activities in Russia, as well as our sales in Russia and Belarus. It has now been ap
❤12😁1
# Dwarf Fortress: Steam and Itch Release! ⛏
STRIKE THE EARTH! The legendary Dwarf Fortress - the deepest, most intricate simulation of a world that has ever been created - is out now on Steam & Itch with overhauled visuals and loads of accessibility improvements:
- https://store.steampowered.com/app/975370/Dwarf_Fortress
- https://kitfoxgames.itch.io/dwarf-fortress
STRIKE THE EARTH! The legendary Dwarf Fortress - the deepest, most intricate simulation of a world that has ever been created - is out now on Steam & Itch with overhauled visuals and loads of accessibility improvements:
- https://store.steampowered.com/app/975370/Dwarf_Fortress
- https://kitfoxgames.itch.io/dwarf-fortress
Steampowered
Dwarf Fortress on Steam
Build a fortress and try to help your dwarves survive against a deeply generated world. Keep your dwarves happy, grow their community and beware of digging too deeply. The deepest, most intricate simulation of a world that's ever been created.
🔥7❤1👍1
# What Every Rust Dev Should Know About Macro Support in IDEs
https://blog.jetbrains.com/rust/2022/12/05/what-every-rust-developer-should-know-about-macro-support-in-ides
Following the recent partial stabilization of proc-macro support in IntelliJ-Rust, Vitaly wrote a great blog post (with a veery clickbait title :D) about IDE-centric view on proc-macro expansion and what proc-macros' authors can do to improve interactive editing experience for their users (mostly relevant for complex DSLs). The post is obviously biased towards ijrust but RA mostly works with proc-macros in similar ways.
/r/rust discussion
https://blog.jetbrains.com/rust/2022/12/05/what-every-rust-developer-should-know-about-macro-support-in-ides
Following the recent partial stabilization of proc-macro support in IntelliJ-Rust, Vitaly wrote a great blog post (with a veery clickbait title :D) about IDE-centric view on proc-macro expansion and what proc-macros' authors can do to improve interactive editing experience for their users (mostly relevant for complex DSLs). The post is obviously biased towards ijrust but RA mostly works with proc-macros in similar ways.
/r/rust discussion
The JetBrains Blog
What Every Rust Developer Should Know About Macro Support in IDEs | The RustRover Blog
We use a lot of tools for software development. Compilers, linkers, package managers, code linters, and, of course, IDEs are essential parts of our work and life. There are areas where single-tool eff
👍3
# Tiny Glade 🏰🌿
https://store.steampowered.com/app/2198150/Tiny_Glade
Tiny Glade (pka Tiny Building Game) - a small relaxing game about doodling castles and petting sheep - finally got a Steam page!
> Let yourself unwind in this cozy building game. No management, no combat, no wrong answers. Just kick back, doodle some castles, and turn forgotten meadows into lovable dioramas!
Happy to see yet another rusty game getting to Steam:
> Tiny Glade is written in Rust :) We use a few crates from Bevy -- primarily the ECS. Then we build our own rendering, audio and gameplay on top. We're fans of Bevy, but have very specific needs, which drives to implement bespoke solutions.
The game is being developed by a small indie studio - https://pouncelight.games - started by a couple of ex-Embark-ers (@anastasiaopara and @h3r2tic).
Wishlist the game on Steam and subscribe to their newsletter to support the project!
https://store.steampowered.com/app/2198150/Tiny_Glade
Tiny Glade (pka Tiny Building Game) - a small relaxing game about doodling castles and petting sheep - finally got a Steam page!
> Let yourself unwind in this cozy building game. No management, no combat, no wrong answers. Just kick back, doodle some castles, and turn forgotten meadows into lovable dioramas!
Happy to see yet another rusty game getting to Steam:
> Tiny Glade is written in Rust :) We use a few crates from Bevy -- primarily the ECS. Then we build our own rendering, audio and gameplay on top. We're fans of Bevy, but have very specific needs, which drives to implement bespoke solutions.
The game is being developed by a small indie studio - https://pouncelight.games - started by a couple of ex-Embark-ers (@anastasiaopara and @h3r2tic).
Wishlist the game on Steam and subscribe to their newsletter to support the project!
Steampowered
Tiny Glade on Steam
Tiny Glade is a small diorama builder where you doodle whimsical castles, cozy cottages & romantic ruins. Explore gridless building chemistry as the game adorns your glades with procedural detail. No management, combat or goals: just kick back and turn forgotten…
❤4🔥3👍1
# Rust 1.66.0
Highlights:
- Explicit discriminants on enums with fields
-
-
https://blog.rust-lang.org/2022/12/15/Rust-1.66.0
/r/rust discussion
Highlights:
- Explicit discriminants on enums with fields
-
core::hint::black_box
- cargo remove-
..=X ranges in patternshttps://blog.rust-lang.org/2022/12/15/Rust-1.66.0
/r/rust discussion
🎉6🤨3
# IntelliJ Rust Updates Summary for 2022.3 Release Cycle
- Function-like and derive macros are expanded by default
- Build script evaluation by default
- Better support for intra-doc links
- let_chains
- Preview for intentions and quick-fixes
- Improved completion and auto-importing for proc-macro
- Gutter runners for doc tests
- Improved debugger pretty-printers
- and more:
https://blog.jetbrains.com/rust/2022/12/16/intellij-rust-updates-for-2022-3
/r/rust discussion
- Function-like and derive macros are expanded by default
- Build script evaluation by default
- Better support for intra-doc links
- let_chains
- Preview for intentions and quick-fixes
- Improved completion and auto-importing for proc-macro
- Gutter runners for doc tests
- Improved debugger pretty-printers
- and more:
https://blog.jetbrains.com/rust/2022/12/16/intellij-rust-updates-for-2022-3
/r/rust discussion
The JetBrains Blog
IntelliJ Rust: Updates for 2022.3 | The IntelliJ Rust Blog
In the 2022.3 release cycle we’ve enabled macro expansion for function-like and derive macros and build script evaluation by default.
We’ve implemented code insight features like the
We’ve implemented code insight features like the
👍2
# IntelliJ Rust Changelog #185 💡
https://intellij-rust.github.io/2022/12/19/changelog-185
We've just released another bi-weekly ijrust version!
Highlights:
- Initial type inference support for GATs.
- Show type hints inside attribute proc-macro.
- Improved support for new variants of range patterns.
- Respect clippy::wrong_self_convention attribute.
- A bunch of performance improvements - in cfg-disabled code and name¯o resolution.
/r/rust discussion
https://intellij-rust.github.io/2022/12/19/changelog-185
We've just released another bi-weekly ijrust version!
Highlights:
- Initial type inference support for GATs.
- Show type hints inside attribute proc-macro.
- Improved support for new variants of range patterns.
- Respect clippy::wrong_self_convention attribute.
- A bunch of performance improvements - in cfg-disabled code and name¯o resolution.
/r/rust discussion
Please open Telegram to view this post
VIEW IN TELEGRAM
👍5
# Rust GameDev News 40: Nov 2022
https://gamedev.rs/news/040
Sorry for another delay with the release but I've finally published the Nov newsletter today! 🐌
Includes updates about 17 games, 7 engines, 3 learning resources, 4 tools, and 16 libraries!
/r/rust_gamedev, Mastodon, Twitter
https://gamedev.rs/news/040
Sorry for another delay with the release but I've finally published the Nov newsletter today! 🐌
Includes updates about 17 games, 7 engines, 3 learning resources, 4 tools, and 16 libraries!
/r/rust_gamedev, Mastodon, Twitter
❤8