KillTheMule

joined 2 years ago
[–] [email protected] 1 points 2 days ago (1 children)

Huh? I might be misunderstanding something (maybe a joke, even!), but this is my lemmy account, that's kinda older indeed. How would that be connected to my mastodon account?

[–] [email protected] 2 points 2 days ago

Huh haven't heard of this for quite some time, nice it's still going strong :)

I hope this is the first of many contributions we’ll have between the two projects and that we can continue to collaborate with and help each other.

Great to hear!

[–] [email protected] 12 points 4 days ago (3 children)

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

[–] [email protected] 5 points 1 week ago

Man, I'd love that, if only the pay was better... but than again, if the pay was better I'd be even less qualified. But typst is awesome, all the best wishes for the team including the new hire :)

[–] [email protected] 5 points 2 weeks ago

Oh yeah, the docs even mention Unblock<Stdin> explicitely. Thanks a lot!

[–] [email protected] 1 points 2 weeks ago* (last edited 2 weeks ago)

Yeah that looks fine, thanks! It would introduce a new dependency (async_io) though, so I might go with Unblock mentioned above. Let's see what happens when I try to make the switch :)

(e) Ah I don't think this really works, I'd need to wrap it in an Async, but the docs explicitely mention not to use that with Stdin: https://docs.rs/smol/latest/smol/struct.Async.html#supported-types. Unblock it is then :)

 

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?

 

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.

57
submitted 1 month ago* (last edited 1 month 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 2 months ago (2 children)

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] 3 points 2 months ago (1 children)

Sure, but isn't this in a dependency? Can't be reached when only importing your crate anyways? And if you're building a binary, I don't think this could really considered exported, is what I mean :)

[–] [email protected] 9 points 2 months ago (6 children)

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?

 

This article very much conveys what I think.

[–] [email protected] 2 points 4 months ago

Huh, I did not know that you can speed up builds by stripping debug info, need to try that out :)

[–] [email protected] 3 points 5 months ago (1 children)

Yeah I was very happy to find that out. I was calling latex externally before, and there was a lot of pain interacting with the filesystem and temporary files. Now it all happens in-memory :)

[–] [email protected] 3 points 5 months ago (3 children)

One thing that prevents me from letting users build their own templates is the scripting capabilities. A joker creating an endless loop could block the whole server.

I know little about servers, but can't you run the generation in a thread with a timeout or so? Or maybe compile to wasm and let the generation run on the users machines? I also know little about wasm, but I'd have guessed it has facilities to keep runtime and load under control.

What would be nice is a “safe” mode in which no access to the file system (include and sorts) and limited runtime makes it safe to let users build their own templates.

Ah, are you by chance shelling out to the typst binary? You can actually use typst as a library, and then you've got full control over the files involved, so it's "safe" in that respect.

 

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.

view more: next ›