• 3 Posts
  • 26 Comments
Joined 1 year ago
cake
Cake day: September 2nd, 2023

help-circle




  • 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 :)







  • Did I get it right? The crate lets you directly input data into a typst document from an arbitrary struct?

    Well, typst provides those means in itself, this crate just makes it easier to fulfill the necessary trait.

    Also out of scope of OP, is typst in anyway capable of typesetting music notation?

    I don’t really think so. Music notation is also pretty specific, so I’d look into specialized software for that (although it might be theres a latex package, those things are everywhere ^^).



  • It’s absolutely awesome. For my use case, it already surpasses latex, but I’m pretty sure that for other usecases there will be a point where latex offers more, at least due to ecosystem support. I for sure made the switch (wrote some personal docs in typst as well), and I’d suggest anybody at least looks into switching, it’s so much better :)

    From a dev perspective, it’s also great that this is useable as a lib, instead of having to muck with an external binary (or rather full external latex installation).







  • In fact, isn’t this not true just by the fact that references work for Strings and Strings size can’t be known at compile time?

    I don’t understand this. Shared references to String are Copy, too. This doesn’t have to do anything with sizes. Rather, it’s implemented in the compiler, because it’s sound to have it and a huge QoL improvement over the alternative… just the same reason why e.g. usize is Copy, really.

    is it dereferenced specifically because is Boxed on the heap?

    No, it’s not really related to the heap. Box implements DerefMut, which is in-depth explained here.




  • 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 ;)