The above image is an ASCII art.
Notice how the space inside the "box" shape increases by one space each time, from left to right.
Your task is to, given an input of two numbers (which is the number of spaces inside the box shape & the number of dashes in the tall line), produce the correspon...
Bash, 71, 70, 68, 66 Bytes
Input is by env variables, starting int s and ending int e, to process 0 to 20: s=0,e=20
for((a=$s;a<=$e;a++)){ [ -d $a ]&&v=$a||{(($a==$v+1))&&echo $a;};}
Bash, 57 Bytes
Input is by env variable s: s=$(seq 1 20)
for a in $s;{ [ -d $a ]&&v=$a||{(($a==$v+1))&&echo $a...
In this code-golf, you must subtract using addition. Here's how it works:
You take two inputs, a and b. We'll add them using subtraction.
Let's take 2 + 2 as your first test case. Make that -2 - 2 = -4, and convert -4 into 4. Simple!
Test cases
If a test case isn't on the list, add the two ...
In this code-golf, you must subtract using addition. Here's how it works:
You take two inputs, a and b. We'll add them using subtraction.
Let's take 2 + 2 as your first test case. Make that -2 - 2 = -4, and convert -4 into 4. Simple!
Test cases
If a test case isn't on the list, add the two ...
@TheBitByte it's better but it's still very simple. It's basically n->"fluff"+" ".repeat(n)+"fluff" I'll undownvote but others might not because its simplicity
can we please just insist that BitByte move this to the Sandbox and we can offer suggestions there?
i understand we're trying to be helpful, but I think at this point helping fix the challenge after it was posted like this will encourage them to not use the Sandbox in the future
@TheBitByte Use the tools already provided to improve your challenges before posting, getting downvotes which actually affect your rep, possibly getting closed/deleted, etc.
The height is as the question shows it to be. Don't change it. The question itself also says this:
> "With the exception of the number of spaces (i.e width) in the box shape & the number of `|` in the top tall line , you must keep everything else in the ASCII art as it is."
> "With the exception of the number of spaces (i.e width) in the box shape & the number of `|` in the top tall line ,*you must keep everything else in the ASCII art as it is.*"
We don't hate you or anything, we are just trying to A) help you become a better challenge writer B) make your challenge better and clearer so you get more answers and upvotes
@TheBitByte that is still inferred from your (very few) examples. At any rate, I don't feel like arguing with you anymore, since many users have given you very helpful advice, not just on this challenge, but on challenge writing in general (use the sandbox!) and you only respond with antagonizing.
^^^ I agree. We're pretty much telling you what exactly to do and you don't want to do that. If you refuse our advice there's not much we can help you with
@EamonOlive I believe this was brought up by someone on Aviation.SE. We have no requirements for challenge names. Just don't make them something super vauge like "Code-Golf Challenge"
@TheBitByte I haven't read any of the previous conversation, but based on me just reading the spec right now I've got two comments: 1) I can't tell whether I'm only meant to output 1 box + tall line (b-shape) or multiple depending on some input, and 2) I can't tell whether the height of the box is meant to be exactly 7 characters or whether they're affected by any of the inputs (as in, whether the "number of | in the top tall line" refers to only the part above the box or not)
One of my recent questions, titled ☁ A Little Cloud ☁, was renamed in an edit to Little Chandler is sad. Draw him a cloud to cheer him up. I don't mind the title change, but I am curious as to the reasons why it was changed. Was it because of the Unicode characters? Or something else? I was hopef...
Code Golf question titles are frequently opaque.
The front page (and Hot Network Questions) hence partially degrades to a list of clickable rectangles. When clicking, I more often think "WTF does that mean" than "This sounds like an interesting puzzle".
Recent beauties, explained:
If a progra...
Just played and beat a pretty fun game called Window Frame. It's one where you use the edges of a window to solve puzzles and kill vampires. Download link.
Well it might not be a huge issue to some (I suppose it depends on how you use the chat system) but when I "Ignore this user everywhere", their messages still appear on the sidebar for the 'other rooms you're in' if they say something. Albeit I can ignore this feature and the text within it, I ju...
@MitchSchwartz I approve, although I don't really do much anagol anymore. It seems strange to me that an 'official' interpreter would use ints without bothering to at least simulate 8-bit over/under-flow. About negative addresses, wrapping to the end of a 32k-64k tape is probably the most efficient way to do it, and generally won't be very exploitable.
@LeakyNun I'm sad to see you go, but I'm happy that you enjoy(ed?) Seriously and Actually. However, you seem to drastically overestimate my release timings.
@primo yeah BFI is a bit strange but i've had some fun with the exploits and peculiarities anyway. for negative addresses, i was thinking about just starting in the middle of a fixed size tape, without attempting to allocate as much memory as the system allows (and i hadn't thought about wrapping around to the other side of the tape, it seems like it could get in the way of optimisations like collapsing loops)
Anonymous
@primo Only if there's infinitely many 2s following the decimal point :P
@Mego I'm planning to have "lazy expression blocks". You'll be able to write up a value as usual, perform operations and all, but it wouldn't be evaluated until it really needs too. This will be helpful so, for example, reciprocal(1 / 3) would output 3 rather than 2.9999997
Anonymous
@Downgoat And what do you mean by algebraic blocks?
i specify an algebric equation: e.g. reciprocal($x=1/3$). lazy blocks seem like a good fit for algebra so I could easily implement algebra stuff in them. Downside is they'd then be considered algebraic blocks rather than lazy blocks because then syntax would be different from regular expressoins
The Letter E with E code-golf ascii-art
Your task is to display the below letter "E" shaped ASCII art, given five inputs.
Examples:
Input: 7,2,+,|,- (Note: You don't have to follow this exact input format, and if you don't use it, then you must explain how your own input format works)
Explana...
oh cool, well i should probably give you more info; i suggested it to shinh over twitter, and the conversation is here (ignore the slight misunderstanding when i made a wrong guess about why tails brought up a compiler instead of an interpreter) twitter.com/canissimia/status/746074736074104832
shinh's implementation does some optimisation, although from a quick look, i think it looks for -1 in loops, so it will optimise [>++<-] but not [>+++<++] for example
i don't know that speed is very important, but i suppose if you can make it faster without introducing bugs or exploits then why not
i originally thought of bff since it has most of the same implementation details as BFI but without the exploits, so most of my non-cheat code would work as-is
@MitchSchwartz What about a bf to x86 compiler? With the right optimizations, it would be ultra crazy fast. If you're feeling adventurous, CUDA and OpenCL too haha.
A Fragile Quine
quine code-golf
A fragile quine is a quine that satisfies the property of having each substring made by removing a single character, when evaluated, produces an error.
For example. If your program asdf is a quine, then for it to be fragile, the following programs must error:
s...
@ConorO'Brien I read your challenge, but I'm asking you: Imagine I write a valid quine. Now, when I remove a certain character, it gives an error because the code is now wrong, not because I made it give an error on purpose.
@TheBitByte ... "A fragile quine is a quine that satisfies the property of having each substring made by removing a single character, when evaluated, produces an error."
> having each substring made by removing a single character...produce an error
Removing one character and doing `rint('foo') isn't going to work, however, my error isn't on purpose. I could keep trying to remove each character and test if it gives errors. It might. But then, it gave an error because the code itself was wrong, not that I actually bothered to make it "fragile" on purpose at all.
@TheBitByte it doesn't. If you can't understand the challenge (and which you aren't understanding it apparently, because a couple people disagree with you), don't try to give advice.
@EᴀsᴛᴇʀʟʏIʀᴋ Thirst starts at 500 and every tick it decreases by abs(tan(u.uthirst)), which gives it cycles of more/less water loss. Drinkng any uncursed potion gives 250 hydration, eatng any vegetable gives 50 hydration. Dipping below 100 hydration gives you a status message and dipping below 0 slows you and gives you 25+Constitution turns to live. When you drink a potion of unfiltered water (#dip an empty bottle into any water source) it has 1/7 chance of giving you dysentery (vomiting slowed) but applying a water filter purifies it. Quaffing from a transpiration bag gives you turns since…
@TheBitByte Let me use simple words. When I mean each substring has to error, I mean that every single possible substring made by removing a single character has to error. If you ahd print("foo"), then there is a substring (e.g. print("fo")) that doesn't produce an error. So it is not fragile.
"For example, if your program is `print('foo')`, then, you remove a letter from the code, the code must produce an error. This has to work with all possible combinations of removed letters, and you must remove only a single letter. Code that would normally be correct when a character is removed must still produce an error. In the earlier example, removing a letter and doing `print ('fo')` still works, however, under the rules of this challenge, it shouldn't."
@primo i'd seen that before, but it still seems strange to me, like if c = getchar()were to leave c unchanged on EOF -- is that really in line with what programmers will want to use it for? and i'm not convinced that there's value in the ability to simulate both EOF = 0 and EOF = -1, you can just write code that is designed for one or the other.
-1 makes sense to me for more than 8 bits; you have a value that is not in [0,255], so you can process any binary data. For 8 bits, 0 is as good as -1 so you might as well use 0, unless you want to be able to handle \x00 in input and not \xff for some reason
@MitchSchwartz say you were a 'serious' brainfuck programmer, if such a thing can be said to exist. your preferred interpreter uses EOF=0, however someone you're collaborating with uses EOF=-1
Which esolangs look the least like esolangs? i.e. you could easily confuse a program written in it for a program written in a non-esoteric programming language
@quartata Can you do me a favor? My challenge (link above), I just wanna check the examples are right and the inputs in the correct order, to not miss anything. I've already done this but I'm worried a bit. Could you help? Thanks!