Mozilla Nederland LogoDe Nederlandse

Abonneren op feed Mozilla planet
Planet Mozilla -
Bijgewerkt: 14 uur 53 min geleden

David Lawrence: Happy BMO Push Day!

wo, 18/11/2015 - 05:04

the following changes have been pushed to

  • [1221998] Make sure localconfig is generated deterministically
  • [1219767] Explicitly load extensions at Bugzilla->login
  • [1221423] unable to impersonate users when 2fa is enabled
  • [1181637] Update Req Opening Process (Cost Center list on 2015-07-08)
  • [1223495] String handling bug in form.creative on BMO
  • [1223669] don’t scroll to the top of the page when clicking on the resolution buttons
  • [1209625] MozReview API Keys should use a more specific error message
  • [1223590] Unable to login to bugzilla via login to github (fresh bugzilla account)
  • [1224620] Update VP list in Recruiting Product
  • [1187429] Remove the WebOps Request Form
  • [1225249] module subtitles should be the same size as other text on the page (13px)

discuss these changes on

Categorieën: Mozilla-nl planet

Chris H-C: Single-API Firefox Telemetry Plots: telemetry-wrapper.js

wo, 18/11/2015 - 01:14

Say you’ve read my earlier post on Firefox Telemetry and want to make your own plots like does. Well, like almost everything Mozilla does, that website is open source, so we can just copy what it does… except it’s a little convoluted. It needs to support a range of requirements and configurations, after all.

But your needs are just yours, so wouldn’t it be nice if there were something a little more direct?

Enter telemetry-wrapper.js. Simply include it and its dependencies in your HTML and then call it like so:

TelemetryWrapper.go(params, element);

Then ‘element’ will suddenly (after a few seconds to collate and render the data) contain one or more plots corresponding to ‘params’.

Want to see GC_MS compared by e10sEnabled setting on Nightly 44?

TelemetryWrapper.go({   channel: "nightly",   version: "44",   metric: "GC_MS",   compare: "e10sEnabled", }, document.body);

(e10s is looking like a win on this metric, though part of the sample population self-selected so we can’t be sure. Await blog posts from other quarters on A/B tests we’re conducting.)

How about the top three plugins activated in Firefox 42?

TelemetryWrapper.go({ channel: "release", version: "42", metric: "PLUGIN_ACTIVATION_COUNT", keyLimit: 3, }, document.body);

(no one is surprised that the top one is Flash and that most people only use it the once. But googletalk has an odd shape to it, being activated exactly twice by clients more often than any other frequency…)

The technical details are in the README. Use and reuse it to ask and answer questions about Firefox Telemetry data!


Categorieën: Mozilla-nl planet

Air Mozilla: Sam Piggott – The Dojo Story - Swift LDN - 20151116

di, 17/11/2015 - 11:53

Sam Piggott – The Dojo Story - Swift LDN - 20151116 Sam Piggot presents his experience in releasing The Dojo app on a tight schedule. This talk has been given as part of the Swift LDN...

Categorieën: Mozilla-nl planet

Air Mozilla: Radek Pietruszewski – Statically-typed Swifty APIs - Swift LDN - 2015116

di, 17/11/2015 - 11:52

Radek Pietruszewski – Statically-typed Swifty APIs - Swift LDN - 2015116 Radek described his experience and process to build a statically type API in Swift. This talk has been given as part of the Swift LDN...

Categorieën: Mozilla-nl planet

Air Mozilla: Emily Toop – WKWebView made me do it! – Swift LDN – 20151116

di, 17/11/2015 - 11:46

Emily Toop – WKWebView made me do it! – Swift LDN – 20151116 Emily Toop speaks about the hacks and tricks the Fennec iOS team went through to produce Firefox for iOS using WKWebView. This talk has been...

Categorieën: Mozilla-nl planet

Christian Heilmann: Meetup in London: why is Windows not your platform of choice

di, 17/11/2015 - 11:16

This Thursday, my colleague Mike Harsh and Keith Rowe (@krow) from Microsoft’s Windows and Devices Group invite you to the Square Pig in London for some drinks and a chat. These two program managers are leading efforts to make Windows-based machines a better place for web development.

I’ve put up a small web site with the info of the meetup and there’s also a Lanyrd page. Many thanks also to London Webstandards for banging the drum.

Whilst I am not affiliated with this group and I can’t be there as I am on my way to JSConf Asia to present, I’d love to see a lot of people go and talk to them. This is a genuine offer to improve what Windows has for web developers and I already gave them quite a bit of feedback on the matter (I am a Mac user…).

I’ve been worried about our Mac fixation as web developers for a while. We preach about supporting all platforms as “it is the web” but a lot of our tooling and best practices are very Mac/Command Line centric.

I know this is a bit last minute, but as it is with London Pubs, you have to spring a grand to get the room for the evening, so please show up and at least make sure this expense ends in the form of food and drinks inside people who Microsoft can learn from.

Categorieën: Mozilla-nl planet

Emily Dunham: Installing Rust without root

di, 17/11/2015 - 09:00
Installing Rust without root

I just got a good question from a friend on IRC: “Should I ask my university’s administration to install Rust on our shared servers?” The answer is “you don’t have to”.

Pick one of the two following sets of directions. I’d recommend using Multirust, because it automatically checks the packages it downloads and lets you switch between Rust versions trivially.


Categorieën: Mozilla-nl planet

Andy McKay: A year in cycling

di, 17/11/2015 - 09:00

When I started cycling into the office this year, I said I would probably end in November or December when it got too cold and wet.

Last night was really, cold, windy and I had so many near misses with cars, pedestrians and signs. The worst part was as usual the Second Narrows bridge which was really, really windy. A bus hit a puddle on the bridge and the wall of water went over the barricade and hit me. Coming off the bridge the ramp is covered in wet slippy composting leaves and when you are trying to avoid that unlit pedestrian, in the dark on skinny road tires with frozen fingers in driving rain....

So I'm done.

I cycled for about 9 months of the year from Deep Cove to the office for several days a week. Not too shabby. The real difference this year was training for the Fondo, which meant that in the summer when I cycled five days a week to the office, that's 170 km a week, I wasn't that tired but wanted to do more and started detouring over the Lions Gate bridge. I hit over 300km one week.

According to Strava I cycled 3,842km over 1712h this year. That's not too shabby. Next year I'm aiming for two Fondo's. But for now its time to go to the gym more and do more curling and snowboarding.

Categorieën: Mozilla-nl planet

Nick Cameron: concat_idents! and macros in ident position

di, 17/11/2015 - 03:14

In the next few blog posts I want to cover some areas for improvement for Rust macros. I'll drill down into one topic at a time. I'll propose solutions, but not in RFC-levels of detail. I hope to get lots of early feedback this way, rather than doing all the design myself and having a 'big-bang' RFC. A lot of the macro issues are inter-related, so some of the details in early areas won't get fleshed out until later.

I'm going to start with concatenating idents in macros and using macros as idents. This is a fairly small thing, but is an irritating thing for many macro authors. The problem space has been expored already, see the references section at the end for links to issues and a previous RFC.


It is often desired to merge two (or more) identifiers to make a new one in a macro. For example, a macro might take an identifier and create two functions - e.g., foo and foo_mut from foo. This is related to the issue of creating new identifiers in macros.

Currently we support this by using the concat_idents macro. There are two main problems with it - it is not very smart with hygiene, and it is not very useful since macros can't be used in ident position; so although it can synthesis idents, these can only be used as expressions. E.g., although we could access variables called foo and foo_mut given foo, we can't generate functions with these names or even call functions with those names.

The hygiene issue is that concat_idents creates a fresh ident. Essentially, the ident is only in the scope of the macro which created it. Generally, you want to inherit the hygiene context from one of the source idents.

Proposed solution
  • deprecate concat_idents! - without proper hygiene support, it is not suitable for stable use,

  • allow macros in ident position (see below for details),

  • provide libraries for manipulating hygiene contexts in procedural macros (see later blog posts),

  • provide a library of procedural macros which can concatenate identifiers with various different kinds of hygiene results (see below for details).

Macros in ident position

The concept is pretty simple - anywhere we accept an identifier in current Rust, we would accept a macro. This includes (but is not limited to): variable declarations, paths, field expressions, method and function calls, item names (functions, structs, etc.), field names, type names, type variables (declaration and use), and so forth. I propose that this facility is only available for 'new' macros, partly for technical reasons (see below, hygiene and types) and partly as a carrot to move people to the new macro system.

Examples, if foo is a macro:!() (field access),!(bar)() (method call), fn foo!(baz)(x: T) { ... } (function declaration).

If a macro occurs in expression or pattern position, then there is the question of whether it should be parsed as a macro in expression position or a macro in ident position as a path which is an expression (similarly with patterns). I think we can always choose the least specific option (i.e., expression rather than ident position) because we parse the macro body after expansion, so if it is an ident, the parser will wrap it to make an expression (if we assumed it was an ident, but it was a non-ident expression, we would be stuck). This only works for procedural macros if their output is tokens rather than AST (see later blog posts).

I believe parsing should not be too affected - after parsing an ident, we simply need to check for an !. Any AST node that contains an Ident must instead contain a new enum which can either be an Ident or a macro in ident position.

I don't believe there are issues with expansion or hygiene, expansion should work the same as for macros in other position and hygiene should "just work". One might imagine that since idents are the target of the hygiene algorithm, that creating new ones with macros would be difficult. But I don't think this is the case - the macro must expand to an ident only (or further macros that expand to an ident), and the hygiene context for that ident will be due to the macro which creates it and the expansion itself (see note on sets of scopes algorithm below). We might need to adjust the hygiene context of the ident in the macro where it is created, but that is a separate issue, see below. Note that in nearly all cases, users of a macro that produce an ident will need to pass some context to the macro to make the produced ident accessible.

There are some undecided questions where macros supply idents in items, types, and other places where we don't currently support hygiene. I propose to only support macros in ident position with new macros, which should be hygienic where current macros are not. This should make things easier. Exactly how macros in ident position interact with item hygiene is an open question until we nail down exactly how item hygiene should work.

Note: sets of scopes

I have been thinking of changing our hygiene algorithm to the sets of scopes algorithm. I won't go into the details here, but I think it will help with a lot of issues. It should mostly be simpler than the mtwt algorithm, but one area where it will add complexity is with use-site scopes. These are added to the sets of scopes in order to handle recursive macros, but when a macro contributes to a new binding (I believe this will mean macros in pattern position and macros in ident position where the ident introduces a binding), then we must be careful not to add use-site scopes. This point needs more consideration, but I think it will be OK - we just have to be careful about these scopes.

Drawbacks and alternatives

I think macros in ident position look ugly - having double sets of parentheses (in function calls) or parentheses where there wouldn't normally be is confusing to read. It also makes code harder to read in general, since names are an essential way we link parts of code together. Having names be macro generated makes code harder to make sense of. It's also confusing for tools.

One alternative would be to only allow macros in ident position inside macro definitions - this should address most use cases, without making general Rust code harder to read (macros are already harder to read, so there is less of an impact). I think I favour this alternative, although I am very keen to get others' opinions on it.

Another alternative would be to come up with some new syntax especially for use in ident position - this might be less ugly and give more of a hint of the generated name. However, since we must be able to pass arguments to macros, I'm not optimistic that this is possible. Furthermore, it is more syntax and thus a bigger language which is confusing in its own way.

Library macros for concatenation

This section will be a bit hand-wavey for now, we need to decide on the fundamental APIs for allowing procedural macros to interact with the hygiene system before we can settle the details.

I expect we want a fundamental create_ident! macro (or create_ident function) which takes a string name and a syntax context (probably some token which carries it's hygiene information, more on exactly how this works later). E.g., create_ident!(foo, "bar") would create an ident with the name bar and a hygiene context taken from foo.

We would also have fresh_ident! which would create an ident from a string name with a fresh hygiene context (similar to gensym'ing) and new_ident! which does the same thing but with an empty hygiene context (i.e., it gets only the context due to the expansion of the macro where it is created). The difference between the two being that two idents created with fresh_ident! would have different contexts, but two created with empty_ident! would have the same contexts.

We then provide convenience macros which take a list of idents and/or an ident (for its hygiene context) and a list of things which produce strings, and produce a new ident with either hygiene contexts taken from the first ident, or a seperately specified object, or a fresh context. Obviously, we need to make this a bit more concrete.

Example struct Foo { a: A, b: B, } macro! def_getters { ($f: ident, $t: ident) => { fn concat_idents_with!($f, "get_", $f)(&self) -> &$t { &self.$f } fn concat_idents_with!($f, "get_", $f, "_mut")(&mut self) -> &mut $t { &mut self.$f } } } impl Foo { def_getters!(a, A); def_getters!(b, B); } fn main() { let f = Foo { ... }; println!("{}", f.create_ident!(f, "get_a")()); }

Where concat_idents_with!($f, "get_", $f, "_mut") expands to an ident with name get_$f_mut and hygiene context taken from $f. Note that in this case concat_idents_with! is used in a binding context, so the hygiene context (under a set of scopes model) should not include a use-site scope.

The use of create_ident in main is a bit silly, it's just for demonstration purposes: f.create_ident!(f, "get_a")() has exactly the same meaning as writing f.get_a().


concat_idents tracking issue

macros in ident position issue

macros in ident position RFC

Categorieën: Mozilla-nl planet

Pascal Chevrel: Follow-up to my current migration to Atom Editor

di, 17/11/2015 - 01:19

After my recent blog post announcing that I was transisionning from Sublime Text to Atom, I got a couple of nice surprises from the community that fix some of the annoyances I have with Atom or that will just make it better.

How to fix the keyboard shortcut to comment out a single line on a French keyboard

Just click on the  'Edit/Open your Keymap' menu item and put that line at the bottom:

'.platform-linux atom-text-editor': 'ctrl-:': 'editor:toggle-line-comments'

That will make the shortcut work along with the keyboard localization package installed for French (and Belgian French too). If you are on Windows, use the selector .platform-win32 (I don't know what the MacOS one is).

How to have a basic project mode like in Sublime text and be able to switch projects

Install the Project Manager package (thanks to Giorgio Maone, mozilla Add-on dev for the tip), it's roughly equivalent in functionnality to Sublime's built-in project manager and it seems good enough to me. One caveat is that switching from one project to another is a bit slow.

Support for .lang Mozilla syntax files in Atom

This is a nice gift from my colleague Francesco Lodolo, he made a syntax highlighter for the DotLang localization text format we use for and other sites for which we need fast translations for, this will be useful to me but also to Mozilla localizers that could want to use Atom to edit their translations, here is the package:

DotLang language support in Atom

And a screenshot to give you an idea of the end result.

langAtom.png  New Version of Atom 1.2 stable and 1.3beta released

This is always nice to have, I like new stuff :) Here is their blog post about it: Atom 1.2

Codeintel equivalent in Atom for PHP ?

There is a series of packages called php-integrator-* (base, autocomplete plus, tooltips, annotations...) that are supposedly providing the equivalent services as Codeintel  but after indexing a single project for an hour (bringing my computer to its knees), I couldn't make it work. On a couple of occasions I saw a nice tooltip for a method indexed, but I don't know how I triggered it and I don't get any autocompletion of classes while typing. I guess it's still pretty much alpha stuff  but hopefully that will work some day. Also I suspect it tried to index all of my dependencies in the vendor directory… I only need my own code to be indexed, not the external dependencies or a whole framework. The good news I guess is that something is developped and I might get that feature one day.

Atoum integration in Atom ?

Another nice surprise from the community, looks like Julien Bianchi, one of Atoum developers is working on a package to get Atoum in Atom following my request on Twitter:



Many many thanks to him, I am always amazed at how nice the people in the Atoum project are with their users :)

UPDATE: here is the Atoum plugin and a video demoing it

Conclusion of the day

My transition is going well and progressing quickly, today I coded exclusively in Atom, I found some small bugs and needed to get my marks in the new environment  but it's not a revolution compared to Sublime and so far I felt rather productive. Most of the problems I have really are in the realm of polishing and finding where an option is set up or what a new shortcut is, that said, the experience is satisfying and I probably didn't get today more headaches than I had when I switched from Geany to Sublime a couple of years ago. So far, so good :)


Categorieën: Mozilla-nl planet

Nick Thomas: The latest on firefox/releases/latest

di, 17/11/2015 - 00:37

The primary way to download Firefox is at, but Mozilla’s Release Engineering team has also maintained directories like

to provide a stable location for scripted downloads. There are similar links for betas and extended support releases for organisations. Read on to learn how these directories have changed, and how you can continue to download the latest releases.

Until recently these directories were implemented using a symlink to the current version, for example firefox/releases/42.0/. The storage backend has now changed to Amazon S3 and this is no longer possible. To implement the same functionality we’d need a duplicate set of keys, which incurs more maintenance overhead. And we already have a mechanism for delivering files independent of the current shipped version – our download redirector Bouncer. For example, here’s the latest release for Windows 32bit, U.S. English:

Modifying the product, os, and/or lang allow other combinations. This is described in the README.txt files for beta, release, and esr, as well as the Thunderbird equivalents release and beta.

Please adapt your scripts to use links. We hope it will help you simplify at the same time, as scraping to determine the current version is no longer necessary.

PS. We’ve also removed some latest- directories which were old and crufty, eg firefox/releases/latest-3.6.

Categorieën: Mozilla-nl planet

The Servo Blog: This Week In Servo 42

ma, 16/11/2015 - 21:30

In the last week, we landed 106 PRs in the Servo organization’s repositories.

We have a new homepage,! Many thanks to nerith and lucywyman!

Prabhjyot Sodhi did some initial analysis of Servo’s E-Easy bugs to show how long it is before they are closed - for a large subset of them, it was within 24 hours!

Notable additions
  • SimonSapin added a ./mach run --android to help ease the new Android developer experience
  • rillian fixed our placeholder image
  • larsberg fixed the Gonk intermittent failures - still lots more intermittents to go, sadly!
  • ajeffrey made DOMString opaque, enabling future optimization and representation tricks
  • Manishearth enabled delegation, which allows reviewers to let contributors review-carry their PRs without having to wait for a reviewer
  • paul added the mozbrowsericonchangeevent API
  • nox made JS-managed objects weakref-able
  • David Raifaizen limited the image formats that Servo will accept
  • Michael Howell fixed a layout regression affecting sites declaring viewports
  • Greg Guthe implemented a subset of the NetworkTiming DOM API.
  • waffles made network requests cancellable.
  • Emilio Cobos Álvarez implemented WebIDL sequence type return values.
New Contributors Meetings

At last week’s meeting, we discussed our GitHub subproject handling, the new webpage, multi-repo workflows, and the revival of our Rust-tracking-bug.

Categorieën: Mozilla-nl planet