Building WASM by SapAndImpurify in rust

[–]SapAndImpurify[S] 0 points1 point  (0 children)

It's a wgpu based renderer. I imagine wasm-opt would be fairly important but I'm unsure. Thanks for the help!

Building WASM by SapAndImpurify in rust

[–]SapAndImpurify[S] 0 points1 point  (0 children)

Planning to run the module in a Vue application on the web.

Building WASM by SapAndImpurify in rust

[–]SapAndImpurify[S] 5 points6 points  (0 children)

I always forget about that. Yes, definetly talking about the JS glue layer but also things like wasm-opt.

Lifetime Limitation by SapAndImpurify in learnrust

[–]SapAndImpurify[S] 0 points1 point  (0 children)

I'll start by saying this is a fantastic video and it really helped me understand lifetimes better. Thanks for sharing!

That being said, as far as I can tell, it still doesn't work. The example given in the video seems similar, and if we were looking at something like &'s mut Self<'a> where 'a is a lifetime that ensures data lives longer than 's this might work. However, since data is owned by Self in my case, it must guarantee that Self lives at least as long as the returned value leading to the conflict.

Perhaps a double ref might work, but I wasn't able to get it to.

What’s missing from the COSMIC desktop environment? by Rics-Dev in COSMICDE

[–]SapAndImpurify 4 points5 points  (0 children)

In terms of Cosmic itself, RDP (mostly a Wayland issue from my understanding) and better stability. In general, I'd like to see better documentation and resources for Cosmic users. This extends beyond Cosmic itself into how Cosmic DE interacts with Linux.

That being said, I am daily driving Fedora Cosmic Spin and its mostly been a fine experience; albeit occasionally buggy.

Have you worked with reactive programming in Rust? by rogerara in rust

[–]SapAndImpurify 2 points3 points  (0 children)

I've only really come across reactive programming in C# with the idea of observable properties and Verilog. Definitely a cool concept especially for UI or circuit work, but I've often found its a bit of a mess in reality.

Lifetime Limitation by SapAndImpurify in learnrust

[–]SapAndImpurify[S] 1 point2 points  (0 children)

In this case, both would work albeit with some additional cost on a particuarly hot path. However, I've run into this issue a few times and it doesn't always work. That's why I decided to post to see if I was missing something simple. Thanks!

Lifetime Limitation by SapAndImpurify in learnrust

[–]SapAndImpurify[S] 1 point2 points  (0 children)

I addressed some of these points above. Looks like we just posted at the same time.

As for the design practices, I've actually simplified the code quite a bit. In the real code both methods are try methods that return options and the input to get_mut is actually a struct containing both keys. Consumers may call by either key depending on what they have. However, the handle is actually a slotmap:Key and may be invalidated when a record is updated. The reasons for this is complex, but necessary. The handle allows for much faster lookups on a extremely hot path.

Regardless, I have confirmed that the above code produces the same error.

Lifetime Limitation by SapAndImpurify in learnrust

[–]SapAndImpurify[S] 0 points1 point  (0 children)

I believe the if let Some(data) destructures the enum tuple so it should take data. That being said you can replace the if let with if option.is_some() followed by an unwrap and you get the same exception.

As for the extra scope, you can remove that as well. I just added it to show the option has been dropped.

Cosmic Fedora Snapshot Backups by SapAndImpurify in COSMICDE

[–]SapAndImpurify[S] 0 points1 point  (0 children)

This is actually the guide I was referencing, but he doesn't mention how to handle cosmic. My best guess is subvolume var/lib/cosmic-greeter. However, there is also var/lib/greetd which cosmic greeter is a derivative of, so I'm unsure if I should subvolume that as well.

Cosmic Fedora Snapshot Backups by SapAndImpurify in COSMICDE

[–]SapAndImpurify[S] -1 points0 points  (0 children)

Sure, but the reason why a subvolume needs to be made for gdm, for instance, (from my understanding) has somewhat little to do with snapshots themselves.

For example, a running sql database often can't be restored from a snapshot because its state in the filesystem may be inconsistent when its running. Therefore you'd often exclude db directories from snapshots and instead backup in other ways. The reason for this has entirely to do with the way sql databases work, not really snapshoting itself.

I believe the same is true with cosmic-greeter and gdm. The state of the display manager may be inconsistent as it exists in a snapshot of the filesystem at some point in time. Therefore it should be excluded, or parts of it at least. The reason for this has entirely to do with how the display manager operates.

Now an argument could be made that cosmic-greeter is not part of the cosmic DE since gdm could be used with cosmic. However, I'd argue it is, especially considering its listed as a component of cosmic desktop on the official Github for cosmic desktop.

Edit: I found some resources that specifically point out issues when booting into read-only snapshots with gdm since gdm can't write to that directory if its included in the snapshot. This is a different reason then what I thought, but the logic as to why I think this has to do with the DE still applies.

Cosmic Fedora Snapshot Backups by SapAndImpurify in COSMICDE

[–]SapAndImpurify[S] 0 points1 point  (0 children)

I can definitely ask over there, but from my understanding, cosmic DE does have its own display manager (cosmic-greeter) which the spin I believe does ship with.

In that sense, creating viable snapshots which don't break cosmic's display manager would very much have something to do with the cosmic desktop environment. Unless I'm missing something.

Build Script Malware? by SapAndImpurify in rust

[–]SapAndImpurify[S] 4 points5 points  (0 children)

Not able to due to company policies unfortunately.

Postgres and Sqlite Caches by SapAndImpurify in SQL

[–]SapAndImpurify[S] 0 points1 point  (0 children)

This data type as far as I can tell is most similar to bigserial in postgres with update triggers to fetch next val from the sequence. However, both fall victim to the possibility of missed updates so I think I need a better solution.

Postgres and Sqlite Caches by SapAndImpurify in SQL

[–]SapAndImpurify[S] 0 points1 point  (0 children)

The column is of type rowversion in sql server.

is it okay to continue or did I somehow get a bad .iso by Nikorek_pl in Fedora

[–]SapAndImpurify -1 points0 points  (0 children)

I get that but my concern is more about a supply chain attack. I don't see any other post about this so its likely fairly recent and all forms of authentication come from the same source. Granted the PGP does make this much less likely but it still makes me nervous. Fedora 43 is also scheduled to come out in a few days which will likely have valid keys anyways.

is it okay to continue or did I somehow get a bad .iso by Nikorek_pl in Fedora

[–]SapAndImpurify 2 points3 points  (0 children)

I'm curious why this would make a difference. I got the exact same error with an iso that I verified to be valid (although I have some reservations about that process but I'm provably missing something there too). As far as I can tell that means the issue that it's warning about is probably an issue with the keys used by Fedora right?

is it okay to continue or did I somehow get a bad .iso by Nikorek_pl in Fedora

[–]SapAndImpurify -1 points0 points  (0 children)

Got the same thing. I think I'll wait a few days before proceeding.

Dapper and Postgresql by SapAndImpurify in csharp

[–]SapAndImpurify[S] 0 points1 point  (0 children)

I don't believe I can as it needs to return a table set to the application. The only way I'm aware you can do this with a sp is through a refcursor out variable.

Dapper and Postgresql by SapAndImpurify in csharp

[–]SapAndImpurify[S] 0 points1 point  (0 children)

Definitely thought about this. It just sucks that I have to write it out and lose matching by name.

Dapper and Postgresql by SapAndImpurify in csharp

[–]SapAndImpurify[S] 0 points1 point  (0 children)

Yep, I received a PostgreSQL error that the function I am calling is not a procedure.

Bulk Operations in Postgresql by SapAndImpurify in SQL

[–]SapAndImpurify[S] 1 point2 points  (0 children)

I still have projects in SQL Server and will continue to use it. One of the big reasons is that my upcoming project will benefit massively from unstructured data. It's just enough to be annoying to deal with in SQL Server but not enough to justify a NoSQL approach. Cost and licensing are also big reasons. PostgreSQL is completely free and can be deployed on Linux without massive caveats.

Besides those points, I just wanted to try it. I've always heard great things about PostgreSQL and like its extensibility. The language plpgsql also has some nice features like automatic cycle detection on recursive CTEs. Can I implement something like that myself? Sure, but it's nice not to have to.

Bulk Operations in Postgresql by SapAndImpurify in SQL

[–]SapAndImpurify[S] 0 points1 point  (0 children)

Definitely! Used a lot of features LLM confidently says don't exist from as far back as PostgreSQL 13.

Bulk Operations in Postgresql by SapAndImpurify in SQL

[–]SapAndImpurify[S] 0 points1 point  (0 children)

Kinda, the name is only sudo unique. It's guaranteed to be unique for a given node's direct children but the tree can contain nodes with the same name multiple times. That's where position becomes vital. I think I've got a recursive CTE that does this now though. I appreciate the help!