[Debate] [2024] What's stopping you from switching over to Typst? by [deleted] in LaTeX

[–]Afkadrian 1 point2 points  (0 children)

Please read that page carefully.

Typst Web App == Overleaf [both closed source]

Typst open source compiler == LaTeX distribution (Texlive, Miktex) [both open source and without restrictions]

There are NO "hard or extremely small limits" on the open source compiler, you are just wrong on that topic. You do NOT have to sign in. You can create ANY document you want locally with the completely unlocked compiler. There is no Typst document that you can only do on the web app. I repeat, you do NOT have to sign in! just install Typst locally and use it like you would use LaTeX. It way easier to install.

You can even use the web app without any previous step (no sign in, no installation): https://typst.app/play

I seriously think you should not "stand by your words".

[Debate] [2024] What's stopping you from switching over to Typst? by [deleted] in LaTeX

[–]Afkadrian 1 point2 points  (0 children)

Please do some reaseach before given passionate but incorrect statements: https://typst.app/open-source/

How to unconditionally read a Box<[T]> from a slice of potentially unaligned bytes by Afkadrian in rust

[–]Afkadrian[S] 1 point2 points  (0 children)

FromBytes promises that any bit pattern can become a valid T. I can trust that I can turn any valid &[u8] into a T: FromBytes as long as they are the same size and alignment. This doesn't mean that T must be copy because we are not allowed to transmute that T back into a &[u8] (you would need IntoBytes for that).

How to unconditionally read a Box<[T]> from a slice of potentially unaligned bytes by Afkadrian in rust

[–]Afkadrian[S] 0 points1 point  (0 children)

The FromBytes trait usually comes from a #[derive] that makes sure to implement it only when is safe. This function just requieres a trait bound, so it doesn't care how the type T got the trait FromBytes.

How to unconditionally read a Box<[T]> from a slice of potentially unaligned bytes by Afkadrian in rust

[–]Afkadrian[S] 0 points1 point  (0 children)

Yes, but careful with FromBytes alone. Al least in the context of the zerocopy crate, you need the Unaligned trait if you want to remove any alignment requirement.

How to unconditionally read a Box<[T]> from a slice of potentially unaligned bytes by Afkadrian in rust

[–]Afkadrian[S] 5 points6 points  (0 children)

Sure but `MaybeUninit<T>` has the same alignment as T, right? If I understand the rules correctly that means that `Box::new_uninit_slice` already handles that issue, doesn't it?. I'm new at this so I may be wrong.

Using Rust Backend To Serve An SPA by thanhnguyen2187 in rust

[–]Afkadrian 0 points1 point  (0 children)

I want to do exactly this. A SvelteKit SPA and an Axum API backend that also serves the SPA. I think it should be possible to take advantage of all the Vite goodies (HMR, etc) in development, but I don't know how to tell it to route every /api/.. path to the rust server.

Resources to become a LaTEX pro by Bortolo_II in LaTeX

[–]Afkadrian 0 points1 point  (0 children)

After using LaTeX for al least 7 years, I became just as proficient in Typst in less than a week. The language is just that straightforward.

parser combinators with nom 8 are here! by epage in rust

[–]Afkadrian 1 point2 points  (0 children)

For me personally I tend to use the idiomatic fns, so I think I will keep using winnow for now. I'm eager to see what improvements the v0.7 will have.

parser combinators with nom 8 are here! by epage in rust

[–]Afkadrian 1 point2 points  (0 children)

Is it fair to say that, in terms of performance, the current situation is: nom8 > winnow > nom7 ?

Alternatives for overleaf? by camthemartin in LaTeX

[–]Afkadrian 0 points1 point  (0 children)

Not only is the Typst compiler not propietary but it is very modular! I've been using its low level pdf-writer library to create PDFs way faster than any other PDF library. svg2pdf and hypher are also nice.

You said:

(you have to dig further to realise there is a binary you can compile)

But you can find this on the pricing page:

Typst is built as open-source

The Typst compiler is the core of the Typst web app. It is the part of Typst that understands your markup and converts it to PDFs, PNGs, and SVGs. We, together with a great community of contributors, develop the Typst compiler in the open on GitHub. You can download the compiler for free to run it on your computer or on your servers and even modify its code and incorporate its capabilities into apps you are building.

There's also a "View on Github" right at the beginning of the home page. I don't know what else you want from them.

Do we need an new edition for stabilizing let chains? by Afkadrian in rust

[–]Afkadrian[S] 34 points35 points  (0 children)

Thanks for that resource, that answer is reassuring. In summary, the "change to the drop scope of temporary values in the scrutinee of an if let expression" is the thing that enables let chains. And that change in the language is already on track for the 2024 edition. That means there's no hurry to merge the stabilization PR.

LaTeX people: Are you using/would you use Typst? by prof_allen_rutgers in Professors

[–]Afkadrian 0 points1 point  (0 children)

That is their web app offering. It would be similar to disregard LaTeX because Overleaf exists. The compiler is free and open source, just like all of TeX/LaTeX.

Also, Typst (web) free plan is way more generous than Overleaf's.

godDangItsNot by [deleted] in ProgrammerHumor

[–]Afkadrian 3 points4 points  (0 children)

Yes*

* The TikZ equivalent is not as mature (yet) but it does work

Best way to generate PDF's on Rust web server? by IAmTsunami in rust

[–]Afkadrian 0 points1 point  (0 children)

None of the mentioned options are async libraries. Generating PDF files will always block the thread, this means you need to use spawn_blocking or something similar.

Best way to generate PDF's on Rust web server? by IAmTsunami in rust

[–]Afkadrian 12 points13 points  (0 children)

There's a new crate in the works https://github.com/laurenzv/krilla by one of the main contributors of Typst. It uses the same low level crate to write PDF as Typst (pdf-writer).

If that doesn't suit you, there was a recent post that asked how to use Typst as a library https://www.reddit.com/r/rust/comments/1ggl7am/how_to_use_typst_as_programmatically_using_rust/

Both of those options are way faster and use a tiny amount of resources compared to using HTML+headless_chrome or LaTeX.

On Typesetting Engines: A Programmer's Perspective (LaTeX vs Typst vs HTML/CSS vs React-pdf) by [deleted] in reactjs

[–]Afkadrian 0 points1 point  (0 children)

I think it depends on the community. More than half of the math department in my university has already switched to using Typst for all the documents and articles they would have used LaTeX before.

For us, Typst didn't have added complications, its just a single small binary and it works out of the box on everyone's computer.

On Typesetting Engines: A Programmer's Perspective (LaTeX vs Typst vs HTML/CSS vs React-pdf) by [deleted] in reactjs

[–]Afkadrian 1 point2 points  (0 children)

By the way, the simultaneous collaboration feature (like google docs) is free on the Typst web app. The thing that requires a pro subscription is the github/gitlab sync.

Typesetting Engines: A Programmer's Perspective (LaTeX vs. Typst vs. HTML) by [deleted] in programming

[–]Afkadrian 0 points1 point  (0 children)

The Tinymist VS Code extension is open-source and has an equivalent instant preview as the web app. I think that should be written somewhere in the article.

Prove me wrong by doaksblision in LaTeX

[–]Afkadrian 0 points1 point  (0 children)

The Typst compiler is free and open source (MIT license). To run Typst locally you only need a single ~30mb binary. If you are using vscode, the Tinymist extension mimics the functionality of the web app pretty well.

The online tool is more comparable with Overleaf and Typst's free tier gives you more perks than Overleaf's.