60
\$\begingroup\$

The robbers thread can be found here: The Mystery String Printer (Robbers)

Your challenge

  • Write a program, function, or REPL script that prints a string to STDOUT.
  • The robbers will try to create a program that prints the same string.
  • If they successfully can create the program within 7 days, your submission is cracked.
  • If nobody can create a program that prints the same string within 7 days, your submission is safe. You may choose to reveal your program, or leave it to challenge future robbers. However, if you don't reveal it, you can't get any points from your submission (don't put "safe" in your answer header if you choose to do this).

Restrictions

  • The program must be less than or equal to 128 bytes total (more on this later).
  • If the program depends on the program name, or the name/contents of an external file, you must say that it does so, and include this in your total byte count.
  • The printed string must be less than or equal to 2048 bytes.
  • The printed string must consist of only printable ASCII characters (new lines can be included).
  • The program must produce the same output every time that it is run.
  • Built-in cryptographic primitives (includes any rng, encryption, decryption, and hash) aren't allowed.
  • The program must not take input.
  • No standard loopholes.

Scoring

  • If a submission is cracked before seven days, the submission earns 0 points.
  • A safe submission of ≤128 characters earns 1 point.
  • A safe submission of ≤64 characters earns 2 points. If it's less than or equal to 32 bytes, it earns 4 points, and so on.
  • Each safe submission also earns an additional 3 point bonus (independent of the length).
  • There is a tiny (1/2 point) penalty for every cracked after your first one.
  • Note that the robber's solution has to be in the same range of program lengths.
  • Each person may submit a maximum of 1 program per byte range per language (different versions and arbitrary substitutions of the same language don't count as separate languages). Example: you can post a 32 byte and a 64 byte pyth program, but you can't post a 128 byte program in both Java 7 and Java 8.
  • The person with the highest point total wins.

Submissions

Each submission must have the following pieces of information:

  • The name of the language. All new robbers' solutions must be the same language.
  • The range of the program size (this is the nearest power of two higher than the size of the program; for example, if your program is 25 bytes, this would be "≤32").
  • The actual string to be printed out.
  • If a submission is safe, put "safe" and the program length (to the nearest power of 2) in your header. If there are multiple numbers in your header, put the power of 2 last.

This stack snippet generates leaderboards and lists all of the open submissions. If there are any problems with the snippet, please leave a comment.

/* Configuration */

var QUESTION_ID = 60328; // Obtain this from the url
// It will be like http://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 167084; // This should be the user ID of the challenge author.

var SECONDSINDAY = 86400;
var SAFECUTOFFDAYS = 7;
var SORTBYTIME = true;
var SUBTRACTCRACKEDPOINTS = true;
var EXPIREDTIME = 1446336000;


/* App */

var answers = [],
  answers_hash, answer_ids, answer_page = 1,
  more_answers = true,
  comment_page;



function answersUrl(index) {
  return "//api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "//api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {

  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function(data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });

}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function(data) {
      data.items.forEach(function(c) {

        answers_hash[c.post_id].comments.push(c);

      });

      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();


var SAFE_REG = /<h\d>.*?[sS][aA][fF][eE].*<\/\h\d>/;
var POINTS_REG = /(?:<=|≤|&lt;=)\s?(?:<\/?strong>)?\s?(\d+)/
var POINTS_REG_ALT = /<h\d>.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;
var CRACKED_HEADER_REG = /<h\d>.*[Cc][Rr][Aa][Cc][Kk][Ee][Dd].*<\/h\d>/;
var CRACKED_COMMENT_REG = /(.*[Cc][Rr][Aa][Cc][Kk][Ee][Dd].*<a href=.*)|(.*<a href=.*[Cc][Rr][Aa][Cc][Kk][Ee][Dd].*)/
var OVERRIDE_REG = /^Override\s*header:\s*/i;
var LANGUAGE_REG = /<h\d>\s*(.+?),.*<\/h\d>/;
var LANGUAGE_REG_ALT = /<h\d>\s*(<a href=.+<\/a>).*<\/h\d>/
var LANGUAGE_REG_ALT_2 = /<h\d>\s*(.+?)\s.*<\/h\d>/;
var LANGUAGE_REG_ALT_3 = /<h\d>(.+?)<\/h\d>/;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {

  var valid = [];
  var open = [];



  answers.forEach(function(a) {

    var body = a.body;
    var cracked = false;

    a.comments.forEach(function(c) {
      var was_safe = (c.creation_date + (SECONDSINDAY * SAFECUTOFFDAYS) > a.creation_date);
      if (CRACKED_COMMENT_REG.test(c.body) && !was_safe)
        cracked = true;
    });

    if (CRACKED_HEADER_REG.test(body)) cracked = true;

    // if (SUBTRACTCRACKEDPOINTS||!cracked) {

    var createDate = a.creation_date;
    var currentDate = Date.now() / 1000;
    var timeToSafe = (createDate + (SECONDSINDAY * SAFECUTOFFDAYS) - currentDate) / SECONDSINDAY;
    var SafeTimeStr = (timeToSafe > 2) ? (Math.floor(timeToSafe) + " Days") :
      (timeToSafe > 1) ? ("1 Day") :
      (timeToSafe > (2 / 24)) ? (Math.floor(timeToSafe * 24) + " Hours") :
      (timeToSafe > (1 / 24)) ? ("1 Hour") :
      "<1 Hour";

    var expired = createDate > (EXPIREDTIME);

    var safe = timeToSafe < 0;
    var points = body.match(POINTS_REG);
    if (!points) points = body.match(POINTS_REG_ALT);
    safe = safe && !cracked

    isOpen = !(cracked || safe);

    if (points) {
      var length = parseInt(points[1]);
      var safepoints = 0;
      if (length <= 4) safepoints = 32;
      else if (length <= 8) safepoints = 16;
      else if (length <= 16) safepoints = 8;
      else if (length <= 32) safepoints = 4;
      else if (length <= 64) safepoints = 2;
      else if (length <= 128) safepoints = 1;



      valid.push({
        user: getAuthorName(a),
        numberOfSubmissions: (safe && !expired) ? 1 : 0,
        points: (safe && !expired) ? safepoints : 0,
        open: (isOpen && !expired) ? 1 : 0,
        cracked: (cracked && !expired) ? 1 : 0,
        expired: (expired) ? 1 : 0
      });

    }

    if ((isOpen || expired) && points) {

      var language = body.match(LANGUAGE_REG);
      if (!language) language = body.match(LANGUAGE_REG_ALT);
      if (!language) language = body.match(LANGUAGE_REG_ALT_2);
      if (!language) language = body.match(LANGUAGE_REG_ALT_3);



      open.push({
        user: getAuthorName(a),
        length: points ? points[1] : "???",
        language: language ? language[1] : "???",
        link: a.share_link,
        timeToSafe: timeToSafe,
        timeStr: (expired) ? "Challenge closed" : SafeTimeStr
      });
    }
    // }
  });


  if (SORTBYTIME) {
    open.sort(function(a, b) {
      return a.timeToSafe - b.timeToSafe;
    });
  } else {
    open.sort(function(a, b) {
      var r1 = parseInt(a.length);
      var r2 = parseInt(b.length);
      if (r1 && r2) return r1 - r2;
      else if (r1) return r2;
      else if (r2) return r1;
      else return 0;
    });
  }

  var pointTotals = [];
  valid.forEach(function(a) {

    var index = -1;
    var author = a.user;
    pointTotals.forEach(function(p) {
      if (p.user == author) index = pointTotals.indexOf(p);
    });

    if (index == -1) pointTotals.push(a);
    else {
      pointTotals[index].points += a.points;
      pointTotals[index].numberOfSubmissions += a.numberOfSubmissions;
      pointTotals[index].cracked += a.cracked;
      pointTotals[index].expired += a.expired;
      pointTotals[index].open += a.open;
      if (SUBTRACTCRACKEDPOINTS && a.cracked && pointTotals[index].cracked > 1) pointTotals[index].points -= .5;
    }

  });

  pointTotals.forEach(function(a) {
    a.points += (a.numberOfSubmissions) ? ((a.numberOfSubmissions) * 3) : 0;
  });

  pointTotals.sort(function(a, b) {
    if (a.points != b.points)
      return b.points - a.points;
    else if (a.numberOfSubmissions != b.numberOfSubmissions)
      return b.numberOfSubmissions - a.numberOfSubmissions;
    else if (a.open != b.open)
      return b.open - a.open;
    else if (a.cracked != b.cracked)
      return a.cracked - b.cracked;
    else return 0;
  });



  pointTotals.forEach(function(a) {


    var answer = jQuery("#answer-template").html();
    answer = answer
      .replace("{{NAME}}", a.user)
      .replace("{{SAFE}}", a.numberOfSubmissions)
      .replace("{{OPEN}}", a.open)
      .replace("{{CLOSED}}", a.expired)
      .replace("{{CRACKED}}", a.cracked)
      .replace("{{POINTS}}", a.points);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);


  });



  open.forEach(function(a) {
    var answer = jQuery("#open-template").html();
    answer = answer
      .replace("{{NAME}}", a.user)
      .replace("{{LENGTH}}", a.length)
      .replace("{{LANGUAGE}}", a.language)
      .replace("{{TIME}}", a.timeStr)
      .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#opensubs").append(answer);
  });



}
body {
  text-align: left !important
}
#answer-list {
  padding: 10px;
  width: 350px;
  float: left;
}
#open-list {
  padding: 10px;
  width: 470px;
  float: left;
}
table thead {
  font-weight: bold;
  vertical-align: top;
}
table td {
  padding: 5px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">
<div id="answer-list">
  <h2>Leaderboard</h2>
  <table class="answer-list">
    <thead>
      <tr>

        <td>Author</td>
        <td>Safe</td>
        <td>Open</td>

        <td>Cracked</td>
        <td>Late Entry</td>
        <td>Score</td>
      </tr>
    </thead>
    <tbody id="answers">

    </tbody>
  </table>
</div>

<div id="open-list">
  <h2>Open submissions</h2>
  <table class="open-list">
    <thead>
      <tr>
        <td>Author</td>
        <td>Length</td>
        <td>Language</td>
        <td>Time Remaining</td>
        <td>Link (open in new tab)</td>
      </tr>
    </thead>
    <tbody id="opensubs">
    </tbody>
  </table>
</div>

<table style="display: none">
  <tbody id="answer-template">
    <tr>
      <td>{{NAME}}</td>
      <td>{{SAFE}}</td>
      <td>{{OPEN}}</td>

      <td>{{CRACKED}}</td>
      <td>{{CLOSED}}</td>
      <td>{{POINTS}}</td>


    </tr>
  </tbody>
</table>

<table style="display: none">
  <tbody id="open-template">
    <tr>
      <td>{{NAME}}</td>
      <td>{{LENGTH}}</td>
      <td>{{LANGUAGE}}</td>
      <td>{{TIME}}</td>
      <td><a target="_parent" href="{{LINK}}">Link</a>
      </td>
    </tr>
  </tbody>
</table>

Use the following formats for entries:

Language, (any text with the program size as the last number)
=

or

Language
=
Length <= 16

Note that the snippet will only put the first word in the header as the language if it doesn't detect a comma.

For safe submissions, put safe in your header. The snippet will automatically put your program in the "safe" column if the time is expired, so this is more to tell any robbers that your program is safe.

For cracked submissions, put cracked in your header.

The program should also be able to recognize if a comment says "cracked" and has a link; however, this is not guaranteed.

Tiebreaking order: Points -> # of Safe submissions -> Least amount of cracked submissions.

Note that the snippet sorts by open submissions before least cracked, but open submissions will not be counted at the end of the contest.

This challenge is now closed.

Most points overall winner: Dennis

Most safe submissions: DLosc

(Note that the number of safe submissions doesn't translate to a point amount, as the size of the programs are considered in calculating the score).

\$\endgroup\$
  • 5
    \$\begingroup\$ We should remind the cops that the output should better be longer than the program size, to reduce trivial solutions like codegolf.stackexchange.com/a/60395 and codegolf.stackexchange.com/a/60359 \$\endgroup\$ – kennytm Oct 11 '15 at 16:56
  • 2
    \$\begingroup\$ @bmarks There has to exist a way to execute the language, and the language must be able to display a string of ASCII characters. If you want to use HQ9+, congratulations, you have just gotten yourself a cracked submission. \$\endgroup\$ – Daniel M. Oct 12 '15 at 20:35
  • 3
    \$\begingroup\$ @bmarks I'd prefer not, but I'm not going to stop you. \$\endgroup\$ – Daniel M. Oct 12 '15 at 21:30
  • 15
    \$\begingroup\$ All the number-only outputs are super boring. \$\endgroup\$ – mbomb007 Oct 13 '15 at 20:06
  • 4
    \$\begingroup\$ Please consider using the Sandbox the next time. Preferably, the rules of a challenge shouldn't change at all after it has been posted. I've lost track of how many times the rules have changed here... \$\endgroup\$ – Dennis Oct 17 '15 at 20:01

210 Answers 210

3
\$\begingroup\$

Java (safe)

Length <= 128

Output (1412 characters, # is the first character):

#-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0#wj]PC6)0pcVI</6vi\OB5(9obUH;.5uh[NA4'{naTG:-4tgZM@3&zm`SF9,3sfYL?2%yl_RE8+2reXK>1$xk^QD7*1qdWJ=0

The program was

class T{public static void main(String[]s){for(int i=18356,t=0;i>1;i-=13,t=i%97)System.out.print((char)(t>88?t%10+48:t+35));}}

J Atkin was on the right path when he mentioned the number 13 in the comments.

\$\endgroup\$
  • \$\begingroup\$ Is this on a REPL, or in a function? \$\endgroup\$ – J Atkin Oct 14 '15 at 22:38
  • \$\begingroup\$ It seems to have several repeating patterns... \$\endgroup\$ – LegionMammal978 Oct 14 '15 at 22:39
  • \$\begingroup\$ @LegionMammal978 Just found an interesting pattern. when checking the diff of numbers -13 shows up a lot. \$\endgroup\$ – J Atkin Oct 14 '15 at 23:12
  • \$\begingroup\$ There is a pattern, but I find the challenge is that class S{public static void main(String[]a){}} already takes up 45 bytes so there isn't much space you could work with _(:3 」∠)_ \$\endgroup\$ – kennytm Oct 15 '15 at 3:17
  • \$\begingroup\$ Yea it's a full programm, not just a function. \$\endgroup\$ – CommonGuy Oct 15 '15 at 4:40
3
\$\begingroup\$

C, <= 64 (safe)

2000 bytes of output, including a trailing space (though that's not important, it could just as easily be left out):

cat cat dog cat dot cog cot dot dag cot cog dag dag cot cog dat cag cog cog cag dot cag dog dog dog dog dat cog dat dot dot dat cag dot cot dag dag dot cot dag cog cot dot cog cat dog cat cat cat cat cag dot cag cat dat cag cog dat cot dag dag dat cot dag cot dot dat dot dog cat dog dog dog dog dog cat dog cog cag cog cot dag cot cag dag dag cot cag dot dat cag cat dat cog dat cat cat cat cat dog cat dot cog cot dot dag cot cog dag dag cot cog dat cag cog cog cag dot cag dog dog dog dog dat cog dat dot dot dat cag dot cot dag dag dot cot dag cog cot dot cog cat dog cat cat cat cat cag dot cag cat dat cag cog dat cot dag dag dat cot dag cot dot dat dot dog cat dog dog dog dog dog cat dog cog cag cog cot dag cot cag dag dag cot cag dot dat cag cat dat cog dat cat cat cat cat dog cat dot cog cot dot dag cot cog dag dag cot cog dat cag cog cog cag dot cag dog dog dog dog dat cog dat dot dot dat cag dot cot dag dag dot cot dag cog cot dot cog cat dog cat cat cat cat cag dot cag cat dat cag cog dat cot dag dag dat cot dag cot dot dat dot dog cat dog dog dog dog dog cat dog cog cag cog cot dag cot cag dag dag cot cag dot dat cag cat dat cog dat cat cat cat cat dog cat dot cog cot dot dag cot cog dag dag cot cog dat cag cog cog cag dot cag dog dog dog dog dat cog dat dot dot dat cag dot cot dag dag dot cot dag cog cot dot cog cat dog cat cat cat cat cag dot cag cat dat cag cog dat cot dag dag dat cot dag cot dot dat dot dog cat dog dog dog dog dog cat dog cog cag cog cot dag cot cag dag dag cot cag dot dat cag cat dat cog dat cat cat cat cat dog cat dot cog cot dot dag cot cog dag dag cot cog dat cag cog cog cag dot cag dog dog dog dog dat cog dat dot dot dat cag dot cot dag dag dot cot dag cog cot dot cog cat dog cat cat cat cat cag dot cag cat dat cag cog dat cot dag dag dat cot dag cot dot dat dot dog cat dog dog dog dog dog cat dog cog cag cog cot dag cot cag dag dag cot cag dot dat cag cat dat cog dat cat cat cat cat dog cat dot cog cot dot dag cot cog dag dag cot cog 

Code:

main(i){for(;++i<2002;){putchar("tg cdao"[i%4*2+i*i/97%2]);}}

What it does:

For each i, compute i*i/97 (integer division) and take the least significant bit of the result. This gives a fairly random-looking string of 1's and 0's: 0000000011110000110001100100110110100101... We use these bits to determine whether to take a letter from cat or from dog, and we use i%4 to cycle through characters 0 through 3 of the selected string. In Python, ungolfed, it might have been ("cat ","dog ")[i*i//97%2][i%4], but combining the subscripts with math is fewer characters and much easier in C. 97 was a nice divisor because 1) it meant the output only cycled after 388 characters and 2) it happened to begin the output with the actual words I was using.

\$\endgroup\$
3
\$\begingroup\$

Ruby, ≤ 64 bytes (safe)

213 bytes output:

pooppopooopoopopopoppopqooqooqpppqpqqoqppppproqopoppqprppoqptqrutqqqrqppqtppuqovsurprwprypsorqutsvppxpsaypqupsxavpqpxyqttvxwapuosabseogzrggxprtrceqduzrqtiawpjerbpdytupxlnlptqqbpojxxnnjklzepjuoshwgjfgnnequpcncebhub

Solution

Just some large number in all the bases from 2 to 36, with the digits shifted around a bit. The number 631381 was chosen because it stayed within the 26 first digits in all bases so that the final output, when rotated more than 10 places, would only contain letters.

When shifting the digits back, you can see that the string at first only contains zeros and ones, then a few twos, then some threes etc, making it the pattern quite obvious.

35.times{|i|$><<631381.to_s(i+2).tr("0-9a-z","o-za-n0-9")}
\$\endgroup\$
3
\$\begingroup\$

C++ (Safe)

Was so close to getting the source below 64 bytes...

Here's the output:

0020002488100002416161816160248810000243232343232323436404042000241616181616323436404042000246464666464646668727274646464666880808280800248810000243232343232323436404042646464666880808280809698100104104106000241281281301281281281301321361361381281281281301321441441461441441281301321361361381281281281301321601601621601601601621641681681700002416161816163234364040420002464646664646466687272746464646668808082808012813013213613613812812812813013216016016216016016016216416816817019219219219419620820821020820822422622823223223400024256256258256256256258260264264266256256256258260272272274272272256258260264264266256256256258260288288290288288288290292296296298256

That's 664 bytes of output.

The source was <= 128 bytes

Solution:

#include
int main(){for(int i=0;i<300;i++)printf("%d",i&2*i+1+i&(i+5));}
Uses the 'bitwise and' operator.

\$\endgroup\$
  • \$\begingroup\$ This one's pretty fun :) \$\endgroup\$ – Sp3000 Oct 11 '15 at 9:17
  • \$\begingroup\$ Glad to hear it! Let me know when (or if ;) ) it's cracked and I'll post the source. \$\endgroup\$ – Liam Oct 11 '15 at 10:03
  • \$\begingroup\$ Since you know how you did this, you should take a look at codegolf.stackexchange.com/a/60374/16513 I see similar patterns in output, maybe you can solve his \$\endgroup\$ – Albert Renshaw Oct 14 '15 at 7:33
  • \$\begingroup\$ Hmm, I'm looking at it but I believe he used a different method. Hopefully I'll still be able to figure it out. (Notice that mine uses all the digits, whereas his only uses powers of 2) \$\endgroup\$ – Liam Oct 14 '15 at 8:06
3
\$\begingroup\$

Insomnia, ≤ 64 (Safe)

ProgrammingPuzzle&CodeGolf

I would like to assure everyone that I didn't just pick this string off the top of my head and post an answer without checking whether a solution exists or not :P

Interpreter@StackSnippet

Hint

Since instruction 8 is ambiguous, it's not implemented in the interpreter along with instruction 9. However, the solution doesn't contain instruction 8 or 9.

Regardless, I accept any solution which runs correctly with either of the two possible interpretations of instruction 8. Feel free to implement your own interpreter for it, or update the interpreter in the link.

Solution

(ddG=
pjyn><p"e=pdjj<LdtdFjuy~nod=nL<yf="f<ujgFutpt(p=<(oj!>o<pL

There is no trailing new line at the end. The solution is optimal or near optimal, so it's hard for human to actually derive this by hand.

\$\endgroup\$
  • 1
    \$\begingroup\$ There doesn't seem to be an interpreter available for this language... \$\endgroup\$ – Lynn Oct 13 '15 at 15:31
  • \$\begingroup\$ @Mauris: I have edited the post to include a link to the interpreter. \$\endgroup\$ – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ Oct 14 '15 at 1:37
  • \$\begingroup\$ ÈÊLdÊFHLyGFÈFFLÊFÊFHLdFÊLpyF<FBÔ<FHLyÔLIHFÈÊL outputs "ProgrammingP" in insomnia 1. Which version of insomnia is this? Also, all those Es and Os with funky symbols on top allowed? \$\endgroup\$ – pppery Oct 14 '15 at 20:33
  • \$\begingroup\$ @ppperry: It's as described in the linked article: the source code is ASCII (so all those characters with accents you have are not allowed), and it's Insomnia version 1. My interpreter only happens to allow Unicode input, but they are just for fun. \$\endgroup\$ – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ Oct 15 '15 at 1:59
  • \$\begingroup\$ That is not an Insomnia interpreter. Without the 8 and 9 commands I don't even think it's a programming language (by PPCG standards). \$\endgroup\$ – Lynn Oct 25 '15 at 14:15
3
\$\begingroup\$

CJam, Range <= 16

So, this is embarrassing... I lost the program. So this answer is unsafe for all eternity. Crap.

1012718281828459045273890560989306532008553692318766845459815003314423651484131591025766640342879349273517109663315842845858298095798704172839810308392757538410220264657948067181159874141715197821216275479141900392134424133920089205141202604284164776815326901737247211071688861105205078721724154952753575314718656599691373305114285
\$\endgroup\$
  • \$\begingroup\$ That's OK, I lost the code to my dc submission as well :P \$\endgroup\$ – a spaghetto Jan 4 '16 at 16:08
2
\$\begingroup\$

Fourier - Cracked

Range: <=32

String:

2122483225681922097152171798691843602879701896396861897001964269013744956211222300745198530623141535718272648361505980416138034926935811275748695117245540509049022179443407731103250484475985923078281734093318688459300007823719828521854630505113020933460422206697013398219579016739551162884034438017811742724249103942534136789516705652419749018636744941816255385595553105603228478886817941913300018121834285351114635889972008122772634701221657915276159830132698815550650166683145752253825024130799390525667397576712042121582252265796485803898145439910936080365118545524429015283005226525373306591146596380999368308977696007362554150202362972394711962091891782522350896253352112577772728002370387610430602826927993986801361806220018873011021906386675753009547945073606343415825034633858252855578020596367555775021017581896705394774043140172299149272778867192103837211440298730978220217461771857441901426311729681383820569104974145481270877016012649453231348275519970913382122931358798794913451593854784081756995081772717065856294736122642489533802911558562892537346452028109264847224473615121287113076915002394139208578086177686115257497354785332151612870275311503343425837268382273205956262450375487052304152420010520592218930639911558485308199423713696620200782955806727269571220627865960521160791605471835355486134202329528196715632135831547021667820610489669276412307052313282798182724228494489571749785803184288017511963522262363914512187106605499089158487126931984998931607232391153536046707042953355790522537094715328944294216691664397407079523074157949383649613963144290903909350911775369346530804545543989831547266901148133975781331624980745497418452932259866320677062287020172601937538303131944333834647775468710319343284001431665213130766208748703580971865899367058864133080365305110228654823694689069629811633466999394638916807976061252245511624205865226492647247562826021570513721099219359990299022601672140852584716895460404747374717998459657246694308370646635919987895996736789540655850081764170577611893869560559643310988147153698816

That's 2047 characters for the doubting person ;)

Clue:

This is a variant of something very common, which is known and loved (possibly) by both mathematicians and programmers.

\$\endgroup\$
  • \$\begingroup\$ Cracked \$\endgroup\$ – Sp3000 Oct 11 '15 at 8:04
2
\$\begingroup\$

Python 3, Cracked

Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

<= 128 bytes. This one was posted earlier with a smaller byte count, but was deleted. I figured out how to do it in the <= 128 category.

My code (94 bytes):

p,__builtins__.print=print,lambda x:x;from this import*;p(''.join([d.get(c,c)for c in s])[4:])

\$\endgroup\$
  • \$\begingroup\$ Cracked. \$\endgroup\$ – kennytm Oct 11 '15 at 10:52
2
\$\begingroup\$

Stuck (cracked by Thomas Kwa)

Range: <= 8

String: 46411484401953

Code: 21 6b9^

Just a silly math op. Won't be doing that again :P

\$\endgroup\$
  • \$\begingroup\$ No cryptographic functions were used in this since Stuck does not have them. I could I suppose evaulate a Python string that generated it but it would be far longer than 8 bytes. \$\endgroup\$ – a spaghetto Oct 11 '15 at 3:40
  • \$\begingroup\$ Ok, I might as well remove some of the bloat in the original question then. \$\endgroup\$ – Daniel M. Oct 11 '15 at 3:44
  • \$\begingroup\$ Cracked. \$\endgroup\$ – lirtosiast Oct 11 '15 at 3:55
  • \$\begingroup\$ Didn't last long, but then again I didn't expect it to. \$\endgroup\$ – a spaghetto Oct 11 '15 at 3:58
2
\$\begingroup\$

CJam

Range <=8

31750158586652376823306770524160580239759220968490662365280697333523990463193796504719728904832671151360272625266534588786424734457574712153976494064953411059739792915722586949729210719621153746894802142918027970654609398438852308624078542639175128838831245786273442836511403960499435950211913983569988987209742058089855692071657841384645297208882183542051537989712878902231738195073256758864262540198959691481289564731544298150520509963645384433851976251199310574577965940322710082134532284930147152412624
\$\endgroup\$
2
\$\begingroup\$

><> Cracked by Sp3000

Requires the official Interpreter

String:

yh[cPWNkz^EKLBiQMuSvI`n\Yw|JVXDUbZmfoRC_xrq{TlpHjGt]OadFAsgeyh[

Range <= 64

Original Code (poorly golfed, I know. x.x Was rushed as trying to do other stuff, Sp3000's code is far superior)

   "%e@"&b+:r\
;v?:-1&:*}:{:<
 >&:"=@"@%+o ^
\$\endgroup\$
  • \$\begingroup\$ Cracked \$\endgroup\$ – Sp3000 Oct 11 '15 at 14:24
2
\$\begingroup\$

vim

Range: ≤16 (keystrokes).


Qb lbh qrznaq n fuehoorel?
\$\endgroup\$
  • 1
    \$\begingroup\$ Cracked. My answer got converted to a comment for some weird reason... But it's :redi@"|Ni!<CR>pg?G \$\endgroup\$ – Lynn Oct 11 '15 at 19:23
  • 1
    \$\begingroup\$ @Mauris Try posting the answer without a link and then editing it in after posting. The SE software automatically converts very short answers with links in them to comments. \$\endgroup\$ – Doorknob Oct 11 '15 at 20:45
  • \$\begingroup\$ Oh, I never linked the answer I made. But here you go! \$\endgroup\$ – Lynn Oct 13 '15 at 15:24
  • \$\begingroup\$ I typed this in and vi is saying something about a shrubbery. What is going on here?? \$\endgroup\$ – squeamish ossifrage Oct 16 '15 at 21:34
  • \$\begingroup\$ @squeamishossifrage We are the knights who say... ni! \$\endgroup\$ – Doorknob Oct 16 '15 at 22:03
2
\$\begingroup\$

Pyth, Cracked by Sp3000

Range: <= 4

New, valid answer

I'm sure this can be brute forced with such a small program size, but lets see.

3582409715080948947248394822102989658717877178836918915255342812682764990143662880
\$\endgroup\$
  • \$\begingroup\$ The output must consist exclusively of printable ascii. \$\endgroup\$ – SuperJedi224 Oct 11 '15 at 17:34
  • \$\begingroup\$ @SuperJedi224 dang, fixed \$\endgroup\$ – Maltysen Oct 11 '15 at 17:35
  • \$\begingroup\$ Cracked \$\endgroup\$ – Sp3000 Oct 12 '15 at 1:46
2
\$\begingroup\$

PARI/GP (cracked by Dennis)

362871

Range <= 4

I don't expect it to last long.

\$\endgroup\$
  • 2
    \$\begingroup\$ Cracked? \$\endgroup\$ – Dennis Oct 11 '15 at 5:35
2
\$\begingroup\$

Python <=64 Cracked by @Sp3000

[1.0, 1.005037815259212, 1.0206207261596576, 1.0482848367219182, 1.0910894511799618, 1.1547005383792517, 1.25, 1.4002800840280099, 1.666666666666667, 2.294157338705618]

Just for clarity I'm running this in Python 3.4.1 64bit on Windows. I expect there will be slight floating point differences in the calculations on different platforms, so if you can get it to within 6 or 7 significant digits of each value you can call it cracked. Once cracked, I'll post the code and an explanation.

Hint: I take my inspiration from the universe itself :)

Code

print([1/(1-(i/10)**2)**(1/2) for i in range(10)])

Explaination

This comes from Einstein's theory of Special Relativity, specifically the Lorentz transformation for Time Dilation. An object traveling near the speed of light will be observed to experience less proper time than an observer at rest. The limit as V->C, time dilation becomes infinite and time will slow to a stop for the traveling object as observed by an observer at rest. Fun stuff to wrap your brain around :)

\$\endgroup\$
  • \$\begingroup\$ Cracked? \$\endgroup\$ – Sp3000 Oct 13 '15 at 16:56
  • \$\begingroup\$ Indeed @Sp3000, good work! You certainly got it correct. Your code is very nearly identical to what I put together. \$\endgroup\$ – spacemanjosh Oct 13 '15 at 19:34
2
\$\begingroup\$

JavaScript (cracked by NaN)

Range: ≤16

Output (17 bytes):

28274333882.30814
\$\endgroup\$
  • 1
    \$\begingroup\$ @NaN It's actually 11bytes - Math.PI*9e9, but you should post it as an answer! \$\endgroup\$ – Sven Writes Code Oct 11 '15 at 20:41
  • 1
    \$\begingroup\$ @SvenTheSurfer Cheers. Cracked. \$\endgroup\$ – jkabrg Oct 11 '15 at 20:47
2
\$\begingroup\$

Thue, <= 64 (cracked by Thomas Kwa)

yellowyellowyellowredyellowredyellowyellowyellowredyellowredyellowyellowyellowredyellowredyellowyellowyellowredyellowredyellowyellowyellowredyellowredyellowyellowyellowredyellowred

Working on ppperry's Thue puzzle made me think about what the next level up in difficulty could be. Here, the problem (if I've successfully avoided loopholes, anyway) is to make a nondeterministic language produce nontrivial deterministic output.

\$\endgroup\$
  • \$\begingroup\$ Cracked? Am I missing something? \$\endgroup\$ – lirtosiast Oct 15 '15 at 2:04
  • \$\begingroup\$ Whoops. Apparently I did. \$\endgroup\$ – histocrat Oct 15 '15 at 3:55
2
\$\begingroup\$

AppleScript, ≤ 32 bytes Cracked

Output

(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)
(**)

Total: 2044 bytes

Hint

There are FOUR STDOUT equivalents in AppleScript.

\$\endgroup\$
2
\$\begingroup\$

><>, ≤16 Bytes, Cracked by Sp3000

!$'*-0369<?BEHKNQTWZ]`cfilorux{~

Output length of 32 bytes

...made sure it's ASCII this time :-/

\$\endgroup\$
  • \$\begingroup\$ Cracked \$\endgroup\$ – Sp3000 Oct 15 '15 at 18:37
2
\$\begingroup\$

CoffeeScript, ≤ 64 bytes (Cracked by kennytm)

Output (1437 bytes):

0bnQ=bXM=bGY=bmU=bGw=b24=YXk=b24=b24=ZGU=bnQ=bWU=dGU=b24=dHk=bmQ=bnQ=ZGU=aXA=b3I=Z2U=aW4=b24=blg=blk=YXQ=dFg=dFk=emU=ZnQ=ZXI=b20=b3I=dXM=dXM=bGU=dGg=c2U=b3I=Z2U=ZXQ=YXQ=Y2U=Y2U=dGg=ZnQ=b3I=bGU=dGg=dXM=aHQ=b3I=bGU=dGg=bmc=bGU=b3A=b3I=dXM=dXM=bGU=dGg=dGg=b20=b3c=bmc=bmc=ZGU=YXI=aXA=dGg=bGU=b3I=b24=cnM=bmc=bnQ=bnQ=ZXQ=b3I=Y3g=Y3k=b24=YXk=bmU=bHM=bmQ=bGw=dHk=bGU=ZXI=ZXg=aXM=b24=b3c=b3c=bms=YXA=YXQ=b3I=dHk=bnQ=bHk=bmc=emU=Y2g=bGU=bnQ=ZXM=aHQ=YWw=YWw=aHQ=bmc=b24=bnQ=ZnQ=bmc=b3I=aHQ=bGU=Z2U=b24=cGU=aW4=b20=ZnQ=aHQ=b3A=ZXI=bmQ=aWQ=cnQ=c2s=cGU=aHQ=dGg=b20=aHQ=dGg=b20=ZGU=aXQ=b24=dHk=ZXI=b24=bnM=bmU=b3I=ZXQ=bGU=dGg=b3c=YXA=d1g=d1k=bmc=b20=ZnQ=aHQ=b3A=Z2U=ZXI=cmU=ZGU=ZXI=dmU=aW4=dHM=b24=ZXM=cg==emU=aHQ=cng=cnk=bGQ=aW4=ZGU=bmc=emU=YWs=cmM=b3I=dHk=a2U=YXk=ZXQ=YXA=aW4=aXQ=dHk=dGg=emU=dXQ=Z24=b3I=b24=bnQ=b3c=bmc=b3c=cm0=b3A=b24=cm0=aW4=bGU=b24=YXk=b24=dHk=b24=ZGk=Z2U=b20=Y3Q=Z24=dHk=b24=Y2U=aXA=dGU=aW4=ZXI=b3I=bGU=dGg=cmU=b3I=bGU=dGg=bmQ=b3I=bGU=dGg=bmc=Z2U=cnQ=b3I=bGU=dGg=bmc=Z24=YWs=b24=ZXg=dXA=ZXM=dXA=bnQ=Y2s=Y3Q=dGg=ZXI=cmU=ZGU=bnQ=YXA=bGU=b3I=bGU=dGg=YW4=dGg=bnM=ZXI=Z3M=dGE=bmc=aHQ=ZXI=aW4=YWs=bXA=bGU=aHQ=dGg=ZXI=c2U=cmU=c2U=c2U=c2U=bmQ=cnQ=c2U=c2s=Z2U=ZXQ=YXQ=Y2U=Y2U=dGg=aXA=dGU=Z2U=aW4=b24=blg=blk=YXQ=dFg=dFk=emU=aHQ=dGg=aHQ=dGg=ZXI=cmU=bmQ=cnQ=blg=blk=c3Q=bmc=b24=b3I=bmU=Y3Q=aXM=b3I=b24=bGU=b3I=b24=dHk=a2U=b3I=dGg=blg=blk=blo=YWc=Znk=Y3Q=ZGU=Y2U=d3M=dGg=Z2U=YWs=bmc=YXA=ZGU=eA==eQ==ZXg=b20=eHQ=dGg=bGU=ZW0=dWU=dHk=dHk=dHk=

This output will get alerted when ran at the Try CoffeeScript page at CoffeeScript.org in Chrome 45.0.2454.101 m.

Edit: The output changed slightly in the newest version of Chrome. Here is the output for Chrome 46.0.2490.71 m (1453 bytes):

0bnQ=bXM=bGY=bmU=bGw=b24=YXk=b24=b24=ZGU=bnQ=bWU=dGU=b24=dHk=bmQ=bnQ=ZGU=aXA=b3I=Z2U=aW4=b24=blg=blk=YXQ=dFg=dFk=emU=ZnQ=ZXI=b20=b3I=dXM=dXM=bGU=dGg=c2U=b3I=Z2U=ZXQ=YXQ=Y2U=Y2U=dGg=ZnQ=b3I=bGU=dGg=dXM=aHQ=b3I=bGU=dGg=bmc=bGU=b3A=b3I=dXM=dXM=bGU=dGg=dGg=b20=b3c=bmc=bmc=ZGU=YXI=aXA=dGg=bGU=b3I=b24=cnM=bmc=bnQ=bnQ=ZXQ=b3I=Y3g=Y3k=b24=YXk=bmU=bHM=bGw=dHk=bGU=ZXI=ZXg=aXM=b24=b3c=b3c=bms=YXA=YXQ=b3I=dHk=bnQ=bHk=bmc=emU=Y2g=bGU=bnQ=ZXM=aHQ=YWw=YWw=aHQ=bmc=b24=bnQ=ZnQ=bmc=b3I=aHQ=bGU=Z2U=b24=cGU=aW4=b20=ZnQ=aHQ=b3A=ZXI=bmQ=aWQ=cnQ=c2s=cGU=aHQ=dGg=b20=aHQ=dGg=b20=ZGU=b24=ZXQ=dGg=b24=aXQ=b24=dHk=ZXI=b24=bnM=bmU=b3I=ZXQ=bGU=dGg=b3c=YXA=d1g=d1k=bmc=b20=ZnQ=aHQ=b3A=Z2U=ZXI=cmU=ZGU=ZXI=dmU=aW4=dHM=b24=ZXM=cg==emU=aHQ=cng=cnk=bGQ=aW4=ZGU=bmc=emU=YWs=cmM=b3I=dHk=a2U=YXk=ZXQ=YXA=aW4=aXQ=dHk=dGg=emU=dXQ=Z24=b3I=b24=bnQ=b3c=bmc=b3c=cm0=b3A=b24=cm0=aW4=bGU=b24=YXk=b24=dHk=b24=ZGk=Z2U=b20=Y3Q=Z24=dHk=b24=Y2U=aXA=dGU=aW4=ZXI=b3I=bGU=dGg=cmU=b3I=bGU=dGg=bmQ=b3I=bGU=dGg=bmc=Z2U=cnQ=b3I=bGU=dGg=bmc=Z24=YWs=b24=ZXg=dXA=ZXM=dXA=bnQ=Y2s=Y3Q=dGg=ZXI=cmU=ZGU=bnQ=YXA=bGU=b3I=bGU=dGg=YW4=dGg=bnM=ZXI=Z3M=dGE=bmc=aHQ=ZXI=aW4=YWs=bXA=bGU=aHQ=dGg=ZXI=c2U=cmU=c2U=c2U=c2U=bmQ=cnQ=c2U=c2s=Z2U=ZXQ=YXQ=Y2U=Y2U=dGg=aXA=dGU=Z2U=aW4=b24=blg=blk=YXQ=dFg=dFk=emU=aHQ=dGg=aHQ=dGg=ZXI=cmU=bmQ=cnQ=blg=blk=c3Q=bmc=b24=b3I=bmU=Y3Q=aXM=b3I=b24=bGU=b3I=b24=dHk=a2U=b3I=dGg=blg=blk=blo=YWc=Znk=Y3Q=ZGU=Y2U=d3M=dGg=Z2U=YWs=bmc=YXA=ZGU=eA==eQ==ZXg=b20=eHQ=dGg=bGU=YXQ=ZW0=dWU=dHk=dHk=dHk=

Original source code:

for x of new Image(a=0).style
 a+=btoa(x.substr(-2))
alert a
\$\endgroup\$
  • \$\begingroup\$ Cracked \$\endgroup\$ – kennytm Oct 15 '15 at 14:58
2
\$\begingroup\$

MATLAB, 2, Cracked

The syntax of the command is incorrect.

Took me a while to work out something in MATLAB that is only 2 chars but should be quite tricky to work out :) (he hopes).

p.s. that is the exact output. No ans=


Well that one went faster than I thought it would...

\$\endgroup\$
  • \$\begingroup\$ Cracked? \$\endgroup\$ – Dennis Oct 17 '15 at 4:03
2
\$\begingroup\$

Pyth (cracked by isaacg)

939524095

Range ≤ 4

Let's see how this goes...

\$\endgroup\$
  • \$\begingroup\$ For whatever it's worth, this is 2^27 * 7 - 1 \$\endgroup\$ – isaacg Oct 17 '15 at 19:34
  • 1
    \$\begingroup\$ Yes, I figured out what the value is earlier today, and have about 3 possibly interesting representations. But I don't have the faintest clue how to squeeze any of them into 4 bytes of Pyth. Not knowing Pyth is kind of a handicap. ;) Scanning through some docs did not help, anything that comes to mind looks like it would use more than 4 bytes. \$\endgroup\$ – Reto Koradi Oct 17 '15 at 21:12
  • \$\begingroup\$ Cracked \$\endgroup\$ – isaacg Oct 18 '15 at 1:43
2
\$\begingroup\$

CJam (safe)

2969522710354117782268728281657874436077523451779189557858587124583732510232011182279648629302843012289537453156332620095347999870372186093569331972697450949571859995882165462952598378969103716558199013336239649166612855864402550284067775310029003979877576199234109704434192635868502534981511417768215602068546604589986237229981031515030844801890461800301300586064632275590967524506584831641691973705609466213993115716532669668183228671719799797562347371977329411936519256700981805373719919563640081628731389259795576339314694437080532378397585079403456215187549555967563283027604516908978269967118530905535308199228549578026691375975460991281557011399137527701055702769707536280006211461419462578004525812149844993765514697489735731025966784896379532108289602755662085743159982449970234950573500056692724864838103316392136519596778919106341667367801619890408628376816766014332163973769272783086065478133370857238494654315760990599225291037789853075070883915266958971748930365643994352950540496292548233966198335335092270718914517713429711934658808391076425410875435074192671012252715659331835221032454345564515855711607560938486720828374134819056045908284745381899992891870848325899309936307806608248782453178135052097370046402306272117696828073734127833151006582338686565489219479914533172914156409774220012911422325101334215197613438518304374272539625228307215875879830003850943261471668455041684061881784918857016574652559502693026187748485672247569179975106384082858131188717254923758658030214195014268064074865548117365871337277792602175655153982608733754392934636625990612708894514702745610870084535682834239693756847083681367634543706897751979399419992664301243055818300975493542084844509307521718271958163217805654531672244843277091018869783464554836938615149100691788966169099253377254362419671264475928212313071437014017258081820799682807812996637402619207718937561360621651155389611664139610329091736456106709712362258586867241270561371701064645520801674199626189861414161065280851185396832

Range ≤ 8

Solution

5e!e``Bb

Try it online.

How it works

  • 5e! pushes all possible permutations of [0 1 2 3 4] as an array.

  • e` performs run-length encoding. Since all permutations are unique, that doesn't do a whole lot here. It simply turns, e.g., [0 1 2 3 4] into [1 [0 1 2 3 4]].

  • ` pushes a string representation of the resulting array, i.e., "[[1 [0 1 2 3 4]] … [1 [4 3 2 1 0]]]".

  • Bb converts that string from base 11 to integer.

\$\endgroup\$
2
\$\begingroup\$

CJam, safe, <= 8

String (512 bytes):

31727830821534042803654900580041579944125099215829830038849883087237485384990372997137008773602561554524455355546965826217636264280531379575060368678123679591507670376378983011031372862444170088901246406464915421417735501844369384343529103866975162261323889938505690754099908479501571769966236353640152428123626259639270728536136695534152761505469883628985035665299649482133954805098589954263750507014493822638005349453618584045569842991716571963837585058144921186599068741714697983434201508077928870739706904563

Solution:

JK#)K#D-

The value is (19 ^ 20 + 1) ^ 20 - 13:

J   Push 19.
K   Push 20.
#   Power.
)   Increment.
K   Push 20.
#   Power.
D   Push 13.
-   Subtract.
\$\endgroup\$
  • \$\begingroup\$ Is the first character the spacebar or is it the 3? \$\endgroup\$ – Cows quack Oct 11 '15 at 6:10
  • 1
    \$\begingroup\$ @KritixiLithos It's all digits. If you select the text, you'll notice that there are no space characters at the start/end. I noticed that it almost looks like a space, but that's just an annoying formatting artifact, which I believe started showing up with the last big SE software update a few months ago. \$\endgroup\$ – Reto Koradi Oct 11 '15 at 6:37
  • \$\begingroup\$ @Optimizer I had deliberately used backtick formatting to keep the whole string visible. Using code formatting that requires substantial horizontal scrolling to see the content is not reader friendly at all, IMHO. \$\endgroup\$ – Reto Koradi Oct 11 '15 at 20:16
  • 1
    \$\begingroup\$ @RetoKoradi Most of the other answers are using the same thing. I don't see how it iwll be useful to have just one answer's complete string visible. Moreover, your approach gave false perception of newline and space. \$\endgroup\$ – Optimizer Oct 12 '15 at 6:33
  • \$\begingroup\$ Why argue about those things? When in doubt, list them both. \$\endgroup\$ – jimmy23013 Oct 16 '15 at 8:00
2
\$\begingroup\$

Python 2 (safe)

6827526938285133941673000231813168619941300497097936591748380508088909429445611165463624032127627532803234880684278865355076531262231840494975595460968129959347104225901744872847426849492584955132469122376660991207547055101929306267237604577722010893773043497283203607878662025645581606573723842423809514070028255417440212506882886554655415227255545579921342691580901906655429920934202998813117772871149920709038390132067329036138426507171331383525723381813108558141195500901960258557975441280

Range ≤ 32

Solution

a=b=9;exec"a*=b;b^=a;"*9;print b

Try it online.

\$\endgroup\$
2
\$\begingroup\$

PHP, Safe, Range ≤ 64

The length of the output was just to obfuscate. I left the --sign as a prefix to the numbers as a hint that trigonometric functions might be involved.

The function to calculate each number:

\left \lceil n*\tan(n/\pi) \right \rceil

The source code, 42 bytes long:

for(;$i<607;)echo ceil(++$i*tan($i/pi()));

Outputs a 2044 characters long string:

12514-240-17-9-5-215102154-240-39-20-11-4292039111-240-57-29-15-54153162195-239-72-37-19-57224490333-238-83-43-21-5113059123599-236-92-48-23-41639761641319-235-98-52-24-121509621710552-233-104-55-2422862120285-2434-230-108-57-2353676147377-1234-228-111-58-22104592179507-880-225-112-58-191655109217704-710-222-113-57-1622661292621040-610-218-113-56-1230781523171741-542-215-112-53-738921783864110-494-211-111-50-247108208472-22745-456-206-108-46558126242586-3376-427-202-105-421269145281740-1922-402-196-102-372082167328962-1386-381-191-97-3129971923821310-1106-362-185-93-24391122194481935-932-346-179-87-17501302505273386-814-330-173-81-96214928562710550-727-316-166-74-076170325753-11334-661-303-159-671090193371920-3899-607-290-151-59211062194241151-2426-563-278-143-50331232474861491-1794-526-266-134-40451412795592044-1441-494-254-125-30591623146473103-1215-465-242-116-19731843547555958-1057-439-230-106-88920839988941232-939-416-218-9551062354501062-9088-848-394-206-84181252645081294-4231-774-374-194-73321442965761619-2810-713-354-181-61471663316552113-2130-661-336-169-48631893717492951-1729-616-318-156-34802144148624693-1464-577-301-142-2099241463100110548-1274-541-284-129-51182715191176-59009-1131-509-267-115111393035821404-8127-1019-480-250-100281623396541713-4459-928-452-234-85451863777372158-3112-852-426-217-69642124208352853-2411-787-402-200-53842404679524097-1978-731-379-184-3610527052010936978-1684-682-356-166-18127302579126821051-1470-638-334-149-01503376451491-22742-1306-597-313-131201753757211784-7593-1176-561-292-113402024178082188-4625-1070-526-271-95612304639092783-3355-981-495-250-758326151310283748-2648-905-464-230-5610629356911705592-2196-839-436-209-35131328631134410543-1881-780-408-188-14157366701156069591-1647-728-381-16781844077791838-15855-1466-680-355-146302134518692208-7251-1321-637-330-124542445009722729-4750-1202-596-305-1027927755310933517-3554-1101-559-281-8010431261212354852-2852-1015-523-256-5613135067614057623-2387-939-489-232-33160390748161516880-2056-873-457-207-81894348291878-98654

\$\endgroup\$
2
\$\begingroup\$

PHP, safe, <=128

Output (190 bytes):

2.550(3 6*117!> 9/:0 5;*<#<(? ;:":! "=9*%3%1;)'32'*0+=+0% .0-5,+469$081+=/6,7!5'8'9&9%:*?'<(>)%.!7"<&$ ;';%8<):((7*4*0(2,;))3!/'3/2-1(0+5#(87(6.;#9$9$;&<'?!?)<:'>#=&$$= "!!%=$6*3)0+=/+1#-54!

Update: I noticed that the output depends on certain system settings and also had contained non-printable characters, I had to change a few things to fix that, so now the result looks completely different.

Solution

<?$d=dDSzWmMtoYy;for($i=31;++$i<127;print(date($d[substr(sin(deg2rad($i)),9,2)%11],$i*1e9%14e8)^chr($i).chr(158-$i)|~ßß)&~"@@");

What it does

Use date() with parameters that result in strings with at least two characters (but independent from timezones) and with different timestamps, then XOR the result with two characters defined by a simple loop variable and restrict the result to the printable ASCII range with |" " and &~"@@".

substr(sin(deg2rad($i)),9,2)%11 is used for pseudorandom numbers between 0 and 11, $i*1e9%14e8 for timestamps between 1970 and 2014.

\$\endgroup\$
  • \$\begingroup\$ I get a complete different output, when I run this code snippet, tested with PHP 5.5 and 5.6: >.=5<(? >*=1?!> =/>0<5?*<#<(? ?:>:= >==*=3=1?)?3>'>0?=?0= >0=5<+<6=$<8=+=/>,?!='<'=&=%>*?'<(>)=.=7><>$<;?;=8<)>(<7>4>0<2<;=)?!?'?/>-=(<+=#<8?(>.?#=$=$?&<'?!?)<:?>?=>$<=<"=!==<6>3=0?=?+=#=5<! \$\endgroup\$ – insertusernamehere Oct 19 '15 at 12:41
  • \$\begingroup\$ Is this on Windows, by chance? I got the same results for all current PHP versions with 3v4l.org \$\endgroup\$ – Fabian Schmengler Oct 19 '15 at 12:43
  • \$\begingroup\$ I've tested it on OS X 10.10 using built-in PHP (5.5) and MAMP's PHP 5.6. I also set the time-zone explicitly if by any change this might change the behavior. Strange thing. :) \$\endgroup\$ – insertusernamehere Oct 19 '15 at 12:51
  • \$\begingroup\$ I removed any time zone dependencies (that was part of my update). I think the problem is with $i*1e9%14e8;, the correct result of 31*1e9%14e8 is 200,000,000 and I get that on 64 bit builds where 31e9 is an integer, but on 32 bit builds it's 935,228,928 and I get the same output like you because of floating point errors :( \$\endgroup\$ – Fabian Schmengler Oct 19 '15 at 13:05
  • \$\begingroup\$ Oh well, so it produces the desired output only on a 64 bit system. I think that's absolutely fine. :) \$\endgroup\$ – insertusernamehere Oct 19 '15 at 13:36
2
\$\begingroup\$

Python 3, <= 64 bytes [Safe!]

The length of the string is 2034

488281245549883988617831547692636280774840973865020014963780603107176397111896466371318141671145799999516100116931775007357195385943921474836432356840327258293593328268244373089608827337244259136765312454003133867435356466747291945665131452813556182860860218727636513199372703748751775964829808191999995882592301095002084771021688666210978063483117859223581264272609313550818776145126277071553066533716607531245177459141211894859378720218443227215584306532297162157724461180923260303751492768257439729421254663312499999953317250470135192575597373141342613954121932341877988764443287222534689782349049589822587524093784585536128124558450454750616819589076506099226468592894493722831489207613738508380161381300843610672778874252672293311999995980758867671030407487171082133122351136004711631192092895451250470044131311210285791374389534671440085519551508377812451579347857531653079000271729656516751809167643331891701606391977349652432066205078262158363261572253921691562352979999952455639992082562005678372672183305842786281390032904410747023026684525733153218240423284129803473419539558263559570312453704347371323853998571474008654314614168447601734333514067334503992014034680022447274861749110375049318519655242879999955442585720255648590729575861052993076080133428436305995942336538807467336778737998817025960632277280651600727542990312457813159388868091344702678377735416228672524020138975906372029288081735639609252820049939625819171027941045148106288199999510988071352161135738504077117369852840612127100026831252796098139129398036689313362867460951379739562107142436353469314701837812451517225821015156551557938716150793921591665944009853171813660204517716847617231826616509655188296029879719407450187071999999999995206075501878221230403011972186886527880225232483852323193868364202388104593053245851065268425306380369872604520249690268019128124527576856135182837038224507291828459307030014607036933086603051264317374864588332629350176813354200221677344758284264135431219999953640857352723374082910431738430780077293947645370363

My code:

print("".join([str(int((i**6)/32-5))for i in range(50,225)]))

I think I made it to hard...

\$\endgroup\$
2
\$\begingroup\$

MATLAB, <= 8

I believe we are allowed to post another answer in the same question as long as it is not in the same range. My last one was 8<r<=16 by my understanding of the rules, so for this one:

String:

    [51x51 double]

Note: This will produce ans=, but that is not part of the output string, it is simply MATLAB saying where the output ends up - but based on the comment on my last answer it is important to know.


Now that this one is safe, the code used is:

logo;{L}

As a bonus, you also get a picture of the MATLAB logo. Running the logo script produces a variable named L. If you wrap this in {} you get a cell array which because there is no semicolon MATLAB prints out the size of its contents.

\$\endgroup\$
  • \$\begingroup\$ That is correct, since it is in a separate range \$\endgroup\$ – Daniel M. Oct 11 '15 at 17:37
  • 2
    \$\begingroup\$ In what sense is ans not part of the output? \$\endgroup\$ – feersum Oct 12 '15 at 7:33
  • \$\begingroup\$ So many ways to do this in 9 bytes... But 8...? \$\endgroup\$ – Stewie Griffin Oct 12 '15 at 8:02
2
\$\begingroup\$

Python, ≤ 64 bytes (safe)

range ≤ 64

output (1334 bytes)

cpKKhcKhcccpcE3lA!3 AKl!KllA cAlh  p!clAlhc!plhhE cpp3A33chEhKll ccphh  !3 l  lK!pEK3KhKEAK KK!3ph!c!3EKhKA!3AKp3lAK c3EpEp!33!EE Kl EAh!KAl3EhEccAA E3ppE3AA3pc  3pphEEK!A!!3cAhcpcEEc Al K3  33 hKpllplcKh3p3 phpAKE!Khcchp h 3 cc!hhc3EKpp!KcKcl  h!p!p3 l!clAlAch El!AE!pEhAlppAAhpK3chplApp!lApE!3 hAEKEp!AhKl3l Al3A3KEh!3 ElKK3pcp AppK33 !KKEphhpK3A EElp!lEEAEKKc h!h EhcpEEclKEp  lcllEK3lAK3E EK3KcA!cEpcpKKKllcEpAlEp!pKl3AKpAphhh!lhhhpAcKAAKlchcpA!lEhch3 hK3!l!cAcpA Ap cEl 3l ppAAAh A  !!EEKE !l!KhKEcKAc 3ch E!lhl3cAKElE3EAhlA33!pElA3c3lKl ! clp clAE3 AApA!c3cK Ac!c! hlhhhh!plcc! ppEE3chl 3!E!EE! AchpAlpAlEchchh3!lEhhEhhppK!EEE AKKEp!  lpp pKclhpAlAKA! lEAhhpAhE3 cpp!llllh lccKEcEhllKcEKEpEAcE!Ehlh3c!A 3l!EK  AAE 3 Ap3 Eplcl!!chlA3KEpE3KE!AhcKl3!p K E! KlAA3lEEKp !!p ph!!!!pA3pEK  3 c3lpp!A3!K3A! 3Kcl3pcA!AAAhA!cc!3!!Klh3 AEphppEcp3pccppAKlcpcl  pA!p!Ac3lAh!ll!phK3hKh!AAhh h!EK!pcAKhcpEAcEEEhKl lhhEpKpKlhAK3cA!!cphh!Kp c lhccEAhl3h3A! 3AElcEAlhhE hAlp3lEp E  3lEE!K3 hc3p p3 3lAlEK hKc3cEcKp   ph!K  !hhp!Alcpc3E p33 cEcplh33pA33h!pElhEc!hKEhcElcl!Ec3l3hphp! hEK 3AEAEhAplApAA! lppKApE3cEhplcclAcc3!!hA!lp3cp Kll!h!phhlllhl!clKEchElAlEcEKll p!3A KlK Kcp3EKEA!p33!c cAAAcAh3KE3K!AAhcE3hlcKhKK!! K!pE lEpcA lEl AElpEK 3EEpllA  hl  Ahl cA!ph phhp cAccK K!lp3 KhE3!Ehc  ! 3KEcc 3lE!c3KhEK EcAEApAAKK!ApEA!A c!A KE3 cl pKp l E

The code:

print(''.join(' Ac!hKlEp3'[int(i)]for i in str(2**4423-1)))

It exchanges the digit characters in the 20th Mersenne prime for some other characters.

\$\endgroup\$
  • \$\begingroup\$ Is this REPL or full program? \$\endgroup\$ – J Atkin Oct 15 '15 at 20:53
  • \$\begingroup\$ @JAtkin I looked up REPL but I'm still not sure what that would be in Python, so I'm going to guess it's considered a full program. \$\endgroup\$ – Status Oct 15 '15 at 22:36
  • \$\begingroup\$ The REPL in python is the python console. If your program is in its own file and it uses print, its probably a full program. \$\endgroup\$ – J Atkin Oct 16 '15 at 2:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.