Thursday, November 19, 2009

pylates

Posted some code I've been working on lately. "Project is built on Java and jython mix to extend StringTemplate library functionality (popular among ANTLR community) and bring to it the power of python language, which can turn out quite handy. The aim is to build such a library that it can support and understand interfaces for group of string templates, implement such interfaces in python as PyStringTemplate, and even inter-operate with common string templates."

Tuesday, November 17, 2009

the labyrinth

paraphrasing: "to see the labyrinth as a proper, big and attractive picture, but to walk step by step the chosen path, visible with a naked eye"

Saturday, July 25, 2009

Re: "Open Existing Project in Eclipse"

Original post is here
well, there exists completely alternative solution, nonetheless - fully compatible with common sense.

Assuming you are under linux and your eclipse workspace path is default.

>cd ~/workspace
>ln -s <full_path_to_external_project>

(exchange <full_path_to_external_project> with your own)

Now create a new project in eclipse with the same name as your new symlink. That's it.

For professional windows guru the use of junction is hirely recommended.

Friday, July 24, 2009

pyQuery

Today (in the morning), I've finished a scratch on promising python query tool pyQuery. Well, a lot of ideas of how to move forward with its design are in the air, especially when one has a rich experience of jQuery tool at his disposal. Project can be found here. I am also starting a separate blog to collect and compost pythonical ideas of such and similar nature. Although, I am not a big blogger there is still a hope something useful will come out of it.

I will start blogging about @protective decorator (see details).

Thursday, July 16, 2009

Howto install rumus2 on Ubuntu amd64 / x86-64

I have a desktop Ubuntu amd64 installation (64bit kernel and binaries). But this practice should work in general for 64bit.

1. Download the latest Linux (Debian) binary package distribution of Rumus2 software from http://www.fxclub.com/rumus/


2. Install the package using the following command:
sudo dpkg -i --force-all Rumus2.deb
Usually, package files are placed into /usr/local/

3. To resolve 32-bit binary dependences (for example, /usr/local/bin/rumus executable depends on libqt-mt.so.3) you can use the getlibs tool, details about which you can find here http://ubuntuforums.org/showthread.php?t=474790
or just google for ubuntu getlibs.

Usually you can install it from packages:
sudo aptitude install getlibs


4. Resolve the dependences by running
sudo getlibs /usr/local/bin/rumus

5. Enjoy!

Thursday, June 11, 2009

Command line for Quercus project - Php in Java

Quercus is a mature industry oriented platform for PHP/Java solutions. Well, it is around for a few years, has a rich PHP modules support, and is claimed to be faster then mod_php, because of compiled bytecode, cache management, etc.

Unfortunately that beast is primary targeted to support web applications only under Resin werbser. But with closer look, it turns out that not only the webserver presense is not required, but you can actually run it from command line. I have recently added this pet project - an ad hoc to support detached functionality of this nice PHP in Java implementaiton.

All the feedback is welcomed. Future plans are to do a lot of testing, properly mimic php-cli behaivor, implement CGI support.

PS

Alternative projects are ProjectZero and Faun. The last one is also my lovely pet ;)

Friday, June 5, 2009

cool flash photogallery software

Here it goes in action. And here is the website of the project. It is really cool, minimalistic, and I truly favor the mouse scroll. Would be tricky to do the same with AJAX ;-)

And the rotating effect by the guys behind
JW FLV Player (Open Source). This is the 'first" open source flash player and one of the most popular on the net. Well this rotator is also a nice gallery =) Here is the demo in "practice".

Wednesday, May 27, 2009

Lambda Templates

I have just putted this piece of code into the repository together with small wiki article.

LambdaTemplates
Building a very trivial tool for programmable templates support

Background

Template techniques are widely used in programming languages and, of course, the web. This small piece of code that I have "cleverly" called Lambda Templates is yet another string substitution tool (as I have found out later initially very similar to String Templates by Terrence Parr).

Usually, templates mechanism tries to follow procedural paradigm of text generation by simple replacing of a bunch of specially marked placeholders with passed values. For my needs, I wanted to have something very short at hand: to call a method and process the result further within the program code.

Examples

To set a constant string value to some variable, one calls $p->setVar('foo','bar');. Apparently, $p->getVar('foo'); will return the corresponding value.

Now the name Lambda featuring the title, comes from Lambda calculus by Alonzo Church, where one can observe a sort of substitution mechanism for resolution of specially build logical expression. Well, actually the resemblance ends at the point of using "/" that mimics lambda symbol in lambda expressions.

Once again, the idea behind a lambda template is actually as trivial as this: /fruit. this is a fruit - an example of parametrized template's value. Because it's inspired by lambda calculus, we don't give a name for this expression inside the value. The comma separated list of argument names between LAMBDA and DOT symbols, are actually names that will be reserved for substitution after DOT.

Grammar will be something like

expression := body | LAMBDA (argument COMMA)* DOT body;
body
:= CHAR*;

Further examples are:

$p = new LambdaTemplates();
$p
->setVar('x','10');
$p
->setVar('what is x','/x.is /x = x?');
echo $p
->processTemplate('question: %what is x%');

$p
= new LambdaTemplates();
$p
->setVar('titel','herr');
$p
->setVar('name','y.y.');
$p
->setVar('titelname','/titel,name.titel name');
echo $p
->processTemplate('question: %titelname%');

Global scope

Current implementation does not support a proper functional paradigm for templating with closure and application constructions (and maybe proper reduction). All parametrized names inside argument list are applied globally, that is extracted from the global scope of values and substituted to the expression.

Friday, May 22, 2009

light bot

Great game in Action Script. Maybe the simplest way to teach basic algorithm development skills ever.

Drag and drop actions (icons) into the sequence to create a small program.

Your goal is to light the lamp over special blue areas.

And "programming" of the game can go pretty sophisticated, that is functional (see the following picture):



Idea behind is pretty cool, although not new. There are a lot of cases where games exploit mechanical scenarios and achieve amazing resembles of certain automaton model with questionable equivalence to some Turing Machine.

Wednesday, May 13, 2009

meditation cite

Meditation brings wisdom; lack of meditation leaves ignorance. Know well what leads you forward and what holds you back, and choose the path that leads to wisdom.

Saturday, April 18, 2009

a hybrid : javascript inside a bat file

Truly nice mix! ;-)

Originally by this guy

// Jim Lawless
// jimbo@radiks.net
// http://www.radiks.net/~jimbo

Your.bat file:

rem ( /*
@echo off
cscript /nologo /e:javascript %0
goto end
*/ )

//
// main function is below

function rem() {
WScript.StdOut.WriteLine("Hello, world!");
}

/*
:end */

Wednesday, April 8, 2009

Today is a greatest day of spring!

"Путешествия позволяют получить точное представление о реальности, а не заполнять её воображаемым содержимым."

"Journeys allow to obtain the exact understanding of reality, without filling it with any imaginary content."

Great words of some guy =)

Saturday, April 4, 2009

I want to do iwhiteboarding with OMDoc

The following technology tip is a "nice to know" thing, so bother yourself reading this post only if you are up to inspiration search.

Most of you should know TED talks, which is quite a remarkable "talks" archive among relevant mass media. BTW it also has a channel on youtube.
For instance, you can meet there talks by nobel prize holders, or in KWARC case a talk by Tim Berners-Lee would be not really inspiring, but curious
http://www.youtube.com/watch?v=OM6XIICm_qo&feature=channel

Now if you are carefully following the mainstream of IT gadget development, you will not be surprised by multi touching interfaces and projected surfaces of extended reality, with all the corresponding software. Well there are a lot of talks like this mainly by TED, but also by google tech and others.

Here is a story of one technical and cheap (industry oriented) approach to so called interactive whiteboards. The hero of a story is Johnny Lee, and his hack will certainly kick into agility of white board demand (by e-learning).
> ".. Lee is best known for his work on extending the functionality of the Wii Remote controller of the Wii video game console, most notably by taking advantage of its high resolution IR camera. Lee's other projects include an interactive whiteboard, 3D head tracking, and finger tracking." (c) http://en.wikipedia.org/wiki/Johnny_Lee_(computer_scientist)

Johnny Lee's wii remote hack
http://www.youtube.com/watch?v=QgKCrGvShZs&NR=1

Please see the relevant videos to catch how easy it is to implement youtube spread idea of wii hack in practice, especially
http://www.youtube.com/watch?v=8UDMimkCD_4&feature=response_watch

My first impression of iwhiteboard was "I want to do OMDoc on it". Now I know that theoretically I can do one myself for a few hundred Euro, because of the discussed trick.

I wounder how soon it will take us to do OMDoc interactive white board queering and browsing ;-) KWARC should seriously consider the idea of writing some trivial iwhiteboarding OMDOC support software. Well that could be some presentation layer of SWiM with full featured SWiM iboard support in mind.

Anyway, if there were canonical mathematicians unsure of computational proving methods (mainly because you need to get too deep into computer science to do the check), there is a high probability that they could be cheaply bought and converted by the use of new "old" means. I am sure that now we are witnessing an industrial manifestation or even a presence (not only science fiction domain idea), that one can do an old style "piece of chalk" black board math and not see a difference. Well, of course there is a difference. Now I can interact with mathematical objects on a board not solely in my private conceptual domain, but having "all of Bourbaki" [(c) Michael Kohlhase] under my stylus.

PS

If you are still bored, watch this for ideas of iwhiteboard extension into daily life (6th sense as meta information management, well, basically, knowledge management):
http://www.youtube.com/watch?v=nZ-VjUKAsao

Friday, April 3, 2009

sec_error_unknown_issuer

Firefox 3.0 and above have the offensive wardship with serious security issue complains. Especially this is true for self-made certificates. Since policy 1.2 official vision is here.

Previous versions of Firefox were ok after playing with

about:config -> browser.ssl_override_behavior = 6

Attention! This trick doesn't seems to work so well when you use proxy connection.

A short story of "safe" alternative and fundamental solution:

  • make sure you don't use any proxy, at least to accept a desired certificate

  • install "perspectives" extension

  • (Optional) SSL Blacklist 30MB

  • (Optional) Finally, about:config -> browser.identity.ssl_domain_display = 1 to do the highlighting with SSL domain


For more details see the article.

Wednesday, March 25, 2009

Antlr eclipse: to plug on not to plug

This is just a reminder for me.

This commercial soft looks very much of appealing, but I bet it will not write grammars instead of me, so computer still needs a human.

Following such simple logic, why not to use a free plugin. This antlrv3ide works for me.

Of course, one can always specify antlr as an external tool.

PS after a short test run antlrv3ide does the job. I have grammars highlighting editor, and I can generate the code by button click.

Saturday, February 28, 2009

Wikipedia corpus

While there have been a lot of speculation around Web 2.0 and Semantic Web manifestations of wikipedia like nature, Wikipedia itself is a great corpus to do information retrieval and run semantic experiments on (just saying the obvious).

Never the less this is well understood by such startups as

http://www.powerset.com/ a tool with fancy UI design to do NL "search"

and

http://www.freebase.com/ one of the promising social networks for "I like" information. Not really another facebook or digg.

Both companies do a lot of retrieving for further compilations just like DJs like to play with Beethoven's pieces.

Saturday, February 21, 2009

Real entities

Today I have wasted several hours for the concept outline of my new open source startup. The idea behind is so simple, based on all well known components. But as a join vision I think that is a new simple way of designing quick light-weight database applications. Now the most challenging task is, of course, not the idea of atomic hashes itself, which is trivial, but the implementation of the query language for the project. Once you have a version control like svn content management for data maintain, realentities library is a solution worth to consider.