Hacker News new | past | comments | ask | show | jobs | submit login
Servo: The Countdown Continues (s-osg.org)
140 points by Manishearth on June 2, 2015 | hide | past | favorite | 50 comments



Servo becoming part of a modern browser gives me a serious boner. Chrome and Firefox are both significantly working on trying to make sane multi-threaded models, and they often either end up with insane ones, or end up with sane ones that don't perform usefully any better than having left it single threaded in the first place.

I just wish that Chrome would fix performance on OSX. I have no issues on Windows or Android (of course), but OSX it just seems way slower than it should be on a lot of normal tasks.

I mean, literally, the only reason I use Chrome is because of synced tabs, history, and bookmarks built into the browser and having access to that on Android too, purely all the integration into the phone features (I have a Nexus 5).

To hijack my own reply here, where Microsoft is going with Windows 10, if they really hit off, I'd consider a future Lumia model to replace my Nexus 5, because Project Spartan seems to be catching MSIE up to what Firefox+FirefoxOS and Chrome+Android do now.

Edit: Not sure why I'm getting downvoted here. I'm pro-Servo.


If you're an Android user, you're missing out on Firefox Mobile.

I'm using Firefox on my Android, it's quite good and it's the only mobile browser I know that does extensions, so you can have AdBlock Plus or uBlock with it. If you're using Firefox on your desktop as well, it will sync your history and bookmarks:

https://www.mozilla.org/en-US/firefox/android/

Android is the only mobile OS that Firefox supports and this is because Firefox has been impossible to distribute on both iOS and Windows Phone, due to either marketplace or technical restrictions. Out of the popular mobile OSes, Android has been the only one that isn't defective by design. And unfortunately I'm not seeing Microsoft follow suit, as they are going in the opposite direction and sorry to be grim, but I view project spartan to be just a marketing stunt.


I'm aware Firefox can do tab, bookmark, and history sync.

However, Firefox on Android cannot be deeply integrated like Chrome is on my Nexus 5, and last time I tried Firefox Android it had a weird UI and didn't look like a native Android app either.

Also, the lack of Chromecast support in Firefox is also making it difficult to use on the desktop.


Deeply integrated how? Am I missing things by using FF instead of Chrome? (not a Nexus device)

EDIT: I see that Chrome is "deeply integrated" with my phone in the sense that it can't be uninstalled, but I'm sure that's not what you mean...


Tabs now appear in the recent apps list (which can be shut off and turn back into normal tabs in Chrome), and it seems to be tied heavily into Google Now (though I'm not sure which parts are which).

Chrome on a Nexus device is a lot like Firefox on a FirefoxOS device, if that makes any sense.


I also have a Nexus 6 device and personally I don't find the integration with the recent apps list useful. Unless we are talking about apps, otherwise for browsing I much prefer to have those tabs grouped together in one app. Plus Chrome's "normal" tabs where more annoying to use than Firefox (continuing the tradition from the desktop).

The thing that bothers me about Firefox is the broken behavior of "Add to Home Screen", which doesn't listen to the website's Manifest.json. There are issues raised in Firefox's issue tracker for this and this will get fixed, but currently if you want to pretend that a website is an application, then Chrome is better.

I'm doing that for a small utility I've built for myself: https://parolamea.org/manifest.json ... funny thing is that even though Chrome is sexier to use for this use-case, I'm still using that website in Firefox because Chrome doesn't offer to save passwords for "ajax logins", a known limitation.

But either way, I end up using both. I'm using Chrome for apps (e.g. I prefer to access Facebook and Twitter through Chrome, as it's better for privacy and I don't want notifications and all that crap). I'm using Firefox for browsing, as the default.

Here are some reasons for why I like it ... it has the Awesome Bar (e.g. much better search capabilities in your own history), it has the Reader View + Reading List (i.e. I don't need Pocket or Readability, although if you like Pocket, then it has the best integration available), it has AdBlock Plus, uBlock and an alpha but functional version of NoScript and really, many websites are simply unusable on mobile without an ad blocker.

On Chromecast support, I don't know about the desktop, but if it's not supported on Firefox desktop already, then it will probably be supported pretty soon. Other mobile features have leaked into the desktop version as well, for example Reader View.


Ah, none of the tab stuff or app-saving from Chrome are features I would use. And I believe my phone just supports Chromecast screen sharing at the OS level (alongside DLNA and Miracast). Is that an addition from Sony that isn't in stock Android?


Android has Chromecast support since version 34. For what is worth I like Firefox's UI more, as it is more usable.


I also use Chromecast support from my laptop, so Chromecast support in Firefox on the desktop is also required.


Fiefdoms make money for the lord of the manor


I think it was the phrase "serious boner"


Is it because all boners are very serious, thus making the phrase pointlessly redundant?


> I mean, literally, the only reason I use Chrome is because of synced tabs, history, and bookmarks built into the browser and having access to that on Android too

Incidentally, Firefox/Firefox for Android has all of that. Also, with end to end encryption.


While I user Firefox on desktop and on Android -- it doesn't actually have synced tabs, does it? (And I'm glad, I have ~100 tabs open in 2-3 tab groups on desktop -- I don't really need/want them all on mobile).

But the rest of the sync (including history) is very useful.


Chrome in Linux doesn't work too well, either. It has some memory leaks. I just switched to Firefox. Tab sync doesn't work too well, either. I've found that if I have more than 10 tabs or so opened in my phone, it won't sync all of them; it will only sync the ones it pleases. You would have to visit them one by one as to have them synced. Not to say that Chrome uses an insane amount of memory, almost two times the amount Firefox does (at least here in ArchLinux).


wow. the tabsync reason is hard to swalow for me.

i use delicious (it is still around) with the android app. you just 'share' a url. work with any browser you want to use, on any platform (firefox,IE,Cr,windows,linux,iOS,Android). it also incentives you to organize your bookmarks. it is not as convenient on speed, but it surely makes up for it by just adding an account you care nothing for on every device (instead of one that can access your emails/contacts/etc). And i don't want to have my living room tv browser in sync while i read on the bathroom.


Tab sync is not about having the stuff you see on one browser show up on the other, but about being able to bring up the tabs from another device.

Delicious to my knowledge does not fix that because (unless something has changed) it depends on you actively bookmarking something.

Typical use case: I have to run out of the office, and suddenly remember I need the address to that place I was looking at. Tap the tab symbol, and find the tab from my office desktop, and I have it without having to search.

I agree with you it'd be nice to add an account that is separate from all my other stuff, but tab syncing is one of those features that you'll likely not use much, but when you happen to want it, it can be immensely useful.


I'm another person who doesn't want my tabs to sync. Partly because I have too many of them.


I don't want my tabs to directly sync, but I do want the option to open the tabs on my phone that I have open on my desktop. Also, it is really convenient to have auto completion on urls that I frequently open on either device.


> but OSX it just seems way slower than it should be on a lot of normal tasks.

Well, given that Apple proved that it does no longer any shit about OSX by having the audacity of releasing their Yosemite train wreck to the end user, I would not expect any 3rd party vendor to give a shit either.


It's worth mentioning that getting Servo to build and run on OS X is very straight forward and worked for me the first time.

Here is the github repo: https://github.com/servo/servo

Here is this HackerNews thread rendered in Servo: http://i.imgur.com/6yvrr3V.png


You should also try https://github.com/glennw/servo-shell (it's a webpage, and you don't need to rebuild servo or anything though building it in release mode is preferred), which gives you a browser experience.


> servo = !!dlsym(NULL, "servo_test");

I just cry when I see something like this.


May I ask why? It doesn't look quite terrible to me (as much as I can judge out of context).


It doesn't express the real intention of the code.

Uses C implicit conversions between pointers, integral and boolean operators for something that would be clearly better expressed with an if ().

This type of code wouldn't survive the type of code reviews I used to do.


except it is actually fairly common and once you have seen it once it is really clear.


Fairly common by developers that don't have to maintain code from others.

Clarity trumps clever tricks.

EDIT: To make it clear, if I am reviewing someone's C code, I'll be applying MISRA and Code Complete style rules.


I first saw this trick in the qemu source code.


So what?! How is qemu an example of C code quality?


I didn't say it was quality, but it is someone else's.


But "expressing the real intention" isn't something you can objectively quantify.

It all depends on what people read stuff like `!!` as. In a project where that's used often (I assume in CEF there are a whole lot more lines like that one near it), the intention is clear, because people will be reading `!!` as "Coerce to bool". Some won't, agreed. But in the context of a project where it's used often, this isn't as much of a problem.

For example, `fork()` when used is not clear at all about what's going on to someone not familiar with it, but people still use it for stuff, and people reading it know what the intention was if they've had some experience with the language/library.

After lots of use things like `!!` get a concrete intention ascribed to them.

But yes, it can be more explicit so it perhaps should have been.


I agree, is:

    servo = dlsym(NULL, "servo_test") != NULL;
... really too onerous?


Do you use ++? I don't see !! as any weirder.


++ is an operator, !! isn't one.

Also not all uses of ++ are accepted, specially the typical memcpy() interview question, which requires to know operator precedence rules between * and ++.


!! gets weirdness points for not being a builtin operator, and ++ gets weirdness points for the subtleties of how it acts on certain things, and for being different in prefix and postfix.

I assume that's a yes to allowing ++ at all. In my opinion ++ generally does a good job of conveying intent, and !! does a very good job of conveying intent.


++ and -- are allowed as:

- single line statements always in postfix form

- for loops

- exception for the prefix form in for loops with C++ iterators due to performance reasons

Clever C code has its place in hackatons, not in code that needs to survive a few project generations.


> - exception for the prefix form in for loops with C++ iterators due to performance reasons

That is a reasonable thing to allow, but I personally find that particular use much more confusing and finicky than using !! to coerce to boolean.


It is just an inefficient way of casting something to a boolean, I suppose. Perhaps the compiler can optimize the double negation away, but that is nowhere in any spec, so don't count on it.


Frankly if your compiler can't optimize this it's not worth using.


The budget for doing optimizations is always limited and while I don't know how common this technique is in C, optimizing for poorly written code is in general a losing battle that waists the optimization budget.


This thread is the first time I hear people say that the bangbang boolean cast "operator" is poor coding. It's very idiomatic in my experience and it doesn't give me pause at all.

I mean, if it's forbidden by your particular coding style then fair enough but it's a bit harsh to cry at this bit of code because it makes use of it.

For what it's worth I made a quick grep for ' !!' in the linux kernel and found 2439 matches. I think it's more a matter of subjective taste than a sign of poor coding.

And I maintain that any C compiler worth its salt will handle '!!' just fine, it's a really simple optimization (and even if you consider double-negations poor style in your code it'll crop up quite often while inlining functions or expanding macros for instance).


The double exclamation is fairly common in C, and really, poorly written code probably has the greatest opportunity for optimization.


Ufff I thought I am weird because I had same thoughts.


I'm just hoping someone will create a new Electron (used in Atom), but based on Servo instead of Chromium.


I wonder if Electron will evolve to permit different engines? blink, Edge?, servo? Whilst this offers options, my concern would be over complicating Electron with a plethora of abstractions some of which maybe leaky as engines innovate and diverge.


Wouldn't Microsoft have interest in doing that, though, for Visual Studio Code?


Perhaps. Or perhaps they're satisfied that the Chromium engine is sufficient. As I understand it the goal of Visual Studio Code is to be cross platform and bring .NET to a wider audience. The engine is immaterial? WE shall see though. Perhaps Full Fat Windows only Visual Studio will borrow from Visual Studio Code and require a different engine, to play nice with Direct X, or other Windows proprietary tech?


It's very tightly integrated with V8. The UI/non JS part of it can be easily replaced with what ever,


How will developer tools work with servo? A plugin?


Servo currently has a (partial) implementation of the Firefox developer tools protocol. This means that you can use Firefox devtools to inspect a servo instance in the same way that you would a mobile device.

In the long term if and when Servo is incorporated into actual products this story will likely change somewhat.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: