Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Monday, July 1, 2013

Pale Moon browser 20.2 released


Here is the list from palemoon.org
  • (CVE-2013-1692) Fix for the inclusion of body data in an XMLHttpRequest HEAD request, making cross-site request forgery (CSRF) attacks via a crafted web site more difficult.
  • (CVE-2013-1697) Fix to restrict use of DefaultValue for method calls, which allows remote attackers to execute arbitrary JavaScript code with chrome privileges.
  • (CVE-2013-1694) Fix to properly handle the lack of a wrapper, which allows remote attackers to cause a denial of service (application crash) or possibly execute arbitrary code.
  • Fix to prevent arbitrary code execution from the profiler developer tool.
  • Fix for a crash when rapidly reloading pages.
  • Fix for cross-document selections.
  • Fixes for several crashes in JavaScript.
  • Fixes for several memory safety hazards and uncommon memory leaks.
The best browser for Penzu.com journals on Windows 7 ?




Thursday, February 23, 2012

Lively TclTk


Lively-Kernel meets Tcl/Tk?

My latest install of Tcl/Tk 8.5 from Activestate left a link in Windows to Tk demos.  One is named "A Celebration of Rube Goldberg" and should impress Self-as-JavaScript  fans of Sun LivelyKernel or Avocado.

Regardless of the grief in getting Tcl with OO out of 8.6 beta, the demos are a great presentation.  I continue to use Html Viewer 3 (Tcl/Tk's hv3 browser) as a light-weight browser when my laptop's sole-core is over-loaded with a few of today's greedy app's wildly swapping in and out (and no, the worst offender happens not to be from Microsoft.)

Btw, Squeak Smalltalk is working to get their base image down to about 10Mb.  Remember when shared DLL's were to keep us all happy below 640K ?  Gates' Hades, Hades' Gates.

PS: I have added a label/tag for Pharo Smalltalk - now the preferred ST for Seaside?

PPS: here is the Avocado blog: there.



Tuesday, December 14, 2010

Property ECMAScript5

If you are looking to port JavaScript3 up to strict ECMAScript5 in whole, part, stages but you have some choice for mission-critical applications, here is a glimpse from the package CURL.LANGUAGE.REFLECTION
Property (class)
public abstract sealed Property {inherits ClassMember}
Package: CURL.LANGUAGE.REFLECTION
Direct Known Subclasses: Getter, Option, Field, Setter
The representation of a property: Field, Getter, Setter, or Option.
The Property class provides a singular point of contrast for a mature web language against a maturing web language.

What is facilitated are such primitives of the Curl language as private-set
field public-get private-set key-field:int
There is as yet no tool for PITL with CommonJS packages comparable to the ability of the Curl Documentation Viewer to display selectively only public, non-inherited properties of a class as part of a package.  And what is PITL without such tools for communicating what is in a API?  Now look for comparable 'live-code' example facilities for training developers new to a language (they may yet appear in JavaScript as part of Avocado with Lively-Kernel.)

When I hear advocates of reusing an existing JavaScript codebase for PITL on industrial-quality server-side applications I wonder whatever they can be thinking?  Would this have been an aerospace argument to stick with aluminum?  After all, there are more aero-mech's out there accustomed to repairing aluminum aircraft components ... and far more aluminum in the air - and it was aluminum that made the air travel age possible ...

Monday, December 13, 2010

Curl ain't JavaScript/ECMAScript

A question was posted over at developers.curl.com about creating a an off-screen 2D Drawable that exceeds a Curl sanity check on screen resolution.

A Curl developer should be able to bypass the current 'reasonable guess-timate' limit with the expression
{Drawable.set-bypass-size-restriction? true}
prior to using a
{Renderer2d.create-offscreen ... }
The docs offer this practical test:
let display-context:DisplayContext =
{get-default-display-context}
let resolution:Resolution = 1 / display-context.pixel-size

There was a time when this was worrisome: we offered opportunities for staff with domain expertise to work in Smalltalk - but in the day of math coprocessor-on-the-board or not it was important to watch out for division.  In other languages we tried not to offer examples using division when multiplication was mandated - but Smalltalk was an exception because it offered rationals.

In code such as the example which would execute once, this really is a non-issue.  but all the same - this should have been
1 div display-context.pixel-size
to return an integer value.  Now for inverse or reciprocals.

In Curl, the exponent approach to obtaining a multiplicative inverse is
{pow n, -1}
The Curl compiler package contains the trig functions but no inverse function ( the Quaternion package has an invert and there are other inverse functions.)

The example becomes
{let display-context:DisplayContext =
    {get-default-display-context}}
{let resolution:Resolution = {pow display-context.pixel-size, -1 }}
But is this needed on current hardware?  Or is the compiler addressing this?

In JavaScript, the developer has the Math object and any available packages (  Python recently replaced numpy.)  But in Curl, the trig functions are addressed by the compiler.

Screen resolution itself poses a JavaScript and server issue because now the programmer is dependent on the browser supporting screen.width as a feature and likely a cookie.  It is much less an issue in Curl.  and that is before looking at CSS versus Curl styles.

Curl also offers this declaration in the docs:
{Display.set-resolution-mode
      mode:ResolutionMode,
      override-value:Resolution = 0dpi
}:void
as well as
public   {Display.get-displays}:{Iterator-of Display}
Moving on to Curl and 3D graphics - I see this for HTML5

Extensive work on Curl 2D dates back to a PhD done in 2001?
Curl 3D
[ to be continued ]

Sunday, December 12, 2010

notes for an open letter to Crockford on Curl

I am working on a response To Douglas Crockford's comment concerning the case for server-side JavaScript (beyond Yahoo and YUI3) for my blog at developers.curl.com

This is just a first pass: open letter to Crockford
  0) mea culpa.  Sorry about that.  I do apologize. Crockford on Rebol. That was simple ignorance on my part: I thought "I knew my Crockford."  I was wrong to think that I have paid close enough attention to your work. I was wrong not to research that.  I have known for a few years that there was a Rebol link on the JSON page.

  1) But. We should try not to misrepresent/understate/elide the salient facts in history of science - even an applied science. SUN and the fate of Self and Strongtalk is almost as wicked a tale as RCA and FM (see the story of super-heterodyne and the 9/11 broadcast mast.) The history is about the team that Sun provided Netscape, is it not?  Or is it me who has substituted myth for history (the human bent) ?

     a) from Self to Javascript
     b) Google V8 inlining [ no puns: see inline-8 engines ]

 Setting the facts straight: (i.e., setting me straight)

    Dates: (timelines)
      JavaScript and Java are 1995 releases
      Strongtalk dates from 1993 and ideas put to work in 1994 but completed only in 1996 and for a company acquired by Sun in 1997.  So that team did not work on getting LiveScript up to JavaScript as I was told one evening in L.A.
So much for hearsay; history is most often based on the available documents but tempered by documents unavailable or suspected to exist (when there are documents;  see below: transparency vs dark-documents; recent case: Katyn)

BRB: Blog Readers Beware of 'web' documents: Frank and Stein Java's history interview at javaperformancetuning.com on April 1st 2003 by Jack Shirazi
See: Frank Yellin and James Gosling.
See: the Ralph Griswold papers at UMN (Icon and SNOBOL)
NTMR NoteToMyReaders: not be confused are Ralph, Bill and Dave Griswold as identity matters for more than just objects.

      Self -
         GC paper 1984
         Self starts at Xerox PARC in 1986
         the critical paper dates from 1987
         first release in 1990
         acquired by Sun in 1991 [inlining paper is Sun 1991 ?]
      Java - work began in 1991

      Q: who worked on second gen-JS and second-gen Java ?
      Q: who from Sun worked on JS at Netscape with Brendan Eich ?
              - prior to and in 1995
              - 1995 and later
          what were their roles and what were their contribution
      Curl
         - work began in 19__
        SIGPLAN 1986
David Kranz. ORBIT: An Optimizing Compiler for Scheme. Ph.D. dissertation, Yale University, February 1988. Research Report 632, Department of Computer Science.
                 DARPA grant details:
        whitepaper 'the gentle slope' or 'The Curl Project' authors:
              M. Hostetter, D. Kranz, C. Seed, C. Terman, S. Ward
              Organization:  MIT Laboratory for Computer Science
                                      545 Technology Square, Cambr. MA
The Curl project is supported by the Information Technology Office of the Defense Advanced Research Projects Agency as part of its Intelligent Collaboration and Visualization program. 

         - free software movement at MIT
         Q: is 1998 a correct release year ?
         - Michael Dertouzos dies unexpectedly in Aug., 2001
               a note and the Dertouzos Lecture Series at MIT
         - PDF  Morgan McGuire "The Curl Graphics2d Immediate Mode Rendering API" supervised by Steve Ward [thesis date May 17, 2000]
         - decision to 'spin-off' from MIT in
         - low point of dot.com crash: 2002
         - the major Curl programmer's book: 2002
         - decision to participate in open-source in
     Scheme
         Guy Steele and Oak/Java (James Gosling, Bill Joy, Guy Steele) [see Java and closures]
         Steve Ward et al and Curl ?
         Brendan Eich and Mocha/LiveScript/JavaScript
     Python
        Python and Java in the MIT CS curriculum

    LISP & Curl
       On T at paulgraham

 
  2) Curl is swell - not so very swell as it has a big unknown and a few gotchas, too.
 
       Let's take Pharo Smalltalk as a really 'swell' language (and yes, Pharo is both server-side and in the browser.)
      
         Classic Smalltalk 80 got many things right, but tended for years to reject composition in favor of inheritance. Smalltalk implementor's pride was the Collection hierarchy with its list comprehensions exploiting blocks.  Smalltalk's weakness was a lack of interfaces (implemented using inheritance as abstract classes relying on
             >> subclassResponsibility
          In hindsight, given the work of Ducasse (the 'Crockford' of Smalltalk) we can see that both the perceived strength and weakness were neither. This is what Traits bring to Smalltalk: insight and results.
          The strength of Smalltalk can be seen in the ease with which both Traits and Seaside continuations could be introduced into a 'transparent' boot-strapped language [and SOUL and Backtalk and ...]

   Truly Swell: Pharo moves onto Eliot Miranda's Cog VM from Teleplace.com
         
       Now Curl
          Curl uses Regex.  In an expression-based language this is something of a travesty [not to use it or to offer it but to offer it only and solely.]  I call it  'the manager says use Perl' fallacy.  That fallacy applies to JavaScript: in my experience the manager says to use JavaScript in our custom site-specific intranet collaboration browser because we can tell the  CIO or CTO that HR can always find us JavaScript programmers cheap. [ I heard for years how expensive Smalltalk  developers were even after we had proven the value of offering Smalltalk training to non-CS employees with domain expertise in telecom].  Until Crockford (or without Flanagan) HR were hiring JS programmers who often had not learned their language.  Python programmers argue for python in the browser and python on the server so that they will be able to think in only one language. This is folly.  But python out-performs ruby so appears unstoppable. virtualenv is lauded although virtualenv offers something of a reductio ad absurdum for python-in-the-large.

          The libraries: arguing for JavaScript without looking at the Curl package documentation in the live-Curl IDE help applications is less than responsible.  Nothing in Prototype or Dojo comes close.  [ so, in faireness, I must segue here to YUI3 ].  In comparison, Smalltalk packaging of libraries is a nightmare. And ObjectIcon has a long ways to go and Rebol3 is only getting there now [only now do we have a UNICODE Icon and Rebol - there Curl shone and JS now shines.]

    Curl has not fostered the use of explicit constraint resolution or constraint handling  Curl for open-source still sees key, essential-to-grok code libraries unavailable even though they are not compiler or runtime engine specific.
         
    But.  A Curl developer who learns Curl syntax has a much better chance of understanding the strength of the language if she also learns and uses the macro facilities with which her daily coding expressions are built.
         
    So what is the history of Curl?  There is no need to compare JavaScript for serious server-side  to 'wild cowboy python' and its dynamic objects.  Every flaw in the JavaScript of 1999 was not a flaw in the Curl of 1999.  Curl is the foil.
         
    It is true but trivial that Curl is not on the server-side (in public).
         
   Rebol.  It is just not relevant that Rebol is not in wide use.  Monitoring the rebol-based  altme.com 'rebol world' reveals where rebol is in use.  Rebol2 has issues, but in practice, JS proves to tbe the problem child, not Rebol.
         
   The truly great language that is only used on one important funded project: ICON.  Ditto for Oz.
         
   Ditto for Caml (almost)
   Programmer says: we had to learn Prolog in a 300 class.
   Programmer says: we didn't learn Smalltalk ... is that still used anywhere?  It's kinda-like Prolog, but with objects, right?
          Where Curl was wrong in 1999.  The Curl pay-for-use came about 10 years ahead of GoogleAppEngine  and came at a bad economic juncture.  Curl faled to protect its name ( cURL horror: if I type curl  on my linux box I run cURL and not /opt/curl/surge/8/bin/curl
          Curl failed in not separating content from presentation. This has been addressed.
         
          If Curl had been free the way in which ICON was free ... (see the history of SNOBOL.)

          Economies of scale:        
         
         [ The MIT-trained Chief Technology Officer and Python: the case of the summer intern and the folly of dynamic objects in mission-critical code. A sad but true story.]
         
Why is there no lint ( Crlint ? ) for Curl ?

   It could be just a grep for pragmas and directives.
   It could be a grep for [ my const story ]
  
The missed 'killer app' was a Microsoft OneNote written in Curl or in ICON.

Rebol
  p: 42 q: 65535 lst: [p q] what: first lst
 
  GoogleTechTalk question: "What is the value of  :what  ??"
 
  But ICON and Curl are also expression-based languages - is this an issue in both of them? See: Rebol and denotational logic.
 
  And this is the issue of get words and set words being types in rebol.
 
  But wait a minute: look at {define-syntax} in Curl - such as
 
  {define-syntax public {first  ?item:identifer in
     ?list:expression where ?cond:expression}


  This is a conditional {first} macro declaration head suggested by Chris Barber at http://developers.curl.com
   
Another useful comparison of Curl as a web content language in 2010 and JavaScript 5: the Arguments object

And then there is the Curl documentation and the Curl IDE with the interactive debugger.  Now those are swell.

At the Michael Miller et al JS5 talk just before the release of the spec, a Google manager cautions that the talk is public when a minify issue is raised.  Why is minify not a Curl issue?  Answer: the pcurl file format.

To experiment with Curl:

  /opt/curl/surge/8/bin/curl --shell
 
NOTE: Scripting with Curl on the server:
  running an xcurl script does not launch the Curl 'applet manager'.

A current Curl weakness: the web docs remain 6.0 when Curl is 7.0

The Curl strength:  live code in the {example} macro and the documentation macros and 'text-procs'

Where to see good Curl code?  http://code.google.com/p/zuzu-curl and various at sourceforge.net

A great strength of Curl: the packaging and the packaging macros.
BUT commonjs.org

Great strengths of JavaScript: JSLint, JSON, traits.js, node.js  jQuery "use strict";

A weakness of JavaScript: the actual JSlint code.  Compare how this would be packaged in Curl. This remains a weakness of ICON and even ObjectIcon and is only addressed in Rebol3.
    
And I like the Crockford .create for new and the Crockford 'in closure find your privacy'

The manager for Perl also said not to use JSON because HR can always find XML programmers.

Here is my private constant story.  I cannot tell you the many,many global 200 organizations using this Curl codebase or a customized variant.

Suppose you ran grep on a src directory of source files for a modern language which provided encapsulation and a const declaration.  Suppose that in that large codebase maintained by a large off-shore coding firm you could not find a file with either
  private
  const
 
So it is true that people will not learn their language; so it is true that a prototype can get shoveled-and-shoe-horned out into production.

Python has the author of straits.py and JavaScript has Crockford.  Curl has Chris Barber, who really should be giving a Yahoo talk and a GoogleTechTalk.

Curl's release began with an unforeseeable tragedy for the CS dept at MIT - and an unforeseen economic crisis.  But evolution teaches us about a small furry niche-only mouse-like creature which we call a mammal and of which the larger dinosaurs took no notice.

Evolution's good ideas can start with few numbers.  Applied science should not be a popularity contest: not for bridges, not for Bose-Eintein condensates, not for creating, marking-up and transforming web content.

And like Pharo Smalltalk, Rebol, ICON, UNICON, ObjectIcon and Converge, Curl is evolving: a recent example is the access modifier named 'library' and 'library' as a languge primitive.

Q: has Steve Dekorte given a talk at Yahoo on his Io ? Would Ducasse come from Lille to show what his work in Berne has meant for Smalltalk ?  Or Robert Parlett for ObjectIcon ?

What Curl has rejected: continuations, coroutines, SNOBOL/ICON text strategies ...

A useful antidote: the paper on the Oz resizeable clock.  Also of note: the use of logic and constraints in Smalltalk: SOUL (Roel Wuyts), Backtalk and lisp.

Of note in Smalltalk beyond Traits: Cog VM and multi-core Squeak.

Question: should Curl be rejected over being based on an Object class?
   Note: Object has 3 public methods

Question: should Curl be rejected for using multiple inheritance?
   Note: some classes are declared as shared and implement secondary constructors
  Note: MI is used in Curl for abstract classes which serve as Mixins due to the simple rule that a single abstract method renders a class abstract.
  But: mixins ain't Traits.

Question: is Curl too-strongly typed for the server-side?

Question: should a server-side language be both distributed and offer co-routines?
Compare distributed Oz and ICON 9.5 as UNICON presses forward for concurrency changes.

Question: by the time JavaScript is as robust as Curl, will Curl still exist?  Will it have been forced merely to take a new name?

CSail refs: Curl at MIT
  with other items (PDF)
other refs: PDF at curl.com  · the first book at Amazon
On Michael Dertouzos at wikipedia.org and his book.
Other perspectives: see David Kranz, Steve Ward (2010), Ternan
The old MIT page.
Curl today (Japan) and USA.
What the Strongtalk site has as a history page.
Strongtalk at code.google.com/p/strongtalk
Eliot Miranda post.
Optimizing dynamically-typed object-oriented languages with polymorphic inline caches [1991]
David Ungar Sun patents.

What I think I 'know' about this history was told to me by a German PhD Xerox PARC researcher but I did not take notes or check facts later - so I have only hear-say from a non-participant.

Out-of-date DMOZ page for Self [ see Avocado and Lively-Kernel ] and blog.
c2.com Self page. Io page.  Pythonic Iconesque language: Converge.

See: inlining and Google V8: the history of a strategy cf: PDF and a Scientific Commons page. Many materials are Wiley, Springer or other for-pay resources.
Type Inference in Self (pdf).

Urs Hoelzle in papers at Gilad Bracha site.

Squeak Smalltalk bibliography.

Missing: a history of CSail Curl in terms of concepts, strategies, trade-offs, optimizations, performance, evolution, understandability, maintainability, limitations, regrets, bias, mistakes, economics [spin-off, acquisition, marketing]
   Web Document David Kranz and Bert Halstead
      note the history warning at its close
Kranz' diss is a Yale Computer Science Dept. tech report. I would say it is required reading for anyone interested in serious compiler technology for functional programming languages.
   see: Bert Halstead's parallel lisp

   2001 Slashdot.com 

   Kranz is named as an inventor on many issued and pending patents on the Curl technology.

See: Deirdre Blake, Dr. Dobb's Journal Jul 01, 2008 'The Architect's Role'
David Kranz is Vice President of Engineering and CTO at Curl (www.curl.com). Previously, David was a principal research scientist at MIT where he was a leader in parallel computing technology. David holds a B.A. in Mathematics and Physics from Swarthmore College, and an M.S. and Ph.D. in Computer Science from Yale University

Curl and security: http://www.dcs.bbk.ac.uk/~geoff/ForresterSecuringRIA.pdf
see also: http://www.curl.com/riasecurity/

Question: Yahoo in corporate Asia, the subcontinent and Africa: why not Curl?

Curl in public-sphere computing: the challenge of transparency while respecting genuine needs for security and privacy.

Curl and the anti-document/dark-documents in eyes-only SSB browsing.

Constraints: Alan Borning, Prologia IV, Oz clock, Backtalk

Saturday, December 11, 2010

dumping globals in node.js REPL

This seems handy in the node REPL.  It exploits a JS3 flaw in the failure to send new to a function 'creating' an instance.  The this in the dump function gets the context above and not ourself.
> function Fexp() { for (var v in this) { console.log(v) }; return this}
> var ex = Fexp();
global
process
GLOBAL
root
setTimeout
setInterval
clearTimeout
clearInterval
console
Buffer
module
require
_
from my running console. Was there an easier way?
See http://nodejs.org/docs/v0.3.1/api/repl.html

Friday, December 10, 2010

node.js REPL

I do like the node.js REPL.
The classic test is to enter 3 > 2 > 1

But consider this
/opt/curl/surge/8/bin/curl --shell
Entering 3 > 2 >1 gives a much better response.

Curl is an expression-based language - can you name another in which 42 > x > 0 evaluates to a success?

But let's stick to curl for now:  enter the string exit
Now that is a respectable result.  Douglas Crockford, applied science is not a popularity contest.

Simulate loosing your bearings for a moment and enter exit()

Are you convinced that JavaScript variables should always use var?  If so, enter
let answ:int = 42
Note the echo behavior is not annoyig.  To see answ enter answ or {value answ}
To change the value of answ, try
{set answ=65565}
So I such an
ln -s /opt/curl/surge/8/bin/curl xcurl
since the folks as curl.com failed to protect Curl from cURL.

And an icurl.sh gets you your rlwrap xcurl --shell

And to exit the REPL
{exit}
When Crockford talks about the origin of JavaScript and the involvement of SUN, he leaves out a few details.  His audience may not need to know about Self or Strongtalk.
But when Crockford lays out the weaknesses of JavaScript prior to ECMAScript5 he neglects to mention Curl.  Just as he neglects to mention Rebol or Io.  But at a GoogleTechTalk?  Were those talks intended to be misleading? Biased?

I do like JavaScript just as I do like Python (for my own needs.)  But Python is wrong for applications which must be tamper-proofed on the server-side.  Python dynamic objects in that regard are scary.  JavaScript is worse.  And Curl is (for now) absent on the server-side.

As for node.js, Curl has offered event loops in closures since forever.  and for generators, see RolledRandom at curl.com

Wednesday, December 1, 2010

with statement

Just as JavaScript 5 strict mode bars the with statement, Python 3.1 extends the reach of the with statement.

The two languages are poised to see more and more use as Python extends its reach in linux and as new frameworks revitalize JS on the server-side.

Perhaps the next JS will give a role to the reserved word goto ? No. The ECMAScript spec has dropped goto as a word which may not be used to name an identifier ( ECMA-262 5th Ed.)

Wednesday, September 8, 2010

Lively Kernel

I was going to check out a GreaseMonkey extension for Epiphany when it occurred to me I had not stopped by lively-kernel.org for some time.  Imagine my surprise when my latest XP Safari blew out!  But good news: everything seemed fine running in the latest Opera.

JavaScript HTML CSS

I was listening to a podcast as two HP-types explained that the Palm webOS is just linux with opensource components displayed using JavaScript+HTML+CSS.  So when will I see Curl (from http://www.curl.com/ ) on a mobile platform?  Android?

Monday, August 23, 2010

IE8 compatibility and leaks links

Microsoft has their IE8 compatibility page here at http://www.microsoft.com/windows/internet-explorer/readiness/developers.aspx

There is a useful discussion in the forum at http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/772e4b07-29e1-4909-b77f-f61c503f9579

A long-standing resource is quirksmode.org at  http://www.quirksmode.org/dom/intro.html

David Hammond's webdevout.net shows no blog post since July 24, 2009 at http://www.quirksmode.org/dom/intro.html but still has a lot of information.

The wikipedia quirks_mode article at http://en.wikipedia.org/wiki/Quirks_mode is also useful.

Here are 2 links on Internet Explorer and memory leaks due to closures with circularities impeding GC:
Understanding and Solving Internet Explorer Leak Patterns
Circular Memory Leak Mitigation
At least msdn one page suggested by David Flanagan in the rhino book is now missing.

David Flanagan slides on ECMAScript 5 at http://davidflanagan.com/Talks/es5/slides.html

IE9 and ECMAScript 5 link at msdn: http://blogs.msdn.com/b/ie/archive/2010/06/25/enhanced-scripting-in-ie9-ecmascript-5-support-and-more.aspx

ECMAScript 5 conformance suite link: http://es5conform.codeplex.com/

Tuesday, June 29, 2010

Visual Prolog 7.3

Prolog Development Center has just released version 7.3 of Visual Prolog.

VIP was once known as Borland Turbo Prolog and was one of my favorite tools alongside Borland C++ for OS/2.

PDC Prolog has its counterpart in the Mercury project: a typed Prolog.

So what is new in 7.3? Well, Visual Prolog is getting ready to go 64-bit.  That and more are detailed at the 7.3 page.

For a while I thought the Prolog would go behind the scenes at PDC as it did when Air Liquide acquired Prologia in France (the home of Prolog IV as CLP.)   Happily PDC now is back to showcasing at least AI and not just smart software applications.

But what will the fate of this Prolog prove to be?  In a decade or two, projects such as Oz and Mercury may be in other hands - but a small commercial venture?

In my experience the strength of Visual Prolog was not the IDE or the GUI-building tools but the debugging.  And that has been further strengthened in the 7.3 release.

There is a "personal version" available for download and extensive examples come with it.

Prolog is part of the Adobe world in the ILOG arena (an IBM acquisition) and in an age of multi-processor 64-bit hardware, Prolog should come into its own in the RDF processing needs of the semantic web (in which regard, see Logtalk and the XSB project as well as http://www.swi-prolog.org/ for alternatives to PDC.)

A typed-Prolog should present no problem to ActionScript Flex developers at home with a typed ECMAScript variant - and "declarative" MXML UI layout.

Other languages superbly suited to processing text: ObjectIcon, Icon 9.5, Rebol, Oz.

Other Prolog implementations of merit: Eclipse-housed AMZI! Prolog.

For OOP for almost any other Prolog than PDC, see http://www.logtalk.org/

When the ICON language was named, Ralph Griswold could not have suspected that computing would come to have an "iconic" interface.  Curl has suffered a similar fate due to haxx.se and cURL.  Sadly, XML has a "prolog" and not a "prologue" so without RDF, searching for news on Prolog and XML is vexing.  So far, Rebol fares best and Oz much better.  As for Mercury and Alice, what's in a name?

http://www.logiquewerks.com/index.html

Friday, May 8, 2009

Rails, Grails and Curl

After looking at the embedded comments used by RIFE it seemed time to revisit Ruby on Rails. While looking at an example in the PragProg 2nd Ed. I was struck that what I was looking at would be easier in Curl.

Curl has both anonymous procedures and macros so stands as a strong functional language in any comparison to JavaScript, JRuby or Groovy. Smalltalk has blocks.

But instead of getting this blog note written, I have been messing about with CLISP and the question of just what macros offer. Well, in Smalltalk they would offer operators with more than 2 characters so we could have <=> instead of just <= or => and such. Or ;-)

But I only wanted to show how a few macros can make a Curl web page so nice and clean and readable compared to the latest thing on rails. A sort of pirouette of Curl. But things got macro out of control ...

And Controllers? Well, in Curl they help with animation or represent devices that have rotations, such as joysticks. Oh - Curl comes with a Quaternion class for rotations in 3D.

So when is a web content language out of control? When its comments are used to control its content? (those aren't comments; those are annotations - this a concordance, not a document ...)

Everything we were taught about separation of presentation from X is wrong when it comes to a rich web GUI. And an object is not a row in a relational database (there, I dared to say it ..)

In the early days of television they did not know what to call those who were watching the action as it happened on those funny tubes in restautants and bars. They became 'viewers' but we talk of 'watching TV'. The View in MVC is a bit like that: we pull back the 'model' a ways and achieve some degree of decoupling from any data store. But a 'personalized and dynamic view' is not the 'view' of early MVC. It likely required something like viewer-specific persistent data. Make that a 'personalized and dynamic view of a collaborative process or activity with published tasks' and the closest thing that I know today is Croquet.

Sunday, July 15, 2007

a note on Polymorphism in Rebol and Oz

I have put a page on Polymorphism in Rebol and Oz with some mention of Strongtalk at eclectic-pencil

It really does not do justice to the richness of Rebol and may presuppose some familiarity with Smalltalk. All are available as freeware on the web.

If you work in JavaScript or C# there will be a lot to interest you in the trio of Oz, Strongtalk and Rebol. TiScript, for example, is a JavaScript variant which rejects prototype-based in favor of simple modules.
If you are looking at the new languages coming available for .NET and VisualStudio and want to see multi-paradigm programming then Oz is the place to start.
If you find you don't quite get Oz and the whole Emacs thing, start with Rebol.
If you don't want another way to think about web programming, just an alternative to JavaScript+CSS+HTML+whatever, download the Curl RTE and IDE.
I had been almost sold on XUL + JavaScript or XAML + C# and then I took a look at both Rebol and Curl.
In the next few days I will post something on the beauty of "Quick" Tk in Oz. If you were ever taken with Logtalk+Prolog or Datalog+RDF you will appreciate td(...) and lr( ...) as td( lr( ... )) i.e. layout of widgets is top-down and left-right...

Saturday, July 7, 2007

Sciter, TiScript, DyBase and JSON

If you have ever looked at XUL for Mozilla, you owe it to yourself to look at an alternative way of declaring a UI with JavaScript.
TiScript is an extended-JavaScript with a few twists and it works with DyBase to provide scripting and persistence for Sciter.
Sciter is from Terra Informatica, whom you may know for BlockNote or their SqlLite wrapper.

What Sciter offers is an alternative to JavaScript+DOM. Instead of loading the DOM for an HTML page, the strategy is to use TiScript with a few extensions to CSS.

Sciter offers web developers 8 DOM and Window classes:
  • Element - DOM element. All HTML elements including the document root, frame, inputs, etc. are elements in Sciter.
  • Attributes - a collection of named attributes of any html element.
  • Style - a collection of style attributes applied to any element.
  • Image - bitmap image objects on which you can draw using Graphics methods
  • Graphics - an object wrapper for drawing primitives for drawing on any Element or Image
  • View - represents Sciter window (the main Sciter window and Dialog are views)
  • Event - represents the current UI event.
  • Sciter - a global object holding Sciter application specific methods.


Top level windows are represented by View objects in Sciter. Both the main window of the Sciter.exe application and the client area of the X-Sciter.dll sandbox window are views. Dialog windows also have their associated views.

Each view has a root property which is the root element of the loaded document. The root element in Sciter is the <HTML> element of the loaded document and there is no dedicated Document class because in Sciter the Document is an element tree composed of an element and its children.

Frames and framesets are also ordinary DOM elements. Each has a single child element: the root element of the loaded document. If the document is loaded into a frame, the parent property of the root element of the document will refer to that containing frame element.

These simplifications are intended to make up for inherent weaknesses in how CSS+Javascript is used in web layout to complement simple HTML.

This interests me while I am looking at the separation of concerns which is attempted by Mozilla with XUL for Firefox and for other XPCOM applications outside the browser which use the XPFE (Cross-platform front-end) framework. Sciter+TiScript+JSON is also interesting when contrasted to Rebol/View and the upcoming Liquid-GLayout marriage for Rebol (Rebol does not yet have a cross-platform IDE - which is something else Rebol shares with Oz and Mercury.)

The major change that you will find in TiScript is the use of type to define both classes and modules (namespaces) without the prototype-based emphasis of JavaScript. A class with a this() function has an instance constructor*. In TiScript the prototype field is a reference to a type or is undefined. TiScript also has a nice variant on C# properties to provide set and get accessors for field privacy. Sciter itself uses 'self' to refer to the root object as in self.myFunc()

Corporations in the far east which have used Curl will not want to migrate to XUL+rdf+dtd+css+js and it is hard to imagine ActionScript and Flash as being much more attractive. It would be interesting to know whether TiScript itself would obviate the need for the Google Web Toolkit as a JavaScript nostrum while also streamlining the scripting ( GWT is touted as a remedy for unintended JS closures causing memory leaks under IE - but I should add that GWT does have a fine inexpensive plugin to Eclipse by Instantiations.)

Another point of interest is that TiScript offers JSON persistence through a version of a DyBase library which has been modified to support 'native' TiScript. DyBase is said to have interfaces to PHP, Perl,Python, Rebol and Ruby but I could only find a Smalltalk alpha outside of the home archives of the DyBase author (and none at rebol.org, CPAN or the Python Cheese Shop and no RubyForge or sourceforge entries; the dybase site at garret.ru was off-line this weekend.)

Dybase could be as neglected as the database options offered by associative and hierarchical/network databases (MUMPS, DNS and LDAP are hierarchical) in the world of MySql and XBase. And there is Lazysoft, to which there are links at StumbleUpon and AboutUs.

Perhaps if an AltME group opens on DyBase there will be an opportunity to judge its merits across a few languages. Until then I will watch ltu.

* the author of TiScript is the author of Harmonia, an FLTK for the D language.

Sunday, May 20, 2007

RIA Plugins: Curl Surge versus Adobe LiveScript/Flash/Apollo

This is just an IOU

If LiveScript/Flash is thought to be the answer for a browser-based commercial software project, then surely Curl must have been considered and eliminated. Likely not.

If a captive audience of cubicle domiciled users is to use plugin-Y, then there is at least a plugin-Z that merits consideration: the Surge plugin.

The Curl case is two-fold for RIA: the 'gentle slope' and the 'one-language-mastery' versus journeymen of many languages and apprentices in more.