5 ms·
Given their investment in Rust, I really don't get what's the point of this.
by knocte 10y ago
Given their investment in Rust, I really don't get what's the point of this.
- yedpodtrzitko 10y agoaddons.mozilla.org is powered by Django, for example.
- metajack 10y agoRust and Python are not mutually exclusive languages. Servo uses quite a lot of python in the build tooling and server infrastructure stuff.
- steveklabnik 10y agoPython also drives rustc's new build system, driving Cargo.
- nickpsecurity 10y agoI'm curious why that was. Convenience for getting the job done? Already installed on a lot of boxes? Something else?
- Retra 10y agoI would suspect it's because it has easy to use and well-developed web libraries.
- nickpsecurity 10y agoThat's my guess, too. I thought Rust might handle a build system by now with all the libraries pouring out. So, I figured I'd ask anyway in case any interesting answers showed up.
- eddyb 10y agoIt is a build system written in Rust: https://github.com/rust-lang/rust/tree/master/src/bootstrap https://github.com/rust-lang/rust/tree/master/src/bootstrap There is only one Python file: https://github.com/rust-lang/rust/blob/master/src/bootstrap/bootstrap.py https://github.com/rust-lang/rust/blob/master/src/bootstrap/... Its job is to download the previous Rust release (beta for master, stable for beta and previous stable for current stable), including Cargo, build the build system with Cargo and start it. The build system then builds native dependencies (LLVM) and runs Cargo several times for different components.
- nickpsecurity 10y agoWell, there we go. The other comments made me think it was mostly Python or something.
- dbaupp 10y agoMost of the build process is in Rust[0], but something needs to kick it off: instead of assuming/requiring that install the correct version of Rust (for the right platform) themselves and then invoke cargo in the right place to get the build manager, there's a relatively short Python script[1] that does all of that automatically. Python works well because it's everywhere, and it's already a dependency of the build process (LLVM needs it). [0]: https://github.com/rust-lang/rust/tree/b30eff7ba72a78e31acd61a2b6931919a0ad62e8/src/bootstrap https://github.com/rust-lang/rust/tree/b30eff7ba72a78e31acd6... [1]: https://github.com/rust-lang/rust/blob/b30eff7ba72a78e31acd61a2b6931919a0ad62e8/src/bootstrap/bootstrap.py https://github.com/rust-lang/rust/blob/b30eff7ba72a78e31acd6...
- nickpsecurity 10y ago"Python works well because it's everywhere, and it's already a dependency of the build process (LLVM needs it)." There we go. Makes a ton of sense and was one of my options.
- Manishearth 10y agoOur build system (cargo) needs rust to compile, but rust itself needs rust to compile, so something has to give _somewhere_ :)
- apendleton 10y agoRust and Python aren't playing in the same space, at all. One is a low-level systems programming language and the other is a high-level interpreted one. PyPy's core technology is potentially also useful for powering JIT interpreters for other interpreted languages, but again: doesn't compete with Rust. If anything, they're complementary, as Rust can serve as an alternative to C for writing performance-sensitive Python modules. Anyhow, as they say in the release, the track through which PyPy was funded is for technologies Mozilla already uses. They're big Python users on the web services side (e.g., the Mozilla add-ons site is a Django app if I recall correctly), so this is an investment in improving the performance of their existing apps.
- knocte 10y agoEven if Python is higher level language, most of python uses today could be replaced with Rust. There are very few scenarios in which a higher level language is needed (and in those scenarios, you don't need the speed and improvements of PyPy, with normal slow Python it's enough).
- ergo14 10y agoMozilla uses Pyramid, Django and Flask applications as far as I can tell.
- cookiecaper 10y agoRust competes at a different level than Python, right? Rust is a system-level language analogous to C. It's not meant to displace something like Python.
- rch 10y agoMaybe PyPy.js could emit WebAssembly in the not-too-distant future?
- ch4s3 10y agoI basically never touch python, and could get behind this. edit: What I mean is that even as someone who no longer uses Python or PyPy, I see the value in a project like PyPy.js emitting web assembly. It seem like a great goal for lang.js projects in general, hopefully Opal, and Clojurescript will do the same.
- kim0 10y agoMaybe you want to check out https://github.com/pybee/batavia https://github.com/pybee/batavia
- rch 10y ago> Batavia is an implementation of the Python virtual machine, written in Javascript. Interesting, but I'm not sure that's the ideal approach. It looks like WebAssembly is going to be a much easier lift: > Hopefully we can get initial support almost-for-free by just asking emscripten to spit out the new format. https://github.com/pypyjs/pypyjs/issues/145#issuecomment-113004068 https://github.com/pypyjs/pypyjs/issues/145#issuecomment-113...
- allendoerfer 10y agohttps://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- denfromufa 10y agoPyPy.js was developed by Mozilla employee
- pcwalton 10y agoDifferent languages are good for different things. Mozilla has and will continue to use Python for many projects.