Vigil: A programming language with eternal moral vigilance
71–80 of 120 posts
Re: Vigil: A programming language with eternal moral vigilance
#72Even the implementation looks like it's just custom error text for `assert`.
Re: Vigil: A programming language with eternal moral vigilance
#73How are the `implore` and `swear` keywords different from python's `assert`? Even the implementation looks like it's just custom error text for `assert`.
"If an oath is broken, the offending function (the caller in the case of implore and the callee in the case of swear) will be duly punished. ... it will be deleted from your source code"
Hahah, awesome.
Outsource-proof.
Re: Vigil: A programming language with eternal moral vigilance
#74Earlier quoted context omitted.
John Regehr is an expert in undefined behavior in C compilers, so rather than assume his understanding is mistaken, I would first assume mine is. He is not accusing the compilers of executing undefined behavior. He is accusing them of exploiting undefined behavior to "optimize" code. His points are: 1. Current compilers will perform optimizations based on undefined behavior. That is, during the optimization phase, th…
That sounds like a problem with the C standard rather than any compiler.
For example, the result of x+y is undefined for signed integers in C, because we want it to compile it to a minimum number of instructions on every architecture. No instructions to check for overflow and branching afterwards. No error correction instructions on architectures where semantics differ to the language semantics.
Re: Vigil: A programming language with eternal moral vigilance
#75Earlier quoted context omitted.
I think that website is confused about undefined behavior, they accuse LLVM and GCC of "executing undefined behavior" for the minimal empty-main C99 program because the default headers included in the compiler have UB code in them. But only user code is required to be well-formed and have defined behavior, system headers could just as well be written in Forth as long as the actual behavior under the compiler they com…
John Regehr is an expert in undefined behavior in C compilers, so rather than assume his understanding is mistaken, I would first assume mine is. He is not accusing the compilers of executing undefined behavior. He is accusing them of exploiting undefined behavior to "optimize" code. His points are: 1. Current compilers will perform optimizations based on undefined behavior. That is, during the optimization phase, th…
Re: Vigil: A programming language with eternal moral vigilance
#76Punished code deserves to be shamed and be made an example of. Vigil should make an image with the deleted code, such as it cannot be copy pasted and has to be rewritten in shame. This idea seems actually quite awesome for a competition. Its truly a dungeon-crawler of programming. Suggested extra hard-mode for short competitions: deletes all code.
It should also upload the image to imgur or some such site.
Re: Vigil: A programming language with eternal moral vigilance
#77Earlier quoted context omitted.
That sounds like a problem with the C standard rather than any compiler.
It is less of a "problem" with the standard, but more of a "design decision". Performance is more important to C-people. For example, the result of x+y is undefined for signed integers in C, because we want it to compile it to a minimum number of instructions on every architecture. No instructions to check for overflow and branching afterwards. No error correction instructions on architectures where semantics differ…
If it does overflow, it's either a target-specific hand optimization or a programmer error, but that varies on a program-by-program basis, hence GCC having -fwrapv, -ftrapv, and the default of "I don't do that, optimize accordingly".
Re: Vigil: A programming language with eternal moral vigilance
#78Earlier quoted context omitted.
John Regehr is an expert in undefined behavior in C compilers, so rather than assume his understanding is mistaken, I would first assume mine is. He is not accusing the compilers of executing undefined behavior. He is accusing them of exploiting undefined behavior to "optimize" code. His points are: 1. Current compilers will perform optimizations based on undefined behavior. That is, during the optimization phase, th…
Ironically enough, point #4 sounds very similar to how Vigil claims to work.