Monday, December 12, 2011

The Higgs Discovery Near?

I love Europe. This would not be possible without their investment in Physics and LHC. (The RIM guys did good here in Canada as well)

And whether it is finally found or not, we can be sure it will be either "proved" or "disproved" in the next short while (short - relatively.. months or a few years max).

Exciting either way.

http://www.bbc.co.uk/news/science-environment-16116230

Sunday, December 11, 2011

(Almost) fixed back pain, and how it relates to 2 years off from open/free source tinkering hopefully over



Since I was a teenager I had issues with my back. Perhaps not so surprisingly, they always got worse not by doing "something" (physical like sports) but rather doing "nothing" (such as sitting at a desk, thinking, and/or coding uninterrupted for weeks of 16 hours a day if not more). Playing hockey once a week did not really help much. Over the years I did more and more of it, not only doing paid work or things that would initiate it, but also did large amount of tinkering and playing with open source stuff.

Finally, over two years ago, I had an extensive busy period at work, while starting software for a shutdown planning prospective business, and also playing and involved with Etoys, Squeak and other software that interests me.

Unfortunately the load also resulted in an extended period of back trouble to the point it was hard to even do my work. So about two years ago or so, I decided to quit everything but software I need to do for living to save the sanity of my back. I still did follow things like Etoys, but spent way less time. Also I started doing things to fix things - gym, five minute breaks, better posture, and general "being aware" when things go bad.

All that waiting seems to be working so I plan get back to do more things for fun. I started to investigate Google's Native Client as a way from the prison of "web architecture", ran into some early issues on Opensuse but that got resolved. I plan to look at Yoshiki Ohshima's Squeak port to Nacl and see if Etoys can run that way instead of in a plugin. Not quite a "commitment" but a plan.

Wednesday, December 07, 2011

Exponential Growth of Interest in Dart

Exponential Growth of Interest in Dart

So,  the GOTO in Aarhus is long in the past. Dart was introduced. It's features are good as one would expect from people who know what they are doing. I would prefer a Smalltalkish-Newspeakish syntax but did not really hope for it too much - the world does move slowly after all.

I kept an interesting statistics the first few days after Dart was announced. I keep my links on delicious and every day I checked number of delicious bookmarks marked as dart for http://www.dartlang.org/. It was surely non exact, the count was taken at different times of the day, rounded them, some days I forgot, but it went like this:

2011-oct-10 : 712 saves
2011-oct-11 1924 saves
2011-oct-12 3800 saves
2011-oct-13 6700 saves

2011-oct-14 ??? saves

2011-oct-15 12585 saves
2011-oct-16 ??? saves
2011-oct-17 ???? saves
2011-oct-18 24000 saves
2011-oct-19 28500 saves

Now, the count is at 42121 saves. Count multiplied by 2 every day the first several days looks like an exponential growth of interest in Dart. 

The Dart mailing list goes steady around 25 messages a day and it looks like a vibrant community being  created. Dart is evolving, good and needed platform. Perhaps we are getting a safer, faster, concurrency friendly language and platform that will make programming for the web a better place. 

Tuesday, October 04, 2011

Gilad Bracha / Lars Bak / Google - Dart: Progress the web



Gilad Bracha / Lars Bak / Google - Dart: Progress the Web

Three weeks ago or so, I came back from a Toronto Smalltalk Users Group meeting, to a nice surprise: a bit of a  late night (here in TO) flurry of articles about Dart - or Dash(?) - "a new programming language from Google". I think Dart will be more than a "language" - rather a vm/environment that will run inside the browser (and also outside surely).

This is extremely exciting news, for a few reasons:

First, the people and the architecture: Gilad Bracha (Strongtalk, Java, Newspeak) and Lars Bak (Also Strongtalk, Javascript V8). I am sure they will do a great work; if this goes the right way and Dart becomes accepted, it may be a huge step towards secure, performing web architecture and applications, and finally, after 20 years, may progress "the web" beyond it's primitive stage (web, unlike "the internet" is a crappy construct developed from a simple sharing system of scientific articles, still bears all the architectural chains and shortsightedness of it's beginning).

Second reason for excitement, Smalltalk. Just to be brief here: 30-40 years later, depending where you start counting, Smalltalk is still more elegant, clean, and beautiful than all mainstream (or non mainstream) languages. Just one thing, would you rather createRectangle(10,20, 30, 40) (what is 10, 20, 30, 40 .. even with better naming the order is unclear), or createRectangleAtX: 10 y:20 width: 30 height: 40? I am guessing Dart syntax will borrow from Smalltalk, but that is just technicality, although a welcome one.

Third reason for excitement, security and performance above what Javascript can offer.

Some relevant links:

The leaked motivation (which is a great read by Mark Miller): http://pastebin.com/NUMTTrKj

Probably the best balanced read on the Dart subject I could find: http://css.dzone.com/news/google-dart-“ultimately

A few more Dart speculation links:
http://www.extremetech.com/computing/95417-google-announces-dart-programming-language
http://www.pcmag.com/article2/0,2817,2392791,00.asp#fbid=rl8OouL9eVJ

October 10, 2011, I will be looking forward to read news from Arhus!

PS: I am no fan of one company taking over my world (had my shares of passive/active resistence to Microsoft ...and happy to say gradually proven right), but the combination of open sourced, and developed in the open, of Nacl and Dart may be the sanity rescue of the web. The alternative is the "as we went", shortest path, ugliest solution web we watched "develop" the last 20 years. We will see in 5-15 years!


Monday, April 18, 2011

Freedesktop / Linux MimeTypes, File Extensions, MimeType-Application Associations

This is a capture of Linux KDE/Gnome/Freedesktop files that define how MIME types such as "html"are managed by the system, and used by Applications such as Firefox. This includes File Associations and Default actions.


1. Related Links:


http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#mime-types
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec
http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.18.html
http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec

2. Overview of What is involved:














3. Directories and Files Managing MIME (database) and Application (Database) 

3.1 Shared MIME-Info Database

Is a file-based database of all known MIME types. The database's files are located in the following directories (further down overrides) /usr/share/mime/*/*.xml/usr/local/share/mime/*/*.xml, and~/.local/share/mime/*/*.xml (if they exist, and in this order).
Each has maintains an application which manipulates this database - for example, in KDE, Configure Desktop -> File Association

The database starts in directory named "mime" - for example /usr/share/mime - which has following files


all
application
audio
...
packages
...
text
(etc)


As an example, /usr/share/mime/text directory has following files:



css.xml
html.xml
plain.xml
richtext.xml
sgml.xml
vnd.graphviz.xml
x-cobol.xml
x-erlang.xml
x-fortran.xml

(etc)

As an example, html.xml defines MIME type "html", this way:



So html.xml defines:
The MIME type name (html)
The MIME Parent Type (text/plain)
Description (in all languages)
List of File Extensions which will assume this MIME Type

Application section of the the Shared MIME-Info database

this is in the mime/packages directory.

 For example, doing ./configure && make install with Firefox should create /usr/share/mime/packages/firefox.xml (but it does NOT).


 KDE and GNOME desktop environments have adopted a similar format for "desktop entries", or configuration files describing how a particular program is to be launched, how it appears in menus, etc. These files end with extension .desktopThe suffix "desktop" seems a misnomer - it seems .desktop files simply describe Applications

Desktop Entries Database (=Application Definitions Database) (NOT Part of MIME-Info Database, but uses it)

This database is located in /usr/share/applications/*/usr/local/share/applications/*, and ~/.local/share/applications/* (if they exist, and in this order). Further, if desktop=KDE, ~.kde4/share/apps/* is also part of the database.

The /usr/share/applications directory has following files
kde4
YaST2
google-chrome.desktop
firefox.desktop
gimp.desktop
emacs.desktop
....etc

for example, /usr/share/applications/firefox.desktop contains

[Desktop Entry]
X-SuSE-translate=true
Categories=Network;WebBrowser;GTK;
Encoding=UTF-8
Name=Firefox
GenericName=Web Browser
Comment=Web Browser
TryExec=firefox
Exec=firefox %u
Icon=firefox
Terminal=false
StartupNotify=true
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;application/x-xpinstall;x-scheme-handler/http;x-scheme-handler/https;
Type=Application


Note: The MIME Type list above can be expanded to list of file extensions. This is displayed in "File Association" settings.


Clearly some component scrounges through the applications/*.desktop, and if the *.desktop lists the MIME under MimeType, it will add the application.



Note: To add a new application, such as emacs-client, that appears in popups of right click open-with, simply
  • create /usr/share/applications/emacs-client.desktop
  • copy contents from emacs.desktop
  • modify Exec=run-emacs-client.sh
  • modify Name=Emacs Client

3.3 ~/.local/share/applications/mimeapp.list - user defined order of application preference when open

  • maintains ORDER of Applications Which Understand a certain MimeType
  • Format
[Added Associations]
mimetype1=foo1.desktop;foo2.desktop;foo3.desktop;
mimetype2=foo4.desktop;
[Removed Associations]
mimetype1=foo5.desktop;
  • Sample:


[Added Associations]
application/x-shellscript=run-emacs-client.sh.desktop;
text/x-emacs-lisp=run-emacs-client.sh.desktop;

[Added KDE Service Associations]
application/xhtml+xml=kwebkitpart.desktop;khtml.desktop;
application/xml=kwebkitpart.desktop;khtml.desktop;
text/html=kwebkitpart.desktop;khtml.desktop;