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 :)
KillTheMule
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.
That might indeed be the case, I did not look very closely, but mlua has gotten quite some coverage (and I do like lua quite a bit), so I wanted it mentioned :)
transitive performance benefits
I would have assumed the benchmark suite accounts for that, otherwise the results aren't quite as meaningfull really. Which ties back you your 2nd senctence: I certainly trust the rust team more than myself on these things :)
only affect very select use cases
I did not read the whole conversation, but sorting seems a very common usecase (not mine, but seems to me a lot of people sort data), so this seems quite a broad improvement to me.
that is already perceived as a pain point
Note though, as is mentioned in the issue, that the survey showed people still prioritize runtime performance over compilation performance in general, so this tradeoff seems warranted.
the total regression is still minor
It's not unheard of that regressions can be unmade later on, so here's hoping :)
The post mentioned that the introduction of these new algorithms brings compile-time improvements too, so how should I see this?
I assume you mean the first post of the PR? I'd assume it's simply outdated (or might not have been true to begin with). See https://github.com/rust-lang/rust/pull/124032#issuecomment-2181789935 for the perf run with this PR, it's showing quite a bit of regression.
Alas, on the whole the compiler slowed down as a result of this. I think it's a worthy tradeoff though.
No sarcasm, just an honest suggestion :)
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 :)
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.
Huh, I did not know that you can speed up builds by stripping debug info, need to try that out :)