4 ms·
I’m aware of how boxing works in GHC, I learned it from Simon Marlowe. I don’t mean to be obtuse but I don’t see what that has to do with linear typing as a fu
by benreesman 2y ago
I’m aware of how boxing works in GHC, I learned it from Simon Marlowe.
I don’t mean to be obtuse but I don’t see what that has to do with linear typing as a fucking weird mandatory default?
- zozbot234 2y agoI'm not sure what's supposed to be especially weird about linear typing (or rather, uniqueness typing which is what Rust ultimately relies on). If you want to see the use of such types in a language that's clearly even less "convenient" and more principled than Rust, you can look at Austral https://austral-lang.org/ https://austral-lang.org/
- benreesman 2y agoI think I’m going to be a hard pass on a language more militant about BDSM type system level memory management than Rust.
- deleted 2y ago[deleted]
- farmeroy 2y agoIs their code linter called whippy?
- the_duke 2y agoWhy should every language occupy the same design space? Rust was shaped by Mozilla wanting a language to replace parts of Firefox with. A language that is low-level enough to give very high performance, enforces correctness through the type system, and yet has many abstractions so it feels modern and convenient to use. Rust doesn't have any automatic allocations. You can wrap every type in `Arc<Mutex<T>>` and treat it like a very verbose Python, but that's the programmers choice. The design decisions have been validated by the success of Rust in certain domains. There is a reason why more than one programming language exists...
- benreesman 2y agoI think Rust is cool! If it wasn’t actively seeking world domination I’d be like, cool let’s use that sometimes. Rust is so hell bent on a Rust monoculture ranging from stuff like TRACTOR to actively opposing interop that a few of us who know our shit have to be like “easy now” once in a while. I’m trying to decide between tiktoken and sentencepiece for a new vocabulary at the moment, and it would be easier in some ways to go with tiktoken. But I want it to run faster than a fart at inference time, which means I’m linking libtorch, which means I’m writing C++. And fuck, link to Rust from C++? Let’s take another look at the Google stuff.
- zozbot234 2y ago> to actively opposing interop Rust just uses the C ABI for interop (including interop with Rust code that might not be part of the same build, such as dynamically-linked program objects). So you just have to come up with a plain C API for the interface and write wrappers on both sides of the divide that reference the C API. There are crates that will help with this, even achieving something like a "stable ABI" for Rust interop. (And we'll probably see some work into interop with Swift itself (which has a stable ABI of its own) once there's enough interest in that as a memory safe language.)
- benreesman 2y agoIt’s doable! But bindgen/cbindgen/cxx/etc exist for a reason: it hurts like a root canal. In my particular case, tiktoken is substantially like 600 lines of Rust. If I have a deadline do I fuck with the linker or just write it again? I’m marshaling std::string here, fuck let’s just write it. What I’m not going to re-write because I’m not a magnificent maniac like geohotz? I’m not going to rewrite libtorch. Which is written in C++ like all the software you can’t really live without.
- tialaramex 2y ago> If it wasn’t actively seeking world domination I’d be like, cool let’s use that sometimes. Hylo specifically says it intends "world domination" (next year in fact, having apparently completed all the delayed 2023 goals and also all its 2024 goals this year, I guess maybe they're going to do it all in December?) But I don't really see this from Rust. I'm sure Hylo's "world domination" is a joke, but, so is the "Rust Evangelism Strike Force". Rust people I've interacted with strike me as very much more accepting of the "better tool" theory than of some weird cult or panacea. When somebody in a Rust forum says (e.g. about JPEG XL) "Ooh we should use Rust" and I say "No, WUFFS. This problem is what WUFFS is for" the responses tend to be a mix of "Yeah, I guess" and "I didn't know that existed. Thanks for the link" rather than cultist denial.