There's the String and the str (and several other string types). String is heap allocated; it stores a pointer, a length and a capacity (actually it wraps a Vec<u8> which stores these three). str, a string slice, is not allocated anywhere; it's pointing into somebody else's memory — maybe into a memory that belongs to a String, maybe into a stack buffer, maybe into an mmaped file, and maybe into .rodata
What's type of strings do you think is best? Why?
@em for those interested in the entire article, you can find that here: https://mattstoller.substack.com/p/the-slow-death-of-hollywood
> when C was made you counted system memory in bytes, so the C-style strings added just one byte of overheard
> hm, indeed, one byte overhead (vs two bytes for the length) could be a slight advantage.
I could be confused, but I don't *think* rust's overhead is just an extra byte. If you only have a 1 byte length, you'd be limited to 256 chars, right? I think rust strings use 8 bytes for length & another 8 for capacity
tech, reminiscing about X
Here's a good paper analyzing network performance of X in practice: https://keithp.com/~keithp/talks/usenix2003/
There's tons of low-hanging fruit in X network performance. For extreme examples, see https://lists.freedesktop.org/archives/xcb/2010-June/006111.html and https://bugs.freedesktop.org/show_bug.cgi?id=4232
We hoped toolkits and apps would start using XCB to take advantage of the good design of the actual X protocol, but as far as I can tell, people had already given up on using X over the network by the time XCB was ready, so there was little pressure to make good use of it.
Network transparency could have enabled very cool migration and replication stuff that still nobody can do today, certainly not with VNC-style remoting. But apparently the only thing that ever did it was Emacs: https://www.usenix.org/legacy/publications/library/proceedings/usenix02/tech/freenix/full_papers/gettys/gettys_html/index.html
So many cool ideas didn't catch on, and it's sad.
@grainloom I think compatible and competing implementations of Nix would be a good thing! I don't like writing anything new in C in 2019, but I hate it less than C++, so I could be okay with that. 😁
@emsenn Thanks, I'm glad to know my work is valued! That my software is making a point.
Personally my anger comes from the challange of finding DRM-free movies. While I avoid it myself (and happily so, I've found some great stuff this way), I don't blame people for turning towards "piracy".
I just got around to updating my movie recommendations: https://adrian.geek.nz/movies.html
I stopped forwarding the Mubi recommendation, it wasn't what I thought it was.
Instead I am pleased to recommend the audio comedy Magus Elgar! https://maguselgar.com/)
As I wrote there: 'Filled with energy and expressive voice acting, the members of "Magical Anomoly Interdimensional Locators" have a really humerous dynamic as they seek "Scientific Tools Augmented with Magical Powers".'
@yulefyre The ad industry had their chance, but they decided to ignore Do Not Track (DNT), so fuck them. ¯\_(ツ)_/¯
Posting mostly about how free software projects work, and occasionally about climate change.
Though I do enjoy german board games given an opponent.
For people who care about, support, or build Free, Libre, and Open Source Software (FLOSS).