CMC: captalize the first instance of a given letter in a lower-case string. If the letter is absent, add a space and then the letter in parentheses. foo "hello", "l" => "heLlo"; foo "hi", "l" => "hi (l)".
@Emigna You have overwatch! I want it super bad. I played a round over Christmas and played a large amount of characters. I did play Hanzo. But had four people in my sights with Mcree. Activated ability. And didn't know to click the mouse to start it for about half the time. 0 kills :(
@DestructibleLemon Genji is one of the most mobile characters, and he's designed to flank, meaning most of the time he's separated from his team, and should be healing himself by going for health packs. However a lot of bad genji players will instead stand somewhere behind the enemy team spamming the "I require healing" voice line, expecting his team's mercy to fly to him, which would put her way out of position and likely cause both her and genji to die
A rotation "is made by splitting a string into two pieces and reversing their order". An object is symmetrical under an operation if the object is unchanged after applying said operation. So, a "rotational symmetry" is the fact that a string remains unchanged after "rotation".
Given a non-empty ...
Write a program or a function that takes two non-empty lists of the same length as input and does the following:
uses elements of first list to get numerators,
uses elements of the second list to get denominators,
displays resulting fractions after simplification (2/4=>1/2), separated by "+"s,
...
@DestructibleLemon oh if you want to do a polyglot, use ⎚ (clear) if you want Charcoal at the end, » (well, any character invalid at that position will do) if you want it at the start
@DestructibleLemon Charcoal has no comments, it's a golflang after all
if you answer a decidedly non trivial one there might be 100 rep, but I'm not sure if I do both of those bounties or just one... anyway I guess I'll award the first one done unless a decidedly nontrivial is done at very similar time
Yesterday, I left my sandwich on the table. When I got up today, there was a bite in it... Was it mine? I can't remember...
Problem:
Take a representation of the sandwich and my bite pattern and tell me if it was my bite or not.
Examples:
Example 1:
My bite pattern:
..
.
Sandwich:
#####
...
Noise is unwelcome, whether that's a series of emoji, or a series of emoticons, or a series of meaningless words.
Using the word "spam" in a meaningful sentence is fine. Posting the word "spam" over and over is not
Note that the new chatiquette does not say anything about emoticons or emoji. It just says don't be disruptive and don't make noise. If several messages in a row are nothing but faces, that's disruptive noise and will lead to kicks.
Not my best but here's what I came up with.
import math
import random
import numpy as np
#we create the network of legal edges
global edgeNetwork
edgeNetwork = [[0,1,0,1,1,0,0,0,0],
[1,0,1,0,1,0,0,0,0],
[0,1,0,0,1,1,0,0,0],
[1,0,0,0,1,0,1,0,0],
...
Not well golfed, no byte count, no language header.
How are you Really making those goals from a Text which never could be read by a human? Code golfers are making amazing things from some charter like {⍵≠⊃⊃≠/∘.∨/¨⍺=⊂⍳¨⍴⍵} or qN/W%(~{1$::!\{1a\Te[f.|z}/..^}/W%N*
As a VB programmer I'm prety amazed on them. Can anyone help?
From the Sandbox, 6 months in the making.
Sometimes we need a low voltage, sometimes we need a high voltage. Let's design a VDC power supply!
The challenge is simple, with 2 lines (+5V and GND), Create a Variable DC power supply on a standard breadboard that ranges from +12V (+/-0.1) to 0V.
I...
The breadboard-golf tag wiki doesn't yet specify what that winning criterion should be, and it might be difficult to narrow it down to just one definition that applies to all challenges:
A challenge needs an objective winning criterion
If I want to test an answer, I can wire up the same arrangement but may get different results. If however a specific digital simulator is required by the challenge, then answers can be objectively tested, with everyone agreeing on the result.
I s...
> Any questions that involve making a circuit setup on a breadboard with the smallest bounding box or the least number of pins/spaces occupied should be tagged with this tag. Any other challenges relating to breadboards with other winning criteria should not be breadboard-golf because this tag is for golfing challenges.
> Breadboard-golf is about making the breadboard setup that requires the least number of pins or occupied spaces or bounding box area, depending on what the challenger decides.
The convention is that code-challenge is used whenever the other tags don't fully specify the winning criterion, but I agree that breadboard-golf seems to also cover that, so maybe it could be used on its own
Either way the challenge needs to specify, so code-challenge doesn't seem to add anything
@trichoplax code-challenge is the tag used to categorize questions for which there isn't any other objective winning criterion tag, and the criterion itself must be specified in the challenge I think
I suppose the other argument would be that since breadboard-golf doesn't specify a winning criterion, it should be tagged breadboard and code-challenge and breadboard-golf shouldn't exist as a tag
I don't have a strong preference either way but it would be nice to settle on one or other for consistency
Find the original challenge here
Challenge
Given an integer, Z in the range -2^31 < Z < 2^31, output the number of digits in that number (in base 10).
Rules
You must not use any string functions (in the case of overloading, you must not pass a string into functions which act as both string an...
Find the original challenge here
Challenge
Given an integer, Z in the range -2^31 < Z < 2^31, output the number of digits in that number (in base 10).
Rules
You must not use any string functions (in the case of overloading, you must not pass a string into functions which act as both string an...
Trying to use Jelly for ETH's challenge (I know an answer was posted already) and the first thing that came to mind was head and tail atoms. I haven't quite wrapped my head around the links yet but I figure it has got to be something like ḣ‘ṫ
(heavily inspired by Element of string at specified index)
Given a string s and an integer n representing an index in s, output s with the character at the n-th position removed.
0-indexing and 1-indexing are allowed.
For 0-indexing, n will be non-negative and less than the length of s.
For 1...
What colour is this?
code-golfimage-processing
You are to golf a program that will take a filename as input and you must output what color the file is.
The file is all one color and can have any of the following extensions
.jpg
.png
.svg
.gif
And now to the classic layout due to my OCD.
I...
Download the whole Internet
Your task is to write a program or function than can theoricaly output or save all public/availabe web pages.
Inspiration came thinking if it was a posible solution to this challenge
code-golf internet
From the Sandbox, 6 months in the making.
Sometimes we need a low voltage, sometimes we need a high voltage. Let's design a VDC power supply!
The challenge is simple, with 2 lines (+5V and GND), Create a Variable DC power supply on a standard breadboard that ranges from +12V (+/-0.1) to 0V.
I...
I've been thinking about the never-ending controversy over kolmogorov-complexity dupes, and I'm looking for reactions before writing up a full meta post.
What do people think about the following rule of thumb: for static kolmogorov-complexity questions, if you can't write a reference implementation which is shorter than the shortest output of gzip and bzip2, it's not interesting enough to post.
Well, we can compress pretty much everything better than gzip or bzip2, as they are automatic and we are making it ourselves, which means we can make it much shorter.
Generating a random stream of output when a specific output is required
For example, if a challenge requires you to output 4, you can't output an infinite stream of random digits, and say "4 is in there somewhere!" You must output 4, and no other number.
This is similar to this other loophole.
I'm wondering because of this answer, which isn't deterministic
CMC: Determine the length of a gene in a given RNA sequence: a dna sequence contains the charracters UCAG. Every three letters represent a codon. The length of the gene is the number of codons between a valid start codon (AUG) and a stop codon (UAG, UAA, UGA). Test case: UGA AAA UGC AUG CCG GAC UGA UAA GGG -> 4 (Spaces for clarity, will not be present in input). Multiple stop codons may exist, only one start codon will exist.
We seem to have implied restrictions that code submissions should be deterministic, but this doesn't seem to be well-defined or explicitly restricted as a loophole.
The closest loophole is this one. See this comment, which provides an example where the forbidden loophole would've been used to pr...