Note: This content is accessible to all versions of every browser. However, this browser may not support basic Web standards, preventing the display of our site's design details. We support the mission of the Web Standards Project in the campaign encouraging users to upgrade their browsers.

Tobi Waves


INDEX | NOW | 2003|2004|2005 / 08 / 01|02|03|04|05

OSCON Talk: Perl 6 Endgame

Wednesday, August 03, 2005 10:45 // Portland, Oregon // href

by Damian Conway and Larry Wall

We are almost there, yet! Despite the naysayers. We are close to finishing the design of the language that was never going to be finished. We are close to finishing the implementation of the language that was never going to be implemented.

What is new in Perl 6

Strict and use warnings are always on

No strict refs necessary since the language use a different syntax

No strict subs since Perl6 has no barewords

No raw assignments in conditionals. Since there is a new operator for that.

if ($a = max()){...} becomes if (max() -gt $a) { ...}

String interpolation is much simpler. No more problems with user@address.ch still there are many more sensible interpolation possible with the new syntax. The most simple approach is to add braces in a string their contents will be executed as perl code.

say "The current time is {localtime}";

Every scalar has a method to sprintf it ...

$score.as('%6.2f')
%hash.as('%-10s %2f',"\n");

Single quotes can be modified with 'adverbs' to interpolate some things.

The heredoc syntax has been modified to

print q:to/END/
  blablbalb
  END

Note that the indation of the END marker specifies the left margin of the heredoc.

Indexkeys do not auto quote

 %hash{larry}

would call the larry function. Now use

 %hashltlarrygt 

for autoquoted keys. This creates a problem with filehandles. Use this instead

 while $fh.shift() {...}

or rather with the unarry iterator operator

 while =$fh {...} 

this operation is lazy, so you can use

 for =$fh {...}

and

 while (ltgt) {...} becomes  while =$ARGS {...} 

or rather

 while =ltgt {...} 

aka the fish operator. Filehandles automatically chomp any input.

In Perl6 every object has a perl() method that produces a perl representation of the data structure.

say $file.perl()

no more Data::Dumper.

There is a new reduction operator

$dot_prod = [+] @vec1 gtgt*ltlt @vec2

Perl6 has much better introspection capabilities via question referents

$?SUBNAME $?LABEL @?LABEL

The tell about almost any aspect of perls run-time as well as compile-time environment.

Play with Perl6 today, try pugs.

 

OSCON Talk: Apocalypse New! Perl 6 is here Today.

Wednesday, August 03, 2005 11:34 // Portland, Oregon, USA // href

by Brian Ingerson

Online (www.kwiki.org ...)

Pugs is just another CPAN module but it is a fully working Perl 6 interpreter. Pugs is implemented in Haskell which is a purely functional language.

Currently there are about 100 people with commit access to pugs and it is growing at a startling rate.

If you want to help with perl6 you do not need to know haskell, since a lot of code these days is written in perl6 already.

 

OSCON Talk: Customizing Firefox with Extensions

Wednesday, August 03, 2005 16:30 // Portland, Oregon, US // href

by Mike Shaver

Extensions for Firefox do everything from Add-Blocking to on the fly Website alteration with GreaseMonkey.

Extensions are composed of 4 elements. A manifest, Chrome (user interface components), Components (non-ui), Default settings.

If Extensions are popular and non intrusive to people who do not use them, they may get integrated into the default firefox.

User interface components are written in XUL, the same xml language Firefox uses for its own UI. XUL can insert new elements into the browser UI, it can add and alter attributes of existing UI elements and it even remove elements completely.

The best way to learn about writing extensions is to take a simple existing extension apart and modify it. Extensions are stored in .xpi files, these are just simple zip files with their file name extension changed. Unzip the file and off you go.

Extension writing in Firefox 1.5 was much simplified, so if you are starting out now, you may want to use the current firefox 1.5 snapshots (deer park) for development.

When you have created a usefull extension upload it to (addons.mozilla.org ...)

Analytical tools for extension writers: DOM Inspector, Venkman the JavaScript debugger.

Links

(xulplanet.com ...)

Books are ok as well, but things evolve, so while the base concepts are all the same you may have to adapt paths and node names to work with current versions of FireFox.

 

OSCON Talk: Extracting Ruby on Rails from Basecamp

Wednesday, August 03, 2005 17:25 // Protland, Oregon, US // href

by David Heinemeier Hansen

Rails is a Ruby based Webapp framework that came out of the development of Basecamp. Basecamp is a commercial Web based project management software written by (www.37signals.com ...)

Davids idea when designing rails was to pull out the good ideas from other languages and platforms into a context adapted to small resources available to David at 37signals (0.25 programmers and 1 designer).

Instead of designing the framework before writing Basecamp, David decided to write Rails by creating a method of extracting the framework from Basecamp. So instead of making assumptions about what he would need in the future, he writes Rails in parallel with Basecamp. He calls this application driven development.

How to be successful with an OpenSource project:

Be visible. If no one cares for your OOS project you could as well not "opensource" it, since the cost for publishing will never be recovered.

Release only once the culture of the project is fairly set, so that new influences through new users will not bend the project out of shape. Make sure you can handle the contributions and bug reports from your users.

Increase your visibility by taking on the 'leader-of-the-pack' be careful about aggressiveness though, since if you are aggressive towards others, you will also attract aggressive people to your project.

 

NEWER | LONGER |