Posts

Showing posts from December 22, 2013

♥ JavaScript, Node.js, socket.io ♥

thanks to friends on g+, discovered Socket.ioSocket.IO is a JavaScript library for realtime web applications. It has two parts: a client-side library that runs in the browser, and a server-side library for node.js. Both components have a nearly identical API. Like node.js, it is event-driven.Socket.IO primarily uses the WebSocket protocol, but if needed can fallback on multiple other methods, such as Adobe Flash sockets, JSONP polling, and AJAX long polling,[2] while providing the same interface. Although it can be used as simply a wrapper for WebSocket, it provides many more features, including broadcasting to multiple sockets, storing data associated with each client, and asynchronous I/O.It can be installed with the npm (node packaged modules) tool.[3]home: http://socket.io/github: https://github.com/LearnBoost/socket.ioif you have Node.js's npm installed, npm install socket.ioJavaScript, Node.js, am in heaven. Screw perl, python.Node.js Video Tutorial by Ryan Dahl, with Annota…

♥ Ryan Dahl, mathematician turned programer ♥

been wanting to write this for a while. The node.js creator, Ryan Dahl, i really like. He's a mathematician originally, doing his phd. (i forgot exactly what topic, anyone? algebraic topology or something)Anyway, i've watched about 5 of his video presentations over the past year year, and read several of his article, opinions on languages and software, and studied his creation node.js.i really like this guy. This guy, his opinions, are somewhat controversial. But, i find that, his thinking, and views on software, is quite in sync with mine.i think possibly this is because we are both math guys first. He's never took any computer course. Nor i.i don't speak for all math guys, but, for me, coming to programing, most of it is pure complex garbage. The coders, in particular unix, perl, python, they don't know what they are talking about. Different ideas are extremely hard to get to them, as i've written few thousand articles on various aspects. 〔☛ Computing & its P…

Object Oriented Programing Mutation: “object” Is No Longer Data, But Namespace

just made a new discovery about the OOP fiasco.in node.js, the “object” is no longer a data, rather, it's more used as a namespace. For example,varpp = require('path'); pp.extname('xyz.html') // ⇒ .htmlthis is actually fantastic. Screw the OOP.What are OOP's Jargons & Complexities (OOP as Functional Programing)On the Idiocy of Dot Notation of Object Oriented Programing LanguagesMeaning of Object in Computer LanguagesConfusing Terminology in JavaScript/DOM: tag, element, node, object, attribute, property, method

beauty and the beast: what's the evolutionary psychology's reason for men preferring beautiful women?

saw a tweet on Chinese weibo, saying that the worst is for you (men) to worry about your looks, because, women don't care. They care about your ability, personality, your commitment to her.true enough. (is this critically true? well, i think so, but not gonna worry about that now) What got me thinking, is what's the reason that men care about women's looks, but in particular, she be beautiful, not just young.men like young, and that's because only young ones have more chance of reproduction. But why beautiful? well, youth and beauty are connected, but, the thing is, say there are 5 college teens walking on a street, and say one has the looks of models, but the others are rather ugly. The most beautiful one will be our focus. What's the evolutionary psychology's explanation for this?O, btw, have you heard of “beauty and the beast”? It's a perennial tale, in fairy tales, folk lores, or today, in movies, novels, posters, comics. (⁖ phamtom of the opera) Male, …

JavaScript declaration and assignment

JavaScript. Multiple variables can be declared on the same line, separated by comma var name1, name2, name3 …;// declare variable, use 「var」 varx; vary; // multiple variables can be declared on the same line, separated by comma vara, b, c;Multiple variables can be declared and assigned at the same time.// declare variable and assign varx = 4; // declare variable and assign multiple variables vara = 1, b = 2, c = 3;When a variable is declared but not assigned, the default value is undefined.When a variable is not declared nor assigned, and you try to access it, you get ReferenceError.varx; console.log(x); // prints 「undefined」 console.log(y); // ReferenceError: y is not definedJavaScript Tutorial by ExampleJavaScript Variable Scope: Function Level vs Block LevelJavaScript: Variable & Function Declaration Order: Name Hoisting

Teary Eyes, a Need for Intimacy

the primary purpose of tears in weeping is to signify a need for intimacy.for adults, typically, it's attractive when done by female.you can see, in media, for example Miley Cyrus's 〈Wrecking Ball〉 featuring big blue eyes with tears. And also, in Lady Gaga's 〈Bad Romance〉see also Reading Notes on 《Intimate Behavior》#feminism