Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 30th, 2005, 11:02 PM   #21
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 707
Rep Power: 4 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
Any good texts out there on compiler design that could get me started? Hmm, how about this, a Python compiler written in Python...
thechristelegacy is offline   Reply With Quote
Old Jul 1st, 2005, 8:47 AM   #22
andy_m
Newbie
 
Join Date: Feb 2005
Posts: 8
Rep Power: 0 andy_m is on a distinguished road
Seems a bit ambitious, don't you think? Don't forget that the fact that the language is interpreted is one of its greatest strengths. Its dynamic/flexible nature, and the rapid development cycle it allows, are central to the popularity of the language.
andy_m is offline   Reply With Quote
Old Jul 1st, 2005, 12:24 PM   #23
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Interpreters written in Python is another matter. The introspection provided by Python and it's dynamic nature makes this ridiculously easy.. I know of someone who wrote a PHP interpreter in Python, and i've written a mini language in Python (with integer, strings, dictionary, floating point, and list types) which you can extend with Python (simply specify the name of the Python file, and all functions defined there can be used from the language).
Cerulean is offline   Reply With Quote
Old Jul 3rd, 2005, 3:02 PM   #24
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 707
Rep Power: 4 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
I don't plan on actually writing a compiler for the language, it's way past me, but I would still be interested on reading a book on compiler design.
thechristelegacy is offline   Reply With Quote
Old Jul 3rd, 2005, 3:30 PM   #25
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

It should be easier to create a Python to C++ translator and then use one of the many C++ compilers to generate the exe file.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jul 21st, 2005, 10:36 PM   #26
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,791
Rep Power: 5 Sane will become famous soon enough
I know I'm bumping up an old thread, but only because I seriously support the idea of a hidden-source compiler for Python (or at least a good one).
Sane is offline   Reply With Quote
Old Jul 22nd, 2005, 10:42 AM   #27
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

The beauty of Python is that it is open-source, not hidden-source! Maybe you should contact Microsoft for some of their internal super-hidden-source languages like F#.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jul 22nd, 2005, 4:07 PM   #28
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,791
Rep Power: 5 Sane will become famous soon enough
But I still want something that can compile all my modules!! I don't want my clients to need to download 4 seperate Python installations plus my source!!!!!!!!!! I know there is py2exe but the exact problem is no one I know can get it to work...

so "...only because I seriously support the idea of a hidden-source compiler for Python (or at least a good one)."
Sane is offline   Reply With Quote
Old Jul 22nd, 2005, 5:12 PM   #29
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
There isn't anything wrong with open source. Neither is there anything wrong with closed-source, proprietary stuff. Advancement would be considerably slower because of lack of inducement if people couldn't protect and profit from their original ideas. We all want to be philanthropists and charitable -- right after we ensure our next few meals and a roof over our head.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 22nd, 2005, 5:56 PM   #30
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

Quote:
Originally Posted by DaWei
There isn't anything wrong with open source. Neither is there anything wrong with closed-source, proprietary stuff. Advancement would be considerably slower because of lack of inducement if people couldn't protect and profit from their original ideas. We all want to be philanthropists and charitable -- right after we ensure our next few meals and a roof over our head.
I fully agree! Still think that a Python to C++ translator should work, then you can use one of the existing C++ compilers. Heck, a lot of Python modules are written in C++. Googling around, there have been some early attempts at this. There is also a Java to C# translator by Microsoft, and an open-source basic to C translator that seems to do very well.

The problem with a Python to C++ translator is that whoever writes it has to be very familiar with both languages.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC