[-] [email protected] 6 points 1 month ago

And it really only concerns a certain subset - 32bit applications compiled with the gnu toolchain. I'm glad they keep the workload in check this way.

[-] [email protected] 13 points 3 months ago

I wasn't on X, but now I've created a mastodon account :)

13
submitted 3 months ago by [email protected] to c/[email protected]

For my library, I want to replace async_std by smol, since the former has been deprecated in favor of the latter. This is mostly just a simple translation (different module structure, names etc.), but what I don't know is how to replace async-std's stdin. Anybody got a hint on that?

16
submitted 4 months ago by [email protected] to c/[email protected]

If you belong to the group of people playing World of Warcraft on linux somewhat competitively (there must be dozens of us!), you might be interested in progrs. It is an alternative to warcraftrecorder and used to create videos of your play. It monitors the combat log for interesting events (for now, deaths of players) and creates chapters in the video for easier searching. For now, only "encounters" are supported (might mean just raid bosses, but I've not done any testing in M+), but each try will end up its own video, just as in warcraft recorder.

I'd be glad for anyone trying it out and giving feedback.

56
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]

Typst is "A new markup-based typesetting system that is powerful and easy to learn". It's written in Rust, and particularly attractive because, while providing a CLI interface, it is a proper library that you can easily incorporate into your progress to produce documents. Protip: If you do so, have a look at sys.inputs, it's awesome!

[-] [email protected] 13 points 5 months ago

unsafe does not disable the borrow checker. It does however give you abilities to circumvent it, namely by letting you dereference pointers, which are not subject to the borrow checker.

[-] [email protected] 9 points 5 months ago

Actually, dead code eliminination should do the trick, if you're compiling a binary at least (same for a library I think, but there could be re-exports there). Did you compile in release mode?

22
submitted 5 months ago by [email protected] to c/[email protected]

This article very much conveys what I think.

102
submitted 8 months ago by [email protected] to c/[email protected]

Typst is a new markup-based typesetting system that is designed to be as powerful as LaTeX while being much easier to learn and use

Typst is awesome, in particular if you want to generate documents programmatically.

[-] [email protected] 7 points 1 year ago

No sarcasm, just an honest suggestion :)

[-] [email protected] 18 points 1 year ago

From the Fine Readme:

This project allows you to create games for the Playdate handheld gaming system in Rust lang.

You really should preface every announcement with something like this :)

[-] [email protected] 6 points 1 year ago* (last edited 1 year ago)

It's surprisingly simple: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f176852c61dcf0c3382f0ac97c26de03 As a side node, asking for a value, and then immediately calling to_string on it seems kinda hiding the allocation. I'd suggest let the user call to_string on it themselves.

(e) Changed it a bit to account for passing None as the third argument.

23
submitted 1 year ago by [email protected] to c/[email protected]

Hey all!

I've just published a small crate, and would like to take the occasion to not only announce this, but also make typst better known in the rust community, because I think it's awesome :)

What does this do?

It provides a derive macro to derive typst::foundations::IntoValue for a struct.

Why would I want that?

If you're using typst as a library, chances are you want to get data into your documents. Rather than using a templating library or rolling your own, I'd suggest using inputs (I'm still excited being made aware of that!), which implies making a Value out of your data. typst_macros provides the possibility to derive Cast, which includes the treasured IntoValue... for enums. This is a gap somewhat closed by this crate.

So what about this typst?

typst is a typesetting system (akin to LaTeX) written in Rust. The core and cli are licensed freely, and it is very useable up to the point that I personally don't use latex anymore, but have switched to typst. I'm personally ultra-fond of the ability to use typst as a library, which makes it perfect for apps that want to produce high-quality documents from user-provided data.

Any questions, comments, criticism, code reviews welcome! Also, give typst a shot.

[-] [email protected] 6 points 1 year ago

I have an app that ultimately renders pdfs via typst. I'm starting to write tests for the output, exporting the documents to png instead and then applying something like https://github.com/kornelski/dssim or so.

(If anyone has experience with that, I'd take any hint I get ;))

[-] [email protected] 20 points 2 years ago

Note that this is not only a cli and a (closed source) web editor, but also a library. So it's possible to embed a full typesetting library in your project, which is awesome. It's probably not on par with TeX yet, but you can already do an awful lot with it. Scripting it is really much, much easier than, say, LaTeX.

[-] [email protected] 9 points 2 years ago

Wow, they're sort-of-targeting edition 2024. I did not expect this, holding my breath ;)

[-] [email protected] 33 points 2 years ago

While funny, this also highlights part of why I like rust's error handling story so much: You can really just read the happy path and understand what's going on. The error handling takes up minimal space, yet with one glance you can see that errors are all handled (bubbled up in this case). The usual caveats still apply, of course ;)

[-] [email protected] 5 points 2 years ago

Enums/Structs first, but those 2 are mixed, and any impl for them will be directly after the definition of the type itsef. Free functions last.

16
submitted 2 years ago by [email protected] to c/[email protected]

... might be interesting for most people

view more: next โ€บ

KillTheMule

0 post score
0 comment score
joined 2 years ago