Orman

94.2K posts

Orman banner
Orman

Orman

@LizardOrman

Livestreaming from the mind of an engineer sometimes pretending to be a dragon. Also geekery and Scottish millennial politics. (he/him) pfp @Corvirav

Edinburgh, Scotland Katılım Eylül 2009
992 Takip Edilen688 Takipçiler
Orman
Orman@LizardOrman·
@a_manning0 @LukasHozda IIRC the main benefit is that it has less/smaller(?) potential soundness holes
English
0
0
1
9
a-manning
a-manning@a_manning0·
@LizardOrman @LukasHozda Other than not being a proc macro, selfcell is just worse. Can't even choose custom field names on a self-referencing struct
English
1
0
1
16
Lukáš Hozda
Lukáš Hozda@LukasHozda·
In reality, `unsafe` apperas in the average Rust codebase 0 times You usually need unsafe in the following situations: - You need to interface with C libs (the compiler isn't psychic) - Same but with HW (the compiler still isn't psychic) - You know something rustc doesnt (rare)
The Lunduke Journal@LundukeJournal

🤣

English
33
8
364
36.6K
CoolKoon
CoolKoon@coolkoon·
@LukasHozda "You need to interface with C libs (the compiler isn't psychic)" - ...which is 100% of the time for any reasonable-sized project.
English
1
0
2
62
a-manning
a-manning@a_manning0·
@LukasHozda You pretty much need it for self-referencing structs also. Ouroboros is OK but is quite limited in what it can do
English
1
0
1
229
Orman
Orman@LizardOrman·
@minz_anupam @LukasHozda Yes, that's the point - minimizing the boundary of potentially-unsound code
English
0
0
4
132
minzanupam
minzanupam@minz_anupam·
@LukasHozda - you don't need to interface with os - you don't need to interface with c libs - you don't need to interface with hardware Tell me you are using libraries for everything without telling me you are using libraries for everything.
English
7
0
29
1.9K
Orman
Orman@LizardOrman·
@LuisUr288 @Devils_Tooth @TheatreSpoonie @LGBwiththeT Yes because things are expecting to have either elevated estrogen or higher levels of testosterone, but not both. AFAIK all the alleged negatives of puberty blockers that aren't just "you have the health risk profile of the assumed sex" go away as a result of having the other one
English
1
0
1
14
LGBwiththeT
LGBwiththeT@LGBwiththeT·
🚨 So called 'Gender critical' @thatveganlass is a convicted sexual abuser (including involving 4 children): three charges of assault, two sexual assaults, two of indecent communication, one indecent assault and two offences of behaving in a threatening or abusive manner. 1/
English
16
89
399
37.7K
⃠ emojibake
⃠ emojibake@emojibakemono·
@LizardOrman @ClassicGamerTWR you can cause memory corruption without the use of unsafe or screwing around with the internals though. just via the lack of threat safety
English
1
0
0
19
Jerason Banes / Architect of Convirgance
“Memory safe” is the buzzword of the moment. It’s meant to evoke the idea that C++ is an unsafe languge while Rust is a “safe” language. The jury is still out whether this is true in practice. Very few large-scale system programs have been written. And the attempted linux modules have run into headwinds. Complicating matters is an excited fanbase using Rust for all the wrong reasons. “Memory safe” is often interpreted as only Rust is memory safe and all other platforms must be replaced. Web applications and rewrites of well established libraries are generating noise and wasting a lot of time. None of which helps in establishing the key finding needed to make Rust successful: Is the borrow checker a safe, secure, and performant replacement for Garbage Collection? Until the Rust community is able to focus and answer this question at scale, the safest move is for company is to stick with proven, garbage collected solutions. Which means more Java, .NET, Go, and Python. And if Rust is unable to make its case in absence of the hype, we will continue using C/C++ in systems work for a very, very, very long time.
Jerason Banes / Architect of Convirgance tweet media
English
26
5
51
53K
Orman
Orman@LizardOrman·
@paul_e_jones @ClassicGamerTWR ...So you do a bunch of things to mitigate potentially bad or faulty code sneaking into the end product? That's what rust does too, just more comprehensively. It's not one or the other, you use a language that has infinitely higher standards for valid code, *and* test and review
English
0
0
0
22
Orman
Orman@LizardOrman·
@paul_e_jones @ClassicGamerTWR Rust basically exists because you can't "write it correctly to start with" with an error rate comparable to that of cosmic rays causing rustc to malfunction, and/or you need to take unnecessary runtime costs to do so.
English
0
0
0
28
Orman
Orman@LizardOrman·
@paul_e_jones @ClassicGamerTWR Sure, you can use unsafe to avoid that last bounds check (but often there's alternatives) or calling into C, but... that means you're at the same level as the C++, not any worse. And you only need to scrutinize those calls, whereas you need to scrutinize all C++ everywhere
English
0
0
0
17
Orman retweetledi
Cora Harrington
Cora Harrington@CoraCHarrington·
I think a lot of people overestimate just how much Internet - especially the old Internet - the Wayback Machine has saved. There seems to be an assumption that everything which has ever existed online *must* be out there, somewhere, and that isn’t true.
Cora Harrington@CoraCHarrington

There's nothing like rummaging around in the archives of a site that's been around since 2006, clicking on the links of the sites they recommend, and every single one being a dead link. An entire internet, lost. And we were told whatever we put online was forever.

English
40
1.6K
10K
231.4K
Orman
Orman@LizardOrman·
@tracewoodgrains @harpersealtako2 Websites are restricting all sorts of material that may or may not fall under the act out of an abundance of caution
English
1
0
1
15
Orman
Orman@LizardOrman·
@robokoteg @ClassicGamerTWR FWIW someone linked thm elsewhere in the thread and the numbers are even more revealing x.com/LizardOrman/st…
Orman@LizardOrman

@ClassicGamerTWR @yourerightson @JLarky @LukasHozda "...the rollback rate of Rust changes is less than half that of C++." "To date, there have been zero memory safety vulnerabilities discovered in Android’s [1.5MLOC] Rust code." "Historical vulnerability density is greater than 1/kLOC" Fail to establish a correlation? lolno

English
0
0
0
11
Orman
Orman@LizardOrman·
@robokoteg @ClassicGamerTWR Not to mention that blog article from Google reporting zero memory safety issues in their rust components in Android
English
1
0
1
22
Orman
Orman@LizardOrman·
@mav3ri3k @HSVSphere There's laziness in the chunk().map() section because you're not landing the mapped chunks until you do the collect()
English
0
0
1
8
Apurva Mishra
Apurva Mishra@mav3ri3k·
@HSVSphere Wait, I dont get it. Here he immediately collects everything, laziness is never used ? No reduction or deffering either compute or memory.
English
1
0
2
81
HSVSphere
HSVSphere@HSVSphere·
lazy computation composes & is actually as efficient as a manually written loop btw (sometimes even more efficient as iterator size hints exist)
leon@profleonn

English
10
2
173
11.2K
Orman
Orman@LizardOrman·
@HSVSphere Its kinda annoying there's no stdlib combinator for doing chunks() over an iterator that's not a slice
English
0
0
0
20
Orman
Orman@LizardOrman·
@hecubian_devil Not to mention, having asked the question "neutrally," picking out an implication of the answer as "obvious" is an extremely loaded thing. Because I'm sure he does not mean the "obvious" reason that, y'know, Christians left fianancial services to others for religious reasons
English
0
0
0
31
Orman
Orman@LizardOrman·
@ClassicGamerTWR @yourerightson @JLarky @LukasHozda "...the rollback rate of Rust changes is less than half that of C++." "To date, there have been zero memory safety vulnerabilities discovered in Android’s [1.5MLOC] Rust code." "Historical vulnerability density is greater than 1/kLOC" Fail to establish a correlation? lolno
English
0
0
4
70
Jerason Banes / Architect of Convirgance
First off, thank you for bringing data! This is absolutely how we have a discussion. 🙏 I’ve seen several of these before, so allow me to break it down: 1. Google found that bugs have a half-life and that the number of issues naturally decreases over time. They mention Rust, but fail to establish a strong correlation in this article. Promising! But not yet strong data. 2. This article does a better job of establishing a correlation. The data is very promising at this point. This was published earlier in the process of converting to Rust, but does caution that most of the attack surface is Java shielding the underlying Rust. It’s honestly too bad they didn’t establish this level of correlation in the 2024 article as that article seems to undermine the thrust of this 2022 article. 3. Says nothing about the implementations that I can find. Only Microsoft’s desire to implement memory safety and the resulting challenges that arise. 4. “no serious driver has made into the mainline except for one with around 130 lines of code” - Promising, but still lacking data against the real-world deployment. Most of the paper discussed the challenges of interfacing Rust and how the authors conclude that it will probably result in fewer, but more insidious safety bugs. Is that a win? We don’t know yet. Overall, these articles are exactly my concern. Rust deployment at scale has not happened much yet, and we don’t yet have data on whether it’s working or not. The circumstantial evidence from Android is probably the strongest evidence so far. It is promising! Alas, not conclusive.
English
2
0
2
92