When was this language released?

92

16

Your challenge is simple. You need to write a program that prints to either STDOUT or a file the year the language it is written in was released. Because this is such a simple task, the twist is that it must be written in as many different languages as possible.

Your score is the total number of different years that are correctly printed.

For each language you use, you must

  • Specify which version of the language you are using. (If there are multiple versions)

  • Specify what year that version was first released, and

  • Provide a link to a page proving the date of your version/language.

Any one of these counts as release date proof, as long as it specifies the version number (if applicable) and a release date.

  • A wikipedia page.

  • An esolangs page.

  • The language's official website. A github page or similar counts, as long as it has a release date. (Latest commit does not count, unless there is a version number somewhere in the code)

If there are not multiple versions or releases of a language, just use the initial release date of the language.

Minor versions of the same language do count as different languages, as long as they come from different years and still produce the correct output. You may not use any builtins that give you information (including release date) about the current version of the language you are using. For example, this is an invalid python submission:

import platform
i = platform.python_version()
if i == '3.5':
    print(2015)
if i == '3.4':
    print(2014)
if i == '3.3':
    print(2012)
...

Whichever submission correctly prints the most distinct years wins!

Rules

  • Each program must print out the language year and nothing more. A trailing newline (windows style or *nix style) is allowed.

  • No programs may take any input.

  • In case of a tie, the shortest code scored in bytes wins. You may use whatever encoding you like for this, but all programs must use the same encoding.

  • Any of the programs may print to STDERR, or throw runtime/compile time errors and warnings as long as the correct output is still printed to STDOUT or a file.

  • Different languages may use different IO methods, but they most all be full programs, (functions not allowed for this challenge) and follow one of our default IO methods allowed.

Happy golfing polyglotting!

James

Posted 2016-09-29T03:04:36.210

Reputation: 54 537

Since Pip doesn't have a Wikipedia or Esolangs page, just has a GitHub, and hasn't had any "releases" in the GitHub sense of the word, is it ineligible for use in this challenge? (It does have a version number, which is updated at every commit.)

– DLosc – 2016-09-29T03:44:01.290

1@dlosc Well, I don't want to unnecessarily exclude any languages, but I want to make sure that the "release date" stays completely objective. Can you think of any better ways to enforce a release date that would include more languages? – James – 2016-09-29T04:03:39.187

4

(casually inserts Whitespace code to print 2003 in basically every single submission)

– Value Ink – 2016-09-29T05:11:50.777

8"You may not use any builtins that give you information about the current version of the language you are using." My emphasis. May I look for the build date in the interpreter file? – Adám – 2016-09-29T07:49:04.487

@mego the main idea of the challenge is extremely similar, but you could not copy a single submission from the challenge and have it be competitive on this challenge. I believe this is a sufficient difference to make it not a duplicate. – James – 2016-09-29T13:08:47.750

@DJMcMayhem You could trivially modify the submissions by having them output the language's release year, and they would be competitive. – Mego – 2016-09-29T13:10:01.627

2I don't think this one is a duplicate at all. Even if it is, this challenge should be accepted as the 'original' because unlike the other one, this challenge encourages users to go out and learn about what they're using. – None – 2016-09-29T15:35:48.627

I did not see that.. I have many more reasons that this should stay open, though. – None – 2016-09-29T15:41:08.940

"Latest commit does not count, unless there is a version number somewhere in the code." How about a commit that explicitly mentions the version? (This one specifically.)

– Martin Ender – 2016-09-30T14:26:43.330

If different languages require different file extensions to compile/run can we write a polyglot between the two? i.e. Does our program have to have a static name between runs? – Post Rock Garf Hunter – 2016-10-02T01:14:48.337

@wheatwizard As long as the code is the same, the file extension/name doesn't matter. – James – 2016-10-02T01:30:57.757

In some languages there are functions added to each new version (one each year). In Matlab for instance, R2012a doesn't have a table function since it was first introduced in R2013a. Can I use this? Note, I'm not talking about fetching the year it was introduced, but rather if it works or not in the current version... – Stewie Griffin – 2016-10-03T13:05:38.157

@WeeingIfFirst That's basically what sp3000's python answer is. As long as you can show a release date and version number, that sounds fine by me. – James – 2016-10-03T14:36:57.390

Answers

160

A Brief History of 2D Programming Languages: 16 (+2) years

v19977/2{@{{4{\_______>/02&&&#????        *    P+++++1P1P-1P+1E     *                         *
\'\02'oo100@n590@n;                       *                         *                         *
>"8991",,,;5-;,@                          *                         *                         *
   *                                      *                         *                         *
  \ *              ++++++++++++++++++++++++  ++++++++++++++++++++++++  ++O--OO++++++++OX*******      *
     *   #2018O@       *                  *      *                  *      *                  *      *
      *                *                  *      *                  *      *                  *      *
       *               *                  *      *                  *      *                  *      *
        *           ****    ****          *   ****    ****          *   ****    ****          *   ****    *****
         *         *   *   *    *         *  *   *   *    *         *  *   *   *    *         *  *   *   *
          *        *   *  *      *        *  *   *  *      *        *  *   *  *      *        *  *   *  *
           *      *    * ****     *       * *    * ****     *       * *    * ****     *       * *    * ****
            *     *    *     *            * *    *     *            * *    *     *            * *    *     *
R"2014";     *****      *******       ******      *******       ******      *******       ******      *******

 x
x%"2010"x
 x

$'main'        \/\/\/\
 \-[2005]o-#   \++++++\
               /++++++/
               \++++++\
               /++++++/
               \/\/\/\++.--..+++.#

S1^2^2^6^8MAOUOAOOF

      /K:0:1:@

  >      "7102"4&o@

|        }+++++[>++++++++++<-]>.--..++++++.@

Did I mention that I like 2D programming languages?

1993: Befunge

The language that (allegedly, see the last section) started it all. In Befunge, you can redirect the control flow with <v>^, but the now ubiquitous mirrors \ and / weren't a thing yet. The Befunge interpreter used on Anarchy Golf ignores unknown commands. We can use this to distinguish the Befunge family from the ><> family. Hence, the code executed by Befunge is this:

v
\
>"8991",,,;5-;,@

The "8991" pushes the individual characters onto the stack. ,,, prints the first three of them. Then ; is unknown (which we'll use to distinguish it from Befunge 98), 5- turns the 8 into a 3 and , prints that as well before @ terminates the program.

1997: Wierd

Writing this part of the solution took me probably as long as writing all the others and fitting them together...

Wierd only knows two symbols: space, and everything else. The instruction pointer tries to follow the path formed by the non-space characters, starting diagonally from the top left corner and always trying to go as straight as possible. The bends in the path form the actual instructions (with the degrees of the turn determining which instruction to execute). So the code seen by Wierd is this:

v1997                                     *                         *                         *
 '                                        *                         *                         *
  8                                       *                         *                         *
   *                                      *                         *                         *
    *              ++++++++++++++++++++++++  ++++++++++++++++++++++++  ++O--OO++++++++OX*******      *
     *                 *                  *      *                  *      *                  *      *
      *                *                  *      *                  *      *                  *      *
       *               *                  *      *                  *      *                  *      *
        *           ****    ****          *   ****    ****          *   ****    ****          *   ****    *****
         *         *   *   *    *         *  *   *   *    *         *  *   *   *    *         *  *   *   *
          *        *   *  *      *        *  *   *  *      *        *  *   *  *      *        *  *   *  *
           *      *    * ****     *       * *    * ****     *       * *    * ****     *       * *    * ****
            *     *    *     *            * *    *     *            * *    *     *            * *    *     *
             *****      *******       ******      *******       ******      *******       ******      *******

The 1997 at the top isn't actually executed, but Wierd lets us read it from the source code, which is a lot shorter than trying to construct the character codes for the four digits itself (even if it doesn't look like it...). I don't feel like breaking this entire thing down, but you can clearly see the four repeated sections. What this does is that we first store 1 on the stack and then each of those four sections increments this 1, and then branches. The bottom branch pushes another 1, retrieves the source character at these coordinates and prints it, whereas the top branch is redirected to the next section. You might wonder why the ends of the paths are so unnecessarily long, but that's because when Wierd hits the end of a path it tries to jump to a nearby path before deciding that it should terminate the current branch. To avoid this, we need to move these ends sufficiently far away from any other code.

1998: Befunge 98

Befunge got a fairly well-known update in 1998 with a very rigorous spec that can be generalised to arbitrary dimensions (and I think also arbitrary topologies). It's largely backwards-compatible with Befunge though, which makes it fairly easy to polyglot the two. This Befunge still didn't have any mirrors, so the executed path is the same as for Befunge 93:

v
\
>"8991",,,;5-;,@

The difference is that Befunge 98 doesn't ignore the ;. Instead it acts a bit like a comment in that all commands until the next ; are ignored. This way, we don't decrement that 8 to 3 and print the 1998 as is.

2001: A Space Od... PingPong

2001 is the year of Piet, but I really didn't feel like polyglotting an image file with all the other programs, so here is a lesser known 2D language. It seems to have quite a lot of features (which we're not going to use). Thanks to Sp3000 for finding the original interpreter (which is the only dead link on the archived version of the official website).

PingPong is somewhat unusual in that it has only mirrors and no <v>^ redirectors. So this moves through the v19977 at the start and then hits the mirror which wraps it to the bottom. The relevant code is then:

v19977/

...

      /K:0:1:@

...

The actual code is quite simple: K pushes 20, the digits push themselves, : prints an integer and @ terminates the program.

2003: SNUSP

This is first language where things get a bit easier, because SNUSP supports an explicit entry point. That entry point is marked by $. Judging from some articles on esolangs, this language has inspired several others, but unfortunately, at the end of the day it's just a Brainfuck derivative. That said, I think the way this sets the current cell to 48 is quite neat (and was stolen from the esolangs article). Here is the relevant part of the code:

$'main'        \/\/\/\
               \++++++\
               /++++++/
               \++++++\
               /++++++/
               \/\/\/\++.--..+++.#

Those are 24 +s and the mirrors send the IP through each one exactly twice.

2004: Axo

For whatever reason, this language does have the <^> redirectors but instead of the usual v it uses %. Hence this just moves across the first line. The relevant code is:

v19977/2{@{{4{\

We push a few digits to begin with, perform a division. Then 2{ prints the 2, @ clears the stack. {{ prints two (implicit) 0s. 4{ prints the 4 and \ terminates the program.

2005: Rail

2005 was a difficult choice. For no other year did I find as many 2D languages, and there is ADJUST and Archway, both of which start in the lower left corner (which would have made them easy additions). I like Rail though and since it has an explicit entry point is wasn't hard to add either. Rail looks for a line start with $'main' and starts moving south-east from the $. That means the relevant code is:

$'main'
 \-[2005]o-#

The \ and - are just tracks (no-ops). The [2005] is a string literal which o prints before # terminates the program.

2006: BestFriends.js

A two-dimensional Brainfuck. There is another interesting language for this year called Black, which starts at coordinate (3,3) (1-based) which would have made using this in a polyglot interesting, too. I couldn't find an interpreter though. So we'll have to work with another BF-derivative instead...

The interesting thing about this one is that it doesn't format the grid into lines with linefeeds like most other 2D languages. Instead | is used as the line separator. Since I didn't use | for any other languages, I could simply put a | on the last line which makes the entire rest of the program a single line as far as BF.js is concerned. The relevant code is then this (turning the | into an actual linefeed):

v19977/2{...
        }+++++[>++++++++++<-]>.--..++++++.@

BF.js uses neither <v>^ nor mirrors. The only ways to redirect control flow is with {} which turn the IP direction by 90°. So those braces move the IP to the second line. The remainder is a plain Brainfuck solution (not particularly well golfed) that sets a cell to 50 (code point of 2) and then prints 2006 by shifting the value around a bit. @ terminates the program.

2008: BrainSpace 1.0

For this year I really wanted to use DOBELA which uses multiple entry points and looks like the lovechild of Fission and Ziim. Unfortunately, I haven't been able to get the interpreter to work. So here is another BF derivative (the last one, I promise).

As opposed to the last one, this one knows both <v>^ and mirrors, so the relevant code is:

v
\'\
  8

  \ *              ++++++++++++++++++++++++  ++++++++++++++++++++++++  ++O--OO++++++++OX

This one doesn't have the usual BF-style [] loop (instead you'd need to form an actual 2D loop), so I just decided to hardcode the 50 since I had a ton of characters in a row from Wierd anyway. Note that the ' and 8 are ignored, the * is a conditional trampoline which we can ignore and the O is Brainfuck's .. The X terminates the program.

2009: ><>

Probably the most popular Fungeoid (other than Befunge itself) at least around these parts. ><> has both <v>^ and mirrors but also string literals, so the executed code is this:

v
\'\02'oo100@n590@n;

The string literal mostly serves to skip the \ we used for BrainSpace 1.0 but while we're at it we might as well push the first two characters. oo prints them. Then 100 pushes three digits, @ shoves the top one to the bottom and n prints the 0 underneath. We do the same thing again with 590 which prints the 9. If you're wondering why I'm not just printing 2009 as is, wait for 2015. ; terminates the program.

2010: Cardinal

This one was simple, because it has an explicit entry point at %. However, this one creates 4 IPs in all directions (hence the language name, I suppose), and we need to get rid of 3 of them. Here is the relevant code:

 x
x%"2010"x
 x

Well, yeah. (In Cardinal, string mode prints directly instead of pushing the characters onto a stack.)

2011: RunR

Another language with an explicit entry point (by David Catt who has created a few other very nice esolangs), this time at S. This makes the relevant code this part:

S1^2^2^6^8MAOUOAOOF

RunR is a bit interesting because most operations work with a sort of register and values need to be moved to the stack explicitly for binary operations. The digits set the register values to themselves and ^ pushes the current register to the stack. Then M is multiplication (register times value popped from stack), U is subtraction, A is addition, O is output. F terminates the program.

2012: Ropy

Like Wierd, Ropy tries to follow sections of non-space characters, but here the bends don't determine the commands. In fact, it turns out that Ropy is more similar to my own Labyrinth in that the chosen direction depends on the top of the stack. However, we don't really need to worry about that here, because Ropy just moves along the first line:

v19977/2{@{{4{\_______>/02&&&#????

There's a lot of stuff we can ignore up to the >. All we need to know is that the top of the stack will at that point be a 4 and there'll be 2 below.

> duplicates the 4, / is division turning it into a 1. Then we push 02. &&& joins the top four numbers of the stack in reverse order, giving 2012. # outputs it. ???? just clears the stack because otherwise the top of the stack is output as well.

One point of interest is that the second 7 in 19977 was added because of Ropy. The / division in Ropy does top / second (opposite of the usual order in many stack-based languages), where 7 / 9 would give 0. If we had a zero on top of the stack, Ropy would do some wild stuff with its direction of movement, so we need to push the other 7 to ensure that the top of the stack remains positive and Ropy keeps moving east.

2014: Fission

With its explicit entry points, this one is easy. RDLU create atoms (instruction pointers) in the corresponding direction, so the relevant bit is just this:

R"2014";

Note that there's a U in the source code as well, but that atom eventually hits one of the * from Wierd, which terminates the program (and this atom takes a lot longer than the R needs to print 2014).

2015: Gol><>

Sp3000's more powerful ><> derivative. It's largely backwards compatible with ><> so the executed code is still:

v
\'\02'oo100@n590@n;

However, the rotation direction of @ was changed, which is the standard trick to distinguish ><> and Gol><> in polyglots, so this one prints 15 instead of 09. Hence the weirdness in the second half of the program.

2016: CSL

CSL is quite interesting in that commands aren't executed immediately. Instead, each command is pushed onto a command-stack and e and E can be used to execute commands from it. The relevant code becomes:

v19977/2{@{{4{\_______>/02&&&#????        *    P+++++1P1P-1P+1E

So the E executes the entire command stack, which means that the stuff in front of it is executed in reverse. We only need to look up to the *:

1+P1-P1P1+++++P*

The 1s push themselves onto the data stack. + and - are decrement/increment. P prints the top of the stack. Then * tries to multiply the top two values of the stack. However, the stack is empty, so this terminates the program.


At this point we get to languages which were released after this challenge was posted, so I'm not really counting them for the score, especially since I created these myself (not with this challenge in mind though). However, they do have some novel IP movement semantics, which made it easy to fit them into the polyglot while also adding something interesting to this showcase of 2D languages.

2017: Alice

Alice was designed to be a feature-rich Fungeoid. One interesting difference to the majority of (but not all) other 2D languages is that the IP can move either orthogonally, or diagonally. Switching between these also changes the semantics of almost all commands in the language. Furthermore, Alice supports both the traditional <^>v direction setters and \/ mirrors, but mirrors have very unique behaviour in Alice (which makes it easy to lead the Alice IP to a so far unused portion of the code).

While most languages treat \ and / as if they were mirrors at a 45° angle, and the IP as a light ray bouncing off of it, Alice treats them as having a 67.5° angle (which is closer to the angle of the actual slash glyphs), and the IP also moves through the mirror (hence the language's name). Due to this angle, mirrors switch between movement along orthogonal or diagonal directions. Furthermore, while in Ordinal mode (i.e. while the IP moves along diagonals), the grid doesn't wrap around and instead the IP bounces off the edges (whereas in Cardinal mode it does wrap around).

All in all, the code executed by Alice is the following:

v19
\ \

...

  >      "7102"4&o@

...

The IP starts in the top left corner as usual, v sends it south. Now the \ reflects the IP to move northwest, where it immediately bounces off the left edge of the grid (and moves northeast instead). 1 can be ignored, the IP bounces off the top edge to move southeast next. We hit another \ which reflects the IP north. 9 can also be ignored and then the IP wraps to the bottom of the grid. After a couple of lines we redirect it east with > for convenience. Then "7102" pushes the code points of the 2017, 4&o prints those four characters and @ terminates the program.

2018: Wumpus

Wumpus is the first 2D language on a triangular grid, which makes movement through the code quite different (and again lets us reach an unused part of the code easily). So instead of thinking of each character in the grid as a little square, you should think of them as alternating upward and downward triangles. The top left corner is always an upward triangle.

Wumpus doesn't have direction setters like <^>v, but it does have mirrors \/. However, due to the triangular grid, these work differently from most other languages. The IP bounces off them like a light ray (as usual) but you should think of them as having an angle of 60° degrees. So an IP moving east will end up moving along the northwest axis of the grid.

As another difference to most other languages, the edges of the grid don't wrap, but the IP bounces off the edges instead (as if those edge cells contained the appropriate mirrors). Another fun little detail is that diagonals through the triangular grid actually look like staircases in the source code.

With that in mind, the code executed by Wumpus is the following (where I've replaced spaces with . for clarity:

v19977/
   02
  89
 ..
..
.....*...#2018O@

The v19977 are just junk that we can ignore. / sends the IP northwest, where it moves through the 977 (from the right) again while bouncing off the top edge. Then the IP moves southwest through the 2089 and a bunch of spaces, before it hits the left edge to be reflected east again. * is also junk. Then finally #2018 pushes 2018, O prints it and @ terminates the program.


Missing years

Finally, some notes about years I haven't covered.

While researching 2D languages to find suitable ones across the years which could be used in a polyglot, I found out that contrary to popular belief, Befunge was not the first 2D language. That title seems to be held by Biota which was already created in 1991. Unfortunately, the language doesn't have any output, so I wasn't able to use it for this challenge.

As far as I can tell no 2D languages were created in 1992 and 1995. That leaves a few years I haven't covered:

  • 1994: Orthagonal was created, independently of Befunge. The languages are semantically quite similar actually, but Orthagonal doesn't actually lay out the source code in 2D. Instead each line is an (x, y, instruction) tuple. I even obtained the language spec and original interpreter from the creator Jeff Epler, but in the end, the fact that the syntax isn't 2D made the language unsuitable for this polyglot.
  • 1996: Orthogonal, a successor to Orthagonal (created by someone else) was created, but for the purposes of this polyglot suffers the same problems as Orthagonal.
  • 1999: The only language I could find was Chris Pressey's cellular automaton REDGREEN. Unfortunately, as opposed to its predecessor RUBE, it doesn't seem to have any I/O semantics.
  • 2000: There's another cellular automaton of Chris Pressey's called noit o' mnain worb but it also doesn't have any I/O. There's also Numberix which I haven't tried to get running and I'm not sure whether it would ignore non-hex characters in the source code.
  • 2002: There's Clunk with no I/O and ZT whose language specification terrifies me.
  • 2007: I found three languages here. Zetaplex is image based (so nope) and RubE On Conveyor Belts seems to require a header with a rather strict format which would have messed with the first line of the program. There's also Cellbrain by Quintopia, but it also seems to require a specific header.
  • 2013: Again, I found three languages. Fishing might be possible with a good amount of restructuring but it would require the program to begin with a valid dock. Quipu, from memory, is way too strict about its syntax to allow much polyglotting. And Swordfish is another member of the ><> family, but unfortunately I haven't been able to find an interpreter. Otherwise, this one would probably be fairly easy to add.

If anyone is interested, here is the complete list of implemented 2D languages sorted by years as far as I could find them (at the time this answer was posted). If any are missing from this list, please let me know in chat as I'd be really interested in a complete list.

Martin Ender

Posted 2016-09-29T03:04:36.210

Reputation: 184 808

8Wow. That is really impressive – James – 2016-10-01T18:11:40.477

@MartinEnder Have you considered putting your list of 2D programming languages by year on Esolang itself? – doppelgreener – 2016-10-02T22:33:08.817

@doppelgreener I'm not entirely sure how it would fit there. It's essentially just the intersection of the 2D category with the various year categories. – Martin Ender – 2016-10-02T22:35:31.053

I'll fix the RubE On Conveyor Belts header line, if you have a time machine I can borrow to teach 13-year-old me how to read a file without knowing the size in advance. (That's the only reason there was a header line; IMO you can feel free to not count the size header as part of the program, even though strictly speaking it is) – user253751 – 2016-10-03T02:49:20.957

Was Minkolang the only other 2D language made in 2015? – El'endia Starman – 2016-10-04T00:34:13.010

@El'endiaStarman not at all, see the pastebin at the end of the post. – Martin Ender – 2016-10-04T04:59:01.757

@MartinEnder: Haha wow, I had no idea that there were that many 2D languages! – El'endia Starman – 2016-10-04T14:44:46.977

Is it possible to add Alice to this? Was it made in 2017? – caird coinheringaahing – 2017-07-12T19:39:38.620

1@cairdcoinheringaahing There you go. And Wumpus for 2018, while I was at it. – Martin Ender – 2018-02-16T12:53:55.083

117

15 years, Python

Versions: 0.9.1, 2.0.0, 2.2.0, 2.2.2, 2.5.0, 2.5.1, 3.0.0, 3.1.0, 3.1.3, 3.2.1, 3.3.0, 3.3.3, 3.4.0, 3.5.0 and 3.6.0a4. Versions not linked can be found on the downloads page.

The release date of 0.9.1 can be found here. Unfortunately I had to skip a large bunch of years due to missing old versions and compilation problems on my computer. The represented years are 1991, 2000-2002 and 2006-2016.

Tested on Arch Linux, using the gzipped versions.

# Note: This file needs a trailing newline due to 0.9.1

# 0.9.1: No bitwise operators
# This one errors out by division by zero.
try:
    eval('1&2')
except:
    print(1991)
    1/0

import sys

# 2.0.0: repr('\n') gives "'\012'" instead of "'\n'"
# == doesn't exist until Python 0.9.3 and <> doesn't exist in Python 3, hence we
# use <. Also, 0.9.1 doesn't have double quoted strings.
if repr('\n') < '\'\\n\'':
    print(2000)
    sys.exit()

# 2.2.0: email module still has a _Parser class - module revamped in 2.2.2
# I would use whether or not True exists as a name here, but weirdly "True"
# worked in 2.2.2 even though the docs say it was introduced in 2.3...
try:
    import email
    email._Parser
    print(2001)
    sys.exit()
except AttributeError:
    pass

# 2.2.2: a in b only works for strings a of length 1.
try:
    eval('"art" in "Martin"')
except TypeError:
    print(2002)
    sys.exit()

# 2.5.0: int() allows null bytes in integer to convert when given an explicit
# base.
try:
    print(int('2006\x00Hello, World!', 10))
    exit()
except ValueError:
    pass

# 2.5.1: pow overflows
# Note that we can't use ** here since that doesn't exist in 0.9.1.
if pow(2, 100) < 1:
    print(2007)
    exit()

# 3.0.0: round returns a float rather than an int.
if str(round(1, 0)) > '1':
    print(2008)
    exit()

# 3.1.0: bug caused complex formatting to sometimes drop the real part.
if format(complex(-0.0, 2.0), '-') < '(-':
    print(2009)
    exit()

# 3.1.3: str of a float is shorter than the repr of the same float.
if str(1.0/7) < repr(1.0/7):
    print(2010)
    exit()

# 3.2.1: For some weird reason, u'...' Unicode strings were disabled then
# re-enabled later.
try:
    eval('u"abc"')
except:
    print(2011)
    exit()

# 3.3.0: int still works without a first argument.
try:
    int(base=10)
    print(2012)
    exit()
except TypeError:
    pass

# 3.3.3: no enum module :(
try:
    import enum
except ImportError:
    print(2013)
    exit()

# 3.4.0: PEP 448 (additional unpacking generalisations) not implemented yet
try:
    eval('[*[1], *[2], *[3]]')
except SyntaxError:
    print(2014)
    exit()

# 3.5.0: No f-strings
try:
    eval('f"abc"')
except SyntaxError:
    print(2015)
    exit()

print(2016)

Sp3000

Posted 2016-09-29T03:04:36.210

Reputation: 58 729

19... Wow. It still amazes me how well some people know their languages. It's like looking back through time... – wizzwizz4 – 2016-09-29T16:48:27.543

Does python 0 support try/except?? – OldBunny2800 – 2016-09-29T20:33:42.327

8@OldBunny2800 Amazingly, yes it does – Sp3000 – 2016-09-30T01:31:42.997

54

Short and sweet; the three APLs (K, J201, Dyalog 7.1) in 8 bytes

1993+1^2

1993 plus...

K: the first 1 integer {0} except {2}, i.e. {0}; 1993 – Try it online!

J: 12 = 1; 1994 – Try it online!

APL: LCM(1,2) = 2; 1995 – Try it online!

Adám

Posted 2016-09-29T03:04:36.210

Reputation: 37 779

Very nice! Think you could combine more of the Iverson languages? – miles – 2016-09-29T06:23:56.847

@miles Get's tough with K, and APL2/APLX/APL*PLUS are too similar. – Adám – 2016-09-29T06:29:32.363

@miles Do you know of a J version from 2000? If so, we can do 2e3+?1 with Dyalog 9.0.1. – Adám – 2016-09-29T06:32:20.167

Another cool prospect is X^Y for some numbers X and Y, as ^ is power in J, but LCM in APL. – Adám – 2016-09-29T06:34:38.440

2

I've found a page of features over releases with their dates up to 2000, http://www.jsoftware.com/release/status.htm

– miles – 2016-09-29T06:40:14.623

If there was a language where ^ is XOR released in 1992 (1993+1)^2 or 1996 1993+(1^2) (depending on operator precedence), you could probably add that as well. – ETHproductions – 2016-09-29T12:20:16.187

@ETHproductions Even if there were, most languages need a boilerplate, and OP says that they [sic] most all be full programs, (functions not allowed for this challenge). – Adám – 2016-09-29T12:25:38.063

46

10 years, 12 languages, 2430 bytes

This answer is a collaboration between myself and user 1000000000.

A brief language list:

Brainfuck    1993
Befunge      1993
Piet         2001
Whitespace   2003
Braincopter  2005
Grass        2007
Starry       2008
Paintfuck    2008
Brainbool    2010 (11111011010)
Python 2.7.2 2011
Fission      2014
Brainflak    2016 

Here is the code:

P3v="";print(sum([ord(x)for x in"~~~~~~~~~~~~~~~y"]));"""{}{}     + + +---[.     + +..  '.. +. +.. +. +. +.] + + + + + + +(((((()()()()){}){}){}){})({({} +-[<() + + + + + + +>-()])}{}<[. + + + + + + + +..-------  `             +.[-]]>)[< '
 17 12 
# > 7*::,8 +:,,2 +,@<>R"2014";]*ne*e*es*s*swWWW*swWWWW*sw*e*e*e*eeev*wn*n*n*n*ne*e*se*s*s*s*sWWwWWWw**e*eeee*vwn*n*n*n*ne*e*se*s*s*s*sWWWw*eeee*e*ne*n*nWWWWWw*ne*nWWWWWWw*w*sw*se*sWWWWWWWw*s*WWWWWWwwwWWWWWWWWWWwWWWWWWWWWWwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwv `
255 0 255 255   0   192 192 0   192 192 0 192 192   192 255
255 192
255 255 192
255
255
0 255 255 0 255 255 0 255 255 0 255 255 0 192 192 192 255 255 255 255 255 0 192 192 0 0 255 255 255
255 0 0 255 0 192 192 0 192 192 0 192 192 192 255 255 192 255 255 192 255 255 192 255 255 0 255 255 0 255 255 0 255 255 0 192 192 255 255 255 255 255 255 255 255 255 255 255 255 0 192
192 0 0 255 0 192 192 0 192 192 0 192 192 0 192 192 192 255 255 192 255 255 192 255 255 0 255 255 0 255 255 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0
255 0 192 192 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255
255 0 192 192 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 0 192
192 0 192 192 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 0 0
255 0 192 192 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 255 255 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 255 255
255 0 192 192 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 0 192
192 0 192 192 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 0 0
192 0 192 192 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 0 0 0 0 0 0 255 255
255 0 192 192 0 0 255 0 0 255 255 255 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 255 255 0 0 255 0 0 255 0 255 255 0 0 0 0 192 192 0 0
255 0 192 192 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 255 0 0 0 0 192 192 0 192 192
#   """

In order to fit this within a response I will forgo entire TIO links and will rather just post a link to a valid interpreter where the code may be input by the user. Here is a Pastebin link for that purpose.

Piet

The PPM file format, one of the image formats that the Piet interpreter we used can read from, has a plaintext ASCII version. Using this we were able to embed the code of other languages as junk in the image file read by Piet and Braincopter.

The image looks like this:

Raw image

Not all of the image is important for Piet. Here is a version with a line highlighting the path that Piet follows through the code:

Piet path

Despite somewhat convoluted methods to create the program the program itself is quite simple. Along the top of the image it pushes 1 10 10 10 2 to the stack; along the side it multiplies thrice and adds once. In the bottom corner it outputs the result (2001) and then halts.

Braincopter

Braincopter is the other visual language. It also relies on the same ppm image file to run. Because of very harsh restrictions in npiet our Braincopter code can only use a subset of the original Braincopter operations. We are restricted to using colors that are valid ops in Piet. This removes the - operator from Braincopter.

Here is the path traced out by the Braincopter code:

Braincopter path

The Braincopter program is a bit strange because of the lack of a - operator. The walls of cyan and dark cyan serve to redirect the pointer but other than that it is identical to the following brainfuck:

++++++++++++++++++++++++++++++++++++++++++++++++++.>++++++++++++++++++++++++++++++++++++++++++++++++..+++++.

This prints 2005.

Paintfuck

Paintfuck is the third visual programming language on our list however instead of taking in a image and outputting text, Paintfuck takes in text and outputs an image.

Since Paintfuck ignores irrelevant characters as no-ops most of the code is unimportant. The relevant section of the code is:

nsn**ne*e*es*s*sw*sw*sw*e*e*e*eee*wn*n*n*n*ne*e*se*s*s*s*sww**e*eeee*wn*n*n*n*ne*e*se*s*s*s*sw*eeee*e*ne*n*nw*ne*nw*w*sw*se*sw*s*wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwnsn**ne*e*es*s*sw*sw*sw*e*e*e*eee*wn*n*n*n*ne*e*se*s*s*s*sww**e*eeee*wn*n*n*n*ne*e*se*s*s*s*sw*eeee*e*ne*n*nw*ne*nw*w*sw*se*sw*s*wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

While they are not no-ops the ws at the end of the code do nothing. They are there for the grass portion of the solution. n,e,s, and w are used to move around the image and * is used to plot a point at certain location. The program outputs:

Paintfuck output

A bigger version:

Painfuck output, but its bigger

Brainfuck

Like Paintfuck Brainfuck ignores most characters. Once again here are the important ones:

 []+++---[.++....+.+..+.+.+.]++++++++-[<+++++++>-]<[.++++++++..-------+.[-]]>[<>,+,,+,<>]

Most of this is further irrelevant by circumstance and just happen to be characters that some other language needed. The slimmer version of this code is:

+++++++[<+++++++>-]<[.++++++++..------.[-]]

This pretty simply prints 1993.

Brainbool

Brainbool is very similar to Brainfuck in its character selection. The big difference that allows the two to be woven together is the lack of a - in Brainbool. The important characters for Brainbool are:

[]+++[.++....+.+..+.+.+.]++++++++[<+++++++>]<[.++++++++..+.[]]>[<>,+,,+,<>]

Brainbool and brainfuck's outputs are mutually exclusive. Brainbool hides its output in the second set of []. Brainfuck encounters +++--- before it reaches the [ setting it to zero and causing it to skip the output, while Brainbool only sees +++ setting it to 1 causing it to pass through the loop. Similarly Brainbool is set to zero at the 4th loop causing it to skip while Brainfuck enters the loop with a value of 49.

Since Brainbool does not have decimal output it outputs the 2010 in binary:

11111011010

Fission

The only part of the code that is important for fission is:

R"2014";

The R summons in a atom moving to the right, the "2014" prints 2014 and the ; halts execution.

Befunge

Befunge only passes through the following characters:

P3v
  7
  > 7*::,8 +:,,2 +,@

The P3 are necessary to make a valid .ppm image for piet, and cumulatively push a 3 to the stack. the v is placed to redirect the the pointer downwards. It then passes through the 7 in the 17 used to indicate the width of the .ppm image. The > redirects the pointer to the right. 7* multiplies the top of the stack by 7 leaving 49 (ASCII value of 1) on the top of the stack. :: duplicates the top of the stack twice. The 1 is output by ,. 8 + adds 8 to the top incrementing to ASCII 9. :,, outputs 9 twice. 2 + increments the ASCII 1 to an ASCII 3 and , prints. Finally @ terminates the program.

All in all it prints 1993.

Whitespace

Whitespace, as the name might suggest, only uses whitespace in its programs. This is what the Whitespace interpreter sees:

[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][LF]
[Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Tab][Tab][Tab][Tab][Tab][Space][Tab][Space][Space][Tab][Tab][LF]
[Tab][LF]
[Space][Tab][LF]
[LF]
[LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][Space][LF]
[Space][Space][Space][LF]

Most of what this code does is inconsequential to the execution of the program (all the lines containing only spaces simply push zero to the stack). The important part:

[Space][Space][Space][Tab][Tab][Tab][Tab][Tab][Space][Tab][Space][Space][Tab][Tab][LF]
[Tab][LF]
[Space][Tab][LF]
[LF]
[LF]

The first line pushes 2003 to the stack. After that [Tab][LF][Space][Tab] prints out the top of the stack (2003) as a number. Finally the last three linefeeds end the program execution.

Grass

Grass ignores all character until the first w in the file and after that all characters that are not w, W, or v. The Grass interpreter reads:

wWWWwWWWWwv
wWWwWWWwv
wWWWwWWWWWwWWWWWWwwwWWWWWWWwWWWWWWwwwWWWWWWWWWWwWWWWWWWWWWwv
wWWWwWWWWwv
wWWwWWWwv
wWWwWWWwv
wWWwWWWwv
wWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwv

The first line defines a function that adds two to whatever it is passed. The second line defines a function that adds four to whatever it is passed. The third defines a function that prints two plus the argument, the prints the argument twice, then finally prints seven plus the argument (Grass prints out characters based on ASCII value). The fourth, fifth and sixth lines define functions that add eight, add 16, add 32, and add 64 to their argument, respectively. The final line defines the main function which takes the character w (the only predefined number in Grass, ASCII value 119) and adds 185 to it using the add functions defined in the program as well as the built in add one function. Grass wraps numbers at 256 and so the result is 48 (corresponding to the character 0). The function then passes this to the function of the third line which prints out 2007.

Starry

Starry ignores everything except for space, +, *, ., ,, `, and '. Thus the starry interpreter sees only:

       + + +.     + +..  '.. +. +.. +. +. +. + + + + + + + + + + + + + + +. + + + + + + + +..  `             +. '
     *, +,, +,************************************************* `

However, the label and jump instructions are used to skip sections of the code which could cause problems if run, so the code is effectively this:

       + + +.     + +..  '  `             +. ' `

This code pushes two to the stack, duplicates it twice and then pops and prints one of them as a number. Then pushes zero, duplicates it and prints both zeros as numbers. Next it pops one of the twos and jumps and then pushes seven to the stack and pops and prints is as a number. Finally it pops the last two on the stack and jumps to the end of the program.

Python 2.7.2

The Python code follows the format:

P3v="";print(sum([ord(x)for x in"~~~~~~~~~~~~~~~y"]));"""..."""

where ... stands in for all of the other junk.

The first line, P3v="" is there because to be a valid .ppm file our code must start with P3 this will normally error but if we tell python it is a variable declaration it will ignore it.

Next we have to print 2011. However because of the way that a .ppm is formatted we cannot include any numbers in this line. In order to get around this we sum up all of the ASCII values of the string "~~~~~~~~~~~~~~~y" and print the result. Finally we use the triple quotes of a multiline comment so that python ignores everything else.

Brainflak

We saved the best for last.

Brainflak, like others, ignores most characters. The relevant characters are:

(([()])){}{}[](((((()()()()){}){}){}){})({({}[<()>()])}{}<[[]]>)[<><>]

The python code, (([()])), pushes -1 to the stack twice so it needs to be removed before the program begins processing.

After that Brainbool uses a [] nilad which does nothing and the program begins.

(((((()()()()){}){}){}){})({({}[<()>()])}{}<[[]]>) pushes 2016. The last [<><>] is remnants of Befunge and Brainfuck but luckily does nothing.

When the program terminates it prints the contents of the stack, that is it prints 2016.

Post Rock Garf Hunter

Posted 2016-09-29T03:04:36.210

Reputation: 55 382

Brilliant! I had hoped Piet would make an appearance somehow, embedding things in a PPM is brilliant. Well done! – cincodenada – 2016-10-04T07:37:43.317

1+1 for We saved the best for last. :D – James – 2016-10-04T15:18:07.997

38

5 years

#define q/*-[>+<-----]>--.++++++++..------.[-][
print('2010'if len(bin.__doc__)==86else'2015')
"""*/
main(c){c=-4.5//**/
-4.5;printf("19%d",90-c);}
#define w/*]
*/"""

1989: C89[1], and 1999: C99

The single line comment // was added in C99, so a C89 compiler would read that code as c=-4.5 / /*comment*/ -4.5, which is the same as c=-4.5 / -4.5, whereas a C99 compiler would read as c=-4.5 //comment/**/
- 4.5, which is the same as c=-4.5 - 4.5.
The Python part is a comment in the C program.

2010: Python 2.7, and 2015: Python 3.5

The docs vary between Python 3 and 2, this program uses the length of the docs to detect the Python version.
The C part is in a string in the Python program.

1993[2]: Brainfuck

It basically ignores everything that aren't .,[]+-<>. Since C program has a , in it, I had to make Brainfuck to dismiss that part by setting the current byte to 0.


  1. The C89 spec was released in 1990. More info.
  2. I couldn't find an official release date, so I'll believe Esolangs and Wikipedia.

betseg

Posted 2016-09-29T03:04:36.210

Reputation: 8 493

4This is great, especially the -4.5/-4.5 and -4.5-4.5. Mashing two versions each of two major languages is pretty impressive, even without throwing BF in there :-) – ETHproductions – 2016-10-02T01:01:35.907

This isn't codegolf, but the a= on line 2 is unnecessary – TheInitializer – 2016-10-19T23:47:28.540

@TheInitializer yeah, I tried without a= and it gave an error, so I decided to keep it. I don't know why it gave an error though, probably a typo. – betseg – 2016-10-20T05:16:09.137

@betseg if that code is only being executed in Python, it should work. – TheInitializer – 2016-10-20T12:05:15.440

17

15 years, JavaScript

Since JavaScript's release cycle is very unusual and inconsistent, I'm going to use the Firefox implementation. Please let me know if this is not allowed.

Versions: Phoenix 0.1, Firebird 0.6, Firefox 1.0.0, 1.5.0, 2.0.0, 3.0 Beta 1, 3.0.0, 3.5.0, 3.6.0, 4.0.0, 10.0.0, 18.0.0, 27.0.0, 35.0.0, 44.0.0 (all tested on Windows 7)

Important note: Installing and opening Firefox 1.0.0 or any later version may erase all of your saved Firefox data, including history and bookmarks.

Also, starting with 1.0.0, you can only have one version open at a time; trying to open another version results in a new window of the already-open version.

Instructions

Code

<script onbeforeunload="123">
// This uses document.write because alert does nothing in Phoenix (Firefox) 0.1.
document.write((function () {
    function assert (code) {
        try {
            eval(code);
            return true;
        } catch (e) {
            return false;
        }
    }

    // Firefox 44 supports octal and binary literals in Number(); Firefox 35 does not.
    if (Number("0o1") === 1)
        return 2016;

    // Firefox 35 supports template strings; Firefox 27 does not.
    if (assert("`abc`"))
        return 2015;

    // Firefox 27 supports argument spreading; Firefox 18 does not.
    if (assert("Math.max(...[1, 2, 3])"))
        return 2014;

    // Firefox 18 supports default arguments; Firefox 10 does not.
    if (assert("function q(a = 1) { }"))
        return 2013;

    // Firefox 10 has basic WeakMap support; Firefox 4 does not.
    if (assert("WeakMap.a"))
        return 2012;

    // Firefox 4 has basic typed array support; Firefox 3.6 does not.
    if (assert("Int8Array.a"))
        return 2011;

    // Firefox 3.6 added the async attribute to script elements.
    if (assert("document.getElementsByTagName('script')[0].async.a"))
        return 2010;

    // Firefox 3.5 added the String.prototype.trim() method.
    if (assert("'abc'.trim()"))
        return 2009;

    // Firefox 3.0 added partial support for object destructuring.
    if (assert("var {c} = {c: 7}"))
        return 2008;

    // Firefox 3.0 beta 1 added the Array.prototype.reduce() and Array.prototype.reduceRight() methods.
    if (assert("[].reduce.a"))
        return 2007;

    // Firefox 2.0 added support for restricted words as properties.
    if (assert("({if:1}).if"))
        return 2006;

    // Firefox 1.5 added the Array.prototype.indexOf() methods, along with a couple other Array methods.
    if (assert("[1].indexOf(1)"))
        return 2005;

    // Practically the only JS difference between v0.6 and v1.0 is the addition of the onbeforeunload event.
    if (assert("document.getElementsByTagName('script')[0].onbeforeunload.a"))
        return 2004;

    // The Object.prototype.eval() method was removed in Firebird 0.6.
    if (!assert("'abc'.eval()"))
        return 2003;

    // We're all the way back to the good old Phoenix 0.1 browser...
    return 2002;
})());
</script>

ETHproductions

Posted 2016-09-29T03:04:36.210

Reputation: 47 880

You can add a 16th year by including BF: <!--<<<<-[>+<-----]>--.++++++++..------.[-][--> before the script and another HTML comment containing just a ]afterwards. – Steven H. – 2016-10-01T19:02:33.097

6@StevenH. Um... wow, I never even thought about including esolangs in this. And that's a really smart way to include BF :-) But I'm not sure I really want to... – ETHproductions – 2016-10-01T19:29:25.397

13

3 years (GolfScript, CJam, MATL), 24 23 bytes

[A11]Wd%;200 1e2/0 8_+(

This outputs

  • 2007 in GolfScript.

  • 2015 in CJam (version 0.6.5).

  • 2016 in MATL (version 19.2.0).

Explanation

Golfscript

Undefined tokens are noops in GolfScript. The only parts of the code that actually do something are:

200      Push 200
           STACK: 200
1        Push 1
            STACK: 200, 1
/        Divide
           STACK: 200
0        Push 0
           STACK: 200, 0
8        Push 8
           STACK: 200, 0, 8
+        Add
           STACK: 200, 8
(        Subtract 1
           STACK: 200, 7
         Implicitly display 200, 7 as "2007"

CJam

[A11]    Push array [10 11]
           STACK: [10 11]
W        Push -1
           STACK: [10 11], -1
d        Convert to double
           STACK: [10 11], -1.0
%        Select elements from array
           STACK: [11 10]
;        Pop
           STACK is empty
200      Push 200
           STACK: 200
1e2      Push 100
           STACK: 100
/        Divide
           STACK: 2
0        Push 0
           STACK: 2, 0 
8_       Push 8 and duplicate
           STACK: 2, 0, 8, 8
+        Add
           STACK: 2, 0, 16
(        Subtract 1
           STACK: 2, 0, 15
         Implicitly display 2, 0, 15 as "2015" 

MATL

Everything from % onwards is a comment.

[A11]    Push array [5 11]
           STACK: [5 11]
W        2 raised to that
           STACK: [32 2048]
d        Compute increment
           STACK: 2016
         Implicitly display as "2016"

Luis Mendo

Posted 2016-09-29T03:04:36.210

Reputation: 87 464

Correction: in CJam after % you get [11 10]. Not that it matters. – aditsu quit because SE is EVIL – 2017-01-30T15:57:32.547

@aditsu Whoops! Thanks, edited – Luis Mendo – 2017-01-30T16:00:19.833

13

6 languages, Turtlèd and brainfuck, Python 3.5, Python 2.7, ><>, Fission

Turtlèd has not existed before this year, and so easily objective, even if the github commits don't count, and BF has the esolang page evidence, released 1993. Python 3.5 is 2015, 2.7 is 2010. ><> also has esolang page, stating 2009, as does Fission, 2014

#-[>+<-----]>--.++++++++..------#"2016"/
print(2015 if len(len.__doc__)==42 else 2010)
#;                           oooo"2009"/
#;"4102"L

I should probably give credit to the bf constants page on esolangs... ¯\_(ツ)_/¯

How it works, kind of:

Turtlèd:

Turtlèd doesn't really do anything for lines other than the first:

#-[>+<-----]>--.++++++++..------#"2016"/
  ^sets string variable to this   ^ prints 2016

/ is a nop

Brainfuck

Brainfuck ignores chars not in its commands

it sees -[>+<-----]>--.++++++++..------. (the last . is from the python part)

which just does Brainfuck stuff, it uses wrapping to divide 255 by 5, then subtract 2 from the result, print, increment 8 times, print twice, decrement 6 times, print

Python 2 and 3

print(2015 if len(len.__doc__)==42 else 2010)

the length of the docs for len vary between the versions, so it prints the year for version 3 if it is the right length, else for version 2.

><>

# reflects the pointer backwards, so it hits the / on the other side of that line, passes through the space between else and 2010, then reflects again to hit "2009", pushing 9,0,0,2 onto stack, then printing out reversed.

Fission

Fission has spawners, so we can have a line at the bottom that it executes alone:

#;"4102"L
        L spawn left moving atom
  "4102"  print this right to left
 ;        halt
# python comment

Destructible Lemon

Posted 2016-09-29T03:04:36.210

Reputation: 5 908

13

3 years, 3 languages: C, TeX, MIXAL

*main(){puts("1990");}/*\newwrite\O\openout\O=O\write\O{1982}\bye                                                                                                                              
START   ENTA    1997
        CHAR
        STX     6
        OUT     6(19)
        HLT
        END     START   */ 

Name the file date.mixal.

  1. C (1990) -- Compiles with warnings and prints 1990 to stdout.
  2. TeX (1982) -- Compile with tex date.mixal; prints 1982 to the file O.tex (ignore the DVI output).
  3. MIXAL (1997) -- Compile using GNU Mix Development Kit, mixasm date.mixal and run with mixvm -r date.mix; prints 1997 to the teletype device (=stdout).

The TeX and MIXAL programs are in a comment in the C program; the MIXAL program comes after \bye so TeX ignores it. The C and TeX programs are a comment in the MIXAL program. For some reason gcc is willing to accept *main.

musarithmia

Posted 2016-09-29T03:04:36.210

Reputation: 531

I had forgotten about MIXAL, +1 :D – cat – 2016-10-02T17:26:05.730

12

2 languages, Python 2.7 and Python 3.5

Python 2.7 was released in 2010.

Python 3.5 was released in 2015.

print('2010'if 3/2==1else'2015')

This relies on PEP 238 where the operator / was changed from integer division in Python 2 to floating-point division in Python 3.

miles

Posted 2016-09-29T03:04:36.210

Reputation: 15 654

3This could be a fun challenge if it involves identifying bugs/changes in operators between versions – miles – 2016-09-29T04:24:27.233

I get an invalid token error without the space before else. – Yytsi – 2016-09-29T05:14:42.730

1@TuukkaX It works for me in both Python 2.7.12 and Python 3.5.1 on Fedora 24. – miles – 2016-09-29T05:23:50.213

Hmm. That's strange. I (think) my phone interpreter has an 2.7 or 3+ interpreter and it still complains. – Yytsi – 2016-09-29T06:23:31.063

1Can't you do '2010'if 3/2>1else'2015' instead? – clismique – 2016-09-29T07:31:58.323

1print('2015'if 1/2else'2010') - same idea, 1/2 evaluates to 0 (falsy value) in Python2 and to 0.5 in Python3. – Jakube – 2016-09-29T08:43:05.253

15Or us math: print(int(2010+1/2*10)) – Jakube – 2016-09-29T08:43:48.397

Thank you both, but since the scoring metric is number of languages, I've been completely beat. – miles – 2016-09-29T08:43:55.730

2print('2015'if 1/2else'2010') is better – Cyoce – 2016-09-30T18:38:42.827

12

8 years, TI-Basic

Disp 1996           <-- TI-83
Text(-1,1,1,1
ClrHome
Disp 1999           <-- TI-83+ OS 1.03 (initial OS)
sub(1
ClrHome
Disp 2002           <-- TI-83+ OS 1.15
isClockOn
ClrHome
Disp 2004           <-- TI-84+ OS 2.21
invT(e,1
ClrHome
Disp 2005           <-- TI-84+ OS 2.40
CLASSIC
ClrHome
Disp 2009           <-- TI-84+ OS 2.53
BackgroundOn
ClrHome
Disp 2013           <-- TI-84+ Color Silver Edition
Send({1
ClrHome
2015                <-- TI-84+ Color Edition OS 5.1

"Any of the programs may print to STDERR, or throw runtime/compile time errors and warnings as long as the correct output is still printed to STDOUT or a file." Currently, the only non-error display is the year, so we are complying with this rule. However, if you'd like to write to the memory instead, replace Disp (date) with (date)->I.

References:

  1. Calculator release dates - https://epsstore.ti.com/OA_HTML/csksxvm.jsp?nSetId=74258
  2. TI-83+ OS 1.15 release date - http://wikiti.brandonw.net/index.php?title=83Plus:OS:VersionDifferences#TIOS_1.15
  3. Calculator compatibility - http://tibasicdev.wikidot.com/compatibility
  4. TI-84+CSE release date - https://www.amazon.com/Texas-Instruments-Silver-Graphing-Calculator/dp/B00AWRQKDC
  5. TI-84+CE release date - http://www.prnewswire.com/news-releases/texas-instruments-unveils-the-new-ti-84-plus-ce-300026266.html and https://www.cemetech.net/forum/viewtopic.php?t=8870

Timtech

Posted 2016-09-29T03:04:36.210

Reputation: 12 038

9

5 years, Go 1.0, 1.1, 1.4, 1.5, 1.6: 285 257 bytes

(1.2 was released in 2013 like 1.1, 1.3 in 2014 like 1.4, and 1.7 in 2016 like 1.6.)

Have not tested this out on every version because I can access only 1.6, but it should work in theory! Language changes would likely have caused the program not to compile, so I relied on standard library changes.

package main
import(."fmt"
."reflect"
."time")
func main(){s:="6"
if _,e:=Parse("2016-Sep-30","2016-Sep-31");e==nil{s="5"}
if Sprint(ValueOf(0))!="0"{s="4"}
if Sprint(&map[int]int{1:1})[0]!='&'{s="3"}
if string(0xd800)==string(0xfffd){s="2"}
Print("201"+s)}

Ungolfed and commented:

package main

import (
    "fmt"
    "reflect"
    "time"
)   package main

import (
    . "fmt"
    . "reflect"
    . "time"
)

func main() {
    s := "6"
    // 1.6: time.Parse rejects invalid days
    if _, e := Parse("2016-Sep-30", "2016-Sep-31"); e == nil {
        s = "5"
    }
    // 1.5: A reflect.Value now prints what it holds, rather than use
    // its String() method
    if Sprint(ValueOf(0)) != "0" {
        s = "4"
    }
    // 1.4: Printing pointers to maps gives the map instead of the address
    if Sprint(&map[int]int{1: 1})[0] != '&' {
        s = "3"
    }
    // 1.1: Unicode surrogate halves are no longer allowed
    if string(0xd800) == string(0xfffd) {
        s = "2"
    }
    Print("201" + s)
}

EMBLEM

Posted 2016-09-29T03:04:36.210

Reputation: 2 179

7

7 years, 8 browsers

Not exactly language release dates because css doesn't actually have releases, but browser versions (could be thought as compiler versions maybe?)

For the following browsers, this prints the browser name, version and release date and nothing else. It does print the same thing for a few later versions, (you will see chromium is one version late in the screenshots because it's hard to download old versions of chrome by version number)

I could print the version number I used but I preferred to show the first version where the used feature is introduced.

  • IE6
  • IE7
  • IE8
  • IE9 (untested, don't have an IE9 around)
  • Firefox 4
  • Firefox 3.6
  • Chrome 18
  • Chrome 21
  • Modern Browsers

FF3.6 FF4 Chromium19 Chromium22 IE8-quirks IE8-IE7compatibility IE8

index.html

<!DOCTYPE html>
 <html>
  <head>
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <link rel=stylesheet href=style.css>
  </head>
  <body>
    <div class=borderbox>
      <div class="inlineblock">
        &nbsp;IE6-2001
      </div>

      <div class="white">
        <div class="outofbox">
          <a href="#">IE8-2009</a>
        </div>
        <div class="inherit">
          <a href="#">IE7-2006</a>
        </div>
      </div>
    </div>
    <div class="white">
      <header class="filter-quirk filter-blur filter-blur-url">
        IE9
      </header>
    </div>
    <div class="flex white">
      Modern Browsers - 2017
    </div>
    <div class="webkit-flex">
      <div class="">
        Chrome 21-2012
      </div>
    </div>
    <div class="webkit-invert white flexdisable">
      <div class="">
        Chrome 18-2012
      </div>
    </div>

    <svg style="position: absolute; top: -99999px" xmlns="http://www.w3.org/2000/svg">

    </svg>

    <div class="filter">
      <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
        <g
           transform="scale(8)"
           aria-label="FF4"
           id="text8419">
           <rect
              style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.79374999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
              id="rect21965"
              width="17.005648"
              height="3.9855044"
              x="-0.16825682"
              y="-0.025296567" />
          <path
             d="m 1.0052634,1.5511362 v 0.7639843 h 0.4564063 q 0.092604,0 0.092604,0.066146 0,0.069453 -0.092604,0.069453 H 0.69107072 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 h 0.1785938 V 0.72431329 h -0.1785938 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 H 2.1793519 V 1.0484278 q 0,0.089297 -0.069453,0.089297 -0.066146,0 -0.066146,-0.089297 V 0.72431329 H 1.0052634 V 1.4155373 H 1.4848207 V 1.2667091 q 0,-0.089297 0.066146,-0.089297 0.069453,0 0.069453,0.089297 v 0.4332552 q 0,0.089297 -0.069453,0.089297 -0.066146,0 -0.066146,-0.089297 V 1.5511362 Z"
             style="fill:#000000;stroke-width:0.79374999"
             id="path8421" />
          <path
             d="m 2.9883464,1.5511362 v 0.7639843 h 0.4564063 q 0.092604,0 0.092604,0.066146 0,0.069453 -0.092604,0.069453 h -0.770599 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 H 2.8527475 V 0.72431329 H 2.6741537 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 H 4.1624349 V 1.0484278 q 0,0.089297 -0.069453,0.089297 -0.066146,0 -0.066146,-0.089297 V 0.72431329 H 2.9883464 V 1.4155373 H 3.4679037 V 1.2667091 q 0,-0.089297 0.066146,-0.089297 0.069453,0 0.069453,0.089297 v 0.4332552 q 0,0.089297 -0.069453,0.089297 -0.066146,0 -0.066146,-0.089297 V 1.5511362 Z"
             style="fill:#000000;stroke-width:0.79374999"
             id="path8423" />
          <path
             d="M 5.6692683,1.8917872 H 4.7729923 V 1.7363445 l 0.754062,-1.28322911 h 0.277813 V 1.7561883 h 0.112448 q 0.0893,0 0.0893,0.069453 0,0.066146 -0.0893,0.066146 h -0.112448 v 0.4233333 h 0.112448 q 0.0893,0 0.0893,0.066146 0,0.069453 -0.0893,0.069453 h -0.499402 q -0.0893,0 -0.0893,-0.069453 0,-0.066146 0.0893,-0.066146 h 0.251355 z m 0,-0.1355989 V 0.58871439 h -0.07938 L 4.9019713,1.7561883 Z"
             style="fill:#000000;stroke-width:0.79374999"
             id="path8425" />
          <path
             d="M 8.2881171,1.6077068 H 6.9585859 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 h 1.3295312 q 0.089297,0 0.089297,0.066146 0,0.069453 -0.089297,0.069453 z"
             style="stroke-width:0.79374999"
             id="path8422" />
          <path
             d="m 8.9582054,0.90656104 q 0,-0.14882812 0.1785937,-0.31749999 0.1819011,-0.17197916 0.4365625,-0.17197916 0.2414323,0 0.4233333,0.17197916 0.1852081,0.17197916 0.1852081,0.39687498 0,0.14882817 -0.0893,0.28111977 Q 10.006617,1.3960402 9.7056533,1.67716 L 9.0210439,2.3154672 v 0.00992 H 10.059533 V 2.2063266 q 0,-0.089297 0.06945,-0.089297 0.06614,0 0.06614,0.089297 V 2.460988 H 8.8920596 V 2.2625506 L 9.6725804,1.5283318 q 0.2315104,-0.2282031 0.3009635,-0.3307291 0.07276,-0.102526 0.07276,-0.21497396 0,-0.17197916 -0.1422132,-0.30096353 -0.1422136,-0.12898437 -0.3307292,-0.12898437 -0.1686718,0 -0.3075781,0.0992188 -0.1355989,0.0992188 -0.1752864,0.24804686 -0.019844,0.0661458 -0.069453,0.0661458 -0.023151,0 -0.042995,-0.0165365 -0.019844,-0.0198437 -0.019844,-0.0429948 z"
             style="stroke-width:0.79374999"
             id="path8424" />
          <path
             d="m 12.207981,1.3001287 v 0.3307292 q 0,0.3902604 -0.171979,0.6349999 -0.171979,0.2447396 -0.446484,0.2447396 -0.274506,0 -0.446485,-0.2447396 Q 10.971054,2.0211183 10.971054,1.6308579 V 1.3001287 q 0,-0.39356766 0.171979,-0.63830724 0.171979,-0.24473957 0.446485,-0.24473957 0.274505,0 0.446484,0.24473957 0.171979,0.24473958 0.171979,0.63830724 z M 11.589518,0.55268084 q -0.224896,0 -0.353881,0.22820312 -0.128984,0.22489584 -0.128984,0.53578124 v 0.2943489 q 0,0.3241146 0.132292,0.5457031 0.135599,0.2182813 0.350573,0.2182813 0.224895,0 0.35388,-0.2248959 0.128984,-0.2282031 0.128984,-0.5390885 V 1.3166652 q 0,-0.32411458 -0.135599,-0.54239582 -0.132292,-0.22158854 -0.347265,-0.22158854 z"
             style="stroke-width:0.79374999"
             id="path8426" />
          <path
             d="M 13.642054,0.43692564 V 2.3253891 h 0.459713 q 0.0893,0 0.0893,0.066146 0,0.069453 -0.0893,0.069453 h -1.055026 q -0.0926,0 -0.0926,-0.069453 0,-0.066146 0.0926,-0.066146 h 0.459714 V 0.61551938 l -0.373724,0.37372394 q -0.02646,0.0264584 -0.06945,0.0264584 -0.02646,0 -0.0463,-0.0198438 -0.01654,-0.023151 -0.01654,-0.056224 0,-0.0297656 0.03638,-0.0661458 l 0.436562,-0.43656248 z"
             style="stroke-width:0.79374999"
             id="path8428" />
          <path
             d="M 15.625137,0.43692564 V 2.3253891 h 0.459713 q 0.0893,0 0.0893,0.066146 0,0.069453 -0.0893,0.069453 h -1.055026 q -0.0926,0 -0.0926,-0.069453 0,-0.066146 0.0926,-0.066146 h 0.459714 V 0.61551938 l -0.373724,0.37372394 q -0.02646,0.0264584 -0.06945,0.0264584 -0.02646,0 -0.0463,-0.0198438 -0.01654,-0.023151 -0.01654,-0.056224 0,-0.0297656 0.03638,-0.0661458 l 0.436563,-0.43656248 z"
             style="stroke-width:0.79374999"
               id="path8430" />
          </g>
      </svg>
    </div>
    <div class="white gradient msfilter" style=color:white>
      FF3.6-2010
    </div>
  </body>
 </html>

style.css

.borderbox {
    height: 40px;
    overflow: hidden;
    padding-bottom: 100px;
}
.outofbox {
    background: blue none repeat scroll 0 0;
    margin-top: 20px;
    opacity: 0;
}
.white {
    color: white;
}
.outofbox a, .inherit a, .inherit a:visited, .outofbox a:visited {
    color: inherit;
}
.inlineblock {
    display: inline;
    width: 100%;
    zoom: 1;
    display: inline-block;
    margin-left: 100px;
    text-align: right;
}
.white header{
  color: black;
}
.absolute{
  position: absolute;
}
.flex{
  display: none;
  display: flex;
}
.flex.white{
  filter: invert(100%)
}
.webkit-flex{
  display: none;
  display: -webkit-flex;
  overflow: hidden;
  flex-flow: column;
  height: 3em;
  justify-content: flex-end;
}
.webkit-flex div{
  margin-bottom: -1.1em;
}
.flexdisable{
  display: -webkit-flex;
  overflow: hidden;
  -webkit-flex-flow: column;
  -webkit-justify-content: flex-end;
  height: 60px;
}
.flexdisable div{
  margin-bottom: -30px;
}
.filter-quirk{
  filter: url(#quirk);
}
.filter-blur{
  filter: blur(100px);
  -webkit-filter: blur(100px);
}
.webkit-blur{
  -webkit-filter: blur(100px);
}
.webkit-invert{
  -webkit-filter: invert(100%);
  filter: none;
}
.filter-url-dark{
  -webkit-filter: url(filter.svg#Invert);
  filter: url(filter.svg#Invert) invert(100%);
}
.filter-blur-url{
  filter: url(filter.svg#blur) url(filter.svg#brightness);
}
.filter{
  filter: invert(100%) brightness(100%);
  -webkit-filter: invert(100%) brightness(100%) blur(100px);
}
.filter svg{
  position: absolute;
}
.filter svg rect{
  filter: invert(100%);
  -webkit-filter: invert(100%);
}
.msfilter{
    /* IE 8 */
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  /* IE 5-7 */
  filter: alpha(opacity=0);
}
.opacity{

}
.black{
  background: black;
}
.gradient{
  width: 100px;
  background: -moz-linear-gradient( 45deg, #000, #000 );
  font-weight: bold;
}

filter.svg

    <!DOCTYPE html>
 <html>
  <head>
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <link rel=stylesheet href=style.css>
  </head>
  <body>
    <div class=borderbox>
      <div class="inlineblock">
        &nbsp;IE6-2001
      </div>

      <div class="white">
        <div class="outofbox">
          <a href="#">IE8-2009</a>
        </div>
        <div class="inherit">
          <a href="#">IE7-2006</a>
        </div>
      </div>
    </div>
    <div class="white">
      <header class="filter-quirk filter-blur filter-blur-url">
        IE9
      </header>
    </div>
    <div class="flex white">
      Modern Browsers - 2017
    </div>
    <div class="webkit-flex">
      <div class="">
        Chrome 21-2012
      </div>
    </div>
    <div class="webkit-invert white flexdisable">
      <div class="">
        Chrome 18-2012
      </div>
    </div>

    <svg style="position: absolute; top: -99999px" xmlns="http://www.w3.org/2000/svg">

    </svg>

    <div class="filter">
      <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
        <g
           transform="scale(8)"
           aria-label="FF4"
           id="text8419">
           <rect
              style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.79374999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
              id="rect21965"
              width="17.005648"
              height="3.9855044"
              x="-0.16825682"
              y="-0.025296567" />
          <path
             d="m 1.0052634,1.5511362 v 0.7639843 h 0.4564063 q 0.092604,0 0.092604,0.066146 0,0.069453 -0.092604,0.069453 H 0.69107072 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 h 0.1785938 V 0.72431329 h -0.1785938 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 H 2.1793519 V 1.0484278 q 0,0.089297 -0.069453,0.089297 -0.066146,0 -0.066146,-0.089297 V 0.72431329 H 1.0052634 V 1.4155373 H 1.4848207 V 1.2667091 q 0,-0.089297 0.066146,-0.089297 0.069453,0 0.069453,0.089297 v 0.4332552 q 0,0.089297 -0.069453,0.089297 -0.066146,0 -0.066146,-0.089297 V 1.5511362 Z"
             style="fill:#000000;stroke-width:0.79374999"
             id="path8421" />
          <path
             d="m 2.9883464,1.5511362 v 0.7639843 h 0.4564063 q 0.092604,0 0.092604,0.066146 0,0.069453 -0.092604,0.069453 h -0.770599 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 H 2.8527475 V 0.72431329 H 2.6741537 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 H 4.1624349 V 1.0484278 q 0,0.089297 -0.069453,0.089297 -0.066146,0 -0.066146,-0.089297 V 0.72431329 H 2.9883464 V 1.4155373 H 3.4679037 V 1.2667091 q 0,-0.089297 0.066146,-0.089297 0.069453,0 0.069453,0.089297 v 0.4332552 q 0,0.089297 -0.069453,0.089297 -0.066146,0 -0.066146,-0.089297 V 1.5511362 Z"
             style="fill:#000000;stroke-width:0.79374999"
             id="path8423" />
          <path
             d="M 5.6692683,1.8917872 H 4.7729923 V 1.7363445 l 0.754062,-1.28322911 h 0.277813 V 1.7561883 h 0.112448 q 0.0893,0 0.0893,0.069453 0,0.066146 -0.0893,0.066146 h -0.112448 v 0.4233333 h 0.112448 q 0.0893,0 0.0893,0.066146 0,0.069453 -0.0893,0.069453 h -0.499402 q -0.0893,0 -0.0893,-0.069453 0,-0.066146 0.0893,-0.066146 h 0.251355 z m 0,-0.1355989 V 0.58871439 h -0.07938 L 4.9019713,1.7561883 Z"
             style="fill:#000000;stroke-width:0.79374999"
             id="path8425" />
          <path
             d="M 8.2881171,1.6077068 H 6.9585859 q -0.089297,0 -0.089297,-0.069453 0,-0.066146 0.089297,-0.066146 h 1.3295312 q 0.089297,0 0.089297,0.066146 0,0.069453 -0.089297,0.069453 z"
             style="stroke-width:0.79374999"
             id="path8422" />
          <path
             d="m 8.9582054,0.90656104 q 0,-0.14882812 0.1785937,-0.31749999 0.1819011,-0.17197916 0.4365625,-0.17197916 0.2414323,0 0.4233333,0.17197916 0.1852081,0.17197916 0.1852081,0.39687498 0,0.14882817 -0.0893,0.28111977 Q 10.006617,1.3960402 9.7056533,1.67716 L 9.0210439,2.3154672 v 0.00992 H 10.059533 V 2.2063266 q 0,-0.089297 0.06945,-0.089297 0.06614,0 0.06614,0.089297 V 2.460988 H 8.8920596 V 2.2625506 L 9.6725804,1.5283318 q 0.2315104,-0.2282031 0.3009635,-0.3307291 0.07276,-0.102526 0.07276,-0.21497396 0,-0.17197916 -0.1422132,-0.30096353 -0.1422136,-0.12898437 -0.3307292,-0.12898437 -0.1686718,0 -0.3075781,0.0992188 -0.1355989,0.0992188 -0.1752864,0.24804686 -0.019844,0.0661458 -0.069453,0.0661458 -0.023151,0 -0.042995,-0.0165365 -0.019844,-0.0198437 -0.019844,-0.0429948 z"
             style="stroke-width:0.79374999"
             id="path8424" />
          <path
             d="m 12.207981,1.3001287 v 0.3307292 q 0,0.3902604 -0.171979,0.6349999 -0.171979,0.2447396 -0.446484,0.2447396 -0.274506,0 -0.446485,-0.2447396 Q 10.971054,2.0211183 10.971054,1.6308579 V 1.3001287 q 0,-0.39356766 0.171979,-0.63830724 0.171979,-0.24473957 0.446485,-0.24473957 0.274505,0 0.446484,0.24473957 0.171979,0.24473958 0.171979,0.63830724 z M 11.589518,0.55268084 q -0.224896,0 -0.353881,0.22820312 -0.128984,0.22489584 -0.128984,0.53578124 v 0.2943489 q 0,0.3241146 0.132292,0.5457031 0.135599,0.2182813 0.350573,0.2182813 0.224895,0 0.35388,-0.2248959 0.128984,-0.2282031 0.128984,-0.5390885 V 1.3166652 q 0,-0.32411458 -0.135599,-0.54239582 -0.132292,-0.22158854 -0.347265,-0.22158854 z"
             style="stroke-width:0.79374999"
             id="path8426" />
          <path
             d="M 13.642054,0.43692564 V 2.3253891 h 0.459713 q 0.0893,0 0.0893,0.066146 0,0.069453 -0.0893,0.069453 h -1.055026 q -0.0926,0 -0.0926,-0.069453 0,-0.066146 0.0926,-0.066146 h 0.459714 V 0.61551938 l -0.373724,0.37372394 q -0.02646,0.0264584 -0.06945,0.0264584 -0.02646,0 -0.0463,-0.0198438 -0.01654,-0.023151 -0.01654,-0.056224 0,-0.0297656 0.03638,-0.0661458 l 0.436562,-0.43656248 z"
             style="stroke-width:0.79374999"
             id="path8428" />
          <path
             d="M 15.625137,0.43692564 V 2.3253891 h 0.459713 q 0.0893,0 0.0893,0.066146 0,0.069453 -0.0893,0.069453 h -1.055026 q -0.0926,0 -0.0926,-0.069453 0,-0.066146 0.0926,-0.066146 h 0.459714 V 0.61551938 l -0.373724,0.37372394 q -0.02646,0.0264584 -0.06945,0.0264584 -0.02646,0 -0.0463,-0.0198438 -0.01654,-0.023151 -0.01654,-0.056224 0,-0.0297656 0.03638,-0.0661458 l 0.436563,-0.43656248 z"
             style="stroke-width:0.79374999"
               id="path8430" />
          </g>
      </svg>
    </div>
    <div class="white gradient msfilter" style=color:white>
      FF3.6-2010
    </div>
  </body>
 </html>

qwazix

Posted 2016-09-29T03:04:36.210

Reputation: 187

2CSS does actually have releases. There is 1.0, 2.0, 2.1, 3.0, and 4.0. The question even said to use Wikipedia or the language's site as proof of release date, so you should have checked. Initial release date: December 17, 1996 – mbomb007 – 2017-01-30T17:11:21.673

It doesn't with the sense that there's no implementation of any of those levels (they are not even called releases, because they aren't, you should have checked the link you posted). And CSS3 and 4 don't even have a release date because they are being created on-the-fly, and go back and forth between drafts, candidates and recommendations. Also, no browser implements a specific level 100% and 0% of the next level so the best date you can come up with is the release date of the browser. – qwazix – 2017-01-30T18:50:33.297

Then the language you selected doesn't meet the required specs for this challenge. Not in the way you're trying to do it. A language is defined by its implementation, so you have to pick a browser and stick with it, using different browser versions, not different browsers. I'd still ask the OP, though. – mbomb007 – 2017-01-30T19:06:17.160

The OP didn't say different versions count as different languages, they just said to print out the release year of the language version being used, for different languages. However ~half the answers were based on the assumption that different versions are different enough to be counted as languages. If python 2.5.0 and 2.5.1 are considered different enough I cannot understand how IE and Chrome aren't. – qwazix – 2017-01-30T19:24:47.610

7

4 years, 99 bytes/77 chars

v=1//1;"""
 1991/*"""
for i in[0]:print 2010#➕➕
"""
"
>9002nnnn;
"""#*/

Note: I'm not sure if the years are correct

  • Python 2.7, 2010
  • Javascript, 1991
  • Emotinomicon, 2015
  • ><>, 2009

It took me a while to figure out how to make Python and JS work together.

Explanation

v=1//1;""" sets variable v to 1 divided by 1 in Python, and to 1 in Javascript (// starts a comment in Javascript), and ;""" starts a multiline string in Python. The ; can't be replaced with a newline because that would make Javascript stop working.

1991/*""" is the rest of the multiline string. The space is needed so that ><> doesn't push 1 to the stack. Since the start of the multiline string was part of a comment in Javascript, it prints 1991 and starts a multiline comment.

for i in[0]:print 2010#➕➕ in Python, is a for loop that iterates the list [0] and runs print 2010. The comment is just the Emotinomicon code (it ignores everything that isn't an emoji or a string). In ><>, it (f) pushes 15 to the stack.

The for loop can't be removed because since ><>'s IP is going down in column 1, and p isn't a valid command in ><>. You also can't replace it by an if statement, because i is the command to take input in ><>.

""" is the start of a multiline string.

" is part of the multiline string, needed to close the string we opened in ><> (the first quotation mark of the previous line started a string in ><>).

>9002nnnn; in ><>, changes IP direction to right, pushes 9, 0, 0 and 2, output these as numbers and ends the program.

"""#*/ in Python, ends the multiline string and starts a comment. In Javascript, */ makes the multiline comment end.


Bonus version with Gol><>:

5 languages, 4 years, 118 114 bytes/96 92 chars

v=1//1;"""
 1991/*"""
for i in[0]:print 2010#➕➕
"""
`
"
>9002nnnn;
"
>5102nnnn;
"""#*/
  • Golfish v0.4.2, 2015

Explanation²

IP starts at the upper left corner, going right. The v makes it go down.

f pushes 15.

" starts string.

` is used to escape characters, something that ><> doesn't have.

" should close the string, but we used `, so it won't.

> part of the string.

" ends the string.

>5102nnnn; is the actual code. > makes the IP go right, 5102 pushes 5, 1, 0 and 2, and nnnn; prints the numbers and ends the program.

acrolith

Posted 2016-09-29T03:04:36.210

Reputation: 3 728

Python errors on the unicode characters without the proper header. (SyntaxError: Non-ASCII character '\xf0' in file test.txt on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details) – Post Rock Garf Hunter – 2016-10-01T04:05:45.623

@WheatWizard Save the file as UTF-8 – acrolith – 2016-10-01T15:40:50.480

6

3 years, 89 bytes

Python 2, JavaScript (ES6) and Perl

eval((["1","print=_=>console.log(1995)"])[+(2/3>0)]);print(eval(("1991",1987)["$$">"0"]))

The first eval will run 1 on Python 2 and print=_=>console.log(1995) on JavaScript and Perl using the integer division feature of Python 2. This creates a print function in JavaScript and Perl only silently cares about the syntax errors and carries on regardless.

The second eval relies on Perl interpolating the variable $$ (current PID) into the string, which will be true when compared (using the > operator) against "0" (Python requires a string in that comparison whereas Perl implicitly converts to integer).

I could have shoe-horned in more languages, but wanted to have a solution that didn't abuse comments and only worked in 'regular' languages.

I used this Wikipedia page to retrieve the years to use.

Dom Hastings

Posted 2016-09-29T03:04:36.210

Reputation: 16 415

2

Microsoft Excel / Google Sheets, 22 Bytes

Anonymous Worksheet function that takes no input and outputs 1987 in Microsoft Excel, and 2006 in Google Sheets

=IfError(M(2006),1987)

Taylor Scott

Posted 2016-09-29T03:04:36.210

Reputation: 6 709

2

3 languages, 3 years

An ad-hoc answer for fun.

2002!~+++++++[<+++++++>-]<[.++++++++..------.[-]] 2016 !.
  • Mouse-2002: everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

  • this pre-challenge commit of Calc: which is a stack-based calculator interpreter I just designed in C11 for Programming II, the part of the program before the first space prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

  • Brainfuck: prints 1993 as seen in other answers. The final extraneous . is ignored by beef.

Note that Calc's display of the current stack < stack with every non-empty input line is part of the prompt >, not part of the output.

cat

Posted 2016-09-29T03:04:36.210

Reputation: 4 989

Where can I find out about Mouse-2002? The github doesn't seem to have any sort of specifications. – Post Rock Garf Hunter – 2016-10-20T03:32:46.957

@WheatWizard The repository's README contains links to Dr. Grogono's original MUSYS and to David Simpson's 2002 reboot, which together paint an OK picture.

– cat – 2016-10-20T13:42:53.090

0

Perl 5 & Perl 6 (2 years)

my $a=2015;my @a=1994;print $a[0],"\n"

First release of Perl 5 was in 1994

First official release of Perl 6 was in 2015

bb94

Posted 2016-09-29T03:04:36.210

Reputation: 1 831

0

Python 1.6, 2.7.17, and 3.8, 39 bytes

The (currently) latest versions of each major release.

print(2000+(str(2>1)!='1')*round(39/2))

Try them online!

Here, I'll evaluate them until the most important parts.

Python 1.6:

print(2000+('1'!='1')*round(39/2))

Python 2.7.17:

print(2000+True*round(19))

Python 3.8

print(2000+True*round(19.5))

Want

Posted 2016-09-29T03:04:36.210

Reputation: 407