Silent film star [Lon Chaney] had the nickname “man of a thousand faces.” The Try It Out website (tio.run) might well be the site of a hundred languages. Well, in all fairness, they only have 97 “practical” languages, but they do have 172 “recreational languages” but the site of 269 languages doesn’t trip off the tongue, does it? The site lets you run some code in each of those languages from inside your browser.
By the site’s definition, practical languages include things like C, Java, Python, and Perl. There’s also old school stuff like FOCAL-69, Fortran, Algol, and APL. There’s several flavors of assembly and plenty of other choices. On the recreational side, you can find Numberwang, LOLCODE, and quite a few we’ve never heard of.
The site is interesting if you are wanting to compare languages or try out a snippet of code you found online. For practical use, it probably isn’t going to help you much. Some languages lend themselves better than others to the site’s simplistic interface.
When you select a language you’ll go to a page that looks the same no matter which one you chose. You can enter compiler flags and–of course–your code. You can also enter a header and a footer. It isn’t really clear what the advantage of that is over just having one big blob of code. There’s no way to put in additional files like headers, other source files, or anything. Just those three text boxes.
There are separate boxes to provide standard input and command line options to your program. When you press the play button at the top of the page, the output appears in another text area and an area labeled debug give you statistics about the compile, not a way to debug your program. You do get error messages there, though, if there are any.
The site is free from ads and other nonsense other than a call for donations and a plug for their web host on the main page. If you wanted to set something up like this on your own server–perhaps for classroom use–it is open source, so you could. We’d love to see a bunch of old retrocomputer languages set up like this.
If you want a hardware version of one of the more offensively-named recreational languages, there’s an Arduino shield for that. If you use the site to write some killer FOCAL-69 code, perhaps we can interest you in a Raspberry Pi based PDP 8.
Needs a clickable genealogy map, perhaps like this?
http://rigaux.org/language-study/diagram.png
And a classification system like this,
https://web.archive.org/web/20120615142223/http://people.ku.edu:80/~nkinners/LangList/Extras/classif.htm
Because the hardest thing I have to explain is why use any given language and which are equivalent.
And for the “Where do I start?” question try this,
http://spectrum.ieee.org/static/interactive-the-top-programming-languages-2017
I love how Forth and Postscript are all alone way over on the right. :) I have a fond remembrance of hand-writing Postscript art way back when.
NeXTStep and their postscript display.
I once saw a diagram like this for micro processor assembly languages. I have since searched for it but can’t seem to find it.
Any tips from readers here ?
Ooh I’d like to see that too! Can you recall where, any hints or keywords at all, because I will try and find it for you, out of self interest. :-)
Oh Joy https://tio.run/#joy
look at language: taktentus
*snicker* Recreational language, something you program in while smoking weed.
Would you prefer “Esoteric”?
https://esolangs.org/wiki/Main_Page
I promote banning all recreational languages.
Only languages with medical applications should be permitted, and then only under very tight federal oversight.
Getting caught with a Whitespace script three times should be a life sentence.
A Whitespace script longer than 1kb should carry a minimum sentence of 15 years.
Your mind would be blown with brainf*ck
Brainf*ck isn’t the most interesting of the esoteric languages but it may have the most interesting name. Perhaps the most interesting thing about Brainf*ck is that you can write a compiler for it in Brainf*ck to compile Brainf*ck
I’m totally shocked that there is no BCPL, it has a cool backronym Before C Programming Language
No RPG/II/III/400 :-(
Tested the C++ interpreter with a simple bog standard hello world program:
#include
//include directive may be misinterpreted as a filterable HTML tag on HaD...
//My first hello world
class program
{
public:
program()
{ printf("\nHello World");}
};
program p;
int main() { return 0;}
Yep it works fine.
Forgot, my buggy code is missing a pointless volatile variable:
volatile int pointless_return_variable=0;
int main() { return pointless_return_variable;}
Ah, that’s better.
Bug free now.
Sorry: that’s not C++. That is C with classes. C++ also brought in streams and associated operators. Yelo!
As someone once said, “I saw cout being shifted left ‘Hello World’ times and I got the h*ll out of there!”
I learnt the cout method from a book, copied it letter for letter into the recommended compiler version and it compiles. Tries it on a slightly newer compiler and I’m aparently not defining cout or that
unknown operator "<<" before ";"
kind of error appeared.I learnt that I can no longer use
using std::
on that compiler or any of that era….So my cout just got an std:: !!!!
Then other things broke….. and I stick to using the minimal C++ extras in my “Programs”…. C but with class so to speak
Innuendos and puns not intended.
Example:
cout << "\nhello world\n";
becomes:
std::cout << "\nhello world\n;
and at one point I think the requirement went something like:
std::cout << "\nhello world\n << end;
or something like that.
As someone else pointed out, either use std:: or do a using namespace std to set the default. Oh. You said the compiler doesn’t let you anymore. Which compiler?
Can’t remember what one, DJGPP was one that worked one version then not the next…
I think one of the GCC compilers on an Ubuntu release… can’t remember what one, hint:
The one that was so buggy and glitchy where phantom icons appeared on the gnome like bars and they couldn’t be removed…
also the compiler couldn’t even compile in a straight line…. seemingly nothing would compile.
Other buggy distros at that time had not got any GCC or was broken…. Went back to debian for a while longer with kernel 3.2.65.
I’m writing this now on said Debian+Linux 3.2.65 install until I can afford another 1TB SSD or Maplin halves the SSD price in another sale (I got mine when it became cheaper than anywhere else online at a Maplin sale). Then I can migrate to a more modern OS… likely an Arch-linux compatible OS as Manjaro (Arch based) works fine on my tablet PC (Except PulseAudio).
My long time test program for something new is a hi lo game where it guesses your number. You prompt for the user to guess a number between 1 and 1024. That’s your limits. You guess the midpoint and ask if it is high or low or correct. Then update your limit and go again (unless you were right). Basically, you are binary searching. You’ll get it right in 10 tries or less.
Forces you to exercise input/output, simple math, and it is mildly amusing.
Not if the user picks a non-integer, you won’t. :)
Here you go (let’s see if the pre tags work in comments — nope… sigh)
error: expected primary-expression before ‘>’ token
std::cout<<"I guess your number is "<<g.guess()res;
Not sure if “” is some crazy shorthand I’m not familiar with, but I got it to work by using:
std::cout<<"I guess your number is "<<g.guess() << std::endl;
std::cout <> res;
Argh, angle brackets / stream operators being eaten by wordpress, I give up. There’s meant to be a “std::cin >> res” in there etc.
Ah… no WSL, Waterloo Systems Language. Mind you, it may not fall under practical or recreational as it was a language that the University of Waterloo used to teach program… don’t rightly know if it escaped into anything in production or not.
It is likely the French had it banned. They do not enjoy being reminded of Waterloo.
No BASIC? I’m stunned. Certainly it should be counted among the recreational ones at least. Surely there’s an implementation somewhere they could hook up to this.
There’s uBasic and Visual Basic (mono).
No GWBASIC, I’m outa here ;-(
Can’t remember what one, DJGPP was one that worked one version then not the next…
I think one of the GCC compilers on an Ubuntu release… can’t remember what one, hint:
The one that was so buggy and glitchy where phantom icons appeared on the gnome like bars and they couldn’t be removed…
also the compiler couldn’t even compile in a straight line…. Here you go (let’s see if the pre tags work in comments — nope… sigh)
guess() << std::endl;
std::cout <> res; guess()res;
Not sure if “” is some crazy shorthand I’m not familiar with, but I got it to work by using:
std::cout<<"I guess your number is "<<g.
supposition()res;
Not certain if “” is some unbalanced stenography I’m not familiar with, but I got it to body of work by using:
std::cout<<"I supposition your turn is "<<g. supposition() << std::endl;
std::cout <> res;
Here you go (rent’s check if the pre tags study in comments — nope… suspiration)