Thursday, July 22, 2010

D, AmbientTalk, and Perl

D Programming Language

For system and application programming.
Large language.
Multi-paradigm: including functional, metal programming (assembler), the commonly used paradigms (OO, procedural), plus other paradigms
D can directly call any C function.
D matches C's ABI better that C++ does.
Functional programming = no mutual state.
A wickedly smart C++ meta-programming expert wrote the Generic paradigm of D.

AmbientTalk Programming Language

Scripting for mobile platforms
OO, Functional
Concurrent, distributed
Reflective
JVM, Android

State of the Onion
Larry Wall (Creator of Perl)

Painful for a non-Perl programmer...

Good and bad practices from the Linux Kernel open source project

Good and bad practices from the Linux Kernel open source project
James Bottomly (one of Linus Torvalds lieutenants)

Part of the motivation for Linux: even BSD code was hard to get outside the US
Founding: freedom to redistribute and contribute
Linus dislikes the 'cult of personality' associated with some open source projects
Not tracking the origin of contributions from the beginning is a lesson learned
Kernel developers try really hard to do development in the open
All patches should always first should go over a mailing list (a few have not)
“Even the best open source companies would, one in a while, like to keep code hidden until the product releases – classic example is Google with Android”
“There are sound reasons business reasons for doing this”
A transparent open dev policy creates a client of equality, trust, and franchise
Single committer model – “the Linus doesn't scale problem” … enter Bitkeeper
DVCS proved to be the solution
People who merged entire trees became Lieutenants
Solidification of the Maintainer Model
April 2005 – The Bitkeeper Blowout – Git was born
All of the Lieutenants at this time starting to working on Git (and Mercurial even)
They replicated the functionality of Bitkeeper in 3 months
Mercurial principles are similar to Bitkeeper; Git is much different
June 2005 – Git became stable enough to host Linux Kernel development
Mistake in Kernel development: Odd is Unstable version numbering scheme
Should have (and now does) a release early, release often model
The Linux Culture … a meritocracy
A negative: “Code costs effort to produce but Criticism is free”
People follow be example: some lieutenants flame a lot
Surviving the Critical Culture – learn who to listen to and who not to listen to (just watch the list)
People who only criticize and never contribute are not trusted by the community
LKL list (only 2 of 30 lieutenants still even read it – look for the smaller lists)
Advise on identifying mentors: look at contribution record, sometimes can be abrasive (nerd social ineptness)
Git cred: git log | grep
Conclusions:
- Full openness brings problems (but they are outweighed by community it creates)
- Ownership create franchise (conversely copyright assignment creates inequity)
- Mailing lists can be rough places, particularly with a critical meritocratic cultures
– To survive them, learn who the trust

The Desperate Perl Hacker





So I was confused by the "Desperate Perl Hacker" badge labels at OSCON. Why are we desperate? Is there something I should know?

The explanation I was given was that during the XML planning sessions, one of the requirements was that the spec should be implementable by a desperate Perl hacker in one weekend.

The Go Programming Language

http://golang.org/
Something to investigave.

K-9 Android Email App

K-9 Android Email App
Jesse Vincent (K-9 App Author)
Aside: on experiences of getting a Tmobile G1, downloading an early SDK, submitting a patch to Google, et al.
Very interesting stuff, eg: back then Google's internal Android repo was Perforce!
K-9 has been on the Android Market for a long time
Has been painful to keep support 1.6
Stuff learned last nite has already made it's way into K-9
Aside: When mentioning Subversion “I wish
No test suite (<--- an opportunity!)
Aside: Android Java is very easy to use, and useful

Perl Sessions

Wednesday was my Perl session day, so here's a glob of the 4 sessions I attended.

New Beginnings in Perl 5

Why switch to Ruby?

  • Got fed up with jumping through hoops

  • for example, unrolling @_

    • my ($arg1,$arg2) = @_

Why come back

  • use MooseX::Declare

  • use TryCatch

  • cpanm

  • NYTProf

  • Test::Class::Sugar

“Language design is premature optimization”



What's New in Perl 5.12


Perl5 is 16 years old (!!)

New CPAN goodness

  • Moose

  • Plack

  • cpanm

  • Devel::Declare

  • AnyEvent

  • Devel::NYTProf

Perl6 is a completely different language from Perl5

  • Perl5 and Perl6 are different versions of Larry's brain

  • rakudo.org

  • perl6 will not replace Perl5

What's new in Perl 5.12

  • 5.10 is not too new to use anymore

  • use 5.12.0 use strict

  • deprecations warn by default

  • suidperl is dead

  • Y2.038K compliant

  • DTrace support

  • sub do_something{...}


Perl 6


Perl 6 language specification

  • separate from implementation

Perl 6 implementations

  • Rakudo

  • Pugs

Rakudo *

  • early adopter distribution of Perl 6


Profiling Perl with Devel::NYTProf


Subroutine

  • Measures time spent in a subroutine

Statement

  • measure time from one statement to the next


Output

  • kcachegrind

  • HTML

  • Tree Map

  • DOT file (graphviz)


Exclusive time

  • Time spent executing statements in the current subroutine

Inclusive time

  • Exclusive time + time spent is called routines