lily, to rust
@lily@glaceon.social avatar

the rust "impl" keywork is kinda weird.

usually, it is used to define methods, but in function arguments, it serves as syntactic sugar so you don't have to name generic types... but in a return type, it has a meaning that is slightly different, and actually expresses a semantic not even vanilla haskell can represent!

basically, instead of being able to return any type implementing a trait, it states that it can return at least one type that implements a trait.

in haskell terminology, specifying a generic type parameter is "forall a", while returning an "impl" is "exists a".

elevenhsoft, to programming Polish
@elevenhsoft@mastodon.social avatar

Wooohooo! Finally, we are on #flathub, friends! :)

#COSMIC Web Apps is available to install via #flatpak directly from flathub: https://flathub.org/apps/io.github.elevenhsoft.WebApps

I'm happy ^^

#cosmicdesktop #programming #rust

folkertdev, to rust

Second #RustNL result: zlib-rs now works with no_std (on main)

most work was done by fellow unconf attendee Jonas Kruckenberg.

This ability is cool not only because zlib-rs can now be used on embedded devices, but also because it guarantees we don't sneakily use rust's allocator: allocation in the library should only happen through some function pointers that get passed in.

I've set up an example with the nrf52840 here:

https://github.com/folkertdev/no-std-zlib-rs

#rust makes running code everywhere easy!

smallcircles, to loom
@smallcircles@social.coop avatar

Cap. An -licensed self-hostable alternative to :

https://github.com/CapSoftware/Cap

Implemented in and .

slint, to rust
@slint@fosstodon.org avatar

We're pleased to "spring" a new release, v1.6: Improved design mode, new Python packages, and enhanced accessibility. 🥳🐣

https://slint.dev/blog/slint-1.6-released

cdrmack, to cpp
@cdrmack@fosstodon.org avatar

After 10 years of commercial experience in I think I’m ready for a new chapter. I have played around with and but most job offers that I see are for people with at least X years of commercial experience in this exact languages. Do you have any hints how to approach this? I would think that my previous experience as a engineer would matter. Especially since I do not expect to move to another senior role, I’m checking junior positions too.

sdeleuze, to webassembly French
@sdeleuze@mastodon.online avatar

The Kotlin/Wasm team has created an early prototype of a component written in linked with another component written in and running in Node.js. Looking forward being able to run that in Wasmtime when it gets WasmGC support. https://github.com/skuzmich/kotlin-wasm-cm-experiments

godmaire, to rust
@godmaire@mstdn.social avatar

Is it not possible to use grave accents in rust proc-macros? When I do, I get an "unknown start of token" error, even though it /is/ the whole token. When taking a peek at the TokenStream given to the proc-macro function, the grave doesn't appear at all

janriemer, to ArtificialIntelligence

Zed Decoded: Rope & SumTree - by Zed Industries

https://zed.dev/blog/zed-decoded-rope-sumtree

Absolutely fascinating deep-dive into the core data structures the folks at Zed Industries use for their #Zed #editor!

"Currently there are over 20 uses of the SumTree in Zed. [...] The list of files in a project is a SumTree. The information returned by git blame is stored in a SumTree. Messages in the chat channel: SumTree. Diagnostics: SumTree."

Oh, how I love this! ✨

#DataStructure #Algorithm #Rust #RustLang

janriemer, to rust

Practical suggestions for building #intuition around borrow errors - by quinedot

https://quinedot.github.io/rust-learning/lifetime-intuition.html

If you're struggling with the #Rust borrow checker and lifetimes, this is an excellent resource!

In some past toot I've said that Rust lends itself very well to intuition-based learning...

https://floss.social/@janriemer/109415274612140073

...so this learning resource takes the same line (according to its title)! Nice!

#RustLang #BorrowChk

folkertdev, to rust

My first concrete result of : zlib-rs now runs with the cranelift backend

This required implementing some intrinsics that the cranelift backend didn't yet support

https://github.com/rust-lang/rustc_codegen_cranelift/pull/1491
https://github.com/rust-lang/rustc_codegen_cranelift/pull/1488

With some help from bjorn3 this was reasonably straightforward. I think the PRs are good templates for of someone wanted to work on a real compiler and implement further SIMD functionality. This issue lists some missing intrinsics

https://github.com/rust-lang/rustc_codegen_cranelift/issues/1419

agx, to rust

I needed bindings for an app to interact with to submit feedback. Here's the generated bindings for libfeedback in case someone else needs it too:

https://gitlab.gnome.org/guidog/libfeedback-rs

DO1HMN, to rust
@DO1HMN@mastodon.radio avatar

Breakthrough: I wrote a program that prints a line of text!
So what's the point?
Program written in , cross compiled on , linked with to a TOS executable {on Windows), put into a disk image on debian and executed on a real ST via a floppy emulator with firmware.

Atari ST Desktop. File "Atari.PRG" is started and prints out "Hello Atari world!"

frankel, to rust
@frankel@mastodon.top avatar
jhpratt, to rust
@jhpratt@mastodon.social avatar

Preview of what I have been working on recently. The core of this crate is a mere two traits. The crate will ship with a number of parsers and combinators, none of which rely on anything not exposed to downstream users.

I've attached a real-world situation, taken verbatim from the test suite. Parsing integers isn't as efficient as it could be yet, as it's using a naïve method.

Parsing in general compiles to be extremely efficient, and using it is ergonomic.

pub trait Combinator<'input, P> where P: ByteParser<'input>, { type NewParser: ByteParser<'input>; fn apply_to(self, parser: P) -> Self::NewParser; }
#[test] fn parse_date() -> parcom::Result<()> { let parser = ascii::int:: .limit_length(4) .and(verbatim(b"-").discard()) .and(ascii::int::.limit_length(2)) .and(verbatim(b"-").discard()) .and(ascii::int::.limit_length(2)); let (seq!(year, _, month, _, day), remaining) = parser.parse("2021-07-04")?.into_parts(); assert!(remaining.is_empty()); assert_eq!(year, 2021); assert_eq!(month, 7); assert_eq!(day, 4); Ok(()) }

saveriobran, to graphics
@saveriobran@mastodon.uno avatar
cuchaz, to random
@cuchaz@gladtech.social avatar

Once again I get foiled by switching languages. :blobcatfacepalm2:

In Javascript, you have to compare strings with ===, not ==, or else you'll run into type coercion problems, because Javascript thinks 1 == "1" is a totally fine thing to be true. (it's not)

But in Kotlin, === compares identity not equality for strings. But in the JVM, string values are aggressively cached, so === actually does what you want most of the time. Unless your strings come from weird places, like JNI code. Then you get awful non-deterministic behavior that's incredibly hard to debug, but it totally goes away when you use the correct comparison operator == for strings.

sigh I'm not really as good at this whole programming thing as I should be by now.

happyborg,
@happyborg@fosstodon.org avatar

@cuchaz
Programming is hard.

A skill is choosing systems and tools that make it easier and making meta choices to enable you to maximise your agency in those choices.

I remember the pain I endured learning #nodeJS a decade ago, then looking at #Angular [shudder] and #React hmm.

Then the pleasure that followed learning to use #Svelte and #Rust. You'd have a hard time getting me to use anything else now. Not happening.

My debut Rust project is now part of debian / Ubuntu.

"===" 🤣
#RustLang

ekuber, to rust
@ekuber@hachyderm.io avatar

Request for feedback: how would you change this compiler error? Can you tell what's going on? What the problem is? Do you get a sense of how you might be able to solve it?

frankel, to rust
@frankel@mastodon.top avatar
leanpub, to rust
@leanpub@mastodon.social avatar

Rust In Practice, Second Edition: A Programmers Guide to Build Rust Programs, Test Applications and Create Cargo Packages https://leanpub.com/rustinpractice2 is the featured book on the Leanpub homepage! https://leanpub.com #Rust #DataStructures #SoftwareEngineering #DistributedSystems

ramikrispin, to rust
@ramikrispin@mstdn.social avatar

I recently started to learn Rust programming, and I made a list of resources that I found useful to get started with the language 👇🏼

https://medium.com/p/928bf7b8418f

#Rust #Programming #OpenSource #DataScience #medium

vascorsd, to rust
@vascorsd@mastodon.social avatar

Oh shit. 9 years??

Time passes fast as fuck. In my mind it is 1 or 2 years old only 😅. But I started following it a little after they removed the @ symbols I guess.

Well, for me Rihanna and Miley Cyros is extremely new and recent in my head too so... 😅😞. I have no idea what kids listen to these days... But I ramble 🤣


#Rust through the ages
https://www.ncameron.org/blog/rust-through-the-ages/

vascorsd, to rust
@vascorsd@mastodon.social avatar

Sending a PR for #Rust Coreutils; fixing a bug related to "no pid" when killing a process
https://www.youtube.com/watch?v=wzWNkNPHJx0

joeposaurus, to rust
@joeposaurus@chaos.social avatar

My main takeaway from the @rustnl conf as a test engineer who has just started their #Rust journey: these people really like their fuzz testing.

outfly, to fallout
@outfly@mastodon.social avatar

Fresh out the oven, version 0.8.5 of the open source space game !

✅ New flashlight
✅ Redesigned HUD, with -4-like bars for health/power/O2, and -dashboard-like warning lights
✅ New, well-balanced cruising vehicle
✅ Implemented power drain
✅ Much improved texture for

Btw, see how the hat of the chef doesn't cast a shadow? Because it ain't real! Just an illusion, which you can toggle with <TAB> :)

https://yunicode.itch.io/outfly

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • GTA5RPClips
  • rosin
  • mdbf
  • Youngstown
  • love
  • slotface
  • khanakhh
  • ngwrru68w68
  • kavyap
  • ethstaker
  • thenastyranch
  • DreamBathrooms
  • magazineikmin
  • anitta
  • osvaldo12
  • tacticalgear
  • modclub
  • InstantRegret
  • Durango
  • normalnudes
  • everett
  • cisconetworking
  • cubers
  • Leos
  • provamag3
  • tester
  • JUstTest
  • All magazines