rustlang
Rust Lang runiq 1 year ago 100%
docs(faq): Recommend always committing `Cargo.lock` github.com

Well well well, how the turn tables.

8
6
rustlang
Rust Lang runiq 1 year ago 100%
shebling: ShellCheck rewrite in Rust github.com

[Crossposted from r/rust](https://www.reddit.com/r/rust/comments/14ts2au/shebling_rewriting_shellcheck_in_rust/): > Hola! > > During the last few months I've been working on rewriting [ShellCheck](https://github.com/koalaman/shellcheck) in Rust. I've been doing this for learning purposes: I'm part of the TypeScript team and I've been wanting to reinforce my understand of parsers, lexers, code analysis etc (I mostly focus in the editor experience so I don't have many opportunities to interact with the deeper levels of the language itself). Anyway, it's been a wild ride. > > Unfortunately this isn't the shinny Reddit post where I present you the finished product; instead this is an invitation to everyone that wants to contribute! <3 I've implemented about 90% of the parser (including the errors that it generates), but I want to expand the learning opportunity to the rest of my fellow Rusters that wish to get their hands dirty with parsing/linting/dealing with the complex problems that shell languages present. > > Feel free to reach out to me via an internal message if you want to shebling with me :) > > To hype y'all: Here's a preview of [shebling](https://github.com/MariaSolOs/shebling) catching those annoying quoting issues. > > ![](https://preview.redd.it/5nd8ydydrnab1.png?width=1134&format=png&auto=webp&v=enabled&s=0bea6083b8e0701aac00341c9e42ba039610f344)

13
0
rustlang
Rust Lang runiq 1 year ago 100%
Lemmy 0.18.1 released https://lemmy.world/post/1061471

> Another day, another update. > > More troubleshooting was done today. What did we do: > > - Yesterday evening @phiresky[@phiresky@lemmy.world](https://lemmy.world/u/phiresky) did some SQL troubleshooting with some of the lemmy.world admins. After that, phiresky submitted some PRs to github. > - [@cetra3@lemmy.ml](https://lemmy.ml/u/cetra3) created a docker image containing 3PR's: [Disable retry queue](https://github.com/LemmyNet/lemmy/pull/3468), [Get follower Inbox Fix](https://github.com/LemmyNet/lemmy/pull/3482), [Admin Index Fix](https://github.com/LemmyNet/lemmy/pull/3483) > - We started using this image, and saw a big drop in CPU usage and disk load. > - We saw thousands of errors per minute in the nginx log for old clients trying to access the websockets (which were removed in 0.18), so we added a `return 404` in nginx conf for `/api/v3/ws`. > - We updated lemmy-ui from RC7 to RC10 which fixed a lot, among which the issue with replying to DMs > - We found that the many 502-errors were caused by an issue in Lemmy/markdown-it.actix or whatever, causing nginx to temporarily mark an upstream to be dead. As a workaround we can either 1.) Only use 1 container or 2.) set ~~`proxy_next_upstream timeout;`~~ `max_fails=5` in nginx. > > Currently we're running with 1 lemmy container, so the 502-errors are completely gone so far, and because of the fixes in the Lemmy code everything seems to be running smooth. If needed we could spin up a second lemmy container using the ~~`proxy_next_upstream timeout;`~~ `max_fails=5` workaround but for now it seems to hold with 1. > > Thanks to [@phiresky@lemmy.world](https://lemmy.world/u/phiresky) , [@cetra3@lemmy.ml](https://lemmy.ml/u/cetra3) , [@stanford@discuss.as200950.com](https://discuss.as200950.com/u/stanford), [@db0@lemmy.dbzer0.com](https://lemmy.dbzer0.com/u/db0) , [@jelloeater85@lemmy.world](https://lemmy.world/u/jelloeater85) , [@TragicNotCute@lemmy.world](https://lemmy.world/u/TragicNotCute) for their help! > > And not to forget, thanks to [@nutomic@lemmy.ml](https://lemmy.ml/u/nutomic) and [@dessalines@lemmy.ml](https://lemmy.ml/u/dessalines) for their continuing hard work on Lemmy! > > And thank you all for your patience, we'll keep working on it! > > Oh, and as bonus, an image (thanks Phiresky!) of the change in bandwidth after implementing the new Lemmy docker image with the PRs. > > ![](https://lemmy.world/pictrs/image/166fc6d9-972d-4ff2-aa3a-b2ecbbb90cd5.png) > > **Edit** So as soon as the US folks wake up (hi!) we seem to need the second Lemmy container for performance. So that's now started, and I noticed the `proxy_next_upstream timeout` setting didn't work (or I didn't set it properly) so I used `max_fails=5` for each upstream, that does actually work.

74
1
rustlang
Rust Lang runiq 1 year ago 100%
How to think about `async`/`await` in Rust https://cliffle.com/blog/async-inversion

[HN discussion](https://news.ycombinator.com/item?id=36570321) with some salient points. As to the post itself: > **CAUTION:** There’s a proposal to make code generic on whether or not it’s being used `async`, so that the same code could produce both a simple function and a `Future`. In this case you’d have to make sure to think about correctness in all possible ways your code could be used. I am suspicious, and I hope after reading this section, you are too. I was suspicious before, but couldn't put in words why. Now I know. :-/

28
1
rustlang
Rust Lang runiq 1 year ago 100%
Slint 1.1 Released with additional Royalty-Free License slint.dev

[The new license](https://github.com/slint-ui/slint/blob/master/LICENSES/LicenseRef-Slint-Royalty-free-1.0.md) has [already been updated](https://github.com/slint-ui/slint/commit/b2da8e247aba8384c573ea8d518f0bd243198319) in response to [this Reddit comment](https://www.reddit.com/r/rust/comments/14jglu3/comment/jplwjjc/?utm_source=reddit&utm_medium=web2x&context=3). I like where this is going. [Crosspost from r/rust](https://www.reddit.com/r/rust/comments/14jglu3/slint_11_released_with_additional_royaltyfree/).

21
4
rustlang
Rust Lang runiq 1 year ago 100%
RFC 3446: Introduce the Store API for great good. github.com

The Store offers a more flexible allocation API, suitable for in-line memory store, shared memory store, compact "pointers", const/static use, and more. Adoption of this API, and its use in standard collections, would render a number of specialized crates obsolete in full or in part, such as StackFuture. [Rendered](https://github.com/matthieu-m/rfcs/blob/store/text/3446-store.md)

20
1
meta
LemmyRS: Meta runiq 1 year ago 100%
Thank you for allowing to hide karma

See title. This is something that I'd been missing from Reddit for _so very long_. I finally ended up creating a userCSS file, which didn't work well because CSS class names were encoded by some hare-brained scheme. So yeah, again, thank you so much!

6
0