12
2
Damn, that's a lot of carrots.
The Inspiration
The Task
You must create a program, that, in as many languages as possible, replaces every instance of ^
with a markdown formatted link (meaning that if I was to post it in an answer, it would automatically read it as an image and place the image instead of the words) of this upward facing carrot.
How to Use Said Formatting:
First, anywhere in the file, put in the link like so (this is what I did for this question):
[1]: http://i.stack.imgur.com/mecHl.png
And then, wherever you want it:
[![][1]][1]
Rules
- Standard Loopholes apply.
- Input will be through STDIN or equivalent.
- Output will be through STDOUT or equivalent.
- Your code must be a fully operating program in all languages that you use.
- The URL that you use for your carrot does not have to be the one in this answer. This was just an example. You may use any URL, provided that SE's Markdown shows this specific carrot with it.
- This is a polyglot challenge, so the answer with the greatest amount of
carrotslanguages wins!- In the case of a tie, the shortest code size of the entries with the largest number of languages wins.
EDIT:
- Also, do NOT use trivial derivatives of languages! This means using a substitution language (Brainfuck vs. ShadyAsFuck) and different language versions (Python 2 vs. Python 3).
There's a lot trivial esolangs to fit... (including 9001 BF variants)
Don't be that guy.
Note: Yes, this program will be slightly trivial in languages with regex support. However, the competition is to see how many languages the competitors can use.
I don't understand the replacement (this part:
[![http://i.stack.imgur.com/mecHl.png][1]][1]
) – Zereges – 2015-10-30T08:35:39.407@Zereges What don't you understand about it? If you want another example of this, click on "Add an Answer" and then hit the image button. It'll auto construct the image markdown for you, just as shown in this question. – Addison Crump – 2015-10-30T08:38:01.623
Oh, I see, I didn't realized, that imagelinks are that complex. – Zereges – 2015-10-30T08:39:32.373
Can't you just use
![](//i.stack.imgur.com/mecHl.png)
? – grc – 2015-10-30T09:57:03.350For the purpose of this contest, I'm restricting it to the way described. Note that this is also the default formatting for inserting a picture into a post. – Addison Crump – 2015-10-30T10:09:53.423
Can we choose any method for I/O? Are functions allowed? – Fabian Schmengler – 2015-10-30T10:11:33.293
It should be a full program in whatever languages you choose, and input is through STDIN. I'll add that in for clarification. @fschmengler – Addison Crump – 2015-10-30T10:13:47.190
4Carrots forever! ^^^ – user41805 – 2015-10-30T11:40:35.753
1
First, anywhere in the ,
I'm not sure which word is missing there. – trichoplax – 2015-10-30T15:09:06.740@trichoplax It was supposed to say "file". Put it in, sorry for the <s>ambiguity</s> lack of word. – Addison Crump – 2015-10-30T16:26:22.013
2@FryAmTheEggman, it makes no sense for a question to be tagged both [tag:polyglot] and [tag:rosetta-stone]. – Peter Taylor – 2015-10-30T16:50:18.523
@FryAmTheEggman That would mean writing separate programs that do the same thing. A polyglot is something that does it in as many languages as possible with one program. – Addison Crump – 2015-10-30T16:57:13.427
@VoteToClose ok I can't read. My bad :S – FryAmTheEggman – 2015-10-30T17:00:31.660
@VoteToClose Is just
[![][1]][1]
allowed once the[1]: http://i.stack.imgur.com/mecHl.png
is placed? Why have the extra link in the alt text? – Calvin's Hobbies – 2015-10-30T18:29:25.600And does the
[1]
have to contain a1
? Any alphanumeric string in the brackets works. – Calvin's Hobbies – 2015-10-30T18:31:03.767It can be any number, but to simplify the problem, I used
1
. For the purpose of this challenge, it's not necessary. I will remove the link in the second item, though, thanks for pointing that out. @Calvin'sHobbies – Addison Crump – 2015-10-30T18:58:23.143@KritixiLithos I answered in Carrot just for you! Although it is only one language it shouldn't be hard to extend to more than one. – TheLethalCoder – 2017-07-05T10:26:48.830