8
51
KillTheMule

@programming.dev

KillTheMule 33 points 3 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 ;)

path: 0 3833152, hotness: undefined, score: 33, children: 5
KillTheMule 20 points 3 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.

path: 0 5474336, hotness: undefined, score: 20, children: 1
KillTheMule 16 points 2 years 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 :)

path: 0 10708247, hotness: undefined, score: 16, children: 4
KillTheMule 14 points 2 years ago

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

path: 0 16290090, hotness: undefined, score: 14, children: 3
KillTheMule 13 points 2 years 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.

path: 0 14810669 14811285 14811372, hotness: undefined, score: 13, children: 2
KillTheMule 10 points 3 years ago

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

path: 0 4200971, hotness: undefined, score: 10, children: 2
KillTheMule 9 points 4 months ago path: 0 24526661, hotness: undefined, score: 9, children: 0
KillTheMule 9 points 2 years 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?

path: 0 14646243, hotness: undefined, score: 9, children: 6
KillTheMule 7 points 2 years ago

No sarcasm, just an honest suggestion :)

path: 0 10708247 10709696 10717727, hotness: undefined, score: 7, children: 1
KillTheMule 6 points 2 years ago path: 0 10662043, hotness: undefined, score: 6, children: 9
KillTheMule 6 points 3 years 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 ;))

path: 0 8318309, hotness: undefined, score: 6, children: 2
KillTheMule 6 points a year 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.

path: 0 17286509 17288465, hotness: undefined, score: 6, children: 0
KillTheMule 5 points 3 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.

path: 0 3161519, hotness: undefined, score: 5, children: 0
KillTheMule 5 points 3 years ago

A reference IS Copy, by the simple fact that it is a primitive value on the stack.

This seems a bit misleading, noting that unique/mutable references aren't Copy. Shared references are Copy because it's sound to have that, and it's a huge QOL improvement over the alternative.

path: 0 4730062 4730099 4730125, hotness: undefined, score: 5, children: 0
KillTheMule 5 points 3 years ago

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.

path: 0 4730097, hotness: undefined, score: 5, children: 0
KillTheMule 5 points 2 years ago

Alas, on the whole the compiler slowed down as a result of this. I think it's a worthy tradeoff though.

path: 0 10768530 10769075, hotness: undefined, score: 5, children: 6
KillTheMule 5 points 2 years ago

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

path: 0 10768530 10769075 10769296 10769588 10770006 10770209, hotness: undefined, score: 5, children: 2
KillTheMule 5 points 2 years ago

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

path: 0 10768530 10769075 10769296 10769588 10770006 10770209 10770274 10770360, hotness: undefined, score: 5, children: 0
KillTheMule 5 points 2 years 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 :)

path: 0 16185705, hotness: undefined, score: 5, children: 0
KillTheMule 4 points 3 years ago

I've written nvim-rs, an async library for interfacing with neovim via RPC.

As a sidejob, I'm writing and selling a program to create school reports.

path: 0 4866989, hotness: undefined, score: 4, children: 0

thanks for using Leebra!

go to feed...