on the Curl Web Content Markup Language

on the Curl Web Content Markup and Programming Language from www.curl.com and www.curlap.com

Saturday, June 30, 2012

Delicious Firefox plugin bug


My Curl Kanji applet was refusing to center itself correctly in Firefox as the window width was collapsed to the applet's width. Mystery padding was fixed to the left of the applet.

The applet resizing and centering behaved correctly in WIndows Chrome, IE, Opera and Safari.

The culprit?  Delicious bookmarking.

Delicious placed its icons left of the address field on the navigation toolbar.  Result: a minimum width of padding left forced into the page.

Turn off the Navigation Bar and the padding vanishes.

Move the tagging icons to the right of the address field and padding vanishes.



Thursday, June 28, 2012

Android 4.1 Jelly Bean for Asus Nexus 7

I linked the version article to the See Also for Android OS on en wp this A.M. - there is the list at the moment:
  • Vsync timing across all drawing and animation done by the Android framework
  • Triple buffering in the graphics pipeline
  • Enhanced accessibility
  • Bi-directional text and other language Support
  • User-installable keyboard maps
  • Expandable notifications
  • Automatically resizable app widgets
  • Multichannel audio
  • Bluetooth data transfer for Android Beam
  • Offline Voice Dictation
Next: the CAEDE (maple) beta ...

( Of course, always painful to see another tool on eclipse - the IDE from the IBM Visual Age team - while that Smalltalk version, VA,  remains unknown at instantiations.com after their great Java tools were sold to ... Google. )

Here's what the SDK lists: (click the PNG below to get a legible view)


Here's the listed ADT changes:

ADT 20.0.0 (June 2012)
Dependencies:
  • Java 1.6 or higher is required for ADT 20.0.0.
  • Eclipse Helios (Version 3.6.2) or higher is required for ADT 20.0.0.
  • ADT 20.0.0 is designed for use with SDK Tools r20. If you haven't already installed SDK Tools r20 into your SDK, use the Android SDK Manager to do so.
General improvements:
  • Application Templates
    • Added Android application templates to allow developers to create specific types of applications faster, using Android-recommended best practices.
  • Performance
    • Improved overall ADT performance and fixed memory issues. Loading SDK data should be up to 30% faster.
  • Tracer for GLES
    • Added new perspective view and tools for tracing OpenGL calls for an application and track the visual results of each call. (more info)
  • Lint
    • Added new Lint rules for manifest registrations, duplicate activity registrations, security checking, correct use of Toast, missing SharedPreferences commit() calls, Fragment class instantiation, and handler leaks.
    • Created tighter integration of lint with the layout editor. (more info)
    • Added execution of Lint tool on save option for Java files. (more info)
  • Layout Editor (more info)
    • Added highlighting (in bold) for important attributes, inline preview of colors and images, including the corresponding resource name.
    • Added display of default values, when available.
    • Added completion of resource values and enum and flag constants.
    • Added support for displaying advanced properties, and nested properties for better categorization, for example, layout params are listed first as a single nested property.
    • Display Tooltips over the attribute names, not values, so they never obscure the value column.
    • Provided checkbox support for boolean values.
    • Added support for switching between alphabetical and natural sort orders.
    • Improved layout editor tool's window management for more usable editing views.
    • Improved the layout editor's configuration chooser header user interface.
  • XML Editing
    • Added go to declaration support for theme references (?android:attr, ?attr:).
    • Improved code completion in style definitions.
    • Improved code completion for the minSdkVersion and targetSdkVersion attributes in manifest files so that version descriptions are displayed for each of the API levels
    • Provided support for code completion of custom attributes for custom views, including current edits to the style files.
    • Improved synchronization of text and graphic editors with the XML outline view, including outline changes and display of current selection.
  • Build System
    • Added automatic merging of library project manifest files into the including project's manifest. Enable this feature with the manifestmerger.enabled property.
    • Added automatic ProGuard support for the aapt -G flag. This change causes the build system to generate a temporary ProGuard keep-rules file containing classes that are referenced from XML files (such as custom views) and pass this to ProGuard at shrink-time. This can make the resulting APK much smaller when using just a small portion of a large library project (such as the Android Support library), since the catch-all rules to keep all custom views from the default ProGuard configuration file have also been removed.
  • Added support building and debugging NDK-based Android projects.
  • Added support to the Asset Studio Wizard for padding and turning off background shapes.
  • Improved LogCat to allow developers to set colors for different priorities.
  • Improved app Run functionality to allow running on multiple devices with a single launch. The target tab in the launch configuration dialog includes an option to allow launching on all connected devices, with the option to further narrow the list to just physical devices or just emulators. (This feature is available only for Run configurations, and not for Debug or JUnit tests.)
Bug fixes:
  • Fixed a number of issues where Lint incorrectly reported code errors or failed to flag code issues.
  • Fixed several bugs in the layout editor.
  • Fixed compatibility issues with Eclipse 4.x (Juno), including cut/copy/paste functions.



Wednesday, June 27, 2012

Curl versus prototype.js

Here is what the prototype.js site suggests:

var Person = Class.create({
  initialize: function(name) {
    this.name = name;
  },
  say: function(message) {
    return this.name + ': ' + message;
  }
});

var Pirate = Class.create(Person, {
  say: function($super, message) {
    return $super(message) + ', yarr!';
  }
});

Here is my Curl equivalent

{define-class public Person
  field public-get private-set name:String
  {method public {say msg:String}:String
    {return {String self.name, ": ", msg}}
  }
  {constructor {default name:String}
    set self.name = name
  }
}

{define-class public Pirate {inherits Person}
  {constructor {default name:String}
    {construct-super name}
  }
  {method public {say msg:String}:String
    {return {String {super.say msg}, ", yarr!"} }
  }
}

Now here is my naive test code:
{output {{Pirate "Long-John"}.say "ahoy matey"}}
and here is the output:
Long-John: ahoy matey, yarr!

Note the lack of sigil's, var's and strange parenthetical matings.
But Curl also has 3D graphics and 2D paths and db interfaces and an IDE ... and now generates Android app's. Oh ... and a debugging environment with graphical inspectors and color outline  and fill debug inspection highlighters ... and is almost Smalltalk-ish LISP.
And from the same DARPA project as WWW.  SCSK Curl  (formerly MIT Curl).
Did I mention multiple inheritance? Mix-in's ? Anonymous proc's? Async workers?

{after (10s * long-wait) do
   {more-than-HTML-JS-lib for-the-web}
}
|| public classes, library classes, packages, imports, includes, macros, enums, Array-2-of
|| abstract classes, final classes, sealed classes, shared, serializable,deprecated,open ...

Tuesday, June 19, 2012

Kanji of the Day


Because a collection of Curl objects underlies the Kanji by Grade pages at http://www.aule-browser.com/kanji/kanjidic2-grades.html the pages now have a Kanji of the Day feature with only a minimal change (a variable's value replaces a character literal and a procedure is called with two integers to delimit a safe and reasonable range.)

The Kanji character for the session is placed as the default in the search text field. A student clicks the 'Find' button to jump to the definition for that Japanese kanji character.

Within the applet, the kanji character is found by using a factory method on the class Random and a seed from a DateTime instance. The instance of a Random type is likely LinearRandom as Random is itself an abstract  class.

The same class declaration 'scurl' file is included by all of these kanji-by-grade applets.

Note: I also generalized the search function today by using one more instance of GuiMark.




Sunday, June 17, 2012

Find a haiku: GuiMark and TextSearchPattern


It was time to put a search panel into the views of Bashō haiku, so that was done today using the Curl GuiMark facility and the TextSearchPattern class.

What you see below is ぬ夜の雪 entered into the TextField next to the FIND button and the ScrollBox has scrolled down to place that poem at the top of our view.


This will now be the norm for these Curl applets on the web pages at aule-browser.com

Note added June 19: this is now generalized as a search using rotating GuiMark's.


Friday, June 8, 2012

Kanjidic2 Japanese kanji by School Grade

There is a new set of 12 Curl applets for studying Japanese kanji this morning.

They are linked at http://www.aule-browser.com/kanji/kanjidic2-grades.html

Here is a snapshot of the applet for combined Grade 9 and Grade 10 Japanese kanji from kanjidic2 with meanings and both on and kun readings in katakana and hiragana:


These pages require the MIT Curl Surge RTE browser plug-in from www.curl.com

Monday, June 4, 2012

Varying Joyo kanji order of presentation

re: varying the order of presentation of Joyo kanji definitions without edits of the text original

By using the serialization technique of my last note, the pages from Kanjidic2 can be varied in their order without touching the text original or using a DB.

A Curl applet could use SQLite, MySQL or JSON to achieve the same, but this varying order of presentation can also be accomplished using just the one web language, namely, MIT's Curl from www.curl.com

serialization of an off-line text resource


To see the effect of my Curl serialization effort look at the speed of the small daily pages such as http://www.aule-browser.com/kanji/poets/basho-mee-indexed.html

The new daily page generated fast and it loads very fast. I have already cycled twice through the BIN serialization files as I find minor transcription errors in the principal text resource - but that text resource now does not need to reside on the applet web server !

Here is a snapshot for





Sunday, June 3, 2012

serialization for text source integrity


I now have a Curl applet up using only serialized data as the source - this will make all of the "Learn Kanji" applets faster hereafter and help keep my fingers off my input text source !

The applet uses the {deserialize } macro to load its data and does not reach the original source.

The approach will result in much faster "kanji of the day" applets using the Basho Haiku as their learning resource as no iteration through the data will occur at load time and the applets are one degree away from the vulnerable source.

This will be even more significant when working with no SQL and no JSON for the large JMDict Japanese resource as well as the smaller Kanjidic2 and its Edict2.

Entire arrays are serialized with a simple call to a stream to write one object.  The object classes are declared as serializable and all affected fields have at least a default value.

The result is that my own annotations are kept independent of the source file.

I may turn this same approach to an applet for viewing the tags in my 9000+ Firefox booksmarks so as to avoid both HTML and JSON.

Here is a snap: