Thursday, 5 April 2018

Xorg Goes Out Of Action (again)

Trouble running xorg as normal user ?
Finding nothing useful in the X logs ?
Does startx or xinit work for root but not for you ?
Does your "Display Manager" (slim or {g,x,k}dm* or lightdm)
startup fine but fail to allow you to log in ?

You may be using devuan or debian or arch or even NetBSD .

Try this it _may_ help:
log in to a real terminal / console .

( something like )

try: you@yourhost~$ startx

No go ?  Then try this:
you@yourhost~$ mv ~/.xinitrc ~/xinintrc.copy

Now again: you@yourhost~$ startx

If that works :
1/ You need to ask your window manager / session manager
to run any apps you had auto starting in .xinitrc.
2/ You will also have to select _your_ desktop from the
display managers options or set the system default ...

ELSE Still no go ?

Bummer leave everything above done as is.
Next check that :
Your using xwrapper to allow X to create and destroy sockets on your behalf.
you@yourhost~$ man Xwrapper.conf
Its a short man page have a quick look.
see: /etc/X11/Xwrapper.conf
This has to exist and is activating the following settings :
See the man page for other options.

Try startx again if still no go you may have to install the Xwrapper:

Note / aside / man-splainer :

This apparently is now considered legacy or rather the assumption that your
using the systemd auth chain seems to be the thing to do.
So you could drink the grey gruel cordial ... or

You may need to install ""legacy"" versions of xorg
you@yourhost~$ apt-cache search xorg | grep wrap
==> xserver-xorg-legacy
(so go install that )
So now at least you can startx or xinit or X -query from a console.
Which is all I need.
Try lightdm if you need a Graphical Login / Display manager ...
If you need xdmcp may Gandalf help you :)
Do feel free to pass on my best wishes to the XDG Systemd *kits mafia .

They seem to also have broken PAMs auth chain ...
Hey bloat obfuscation and spaghetti is always better than simple and clean. Also BSDz are cool too.
The Hairiest shirt of all is NetBSD and it works fine !
Its quite possibly about and past time we had a proper minimal Linux distro. Devuan is cool though has the assumption that the "only" thing wrong is systemd.
FWIW I have no need or want for systemd in _any_ aspect:
- I like and even use runlevels or even simple rc.d
- Its fine for it to be in place it just need not be compulsory.

Thursday, 26 September 2013


Following is an hand formatted copy of the Majuro Declaration for Climate Leadership.

The Majuro Declaration Web Site. The Canonical Source for information.


1.   Climate change has arrived. It is the greatest threat to the livelihoods, security and well-being of the peoples of the Pacific and one of the greatest challenges for the entire world.

2.   There is an overwhelming scientific consensus that escalating greenhouse gas emissions continue to cause the sharp rise in average global temperatures over the past century, the alarming acidification of our oceans, the rapid loss of polar sea ice, sea-level rise, and the striking incidence of more frequent and extreme weather events all over the world.

3.   On 9 May 2013, atmospheric concentrations of carbon dioxide measured near the summit of Mauna Loa in Hawaii exceeded 400 parts per million for the first time since measurements began. In crossing this historic threshold, the world entered a new danger zone. Unless we quickly change course, global average temperatures are projected to rise by 4C or more above pre-industrial levels by the end of the Century, resulting in unprecedented human and environmental impacts.

4.   We,, the Leaders of the Pacific Islands Forum, underline the need for urgent action at all levels to reduce greenhouse gas emissions commensurate with the science and to respond urgently and sufficiently to the social, economic and security impacts of climate change to ensure the survival and viability of all Pacific small island developing States, in particular low-lying atoll States, and other vulnerable countries and regions worldwide.

5.   At the same time, we recognize that the necessary energy revolution and economic transformation to low carbon development is an unprecedented opportunity to enhance our security, protect and ensure the sustainability of our natural resources and environment, and to improve our people's health.

Our Responsibility to Act

6.   We confirm the responsibility of all to act to urgently reduce and phase down greenhouse gas pollution in order to avert a climate crisis for present and future generations.

7.   The responsibility of all to act falls to every government, every company, every organization and every person with the capacity to do so, both individually and collectively.

Our Commitment to be Climate Leaders

8.   We commit to be Climate Leaders.

9.   To lead is to act. In supporting this Declaration, a government, economic entity, company, civil society organization or individual commits to demonstrate climate leadership through action that contributes to the urgent reduction and phase down of greenhouse gas pollution.

10.   Recognizing our unique vulnerability to climate change, the predicted catastrophic impacts on the security and livelihoods of our people, and the significant benefits that come with our transition to renewable, clean and sustainable energy sources, we, the Leaders of the Pacific Islands Forum, confirm our climate leadership in the form of the commitments listed at the end of this Declaration. We also want to do more.

11.   We call on our partners to enhance, accelerate and ensure the effective delivery of their support for the design and implementation of the commitments of the Pacific small island developing States.

12.   We also call on others, in particular our Post-Forum Dialogue Partners, to contribute to the urgent reduction and phase down of greenhouse gas pollution.

13.   This Declaration is a platform for an upward spiral of action to urgently reduce and phase down greenhouse gas pollution. Those who support this Declaration are strongly encouraged to continue to scale-up their efforts by submitting for listing further specific commitments that contribute more than previous efforts to the urgent reduction and phase down of greenhouse pollution.

14.   In addition, we commit to accelerate and intensify our efforts to prepare for and adapt to the intensifying impacts of climate change, and to further develop and implement policies, strategies and legislative frameworks, with support where necessary, to climate-proof our essential physical infrastructure, adapt our key economic sectors and ensure climate-resilient sustainable development for present and future generations.

15.   This Declaration will be presented by the Chair of the Pacific Islands Forum to the Secretary-General of the United Nations as a contribution to his efforts to catalyze ambitious climate action and mobilize political will for a universal, ambitious and legally-binding climate change agreement by 2015.

16.   This Declaration and the actions under it are intended to complement, strengthen and augment processes under way and commitments already made, including those under the United Nations Framework Convention on Climate Change and its Kyoto Protocol.

17.   We agree to review the status and implementation of this Declaration at the 45th Pacific Island Forum Leaders' meeting.

Adopted in Majuro, the Republic of the Marshall Islands, on this, the 5th day of September, 2013.

The primary site for this declaration and some related information.

  • Canonical Information
  • Signatories Commitments

    Note this section reformatted for web use.
    1. Australia
    2. Cook Islands
    3. Federated States of Micronesia
    4. Kiribati
    5. Nauru
    6. New Zealand
    7. Niue
    8. Palau
    9. Papua New Guinea
    10. Republic Of The Marshall Islands
    11. Samoa
    12. Solomon Islands
    13. Tonga
    14. Tuvalu
    15. Vanuatu

    Subject Of CommittmentTarget or actionWhere reflectedYear
    Emissions Reductions

    Australia will unconditionally reduce its emissions by 5% below 2000 levels by 2020, and by up to 15% by 2020 if there is a global agreement which falls short of securing atmospheric stabilisation at 450 ppm carbon dioxide equivalent (CO2-eq) under which major developing economies commit to substantially restrain emissions and advanced economies take on commitments comparable to Australia's.

    Australia will reduce its greenhouse gas emissions by 25% on 2000 levels by 2020 if the world agrees to an ambitious global deal capable of stabilising levels of greenhouse gases in the atmosphere at 450 ppm CO2-eq or lower.

    Letter of 27 January 2010 from Australia's Minister for Climate Change and Water to UNFCCC Executive Secretary:

    Renewable Energy 20% of electricity generation from renewables by 2020.

    Australian Government,Department of Industry, Innovation, Climate Change, Science, Research, and Tertiary Education website, at

    The 15 Signatory Nations
    Cook Islands
    Subject Of CommittmentTarget or actionWhere reflected Year
    Renewable Energy

    50% of inhabited islands electricity needs to be provided by renewable energy in 2015, and 100% by 2020, through implementing the Cook Islands Renewables Energy Chart with key strategies that:

    1. Ensure the use of proven renewable electricity technology options

    2. Ensure the policy and regulatory environment is aligned with the 50% by 2015 and 100% by 2020 renewable energy goal

    3. Ensure ongoing education, awareness and advocacy for renewable energy and energy efficiency

    4. Strengthen the required capacity to implement the Cook Islands renewable energy targets

    UNFCCC prototype NAMA registry, available at

    Barbados Declaration on Achieving Sustainable Energy for All in Small Island Developing States (SIDS), available at

    The 15 Signatory Nations
    Federated States of Micronesia
    Subject Of Committment Target or action Where reflected Year
    Emissions reductions
    Renewable Energy
    • Decrease the import and use of imported petroleum fuels by 50% by 2020.
    • 10% of electricity in urban centres and 50% in rural areas will be generated using renewable energy sources by 2020.
    • FSM will have a net gain of area covered by forests between now and 2020.
    • FSM will have a net gain of area and health status of coral reefs between now and 2020
    • FSM will remain a net importer of GHG through 2020.
    FSM Strategic Development Plan (2004-2013), pp. 301-305, available at 2004
    The 15 Signatory Nations
    Subject Of Committment Target or action Where reflected Year
    Renewable Energy Fuel reduction target for electricity generation in Kiribati by 2025:
    1. South Tarawa: 45%
    2. Kiritimati: 60%
    3. Rural public infrastructure: 60%
    4. Rural public and private institutions: 100%
    IRENA profile on Kiribati, available at
    The 15 Signatory Nations
    Subject Of Committment Target or action Where reflected Year
    Renewable Energy 50% of electricity generation to by provided by renewable energy by 2020.

    Long-term milestone - Viable power generating capacity including alternative renewable energy sources by 2025.
    Barbados Declaration on Achieving Sustainable Energy for All in Small Island Developing States (SIDS), available at
    The 15 Signatory Nations
    New Zealand
    Subject Of Committment Target or action Where reflected Year
    Emissions reduction Reduce emissions by 5 per cent below 1990 levels by 2020 2012
    Emissions reduction New Zealand is prepared to take on a GHG emissions reductions target of between 10 per cent and 20 per cent below 1990 levels by 2020,if there is a comprehensive global agreement. This means that:
    • 1. The global agreement sets the world on a pathway to limiting temperature rise to no more than 2C;
    • 2. Developed countries make comparable efforts to those of New Zealand;
    • 3. Advanced and major emitting developing countries take action fully commensurate with their respective capabilities;
    • 4. There is an effective set of rules for land use, land-use change and forestry (LULUCF); and
    • 5. There is full recourse to a broad and efficient international carbon market.
    UN document FCCC/SB/2011/Inf.1/Rev.1, p.6, available at 2010
    Emissions reduction The Emissions Trading Scheme is New Zealand?s primary tool to help reduce New Zealand?s emissions and help New Zealand meet its international obligations under the United Nationals Framework Convention on Climate Change (UNFCCC). The NZ ETS has ensured New Zealand will meet its binding emissions reduction commitment under the first commitment period of the Kyoto Protocol. It will be a key tool to help NZ meet its 2020 target and any future targets, and will continue to develop through a series of independent reviews. 2008
    Renewable energy New Zealand quantitative renewable energy targets are:
    • 1. 90% of electricity generation from renewable sources by 2025 (in an average hydrological year), providing this does not affect security of supply
    • 2. By 2025, utilise up to 9.5 PJ per year of energy from woody biomass or direct use geothermal additional to that used in 2005.
    New Zealand Energy Strategy 2011-2021 and New Zealand Energy Efficiency and Conservation Strategy 2011-2016 2011
    The 15 Signatory Nations
    Subject Of Committment Target or action Where reflected Year
    Renewable energy 100 % of electricity generation from renewables by 2020. IRENA country profile for Niue, available at 2011
    The 15 Signatory Nations
    Subject Of Committment Target or action Where reflected Year
    Energy Access
    Renewable Energy

    Deliver clean, secure and affordable energy for all citizens of Palau while treating the environment responsibly.
    Respond to the risk of climate change by adaptation to changes and by mitigation through reducing greenhouse gases caused by the production an\ d use of energy.

    Barbados Declaration on Achieving Sustainable Energy for All in Small Island Developing States (SIDS), available at http://www.u\ 2012
    Energy Efficiency

    A vision for a reliable and resilient energy sector delivering sustainable low emission energy services by:

    1. Providing clear policy direction on the future of Palau's energy sector

    2. Appropriate regulations to secure energy services at competitive prices

    3. Maximizing cost efficient energyefficiency and renewable energy resources and conservation of energy while safeguarding the environment

    4. Promoting environmentally sustainable energy technologies with the aim to substitute fossil fuels

    5. Supporting consumers through the transition towards renewable energy

    Renewable Energy 20% contribution of renewable energy to the energy mix by 2020. 30% reduction in energy consumption though energy efficiency and conservation Palau Strategic Action Plan Energy Sector, p.9, available at\ pdf
    The 15 Signatory Nations
    Papua New Guinea
    Subject Of Committment Target or action Where reflected Year
    Emissions reduction Decrease GHG emissions at least 50% before 2030 while becoming carbon neutral before 2050 UN Document FCCC/AWGLCA/2011/INF.1, pp. 38-40, available at 2011
    The 15 Signatory Nations
    Republic Of The Marshall Islands
    Subject Of Committment Target or action Where reflected Year
    Emissions Reduction

    Renewable Energy

    Energy Efficiency

    Energy Access
    Pursuant to the Republic of Marshall Islands 2009 National Energy Policy and Energy Action Plan, the 2011 National Climate Change Policy Framework and Joint National Action Plan (for climate change adaptation, energy security and disaster risk reduction), and the Green Energy Micronesia initiative:
    • 1. A 40% reduction in CO2 emissions below 2009 levels by 2020;
    • 2. Electrification of 100% of urban households and 95% of rural outer atoll households by 2015;
    • 3. The provision of 20% of energy through indigenous renewable resources by 2020;
    • 4. Improved efficiency of energy use in 50% of households and businesses, and 75% of government buildings by 2020;
    • 5. A 20% efficiency improvement in transportation sector fuel use by 2020;
    • 6. Feasibility studies and internationally supported financing plans for innovative "game-changing" renewable energy and sustainable development opportunities including Majuro atoll waste-to-energy and Kwajalein/Ebeye atoll OTEC plants undertaken by 2015
    Barbados Declaration on Achieving Sustainable Energy for All in Small Island Developing States (SIDS), available at: http://www.un\ 2012
    Emissions reductions 40% reduction of CO2 emissions below 2009 levels by 2020, pursuant to the 2009 National Energy Policy and Energy Action Plan, and with subject to the provision of adequate international support. UN Document FCCC/AWGLCA/2011/INF.1, p. 30, available at 2010
    The 15 Signatory Nations
    Subject Of Committment Target or action Where reflected Year
    Renewable Energy

    Energy Efficiency

    1. To reduce the growth rate in the volume of imported fossil fuels by 10% by 2016. The high level indicators for this overarching goal/objective are:
      a. Energy Sector Plan launched and implemented with at least 75% of targets achieved by 2016;
      b. Increase in the contribution of RE to total energy consumption by 10% by 2016;
      c. Increase in the supply of RE for energy services by 10% by 2016;

    2. Increase Public and Private investment on Renewable Energy in transport fuels and electricity generation.

    3. Energy regulatory function established.

    Barbados Declaration on Achieving Sustainable Energy for All in Small Island Developing States (SIDS), available at http://www.un\\ /Energy/Samoa%20Energy%20Sector%20Plan-Final%20Version-Master.pdf
    The 15 Signatory Nations
    Solomon Islands
    Subject Of Committment Target or action Where reflected Year
    Energy Access
    Renewable Energy
    Energy Efficiency

    1. Replace current use of imported fossil fuel for electricity generation by 100% by Year 2030

    2. Increase access to reliable, affordable and stable electricity grid by 50% from the current 12% by Year 2030

    3. Reduce the price of electricity by half the present tariff rate by 2020

    4. Increase access to Solar-Home-Systems by remote rural dwellers located far from electricity grid from current 8.7% to 30% by Year 2020.

    Rio+20 website, indicating voluntary commitment by Solomon Islands under the Barbados Declaration on Achieving Sustainable Energy for All in Small Island Developing States (SIDS), available at:\ 53&nr=250

    Renewable Energy 50% of electricity generation from renewables by 2015. IRENA country profile for Solomon Islands, available at\ lands.pdf
    The 15 Signatory Nations
    Subject Of Committment Target or action Where reflected Year
    Renewable Energy

    Energy Efficiency

    Energy Access

    1. To reduce Tonga's greenhouse gas emissions and improve energy security through 50% renewable energy mix in the Energy Transformation sector by the end of the Tonga Energy Roadmap 2010-2020 [TERM] implementation period.

    2. To improve efficiency of electricity supply and demand sides by 18% by the end of the TERM implementation period.

    3. All Tongans shall access to clean, reliable and affordable energy services by the end of TERM implementation period.

    Establish phased, comprehensive set of action plans to put in place a long-term institutional arrangement, which provides strong leadership and coordination of energy sector activities.

    Barbados Declaration on Achieving Sustainable Energy for All in Small Island Developing States (SIDS), available at http://www.un\ 2012
    The 15 Signatory Nations
    Subject Of Committment Target or action Where reflected Year
    Renewable Energy

    Energy Efficiency

    1. Power Generation - 100% renewable energy between 2013 and 2020

    2. Implementation Principles
      - Solar PV 60 - 95% of demand
      - Wind 0 - 40% of demand (if feasible)
      - Biodiesel 5% of demand (import)

    Energy Efficiency - improvements of 30% of current annual demand of Funafuti.

    Barbados Declaration on Achieving Sustainable Energy for All in Small Island Developing States (SIDS), available at http://www.un\ 2012
    The 15 Signatory Nations
    Subject Of Committment Target or action Where reflected Year
    Renewable Energy 100% of energy from renewables.
    40% of power generation through renewables by 2015
    65% of power generation through renewables by 2020
    RENA country profile for Vanuatu, available at
    The 15 Signatory Nations

    Saturday, 14 September 2013

    Thorium Based Nuclear Power Is An Option

    This page is not meant to be an in depth study of Thorium Reactors. Its an introduction to the fact that they have existed and are about to exist again. They have many benefits, and are a much more useful and manageable process than any current solid fuel Uranium based reactors.

    You know those times , online usually, when some often well intentioned fellow traveller says that nuclear is the only truly green option ....

    You / they / we may have read this
    Treating the Symptom

    Which doesn't really make a great case for keeping the current stock of Reactors. Or believing that a new crop has all bases covered.

      The core arguments include;
    • carbon capture is cool but not up to it.
    • safer than coal.
    • new reactors are safer than old designs

    Well, assuming that the usage case implies a very high density fuel (as implied by Nukes), ask them why Thorium is not an option worth exploring.
    If your going to exploit some of the most dangerous stuff in the solar system you may as well get it as right as it can be.
    The safe operation of such potentially dangerous production, supply and disposal processes
    should be intrinsically safe.
    What are you going to be doing 200 years from now ?

    The World Nuclear Association, has a page on thorium.
    Wikipedia does as well. With references and cross links.
    Thorium Nuclear power

    Norway has a start and they have an abundance of North Sea Hydrocarbons.

    This blended method can be readily used in rod type reactor... well maybe you wouldn't retrofit .. no idea how hard that would be.

    Then there are Liquid (fluoride) Salt type reactors, a much better long term and scalable solution.
    Liquid fluoride Thorium Reactor

    Its all right there with references .

    Finally point out that they are weighting the "base load" thing , and the "energy density" thing, mythologies way too highly in any case.
    But hey, there are places it makes some sort of sense:
    Norway India and China think so.

    • Places with high population densities and low access to space and renewable energy, are one.
    • Places where Nuclear and associated grid / support structures are already in place. These reactors can even help consume (some of) the waste.

    Tuesday, 2 April 2013

    Building and Installing E17 from stable release

    When edje wont build

    check for previous (obsolete) installs for EFL and E17 development packages.

    Its April 2013 as I write this.
    Over Easter  I finally got around to _successfully_ building the latest Released (stable) version from the Enlightenment Main Site .
    The Released page.

    Now this is (should be) straight forward enough essentially you build the Enlightenment Foundation Libraries then build the desktop manager/shell  (E17) and away you go. The usual caveats around building from source apply of course. You will need quite few other dev libraries that you may or may not have in place.

    If you get all the way to edje and then it breaks, before you waste a heap of time manually relinking and checking $PATH and permissions, reading all the ./configure --help(s) ... and grepping through code tracing the linkages ...
    googling around in circles ...

    Do yourself a favour purge all the packaged development libs and apps or simply move them out of the way.

    I had only purged e17-dev and this was not enough.

    ((DOH) Well of course it wasn't I was building the Foundation Libraries, the desktop (e17) may be treated as a nice side effect :)

    I had totally forgotten I had installed the Debian prepacked versions months ago for reasons I now only vaguely remember.

    Here is list of them for Debian (.deb) based distros I expect they will be very similar for others.

      libedje-dev - libedje headers and static libraries
     libeet-dev - Enlightenment DR17 file chunk reading/writing library      development files
    libefreet-dev - Development files for libefreet and libefreet-mime
    libelementary-dev - Development files for libelementary
    libevas-dev - Enlightenment DR17 advanced canvas library development files
    e17-dev - Enlightenment headers, static libraries and documentation

    I suspect its the edje and possibly the e17 devs that cause issues that are not resolved by the $PREFIX settings at build time.

    The symptom is that edje wont build as its compile gets pointed to old versions of its precursors. (dependencies)

    ./configure wont warn you about this :)

    So as your going to be building from source anyway you may as well --purge them. Some equivalent to :

    apt-get remove --purge libedje-dev libeet-dev libefreet-dev libelementary-dev libevas-dev e17-dev

    I haven't looked into the details but will note that most ./configure (s) appear to have options that would also solve the issue ... I can't see the point having them as they are way out of date and now (soonish)  not needed.

    Other thoughts and notes:
      Use the released tarballs at least at first, getting the developers latest stuff is quite massive and probably in a rapid state of flux in any case.
    (Lets not talk about WTF is going on with VCS ...)
    In any case you will need to gather some familiarity before doing SVN or bzr <-> git.

    So with this in mind or some functional equivalent as you see fit go ahead and start again :)

    I will post a step through next post.
    Its quite doable following the instructions at the main site.
    (and avoiding the developers docs which may lead you to dark places)

    Sunday, 17 February 2013

    Neuromorphic engineering - Wikipedia, the free encyclopedia

    Place holder....
    RN Future Tense had a piece on the "Human Brain Project" which in itslef is notabale, humans have been working on Artificial Intelligence" natural language Processing etal for ... hmmmm hundreds of years. ( depending where you draw that line)
    [ say the middleish 1800's ]


    Spin states are inherent to electrons, which are constantly spinning, imparting a momentum to their electrical charge which can be oriented “up” or “down”. Such spin-polarized electrons can be used to encode digital ones and zeros using much less energy than just piling up charge on a capacitor. Ideally, a single electron could be used to store a digital one as “up” spin and a digital zero as “down” spin, enabling the ultimate downsizing for parallel processors to one-bit-per-electron. And for intrinsically parallel applications, such as emulating the billions of neurons in the human brain, the super low power achieved by spin-polarized digital encodings could enable the ultimate parallel processing applications of the future.

    Neuromorphic engineering - Wikipedia, the free encyclopedia:

    Ah the holy Grail.. Analogue and Digital together....
    In the Algorithm and the storage.

    The memristors and "spin"  are the partial breakthrough here.

    Hmmm maybe the singularity is closer than I thought !

    Quantum Computing,  memristors,  Analogue Computing

    'via Blog this'

    Friday, 15 February 2013

    Some Commented Erlang

    Was pondering the whole von Neumann bottleneck cf. Quantum computing  .....

     (LOL not really)

    Was reading this python doc on function programming  a  (longish) while back ...

    Decided to go snorkling into concurrent programming  etal. ...
    So  l o n g   s t o r y  short :
    The intention is to learn some sound(er) principles from a number of places and apply them to my work generically where possible, after all why not, it's all good..

    FWIW I'll drop some stuff more or less randomly here and make some arrogant pontifications later :)

    The  primary languages of exploration are Erlang and Python so far... possibly C soonish.
    (thats more than I need or possibly  even deserve :)

    Turns out I have accidentally  learnt (a lot) from python anyhow [gasp!] , and even applied some rudiments  to my standard bash approach. [ bigger gasp :>]

    IMHO Erlang seems to have an _undeserved_ "hairy" reputation. 

    Here is a commented (day 2 level)  Erlang module.

    I extended it slightly and added comments that helped me.
    Perhaps they may help somebody else.

    Mostly from an  excellent Erlang course ,.

    -export([factorial/1, area/1]).

    %% from
    %% (not original) -author('pete@ruthie.tux').

    %%%% area :: calculate square circle or triangle areas 
    %%%% match atom  to evaluate Variables

    area({square, Side}) -> % this tuple made of: {atom, Variable} 
        Side * Side;
    area({rectangle, Length, Width}) -> % this made of {atom, Variable, Variable}
        Length * Width;
    area({circle, Radius}) -> % well almost PI is NAN (here we only do radii)
        3.14 * Radius * Radius;
    area({triangle, A, B, C}) ->
        S = (A + B + C)/2,
    %% that must be inside -> out eval ... like "normal"
    area(Other) ->
        {woops_invalid_tuple_content, Other}. % any un matched atom spit error

    %%%% single parameter only exported at module head ?  
    %%%% Its OK we require {a, {tuple, as}} input parameter(s)

    %% return the factorial of the single parameter
    %%  disallow div by 0 ! It really hurts. (fire extinguisher required)
    %%  a guarded function  in two clauses
    factorial(N) when N > 0 ->
        N * factorial(N - 1);
    factorial(0) -> 1.

    The code would live in a module (file) named mathStuff.erl and be compiled from
     the erl shell or whatever method (emacs etc) you like.


    ~/ erl

    Eshell V5.9.1  (abort with ^G)
    1> c(mathStuff.erl).

    (on a perfect day :)
    It will compile the x.erl file > x.beam file.
    Everything is named the same.
    There are header (.hrl z :) files as well and includes may have records, even "macros"  etc ... just haven't got to them yet.

    From an erl shell (and the same directory for simplicity) you can call this like so:

    61> mathStuff:area({triangle, 3, 4, 5}).

    (the 61st thing I had done in the shell)
    So the area of the triangle is 6 whatevers ... great :)

    We asked the module mathStuff for its exported function area() to "process" (->)
    the tuple  {triangle, 3, 4, 5}


    62> mathStuff:factorial(3).

    63> mathStuff:factorial(6).

    Random Observations so far.

     module:foo() is way more readable than most anything else I have seen.
    (yeah I know you can intit to whatever candy you like in most languages.)

    Erlangs reads reasonably easily even after just an hour or two.. once you see where "output" is coming from.  There need be no print() though there is a thing similar to "printf".

    One of the ideas is to have no side-effects
    (and bounce / break on invalid input.)

    Actually a core idea is to NOT muck about (as much) with allocated memory.
    This language cleans up ASAP as well.

    Lots to grok if you haven't seen Erlang before but its actually elegant and simple.
    If you are used to python you wont have issue with the function structures think of them as
    if elseifs or case switch statements ... though you wont for long. :)

    A function is simply a collection of clauses to match and ends with a full stop.

    Think of the fullstop  as "complete ! Now Grunge".

    Yep there are Objects. (well not formal classes (yet) but I guess you could )
    (go use python or java or C++ or Perl)

    Variables Must Have At Least The First Letter Capitalised.
    Variables once bound are not reset (per instance) if you try it crashes the function.
    (and quite loudly too :)

    So there are no i++ (or "normal" loops) for example., and no need.

    Emacs has very good support for the language. And you can run a shell in a second window.
    (and learn elisp someday)

    The  Erlang Docs site has excellent documentation about the hows and whys.
    If nothing else browse the site and contemplate:
      concurrency parallelism 
      "threads" Processes 
      imperative VS declarative . 
      functional programming [1]  
    (or not :)

    And yep I did div/0 , not a good look.
    Mind you I've seen worse runaways.

    apt-cache search erlang
    (or whatever your nix does)
    [1] see also: the extended python docs (comes with a full install) about this.
    Its what got me wondering about it all.

    Xorg Goes Out Of Action (again)

    Trouble running xorg as normal user ? Finding nothing useful in the X logs ? Does startx or xinit work for root but not for you ? Does yo...