OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 12:41 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: A site like this, but for language development?
PostPosted: Tue Nov 29, 2011 4:55 am 
Offline
Member
Member

Joined: Thu Aug 11, 2011 12:04 am
Posts: 125
Location: Watching You
When I mentioned python is slow I never made any statement saying that python cannot be fast. It depends on the implementation. It is just that that was the question that brought me into the world of LangDev.

_________________
Get back to work!
Github


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Tue Nov 29, 2011 10:06 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
MasterLee wrote:
Given an language L1 that is faster as an language L2 in some tasks an slower in other tasks. An language L3 will be faster as booth language if (optimal) translators are available that can translate code in L3 to L1 and L2.


I'm not sure code generation and optimizations are what's being discussed. First of all, given very intelligent compilers, they should be able to output equivalent yet optimal code regardless of language provided they are both Turing-complete---L3 is rendered useless if we start talking about optimal compilers. We mostly want to talk about language capabilities and productivity. The question is whether a good L3 could be designed...

Language support for every possible programming paradigm is not a good idea, as no one likes a bloated language (e.g., C++ doesn't even try that and look how huge it is: the latest C++11 draft, which became FIDS, is 1353 pages long). The other extreme is clearly not good way to go either (e.g., assembly is the most capable but the least productive).

Next, let's remember that we don't (yet) have such intelligent compilers and that we design languages in such a way that they will make it easy for compiler implementors to come up with efficient implementations.

Is your L3 feasible?

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Tue Nov 29, 2011 6:11 pm 
Offline
Member
Member

Joined: Sat May 07, 2011 8:21 am
Posts: 32
Quote:
given very intelligent compilers


a.k.a. magic


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Tue Nov 29, 2011 7:06 pm 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
We already have techniques to generate optimal code regardless of situation. Alas, the current ones take forever to compile so they're not practical for anything other than trivial tasks.

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Wed Nov 30, 2011 6:44 am 
Offline
Member
Member

Joined: Thu Jul 05, 2007 8:58 am
Posts: 223
Love4Boobies wrote:
We already have techniques to generate optimal code regardless of situation. Alas, the current ones take forever to compile so they're not practical for anything other than trivial tasks.

There are no optimal optimizing compilers. This fact can be proved simply because such a compiler would be able to solve the halting problem, which is fundamentally unsolvable for a computer (A proof of this was given by Turing). So the techniques you claim exist don't.


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Wed Nov 30, 2011 7:39 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
There is no optimum for a program that does not halt. Therefore any valid program that has an optimized solution is finite in execution length, and therefore the optimal solution is finite in size and can be found within finite time by trying all configurations.

Therefore, there exists an algorithm. (And conversely, the halting problem is irrelevant as an argument.)

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Wed Nov 30, 2011 7:48 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
davidv1992 wrote:
Love4Boobies wrote:
We already have techniques to generate optimal code regardless of situation. Alas, the current ones take forever to compile so they're not practical for anything other than trivial tasks.

There are no optimal optimizing compilers. This fact can be proved simply because such a compiler would be able to solve the halting problem, which is fundamentally unsolvable for a computer (A proof of this was given by Turing). So the techniques you claim exist don't.


The halting problem cannot be properly expressed in (Turing-complete) high-level languages either, so the compiler would never have to optimize it.

On an unrelated note, this is more a problem of computability theory rather than engineering. Remember that undecidable problems cannot be correctly solved by one universal algorithm when you're actually dealing with true Turing-complete machines, which computers aren't due to the fact that they can only have a limited amount of memory. Furthermore, remember although there are quite a few classes of problems for which we have proof that they cannot be solved by computers (because they cannot be expressed in the appropriate terms), we have little understanding about how these problems fit in with AI. For example, given a very big and complex ANN, the program might consider the problem in a more abstract way---much like humans do. The biggest issue we will be faced to might be encountering problems that cannot be solved in the axiomatic system we use.

EDIT: Aww, Combuster beat me to it but I wrote so much that I will submit anway :(

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Thu Dec 01, 2011 11:03 pm 
Offline
Member
Member

Joined: Thu Aug 11, 2011 12:04 am
Posts: 125
Location: Watching You
@combuster Agreed.
Actually I cannot think of any program which eventually does not halt apart from
Code:
for(;;){...}
but even then there is a way of seeing that programs do not continue in an infinite loop. (wonder what kill is for?) And in any case it is pretty obvious that the program will loop forever.

_________________
Get back to work!
Github


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Fri Dec 02, 2011 8:53 am 
Offline
Member
Member
User avatar

Joined: Wed Jan 06, 2010 7:07 pm
Posts: 792
ACcurrent wrote:
@combuster Agreed.
Actually I cannot think of any program which eventually does not halt apart from
Code:
for(;;){...}
but even then there is a way of seeing that programs do not continue in an infinite loop. (wonder what kill is for?) And in any case it is pretty obvious that the program will loop forever.

How about recursion or a regular for loop, based on input from a file, the network, the user, etc? How about programs that are intended to run forever, e.g. event loops in servers?

_________________
[www.abubalay.com]


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Sat Dec 03, 2011 12:52 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
We were talking about scenarios where the input is readily available. No one can tell whether execution will terminate unless they don't know what the input is...

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Sat Dec 03, 2011 1:44 pm 
Offline
Member
Member
User avatar

Joined: Wed Jan 06, 2010 7:07 pm
Posts: 792
My post was in response to "I cannot think of any program which eventually does not halt apart from for(;;){...}". In the situations I described, even if you know the input, you cannot in the general case decide whether the program will halt.

Which you should know based on your reference to the halting problem earlier...

_________________
[www.abubalay.com]


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Sun Dec 04, 2011 1:50 am 
Offline
Member
Member

Joined: Thu Aug 11, 2011 12:04 am
Posts: 125
Location: Watching You
If a user passes a faulty file to the program its the user's fault.

_________________
Get back to work!
Github


Top
 Profile  
 
 Post subject: Re: A site like this, but for language development?
PostPosted: Sun Dec 04, 2011 8:59 am 
Offline
Member
Member
User avatar

Joined: Wed Jan 06, 2010 7:07 pm
Posts: 792
If a user passes a faulty file to the program it doesn't mean the program is allowed to hang or blow up. (Especially if it's something important like a server for the DoD :P)

_________________
[www.abubalay.com]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group