Javascript is only the language that programmers use without learning it. In other words, the javascript language model is perfectly easy-to-use and reasonable to copy-and-paste. However as Douglas mentioned in this lecture, javascript also has fancy nice features derived from scheme & lisp. The closures help us hide unnecessary inside and disclose necessary interface between objects and functions. See the singleton example on the presentation.
During this winter, I am going to learn javascript from the syntax again. I love computer programming laguages itself, not just javascript alone. These are the lists of languages that I have to learn seriously D/Perl/Haskel/Ruby/Java/C#/.NET(CLR). Frankly, I am using Python mostly for my works and research – I don’t have any chance to be familiar with other languages even I read a couple of books on Haskel, Java and Ruby. I forgot the essence of them.
These are my native programming languages – gas, c, c++, python, lisp.
This is a video presented 2 years ago. They were talking about Meshup Problem of web site such as portal, ads, gears, and plugins. We still have same problems – for example cross site script and cross site forgery. See the recent papers trying to solve the mashup problem in browsers – Securing Frame Communication in Browsers.What I am doing is to modify chrome, firefox and apache to provide secure sandbox models on each components by keeping principle of least privilege.
For Xen developers, this book is real definite guide, but to understand what is hypervisor and how it works, this is not the solution. However, to understand how precisely they implemented Xen and their perspective as providers, this book is pretty fun
Concurrency features & Fast compilation of Go Programming Language are pretty exciting, but I am little confused of language semantics and syntax. I have to keep my eyes on.
Why system language? – there is run time support.
Why we feel compilation is fast? – stacking objs files could make snow ball effects on little modification
New language? we can support easy-to-use concurrency features as library
Many languages, hard to cover them all. no time to spend on them.
#define D "#define" #define P "(" #define E ")" #define X "\\" #define Q "\"" #define S " " #define N "\n" #define V "#" #define SS "S" #define SX "X" #define SQ "Q" #define SF "F" #define SD "D" #define Sn "n" #define SN "N" #define M "int main(){" #define C "}" #define H " printf(F(D) F(P) F(E) D S SX S Q X X Q N D S SQ S Q X Q Q N F(S) D S SN S Q X Sn Q N F(V) F(SS) F(SX) F(SQ) F(SF) F(SD) F(Sn) F(SN) F(M) F(C) F(H) F(R) D S SF P SX E S SD S SS S V SX S SS S SQ S SX S SQ S SN N N M N H N R N C);" #define R " return 0;" #define F(X) D S #X S Q X Q N
int main(){ printf(F(D) F(P) F(E) D S SX S Q X X Q N D S SQ S Q X Q Q N F(S) D S SN S Q X Sn Q N F(V) F(SS) F(SX) F(SQ) F(SF) F(SD) F(Sn) F(SN) F(M) F(C) F(H) F(R) D S SF P SX E S SD S SS S V SX S SS S SQ S SX S SQ S SN N N M N H N R N C); return0; }
Finally I read this book, visualizing data. Frankly, I expected new approaches, how to visualize data, so attractive. However, this book is inclined to the introduction to the Processing Language and its internal implementation and design. I have a toolkit to visualize data, matlibplot written with python. This matlibplot is beautilful because I can embed it within other GUI framework such as gtk, and lovely wxwidget and wxpython. The Processing Language is written at CMU for students, professionals, and artists. Looks promising but not align with me. That is because it is not extensible at all. The Processing Language is just backend and hard to extend it as real processing engine.
The OpenCV is one of the greates and widely using image library for all developers and students. However, I am not a OpenCC and Graphics guy, but I choose OpenCV for Video Recording purpose. Since I mostly live and develop within Ubuntu, I tried writing and testing a little python-opencv program, but not working. It is mainly because the problem of new ffmpeg in ubuntu 9.04 Jaunty – see, https://bugs.launchpad.net/ubuntu/+source/opencv/+bug/311188. While searching the Internet, I found an article to use video streaming of opencv(here, http://gijs.pythonic.nl/blog/2009/may/3/getting-video-io-working-opencv-and-ubuntu-jaunty-/). I tired because I don’t want to reinvent the wheel of course, but not working like many comments on ‘cvCreateVideoWriter‘ function.
cd latest_tested_snapshot/opencv
./configure --enable-shared--enable-swscale--enable-gpl--with-swig
–enabled-shared : as shared library
–enable-swscale : alternative work around for ffmpeg
–enable-gpl : opensource library
–with-swig : regenerate swig interfaces
...
Video I/O ---------------------
Use QuickTime / Mac OS X: no
Use xine: no
Use gstreamer: no
Use ffmpeg: yes
Use dc1394 & raw1394: no
Use v4l: yes
Use v4l2: yes
Use unicap: no
Wrappers for other languages ========================
SWIG /usr/bin/swig -c++Python yes
Octave no
...
The highlighted configuration items are important, ffmpeg / swig / python. If everything is find, do make. The interface files in the checkout directory are not properly generated, so you have to generate yourself.
1 2
make sudomakeinstall
Test and Correct OpenCV Python files
1 2 3 4 5 6 7 8 9 10 11
$ cd/usr/local/lib/python2.6/site-packages/opencv
$ python
Python 2.6.2 (release26-maint, Apr 192009, 01:56:41) [GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license"for ... >>> import cv.py
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "cv.py", line 8473, in<module> CV_SEQ_CONTOUR=CV_SEQ_POLYGON
NameError: name 'CV_SEQ_POLYGON' is not defined
Open cv.py and Edit
1
CV_SEQ_CONTOUR=CV_SEQ_POLYGON
(line 8473) to
1
CV_SEQ_CONTOUR=CV_SEQ_POLYGON_TREE
Everything is done.
Example of OpenCV and PyGame
Displaying two Video Cameras as one concatenated video and record it to a file.
To make my program independent, I just copied the opencv python binding to the local directory.
I copied all of ideas from the Internet and just do it myself for my purpose. However, if you want, feel free to use above example under GPL v.2. Thanks.