News for hackers. Stuff that matters.

chrisworden

Re:Idris: A Language for Type-Driven Development on Monday January 23, 2023 @06:42AM (#34487713)
There is at least one language that does this as a form of its core mechanism of execution- Mercury Language, a declarative/logic programming language.

Its type system is fairly complex. To accomplish the goal you describe, functions must be declared as deterministic, non-deterministic, or multi-deterministic. Meaning, they always have a solution, sometimes have a solution, or multiple solutions for the same input.

Armed with that information, the compiler will throw an error if you haven't thought of all possibilities in your logic flow. The fact that the type system required you to be very descriptive in many different ways compounded the number of bugs that the compiler would catch before your program ever runs... I think someone said "if you can get your code past the compiler, it will work on the first try."

I wish Mercury were more popular, it's an awesome project!

Re:Potato Paradox on Monday November 28, 2022 @08:14AM (#33773222)
I think it's more interesting that this poorly-worded "riddle" managed to find its way onto wikipedia:

A section titled "The Language Paradox" was removed on October 2:

> Careful wording must be used to ensure that the "paradox" is correct.

With the explanation: "This is 100% original research, which as noted contains errors"

So the only thing that makes the "paradox" interesting is that it's badly worded, but any commentary to that effect is original research, so in the end we're just left with a fairly unremarkable riddle on Wikipedia and grumpy people like myself complaining about it.

Re:Open Sourcing Mental Illness on Saturday September 24, 2016 @05:18PM (#12572697)
I once overheard: "Not sure if you want to take your own life? Call the police and they'll help that right along."