Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36360 > unrolled thread

Vigil, the eternal morally vigilant programming language

Started byAlain Ketterlin <alain@dpt-info.u-strasbg.fr>
First post2013-01-07 17:01 +0100
Last post2013-01-08 03:12 -0500
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  Vigil, the eternal morally vigilant programming language Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2013-01-07 17:01 +0100
    Re: Vigil, the eternal morally vigilant programming language Chris Angelico <rosuav@gmail.com> - 2013-01-08 03:08 +1100
    Re: Vigil, the eternal morally vigilant programming language Terry Reedy <tjreedy@udel.edu> - 2013-01-08 03:12 -0500

#36360 — Vigil, the eternal morally vigilant programming language

FromAlain Ketterlin <alain@dpt-info.u-strasbg.fr>
Date2013-01-07 17:01 +0100
SubjectVigil, the eternal morally vigilant programming language
Message-ID<87vcb9yobm.fsf@dpt-info.u-strasbg.fr>
I just came across Vigil, an extension to python for serious software
engineers, at https://github.com/munificent/vigil and thought everybody
in this group would be interested (sorry if it has been announced
before).

From README:

| Vigil is a very safe programming language, and an entry in the January
| 2013 PLT Games competition.
| 
| Many programming languages claim to take testing, contracts and safety
| seriously, but only Vigil is truly vigilant about not allowing code
| that fails to pass programmatic specifications.

Enjoy.

-- Alain.

[toc] | [next] | [standalone]


#36361

FromChris Angelico <rosuav@gmail.com>
Date2013-01-08 03:08 +1100
Message-ID<mailman.227.1357574915.2939.python-list@python.org>
In reply to#36360
On Tue, Jan 8, 2013 at 3:01 AM, Alain Ketterlin
<alain@dpt-info.u-strasbg.fr> wrote:
>
> I just came across Vigil, an extension to python for serious software
> engineers, at https://github.com/munificent/vigil and thought everybody
> in this group would be interested (sorry if it has been announced
> before).

It's the logical derivation of the principle that every program, once
written, could be shortened by at least one instruction and contains
at least one bug. From that, you can deduce that every program can be
logically reduced to a single instruction that doesn't work.

Vigil assists you with this logical reduction.

ChrisA

[toc] | [prev] | [next] | [standalone]


#36418

FromTerry Reedy <tjreedy@udel.edu>
Date2013-01-08 03:12 -0500
Message-ID<mailman.265.1357632789.2939.python-list@python.org>
In reply to#36360
On 1/7/2013 11:01 AM, Alain Ketterlin wrote:
>
> I just came across Vigil, an extension to python for serious software
> engineers,

I hope that last part comes from a sense of humor.

> at https://github.com/munificent/vigil and thought everybody
> in this group would be interested (sorry if it has been announced
> before).
>
>  From README:
>
> | Vigil is a very safe programming language, and an entry in the January
> | 2013 PLT Games competition.
> |
> | Many programming languages claim to take testing, contracts and safety
> | seriously, but only Vigil is truly vigilant about not allowing code
> | that fails to pass programmatic specifications.

While the language is a joke (Procrustes would be a somewhat better 
name), the example illustrates the near uselessness of contract 
checking, at least for functions. The example fib(n) function 'swears' 
that the answer is a count (not negative). Ha, ha, very funny. A simple 
'return 0' would satisfy that useless contract*. A correct fib(n) 
function must actually calculate fib(n), and in practice, that is not 
possible to check. Even checking that sorted(iterable) is correct 
(outside a test situation) is harder than it might first seem#.

* In any of the many languages that use biased residue classes as a 
substitute for real integers, positive + positive = positive is not so 
trivial. So the function must return a negative to signal bad input or 
raise an exception either directly or by an input condition. The 
advantage of the directly exception is that the exception message can be 
tailored to the audience and situation. [Vigil would simply excise the 
calling function.]

# Given sorted(iterable) where iterable gets some number of comparable 
items from stdin, how is the contract checker to determine that the 
output is indeed a permutation of the unmutated input items, before 
checking that they are are actually sorted.

-- 
Terry Jan Reedy

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web