News for hackers. Stuff that matters.
Re:Open-sourcing Facebook Infer: Identify bugs before you ship by tptacek on Thursday June 11, 2015 @01:24PM (#9701037)
Ok, tangent question: if I wanted an interesting project to learn Rust with, would a symbolic evaluation checker for (say) C code be a really good fit? In the same sense as emulators turned out to be a fantastic fit for Golang?

If that's true, what are the features of Rust that make this so, and roughly how would they apply to that problem domain? (I could answer that question for Golang and emulators pretty quickly).

(Hopefully this question comes across the way I intend it to, which is: I have no plans on using OCaml any time soon, believe the comments that say you want a language with pattern matching to do this in, and would love to tinker more with both Rust and symbolic evaluation.)

Re:Open-sourcing Facebook Infer: Identify bugs before you ship by pcwalton on Thursday June 11, 2015 @01:33PM (#9701086)
Sure, I think it'd be a fun project to try! We use Rust for compiler construction, obviously, and it works great for us. Bear in mind, though, that Rust is manually memory managed, and there is significant cognitive overhead of having a compiler that checks that you're doing the manual memory management properly as opposed to just using a GC.

I think if you want a really fast symbolic evaluation checker—say, the kind that you're going to run on $BIG_COMPANY's codebase on every checkin—Rust would be a really good fit, because you get pattern matching and excellent performance. Other than OCaml and (maybe?) F#, I don't know of a language that has as sophisticated a pattern matcher as Rust does, which helps a lot with this stuff. But, if you're building a one-off tool, a more dynamic language with a GC might be more convenient.

Re:Open-sourcing Facebook Infer: Identify bugs before you ship by tptacek on Thursday June 11, 2015 @01:36PM (#9701115)
Would it be likely that I could get around that problem just by using arena allocation? Do you think the allocation patterns of a symbolic checker fit that sort of "just allocate everything and forget about it, then free it all at once" pattern? Does Rust make it easy to punt that way?
Re:Open-sourcing Facebook Infer: Identify bugs before you ship by pcwalton on Thursday June 11, 2015 @01:45PM (#9701166)
Yup, you can use arenas for that, and in fact that is likely what I'd do. There's an arena crate on crates.io. https://crates.io/crates/typed-arena/1.0.1
Re:Open-sourcing Facebook Infer: Identify bugs before you ship by MichaelGG on Thursday June 11, 2015 @08:45PM (#9703361)
F# has Active Patterns, which really rock. They let you define custom patterns or destructuring functions, then use them like normal patterns.

https://msdn.microsoft.com/en-us/library/dd233248.aspx

Re:Open-sourcing Facebook Infer: Identify bugs before you ship by ignoramous on Thursday June 11, 2015 @03:56PM (#9701938)
Okay, an off-topic question: Can you pls briefly explain Golang-emulators-fit? Links to projects/blogs would help too. Thx.