Voting while participating
As it's a contest it doesn't make sense to vote for other answers - does it?
Should I vote for the puzzle? Isn't the participation already a vote?
Voting while not participating
Beside the code-length, what are other usual motives to vote?
Considering that i have ...
Rock, Paper, Scissors, Load, Shoot, Block, Mirror, Plasma-shot, Ammo-block, Punch, Bazooka, Super load, and so on and so forth
This is an abomination of a king-of-the-hill challenge.
Two bots are fighting to the death, but the rules keep changing.
Each turn both bots have the same set of 3 rand...
Challenge
A simple challenge: given two or more strings, output all of the substrings that are in each string.
Rules
Input is always a comma separated list of strings
Strings should be outputted from longest to shortest length without duplicates
Strings should preserve whitespace
Examples
...
We do a variant of Swiss sometimes in bridge. you have a team of one north-south pair and one east-west pair so that your team's performance at either position on the board affects who you play
@DJMcMayhem, I just improved the pushing part by pushing a couple of 0s at the beginning to abuse [] and combined a couple of the other numbers, like the two 10s. I also changed the decrement in the loop to an increment. I have a spread out version, but I can’t post it right now
@J.Sallé hey, JS isn't that bad, it just implicitly casts a lot, kinda like Perl. it was designed to fail as little as possible, so if you mess one thing up the rest probably still works
@betseg remember, JS was designed to be basically idiot-proof
Recreate the variant of the menu of the popular '99 Varieties of Dosa' listed below.
(Note: Despite the name, the list contains 103 varieties and not exactly 99)
The desired output is the following list (in any order):
Sada Dosa
Cheese Sada Dosa
Paneer Sada Dosa
Paneer Cheese Sada Dosa
Schezw...
The Weaver
I've been recently playing through 'The Weaver' and I think it presents an interesting challenge for code-golf.
Premise:
The Weaver is a game wherein you are given a number of ribbons coming from 2 directions 90 degrees apart and your goal is to swap them at certain intersections to...
How does one reverse the match of a Retina regex? Currently it returns 0 for Truthy and 1 for Falsey in a challenge I just did (codegolf.stackexchange.com/a/162670/52210). What would be the best way to inverse this result? I'm not too skilled in Retina..
@KevinCruijssen Try it online! is probably easiest. Note that your original code seems to have two bugs, in that a) it was case sensitive b) it could return values other than 0 or 1 in some cases
The contextlinks weight loss pills will be shipped to one's home and sometimes this is done for free. If you've paid any attention at all to the problems that have been affecting people in this country lately, then you are probably well aware that losing weight is a top concern. Read through this...
@Neil I had indeed forgot the case insensitivity. And I wil add you code as a remark to my answer. Also, about the second part you mentioned, which test cases would return a value other than 0 or 1?
It's because for actually includes the parentheses as part of the grammar, where as the other statements are simply seeing a parenthetical expression, which is an expression wrapped in quotes.
The right parenthesis in the for statement is simply saying "I am not providing any more statements", which is useful in a few situations, such as this one.
If you haven't had a play with Dyalog APL at TIO (Try It Online) then take a look at Leigh Mercer's mathematical limerick expressed in APL https://tio.run/##TU8xbsJAEOx5xdTYQOwYoRQUKGnoKPKBI7c2J9l35M62ZB5AEQmUJqJKlUf4Af6JPwJrAyJTzUozOzNim45kJVKTnBm23X97kyBEEEUIn4D28IsFpNmR9iGQWOMcEy35cB/Gkj@wHpuem1M0bOoQPTrXKi0c8o0lQq4y6jjBfRbCEqwxOUyM2BSWHzQ1f5jhgc7/pkolSWJdwVHJ8degaXMKgv@6PidW5T2G0pt6/jIM0X79oT3@vL6z9TZn6aCVvneR/RjNfQTWKkfGm8YX
@Adám :/ why use PCRE if you have .NET though? also: I'd probably ?: at the start but it probably wouldn't make a difference here, and I'm not sure you should be matching the whitespace as well
@EriktheOutgolfer It doesn't really matter, as that shouldn't occur, but I guess I should count the total number of question marks. Or maybe the longest group.
@Mego There's a site called php sadness that does just that
Anonymous
1:41 PM
@J.Sallé Because that's unnecessary-but-valid code, and is language-agnostic. This list is just stupid PHP stuff that would work in a sane language, but causes problems in PHP
In this context, we are talking about Google's server. You can't make arbitrary Ajax queries to random servers, the browser security model doesn't allow that.
or write a browser extension to add the functionality in. it might be possible without an extension in Vivaldi, but idk
not related to current discussion: would it be possible to write a function accepting two integers and a number from 0-15 (which is used as the truth table) that has better than terribad performance
2. good idea but it's not like anyone would want to use it to operate on arrays, especially if it's a fully interpreted language (i.e. really high call cost already)
I've built many mobile applications both for Android and iOS at my day job and honestly, the hardest part of the whole thing is always the tooling. Build tools throwing obscure errors, dependency management, certificate passing hell etc.
@Neil I think it's not something as relevant in English as it is in Portuguese. "climbing up the stairs" is completely right in English, but if you translate it into Portuguese it becomes hideous because it's a clear pleonasm
Uhm, does someone do a lot of Java? I'm reviewing Java code for a project and don't understand why others keep doing void foo() { { /* CODE */ } }.. What's the point of opening a new scope? There's no code before or after that new scope :S
Uhm ok, why would I want to hide fields anyway.. But if this is the only usage, these people are just wasting bytes on {} and more indentation without any effect whatsoever
Cleanup after Easter
king-of-the-hilljavascript
As most people (probably) know, Easter was about a month ago. But around the community oark, there're still some eggs hidden! Can you build a (Javascript only, please) bot to help us find them?
The Course:
The bots will compete on a 201 by 201 f...
@StephenLeppik Someone posted spam on it. It was deleted almost immediately, but that still bumped it to the front page. From there, someone must have seen it and upvoted it
All Light! code-golf
This challenge is completely ripped offheavily inspired by All Light, developed by Soulgit Games.
Challenge
You are an electrician, and it's your job to wire up all the lights to the battery.
The lights and battery are laid out in a grid.
You can connect a light or batte...
Bots counting to 11
Still to do in the question
More examples of correct formatting
More specifics on formatting
A childhood game designed to help children learn to count in french in Canadian schools is played as follows:
Students go around the room counting up to 11
A number greater than...