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".
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.
After 10 years of commercial experience in #cpp I think I’m ready for a new chapter. I have played around with #rust#golang#zig and #clojure 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 #software engineer would matter. Especially since I do not expect to move to another senior role, I’m checking junior positions too. #jobsearch
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
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."
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
I needed #Rust bindings for an app to interact with #feedbackd to submit #haptic feedback. Here's the generated bindings for libfeedback in case someone else needs it too:
Breakthrough: I wrote a program that prints a line of text!
So what's the point?
Program written in #rust, cross compiled on #debian, linked with #vlink to a TOS executable {on Windows), put into a disk image on debian and executed on a real ST via a #gotek floppy emulator with #flashfloppy firmware.
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.
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.
Request for feedback: how would you change this #Rust 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?
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 🤣
Fresh out the oven, version 0.8.5 of the open source space game #OutFly!
✅ New flashlight
✅ Redesigned HUD, with #Fallout-4-like bars for health/power/O2, and #car-dashboard-like warning lights
✅ New, well-balanced cruising vehicle
✅ Implemented power drain
✅ Much improved texture for #Jupiter
Btw, see how the hat of the #pizza chef doesn't cast a shadow? Because it ain't real! Just an #AR illusion, which you can toggle with <TAB> :)