In Ember, the application's state manager handles routing. Let's take a look at a simple example:
App.stateManager = Ember.StateManager.create({
start: Ember.State.extend({
index: Ember.State.extend({
route: "/",
(use 'clojure.contrib.monads) | |
(defn new-pair [value log] {:value value :log log}) | |
(defn starting-pair [value] (new-pair value nil)) | |
(defn log [base-value] | |
(fn [log] | |
(new-pair base-value (cons base-value log)))) | |
(defmonad logging-m |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
In penance for cracking stupid jokes on Twitter, here's my Emacs cheat sheet. Emacs has a steep learning curve, so I've tried to order them by importance so you could learn them in stages.
One overall rule of thumb: pay attention to the minibuffer (the line at the bottom of the editor). It will often guide you through a process, and also gives you hints about what state you're in, such as the middle of a multi-chord sequence.
The other rule of thumb: when in doubt, C-g it out.
You simply can't get by without having these at your fingertips.
.codehilite .hll { background-color: #373b41 } | |
.codehilite { background: #1d1f21; color: #c5c8c6 } | |
.codehilite .c { color: #969896 } /* Comment */ | |
.codehilite .err { border: 1px solid #cc6666 } /* Error */ | |
.codehilite .g { color: #c5c8c6 } /* Generic */ | |
.codehilite .k { color: #81a2be } /* Keyword */ | |
.codehilite .l { color: #cc6666 } /* Literal */ | |
.codehilite .o { color: #c5c8c6 } /* Operator */ | |
.codehilite .x { color: #c5c8c6 } /* Other */ | |
.codehilite .p { color: #c5c8c6 } /* Punctuation */ |
So I was reading Hacker News and decided to read the comments in the thread about H.265 being approved. Pretty close to the top was this comment about VP9, Google's future video format. I have some words of my own about it and other future formats at the bottom of this post, but what jumped out from the comment to me was this part:
Many have already implemented VP8 (which is also slightly better than h.264 at this point)
The comparison linked to back up that statement is faulty for several reasons, such as not providing the source material used (hell, he doesn't even name the source material), exact encoding settings used (no, some random profiles are not enough), not providing the resulting encodes, only providing a
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
{ | |
"auto_complete_commit_on_tab": true, | |
"color_scheme": "Packages/Color Scheme - Default/Tomorrow-Night-Eighties.tmTheme", | |
"file_exclude_patterns": | |
[ | |
".DS_Store" | |
], | |
"folder_exclude_patterns": | |
[ | |
"bin", |
Disclaimer: I've been using Ember for quite some time now, about when 0.9.8 was released, which means I'm not a random hater using backbone or angular.
I do believe Ember is the best thing out there, but I want to point out some things which really piss me off.
Most of them are based on the fact that the core team doesn't seem to be organized and doesn't prioritize the right things. Here are couple of examples:
My efforts to port http://www.youtube.com/watch?v=f6kdp27TYZs to Clojure.
func boring(msg string) {
for i := 0; ; i++ {
fmt.Println(msg, i)
time.Sleep(time.Second)
}