HNHacker News
TopNewBestAskShowJobs

mnemonik

4,596 karma · joined August 22, 2008

submissionscomments
mnemonik··on Designing Tools
no call stack(?)

There are breadcrumbs across the debugger's toolbar for quick always available access, or there is a tab to display the whole stack at once next to the sources tab on the left sidebar.

breakpoints are a bit of a hit or miss, especially when callbacks are involved.

If you have a test case / url / steps to reproduce, please file a bug: https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&c...

We can't fix what we can't detect.

So kudos to them for all the hard work.

Thanks :)

mnemonik··on Designing Tools
FWIW, I'm colorblind and I use and prefer the dark theme.

Also, (warning this gets a little hand wavy) most pages on the web are light, so the light theme blends in. It is useful to have that contrast by default. Easier to make a distinction visually, and also "self xss" is deterred a little because the devtools are more obviously not part of facebook or whatever.

mnemonik··on CSS source map support, network performance analysis and more in Firefox DevTools
There should be another blog post on hacks detailing the whole workflow in the next day or two :)
mnemonik··on Why Programming is Difficult
I've had the same problem at times. It's kind of a mental masturbation; adding more abstract structures and more higher order functions.

Need to strike a balance between Get Shit Done and leaving behind code that isn't a pain to maintain.

In fact, often the kind of abstractions I've created when I'm in that masturbatory mode described above, it turns out that the abstractions aren't worth it in the end because they're only used once, and it doesn't actually make the code cleaner or easier to maintain going forward!

mnemonik··on Stop Writing JavaScript Compilers, Make Macros Instead
Sweet.js is hygienic but you can choose to be unhygienic if you want.

It is the best of both worlds.

http://sweetjs.org/#getting_dirty__breaking_hygiene

mnemonik··on Firefox Developer Tools, Part 2: Scratchpad and Style Editor
Thanks! Congrats on the low level tools team! I look forward to having more APIs to really get deep into the platform :)
mnemonik··on Firefox Developer Tools, Part 2: Scratchpad and Style Editor
Ah yes, I see! You can actually configure that via the options tab (the sprocket to the left of the console tab).

Soon, we will show you the colors as they were authored by default. I can't seem to track down the bug, but I know the inspector folks have it on their radar.

mnemonik··on Firefox Developer Tools, Part 2: Scratchpad and Style Editor
> 1. Please either respect the font sizes I set in the Firefox Preferences, or add a setting to change the font size inside the devtools. Currently the inspector and style panel on the right, among others, seem to use a fixed size that is just tiny enough to be seriously annoying.

We have a bug open for respecting the system font size here: https://bugzilla.mozilla.org/show_bug.cgi?id=760825

In the meantime, you can change the devtools font sizes with Cmd+<+> and Cmd+<->

> 2. All URLs everywhere should be clickable, middle-clickable, and have a context menu for these actions as well as other common stuff like copying it to the clipboard. Last time I checked there was no way to get the full URL of a stylesheet, clicking on it would only open the Style Editor which doesn't seem to expose the URL anywhere either.

Agreed, we have various bugs open in different bugzilla components. Will ping people about it.

> 3. Sometimes the devtools get stuck somehow, i.e. I suddenly can't open the Inspector anymore, or the console wwill stop displaying messages. This happened at least up until FF25, at which point I gave up and installed Firebug again.

Do you want to try out Aurora again? I recall a couple issues like what you described that got fixed (one of which was my fault, woops!) and I'd love to know if you are still experiencing this or if it is groovy now.

If you are still experiencing it, please file a bug!

https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&c...

> 4. Please support all different color syntaxes (ideally as in Firebug where I can choose my preferred format and have everything converted to it)

You mean custom syntax highlighting? Would be nice to have, but honestly probably not a priority. Everyone is very busy trying to bang out features and bug fixes, and even just the two themes we support now feel like a burden (at least to me). Hopefully we can do this sometime in the future, though!

> Otherwise it seems you're doing a great job, I just wish you would get the basics right first before adding stuff like a 3D view ;-)

Thanks! :D

For the record, the 3d view was either a GSoC project or an intern project, and hasn't really had much (basically any) maintenance burden.

On top of that, I think it is cool because it might not teach people who know about the web much, but it has the possibility to excite people who know nothing and make them want to learn more. I first got involved in web dev when I was like 10 or 11 and being able to view source was magical. Hopefully the 3d view helps give people that same feeling now days of being able to see a little under the hood and get them excited and draw them in.

Cheers!

mnemonik··on Firefox Developer Tools, Part 2: Scratchpad and Style Editor
It looks like the main work is happening in https://bugzilla.mozilla.org/show_bug.cgi?id=864098 which is marked as blocking that bug.

I'll ping Mike and see what the status is.

mnemonik··on Firefox Developer Tools, Part 2: Scratchpad and Style Editor
Thanks for the detailed feedback/requests!

> 1. Use F2 to edit selected DOM element. (currently I have to double click it)

Follow https://bugzilla.mozilla.org/show_bug.cgi?id=892275

Now that dom elements are editable, this should follow quickly. I'll ping bgrins, who implemented the edit-as-html stuff.

> 2. When I add css rule I want to see list of available properties right away (and later I want to CRTL+Space to show the same list). For example for text-align: left, right, center, initial, inherit, etc.

Not sure I follow exactly what you are getting at. Would you mind filing a bug with a little more detail? I don't want to describe the wrong thing and/or miss what is important to you.

https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&c...

> 3. Use orange/yellow/green to draw selected element regions form margin, border and padding

We are overhauling the highlighter here: https://bugzilla.mozilla.org/show_bug.cgi?id=663778

Here is a mock up that should be fairly close to how it will look: https://bugzilla.mozilla.org/attachment.cgi?id=807164

> 4. make the tooltip which appears above selected element with its class and id optional.

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=934697

> 5. Autocomplete !important keyword in css rules.

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=934695

> 1. Implement one global history for all pages. Use arrow case to browse console entries.

We do use arrows to browse console history, not sure what you mean there?

What makes you want to share console history between all tabs?

> 2. When I use this $('div') I want to be able to click on result and find that element in the Inspector tab

Agreed! I think there is a bug filed somewhere but, here is another that will probably just get duped over and then we will know the original bug: https://bugzilla.mozilla.org/show_bug.cgi?id=934700

> 1. I want to open some loaded JS file, change something, CTRL+S to save it and the code should be live. Scratchpad is confusing to me for this scenario.

Eventually we want to have completely live editing where you would only need to hit "save" when you wanted to commit your changes to the filesystem. You'll be able to register an event listener, trigger it, then decide it does the wrong thing, change the function body, and trigger it again and see your changes. Really excited for this.

Right now, the debugger is read only, and the scratchpad is where you can prototype really quickly. We are integrating the two together, so hopefully it will be less confusing soon. Eventually we will have live editing of JS and it will be incredi-awesome :)

> 2. Unminify/pretify javascript code.

Just shipped to Aurora, although at the moment it is very slow. I used escodegen as a backend for the pretty printing since it already accepts the ASTs SpiderMonkey creates, however I didn't expect it to be so slow for our use cases. I wrote a pretty printer[0] that doesn't rely on full parsing and with performance in mind, that should get uplifted in the next couple days and pretty printing won't be so slow anymore.

[0] https://github.com/mozilla/pretty-fast

> Style Editor: 1. Prettier theme for css files.

Perhaps this is alleviated now that we are using Code Mirror on Aurora?

> Others: 1. Implement Continuous Painting Mode

We are planning our performance tools right now, and among the problems we want to solve is identifying what elements and css rules are degrading performance in your page. We aren't sure that we want to mimic Chrome's solution, though.

> 2. Implement h shorcut to hide/show DOM elements in the Inspector

You can do this now, at least in Nightly. Not sure how long it has been there, but I am pretty sure it is in Aurora at least.

> 3. Create Super Lighter theme, which does not have big dark panels everywhere. I tried both themes, but these big dark panels are still there.I like white. I work well on white.

Agreed. We have mock ups, but AFAIK everyone is busting out features at the moment rather than working on the theming. I think Paul Rouget is going to revisit this pretty soon.

Here are the mock ups: https://people.mozilla.org/~shorlander/mockups/devTools/ux-r...

Thanks again for the feedback! We value it a ton :)

mnemonik··on Firefox Developer Tools, Part 2: Scratchpad and Style Editor
You can do that with numeric values in the inspector right now, and also combine with Alt and Shift to increment/decrement by tenths or tens respectively.

Would definitely be cool to have this for non-numerical properties as well, filed https://bugzilla.mozilla.org/show_bug.cgi?id=934661

mnemonik··on Firefox Developer Tools, Part 2: Scratchpad and Style Editor
In Aurora, the tools now use Code Mirror as the editor. Along with that change, we now use Code Mirror's searching, so Cmd+G and Cmd+Shift+G will cycle through next/previous search results.

I filed a bug for a more discoverable UI: https://bugzilla.mozilla.org/show_bug.cgi?id=934624

Here is this bug for searching across all sheets: https://bugzilla.mozilla.org/show_bug.cgi?id=932093

It looks like it slipped under the radar, but I just talked with Heather who has worked on the Style Editor the most, and so it should be back on the radar now :)

Anything else? :)

mnemonik··on Java Virtual Machine in pure Node.js
Also, Narcissus: https://github.com/mozilla/narcissus
mnemonik··on Let’s get serious about ES6 generator functions
Please, don't skip the last step and make sure that you test them, too!

http://fitzgeraldnick.com/weblog/51/

:)

mnemonik··on Web-mode.el – an Emacs major mode for editing HTML templates
> perhaps make some edits at the emacs wiki...

It's a wiki, go for it ;)

mnemonik··on Web-mode.el – an Emacs major mode for editing HTML templates
File a bug with the project. That way the maintainer (or anyone, really) can fix it and make web-mode better for you.
mnemonik··on Firefox Developer Tools and Firebug
Cmd+Opt+K (or Ctrl+Shift+K) should take you to the console panel if you are in a different panel. For example, Cmd+Opt+S to open the debugger, and then Cmd+Opt+K should take you directly to the console, not close the tools.

If you find this isn't happening for you, please file a bug: https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&c...

mnemonik··on Artillery is building a hardcore RTS with HTML5 and WebGL
> They also have no debugging support.

When emscripten is passed the debug flag, it will generate source maps, which will let you step through your code, although inspecting variables still isn't a solved problem.

mnemonik··on Eloquent JavaScript, Second Edition
FWIW Land of Lisp feels incredible to me.
mnemonik··on The SCUMM Diary: Stories behind one of the greatest game engines ever made
SCUMM VM ported to JS: http://clb.demon.fi/html5scummvm/

Github: https://github.com/juj/emscripten-scummvm

mnemonik··on Firebug 1.12 – New Features
When you enter debug mode in SpiderMonkey most (all? I forget) jit'ing and optimizations won't happen; code becomes a lot slower. The new debugging api allows you to debug specific tabs, while the old one would force all of the browser (including the chrome js that handles the browser's UI) to enter debug mode and the whole browser gets slow.

Because Honza is working on porting firebug to the new debugger API, it will get faster, and so will all of firefox when you are using firebug.

IIRC, Honza is not just working on porting from the old api to the new one, but also on top of our remote debugging protocol. This means that we improve the debugging server, and both the native tools and firebug get better. Plus, you'll be able to use firebug on your laptop, connected remotely to firefox on your android phone, or firefox os.

mnemonik··on Destructuring Assignment in ECMAScript 6
Ah you can't do the single-param-drop-parens when combined with destructuring? Good to know, thanks Benvie.
mnemonik··on Destructuring Assignment in ECMAScript 6
This isn't quite as powerful as full blown pattern matching (which in turn isn't quite as powerful as full blown unification) because you can't branch logic based on whether a pattern matches or not.
mnemonik··on Destructuring Assignment in ECMAScript 6
Default parameter values are also part of ES6.
mnemonik··on Destructuring Assignment in ECMAScript 6
Combine the two:

    const tail = [, ...xs] => xs;
mnemonik··on New Features of Firefox Developer Tools: Episode 25
Can you wait till the next uplift? If not, hop on Nightly ;)

https://bugzilla.mozilla.org/show_bug.cgi?id=878412

mnemonik··on Ractive.js
Many of these frameworks want to support IE 8, which is the default browser of windows 7. IE 8 only supports Object.defineProperty with DOM objects[0], which can be infuriating.

No one should use __defineGetter__ and __defineSetter__ because they are non-standard and deprecated[1].

[0] http://kangax.github.io/es5-compat-table/#define-property-ie...

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Edit: left this tab open and I see this point has since been made, but I will leave the comment anyways.

mnemonik··on Block NSA funding for collecting the call records of all Americans
When I called in the first time, I got a busy line. When I called in a second time, I was directed to Nancy Pelosi's voice mail.

Hopefully, this means we are flooding the lines!

mnemonik··on Little Lisp interpreter
Really loved the sense of community that sprouted up around those articles :) I remember everyone following each other's projects on github, and the discussions in the comments on the blog posts. Good memories :)

I should finish my Ada version sometime... Or just start a new project haha

mnemonik··on Little Lisp interpreter
Great book, although I found it hard parse sometimes (compared to say the later chapters of SICP) which I suspect is because it is translated from french. Either way, it puts so much information in one place, it is incredibly valuable.
← PreviousPage 3 of 9Next →