2,897 karma · joined May 13, 2012
https://scott.mn
email: scott@<the above domain>
https://twitter.com/graue
https://github.com/graue
For example, until recently ClojureScript's :keywords were just strings under the hood and it required a string compare to test equality. Apparently this is no longer the case due to this commit 2 months ago: https://github.com/clojure/clojurescript/commit/2cef52840fcd... but it shows you the kind of stuff you might run into. In a recent talk I saw by David Nolen, the lead maintainer of the ClojureScript compiler, he brought up multimethod dispatch as something that can still be as much as 100 times slower than the JVM.
As a tooling example, Clojure gives you helpful errors if you initialize records the wrong way:
user=> (defrecord Thing [foo bar])
user.Thing
user=> (Thing. 1 2) ; correct usage
#user.Thing{:foo 1, :bar 2}
user=> (Thing. 1) ; wrong number of fields
CompilerException java.lang.IllegalArgumentException: No matching ctor found for class user.Thing, compiling:(/tmp/form-init7089728177345913731.clj:1:1)
user=> (Thing 1 2) ; forgetting the dot
RuntimeException Expecting var, but Thing is mapped to class user.Thing clojure.lang.Util.runtimeException (Util.java:219)
That's good! Especially if you're new to the language. You see where you messed up right away.But ClojureScript just silently gives you nils:
ClojureScript:cljs.user> (defrecord Thing [foo bar])
cljs.user/Thing
ClojureScript:cljs.user> (Thing. 1 2) ; correct usage
#cljs.user.Thing{:foo 1, :bar 2}
ClojureScript:cljs.user> (Thing. 1) ; wrong number of fields
#cljs.user.Thing{:foo 1, :bar nil}
ClojureScript:cljs.user> (Thing 1 2) ; forgetting the dot
nil
This should be a bug report against the CLJS compiler (edit: now it is[1]), and it's probably not that hard to fix. I could fix it. You could fix it. (The CLJS compiler is very approachable and needs contributors, by the way.) But, especially as a newbie, this kind of stuff can bite you. JVM Clojure is more polished.The stated goal was to make it harder (still? I guess people clicked through the warning without reading) to accidentally save in .png or .jpg and lose the layers. But the result, for someone whose usual workflow is to open a .png/.jpg, edit, and save back to .png/.jpg, could not be more user-hostile and obnoxious.
In response to a complaint, someone on the forums wrote[2]:
> This is the way Gimp now works. Of course you can consider this a PITA. But for other folks, losing work because they saved as JPG instead of XCF is also a PITA. The philosophy is that people that are impacted negatively by this change are people with very simple work-flows who would be better off using simpler software (XnView, Digikam, Lighttable...)
In other words, all of you people with simple workflows, that worked just fine in Gimp for years? Now you have to go off and learn some new software, because Gimp is for Serious Graphic Design™ only. Ugh.
I got excited researching this because I found a changelog for Gimp 2.8.4 that mentions patching the behavior to be sane[3], but then I realized that's only a patch in the unofficial OS X build. On Linux, the same nonsense in the latest version.
1. http://www.gimp.org/release-notes/gimp-2.8.html
2. http://registry.gimp.org/node/26273
3. http://gimp.lisanet.de/Website/News/Eintrage/2013/3/21_GIMP_...
Mind you, I've never contributed the tiniest bit of code or funding to Gimp, so I can't really complain.
The router admin interface only needs to check your password. It can do that by storing only a cryptographic hash, not the password itself.
aimed solely at content consumers: No. FxOS phones can't do as much as a Nexus 4 or iPhone, but they aren't meant to compete with those. Mozilla's targeting emerging markets where most people don't have smartphones or maybe even computers at all. At $80 unsubsidized, the ZTE Open is approaching feature-phone price and it can do a lot more than a feature phone (and will do more still once FxOS matures).
neutered only to run web browsers: It has full-fledged apps. Using web technology under the hood isn't the same as running in a browser.
NIH development environments: You can't get much less NIH than adopting the web itself, which everyone already uses and develops for, as your platform. If you look in the Firefox Marketplace, many of the apps you see now are web apps, written without FxOS in mind at all, with maybe 15-45 minutes of effort to package them for the marketplace.
tied down to specific languages: There are hundreds of languages that compile to JavaScript[1], and some, like ClojureScript, are already seeing real-world use in commercial apps[2]. With Emscripten, you can use any language that compiles to native. There are performance and debugging challenges but they're getting addressed with efforts like Asm.js and source maps. In 2013 you don't have to write JavaScript to use the web as a platform.
1. https://github.com/jashkenas/coffee-script/wiki/List-of-lang...
For me, Go misses the sweet spot entirely. A year ago I was curious about both Go and Clojure, my interest piqued by the strong concurrency support each has. I picked Clojure and have grown more and more confident in that choice.
Why not Go? In a language with nil pointers (Tony Hoare's "billion-dollar mistake"), no generics, and sub-JVM performance, static typing just doesn't seem worth it. Also, poor interop with other languages means Go can only draw from its own small community for libraries (contrast Clojure which makes using mature, well-tested Java libs trivial).
When Rust is more mature, it may be what I hoped Go would be: the safe language, with lightweight threads, that makes me never have to write C or C++ again.
I disagree with this one. It's possible to live too close to work. If the commute is less than 15 minutes or so, or perhaps more to the point, if it isn't far enough to feel like a separate place, I'm less happy. I need the separation.
I've experienced this both in college — I was happier when I moved across the river from most of my classes and classmates — and recently at a job, where it was about a 7 minute bike ride to work. You'd think that's ideal, but I felt trapped, like my home was nothing but an extension of the office.
One of my happiest times, in fact, was when I had an 11 mile bike commute (or an hour and 15 minutes on two trains). It wasn't very practical, and was logistically difficult (and I was often late), but I felt amazing.
I've never owned a car, though, so maybe the guideline about shorter commutes is correct if you drive. I've always either walked, biked (exercise) or taken the train (opportunity to read, meditate, relax).
Since I'm doing contract work and don't have a regular salary, one landlord told me outright that even though I had demonstrated I could pay, he wouldn't rent to me because he "wanted a more stable tenant".
It feels terribly insulting to be told that, and makes me long for a humbler city like Chicago or Minneapolis, where if you have money, a landlord will take it without nearly this level of nonsense.
Or Berlin. I looked at apartment prices there and began to feel quite jealous of the Germans :)
https://bugzilla.mozilla.org/show_bug.cgi?id=762556
Not much discussion about fixing it :( This caused a lot of pain at my last job. When we got Chrome and IE10 stack traces, we had a script run them through our source maps and show us the exact, full stack trace through the unminified source. Firefox's and Safari's traces remained impenetrable, short of manually inspecting the minified line of code and guessing.
If however you licensed some good facial recognition technology, perhaps you could compare the face in the Airbnb host's avatar with that on the ID each of your tenants supplied when applying for an apartment. It would be far from bulletproof, but could get you somewhere. In a less-densely populated place maybe you could even get away with "notify us if someone named Bob offers a new room within 0.5 miles of 622 Cedar St", perhaps hiring low-paid humans to sanity-check the results before passing the notification on to the landlord.
Though biking a 5 mile long bridge with no bike lane on half of it sounds terrifying, so I'd probably consider it still not bikeable for now.
Is this true in practice? How big of a hassle is it if you don't have a car (and don't want to spring for an expensive taxi/Uber ride)?
(This reputation is a big reason why I don't want to ever move to the Bay Area. I currently live in Brooklyn, and can easily get home from Manhattan in 20 minutes... at 3am if I want to. In Cambridge/Boston the T shuts down, but not until around midnight and you can still bike or walk.)
(Edit: I was misinformed. I'd heard the BART shuts down at around 10pm, but it seems it's actually more like midnight, similar to the Boston area, and I didn't know there were all-night buses providing service between SF and Oakland when BART is closed.)
(Edit: This assumes you can get a list of favorited tweets ordered by when they were favorited. I just noticed the web interface orders them by time posted, not time favorited.)
If you think it's crazy, I'm gonna guess your broke college-kid days (if you had them) are long behind you. :)
> If you’re a JavaScript programmer, chances are you’ve seen (and done) something like this before:
var listener = node.addEventListener("click", function(event) {
let _target = event.target;
this.handleClick(_target);
}.bind(this));
I had to go look up `let` in JavaScript[1]. It appears to still be a bleeding-edge feature not widely supported[2] outside of Firefox... not even in Node with the --harmony flag. I wonder if this is meant to be subtle pro-ES6 propaganda, or the author really takes `let` for granted and doesn't realize most JS programmers have never seen it :)1. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
http://ghost.onolan.org/what-it-means-to-be-non-profit
and the post does a good job explaining what that means and why it was chosen. I definitely want to see more mini-Mozillas :)