 |
 |
Use programming language as terminal language?
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status:
Offline
|
|
Is there a way (or a program) to use multiple languages right in the terminal? I'd like to basically be using programming languages as my means of working in the terminal, instead of all these shells like Bash and tcsh. Example:
%NSString *myString = [NSString alloc]
%myString = "user@website.com"
%NSMailTo myString
%cd /; ls
So it would be like I am the program, running at a human pace. This way I can do what I need to do, rather than having a program written in advance to do it, with a GUI and everything. Sometimes I don't want to make that investment just to get stuff done.
But only this needs to go even further, where multiple languages can be used in the same context, they only need be marked.
%FT <= $Fortran
%OC <= $Obj-C
%TC <= $tcsh
%OC | NSString *myString = [NSString toString:FT | sqroot(3+5) | ] |
%FT | OC | [myString toInt] | +9 |
%TC | cd OC | NSHomeDirectory | ; ls |
Well, doesn't anybody else think these are needed abilities?
1) A live runtime
2) Multiple languages working together
3) User himself being treated like a program
It just seems like the score of programming languages have between them incredible power, but the only way to wield them is in fully-formed programs. I want to access them directly.
|
|
you are not your signature
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 2001
Status:
Offline
|
|
interesting idea... but I think it may be overkill.
Bash is really good at what it does. If you want a real-time interpreted language, check out python and ruby... you can run programs as you type them, it's pretty nifty 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status:
Offline
|
|
What languages does the GCC compiler as it comes on OS X interpret? How do you tip it off to what language you're using in PB?
If this program doesn't exist, I'm thinking of trying to maybe use the compiler or a just-in-time compiler + plugins for each of the languages (if necessary) to create such a system.
Is there any way to send messages directly to the run-time system? Make OS X think the message is a program?
|
|
you are not your signature
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
Originally posted by Gametes:
What languages does the GCC compiler as it comes on OS X interpret? How do you tip it off to what language you're using in PB?
The file extension usually. .m is Obj-C, .cpp or c++ is C++, .c is C, .java is java, etc.
Is there any way to send messages directly to the run-time system? Make OS X think the message is a program?
That's tough. I remember LisP could do that, but that's a pretty weird language compared to C, java, etc.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
Well, back in The Day, part of the WebObjects development environment was this cool thing called WebScript. It was basically an interpreted version of Objective-C, with a few useful data-processing extras. Stepwise once documented how you could set up a WebScript-based shell.
Alas, WebScript went away around the same time ObjC-based WebObjects did. It would theoretically be possible to resurrect it -- you could use the Apple ObjC runtime, you'd just have to write your own parser and frontend.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Originally posted by Rickster:
Well, back in The Day, part of the WebObjects development environment was this cool thing called WebScript. It was basically an interpreted version of Objective-C, with a few useful data-processing extras. Stepwise once documented how you could set up a WebScript-based shell.
Sounds like F-Script to me. I'd suppose you could probably do something along those lines with F-Script Anywhere.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: Provo, UT
Status:
Offline
|
|
I'd second the call to try out Python. I think it does everything you want and there are ALOT of libraries for it. It is standard on the Mac too. Its main limit is in windowing and wxWindows has a Mac version now. Unfortunately that isn't part of the standard distros. But you can get it at Source Forge.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|