151
submitted 6 months ago* (last edited 6 months ago) by to c/rust@programming.dev
 
 

Is it just me, or does Rust feel much more bare-bones than other languages? I just started learning it recently and this is the one thing that stood out to me, much more so than the memory management business. A lot of things that would normally be part of the language has to be achieved through meta-programming in Rust.

Is this a deliberate design choice? What do we gain from this setup?


Edits:

  1. Somehow, this question is being interpreted as a complaint. It's not a complaint. As a user, I don't care how the language is designed as long as it has a good user experience, but the curious part of my mind always wants to know why things are the way they are. Maybe another way to phrase my question: Is this decision to rely more on meta-programming responsible for some of the good UX we get in Rust? And if so, how?
  2. I'm using meta-programming to mean code that generates code in the original language. So if I'm programming in Rust, that would be code that generate more Rust code. This excludes compilation where Rust gets converted into assembly or any other intermediate representation.
152
153
154
155
&&&&&&&&&&&&&&str (ohadravid.github.io)
submitted 6 months ago by to c/rust@programming.dev
156
 
 

I've been building a bytecode VM in Rust and recently implemented NaN boxing for value representation. Sharing here for anyone interested.

I needed all VM values (booleans, integers, string pool indices, bytecode references) to fit in 64 bits (stack is Vec).

My implementation encodes 5 distinct types using a 3-bit tag and 32-bit payload, all within a single u64. It also has 15 unused bits, they may be used later for types expansion.

I'm using a 64-bit layout:

  • Bits 63-51: Quiet NaN signature (0x7FFC...)
  • Bits 50-18: 32-bit payload (integers, string pool indices, etc.)
  • Bits 17-3: Unused/ (15 bits)
  • Bits 2-0: 3-bit type tag

So it allows me to have 5 tagged types: TRUE_VAL, FALSE_VAL, STRING_VAL, CALLDATA_VAL, U32_VAL

Developer @tracyspcy@lemmy.ml

157
This Week in Rust 633 (this-week-in-rust.org)
submitted 6 months ago by to c/rust@programming.dev
158
 
 

Link to original post by madmo@programming.dev

159
submitted 6 months ago by to c/rust@programming.dev
160
 
 

cross-posted from: https://lemmy.ml/post/41182690

Here is my winter holiday project. Current scope and known issues are listed in readme, so thoughts and ideas on them are welcome ^_^

161
 
 
162
163
164
 
 

Stolen from the old place

165
 
 

cross-posted from: https://beehaw.org/post/23996175

Website: https://yazi-rs.github.io/

Changelog: https://github.com/sxyazi/yazi/blob/main/CHANGELOG.md#v251229

They have lot of stuff:

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Fixed for any bug fixes.
  • Improved for performance improvements.

I just list the first 10 added stuff:

[v25.12.29]

Added

  • Remote file management ([#3396])
  • Virtual file system ([#3034], [#3035], [#3094], [#3108], [#3187], [#3203])
  • Shell formatting ([#3232])
  • Multi-entry support for plugin system ([#3154])
  • Zoom in or out of the preview image ([#2864])
  • Improve the UX of the pick and input components ([#2906], [#2935])
  • Show progress of each task in task manager ([#3121], [#3131], [#3134])
  • New fs.copy() and fs.rename() APIs ([#3467])
  • New experimental ya.async() API ([#3422])
  • New overall option to set the overall background color ([#3317])
  • ... and more!
166
 
 

Hey everyone,

Basically the title. I'd like to learn how to make my own drawing program and I'm slightly surprised that I can't seem to find anything about it. No tutorials or discussions about requirements or just general tutorials.

Does anyone have any recommendations on where I could start?

167
 
 
  • New CLI flag allows overriding the markdown flavor for a single run
  • Options: commonmark, gfm (GitHub Flavored Markdown)
  • Useful for testing files against different markdown specifications
168
 
 

This is a small release to support Deku 0.20.0 release. The only incompatibility was an introduced descriptive-errors feature which is explicitly propagated at the moment.

The crate started as support decoding and encoding fixed and variable length unicode strings, but quite soon become more than this.

While there’s some ideas to implement, new ideas and improvements are always welcome.

169
 
 

This Christmas, my wife outdid herself. She knew I loved Rust, so she DIYed me a Ferris. It’s now guarding my desk, judging my unwrap() calls and reminding me to write safer code.

Based on the pattern from here (the instructions are in german)

170
 
 

A new release of Kellnr, the crate registry is out. Kellnr is now a single binary that includes all web resources and config files, making it easier to deploy. As a new feature, web-hooks where added to interact with kellnr from other applications.

171
What's "new" in Miri (www.ralfj.de)
submitted 7 months ago by to c/rust@programming.dev
172
173
This Week in Rust 631 (this-week-in-rust.org)
submitted 7 months ago by to c/rust@programming.dev
174
 
 

Hi everyone,

we, the iceoryx community, just released iceoryx2 v0.8, an ultra-low latency inter-process communication middleware in Rust, with C, C++, Python and with this release, C# bindings.

If you are into robotics, embedded real-time systems (especially safety-critical), autonomous vehicles or just want to hack around, iceoryx2 is built with you in mind.

Check out our release announcement for more details: https://ekxide.io/blog/iceoryx2-0.8-release

And the link to the project: https://github.com/eclipse-iceoryx/iceoryx2

175
 
 

cross-posted from: https://programming.dev/post/42658798

Mago 1.0.0 - the first stable release of the Mago PHP toolchain

view more: ‹ prev next ›