//No Comment - Frank, Sandboxing JavaScript, OCaml 4.04.0 & Kotlin 1.0.6
//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

nocomment

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.

 https://hackage.haskell.org/package/Frank

 https://github.com/cmcl/frankjnr 

 

 nocomment

 

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.

javascrip

  

 

 

  

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. 

 kotlinlogo

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. 

 

 

nocommentlanguages

nocomment

 

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.

Banner


AlphaGo Triumphs In China
27/05/2017

The Future of Go Summit has concluded with AlphaGo proving not only to be unbeatable (except when playing itself!) but also an innovative and exciting opponent that has a lot to offer human Go players [ ... ]



InkScape Moves To GitLab
12/06/2017

The open source vector graphics editor, Inkscape, has moved to GitLab. One reason for the move was because its existing Launchpad code platform and repository system was off putting to new contributor [ ... ]


More News

 
 

 

blog comments powered by Disqus

 

Last Updated ( Thursday, 29 December 2016 )
 
 

   
Banner
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.