2017

From Esolang
Jump to: navigation, search

2017 is a programming language created by Zayne, loosely based off of 2014. It was made only to be used in the year 2017.

If the year isn't 2017, any 2017 program will error out with the error: To 2017 or Not to 2017? You decided Not to 2017. During 2017, any 2017 program it will output 2017 is da bomb. The language doesn't check system time, it eats up your bandwidth by going to a 2017 server to get the EXACT date and time.

The announcement of the language in June 2017 made a rush to start programming in 2017 before it doesn't work! 2017 can be useful from July 2017 (when it was released), to the 31st of December 2017.

Implementation

"use strict";
const server="129.6.15.30"; // Currently a NIST server; change this to the address of the "2017 server" if it exists.
const net=require("net");
let d=Buffer.allocUnsafe(0);
net.connect(37,server).on("data",x=>{
  d=Buffer.concat([d,x]);
  if(d.length>=4) {
    if(new Date((d.readUInt32BE(0)-2208988800)*1000).getFullYear()==2017) {
      console.log("2017 is da bomb");
      process.exit(0);
    } else {
      console.error("To 2017 or Not to 2017? You decided Not to 2017.");
      process.exit(1);
    }
  }
}).on("error",()=>{
  console.error("Error communicating with 2017 server.");
  process.exit(2);
}).on("end",()=>{
  console.error("Failed to receive four bytes of data from server.");
  process.exit(2);
});

See Also