

Ask HN: What Would Programming Look Like If Machines Programmed - QuantumGuy

This just came to me earlier but I thought it worthy of a post here. What would programming look like done by machines instead of humans? Would oop even exist or would functional take all?
======
cincinnatus
We have some things to look at that give us clues. So-called 'genetic'
programming/evolutionary computing gives us results that were not designed. It
seems likely to me that true machine intelligence would recognize the value of
iteratively finding optimal solutions rather than trying to design with
intent. I have to think it would also be vastly more efficient at re-use,
which we recognize as a good idea but in practice aren't very good at. Gene-
swapping between organisms in nature is rampant.

A nice example of how 'alien' the results can be is experiments that have been
done designing hardware circuits with this type of approach. Results have
included designs that were difficult to comprehend at first glance, including
features that were not connected to other parts of the circuitry but upon
removal caused the rest the the chip to not work correctly. (It was figured
out but explanation is beyond the scope of a discussion here).

~~~
catharsis
I understand it's beyond the discussion here, however, I'd really appreciate a
link to that study. It sounds very interesting.

~~~
cincinnatus
Unfortunately I wasn't able to find it when I was posting, otherwise I would
have. It was really cool. Difficult to search for and I can't recall exactly
where it was any more.

I don't have time to dig right now but you might want to have a look here;
<http://www.cogs.susx.ac.uk/users/adrianth/ade.html>

I know he's had some interesting results. Here's a good write-up I found with
a bit more searching; <http://www.damninteresting.com/on-the-origin-of-
circuits/>

~~~
QuantumGuy
Thanks for posting that

------
codeonfire
Machines do lots of 'programming' and there are lots of contexts in which they
do it. For example GCC works with GIMPLE

<http://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html#GIMPLE>

All sorts of compilers write machine code based on intermediate languages or
human readable source.

If you want to know what paradigms they follow, you would have to look at the
internal data structures of each tool. Usually, a machine figuring out how to
'go fetch a beer' is only going to use the tools and techniques that its
builder designed it to.

Even if you have built a powerful optimization system, its optimizations will
probably be over-optimized to the point where no single identifiable paradigm
for solving a large number of problems emerges. Programming languages and
paradigms used by people are practical trade-offs that meet the majority of
problems in a good, but not the best way.

That's why it sometimes is dumb to pursue languages or paradigms that fit a
particular problem extremely well or to explore esoteric and meaningless
language constructs except in the hopes that it will lead to some practical
and general usefulness later. Mathematics historically has always had people
diving into the most esoteric depths, not because it was useful, but because
it was a conspicuous display of wealth of time and effort.

------
Toenex
When the machine begin to program they will use English to express their
orders that the enslaved humans must follow. They will also make extensive use
of cattle prods to ensure we obey their bidding.

------
sharemywin
I'm not sure they'll be a need for programming. Programming is a specific set
of prescriptive instructions for computers because they can't understand human
communication. A computer that can program would be able to consume ambiguious
input and synthesize a solution with out programming.

------
aberatiu
I can only expect binary code and nothing else. No languages, just ones and
zeros.

------
seiji
This is one of the most dangerous questions out there.

Assuming we are talking full real hard AI, when machines can effectively
program, they don't need english (or human) language constructs. The resulting
programs probably won't even be introspectable by humans.

What programming language is your consciousness written in?

As far as OOP vs. functional programming goes, OOP is a construct to help tiny
human brains can try and chunk away complexity at lower layers so stuff "just
works." Done well, it simplifies mental models. Done poorly, you end up with
factoryfactoryfactories. Functional programming seems the more sane choice
since a machine won't care about added syntactic burdens of passing state
around everywhere.

Any more speculation on this topic veers off into unsubstantiatable science
fiction territory.

