Wednesday, February 8, 2012
Active Functors + Social Network = ?
bây giờ là khoảng 23:35, mình suy nghĩ về 1 mô hình tính toán mới dựa trên các khái niệm về functional programming, category theory, active agent và thứ đang là "hot topic" hiện nay, Social Network.
Các mô hình hình tính toán cũ, bị giới hạn trong khả năng của nó, "data , dữ liệu luôn thể bị động, và cần sự can thiệp của 1 thuật toán "cực kỳ phức tạp" để tìm hiểu ý nghĩa của dữ liệu.
Học về IT hay Computer Science, mọi người đều biết đến môn database. Nói ngắn gọn, người ta thường chỉ lưu thông tin và quên rằng các mối quan hệ giữa các thông tin mới là quan trọng. Nếu không có các relationship và các fuction tạo ra data thì nó rất vô nghĩa. Active functor nó về các cơ chế lưu trữ các cách thức tạo nên data, VD: database của shopping cart chỉ lưu thông tin về user và item họ mua, còn quy trình vì sao họ chọn item đó, và sử dụng nó như thế nào, .... thì hiếm khi lưu lại. Sự thiếu hụt này dẫn đến khả năng hiểu về cơ chế chọn lựa mua hàng (hành vi) của user, vốn khá quan trọng trong việc marketing.
Người ta gọi đó là "Data Mining", một cách mà các công ty to như "Facebook, Google, Amazon, Apple và cả Microsoft" đang làm. Họ làm mọi thứ để hiểu hơn về "chúng ta" , những người sử dụng dịch vụ của họ.
Ở đây không bàn về sự phức tạp về mặt kỹ thuật để làm 1 việc "A" việc B, việc C, ....ở đây mình muốn nói cách các researchers đang làm, mô hình hóa dữ liệu về con người như những cuốn sách bán trên Amazon là 1 sai lầm, lưu trữ về cấu trúc các thông tin như thế chỉ hiểu con người ở 1 thế giới của máy tính, làm cho nó trở thành những "bit" thông tin 0 1 vô tri vô giác.
Thực tế cho thấy , các kết quả cũng không quá tệ xét về mặt logic, nhưng nó sẽ bị chặn bởi những giới hạn, về mặt lý thuyết , đó là sự tiến hóa của thông tin, ý thức của thông tin theo thời gian.
Cụ thế nó ngốc như 1 cái máy tính, chỉ biết nhận lệnh, và không bao giớ biết đặt câu hỏi, các KQ data mining có thể bị sai lệch, và người dùng đôi khi nhận duoc cái quảng cáo rất bực mình,
Active Functors là 1 dạng mô hình tính toán, xem các thông tin về user như những thực thể tồn tại, có thể độc lập phát triển các môi liên hệ thông tin khác theo 1 mô hính có tính "tiến hóa". Nói dễ hiểu, nó như 1 bản sao số "bộ não" của users, thông tin trở nên có "ý thức" (sense) hơn về nó. các Links, và semantic,( ngữ nghĩa) của nó , ở dạng tiếng Anh, Pháp hay Vietnam đề chung 1 thể , gọi đó ontology.
ý tưởng, mô hình và cả tính hiện thực, khả thí vẫn đang trong giai đoạn nghiên cứu,
hi vọng nó thành công, hay ít ra nó cũng giúp mình quản lý thông tin cá nhân tốt hơn, xả hội tri thức mà, chúng ta luôn mong ước về điều đó,
let's make it happen !
Monday, December 19, 2011
What wrong with data today ?
In modern computing, after the Web 2.0 era, all data in the Internet is growing beyond the limit of imagination's some computer scientist in 60 years ago.
Some limit of von Neumann's model, the classical database, or even Turing theory, that make our time, the computing can not go further the current mind.
I still thinking what is the better model of computation, how we can store the semantics of data, how we think and treat the data (just bit 1 or 0) as the soul inside.
Like us, the human being, can have both sense, soul and mind with matter, body.
I think we think the data can have a sense , a context (time, place, and some attributes) that make our data become a true entity, that exists in the World.
Functor, a simple function object that have both its data and the computation, make our computing more abstract way.
Some limit of von Neumann's model, the classical database, or even Turing theory, that make our time, the computing can not go further the current mind.
I still thinking what is the better model of computation, how we can store the semantics of data, how we think and treat the data (just bit 1 or 0) as the soul inside.
Like us, the human being, can have both sense, soul and mind with matter, body.
I think we think the data can have a sense , a context (time, place, and some attributes) that make our data become a true entity, that exists in the World.
Functor, a simple function object that have both its data and the computation, make our computing more abstract way.
Saturday, December 17, 2011
Functor in Practice
Active Functor Introduction
In http://en.wikipedia.org/wiki/Functor
http://ncatlab.org/nlab/show/experimental+alternative+definition+of+functor
We can have a definition "functor" in Mathematics
In Java http://userpages.umbc.edu/~tarr/dp/lectures/Command-2pp.pdf
In JavaScript:
E.g: First-class functor
var A = function(){ this.message = "hello"; };
var B = function(f) { this.sayHi = function(){ console.log(f.message); }; }
var a = new A();
var b = new B(a);
b.sayHi();
Functor return functor with closure:
http://ncatlab.org/nlab/show/experimental+alternative+definition+of+functor
We can have a definition "functor" in Mathematics
In category theory, a branch of mathematics, a functor is a special type of mapping between categories. Functors can be thought of as homomorphisms between categories, ormorphisms when in the category of small categories.
Definition
Let C and D be categories. A functor F from C to D is a mapping that[3]
- associates to each object
an object
,
- associates to each morphism
a morphism
such that the following two conditions hold:
for every object
for all morphisms
and
That is, functors must preserve identity morphisms and composition of morphisms.
Functor in Computer Science
A function object, also called a functor, functional, or functionoid,[1] is a computer programming construct allowing an object to be invoked or called as though it were an ordinaryfunction, usually with the same syntax.
Description
A typical use of a function object is in writing callback functions. A callback in procedural languages, such as C, may be performed by using function pointers. However it can be difficult or awkward to pass a state into or out of the callback function. This restriction also inhibits more dynamic behavior of the function. A function object solves those problems since the function is really a façade for a full object, thus it carries its own state.
Many modern languages (and some older) e.g. C++, Lisp, Perl, PHP, Python, Ruby, and many others, support first-class function objects and may even make significant use of them.Functional programming languages additionally support closures, i.e. first-class functions which can 'close over' variables in their surrounding environment at creation time. During compilation, a transformation known as lambda lifting converts the closures into function objects.
In Java http://userpages.umbc.edu/~tarr/dp/lectures/Command-2pp.pdf
List<String> list = Arrays.asList("10", "1", "20", "11", "21", "12"); Comparator<String> numStringComparator = new Comparator<String>() { public int compare(String o1, String o2) { return Integer.valueOf(o1).compareTo(Integer.valueOf(o2)); } }; Collections.sort(list, numStringComparator);
In JavaScript:
E.g: First-class functor
var A = function(){ this.message = "hello"; };
var B = function(f) { this.sayHi = function(){ console.log(f.message); }; }
var a = new A();
var b = new B(a);
b.sayHi();
Functor return functor with closure:
function Accumulator(start) { var current = start; return function (x) { current += x; return current; }; }
var a = Accumulator(4); var x = a(5); //x has value 9 x = a(2); //x has value 11
In Programming, we can think a functor is a function that can be manipulated as an object, or an object representing a single, generic function. Functors support and encourage a number of powerful programming techniques including:
- programming in a functional style
- higher order functions
- internal iterators
- reuse and specialization through composition rather than inheritance and overloading
- generic "callback" or "extension point" APIs
- generic "filters" or predicate APIs
- many "behavioral" design patterns, such as Visitor, Strategy, Chain of Responsibility, etc.
What is an Active Functor?
It's the abstraction of how a computer program can create, pass, call and receive a functor (the definition and model to create instances) in real-time.
It's, functor can be think as a simple agent can receive data, processing and return a value.
It's, functor can be think as a simple agent can receive data, processing and return a value.
The "Active" mean a functor can be pulled/pushed to executing environment, like a web browser, Virtual Machine, ...
Currently, I will implement and introduce this power abstraction in web browser, and with popular tools like browser, JavaScript, Java VM. This can be implemented and put it into practice.
We know, Android, Java Virtual Machine, web browser, and the Cloud Computing, they already for us.
It's time to think we can make a true "Intelligent Social Cloud Computing".
A functor can be created by everyone in web browser, can travel from PC to Smartphone, or can be stored in the cloud storage.
Before going to the more higher level like http://activeinfograph.blogspot.com/ , that a program with anonymous functor running.
I think this could a functor framework can be easily implemented. And then with the AI and Machine Learning techniques, an active agent can go into practice.
http://brownsharpie.courtneygibbons.org/?cat=51
I think this could a functor framework can be easily implemented. And then with the AI and Machine Learning techniques, an active agent can go into practice.
http://brownsharpie.courtneygibbons.org/?cat=51
Subscribe to:
Posts (Atom)
