Yesterday the first Perl 6 distribution was released. It’s named Rakudo Star:
Rakudo Star is aimed at “early adopters” of Perl 6. We know that it still has some bugs, it is far slower than it ought to be, and there are some advanced pieces of the Perl 6 language specification that aren’t implemented yet. But Rakudo Perl 6 in its current form is also proving to be viable (and fun) for developing applications and exploring a great new language. These “Star” releases are intended to make Perl 6 more widely available to programmers, grow the Perl 6 codebase, and gain additional end-user feedback about the Perl 6 language and Rakudo’s implementation of it.
If you’re interested to play with Perl 6 practically you may download the Rakudo Star here. Sure it isn’t stable and cannot be used in the real projects. But as the first step to Perl 6 it looks perfect.
If you like nature sound that service might be interesting for you. It offers a possibility mix four different tracks – sounds of beach, fire, rain or something else (not vuvusella, thanks God!) and save the result as a link to share with fiends or store it into file.
Aston Villa players started coaching in the new blackcurrant training kit with FxPro logo on the front. I like it as a FxPro employee and fan of English Premier League Waiting for the possibility to get a new Aston Villa shirt.
World Cup 2010 in the South Africa is finished. I watched and enjoyed almost all games. It was a great occasion for all football fans around the world! one month of hight quality football! I’ll miss it. At least till the middle of August when new European competitions will start – English Premier League, Bundesliga and Champions League.
If you’d like to refresh World Cup 2010 events in your memory have a look that fabulous photo set.
Recently I moved from Fedora 13 to Ubuntu 10.04 on my work laptop. So, I faced again with problem to setup Oracle PHP interface. Oracle provides RPMs only and not DEBs. So, to install the client RPMs should be converted to the DEBs. It can be done easily using utility alien:
Sure all GUI DB tools can do export of result of query into CSV file. But what if you have to do this from command line? There is a simple way perform that task. Here is an example:
SELECT *
INTO OUTFILE ‘/tmp/products.csv’
FIELDS TERMINATED BY ‘,’
ENCLOSED BY ‘”‘
ESCAPED BY ‘\’
LINES TERMINATED BY ‘\n’
FROM products
When you run that query all records from the table products will be dumped into file /tmp/products.csv. All fields of that dump will be delimited by comma, enclosed by double quotes and escaped by two slashes. Each row will be ended by end of the line character.
Sure you can change delimiter, enclose, escape symbols as well as add any others SQL statements such JOIN, WHERE, LIMIT ORDER etc. Enjoy!
UPDATED: Don’t forget to drop the export file before re-export data. Otherwise you’ll get the error:
CakePHP is a good PHP MVC framework. You can study it easily and start developing web sites very fast. But it has some disadvantages, of course. One of them is strange rules for transformation variable name when it set in the controller. Statement
$my_var = 'Hello world!';
$this->set('my_var', $my_var);
will make the variable $my_var accessible in your view: <?php echo $my_var; ?>
The phrase ‘Hello world!’ should appear on the web page. But if the same operation is done using function compact, the result is not predictable: $my_var = 'Hello world!';
$this->set(compact('my_var'));
Instead of ‘Hello world!’ you’ll see the warning about undefined variable on your web page. It happens because cakePHP removes underscore and makes letter, followed by it, capital. So, instead of $my_var you should use $myVar in the view: <?php echo $myVar; ?>
Note that this bug appears in the cakePHP version 1.2. It’s already fixed in the 1.3.