Older blog entries for sness (starting at number 5050)

twitter/flight · GitHub

twitter/flight · GitHub: "How do I apply mixins to a regular object?

Under the covers, Components add mixins using Flight's compose module, which amongst other things, prevents mixins from clobbering existing method names. If you ever need to apply a mixin to something other than a component (e.g. to another mixin), you can invoke compose.mixin directly:"

'via Blog this'

Syndicated 2013-02-01 00:53:00 from sness

Flight by Twitter

Flight by Twitter: "Mixins

A mixin defines a set of functionality that is useful to more than one object. Flight comes with built-in support for functional mixins, including protection against unintentional overrides and duplicate mixins. While classical JavaScript patterns support only single inheritance, a component (or other object) can have multiple mixins applied to it. Moreover mixins requires a fraction of the boilerplate required to form traditional classical hierarchies out of constructor-prototypes hybrids, and don't suffer the leaky abstractions of the latter ('super', 'static', 'const' etc.)

"

'via Blog this'

Syndicated 2013-02-01 00:46:00 from sness

Adequately Good - JavaScript Module Pattern: In-Depth - by Ben Cherry

Adequately Good - JavaScript Module Pattern: In-Depth - by Ben Cherry: "Anonymous Closures

This is the fundamental construct that makes it all possible, and really is the single best feature of JavaScript. We'll simply create an anonymous function, and execute it immediately. All of the code that runs inside the function lives in a closure, which provides privacy and state throughout the lifetime of our application.

(function () {
// ... all vars and functions are in this scope only
// still maintains access to all globals
}());
Notice the () around the anonymous function. This is required by the language, since statements that begin with the token function are always considered to be function declarations. Including () creates a function expression instead.

"

'via Blog this'

Syndicated 2013-01-31 22:29:00 from sness

Adequately Good - JavaScript Module Pattern: In-Depth - by Ben Cherry

Adequately Good - JavaScript Module Pattern: In-Depth - by Ben Cherry: "The module pattern is a common JavaScript coding pattern. It's generally well understood, but there are a number of advanced uses that have not gotten a lot of attention. In this article, I'll review the basics and cover some truly remarkable advanced topics, including one which I think is original."

'via Blog this'

Syndicated 2013-01-31 22:28:00 from sness

JS Memory

JS Memory: "Let take a look at what V8 actually does when it runs something like:

function foo(x) {
if (x) {
var hi = "str";
}
return hi;
}
First of all, allocation of string "str" does not happen every time you run this function. It is allocated once by a parser. Every time you execute this code the very same string object will be used again and again. It looks like this:

hidden class
length
hash
str■
"

'via Blog this'

Syndicated 2013-01-31 18:28:00 from sness

Slant - What is the best programming font?

Slant - What is the best programming font?: "Anonymous Pro (2009) is a family of four fixed-width fonts designed especially with coding in mind."

'via Blog this'

Syndicated 2013-01-31 17:04:00 from sness

JorenSix/TarsosDSP · GitHub

JorenSix/TarsosDSP · GitHub: "TarsosDSP is a Java library for audio processing. Its aim is to provide an easy-to-use interface to practical audio (signal) processing algorithms. — Read more
"

'via Blog this'

Syndicated 2013-01-31 17:04:00 from sness

5041 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!