HNHacker News
TopNewBestAskShowJobs

xavxav

1,035 karma · joined February 12, 2012

www.xav.io
submissionscomments
xavxav··on Rust stabilizes generic associated types
An immediate issue which could be addressed with further complexity is that for loop desugaring is done very early in Rust's compilation pipeline, way before typing is actually performed. This would also be weird in the case that you have a for loop over some generic iterator, the monomorphized code could vary quite a bit based on what trait your type implements.
xavxav··on SK Hynix Starts Prepping for Next Semiconductor Boom with $11B Memory Fab
But they have, we wouldn’t be able to design, build or operate those 100M machines without plenty of cutting edge micro-electronics at every step of the way.

When you look at the details of how these machines are made, the price tag almost seems low in the end.

xavxav··on Man who built ISP instead of paying Comcast $50K expands to hundreds of homes
Today you help finance someone’s fiber, tomorrow they help finance your hospital/fire dept/etc, that’s the whole idea of public works.
xavxav··on The Failure Mode of Clever (2010)
I don’t get what is meant by clever in this context, how do you “cleverly” introduce yourself by writing to someone?

I do agree with the broader point about cleverness’ failure mode though.

xavxav··on Abolish the PhD (2016)
In France, you normally can't apply for a thesis without funding (it may vary on field though). And the moment you have funding that makes you an employee, with the protections accorded. Since most theses are funded using public money, you become a state employee with all the additional protections that implies.

That said, PhD students (and researchers) are still poorly paid (though PhD stipends are being raised over the next few years), and though France has a legal 35 hour work week, informal pressure of academia means that tends to be thrown out the window.

There are legal requirements on graduate schools that help protect students from abusive advisors or other abuse within their laboratories, of course since the research world is small, it remains to see how effective they can be.

xavxav··on Abolish the PhD (2016)
It also depends on where you did your thesis in the first place. The UK has stronger protections for grad students than the US (not hard to do).

In any case it shouldn't be up to whether you had a permissive advisor or not, PhD students like everyone deserve time off, and without legal protections that always gets abused.

xavxav··on Mass and angular momentum, left ambiguous by Einstein, get defined
The visualization that works for me is to imagine the surface of a balloon as a 2D universe. As you inflate the balloon it stretches out despite the skin having no “center” to speak of.
xavxav··on Plano man keeping Blockbuster alive
I can’t overstate the value of the lunch hour in France, it’s by far the best part of my day and has made my PhD bearable, enjoyable even despite the difficult pandemic environment.

It’s allowed me to learn from colleagues, make friends and create a sense of belonging, my lab isn’t just an abstract organization but a group of interesting people.

xavxav··on CreuSAT: Formally verified SAT solver written in Rust and verified with Creusot
Check out Sarek’s thesis in the evaluation section: https://sarsko.github.io/_pages/SarekSkotåm_thesis.pdf.

In general it’s roughly at the level of microsat so worse than minisat and kissat, but not garbage either.

xavxav··on CreuSAT: Formally verified SAT solver written in Rust and verified with Creusot
Indeed, Creusot itself is not formally verified, but we have verified the metatheory in our paper RustHornBelt: https://people.mpi-sws.org/~dreyer/papers/rusthornbelt/paper.... Actually verifying the translation that Creusot produces would definitely be interesting future work, but I'm not sure it's where the best 'bang for the buck' is found right now, though I try to ensure the underlying translation would remain simple to formalize.
xavxav··on CreuSAT: Formally verified SAT solver written in Rust and verified with Creusot
SAT comp gives you 5x the solving time to check your proof, which is indicative that checking isn’t so simple (though it is on paper)
xavxav··on CreuSAT: Formally verified SAT solver written in Rust and verified with Creusot
Hi! I’m the author of Creusot, Sarek did some amazing work on CreuSAT, he also had to teach himself formal verification and SAT solving along the way.

If you have any questions about CreuSAT or Creusot, I’d be happy to answer

xavxav··on Async Rust doesn't have to be hard
> Is the Async crew mostly writing web servers and other things that operate using TCP and HTTP? Lower level (eg IP, Eth, network hardware drivers) isn't well supported by rust libs. Nor is higher - we have Flask analogs, but no Django analogs.

Something I have never understood is why people want to write web-apps in Rust. I love the language, but honestly, a managed language (like js/ruby/go) is always going to be better suited to the world of web-apps.

I feel like this imposes an undue burden on Rust to do everything for everyone which has to break down somewhere

xavxav··on Make formal verification and provably correct software practical and mainstream
Honestly, to me this project is a means seeking an end, the same way JS devs love to play around with frontend frameworks, the author saw a bunch of shiny powerful (highly complex) tools and decided that combining them all was the solution to our problems.

I don't want to discourage them from learning Iris, or designing a dependently typed language, but I really think that's missing the difficulty in formal verification.

I think the two areas that need focus are: ease of specification and automation. In short, we need to lower the cost of verifying a line of code, by at least an order of magnitude. These two objectives are also directly opposed to the direction Magmide sets as the goal. Ease of specification means we want to use the least amount of seperation logic possible, and hide it from the user if possible. Doing proofs / writing specs in seperation logic sucks and not for interesting reasons. Automation means favoring simpler logics, specifically we want to stick as much as possible to FOL since that's where we have good automation. By doing everything in a rich dependently typed language from the start it also makes it harder to do incremental verification, I think there is a lot of value in having a 'pyramid of trust' with more and more powerful tools which take you up a level of trust and verification, potentially requiring more input from engineers as they go up.

Finally, I think there's a lot of potential to explore in the interfaces we use to write, read, and debug proofs. I don't think tactic languages (as exist today) are the last word, and I think we should be doing a lot more interesting things to interface with and explore the proofs.

xavxav··on RustBelt: Securing the Foundations of the Rust Programming Language (2018) [pdf]
If you're interested by this, you might also like recent work I participated in developing RustHornBelt, which allows reasoning about the functional correctness of Rust code, and will be published at PLDI'22 in June.

Our preprint can be found here: https://www.lri.fr/~xldenis/paper/rusthornbelt.pdf

xavxav··on The Hare programming language
> It could be baked into proof assistants that are part of (optional or add-on) tooling, like what sel4 does. A simpler language makes this more possible, and the things that a proof assistants can do go far beyond what rust is able to provide

I’m actually doing my PhD on the verification of Rust programs and wanted to add that the opposite is actually true. The type system of Rust helps to create a much simpler model of the language which allows us to do proofs in much larger scale than with C (for the same effort). This is specifically because of how ownership typing helps us simplify reasoning.

xavxav··on Go will use pdqsort in next release
> Yes. Glidesort moves data back and forth between partially initialized buffers a lot, so unsafe code is unavoidable. I also need to concatenate slices that are adjacent in memory, which is impossible to do with safe slices (due to pointer provenance). Mixing pointers/slices in general is just a bad idea, so for the most part I simply use pointers.

Ah, that's frustrating, my tool Creusot is meant for the verification of safe code, though I also worked on unsafe code verification as part of the RustHornBelt project (upcoming PLDI paper).

I'd still love to chat and see how far we can push verification, you can reach me via email at xldenis @ lri . fr

xavxav··on Go will use pdqsort in next release
>I have to still do some extra correctness vetting and testing, and in particular exception-safety is still not yet fully implemented. This is important because I wrote it in Rust where we must always give back a valid initialized array, even if a comparison operator caused a panic. But I do have some performance numbers to quote, that won't significantly change.

Do you make extensive use of `unsafe` Rust? What other features do you use? I ask this as my PhD thesis is building a deductive verifier for (safe) Rust, and I'm always looking out for interesting challenges.

If you would ever be interested in a collaboration proving your algorithm correct let me know :)

xavxav··on What Is Rust's Unsafe? (2019)
I would argue it’s language-ub to convert an invalid slice into into a String, it’s bubbling up a requirement of str which relies on the contained utf-8 to be well-formed for memory safety.
xavxav··on What Is Rust's Unsafe? (2019)
I’m doing my PhD on the formal verification of Rust, and while you’re right that safe code provides a lot of informal advantages it also dramatically simplified form reasoning.

In particular, the dirty secret of C verifiers is that they don’t handle pointers all that well. Either you find yourself doing a lot of manual proof work or you have to dramatically simplify the memory model.

In contrast, when verifying safe Rust, the rules of the borrow checker allow us to dramatically simplify the verification work. All of a sudden verifying a manual memory program with pointers (borrows) becomes as simple as verifying a basic imperative language. I’ve been working on a tool: https://github.com/xldenis/creusot to put this into practice

On the other hand, the moment you dive into unsafe, all bets are off and you find yourself wading through the marshes of (weak) memory models with your favorite CSL as your only friend.

xavxav··on Netflix Should Sell Ads
Sure, but as I'm sure you're aware, the current system makes this model impossible for all but the most niche products: a faster growing, better funded (because they are growing faster) product will outspend you until you die. The existing VC model is hostile to 'slow growth' companies and products.
xavxav··on EU negotiators agree new rules to rein in tech giants
Well, GDPR fines are ramping up over time, regulators seem to have been easing companies into it rather than starting off with the 10B fines from day 1. I still hope to see some serious fines on FB / Google in the coming years.
xavxav··on A new history of Byzantium reveals the inner workings of a late antique empire
The manuscripts weren't in Greece. These works were written centuries ago, many of them before the rise of the roman empire. As books were expensive back then, they would often be found in wealthy cities like Rome, Alexandria or Constantinople and often taken as spoils after conquests. The fall of the Western Roman empire additionally meant no one had time or resources to go collecting old dusty manuscripts, but the rising Arabic empires did. Later in the medieval period, notably after the crusades and moor conquest of spain, monks began (re)translating the arabic copies of these works, bringing them back west along with many other novel works, commentaries and inventions.
xavxav··on Apple announces 27-inch 5K Studio Display
I’m happy that they finally released this monitor, it felt weird that you could get an imac which was sleeker than any existing screen, but does anyone know of more affordable alternatives?

This may be a bit weird/niche but I care a lot about the thickness of the monitor itself, the depth of the stand and the bezel around the screen. I’d like if the object I spend 8 hours a day staring at isn’t aesthetically horrendous..

xavxav··on French minister announces new plan for supporting open source
It's good that they're making efforts, but in practice it still feels highly lacking: in france there are many competing & overlaping semi-public and public organisations whose copyright stance makes OSS difficult, even when the project is owned by another public institution!

That's not even entering into the issues with ministries which are (illegally) keeping certain software closed source, or have signed recent contracts which make open sourcing impossible.

There's also the related question of Open Data, which I think is often of more civic importance than open source itself. Here again, ministries drag their feet when politically convenient (covid data), or just play deaf.

xavxav··on Machine learning is still too hard for software engineers
Sort of hijacking, but I've always wondered: Where are our 'neural binutils'?

I want to be able to compose these tools like I would random unix ones: Something like 'Identify album covers in this image | extract the text in said covers | spotify api'.

It seems like there are so many breakthrough models but both due to technical (size/compute) and industrial ($$$) concerns they remain out of reach for random devs, let alone packageable into a `grep` style composable tool.

xavxav··on ‘Zero-click’ hacks are growing in popularity
There are similar approaches, ie: Checked-C which work surprisingly well. However, I'm not sure that this approach would be expressive enough to handle the edge cases of C craziness and pointer arithmetic. There's more to memory unsafety than writing to unallocated memory, even forcing a write to slightly wrong memory (ie setting `is_admin = true`) can be catastrophic.
xavxav··on ‘Zero-click’ hacks are growing in popularity
A crash is signficiantly better than corruption. If you can force an `unwrap` you can cause a denial of service but with corruption, all bets are off.
xavxav··on ‘Zero-click’ hacks are growing in popularity
Right, but a memory unsafety but is what takes a harmless logic bug in an image parser with no filesystem access to an RCE and sandbox escape.

Memory unsafety allows you to change the 'category' of the bug, you become free to do whatever whereas a logic bug forces to to work within the (flawed) logic of the original program.

xavxav··on ‘Zero-click’ hacks are growing in popularity
> Honestly at this point I’ve given in and am now advocating that we rewrite every damned widget from scratch in Rust, because by the time we’re mostly done, my career will be winding down, and seeing that shit still gets pwned like, exactly as much, will be “good TV”.

Rust won't solve logic bugs but it can help bring up the foundations. So long as memory safety bugs are so pervasive we can't even properly reason on a theoretical level about logic bugs. The core theorem of any type system is "type safety" which states that a well-typed program never goes wrong (gets stuck, aka UB). Only then can you properly tackle correctness issues.

> Rust is cool because Haskell Lego Edition is better than no Haskell at all, and Rust is cool because now that it’s proven affine/linear typing can work, someone will probably get it right soon.

I don't understand the condescending remarks about "Haskell Lego Edition". I do agree that Rust has shown that substructural type systems work and are useful, and that they will be a 'theme' in the next batch of languages (or I can hope).

← PreviousPage 4 of 5Next →