Unsound 2020

2 views
Skip to first unread message

Heidi Hall

unread,
Aug 4, 2024, 6:17:16 PM8/4/24
to acovinis
Sowould it be correct to summarize unsoundness as: An implementation detail which allows for potential use of an abstraction in such a way that it could lead to a security or safety vulnerabilities under certain circumstances but in itself it does not represent one?

That sounds correct, but overly complicated. I'm trying to figure out if I leaves anything uncovered though.

Regardless: I wouldn't use the words "implementation detail", because soundness is not a detail, it's a fundamental, and critical, aspect of the design, just like "correctness".

I understand you mean the jargon-version of "detail" that means "the way it is implemented, which could be changed", but that downplays the importance, and ignores the fact that some APIs can be unsound in their public interface, which is not a concealed "implementation detail" in the normal sense.

E.g. the original, unsound, API for scoped threads, which caused a bit of a (professionally-handled) meltdown when it was discovered at the time.


Unsound code, or code that touches UB condition on runtime, is a contract violation between the programmer and the compiler. The compiler optimize the code based on this contract, and it can generate incorrect code on UB-touching branch to speed up the normal code. If you don't mind the compiler to generate incorrect code, why use compiler when the /dev/random can also generate incorrect code but a lot faster?


we say that a library (or an individual function) is sound if it is impossible for safe code to cause Undefined Behavior using its public API. Conversely, the library/function is unsound if safe code can cause Undefined Behavior.


On the flip side we could say code is "unsafe, but sound" if the invariants are limited, correct and demonstrably upheld with 100% of inputs. This is of course much more difficult to claim and shouldn't be claimed lightly. Some might even argue it's technically impossible but I don't think that's helpful when some of Rust's implementation depends on unsafe, but sound code.


I am writing to ask the members of chess.com (my future opponents) to suggest some unsound openings that I can try out. I play chess entirely for fun, and I don't mind losing sometimes. That said, I usually win with my current set of unsound openings.


Right now as Black I've been playing the Fred: 1.e4 f5? 2.exf7 Kf7?? which I've been really enjoying. After 3.Qh5+ g6 4.fxg6+ Kg7 5.gxh7 Rxh7 6.Qg5+ Kh8, Black is clearly losing. But he often develops surprising counterplay and White can easily drift into trouble, and I've won a lot of games with this opening. (Sometimes I feel bad because it must be embarrassing for White.) I used to play the Elephant Gambit 1.e4 e5 2.Nf3 d5?! 3.exd5 Bd6!? and I may go back to that line some day.


My goal is not to simply play bad moves, but to play unsound moves where I am objectively worse, but I nonetheless have a chance to get good counterplay. Even if it's not unsound, I still might play something if it's highly unorthodox and aggressive.


I have tried a number of these suggestions, but I will give the Lembert-Tennyson gambit a second try. I haven't tried the Mokele Mbembe and the Gibbins Wiedenhagen but will do so. I do own Bucker's excellent book on the Vulture (and Hawk and Woozle). Thanks for the suggestions.


Throw this in there: an old chess adage says no position is bad unless the opponent can take advantage of it. So an unsound gambit at certain higher levels of play can be a sharp weapon lower down. So on the one hand we might all like to play 'sound' chess, on the other hand there's the fun of the game - and winning however you can.


Yes, I considered that such might be the case. But I wanted to throw my post in there because I thought it would be a worthwhile point to make in a discussion of gambits, and sound and unsound that is viewed by many levels of player (like lowly me).


For as long as recording and communications technologies have existed, the potential of the vibrational continuum that connects sound to infrasound, ultrasound and other inaudible frequencies has been evoked to access anomalous zones of transmission between the realms of the living and the dead.


For the past ten years the AUDINT group has been researching these peripheries of sonic perception (unsound) and the portals they open to new dimensions, activating a continual intersection between fiction and fact, and pressuring thought to become something other than what it has been. The 64 short essays in this volume probe how unsound serves to activate the undead.


Contributors from a variety of disciplines chart these warped zones, mapping out a zigzagging timeline stretching from the 8th century BC (the song of the Sirens), to 2013 (acoustic levitation), and speculatively extending into 2057 (the emergence of holographic and holosonic phenomena).


With texts by: Lawrence Abu Hamdan, Lendl Barcelos, Charlie Blake, Lisa Blanning, Brooker Buckingham, Al Cameron, Erik Davis, Kodwo Eshun, Matthew Fuller, Kristen Gallerneaux, Lee Gamble, Agns Gayraud, Steve Goodman, Anna Greenspan, Olga Gurionova, S. Ayesha Hameed, Tim Hecker, Julian Henriques, Toby Heys, Eleni Ikoniadou, Amy Ireland, Nicola Masciandaro, Ramona Naddaff, Anthony Nine, The Occulture, Luciana Parisi, Alina Popa, Paul Purgas, Georgina Rochefort, Steven Shaviro, Jonathan Sterne, Jenna Sutela, Eugene Thacker, Dave Tompkins, Shelley Trower, and Souzana Zamfe.


For as long as recording and communications technologies have existed, operators have evoked the potential of sound, infrasound, and ultrasound to access anomalous zones of transmission between the realms of the living and the dead. In Unsound:Undead, contributors from a variety of disciplines chart these undead zones, mapping out a nonlinear timeline populated by sonic events stretching from the 8th century BC (the song of the Sirens), to 2013 (acoustic levitation), with a speculative extension into 2057 (the emergence of holographic and holosonic phenomena).


For the past seven years the AUDINT group has been researching peripheral sonic perception (unsound) and the ways in which frequencies are utilized to modulate our understanding of presence/non-presence, entertainment/torture, and ultimately life/death. Concurrently, themes of hauntology have inflected the musical zeitgeist, resonating with the notion of a general cultural malaise and a reinvestment in traces of lost futures inhabiting the present.


This undead culture has already spawned a Lazarus economy in which Tupac, ODB, and Eazy-E are digitally revivified as laser-lit holograms. The obscure otherworldly dimensions of sound have also been explored in the sonic fictions produced by the likes of Drexciya, Sun Ra, and Underground Resistance, where hauntology is virtually extended: the future appears in the cracks of the present.


The contributions to this volume reveal how the sonic nurtures new dimensions in which the real and the imagined (fictional, hyperstitional, speculative) bleed into one another, where actual sonic events collide with spatiotemporal anomalies and time-travelling entities, and where the unsound serves to summon the undead.


Steve Goodman is a Lecturer in Music Culture at the School of Sciences, Media, and Cultural Studies at the University of East London, a member of the CCRU (Cybernetic Culture Research Unit), and the founder of the record label Hyperdub and the sub label Flatlines to focus on audio essays and sonic fiction.


Toby Heys, a member of AUDINT, is Reader in Digital Media and the Head of Research for the School of Digital Arts (SODA) at Manchester Metropolitan University. His cross-disciplinary research focuses on the ways that frequencies are utilized by governments and industry to influence, manipulate, and torture. He is the author of Sound Pressure, to be published in 2019.


Hang out on the internet much and you'll hear gripes about how TypeScript isn't "sound," and that this makes it a poor choice of language. In this post, I'll explain what this means and walk through the sources of unsoundness in TypeScript. Rest assured, TypeScript is a great language and it's never a good idea to listen to people on the internet!


TypeScript infers a static type of number for x, and this is sound: whatever value Math.random() returns at runtime, it will be a number. This doesn't mean that x could be any number at runtime: a more precise type would be the half-open interval [0, 1), but TypeScript has no way to express this. number is good enough. If you remember the famous statistics dartboard, soundness is more about accuracy than precision.


Many programming languages include proofs of soundness, or at least purport to be sound. Fun fact: in 2016, two researchers discovered that Java had become unsound! As we saw above, TypeScript is emphatically not sound. In fact, soundness is not a design goal of TypeScript at all. Instead, TypeScript favors convenience and the ability to work with existing JavaScript libraries.


The solution here is simple: limit your use of any or, better, don't use it at all! Chapter 5 of Effective TypeScript is all about how to mitigate and avoid the static type disaster that is any. The highlights are to limit the scope of any and to use unknown as a safer alternative when possible.


Of course, you're still asserting that your type guard really guards the type. If you want to be more systematic about it, there are many possible approaches. One is to use a tool like Zod that's designed to solve this problem. Another is to generate JSON Schema from your TypeScript types (e.g. using typescript-json-schema) and validate the shape of your data at runtime using that. crosswalk takes this approach.

3a8082e126
Reply all
Reply to author
Forward
0 new messages