6 ms·
All bullet points under "Why Rust?" actually suggest that it would be much better to gradually rewrite all critical parts of the project in ATS, thanks to it be
by ghostwriter 6y ago
All bullet points under "Why Rust?" actually suggest that it would be much better to gradually rewrite all critical parts of the project in ATS, thanks to it being a frontend to GCC. Firstly, it's a much more powerful frontend than the current Rust. Secondly, I'd expect it to be less disruptive than a complete compiler switch.
- jhardy54 6y ago> ATS For anyone else who was unfamiliar: https://en.wikipedia.org/wiki/ATS_(programming_language) https://en.wikipedia.org/wiki/ATS_(programming_language)
- luizfelberti 6y agoIf a rewrite is warranted, and despite Rust zealotry being annoying at times I think it has fair points, I think going for something even more hipster than Rust would be a mistake. I wouldn't even call Rust "hipster" anymore. It's already been embraced and rolled out to production by big companies working on hard techinical problems (Cloudflare, AWS, Discord), as well as the crypto community. I think the reasons from steering away from hipster languages for these critical projects are roughly the same ones we use to justify not using hipster crypto for critical, real-world applications
- KingOfCoders 6y agoI also would call Rust the new normal for fast secure code.
- johnisgood 6y agoI still do not understand. Ada is not exactly new. Have you ever seriously considered Ada/SPARK? Might want to give https://www.adacore.com/uploads/books/pdf/AdaCore-Tech-Cyber-Security-web.pdf https://www.adacore.com/uploads/books/pdf/AdaCore-Tech-Cyber... a read, or even https://blog.adacore.com/ https://blog.adacore.com/, or my previous comments on Ada. I called Ada the programming language for writing "fast secure code" for quite a long time now, a "better C" in that regard.
- adamnemecek 6y agoAda just doesn't have the steam behind it.
- johnisgood 6y agoIt certainly lacks the hype, and judging by the comments on here, many people still have loads and loads of misconceptions of the language, negative ones, unlike say Rust's "unsafe code does not affect the rest of the program", for example, which I would call a positive misconception. And of course thus, it also lacks libraries. This is really my biggest problem with it. :/
- 59nadir 6y agoRust isn't nearly popular enough to be referred to as "the new normal" in any field or context. One would have to be in a very closed off bubble to think it is. If they haven't made some big strides with having it certified for use there are entire industries where you can't even use it and get certification, if I understand correctly.
- bananaface 6y agoI wouldn't really call Discord a hard problem. It's web chat.
- Volt 6y agoYou might have missed the "technical" qualifier. Twitter isn't an especially hard problem either.
- bananaface 6y agoI didn't miss the qualifier. Discord is a chat client with very restricted servers. It's really not that hard as technical problems go.
- luizfelberti 6y agoPlease, do tell us what kind of exotic problems you work on, that you think massive scale real-time communications is not a hard technical problem We're eager to know!
- bananaface 6y agoNo, that's stupid. I couldn't build Discord. My point is that as relative problems go, I don't see Discord as a big one. I might be wrong but as far as I can tell it's a solved problem and has been for over a decade. I'd wager you could build it with an incompetent team that had domain expertise. AWS is orders of magnitude more complicated than Discord. Frankly, so is World of Warcraft. What does Discord do that wasn't solved in 2005?
- dodobirdlord 6y ago> AWS is orders of magnitude more complicated than Discord. Frankly, so is World of Warcraft. AWS maybe, insomuch as "orders of magnitude" can mean as little as "100x". But still, unconvinced. There's something like 200 AWS services, and Discord on the whole is certainly more than twice as complex as the average AWS service. World of Warcraft being >100x more complex than Discord doesn't track. > What does Discord do that wasn't solved in 2005? Perhaps you are unaware that Discord has (pretty high quality!) voicechat and livestreaming? Certainly much better than anything that existed in 2005.
- jcranmer 6y agoFrom a cursory search, it looks like ATS is implemented as a "compile to C code" language. This kind of implementation is actually quite concerning, because it means you're punting through a language which is notorious for its heavy reliance on undefined behavior, and there is no way to opt out of undefined behavior in some cases. Also, from what I can tell of its mailing list, ATS is a pretty dead project: https://sourceforge.net/p/ats-lang/mailman/ats-lang-users/ https://sourceforge.net/p/ats-lang/mailman/ats-lang-users/ shows only announcements post-2015.
- vmchale 6y agoIt's a google group! Not dead at all, though it is... ATS :)
- kergonath 6y agoIt’s not more concerning than a language that is compiled to assembler. It all depends on the quality of the compiler/transcoder.
- ghostwriter 6y ago> This kind of implementation is actually quite concerning, because it means you're punting through a language which is notorious for its heavy reliance on undefined behavior, and there is no way to opt out of undefined behavior in some cases. if it were a new project I'd agree, but if there's an existing C codebase, it already contains all these UBs and the goal of the rewrite is to grow a formally-verified critical core functionality in ATS that would still inline the rest of the project intact. This way the formally verified part of the project can grow naturally through small iterative steps without major disruptive changes to the tooling and supportive infrastructure. People who are familiar with C can acquire basic ATS patterns pretty quickly (within a month or so), and the same is applicable to those who are familiar with ML-family languages.
- DSMan195276 6y ago> This kind of implementation is actually quite concerning, because it means you're punting through a language which is notorious for its heavy reliance on undefined behavior, and there is no way to opt out of undefined behavior in some cases. I think it's worth pointing out that you can't always get away from those undefined behavior situations even if you skip C all together. Rust, for instance, has some internal/implementation details I've run across that are just C undefined behavior details leaking out of the LLVM IR instructions they use to implement the language, since those instructions have the same undefined behavior semantics as the corresponding C code they're used for.
- deleted 6y ago[deleted]
- twic 6y agoIs ATS really suited to being an industrial language? How do its standard library, build tools, and library ecosystem compare to Rust's? Admittedly, if you're switching from C, you start with a pretty poor story about all that. But at least that story is widely and thoroughly understood. ATS has an optional garbage collector. It seems the standard library has two implementations of each container type, one which uses GC, and one which uses linear types, so does not need GC, but is more demanding to use. That is pretty cool! What is the situation with other libraries? Is there a convention of assuming GC can be used, or that it can't, or of supporting both?
- ghostwriter 6y ago> How do its standard library, build tools, and library ecosystem compare to Rust's? as ATS is a frontend to GCC, it means that the standard library can be any battle-tested C standard library. On top of that there can be a formally-verified interface that calls underlying C API. Here's an example - https://bluishcoder.co.nz/2012/08/30/safer-handling-of-c-memory-in-ats.html https://bluishcoder.co.nz/2012/08/30/safer-handling-of-c-mem... There's also a safe Prelude and common data structures, implemented in ATS: http://www.ats-lang.org/Libraries.html http://www.ats-lang.org/Libraries.html > Is there a convention of assuming GC can be used, or that it can't, or of supporting both? afaik there's no officially defined convention, but you can have a look how this switch may look like in practice in this video - https://youtu.be/Xkg_EmERYRE?t=1742 https://youtu.be/Xkg_EmERYRE?t=1742
- scythe 6y agoBack when it was on the PL shootout, ATS was consistently in the top five for performance. However, it was also consistently the worst in program size, comparable to Ada (but even more loquacious). Between that and the lack of existing uptake it would probably be difficult for QEMU to adopt.
- deleted 6y ago[deleted]
- stefanha 6y agoArticle author here. Thanks for sharing ATS. I will take a look at it.
- ghostwriter 6y agoHey, no worries! Personally I think this playlist provides a nice set of real-world examples implemented in ATS: https://www.youtube.com/watch?v=dsILVOqYCU0&list=PL6BIXG1a4elukfR7-CDrlCwICk-7K7XI-&index=13&t=0s https://www.youtube.com/watch?v=dsILVOqYCU0&list=PL6BIXG1a4e... And this series of blogposts is a pure gold: https://bluishcoder.co.nz/tags/ats/ https://bluishcoder.co.nz/tags/ats/ And here's the official language introductory resources: Language Tutorial - http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/INT2PROGINATS-BOOK-onechunk.html http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/... Language Features Overview - http://ats-lang.sourceforge.net/DOCUMENT/ATS2TUTORIAL/HTML/ATS2TUTORIAL-BOOK-onechunk.html http://ats-lang.sourceforge.net/DOCUMENT/ATS2TUTORIAL/HTML/A...