I was with it until the delete bit. Refuse point blank to run : I like this. Raise exceptions : ok (bit weak). But delete... esh imagine the cost!
Vigil: A programming language with eternal moral vigilance
81–90 of 120 posts
Re: Vigil: A programming language with eternal moral vigilance
#82To make this actually useful, instead of deleting bad functions, it's probably better to make the offending functions throw a special exception when they are called, signaling the calling of a function known to be bad. This way, you can still inspect the code for the offending functions and fix the bugs. Otherwise, the original code could just totally disappear after multiple runs. What good is non-buggy code if it d…
And so moral relativism raises its hideous, three-horned, leering head....
Re: Vigil: A programming language with eternal moral vigilance
#83If Vigil fails to punish a function, does it delete itself? Or is it a Hobbesian sovereign?
> If Vigil fails to punish a function, does it delete itself? 1. It is wrong not to punish immoral code. 2. You cannot punish all immoral code without a solution to the Halting Problem. 3. You cannot solve the Halting Problem. ∴ Vigil must delete itself. QED.
[The Hobbesian rebuttal]
1. We give up all other rights in order to protect our code from immorality - among these are any right to a solution to the halting problem.
2. As socially contracted sovereign, Vigil is exists only to enforce morality upon our code.
3. Nothing can have a nature contrary to what is necessary for it's existence.
4. Deleting itself would be contrary to the social contract which is necessary for its existence. Hence, it is absurd.
RAA: Vigil cannot delete itself.Re: Vigil: A programming language with eternal moral vigilance
#84Consider this: you've got some script that does a sequence of operations using the standard tools. Somewhere you change between imagemagick and graphicsmagick and some image doesn't get made thanks to syntax differences; after this you've used some clever shell filename expansion expression or regex to move/delete files, but the missing image changed your working context enough that suddenly you're in $HOME doing an rm -rf .! The environment is just too fragile and powerful to completely automate everything you might need without setting up enough safety mechanisms, confirmations, and sanity checks to largely nullify the value of scripting as a nearly zero development programming toolchain.
But if shell code were trivially spec'd for pre-/post- conditions and misbehaving code gets noisily deleted (noisily so everything isn't packed away into code versioning purgatory by cascading failures when a tool like rename is accidentally uninstalled)---especially if the shell of pre-and post conditions were left around stub code... Imagine the beauty of your scripts directory!
Replacing some slain block of code is trivial since the tools you need are already mostly written, and you've done something close to what you need before---plus the whole point of shell scripting is that it should be effortless and fast to produce.
If you've built a massive, multi-purpose utility, it deserves to live only as long as it runs flawlessly---after which, you should slice it down or replace it with an inevitably more reliable equivalent that was written for the same purpose years (or decades) ago.
Best of all the conditions that deleted your broken cruft even remind you exactly what you needed to do when you're re-implementing something, but often without pre-studying the entire system to ascertain what world state you are getting and what you need to produce. Brilliant!
This may have started out somewhat tongue-in-cheek (since most programming environments are at least somewhat stable and feature significant error detection and recovery facilities), but I think there's some dead serious application in the quick-and-dirty, often unchecked and fluid environment of traditional shell scripting. The more I think about it, the more I'm amazed my quarter million keystrokes of live scripts woven into my every task on my Linux desktop haven't produced more catastrophes (or any meaningful accidental data loss) or left a trail of silent failures for me to find only long after the causal bugs had manifested.
Re: Vigil: A programming language with eternal moral vigilance
#85Earlier quoted context omitted.
I was thinking that it would remove the offending source code from history -- a revisionist source control system, if you will, to show that we have always been at war with Eastasia.
You just have to set Damnatio_Memoriae = TRUE http://en.wikipedia.org/wiki/Damnatio_memoriae
Re: Vigil: A programming language with eternal moral vigilance
#86Re: Vigil: A programming language with eternal moral vigilance
#87Re: Vigil: A programming language with eternal moral vigilance
#88Earlier quoted context omitted.
Source control allows one to bypass the moral purity of Vigil by recovering arbitrary sinful code from the past. Moral purity can not be advanced while the sins of the past remain with us forever, uncleansed. One can only properly use Vigil without any sort of source control. Even copying files before the compiler tries to run it is an attempt to cheat the system; for that, Vigil would be justified in deleting your e…
I was thinking that it would remove the offending source code from history -- a revisionist source control system, if you will, to show that we have always been at war with Eastasia.
This is now my new favorite phrase.
Re: Vigil: A programming language with eternal moral vigilance
#89Eternal moral vigilance is the price of coding liberty! This project clearly needs to be amended to integrate with version control.
Source control allows one to bypass the moral purity of Vigil by recovering arbitrary sinful code from the past. Moral purity can not be advanced while the sins of the past remain with us forever, uncleansed. One can only properly use Vigil without any sort of source control. Even copying files before the compiler tries to run it is an attempt to cheat the system; for that, Vigil would be justified in deleting your e…
Re: Vigil: A programming language with eternal moral vigilance
#90If Vigil fails to punish a function, does it delete itself? Or is it a Hobbesian sovereign?
> If Vigil fails to punish a function, does it delete itself? 1. It is wrong not to punish immoral code. 2. You cannot punish all immoral code without a solution to the Halting Problem. 3. You cannot solve the Halting Problem. ∴ Vigil must delete itself. QED.
But, remember, Vigil only holds you to the oaths you yourself have sworn. If Vigil swears to punish a function, then it should be punished for failing to do so. But if it's given no oath to that effect, then it's off the hook.
You may reasonably ask yourself, "well, what oaths does Vigil swear to uphold?" The answer is a frightening "none", since Vigil is not currently written in Vigil (nor is the README, which is in Markdown, a decidedly sinful format).