Live data from Hacker News

I want to fix programming

jonbho.net

11–20 of 163 posts

Re: I want to fix programming

#11
post #2

As CPU excess increases, I guess I've always thought that eventually code blocks could be grown using genetics inspired algorithmic processes that could just try everything possible until something works well.

It took the universe 13.7 billion years and an ever-expanding memory space; I'm not entirely sure if this is the right approach…

Re: I want to fix programming

#12
post #4
post #3

Isn't this just Prolog?

OP here. It's not just Prolog, but indeed Prolog is the closest thing now.

How is it not just prolog?

At the very least, a constraint programming language would be a good basis to start with here.

http://en.wikipedia.org/wiki/Constraint_programming

Re: I want to fix programming

#14
post #2

As CPU excess increases, I guess I've always thought that eventually code blocks could be grown using genetics inspired algorithmic processes that could just try everything possible until something works well.

Isn't that just BogoSort? :) http://en.wikipedia.org/wiki/Bogosort

Re: I want to fix programming

#15
As an undergraduate, I used a research project at my university that did more-or-less what the author describes.

The system was an "animator" for formal specifications called Possum: http://ww2.cs.mu.oz.au/~tmill/tgf/index.html

Possum would allow you to directly execute a program that was formally defined using the Sum formal specification language. While it was not able to handle every possibility, I found using it to be a really magical experience.

However, in practical terms, the idea of declarative programming has just as many difficulties as ordinary programming: how do you know your specification is correct? how do you debug a logical expression? how do you know your specification matches what you want it to do?

Re: I want to fix programming

#16

Dear Jon: What you have is fabulous and immediately useful: You are describing a language for describing constraints on the results of computer programs. In other words, you can express the correctness of a computer program and check whether a program is, in fact, correct. It’s true that IF a sufficiently smart compiler could infer a working program from the definition of correctness, no further “programming” would b…

Take a look at quickcheck if you want something that works today.

http://www.haskell.org/haskellwiki/Introduction_to_QuickChec...

Re: I want to fix programming

#17
post #4

Earlier quoted context omitted.

OP here. It's not just Prolog, but indeed Prolog is the closest thing now.

How is it not just prolog? At the very least, a constraint programming language would be a good basis to start with here. http://en.wikipedia.org/wiki/Constraint_programming

Specifically, a Prolog-like syntax is also hugely popular in this fascinating Constraint Programming niche: http://en.wikipedia.org/wiki/Answer_set_programming

Re: I want to fix programming

#18
For those who haven't read it yet, this paper has a lot to say about the cause of programming complexity, Out of The Tarpit:

http://web.mac.com/ben_moseley/frp/paper-v1_01.pdf

They say that the only essential complexity is the one inherent to the problem the program is trying to solve. Everything else is just here because we haven't yet found the methodology or invented the tools to battle it.

They also describe an ideal world, where all the programming is done in way of declarative programming - what you want the code to do, and not how to do it.

Re: I want to fix programming

#19
post #2

As CPU excess increases, I guess I've always thought that eventually code blocks could be grown using genetics inspired algorithmic processes that could just try everything possible until something works well.

To some extent this is already done in a process called "Superoptimization"[1]. In that case, though, correct code is used as a rigorous functional specification, and the Superoptimization process will replace segments with shorter or faster opcode sequences with identical side effects.

[1] http://en.wikipedia.org/wiki/Superoptimization

Re: I want to fix programming

#20
This doesn't look much simpler to me, and I suspect the problem with this approach will wind up being incomplete or overconstrained specifications, rather than incorrect programs.

To use the language of the op, it will be composed of many discrete simple assertions that excruciatingly specify the output.

Post reply on HN