Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Promise Visualization Playground (bevacqua.github.io)
61 points by bevacqua on Sept 29, 2015 | hide | past | favorite | 9 comments



I don't quite understand what's going on here but find it extremely interesting. Is it an implementation of a particular theory? The word 'Promise' makes me think of automated contractual mechanisms, self-executing legal agreements and things along those lines.

For some years I've thought that the ever-increasing complexity of law, legislation, and litigation is a form of sociopolitical pollution that ends up making the world a worse place to live in, rather than the better one that is intended. Of course when we draft contracts, bills and so on we want to incorporate the lessons of past experience and provide for foreseeable contingencies, but (if we are ethical) we do not want to make our legal promises so complex that people can't evaluate their acceptability. The biggest innovation that I've noticed in recent years was the Creative Commons approach to copyright, where existing concepts from copyright law underpin a simple and clearly defined framework where the different categories aggregate bundles of rights and responsibilities, such that both parties to a transaction can agree to a particular licensing regime (like CC-by-SA 4.0) without wasting time and energy negotiating individual details from scratch in pursuit of some marginal gain. Doing so is not optimal for either party, but if the licensing regime is sufficiently credible and widely accepted that it can be optimally efficient in the aggregate.

This tool suggests to me a more formal, rigorous way of defining contracts that could then be evaluated at a higher level but which, in the event of a dispute, are capable of an agreed-upon objective evaluation that avoids the financial, operational, and emotional costs of litigating a dispute.

sorry if this is completely off the wall and irrelevant, I was just instantly struck by the possibilities for encoding legal matters in a way that would make the fundamental dynamics much more accessible to people without legalist training or inclinations.


>sorry if this is completely off the wall

it certainly is

> irrelevant

for the way most helpful to most people reading, yeah, probably

> I was just instantly struck by the possibilities for encoding legal matters in a way that would make the fundamental dynamics much more accessible to people without legalist training or inclinations.

this is a kick-butt totally cool idea.


JavaScript promises, which are basically a way to respond to asynchronous functions.


Thanks. If you were curious about the applicability of this to legal topics you might like to read up on https://en.wikipedia.org/wiki/Computational_law


I would love to try it, but I have a javascript error in the console:

Uncaught SyntaxError: missing ) after argument list demo.min.js:1

Chrome version: Version 44.0.2403.155 (64-bit)


Try using the babelify option


Async/await is such a much better syntax so I just use babel.

It makes the syntax close to the normal synchronous code. Then you don't need a 'playground' to visualize basic control flow.


You may want to default to Babelifying. Nothing was happening and I only discovered the problem by going to the developer console and seeing a syntax error.


Can't seem to get it working on Chromium 34:

    Uncaught TypeError: undefined is not a function demo.min.js:20
    (anonymous function) demo.min.js:20
    i demo.min.js:1
    (anonymous function) demo.min.js:1
    ./lib demo.min.js:1
    i demo.min.js:1
    (anonymous function) demo.min.js:1
    (anonymous function) demo.min.js:1
    ./injection demo.min.js:1
    i demo.min.js:1
    e demo.min.js:1
    (anonymous function) demo.min.js:1




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: