So it seems that #DuckDuckGo was down for the last few hours because of a #Bing outage. That's very annoying; DDG should probably get out from under Microsoft's coat tails...
I wrote a PDF reader with libcosmic yesterday. While it is very basic and not likely to be ready for the first COSMIC release, it is pure rust, lightweight, GPU accelerated, and highly portable.
@lw64@soller to elaborate, when @ekuber says "It's its raison d'être" about parsers, i think this quote is relevant:
> Do you know Mozilla’s secret solution to writing really complicated permissive parsers in C++?
> We stopped doing it.
> We developed Rust and ported our nastiest parsers to it.
Well, it took about 2 weeks longer than I expected (spare time for programming is especially spare at times!) but I finally finished swapping out the graphical backend of my roguelike project with a handrolled one using #wgpu! I'm super excited to be fully in control of my #gamedev destiny!
Wgpu is still pretty difficult, even if it is cleaner than opengl with glow and #glutin. (And up-to-date with its own dependencies, always nice!) #rust
Okay, the #rustlang documentation on generic struct-structs is really difficult. And for some reason I cannot omit the where-clause.
I'm probably not understanding.
But... omg, traits are amazing. They're what I wanted c++' constraints to be. <3
This will make working with templates so much easier.
(Just have to figure out type arithmatic, then I suppose I'm pretty much where I want to be.)
(Despite my complaint about the documentation, the documentation is pretty good. Nice language too.)
This was a really good summary of what Rust feels like in my opinion. I’m still a beginner myself but I recognize what this article is saying very much....
@kaffiene@asdfasdfasdf i think part of the issue is that one group of devs is saying "rust is great for gamedev" by which they mean its a great language to develop games which are closer to game engines themselves in, or even custom engines. Then another group says "no it sucks" but they are talking about the scripting approach, where you don't care what happens under the hood
Rust fits the first group well, and the second not at all, and the issue is that both dont see the difference between
if you want to develop on the level of a engine, even if you're not makign a entire engine, Rust is IMO the most productive language. But these things also take a lot of time, which is why you don't see big games being finished. There are some like Tiny Glade where the devs built a entire custom renderer on the other hand.
This is a 48 minute long article that's critical of the Rust hype train vs C/C++. The TLDR is that while security is a problem, the Rust vs C choice as the only choice for low-level systems programming is a “non choice”. The author states that Go is a perfectly fine choice. https://medium.com/
@jaycruz I'll freely admit i've only read a few sections in this article (its really long), but while it seems to be written by someone with lots of experience it seems to be colored by a very specific perspective. i would never state Zig is easier to learn than Rust (imo it suffers from the exponential complexity problem which Rust avoids at the cost of a steep upfront learning curve)
It also fails to consider that "just doing things people will find easy" is exactly how we got into this mess
yes. IMO the fact that program inefficiency grows directly related with available performance is an issue, and i dont understand how it could be seen as not being one. now granted, Rust wont suddenly fix that (cough Tauri) but at least its a step in the right direction.
The article takes a very "dont make programming harder" POV where i think thats exactly what needs to happen to make meaningful progress
This is a underestimated concept which applies to any language. I only internalised it while learning #rustlang and its one of those things i now apply in any language i use.
Trying to get my head around how to organise a #Rust project where you have to deal with "crates", "packages", "modules" and "libraries" each of which means something slightly different.
I guess the reason why so many Rust source files are 1000+ LoC is because figuring out how to split them up is too much of a pain.
@alper@anselmschueler i have not found the documentation to be lacking, assuming you count The Book as part of it.
Ultimately, its a linear hierachy:
the outermost level is a Workspace, which is optional to combine multiple Packages in one project.
A package can be a lib Crate (library) or a bin Crate (binary) or both, but cant contain multiple lib or multiple bin crates. it relies on the presence of lib.rs or main.rs. Each .rs file is usually included as a module using the mod keyword.
@alper@anselmschueler
In my opinion, these are suffecient levels of hierarchy to support any sized project, from a single main.rs CLI to an entire game engine. Its also simple enough, with the destinction between package and crate being very technical and workspaces being completely optional, that the only thing someone developing their first rust projects is usually confronted with is modules - which are a neccessary amount of complexity.
@alper@anselmschueler maybe the issue is trying to learn a language with a notoriously steep initial learning curve "quickly".
The Book is generally regarded as some of the best official material for any language. If it doesn't work for you, maybe you're attempting to read it as a tutorial instead of a book?
@kubikpixel Immerhin hat Heise genug verstanden dass sie nicht wie der CVE selbst und natürlich viele andere Zeitschriften behaupten es würde nur Rust betreffen
@kubikpixel@Codeberg Meinst du dass crates nur auf GitHub sein dürfen? das ist falsch. crates.io nutz GitHub NUR für die nutzer/gruppenverwaltung. Der crate inhalt (code, readme) wird direkt zu crates.io hochgeladen mit dem publish befehl, das einzige was GitHub macht ist dich zu authentifizieren.
BTW, das crates.io team ist offen für alternative login-provider falls jemand die lust/zeit hat das zu implementieren.
> This is a reminder to the teams working on the 2024 Edition that implementation work should be finished by the end of May
The article lists changes of the 2024 edition, like Future and IntoFuture will be part of the prelude, RPIT lifetime capture, the gen new keyword etc. Interesting.
@bitprophet@ehmatthes i've uswd scraper and its definitely the closest. very neat that it uses the same parsing and css as Servo.
the Css is actually one of the reasons i almost prefer it: unlike in bs4 where css selectors are partially supported and i avoid them, in scraper the css support feels much more trustworthy, being the same used in servo.
Had posted a private reply to @nocoursewalks about the WH directive trying to steer people away from C/C++ and toward #Rust and other memory-safe languages.
I had replied: "I can never tell if Rust is the real deal or if it's another thing like Typescript where it fixes a few things at the expense of being able to get anything done"
@h_thoreson@nocoursewalks yes, Rust sometimes has to drop to unsafe areas. but this is why the "safe abstractions on unsafe code" mindset is so widespread - write a safe abstraction once, use it in many places. Like how Asahi was able to develop a whole GPU Driver with not that many (iirc <100) lines of unsafe Rust in a few months.
using unsafe is not "back at square one" either, as the powers it grants are still limited and contained to that area. just look at Rust on embedded, it works.
@nocoursewalks@h_thoreson "write a safe abstraction" is much less useful of course when that abstraction isnt enforced. Rust allows you to enforce many more things about a abstraction than C, which is why this same saying is used yet again.
Leaving Rust gamedev after 3 years (loglog.games)
This was a really good summary of what Rust feels like in my opinion. I’m still a beginner myself but I recognize what this article is saying very much....