574
\$\begingroup\$

This "sandbox" is a place where Code Golf users can get feedback on prospective challenges they wish to post to main. This is useful because writing a clear and fully specified challenge on your first try can be difficult, and there is a much better chance of your challenge being well received if you post it in the sandbox first.

Sandbox FAQ

Posting

To post to the sandbox, scroll to the bottom of this page and click "Answer This Question". Click "OK" when it asks if you really want to add another answer.

Write your challenge just as you would when actually posting it, though you can optionally add a title at the top. You may also add some notes about specific things you would like to clarify before posting it. Other users will help you improve your challenge by rating and discussing it.

When you think your challenge is ready for the public, go ahead and post it, and replace the post here with a link to the challenge and delete the sandbox post.

Discussion

The purpose of the sandbox is to give and receive feedback on posts. If you want to, feel free to give feedback to any posts you see here. Important things to comment about can include:

  • Parts of the challenge you found unclear
  • Comments addressing specific points mentioned in the proposal
  • Problems that could make the challenge uninteresting or unfit for the site

You don't need any qualifications to review sandbox posts. The target audience of most of these challenges is code golfers like you, so anything you find unclear will probably be unclear to others.

If you think one of your posts requires more feedback, but it's been ignored, you can ask for feedback in The Nineteenth Byte. It's not only allowed, but highly recommended! Be patient and try not to nag people though, you might have to ask multiple times.

It is recommended to leave your posts in the sandbox for at least several days, and until it receives upvotes and any feedback has been addressed.

Other

Search the sandbox / Browse your pending proposals

The sandbox works best if you sort posts by active.

To add an inline tag to a proposal, use shortcut link syntax with a prefix: [tag:king-of-the-hill]. To search for posts with a certain tag, include the name in quotes: "king-of-the-hill".

\$\endgroup\$
2
  • \$\begingroup\$ What if I posted on the sandbox a long time ago and get no response? \$\endgroup\$
    – None1
    Commented May 15 at 14:05
  • \$\begingroup\$ @None1 If you don't get feedback for a while you can ask in the nineteenth byte \$\endgroup\$
    – mousetail
    Commented May 29 at 13:27

4771 Answers 4771

1
154 155
156
157 158
160
-3
\$\begingroup\$

Stop the dance!

Your sister was at the hospital, but now she's fine, awfully, you lost a day of work, one of your most important days.

You work at your local television, and they have a contest, called "Stop the dance!", what is it about?: People is dancing, they have a big screen in the wall, while it says "Dance!", they have to dance, if it says "Stop!", they must stop, if you move, you lose.

You don't have internet at the studio, so you use some strange offline data sharing method. The day you weren't there, another programmer came, such a silly programmer! He made a "Reciever" program, basically, gets data, processes data and prints data in the Big Screen Wall.

The programmer was bored, so he made a way to get data, well, you don't know what way he choose! (Author comment: Let's assume he made all the possible ways. Cya.) Now you have to make a sender program, in any language, that sends data to that program using the protocol specified under this section.

You are an expert code golfer, so you decide that you must make the shortest code possible. (Another author comment: Any lang is allowed. Cya.)

How did I came out with this idea?

Having a shower, my friend...

Your task

You must make the shortest (and winner) code possible, that sends data to the reciever, using this protocol:

The reciever must recieve:

$displaytext:"<text here>";$instnm:<integer here>;

$displaytext corresponds to what it is going to be displayed on the Big Screen Wall.

$instnm corresponds to the number of the instruction, the count of things displayed, starts from 1.

Your program may take an input, and send the data, in any way (except the ones in Rules) to the Reciever. Remember there's no internet.

The winner will be the user with shortest bytes of code.

Rules

As a good code golfer, you may not:

  • You can't use program arguments to send the data.
  • It must be an application.
  • If you apply for the bonus, mind you have to make both programs, if not, just the sender.
  • The string you have to send it has to be STRICT, no different ones, if not, unvalid answer. (I decided to call that "Strict JASON Protocol", get the joke?)

Bonus

You can make the reciever program, and you get -1 byte. Not much, but k. (In bytes, you must not decrement your byte result, you must do: "n Bytes + Bonus")

Example Input and Output

Input:

From Sender program:

Dance! or Stop!

Protocol:

Inbetween both commands

$displaytext:"Dance!";$instnm:5

Output:

In Reciever program:

Dance! (9) or Stop! (187)

Overall objective:

Send data between two programs, without internet connection.

Edit: i can't post an example answer, because then i can give ideas of how to do this codegolf/puzzle, while the ideas are limited, i'm finding for the creativity of the user.

\$\endgroup\$
4
  • 9
    \$\begingroup\$ I have no idea what you're asking me to do. \$\endgroup\$ Commented Feb 3, 2016 at 21:26
  • \$\begingroup\$ It is pretty clear what is asking you to, is defined in Task (You must make the shortest (and winner) code possible, that sends data to the reciever, using this protocol), all the story and background is defined on Introduction. I dont see any hole on the post. \$\endgroup\$
    – TheCrimulo
    Commented Feb 3, 2016 at 22:11
  • \$\begingroup\$ @TheCrimulo Example answer? \$\endgroup\$
    – Xwtek
    Commented Feb 7, 2016 at 7:06
  • \$\begingroup\$ There is no Example, because you are just sending the same info you wrote in. If you type ´Dance!´, the output will be Dance! (n), n being the number of the sequence. The idea isn't to read input, and append (n) to it. You have to make it, in anyway (except command args/internet), dropping out the enoded data (input in the protocol), and, if necessary, make a reciever program, the reciever program its a bonus that discounts 1 byte, also, it can help you making your sender smaller. I can, i.e., make a file with the info on it. As explained, the reciever will read it. \$\endgroup\$
    – TheCrimulo
    Commented Feb 7, 2016 at 15:54
-3
\$\begingroup\$

Biggest single character

This challenge is simple, its like the challenges we've had before where the goal is to produce the biggest output one can. But in this one, you can only use one character in your code.

You get no input, your code has to be a single character (not byte), and the person with the largest output in byte wins, ties broken by posting time.

\$\endgroup\$
7
  • 5
    \$\begingroup\$ Doesn't this boil down to which language has the biggest output stored in a predefined variable? \$\endgroup\$
    – Denker
    Commented Apr 3, 2016 at 20:50
  • \$\begingroup\$ @DenkerAffe true. maybe i should make it 2 byte src code. that might allow some interesting stuff \$\endgroup\$
    – Maltysen
    Commented Apr 3, 2016 at 20:52
  • 1
    \$\begingroup\$ I think I would raise the char amount a bit more to allow for some competition between the same language. Also you should keep in mind that this rules out every non-golfing language. While this should be allowed per meta consensus, I am not sure how much the community likes this. \$\endgroup\$
    – Denker
    Commented Apr 3, 2016 at 20:58
  • \$\begingroup\$ G for pyth wins :D :D \$\endgroup\$
    – Leaky Nun
    Commented Apr 4, 2016 at 4:45
  • 3
    \$\begingroup\$ Befunge & co. would probably win via infinite output. If output has to be finite though, I wouldn't consider this a very interesting challenge since it would just be one big language hunt. \$\endgroup\$
    – Sp3000
    Commented Apr 4, 2016 at 10:27
  • \$\begingroup\$ Actually, N in Seriously wins. 11752 bytes output. \$\endgroup\$
    – user45941
    Commented Apr 6, 2016 at 4:06
  • \$\begingroup\$ @Mego Vitsy wins. 0 bytes, 11752 bytes of output. \$\endgroup\$ Commented Apr 7, 2016 at 17:07
-3
\$\begingroup\$

Alphabetization 101 (popularity contest)

Your task is to use all 52 letters of both the uppercase and lowercase alphabet, ONCE and ONCE only, and make a program.

You are free to use any other ASCII character more than once, or use a letter of the alphabet more than once if it's required for the language to function.

Meta:

  • Not sure if this has been done before.
  • Any questions regarding the task?
\$\endgroup\$
5
  • \$\begingroup\$ Not really meta: Is there any place I can go to (like a chat or something) to post a question about BF? StackOverflow probably isn't suitable. \$\endgroup\$
    – clismique
    Commented Apr 17, 2016 at 6:48
  • 1
    \$\begingroup\$ Come to our chatroom! :) \$\endgroup\$
    – Leaky Nun
    Commented Apr 17, 2016 at 6:50
  • 3
    \$\begingroup\$ I would vote to close this as too broad. It's not a particularly interesting restriction per se, and it certainly doesn't make a good question without some restriction on the task to be performed. \$\endgroup\$ Commented Apr 17, 2016 at 14:07
  • \$\begingroup\$ @PeterTaylor That's why it's a popularity contest, though - it lets the people decide whether the program made is good or not. What WOULD be a good restriction on the task? \$\endgroup\$
    – clismique
    Commented Apr 18, 2016 at 1:40
  • \$\begingroup\$ The popularity-contest tag is not an excuse for a broad challenge. "Write a program that does anything..." is pretty much the definition of "too broad", regardless of any source code restriction put on the program. So at least you should choose a specific task. Could be anything really, but if it relates to the restriction it might be more interesting (e.g. a pangram checker). Even so, I agree with Peter that the restriction isn't particularly interesting. There are tons of languages where it's trivial to avoid unwanted letters and then include the remaining ones in a string or comment. \$\endgroup\$ Commented Apr 21, 2016 at 7:04
-3
\$\begingroup\$

Why did I come to Sandbox?

I have a very specific challenge, and I wanted to see if it was too specific.

The challenge is to output "Valdosta ACM" using the shortest number of characters with the BrainF**k programming language.

I've noticed it isn't the norm to specify a programming language on this domain, so I've come here to get feedback on whether or not this is acceptable.


Introduction

As a challenge to the members of my local Association for Computing Machinery(ACM) chapter, I asked them to produce the shortest Brainf**k code that would output "Valdosta ACM".

This was a very fun challenge for all of our members, and we got very competitive! I was impressed with the solutions turned in, but I wondered if it was possible to beat our best solution. Surely it's possible, but who could do it?

Challenge

Output the string "Valdosta ACM".

Stipulations:

  • Use only the Brainf**k programming language (you can test your code here)

  • No input can be accepted by your program

  • Your program must halt

  • The space in the string must be ASCII character #032.

These are the ASCII values of each character, as they appear in the string, for convenience:

 086 097 108 100 111 115 116 097 032 065 067 077

The winner is determined by the shortest code, by character count.

Example Input and Output

Input:

NO input is allowed

Output:

Valdosta ACM

\$\endgroup\$
5
  • \$\begingroup\$ Welcome to Programming Puzzles & Code Golf! Thanks for using the Sandbox. :) A few things to note: 1.) Generally we discourage language-specific challenges, 2.) typically code golf is scored by bytes rather than characters, and 3.) printing a fixed string like this would be insufficiently different from the Hello, World! challenge to avoid it being closed as a duplicate. \$\endgroup\$
    – Alex A.
    Commented Apr 25, 2016 at 3:38
  • \$\begingroup\$ Thanks Alex! Since I want to compare the results of my local competition with the results of the challenge here, is there anything I could change about the challenge to make it acceptable? I don't see a way to do this, but I was so excited about seeing if anyone here could do better than our coders. And thanks for the warm welcome! :) \$\endgroup\$
    – Matt C
    Commented Apr 25, 2016 at 3:48
  • \$\begingroup\$ You could look at Brainf**k solutions to other challenges (like this one), and see if the techniques used there can help you improve your solution. \$\endgroup\$
    – ugoren
    Commented Apr 25, 2016 at 7:09
  • \$\begingroup\$ We also have a tips question that may be of interest. \$\endgroup\$ Commented Apr 26, 2016 at 6:30
  • 2
    \$\begingroup\$ Although this particular challenge is probably too similar to "Hello, World!" (as Alex pointed out), if you had a different challenge that you wanted to see solutions for in a specific language, you can still post it but just allow all languages to compete. If you don't see solutions in your specific language you can post a bounty for that language to encourage it. \$\endgroup\$ Commented Apr 26, 2016 at 6:33
-3
\$\begingroup\$

The FitnessGram™ Code Golf Test

Same concept and rules to the well-known Rick Astley post a while back, only instead of using samples of various sizes, sample length is limited to what number sample it is. And different text for the program to write.
It's code golf, so standard loopholes apply, and fewest bytes wins.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Closed as a dupe. And/or unclear. \$\endgroup\$
    – Riker
    Commented May 19, 2016 at 20:04
  • \$\begingroup\$ Paragraphs of text are boring for compression. Unless there's some particular structure in the text, the same techniques apply to all of them. \$\endgroup\$
    – xnor
    Commented May 19, 2016 at 20:07
  • \$\begingroup\$ First off, thank you for using the Sandbox before posting on main. That said, I don't understand what your challenge is supposed to be: what is the sample length? What is a sample? In addition to that, if this challenge winds up being "print some fixed string" then it is a duplicate of the rick astley post, as the techniques used for compression will be identical. \$\endgroup\$ Commented May 19, 2016 at 20:09
  • \$\begingroup\$ we want to give them a challenge, not a flashback.... \$\endgroup\$
    – user56309
    Commented Aug 4, 2016 at 19:42
  • \$\begingroup\$ This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. \$\endgroup\$
    – user58826
    Commented Jun 9, 2017 at 14:12
-3
\$\begingroup\$

Obfuscate your program

In this challenge, you must create a program which does something but you need to obfuscate it so that it becomes hard to understand (so don't explain it in your post).

It can accept anything as input and output anything.

Score

The shorter program (in bytes) which hasn't been understood wins.

Example

Can you guess what does this code calculate?

var t=1e5,s=t/1e4,n=s*0.1,i=n*s*7.5,r=!true,b=1,t='01'.split('').map(c=>parseInt(c)).concat(Array(i).join('.').split('.').map(m=>{a=r+b;(r=b)&&(b=a);return a})),t=t.join('').length,b=s,t=r,s=4+NaN;

Rules

  • You should say what language you used
  • You must not use any obfuscation tool
\$\endgroup\$
2
  • 3
    \$\begingroup\$ At a minimum, you should state an actual objective: "obfuscate a program that does x". Otherwise it's just too broad and will likely be closed as such. You'll also need something else to explain the scoring, since "shortest that isn't understood" seems odd to me. Understood when? How do you show that it hasn't been understood? Do you mean something like Cops and Robbers?. \$\endgroup\$
    – Geobits
    Commented Jun 4, 2016 at 19:06
  • \$\begingroup\$ This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. \$\endgroup\$
    – user58826
    Commented Jun 9, 2017 at 14:12
-3
\$\begingroup\$

"01_firstHole" Challenge for Performance Golf

First there was code golf. Now, there is Performance Golf. FORE!

Motivations

This is a crowd-sourced approach to easier and better performance troubleshooting. Performance problems are everywhere, so java technicians need access to easy-to-use diagnostic tools at every step of the SDLC.

How to play?

  1. Start by installing the live demonstrations of Java Performance Problems in this repo.

  2. Pick one of the six holes of golf to play. You can do this by picking one of the six numbered folders in the repo. This particular codegolf.stackexchange.com challenge is for the 01_firstHole.

  3. One at a time, run the 'a' load test and the 'b' load test for the hole you selected. The a & b tests are two different implementations of the same REST/SOA service. See the 'installing' link, above, for how to run the tests.

  4. Compare the performance of the two tests, a & b. Which has better response time / throughput?

  5. Using the least amount of tooling/instrumentation, identify the performance problem of the slower test. Hook it up your self and run the tests.

  6. At codegolf.stackexchange.com, there is one "Stack Exchange Challenge" for each hole of golf. Post the following two things for your solution to that challenge:

    • Post a description of the tools/techniques you used to detect the performance problem. Must be detailed enough so that others can reproduce your work. Performance golf always compares two different loads -- a & b. The solution must identify the inefficient code in the slower of the two examples. It must also show the absence of that inefficient processing in the faster of the two examples.
    • Tally the number of strokes for your approach, using the "Scorecard" below. All solutions must specify the # of strokes incurred, and it must be specified in the answer heading/title.
  7. Upvote the solutions that best identify the performance problem and have the fewest strokes (see Scorecard, below). Similar solutions on different platforms (Mac/Linux/MS-Win) deserve roughly the same number of upvotes.

Scorecard

This scorecard determines the approach with the least amount of tooling/instrumentation. Lowest score wins!

  • 1 stroke if JVM restart is required to hook up your monitoring tool of choice.
  • 1 stroke for any tool with any $$ licensing cost.
  • 1 stroke for every separate install process. No strokes for JVM and pre-installed OS tools.
  • 1 stroke for tools/techniques specific to a particular Database vendor. Ex: Oracle AWR report. Even ‘EXPLAIN PLAN’ solutions are proprietary.

Example One -- zero strokes :-D

This example does not use this github repo, but it will give you the general idea.

This solution to solving a high CPU problem would get lowest=best instrumentatin score: zero strokes. Only JVM and OS tools are used (thread dump and top -H). There are no tool license costs and a JVM restart was not required for the thread dump.

Example Two -- 3 strokes :-(

This example also does not use this github repo, but it will give you the general idea of what we mean by the best troubleshooting with the least tooling/instrumentation.

A modern, commercial profiler (YourKit, JProfiler, etc...) would easily solve the high CPU problem in example 1. But look how many strokes (1+1+1=4!) are taken off with this approach: * 1 stroke because a JVM restart is required to hook up the tool * 1 stroke because there are licensing costs. * 1 stroke to install profiling the tool

\$\endgroup\$
8
  • 2
    \$\begingroup\$ Answers in this site normally involve writing code, so this doesn't really appear to be on topic. \$\endgroup\$
    – feersum
    Commented Jun 16, 2016 at 7:43
  • \$\begingroup\$ Thanks for using the sandbox! I do however, see some problems with this challenge. For one, I think you would need to clarify a lot of the stroke criteria, as something like "rarely used" is pretty subjective. In addition, there doesn't seem to be a way to enforce a person to not use a high level tool, and then after figuring out the problem finding it again with a more basic tool. Even further, why couldn't someone look at another answer and then reuse their data to get a better score? cont... \$\endgroup\$ Commented Jun 16, 2016 at 13:22
  • \$\begingroup\$ After all that, there doesn't seem to be an objective winning criterion, unless it is number of strokes. If number of strokes determines the winner, then won't there be many ties? I think you would need something more granular. \$\endgroup\$ Commented Jun 16, 2016 at 13:24
  • \$\begingroup\$ Sounds like I need to work on the "rarely used" part mentioned by @FryAmTheEggMan. Regarding the same commenter's comments about the high-level tool and the basic tool. That is part of the natural progression of monitoring. We learn to do it one way, then we learn a better, less intrusive, less expensive way. As long as the user of the basic tool is "detailed enough so that others can reproduce your work", who cares how much refinement was involved? \$\endgroup\$ Commented Jun 16, 2016 at 22:45
  • \$\begingroup\$ Regarding @FryAmTheEggman's question of "many ties". I look at auction sites like eBay as reasonable crowd-sourced arbiters of value of a given object for sale. I was hoping the voters would provide that kind of assessment, but I see where lack of objectivity could cause cronyism and perhaps other problems. Could someone point me to codegolf tolerance/lack of for ties? I'll try to work on that. \$\endgroup\$ Commented Jun 16, 2016 at 22:48
  • \$\begingroup\$ @FryAmTheEggman, you mentioned that my "rarely used" criteria was pretty subjective. That's a good call, so just edited / removed that. \$\endgroup\$ Commented Jun 18, 2016 at 21:36
  • \$\begingroup\$ @FryAmTheEggman, the "many ties" concern could also looked at from a different perspective -- that Performance Golf will provide a very useful "catalog" of answers. This "catalog" concept got 18 upvotes here. \$\endgroup\$ Commented Jun 18, 2016 at 21:43
  • 4
    \$\begingroup\$ The catalogue concept is a failed experiment, and your mention of it is one of the reason why. "It's a catalogue question" should not be used to justify why a question should be closed even though it's off-topic and wouldn't have an effective scoring mechanism even if it were on-topic. \$\endgroup\$ Commented Jun 19, 2016 at 13:31
-3
\$\begingroup\$

Make a Fork Bomb

under construction, please constructively (no pun intended) criticize

Create a program which forks itself at twice and exits, or forks itself once and idles. Whether it continues forever or exits is your choice. Forks can be OS forks or simply a command to relaunch the program.

Rules

  • No spoon bombs allowed, please.
  • Don't make any assumptions about the location of the program.

Bash, 10 chars

./$0|./$0&

Acts as a standard punching bag for other solutions.


Microsoft Windows Batch file, 5 chars

 %0|%0

Anybody who beats this one gets a million internet points. (and maybe a bounty)

\$\endgroup\$
3
  • 4
    \$\begingroup\$ I assume that the downvote is because someone considers that this violates our policy on malicious code. I think it's borderline, but if it's on the right side of the border then the question has other issues. 1. Why fork itself at least twice? Surely forking once is enough for a fork bomb? 2. Define "OS forks" in a way which doesn't rely on the OS being POSIX. Or, better, remove that requirement: it seems to me to limit the languages permitted more than necessary for no benefit. 3. What's a spoon bomb? Google is not being helpful. \$\endgroup\$ Commented Jul 14, 2016 at 13:49
  • \$\begingroup\$ @PeterTaylor 1. the chat said it was fine 2. If you only fork once and exit, you have a constant amount of processes 3. Good idea. Any tips for windows forks? 4. it's a joke \$\endgroup\$ Commented Jul 14, 2016 at 16:38
  • \$\begingroup\$ I'm downvoting because I think it's close enough to malicious. A fork bomb can hang a computer. \$\endgroup\$
    – mbomb007
    Commented Jul 22, 2016 at 19:27
-3
\$\begingroup\$

Stump The Golfing Languages

This is the seed of an idea. I'm unclear on the details that might make it work.

I want people to submit answers in the form of a program in a "normal" language (defined how?), such that reproducing its functionality in a golfing language isn't much smaller. That is, I want to find the algorithms that Jelly and Pyth and Matl and such are not optimized for.

I would appreciate suggestions on how to make this work. Maybe cops and robbers? Maybe each entry just contains two programs, and comments are given to help golf the smaller one?

\$\endgroup\$
7
  • \$\begingroup\$ The only language that could possibly win is mathematica \$\endgroup\$ Commented Aug 23, 2016 at 1:52
  • 2
    \$\begingroup\$ Related: Anti-golfscript anti-golf: create a task where GolfScript or J is outgolfed by your (conventional) lang closed \$\endgroup\$
    – Dennis
    Commented Aug 23, 2016 at 1:53
  • 2
    \$\begingroup\$ It's very easy to come up with boring examples e.g. print this exact trace, reproduce the output of this random number generator, etc. I don't see any way to get interesting answers. \$\endgroup\$
    – feersum
    Commented Aug 23, 2016 at 6:31
  • \$\begingroup\$ @feersum I'd probably disqualify errors and crashes and stacktrace outputs and such, and maybe all built-in non-trivial algorithms. Thanks for pointing those out. \$\endgroup\$
    – Sparr
    Commented Aug 24, 2016 at 7:26
  • \$\begingroup\$ @DestructibleWatermelon you don't have to beat the golfing language to win. The winning entry will probably still have a shorter Jelly solution than Python (or whatever). \$\endgroup\$
    – Sparr
    Commented Aug 24, 2016 at 7:27
  • \$\begingroup\$ I don't know of any golfing languages where creating a simple webserver is possible. All this would be is finding a task that isn't normally required for when doing code-golf \$\endgroup\$
    – Blue
    Commented Aug 24, 2016 at 14:16
  • \$\begingroup\$ I'm thinking of restricting it to algorithms and output, not stuff like network and file access. \$\endgroup\$
    – Sparr
    Commented Aug 24, 2016 at 22:11
-3
\$\begingroup\$

Draw "Stack Exchange"

Stack Exchange has many site (159) and It has a logotype too. Anyway, In this challenge you'll need to draw Stack Exchange in the most shortest way.

This is a code-golf. challenge.

Rules

  1. Have fun!
  2. You've to draw Stack Exchange, you can't use Paint or something like that, you can't use libraries.
\$\endgroup\$
3
  • \$\begingroup\$ Challenges that start with "Most creative" are almost certainly guaranteed to not generate creative answers (or any answers for that matter) \$\endgroup\$
    – Fatalize
    Commented Sep 8, 2016 at 13:47
  • \$\begingroup\$ @Fatalize I changed the challenge. \$\endgroup\$
    – Rizze
    Commented Sep 8, 2016 at 13:54
  • \$\begingroup\$ Now there is basically no interesting solution possible to the challenge, because there is no patterns in Stack Exchange. So all shortest solutions will to print that string directly or a compressed version of it. \$\endgroup\$
    – Fatalize
    Commented Sep 8, 2016 at 13:58
-3
\$\begingroup\$

Open the browser, polyglot edition.

Your job is to open a browser window of the default browser to https://codegolf.stackexchange.com in as many languages as possible.

Your code must open the browser itself, and cannot rely on an open one.

Rules

  • Versions of the same language are considered a single language
\$\endgroup\$
2
  • 1
    \$\begingroup\$ Define "default browser" in the context of non-Windows OSes. \$\endgroup\$ Commented Sep 25, 2016 at 21:47
  • 3
    \$\begingroup\$ @PeterTaylor Whatever browser the open command works with. There was a previous version of this challenge, it worked then. \$\endgroup\$ Commented Sep 25, 2016 at 22:24
-3
\$\begingroup\$

Mad lads!

Inspired by the paper calculator episode of Numberphile.

Your challenge in this puzzle is to take in two two-bit (0-3) numbers and output the sum of the two numbers... using ordinary household objects.

Some possibilities of how this can be done:
Dominoes
Paper
Marbles
music box (+ some helpers..)

Input:

input must always be involving two sets of two-bit integers, which can be represented by anything you like, so long as the cardinality of the representations is the same.

Output:

The output should be a single 3-bit integer which represents the addition of the two inputs.

Rules:

  • your device cannot have the capability to connect to the internet in any way (sorry, this also disqualifies carrier pigeons). Your device must also not be able to perform this function alone (eg a calculator).
  • It must be somewhat original. put your own twist on it!
  • though, your entry can be alive (does your dog add??), so long as your entry is not in discomfort.
  • Pictures are required for each entry to show how it works. videos would be better, but aren't required!
  • The sole function of your machine does not have to be adding, it can do other things as well. This means that older projects that may serve a slightly different function are welcome, so long as they meet the rules stated above.
  • Your device can be as simple or as complex as you like, so long as it doesn't get to a point where it's completely esoteric.

Judging:

You will be judged based on ease of use, ease of understanding, as well as originality! This means that entries should be easily explained, used, and be unique in some way.

This is a , so the most upvotes wins! good luck!

\$\endgroup\$
7
  • 2
    \$\begingroup\$ In my opinion, this is not a programming challenge. Once we start leaving the realm of a computer-based programming paradigm, a challenge becomes more difficult to test, replicate, and verify. Plus, something done with Dominoes, for example, may not "run" to completion 100% of the time, and in my opinion that makes it non-deterministic. \$\endgroup\$
    – mbomb007
    Commented Sep 26, 2016 at 18:43
  • \$\begingroup\$ Related meta: meta.codegolf.stackexchange.com/a/10151/34718. TLDR, if you want to program with dominoes, find or create a domino simulator where programs can be scored in bytes. Instead of marbles, use Marbelous. \$\endgroup\$
    – mbomb007
    Commented Sep 26, 2016 at 18:52
  • \$\begingroup\$ @mbomb007 what about papers, and counting dogs? This isn't a code golf, it's a popularity contest \$\endgroup\$
    – user56309
    Commented Sep 26, 2016 at 19:20
  • 2
    \$\begingroup\$ Popcons still require the use of programming languages. meta.codegolf.stackexchange.com/q/2028/34718. See both linked meta questions. What you are trying to do is off-topic for this site. \$\endgroup\$
    – mbomb007
    Commented Sep 26, 2016 at 19:42
  • \$\begingroup\$ @mbomb007 I'm not sure you linked the correct thing. I have found no reference of popularity contests in your recent link.. \$\endgroup\$
    – user56309
    Commented Sep 26, 2016 at 19:44
  • \$\begingroup\$ Rules and meta consensus apply to all challenges, not just code-golf. \$\endgroup\$
    – mbomb007
    Commented Sep 26, 2016 at 20:21
  • \$\begingroup\$ Popcons should be held to a higher standard than other questions, not a lower one as your comments imply. \$\endgroup\$ Commented Sep 27, 2016 at 7:33
-3
\$\begingroup\$

99 selttob fo reeb no eht llaw

I teb ev'uoy lla draeh tuoba eht doog 'lo 99 selttob fo reeb no eht llaw. Llew ti os sneppah taht I emoc morf na evitanretla esrevinu - eht esrevinu erehw ew etirw gnihtyreve ni esrever! Ew peek eht snoitisop fo lanigiro hguoht. Siht osla snaem reporp noitazilatipac fo tsrif (ekil rettel ni siht txet). Ruoy egnellahc si ot etirw a margorp taht stuptuo eht lausu 99 selttob fo reeb no eht llaw, tub ni esrever (ni ruo egaugnal uoy dluow llac ti 99 bottles of beer on the wall). Siht si a ytiralupop tsetnoc, os teg evitaerc dna yrt ot sserpmi eht dworc. Doog kcul!

I bet you've all heard about the good ol' 99 bottles of beer on the wall. Well it so happens that I come from an alternative universe - the universe where we write everything in reverse! We keep the positions of original though. This also means proper capitalization of first letter(like in this text). Your challenge is to write a program that outputs the usual 99 bottles of beer on the wall, but in reverse (in our language you would call it 99 selttob fo reeb no eht llaw). This is a popularity contest, so get creative and try to impress the crowd. Good luck!

Elpmas fo derised tuptuo:

Sample of desired output:


99 selttob fo reeb no eht llaw, 99 selttob fo reeb. Ekat eno nwod dna ssap ti dnuora, 89 selttob fo reeb no eht llaw.

89 selttob fo reeb no eht llaw, 89 selttob fo reeb. Ekat eno nwod dna ssap ti dnuora, 79 selttob fo reeb no eht llaw.

...

1 elttob fo reeb no eht llaw, 1 elttob fo reeb. Ekat eno nwod dna ssap ti dnuora, on erom selttob fo reeb no eht llaw.

On erom selttob fo reeb no eht llaw, on erom selttob fo reeb. Og ot eht erots dna yub emos erom, 99 selttob fo reeb no eht llaw.

\$\endgroup\$
8
  • 3
    \$\begingroup\$ There's no need for the reversed text in the description - it distracts the viewer from the challenge at hand. \$\endgroup\$
    – clismique
    Commented Oct 21, 2016 at 12:06
  • \$\begingroup\$ @Qwerp-Derp I wanted to make this a bit more "unique" and "immersing", so I thought about giving the reversed description(I like it). I also included original text(although in spoilers), but I was also wondering about distracting readers. Do you have some other idea on how to keep both versions without making it look obscure? \$\endgroup\$ Commented Oct 21, 2016 at 12:10
  • 2
    \$\begingroup\$ 1. This should not be a popularity-contest. 2. It's fundamentally a duplicate of codegolf.stackexchange.com/q/64198/194 . 3. If you're going to muck around with the question text, write a program that mucks it around correctly. "elpmaS" doesn't follow the specified transformation rule. \$\endgroup\$ Commented Oct 21, 2016 at 12:34
  • \$\begingroup\$ @PeterTaylor 1. why not? 2. It's not. You can't simply reverse, and counting is a bit different. \$\endgroup\$ Commented Oct 21, 2016 at 13:24
  • 2
    \$\begingroup\$ Do X creatively popularity contests have fallen out of scope. This will get closed if posted on main. \$\endgroup\$
    – Dennis
    Commented Oct 21, 2016 at 13:46
  • \$\begingroup\$ @Dennis Damn, too bad. I guess I won't be posting it then, it's boring "shortest code". \$\endgroup\$ Commented Oct 21, 2016 at 14:16
  • 2
    \$\begingroup\$ What does this add to the original '99 bottles of beer on the wall'? \$\endgroup\$
    – 0WJYxW9FMN
    Commented Oct 21, 2016 at 20:54
  • \$\begingroup\$ This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. \$\endgroup\$
    – user58826
    Commented Jun 9, 2017 at 14:08
-3
\$\begingroup\$

Best n out of 2n - 1

Challenge:

This one should be relatively simple. Output this exact text:

Best [n] out of [2n - 1].

given n as an input.

Input:

Just the integer n, can be from stdin or as an argument. n will always be greater than 0.

Output:

The exact text above. Trailing spaces/newlines are allowed.

Rules:

This is , so shortest code in bytes wins. Standard loopholes are forbidden.

Meta:

Is this too simple? What other tags should be included, ?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Seems like a dupe of 2spooky4me, just with a different operator. \$\endgroup\$
    – Geobits
    Commented Nov 1, 2016 at 17:52
  • 1
    \$\begingroup\$ Your wording specifies "this exact text" while I think your intent is "Best 5 out of 9." or the like. \$\endgroup\$ Commented Nov 1, 2016 at 17:53
  • \$\begingroup\$ @Geobits Aha, I knew I remembered a similar challenge. Just forgot the exact name, so I thought maybe I was just imagining things after I tried to find it. My bad. \$\endgroup\$
    – Yodle
    Commented Nov 1, 2016 at 17:55
-3
\$\begingroup\$

Google Home / Amazon Echo - Turing complete?

Your challenge is to try to make a turing machine based on Google Home and Amazon Echo, see this video.

You must describe how to set up the machine, and how to give it input.

You must also describe a program for integer addition. It should compute 1+1 to be 2, 200+55 = 255, 200+56 = 0, and so on for all other combinations of 2 8-bit integers.

\$\endgroup\$
11
  • \$\begingroup\$ It's basically not possible... \$\endgroup\$ Commented Dec 2, 2016 at 19:52
  • \$\begingroup\$ VTC as unclear and too broad. What are you even expecting as an answer? \$\endgroup\$
    – Riker
    Commented Dec 2, 2016 at 19:52
  • \$\begingroup\$ @EasterlyIrk A set of commands that send the 2 computers into infinite loop, reading commands endlessly from a list of commands for the other to run, eventually processing a computer program and finally calculating the answer to the universe. \$\endgroup\$
    – SoniEx2
    Commented Dec 2, 2016 at 20:14
  • \$\begingroup\$ @TùxCräftîñg Why not? I mean other than that we have yet to prove their turing-completeness. \$\endgroup\$
    – SoniEx2
    Commented Dec 2, 2016 at 20:14
  • \$\begingroup\$ @SoniEx2 so only 1 of each computer? And what defines a command? \$\endgroup\$
    – Riker
    Commented Dec 2, 2016 at 20:16
  • \$\begingroup\$ @EasterlyIrk A command is anything that starts with "Hey google" or "Alexa" and triggers a successful response on either of the computers. \$\endgroup\$
    – SoniEx2
    Commented Dec 2, 2016 at 20:19
  • \$\begingroup\$ Are we allowed to program the Echo and Google device? If so this is trivial. If we're supposed to construct a sentence that winds up having the devices compute using existing services like the calendar in the video, there are plenty of web sites that can process a variety of languages and read back the solution. Echo has basic math built in. \$\endgroup\$ Commented Dec 2, 2016 at 21:09
  • \$\begingroup\$ I really hope this can be tweaked into a challenge because the youtubes would be awesome. \$\endgroup\$ Commented Dec 2, 2016 at 21:12
  • \$\begingroup\$ @wyldstallyns tbh I have no idea what I'm doing... But yes, you're allowed to program both of them. \$\endgroup\$
    – SoniEx2
    Commented Dec 2, 2016 at 22:51
  • \$\begingroup\$ A question should ideally be self-contained. In this case the APIs for Google Home (whatever that is) and Amazon Echo (whatever that is) probably won't fit in the question, but an overview and links to the APIs would. \$\endgroup\$ Commented Dec 2, 2016 at 23:03
  • \$\begingroup\$ @PeterTaylor This isn't a matter of APIs. This is a matter of voice commands. \$\endgroup\$
    – SoniEx2
    Commented Dec 3, 2016 at 0:19
-3
\$\begingroup\$

Make a Simple GUI application

I have made a simple glade layout. The chalenge is to remake it in as few bytes as possible.

The glade file:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
  <requires lib="gtk+" version="3.20"/>
  <object class="GtkApplicationWindow">
    <property name="can_focus">False</property>
    <property name="title" translatable="yes">Remake me!</property>
    <child>
      <object class="GtkBox">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkButton">
            <property name="label" translatable="yes">hello</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkLabel">
            <property name="visible">True</property>
            <property name="can_focus">False</property>
            <property name="label" translatable="yes">world</property>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">1</property>
          </packing>
        </child>
      </object>
    </child>
    <child>
      <placeholder/>
    </child>
  </object>
</interface>

\$\endgroup\$
1
  • \$\begingroup\$ This probably doesn't break any rules, but it also doesn't seem that fun. It would be preferable if it was a more substantial task than simply golfing the code you already wrote. \$\endgroup\$
    – Wheat Wizard Mod
    Commented Feb 18, 2017 at 2:09
-3
\$\begingroup\$

Rock Paper Scissors Lizard Spock

This game is from The Big Bang Theory, an extended version of the classic Rock Paper Scissors game.

Objective

To create a full program that I can run to play Rock Paper Scissors Lizard Spock against an "AI". The opponent ("AI") will pseudo-randomly choose their option after receiving user input.

The program must be run with user input of the following;

| Input     | Meaning   |
|-------    |---------- |
| R         | Rock      |
| P         | Paper     |
| S         | Scissors  |
| L         | Lizard    |
| SP        | Spock     |

The game is played with the following rules that Sheldon tells us;

Scissors cuts Paper

Paper covers Rock

Rock crushes Lizard

Lizard poisons Spock

Spock smashes Scissors

Scissors decapitates Lizard

Lizard eats Paper

Paper disproves Spock

Spock vaporises Rock

Rock crushes Scissors

enter image description here

Once you've taken user input, psuedo-randomly chosen the AIs option, you must output either "Player wins (<<user_input>> vs <<ai_input>>)" or "AI wins (<<user_input>> vs <<ai_input>>)". In the event of a tie (both the user and AI choose the same options), you must output "It's a tie"

Sample Runs

//Player chooses Scissors (S)
//AI chooses Paper (P)
$ php -f rpslsp.php S
Player wins (S vs P)

//Player chooses Spock (SP)
//AI chooses (R)
$ php -f rsplsp.php SP
Player wins (SP vs R)

//Player chooses Lizard (L)
//AI chooses Scissors (S)
$ php -f rsplsp.php L
AI wins (L vs S)

//Player chooses Lizard (L)
//AI chooses Lizard (L)
$ php -f rsplsp.php L
It's a tie

Rules

  • Standard loopholes apply.
  • The computer must choose an input at random (pseudo random) so that on each program run, the AI chooses (in a perfect world) a different input and that each input has the same percentage of being chosen.

This is code-golf so the shortest code in bytes wins.

\$\endgroup\$
5
  • \$\begingroup\$ "A full program" means that we're not allowed to return the result from a function? Must it be a full program?? \$\endgroup\$
    – Mr. Xcoder
    Commented Mar 13, 2017 at 12:55
  • \$\begingroup\$ @Mr.Xcoder What I mean is we are able to run it in environments like TIO or REPL.it \$\endgroup\$
    – ʰᵈˑ
    Commented Mar 13, 2017 at 13:01
  • \$\begingroup\$ 1. It's not true that the game is from BBT. BBT made a cultural reference to a preexisting game. 2. The output spec is incomplete because it doesn't say what to do in the case of ties. \$\endgroup\$ Commented Mar 13, 2017 at 14:32
  • \$\begingroup\$ @PeterTaylor Ah, I've only known the game exists because of TBBT, though the origin of the game doesn't really affect anything except maybe tread on the toes of some serious competitive RSPLSP players. Thanks for reminding me about it being a tie. \$\endgroup\$
    – ʰᵈˑ
    Commented Mar 13, 2017 at 14:36
  • \$\begingroup\$ Closely related. Less closely related. \$\endgroup\$
    – DLosc
    Commented Mar 17, 2017 at 19:42
-3
\$\begingroup\$

Fastest Compiling Fibonacci Sequence

Your task is to create a program which takes one numerical input and outputs all numbers in the Fibonacci sequence up to that point. However, you will not be scored on its bytecount or how many upvotes it gets. You will be scored on how quickly the compiler can compile it.


Rules

  • Of course, compiled languages are the only languages allowed.
  • All answers are tested on an Amazon EC2 instance with an Intel Xeon at 2.4GHz, about 1 GB of ram, and Amazon Linux installed. You can time your program on an equivalent machine, but I will compare results.
  • Your program is allowed to produce warnings when compiled, but it should work properly when run.
  • Compile time is tested with the time command, and "real" time is used for the final score.
  • If I need to comment the amount of time you took, you should add it to your answer.
  • Of course, standard loopholes are strictly disallowed.

This is , so may the cleverest optimization win and the best programmer prosper...

\$\endgroup\$
4
  • 1
    \$\begingroup\$ For a trivial challenge like this the compilation time is going to be dominated by noise: whether the compiler is in the disk cache is going to be more important than the code submitted. \$\endgroup\$ Commented Aug 14, 2017 at 8:05
  • \$\begingroup\$ To make compile times longer, you could require for the compiled program to work in O(1), or constant time. Then, the compiler will have to hardcode the entire sequence (up to a point specified by you, e.g. the largest 32- or 64-bit Fibonnaci number), which could make for interesting template-based programming optimization. \$\endgroup\$
    – Sanchises
    Commented Aug 14, 2017 at 10:41
  • \$\begingroup\$ @Sanchises, not true. Binet's formula will do the job in O(1). \$\endgroup\$ Commented Aug 14, 2017 at 11:08
  • \$\begingroup\$ @PeterTaylor of course. So, another sequence which is proven not to have a direct formula could make this challenge possibly salveagable. \$\endgroup\$
    – Sanchises
    Commented Aug 14, 2017 at 11:11
-3
\$\begingroup\$

Be typically flexible efficiently

Write a short function that returns outputs of different types in a non-boring way. If L is the length of your code and T is the number of different types returned, your score is (T−1)/L. The highest score wins.

  • The function must take exactly one argument and be deterministic, i.e., the output depends only on the input.

  • Obviously your programming language must have an official notion of type, by which each object has a unique, clearly identified type. Typically this would manifest in a type or typeof function returning an object’s type. Also, it must obviously allow functions to have differently typed returns.
    If there are many separate typing systems in your language, you have to pick one (conforming with the above) and stick to it.

  • The function must not employ any conditional constructs or other language features whose primary purpose is to handle logic, such as if statements, loops, or logical conjunctions. (Obviously, employed predefined functions need not adhere to this.)

  • All inputs needed to produce the outputs used for scoring as well as any elements of container structures must adhere to the following:

    • They are all of the same type.
    • If they are functions or otherwise callable (and actually called in your program), they must consistently return objects of the same type.
    • They must not be classes, type identifiers, or similar.
    • If they are strings, they are treated (with respect to these rules) as any obvious interpretation of them as code, class names, or similar.
    • If they are containers themselves, their elements must adhere to these rules when taken together.

    So, e.g., in Python the following are invalid:

    a = lambda i: [ 0, 0., [], {}, (0), {0} ][i]
    b = lambda i: [ int, float, list, dict, tuple, set ][i]()
    c = lambda i: [ [0], [0.], [[]], [{}], [(0)], [{0}] ][i][0]
    d = eval   # using "0", "0.", "[]", "{}", … as input
    e = lambda i: eval( ["0","0.","[]","{}","(0)","{0}"][i] )
    

    This also applies to containers generated during by the function during its execution. (Obviously, this does not apply to such objects if used internally by employed predefined functions.)


Valid (ungolfed) example

Python:

def f(i):
    return sum([2.][0:i])

For this we have:

f(0) == 0
type(f(0)) == int
f(1) == 2.0
type(f(1)) == float

This makes use of the fact that the sum of an empty iterable (like [2.][0:0]) is 0.


Sandbox questions

  • I am pondering whether I should replace a portion of the rules with a catch-all like:

    If whatever trick you use to acquire n types of output can be used to obtain n+1 types of output, it is invalid. (If n+1 just doesn’t work because n is the total number of types in your language, this doesn’t count either.)

    Obviously, this would lessen the chance of any boring loopholes, but it would also be more likely to be subject to interpretation. Do you think this is a good idea?

  • Did I miss any obvious loopholes that would make this challenge boring?

  • This challenge was mainly done with Python in mind, but I seen no reason why it should not extend to other programming languages (with a suitable typing system). Are there any obvious pitfalls with other languages that I should consider?

  • Are there any other appropriate tags for the question?

\$\endgroup\$
12
  • 3
    \$\begingroup\$ This seems like an interesting challenge at its core, but there are a lot of gotchas. Is indexing into a tuple considered a logical construct? For example, in PowerShell, you can put a Boolean into the index and it will automatically cast to 0 or 1 to get a pseudo-ternary operation. Are languages like Java allowed to use reflection? Etc. \$\endgroup\$ Commented Oct 13, 2017 at 20:34
  • 1
    \$\begingroup\$ Also in a language like R (my most familiar language), there are really only 7 types as given by typeof() but there are numerous classes which can be found by class(). That being said, every instance of an R class is really list when typeof() is called on it. see this, for example. Basically, you'll have to make a decision for every language submitted on "a suitable typing system" \$\endgroup\$
    – Giuseppe
    Commented Oct 13, 2017 at 20:44
  • \$\begingroup\$ @AdmBorkBork: Is indexing into a tuple considered a logical construct? – No, handling logic is not the primary purpose of this feature. I also do not see this as a problem since a tuple is an iterable and thus its elements would have to be of the same type. (Such pseudo-choosing operations are exactly the reason why I imposed that rule.) — Are languages like Java allowed to use reflection? – I only briefly looked into this, but I don’t see a how this could pose a loophole. \$\endgroup\$
    – Wrzlprmft
    Commented Oct 13, 2017 at 21:24
  • \$\begingroup\$ @Giuseppe: (T-1)/L rather than (T-1)/C – corrected, thanks. — Basically, you'll have to make a decision for every language submitted on "a suitable typing system" – I added a note that you can pick one and stick to it in that case. Would this pose any problems with your example (R)? \$\endgroup\$
    – Wrzlprmft
    Commented Oct 13, 2017 at 21:34
  • \$\begingroup\$ 1. A PowerShell tuple is not an iterable. 2. Plenty of languages have duck typing. That's a clear notion of type, but it has the potential to trivialise this question in the same way that reflection does. E.g. in JavaScript function f(s){var o={};o[s]=f;return o} 3. The Java method you should be looking at is Class.forName. \$\endgroup\$ Commented Oct 13, 2017 at 22:59
  • \$\begingroup\$ @PeterTaylor: 1. Okay, let me generalise this to containers. 2. I am familiar with duck typing from Python but I don’t see how this provides a loophole. Your JavaScript example always returns something of type object IIUC. 3. From what I just learnt, that seems to be a special case of interpreting strings as code. \$\endgroup\$
    – Wrzlprmft
    Commented Oct 13, 2017 at 23:28
  • \$\begingroup\$ 2. "If there are many separate typing systems in your language, you have to pick one and stick to it." I'm using duck typing: your objection is using prototype-based typing. 3. No, it takes a string which is the name of a type and instantiates an object of that type using its public 0-ary constructor. \$\endgroup\$ Commented Oct 14, 2017 at 6:27
  • \$\begingroup\$ Given that so many approaches are disallowed, can you add a simple example or two of a valid approach? \$\endgroup\$ Commented Oct 14, 2017 at 8:14
  • \$\begingroup\$ @PeterTaylor: 2. I get what you are going at now, but I would not consider duck typing a clear typing system in the sense that every object has a unique type (I edited to clarify) – if you so wish, it is the absence of such a system. 3. I gathered that, but how is that not interpreting a string as code? Anyway, I edited that criterion to be more inclusive. \$\endgroup\$
    – Wrzlprmft
    Commented Oct 14, 2017 at 9:47
  • \$\begingroup\$ @user2390246: I added an example. \$\endgroup\$
    – Wrzlprmft
    Commented Oct 14, 2017 at 9:48
  • 1
    \$\begingroup\$ I don't think the edits unambiguously resolve the issues. 2. I can write a typeof function in JavaScript which produces an array of the properties of an object. 3. It's more like a defaultdict lookup than eval. And I don't see how "these strings are subject to all rules" unambiguously prohibits reflection.The contents of the string are characters: the string is not a valid statement or expression, and its contents can't really be said to have a type. \$\endgroup\$ Commented Oct 14, 2017 at 10:53
  • \$\begingroup\$ @PeterTaylor: 2. I can write a typeof function in JavaScript which produces an array of the properties of an object. – Words fail me. Let’s stick to official type systems (I edited). — 3. unambiguously prohibits reflection – My goal isn’t to prohibit reflection (which is probably fuzzy anyway), but only exploits thereof that make this challenge boring. I restructured the rules and extended them in a way that I hope will clearly cover Class.forName and any other boring exploits. \$\endgroup\$
    – Wrzlprmft
    Commented Oct 15, 2017 at 9:48
-3
\$\begingroup\$

Puzzle:

  • Make a program that draws the following figure line by line.

  • Your program should wait for one-second(it can be longer, just has to be a noticable difference) after drawing each line.

  • Your program can only draw line by line (you cannot jump to another point or re-draw over a line)

  • Given a positive integer n, produce an art image of the below drawing

  • The angle measures should always be the same (regardless of n's value)

  • However, each line's length should be 150*n pixels

  • You only need to account for when n = 1, n = 2, n = 3

example

Specifications:

if n=1:

  • length = 150 pixels

if n=2:

  • length = 300 pixels

if n=3

  • length = 450 pixels

.

.

Answering - Name the language you used followed by its bytes

Example:

Java (swing), 500 bytes

.

Scoring

Good luck!

\$\endgroup\$
2
  • 4
    \$\begingroup\$ You haven't solved the obvious issue "You can't have an equilateral triangle with angles of 45-45-90." (comment from deleted challenge) The sandbox is only helpful if you listen to people who suggest changes, really. \$\endgroup\$
    – DELETE_ME
    Commented Oct 22, 2017 at 8:00
  • \$\begingroup\$ I'm not sure what we're being asked to draw. Just the black figure? The black figure and the annotations? \$\endgroup\$ Commented Oct 23, 2017 at 7:07
-3
\$\begingroup\$

I have seen many a trivial answer in jelly, so i wish to propose:

Challenge: A non-trivial answer

  • Input two strings
  • If the two strings are integers and are equal, output a truthy value.
  • Otherwise, output a falsy value.

Clarifications

  • You may receive non-integer inputs.
  • You will never receive an integer that is outside the bounds [-2³¹, 2³¹). Rules

  • Standard loopholes are disallowed.

Scoring:

  • This is not your standard code-golf
  • the winner person who posts the longest program.
  • an entry is invalidated if someone posts a shorter program in the same language.
\$\endgroup\$
4
  • \$\begingroup\$ Note: i don't believe that this is code-bowling, as only the shortest program in any language is eligible; this is more about finding an obscure language in which the task is actually hard to do, rather than obscure languages where the task is too easy. \$\endgroup\$ Commented Nov 2, 2017 at 22:19
  • \$\begingroup\$ Easy win for Unary. \$\endgroup\$
    – Dennis
    Commented Nov 2, 2017 at 22:26
  • \$\begingroup\$ what a horrible way of representing a program, yeah... any type of 'longest sensible program' task is not so helpful. \$\endgroup\$ Commented Nov 3, 2017 at 3:20
  • \$\begingroup\$ @Dennis do you think that restricting to languages that have won a standard code-golf challenge in 2017 would help? It does seem that if we have to start putting in language or other implementation restrictions, then this isn't worth posting. Oh well. guess this stays on the proposal board. \$\endgroup\$ Commented Nov 3, 2017 at 3:22
-3
\$\begingroup\$

Golf This Question

Your program should output to STDOUT the full text of this question as it appears on your screen, so no HTML. This includes the title and the body. Please do not edit this question whatsoever so-as to keep it the same for all programs.

No reading the text from a file or the internet

This is , so the shortest code wins!

Sandbox Is this a good question? Is there anything I should clarify?

\$\endgroup\$
6
  • \$\begingroup\$ similar but obviously different since it requires the markdown. \$\endgroup\$
    – Giuseppe
    Commented Nov 8, 2017 at 16:17
  • 1
    \$\begingroup\$ You should add some rules and winning criteria (which would increase the length of the question, but oh well) \$\endgroup\$
    – hyper-neutrino Mod
    Commented Nov 8, 2017 at 17:28
  • 1
    \$\begingroup\$ I'm not sure what much this adds beyond the typical KC challenges, and thus it's likely to be closed as a dupe. \$\endgroup\$ Commented Nov 8, 2017 at 17:36
  • 1
    \$\begingroup\$ @AdmBorkBork I guess OP means to allow access to the internet, in which case it's very different, but I'm not sure... If so, it's basically a challenge about parsing html, or get the result directly from the API (if that's possible). \$\endgroup\$ Commented Nov 8, 2017 at 18:40
  • \$\begingroup\$ Include tag about Kolmogorov complexity. \$\endgroup\$
    – Heimdall
    Commented Nov 11, 2017 at 8:43
  • \$\begingroup\$ Why the downvotes? \$\endgroup\$
    – qqq
    Commented Nov 21, 2017 at 23:24
-3
\$\begingroup\$

Find the min swaps for order one powerset for a List

The question it is write one powerset function and one sort function tha minimize the swaps for doing one order with this compare function on powerset of the List A

cmp(a,b) -- a and b are subset of the list A
    if sizeof a > sizeof b then (swap a and b; return)
    if sizeof a < sizeof b than return
    for i in 1..(sizeof a) repeat
         for j in 1..(sizeof A) repeat
               if a[i]==A[j] then return
               if b[i]==A[j] then (swap a and b; return)

the result of this compare function on the sets wuold be the follow:

(15) -> powSet([1,2,3])
   (15)  [[],[1],[2],[3],[1,2],[1,3],[2,3],[1,2,3]]
                                                      Type: List List Any
(16) -> powSet([3,2,1])
   (16)  [[],[3],[2],[1],[3,2],[3,1],[2,1],[3,2,1]]
                                                      Type: List List Any

note that order depend not from the number element, but on the position on the start List A=[1,2,3]

(17) -> powSet([1,2,3,4,5,6])
   (17)
   [[], [1], [2], [3], [4], [5], [6], [1,2], [1,3], [1,4], [1,5], [1,6], [2,3],
    [2,4], [2,5], [2,6], [3,4], [3,5], [3,6], [4,5], [4,6], [5,6], [1,2,3],
    [1,2,4], [1,2,5], [1,2,6], [1,3,4], [1,3,5], [1,3,6], [1,4,5], [1,4,6],
    [1,5,6], [2,3,4], [2,3,5], [2,3,6], [2,4,5], [2,4,6], [2,5,6], [3,4,5],
    [3,4,6], [3,5,6], [4,5,6], [1,2,3,4], [1,2,3,5], [1,2,3,6], [1,2,4,5],
    [1,2,4,6], [1,2,5,6], [1,3,4,5], [1,3,4,6], [1,3,5,6], [1,4,5,6],
    [2,3,4,5], [2,3,4,6], [2,3,5,6], [2,4,5,6], [3,4,5,6], [1,2,3,4,5],
    [1,2,3,4,6], [1,2,3,5,6], [1,2,4,5,6], [1,3,4,5,6], [2,3,4,5,6],
    [1,2,3,4,5,6]]
                                                      Type: List List Any

Win the one that minimize the swaps for order the powerset of the follow list

[1],[1,2],[1,2,3],[1,2,3,4],[1,2,3,4,5],[1,2,3,4,5,6]

Patterns match for composed expression

If we have one math expression B(x) [that mean in B appear x] [math expression is one expression where appear only symbols for function and operator of mathematics that are ok for type and compose ] Find the max lengt subexpression g(x) of B contain x such that

B(x)=f(g(x))

And f(y) and g(x) are both math expression.

Find Max for a function in one interval

R is the set of real numbers. Is given a function f:A->R from set A (⊆ R) to the R, continue and derivable in one close interval

 [a, b]⊆A

Write the shortest program for find

 max{f(x): x in [a,b]}

knowing the function f(x) derivable in the interval [a,b]. The solution has to be correct at last until the V digit after the float point, and for all functions f that has 10 value max in which f'(x)= 0 in [a, b]. codegolf tag

On Riemann Zeta function domain

If Zeta:C->C is the Riemann Zeta function, we give the set:

 W={b: 0<b<100 and Re(Zeta(0.5+i*b))=-Im(Zeta(0.5+i*b))}

Where Re() return the real part of its argument, and Im() return the imaginary part of its argument.

It is requested to calculate one approximation of each element of W; this means here all b in float numbers with b in 0..100 such way

  abs(Re(Zeta(0.5+i*b))+Im(Zeta(0.5+i*b)))<0.0001 

at last, to put all together in a array or list or set of float.

One can note that the below set of zeros for the Riemann function is a subset of above W set.

 {b: 0<b<100 and Zeta(0.5+i*b)=0}

Some test

Some numbers b approssimation to solution of equation

Re(Zeta(0.5+i*x))+Im(Zeta(0.5+i*x))=0 

the ones that are approssimation to solution of equation Zeta(0.5+i*x)=0 too

[14.134725, 21.022039, 30.424876, 32.935061, 37.58617815, 40.918719, 43.327073, 48.00515, 49.773832]

the ones not approssimation to solution of equation Zeta(0.5+i*x)=0 too

[12.458493623791109003, 24.351346882420215577, 28.716611773969890307]

The code more short in bytes that find all these approssimations of element of the set W wins...

Code golf tag

\$\endgroup\$
9
  • 2
    \$\begingroup\$ You're going to need to phrase this better and be more precise about what you're asking for. Currently, this sounds a little bit like a homework question. \$\endgroup\$ Commented Apr 22, 2017 at 13:25
  • \$\begingroup\$ This is also formatted improperly. \$\endgroup\$ Commented Apr 22, 2017 at 13:27
  • \$\begingroup\$ This appears to permit hard-coding the output, which is generally a sign of a bad question. Why not parameterise it? \$\endgroup\$ Commented Apr 22, 2017 at 15:09
  • \$\begingroup\$ I think now I ' m clear... What is not clear or ambiguous? \$\endgroup\$
    – user58988
    Commented Apr 22, 2017 at 15:40
  • \$\begingroup\$ possibly a little too much difficult... there are numbers that seems solutions but if i increase digits they are just wrong.... \$\endgroup\$
    – user58988
    Commented Apr 23, 2017 at 17:55
  • 1
    \$\begingroup\$ Also, it's "approximation". \$\endgroup\$ Commented May 22, 2017 at 6:40
  • 2
    \$\begingroup\$ Being (continuous and) differentiable is quite a weak constraint. There are e.g. nasty functions which are differentiable but whose derivative is not integrable. \$\endgroup\$ Commented May 22, 2017 at 11:47
  • \$\begingroup\$ One continue function in one close interval [a, b] has max and min \$\endgroup\$
    – user58988
    Commented May 22, 2017 at 13:48
  • \$\begingroup\$ So for the order a PowerSet of one list is all clear... \$\endgroup\$
    – user58988
    Commented Nov 16, 2017 at 13:30
-3
\$\begingroup\$

Shortest code to draw a png from stdin

Rules :

  • You’re free to use any image library you want as long as the image library is designed in the same language as your answer.
  • The image should be displayed in an Xorg or wayland window or a console framebuffer.
    If you’re displaying to a window, you don’t need to create any windows control (in that case the programs ends with CTRL+C).
  • The stdin stream doesn’t eof. so the only way to get the image size is to parse png data. Once the image had been displayed, /dev/stdin should be closed.
  • Your answer shouldn’t crash on random data.

The answer using the fewest bytes wins !

\$\endgroup\$
6
  • \$\begingroup\$ Way too easy for some languages and way too hard for others. And how would I do it if my language can't produce graphical output? What if I have neither STDIN nor STDOUT? \$\endgroup\$
    – Nissa
    Commented Nov 29, 2017 at 16:21
  • \$\begingroup\$ @StephenLeppik : the point of my question is to suggest that language choice is restricted to languages that can run on Unix systems supportting screening. I don’t know too easy answers, but libpng16 along Xorg libraries should make it possible in a few line of code. \$\endgroup\$ Commented Nov 29, 2017 at 16:45
  • 2
    \$\begingroup\$ Restricting it to such a small list of languages is a good way of alienating half the site. \$\endgroup\$
    – Nissa
    Commented Nov 29, 2017 at 16:52
  • \$\begingroup\$ @StephenLeppik : It just basically, restrict to all languages which can write a hello word. Writing to a framebuffer is just as easy as to write a raw image in device file which opens like a normal file so this doesn’t matter. I’d rather say the list of language that can print a Hello world on Linux or ʙꜱᴅ is huge but not small. \$\endgroup\$ Commented Nov 30, 2017 at 17:34
  • \$\begingroup\$ Believe it or not, displaying an image is not a capability that directly follows from being able to print text… \$\endgroup\$ Commented Mar 22, 2019 at 2:40
  • \$\begingroup\$ @UnrelatedString that’s because it’s not possible to do it from text I’m asking this. But this is defintely like writing to a file. \$\endgroup\$ Commented Mar 22, 2019 at 19:31
-3
\$\begingroup\$

Hack Stack!

Your challenge is to create a code snippet in javascript that will upvote your answer when run. This should not be possible, but maybe it is. We'll see!

Rules

Standard Loopholes are not allowed.

You should not auto-downvote other answers.

Do not manually upvote any ansewer, please!

The first one to write code that also accepts the answer when it is run by me will remain accepted.

For discussion:

Is this even a valid challenge?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ I'm a newbie here but I think this is exactly the most dangerous place to ask for code to run on your PC. Too many clever obfuscators, golfers and underhanded practitioners to trust. \$\endgroup\$ Commented Dec 10, 2017 at 21:27
  • 1
    \$\begingroup\$ Maybe, instead of requesting submissions do something that is (1) possibly impossible, (2) illegal, and (3) unsafe to run on your browser, have the submission try to upvote the answer (even though this might not work) \$\endgroup\$ Commented Dec 10, 2017 at 21:43
  • 2
    \$\begingroup\$ I think this counts as asking for malicious code, which is against the site rules. \$\endgroup\$
    – Laikoni
    Commented Dec 10, 2017 at 22:31
  • \$\begingroup\$ Thanks for telling me this is illegal and against the rules. I wasn't thinking of it that way. Not a good challenge, then. Should I delete it, or keep it there so that other people with similar ideas can see it? \$\endgroup\$ Commented Dec 10, 2017 at 22:40
-3
\$\begingroup\$

Feliz navidad, prospero año y felicidad

So christmas is comming and carols are on the radio all day. Jose Feliciano's Feliz Navidad song is a good example of this. Your task is to print the entire (and repetitive) song.

Lyrics:

Feliz navidad
Feliz navidad
Feliz navidad, prospero año y felicidad

Feliz navidad
Feliz navidad
Feliz navidad, prospero año y felicidad

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

Feliz navidad
Feliz navidad
Feliz navidad, prospero año y felicidad
A-ha!

Feliz navidad
Feliz navidad
Feliz navidad, prospero año y felicidad

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

Feliz navidad
Feliz navidad
Feliz navidad, prospero año y felicidad

Feliz navidad
Feliz navidad
Feliz navidad, prospero año y felicidad

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

Feliz navidad
Feliz navidad
Feliz navidad, prospero año y felicidad 

RULES:

  • Default loopholes are forbidden.
  • Default I/O.
  • Programs or functions are acceptable.
  • You MUST include the ñ character in the año word.
  • You can print it in lowercase, uppercase or sentence case.
  • Shortest code in bytes wins!
\$\endgroup\$
4
  • \$\begingroup\$ Hi there! I'm the downvoter. I'm not sure this adds much to the site beyond other recent KC challenges, and it is very likely to be closed as a dupe of either "RickRoll" or "Writing Lines in Detention" as it's currently written. What can you describe about this challenge that adds to the site? \$\endgroup\$ Commented Dec 19, 2017 at 22:09
  • 1
    \$\begingroup\$ For reference -- RickRoll challenge -- Write lines in detention \$\endgroup\$ Commented Dec 19, 2017 at 22:10
  • \$\begingroup\$ Well, it may be a mix of those two challenges but what I found mainly interesting to see is how the users manage to put the ñ character and the "A-ha!" line that is the unique part of the song. \$\endgroup\$
    – WORNG ALL
    Commented Dec 19, 2017 at 22:14
  • \$\begingroup\$ That ñ is just one byte in Win1252, which most answers will probably output in. I don't think this adds anything, personally, and cannot recommend posting it. \$\endgroup\$
    – ATaco
    Commented Dec 19, 2017 at 22:16
-3
\$\begingroup\$

Ultimate crackpot

In minimum number of ASCII bytes, write a plain text "physics research article" in English that scores each item in The Crackpot Index at least once.

I'm not sure if such thing is on-topic here or on the Puzzling.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ I don't think this is on topic on either of those sites. I'm not sure there is a StackExchange site that this would be on-topic. it would have to be some sort of parody writing site similar in style to uncyclopedia or something \$\endgroup\$ Commented Feb 13, 2018 at 22:19
  • 1
    \$\begingroup\$ I think it's a funny idea to achieve as many of these as possible but it's not really on topic here and it would not be possible in plain text to, for example, mail the paper to someone (#12) \$\endgroup\$
    – dylnan
    Commented Feb 14, 2018 at 5:01
  • \$\begingroup\$ A lot of these aren’t very objective either. \$\endgroup\$
    – Jo King Mod
    Commented Feb 14, 2018 at 6:46
-3
\$\begingroup\$

Same code, different work

Write a code in a language that do these few things:

  1. Input a positive integer n, check whether it's a prime. (2 -> true, 5 -> true, 8 -> false)
  2. Input an integer n>1, output an array with fewest positive prime as element, where the sum of the array is n. (2 -> [2], 5 -> [5], 6 -> [3, 3], 8 -> [3, 5] or [5, 3])
  3. Input an integer n, output sum(n mod i, for i=1 to n). (2 -> 0, 5 -> 4, 8 -> 8)

Your code should theoretically solve all legal n, but in practive up to 1000 is enough

Shortest code in bytes win.

\$\endgroup\$
2
  • \$\begingroup\$ The third task: shouldn't it be 2 -> 0 (2 % 1 = 0; 2 % 2 = 0). And you should probably decompress the specs a bit. And isn't there a polyglot tag? \$\endgroup\$
    – wastl
    Commented Mar 16, 2018 at 23:11
  • \$\begingroup\$ There IS a polyglot tag. Although same languages are OK, that can probably only work with different versions (e.g. Python 2 vs Python 3), which seems to be considered a polyglot too. \$\endgroup\$
    – wastl
    Commented Mar 17, 2018 at 10:18
-3
\$\begingroup\$

Write a program who return the current month.

The Rules

  • The result needs to be correct even if the program is run in the future.
  • It's so the shortest code wins!

Optional

Add an interpreter so the submission can be tested. It is allowed to write this interpreter yourself for a previously unimplemented language.


It's my first code-golf idea I'm fully open to improving it with more experienced users.

\$\endgroup\$
9
  • \$\begingroup\$ That's usually a problem with trivial challenges. If this isn't a duplicate of an existing challenge, I predict it will get a lot of answers very quickly, many of which will be very short golfing language solutions. \$\endgroup\$
    – Adám
    Commented Apr 11, 2018 at 14:54
  • 5
    \$\begingroup\$ Possible duplicate? codegolf.stackexchange.com/questions/114787/… \$\endgroup\$
    – Didix
    Commented Apr 11, 2018 at 14:54
  • \$\begingroup\$ Nope, still not all that good. \$\endgroup\$
    – Nissa
    Commented Apr 13, 2018 at 12:41
  • \$\begingroup\$ @StephenLeppik Hm, what can I improve so? \$\endgroup\$
    – Didix
    Commented Apr 13, 2018 at 12:42
  • \$\begingroup\$ IMO you're wasting your time trying to improve this. Delete it and try to come up with something which is inherently interesting. \$\endgroup\$ Commented Apr 13, 2018 at 12:50
  • \$\begingroup\$ Write a program who return the current month should probably change that to Write a program which return the current month. what do you think. Also JSYK : This is a one line task for languages like JS and Ruby. So you should probably ban those \$\endgroup\$ Commented Apr 13, 2018 at 12:51
  • \$\begingroup\$ good point. I guess leave it as is. \$\endgroup\$ Commented Apr 13, 2018 at 13:06
  • \$\begingroup\$ @MuhammadSalman Easier challenges get shorter solutions. If you don't want to see short solutions (no idea why), write hard challenges. \$\endgroup\$
    – DELETE_ME
    Commented Apr 13, 2018 at 13:12
  • \$\begingroup\$ @user202729 : I never said I don't want short solutions. But these aren't much of a challenge. For example even a ten year old kid would be able to solve this in JavaScript using built in's. in all a total of 10 chars spent and 2 seconds. Not fun. Challenges that make you stop and think and actually work for them are best. Of course feel free to disagree. \$\endgroup\$ Commented Apr 13, 2018 at 13:16
-3
\$\begingroup\$

Output Infinity (updated v2)

Challenge

Output the following infinity symbol:

         ∞∞infinity                         ∞infinity                   
     infinity∞∞infinity                 infinity∞∞infinity              
   infinity∞∞∞∞∞∞∞infinity           infinity∞∞∞∞∞∞∞infinity            
  infinity        ∞∞infinity      ∞∞∞∞∞infinity        ∞∞∞∞∞∞∞          
 ∞∞∞∞∞                 ∞∞∞∞∞∞∞  ∞∞∞infinity               ∞∞∞∞∞         
 ∞∞∞                      ∞∞∞∞∞∞∞infinity                   ∞∞∞         
∞∞∞                         ∞∞infinity                       ∞∞∞        
∞∞∞                       ∞∞infinity                         ∞∞∞        
 ∞∞∞                    ∞∞∞∞∞∞infinity                      ∞∞∞         
 ∞∞∞∞∞               ∞∞∞infinity  ∞∞∞∞∞∞∞                 ∞∞∞∞∞         
  infinity       ∞∞∞∞∞infinity     ∞∞∞infinity        infinity          
    infinity∞∞∞∞∞∞∞infinity           infinity∞∞∞∞∞∞∞infinity           
      infinity∞∞infinity                infinity∞∞∞infinity             
           ∞infinity                        ∞∞∞infinity                 

Rules

  • No input.
  • Output can be given in any convenient format.
  • Any number of trailing spaces at the end of each line is allowed.
  • Any number of trailing new lines at the end of the shape is permitted.
  • Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
  • If possible, please include a link to an on-line testing environment so other people can try out your code!
  • Standard loopholes are forbidden.
  • This is so all usual golfing rules apply, and the shortest code (in bytes) wins.
\$\endgroup\$
12
  • \$\begingroup\$ need some comments for down-vote... \$\endgroup\$
    – mdahmoune
    Commented Apr 20, 2018 at 19:01
  • 1
    \$\begingroup\$ If the challenge's goal is -- as I understand it -- to output one of the five objects, in most languages that would result in an optimal submission of something along the lines of print("∞"). A rather boring but valid submission to a challenge that effectively asks to print a single unicode character. \$\endgroup\$ Commented Apr 20, 2018 at 19:34
  • 1
    \$\begingroup\$ The downvotes are probably because you're allowing multiple outputs, some of which are interesting (4-5), some of which are trivial (1-3). As @JonathanFrech suggests, for a code-golf challenge, everyone is going to chose a trivial output for shortness. Alternate ideas: Input an integer 1-5, output the corresponding form of infinity. Or perhaps narrow to just output option #4 (or an even larger, fancier ASCII infinity), and make it a kolmogorov-complexity question. \$\endgroup\$
    – BradC
    Commented Apr 20, 2018 at 20:59
  • 1
    \$\begingroup\$ I would even say that this challenge in its current form should be tagged kolmogorov-complexity. If you decide to go in the direction @BradC suggested, you could maybe also consider to incorporate the challenge's theme into your challenge rather than posting yet another Kolmogorov complexity challenge. Something along the lines of infinitely outputting the ASCII art or taking two numbers as input, dividing them and producing the infinity symbol when the second one is zero. \$\endgroup\$ Commented Apr 20, 2018 at 22:01
  • \$\begingroup\$ I don't think this is anyhow related to math. Only "inspired by math", maybe. \$\endgroup\$
    – DELETE_ME
    Commented Apr 21, 2018 at 10:54
  • \$\begingroup\$ Now -- is there any exploitable pattern in the output such that it should not be closed as a dupe of "We're no stranger to code golf, you know the rules, and so do I"? \$\endgroup\$
    – DELETE_ME
    Commented Apr 21, 2018 at 10:55
  • \$\begingroup\$ @user202729 No, there is no predefined specific pattern, I prepared this MANUALLY. How could I specify that in the challenge? \$\endgroup\$
    – mdahmoune
    Commented Apr 21, 2018 at 11:00
  • \$\begingroup\$ I believe it's customary to specify if trailing spaces / new lines are permitted and if so, how many \$\endgroup\$ Commented Apr 21, 2018 at 19:30
  • \$\begingroup\$ @AsoneTuhid for spaces I think it is ok because it does not deform the shape, but I do not think so for new lines, what do you think? \$\endgroup\$
    – mdahmoune
    Commented Apr 21, 2018 at 19:54
  • \$\begingroup\$ Not between the lines, of course. I mean new lines after the whole drawing. Some people put restrictions (none, one, whatever). Nice art btw \$\endgroup\$ Commented Apr 21, 2018 at 19:57
  • \$\begingroup\$ @AsoneTuhid yes of-course, thanks a lot for this remarks. \$\endgroup\$
    – mdahmoune
    Commented Apr 21, 2018 at 20:06
  • \$\begingroup\$ Can you write a reference implementation which beats bzip2 and gzip, preferably by a few percent? \$\endgroup\$ Commented Apr 25, 2018 at 12:05
1
154 155
156
157 158
160

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .