//No Comment - Frank, Sandboxing JavaScript, OCaml 4.04.0 & Kotlin 1.0.6
Written by Ian Elliot   
Thursday, 29 December 2016

• Do be do be do

• Transaction-based Sandboxing for JavaScript

• OCaml version 4.04.0 is released

• Kotlin 1.0.6


Sometimes the news is reported well enough elsewhere and we have little to add other than to bring it to your attention.

No Comment is a format where we present original source information, lightly edited, so that you can decide if you want to follow it up. 


Do be do be do

Frank is the sort of new language you need to look at. It pushes the functional pardgm that bit further and it isn't just another Java clone with better syntax and modified type system. It really is novel. 

‘To be is to do’—Socrates.

‘To do is to be’—Sartre.

‘Do be do be do’—Sinatra. —anonymous graffiti, via Kurt Vonnegut 

Frank is a functional programming language with effects and handlers in the spirit of Eff, controlled by a type system inspired by Levy’s call-by-push-value. Doing and Being are clearly separated, and managed by distinguished notions of computation and value types. 

We explore the design and implementation of Frank, a strict functional programming language with a bidirectional effect type system designed from the ground up around a novel variant of Plotkin and Pretnar's effect handler abstraction. 

Effect handlers provide an abstraction for modular effectful programming: a handler acts as an interpreter for a collection of commands whose interfaces are statically tracked by the type system. However, Frank eliminates the need for an additional effect handling construct by generalising the basic mechanism of functional abstraction itself.

A function is simply the special case of a Frank operator that interprets no commands. Moreover, Frank's operators can be multihandlers which simultaneously interpret commands from several sources at once, without disturbing the direct style of functional programming with values. 

Effect typing in Frank employs a novel form of effect polymorphism which avoid mentioning effect variables in source code. This is achieved by propagating an ambient ability inwards, rather than accumulating unions of potential effects outwards. 

We introduce Frank by example, and then give a formal account of the Frank type system and its semantics. We introduce Core Frank by elaborating Frank operators into functions, case expressions, and unary handlers, and then give a sound small-step operational semantics for Core Frank. 

Programming with effects and handlers is in its infancy. We contribute an exploration of future possibilities, particularly in combination with other forms of rich type system.






Transaction-based Sandboxing for JavaScript

One of the things that cripples JavaScript in the browser is the need for a Sandbox. With code coming from unreliable sources there really isn't much choice but how best to implement a sandbox?

Today's JavaScript applications are composed of scripts from different origins that are loaded at run time. As not all of these origins are equally trusted, the execution of these scripts should be isolated from one another. However, some scripts must access the application state and some may be allowed to change it, while preserving the confidentiality and integrity constraints of the application.  

This paper presents design and implementation of DecentJS, a language-embedded sandbox for full JavaScript. It enables scripts to run in a configurable degree of isolation with fine-grained access control. It provides a transactional scope in which effects are logged for review by the access control policy. After inspection of the log, effects can be committed to the application state or rolled back. The implementation relies on JavaScript proxies to guarantee full interposition for the full language and for all code, including dynamically loaded scripts and code injected via eval. Its only restriction is that scripts must be compliant with JavaScript's strict mode.






OCaml version 4.04.0 is released

It is arguable that OCaml has been more of an inspiration to other languages than a run away success in its own right, but a new version is still newsworthy. OCaml is a functional language that includes features of imperative and object oriented programming. 

The new release is mainly a bug fix and small changes release. The biggest new feature is SpaceTime a new memory profiler. 

A full change list and download is available. 


Kotlin 1.0.6

For JetBrains fans the fact that a new version of Kotlin is available is important news. 

Convert try-finally to use() intention

We continue to add intentions for converting code to idiomatic Kotlin. The IDE now automatically suggests to replace try-finally block with the use() call when all the finallyblock does is closing a resource.

"Add names to call arguments" intention

Named arguments help to increase code readability. With the new "Add names to call arguments" intention you can easily add the name to an argument, or just substitute names for all call arguments at once.

There are other IDE improvments and better Android support. 






To be informed about new articles on I Programmer, sign up for our weekly newsletter,subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.


Oracle Database 23ai - Feel the Difference

The Empire strikes back with the most advanced
Oracle version to date. The focus of this new version is surprise, surprise, AI , which is so embedded into the new product that Oracle found prudent [ ... ]

Visual Studio 17.11 Focuses On Quality Of Life

Microsoft has released Visual Studio 2022 v17.11 Preview 1, the first preview of the next update for Visual Studio 2022. The developers say this update focuses on quality of life improvements for deve [ ... ]

More News

C book



or email your comment to: comments@i-programmer.info


Last Updated ( Thursday, 29 December 2016 )