News for hackers. Stuff that matters.
Re:How Stylo Brought Rust and Servo to Firefox by thomastjeffery on Tuesday November 28, 2017 @03:01PM (#15800867)
> Stylo was the culmination of a near-decade of R&D, a multiple-moonshot effort to build a better browser by building a better language.

This is the most impressive, and useful aspect of all the recent work in Firefox. Rust is an amazing language. It really brings something new to the table with its borrow checker.

The fact that rust was created as part of a greater effort to work on a web browser is amazing.

Re:How Stylo Brought Rust and Servo to Firefox by stingraycharles on Tuesday November 28, 2017 @03:25PM (#15801129)
What I wonder, and I do not mean this in negative way, is whether this would have happened in a more commercially oriented organisation. Mozilla remains a foundation, and I consider Rust a fruit of their labour in itself.

To put it another way, I find it hard to justify developing Rust just for a web browser. But if you consider it from the perspective of a foundation developing tools for the developer community as a whole, it makes much more sense.

Re:How Stylo Brought Rust and Servo to Firefox by thomastjeffery on Tuesday November 28, 2017 @04:00PM (#15801555)
It's certainly true that corporations do put a lot of work into languages and runtimes. Apple created LLVM and clang, Microsoft created .NET and CLR with C#, F#, VB.NET, etc.

These projects were valuable to Apple and Microsoft for a variety of reasons:

* promoting their IDE: XCode builds faster, and has better error messages. You can use any .NET language with Visual Studio in the same project.

* promoting their platform: Objective-C and Cocoa let you create fast GUI apps in a standard way, and we don't need GCC anymore. .NET provides a useful feature-complete standard library over a variety of languages.

To contrast, Rust was made with the intention of simply making a better systems language. Rust doesn't have a standard library or environment tied to a specific OS or proprietary dependencies. Rust itself doesn't promote Windows, OS X, ASP.NET, Cocoa, IOS, Android, etc. That is what makes it seem much less likely that rust would be created by a corporation.

Re:How Stylo Brought Rust and Servo to Firefox by AceJohnny2 on Tuesday November 28, 2017 @04:47PM (#15802136)
> Apple created LLVM and clang

To be specific, LLVM started as an academic project by Vikram Adve and Chris Lattner in 2000. Apple hired Chris Lattner in 2005 to work on LLVM for Apple. Clang, though, does appear to have been an Apple project, being introduced by Steve Naroff of Apple in 2007 as an open-source project.

Re:How Stylo Brought Rust and Servo to Firefox by thomastjeffery on Tuesday November 28, 2017 @05:08PM (#15802318)
Thanks for pointing that out.

LLVM is one of the main things Apple gets to claim credit for, yet they aren't the only ones who deserve it.

LLVM is one of the reasons rust is so great, and the world is better because of it.

Re:How Stylo Brought Rust and Servo to Firefox by bluejekyll on Tuesday November 28, 2017 @05:39PM (#15802568)
You can still give Apple credit for having sponsored a significant investment into LLVM. Without them, it might not have taken off the way it has.
Re:How Stylo Brought Rust and Servo to Firefox by distances on Tuesday November 28, 2017 @06:00PM (#15802754)
Indeed. Apple often also gets flak for taking KHTML and running with it, but footing the bill for WebKit development was a good thing for the Internet in general.
Re:How Stylo Brought Rust and Servo to Firefox by sjwright on Tuesday November 28, 2017 @09:22PM (#15803991)
Not giving Apple credit for LLVM or Webkit is akin to not giving Google credit for Android or Chrome.
Re:How Stylo Brought Rust and Servo to Firefox by jopsen on Tuesday November 28, 2017 @03:55PM (#15801504)
> I find it hard to justify developing Rust just for a web browser

"just for", our browsers are already very complex.

The browser is responsible for sandboxing and in effect taming the wild web.. and the web is not looking to become less wild :)

in the future browsers will have to prioritize CPU time between tabs seeking to mine bitcoin, crazy ad schemes, and battery power.

In terms of security, browser bugs scares me a lot more than some privilege escalation bug in the kernel. Because they can quickly be deployed widely.

Re:How Stylo Brought Rust and Servo to Firefox by bjoli on Wednesday November 29, 2017 @03:15AM (#15805421)
The browser is the only program on my computer that has a complexity that scares me.

I can look at the Linux source and figure out what is going on. There are some hard parts (synchronisation stuff and virtual memory is quite opaque on the first look) The code to handle layout and document processing in libreoffice is hairy, but I think I could manage.

A browser on the other hand. Layout and years of accumulated corner cases (handling the infinite variety of bad code out there) proper CSS rendering, multiple JITs, a shit-tonne of state and sandboxing of things that weren't meant to be sandboxed in the first place. Most, or maybe even all at the very bleeding edge of CS research.

Re:How Stylo Brought Rust and Servo to Firefox by wongarsu on Tuesday November 28, 2017 @05:50PM (#15802662)
effectively, browsers are growing up to gain most of the same functionality as modern operating systems, with all the complexity that brings.
Re:How Stylo Brought Rust and Servo to Firefox by digi_owl on Tuesday November 28, 2017 @07:27PM (#15803385)
We keep stacking those turtles, don't we.
Re:How Stylo Brought Rust and Servo to Firefox by wongarsu on Tuesday November 28, 2017 @03:42PM (#15801316)
A classic example would be Erlang, which was developed at Ericsson for use in telephone exchanges.
Re:How Stylo Brought Rust and Servo to Firefox by pohl on Wednesday November 29, 2017 @11:12AM (#15807897)
Thank you for posting this. I was just about to post a question to which this is a good answer:

When was the last time someone invented a programming language in order to make a thing, and succeeded? Was it C/Unix?

Re:How Stylo Brought Rust and Servo to Firefox by aidenn0 on Tuesday November 28, 2017 @05:13PM (#15802359)
The environment in which Erlang was developed was very different from the environment today. There were no third-party 4GLs available targeting the niche that Ericsson wanted, and there are good reasons to not want to use C in a telephone exchange.
Re:How Stylo Brought Rust and Servo to Firefox by tormeh on Wednesday November 29, 2017 @06:35PM (#15811933)
They tried using C++, I think.
Re:How Stylo Brought Rust and Servo to Firefox by pjmlp on Tuesday November 28, 2017 @04:18PM (#15801792)
The majority of programming languages used across the industry have had commercially oriented organisations behind them, including all the C family of programming languages.
Re:How Stylo Brought Rust and Servo to Firefox by lucozade on Tuesday November 28, 2017 @03:33PM (#15801210)
Is there anything specific about Rust that you don’t think a commercial organisation would do?

Obviously, commercial organisations have a long track record of developing and supporting programming languages.

Re:How Stylo Brought Rust and Servo to Firefox by drb91 on Tuesday November 28, 2017 @03:40PM (#15801291)
Well, it's been in development for at least 7 years, without any product until the url parser appeared. That's far greater of an investment with no return than I've seen at any software enterprise outside of Google X, Microsoft Research, and Intel's various funding efforts, and each of those arguably have had more projects cut off before they return than they have had projects that succeeded in generating some return.

Enterprises tend to invest in <5 year projects, I've noted, and 5 years is a hell of a long time for an extended investment.

Re:How Stylo Brought Rust and Servo to Firefox by Manishearth on Tuesday November 28, 2017 @03:47PM (#15801387)
> Well, it's been in development for at least 7 years, without any product until the url parser appeared.

This is inaccurate, the URL parser never was and still isn't in a released Firefox.

The first Rust in a released firefox was the mp4 metadata code.

It's worth noting that in those 7 years Servo advanced a lot, which meant that the Stylo project didn't have to rewrite a style system, just take an existing one and polish it. (This is still a lot of work, but not as much)

Re:How Stylo Brought Rust and Servo to Firefox by drb91 on Tuesday November 28, 2017 @04:15PM (#15801744)
Well, I'm certainly happy to admit my details are incorrect, but I think my broad point still stands—they look longer term than the typical commercial offering.
Re:How Stylo Brought Rust and Servo to Firefox by kibwen on Tuesday November 28, 2017 @04:04PM (#15801604)
This is pretty much just the purview of R&D departments in general, which includes Mozilla Research. It's just a happy coincidence that, thanks to open source, software companies are relatively incentivized to share their projects with the public rather than keeping them proprietary, which is the default tack for R&D units in other industries.
Re:How Stylo Brought Rust and Servo to Firefox by drb91 on Tuesday November 28, 2017 @04:18PM (#15801788)
Well, I'm not even necessarily trying to soap box here about open source or free software per se—I do think commercial/proprietary research has value to society as a whole, albeit less value. For instance, take Big Table—enormously influential and, I think, beneficial to society in spite of being largely closed off to the public. However, rust is way better for everyone, and I find it shocking it came from such a relatively small organization.
Re:How Stylo Brought Rust and Servo to Firefox by mmstick on Wednesday November 29, 2017 @01:53AM (#15805125)
It doesn't really matter that Mozilla's a small organization. All they had to do was provide strong leadership and management expertise, and entice the open source community to voluntarily join and advance the project accordingly. Which thereby lead to not just Mozilla, but a few other organizations joining in with developers of their own to collaborate together amongst each other, including an army of rogue volunteers that aren't backed by any organizations. That's just not something you'll ever see from a corporation that has to answer to greedy shareholders that only care about ROI figures, especially short-term ROI figures.
Re:How Stylo Brought Rust and Servo to Firefox by stingraycharles on Tuesday November 28, 2017 @03:43PM (#15801335)
In addition to this, Mozilla is hardly the size as Microsoft or Google. A more commercially focused version of Mozilla would probably have dedicated their resources elsewhere.
Re:How Stylo Brought Rust and Servo to Firefox by wyager on Tuesday November 28, 2017 @05:02PM (#15802272)
> Is there anything specific about Rust that you don’t think a commercial organisation would do?

A good job. Most commercial PL efforts kind of suck. There are a small number of exceptions, and Rust is one of them.

Re:How Stylo Brought Rust and Servo to Firefox by qznc on Wednesday November 29, 2017 @02:52AM (#15805325)
Java, C#, Ada, JavaScript, etc are more successful that Rust. The comparison is not good though because Rust is younger.

You could argue survivorship bias but that applies to Rust as well.

Re:How Stylo Brought Rust and Servo to Firefox by icebraining on Wednesday November 29, 2017 @03:40AM (#15805501)
They're not just older. JavaScript has a very special position, and both C# and Java had a tremendous marketing push.
Re:How Stylo Brought Rust and Servo to Firefox by iopq on Wednesday November 29, 2017 @07:28AM (#15806261)
They're more successful, but programming in Java and JavaScript is pretty painful (albeit in different ways).
Re:How Stylo Brought Rust and Servo to Firefox by rafialhamd on Tuesday December 05, 2017 @04:33AM (#15850776)
Actually, Java has made programming easier compared to C++ with 'elegant Syntax' (similar to C++) and 'sensible semantics' (similar to Smalltalk) - especially 'without pointers'!

And probably, Kotlin has made it even simpler than Java.

So, it's an evolving process.

On the other hand, JavaScript - though still painful - has no alternatives... hence, JavaScript is still OK - without any close competitor!

Re:How Stylo Brought Rust and Servo to Firefox by kochthesecond on Tuesday November 28, 2017 @03:52PM (#15801462)
Well, we could look at Go and Erlang.
Re:How Stylo Brought Rust and Servo to Firefox by overhang on Tuesday November 28, 2017 @07:27PM (#15803388)
Imagine if some company were to make a completely new language just for an IDE.
Re:How Stylo Brought Rust and Servo to Firefox by rafialhamd on Tuesday December 05, 2017 @05:58AM (#15851040)
Let's imagine some companies (like Sun Microsystems) making wonderful language (like Java), and provide NO IDEs. We really had tough time during the initial years of Java - just with Borland JBuilder and some other primitive IDEs - until we could get wonderful IDEs like Eclipse followed by IntelliJ-IDEA.

It's widely understood that you're referring to JetBrains' Kotlin. In such case, really industry-famous-IDE support for a 'new language', is some sort of a gift!

Besides, why would a company want to invest in R&D to create a language and just give it for FREE, without any tangible business benefits.

Remember, Sun did so... giving away Java for free. Eventually - under stress - they themselves were sold (and bought by Oracle).

Re:How Stylo Brought Rust and Servo to Firefox by signal11 on Tuesday November 28, 2017 @07:58PM (#15803551)
Is that a reference to JetBrains and Kotlin? :-)
Re:How Stylo Brought Rust and Servo to Firefox by sjwright on Tuesday November 28, 2017 @09:24PM (#15804000)
Or emacs. :-)
Re:How Stylo Brought Rust and Servo to Firefox by BuckRogers on Wednesday November 29, 2017 @01:03PM (#15809168)
Kotlin and C# are two examples that fit the bill. If that's what you're looking for.
Re:How Stylo Brought Rust and Servo to Firefox by mr_toad on Wednesday November 29, 2017 @12:49AM (#15804888)
Languages (parsers and interpreters) aren't that hard to design. People do it for fun (e.g. Brainfuck or Whitespace). Good compilers are much harder.
Re:How Stylo Brought Rust and Servo to Firefox by kzrdude on Wednesday November 29, 2017 @02:01AM (#15805154)
Rusts borrow checker, ownership and whole model is quite complicated actually. Remember we are going for a complete, sound model without holes.

There have been soundness bugs during development and I think we have some really amazing people behind the core language that have been able to refine and adapt rust as it grows.

Re:How Stylo Brought Rust and Servo to Firefox by ticklemyelmo on Tuesday November 28, 2017 @03:11PM (#15800977)
Having trouble calculating the motion of bodies due to gravity, better invent calculus.