TECO programming language?
-
shai-hulud
- Posts: 6
- Joined: Mon Jan 07, 2008 9:20 am
TECO programming language?
Hi,
many languages are added to the language list recently... so, could you please add TECO?
cheers,
Robin
many languages are added to the language list recently... so, could you please add TECO?
cheers,
Robin
- euler
- Administrator
- Posts: 5095
- Joined: Sun Mar 05, 2006 4:49 pm
- Location: Cheshire, England
- Contact:
Re: TECO programming language?
Sorry to show my ignorance, but isn't TECO just a scripting language used to manipulate text?

impudens simia et macrologus profundus fabulae
-
shai-hulud
- Posts: 6
- Joined: Mon Jan 07, 2008 9:20 am
Re: TECO programming language?
Yes it is. You can think of it as a structured imperative - interpreted - programming language (including user written functions & code evals and recursive programming) with its commands optimized to be as short as possible (mostly one or two keystrokes) featuring a lot of commands/functions to manipulate text (in text buffers and "string" variables). The TECO executable also has an interactive mode which allows you to write programs and execute them immediately. Considering that the language was designed to edit text files (initially to cut magnetic tapes) the interactive mode can be used as a kind of "text editor".euler wrote:Sorry to show my ignorance, but isn't TECO just a scripting language used to manipulate text?
Nevertheless it's a programming language and I already solved 10 problems solely using TECO (problem 1, 2, 4, 6-12). I posted my solutions, so have a look (shai-hulud from North Korea, btw. it's called Democratic Peoples Republic of Korea). My solution to problem 10 is especially interesting. Often I used the "text buffer" as a kind of array (ASCII values of the chars in it) - TECO can also manage "raw" text consisting of arbitrary-valued bytes.
If you want to verify my programs, I used TECOC for OS/2 (essentially TECO 11). Binaries for various platforms: http://almy.us/teco.html
TECO is started automatically in interactive mode; the easy way to execute a TECO macro in a separate text file is to invoke it something like that: tecoc mung filename.tec
If you want to run one of my programs, look whether I wrote that "$" means ESC and replace all occurences of "$" with ASCII char 27d (ESC) in the TECO macro file. That's because the escape key and therefore it's ASCII value is a valid command delimiter in TECO.
More solutions are coming soon, but I have a job and a study and I have VERY little time.
greetings,
Robin
-
shai-hulud
- Posts: 6
- Joined: Mon Jan 07, 2008 9:20 am
Re: TECO programming language?
alright, alright... just tell me if you have anything against slightly esoteric languages
I thought this is - to a certain degree - also about having fun. I'm also a FORTRAN programmer so I could use it; but that seemed boring even to me.
I don't really need TECO to be on the language list to have fun solving problems with it - but it would be cool. I think this is a political question: either you advocate using established - well-behaving - languages (Java, VisualBasic, Excel, this sweet little turtle language...) and keep a nice clean image or you advocate the idea that a programming language is only a tool and anyone might use any crazy tool to get the results. And if you fear that unserious languages could clutter the statistics with a lot of low-scoring entries: you don't need to display all the languages. Just introduce a kind of barrier, let's say 10% (average amount of solved problems of all the users of the language).
cheers,
Robin
I thought this is - to a certain degree - also about having fun. I'm also a FORTRAN programmer so I could use it; but that seemed boring even to me.
I don't really need TECO to be on the language list to have fun solving problems with it - but it would be cool. I think this is a political question: either you advocate using established - well-behaving - languages (Java, VisualBasic, Excel, this sweet little turtle language...) and keep a nice clean image or you advocate the idea that a programming language is only a tool and anyone might use any crazy tool to get the results. And if you fear that unserious languages could clutter the statistics with a lot of low-scoring entries: you don't need to display all the languages. Just introduce a kind of barrier, let's say 10% (average amount of solved problems of all the users of the language).
cheers,
Robin
- arif
- Posts: 111
- Joined: Tue Oct 09, 2007 4:35 am
- Location: Lahore, Pakistan
Re: TECO programming language?
I used to program in teco back in 1972! I didn't know that it still survives. Amazing.
Yes you can do anything you want in teco, so technically it is a programming language. Yes it is wierd to try and do project Euler in teco
, but then there are people trying to do all the problems using assembler
.
Best of luck, and hope you find the time to get more into the problems. This is a friendly bunch, and there are no serious language politics going on here. Just relax and wait, I am sure you will get teco on the languages list.
Yes you can do anything you want in teco, so technically it is a programming language. Yes it is wierd to try and do project Euler in teco
Best of luck, and hope you find the time to get more into the problems. This is a friendly bunch, and there are no serious language politics going on here. Just relax and wait, I am sure you will get teco on the languages list.
The i-th root of i = 4.810477381
- stijn263
- Posts: 1505
- Joined: Sat Sep 15, 2007 11:57 pm
- Location: Netherlands
Re: TECO programming language?
slightly off topic, but in a respond to your sig: what is the i-th root of i?
ii = e-pi/2 = 0.2078795764
and
i1/i = epi/2 = 4.810477381
ii = e-pi/2 = 0.2078795764
and
i1/i = epi/2 = 4.810477381
- euler
- Administrator
- Posts: 5095
- Joined: Sun Mar 05, 2006 4:49 pm
- Location: Cheshire, England
- Contact:
Re: TECO programming language?
Whoa! I've got nothing against any programming languages; I continue to be fascinated at the number of different languages that lend themselves to solve these types of problems. So my initial question was asked out of genuine interest for a language that I honestly thought was obsolete; I certainly had no idea it could be used to solve mathematical problems. Like you, my life is incredibly busy so unfortunately I don't get to check in here as often as I would like. To quote arif: "Just relax and wait, I am sure you will get teco on the languages list." Indeed he was right, and it has now been added.shai-hulud wrote:alright, alright... just tell me if you have anything against slightly esoteric languages

impudens simia et macrologus profundus fabulae
-
shai-hulud
- Posts: 6
- Joined: Mon Jan 07, 2008 9:20 am
Re: TECO programming language?
thanks a lot 
and I'm sorry if I was grouchy; usually I don't mean it the way it sounds
btw: you are doing a great job here
greetings,
Robin
and I'm sorry if I was grouchy; usually I don't mean it the way it sounds
btw: you are doing a great job here
greetings,
Robin
- euler
- Administrator
- Posts: 5095
- Joined: Sun Mar 05, 2006 4:49 pm
- Location: Cheshire, England
- Contact:
Re: TECO programming language?
You're welcome.
And thanks for the update. I've changed it to "DPR of Korea". Is that okay?shai-hulud wrote:btw. it's called Democratic Peoples Republic of Korea

impudens simia et macrologus profundus fabulae
- rayfil
- Administrator
- Posts: 1412
- Joined: Sun Mar 26, 2006 5:30 am
- Location: Quebec, Canada
- Contact:
Re: TECO programming language?
I would venture to say that assembly is a bit more versatile than TECO for solving PE problems.but then there are people trying to do all the problems using assembler.
When you assume something, you risk being wrong half the time.
-
kvom
- Posts: 13
- Joined: Tue Oct 02, 2007 11:06 pm
- Location: Georgia, USA
Re: TECO programming language?
I remember writing some TECO code on a VAX minicomputer in 1977. I needed it to edit a document that was too large to fit into the computer memory.