Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A competition to solve a particular problem through the usage and manipulation of strings.
1
vote
Simple cat program
OIL, 12 bytes
Can handle infinite input, but the input has to be newline-terminated (any other way isn't possible in OIL currently).
5
9
4
9
11
6
1
vote
Simple cat program
Aceto, 5 bytes
When reading input, Aceto always waits for a newline, meaning input has to be \n-terminated.
pn
r<
In the current version, EOF will crash the program, but that only prints to STDERR.
0
votes
Print the missing characters
Aceto, 38 bytes
cC|d
dXpc
=`I&
LM-1I
d@7F&
€92-
r4*2
Explanation
We first read the input string and explode it (€, put the characters on the stack). …
0
votes
Who has a comma for a middle name?
Aceto, 21 17 bytes
,p p
'@'p
pQ$d
r-
I'm sure we can fit this into a 4x4, but I just couldn't do it..
Reads a value, splits it on whitespace, "unqueues" it (a b c -> c a b), prints the first element, …
0
votes
Same length, different string
Aceto, 16 12 9 bytes
=01`
,'pO
Run with -F to see immediate output (but works without).
Explanation:
We read a character, then push the character 0 on the stack and test for equality:
=0
,'
If equal …
2
votes
Print invisible text
Aceto, 5 bytes
Trivial in Aceto:
p
,'O
Reads a character, pushes a space, prints it, and goes back to the start.
0
votes
Create a Parrot Program
Aceto, 8 bytes
>v
np
rk
Uses sticky mode to avoid having to duplicate the string. …
0
votes
Create a Parrot Program
OIL, 12 bytes
5
4
11
6
2
Read a value into the 0th line, print the value in the 0th line, print a newline, then jump to line 2.
6
votes
Read a password
Aceto, 8 7 6 bytes
,!`XpO
Explanation:
Read a character (,), negate it (!) and conditionally exit. Print the zero on top of the stack (p) and go back to the beginning.
Run with -F to see the effect i …
4
votes
I'm symmetric, not palindromic!
Python 3, 211 208 195 bytes
lambda S,p="()<>[]{}qpbd\/",s=" !\"'+*-.:=AHIMOTUVWXY^_ovwx|":(S==S.translate({ord(s[2*x]):s[2*x+1]for s in(p,p[::-1])for x in range(7)})[::-1])*(~len(S)%2*s[len(S)//2]in s …
1
vote
Full Width Text
OIL, 52 49 bytes noncompeting
Note: The second line contains a space character.
5
12
0
23
10
24
3
7
10
4
24
4
1
8
11
1
11
6
6
5
I explode the input string, then print each character and then a space …
3
votes
Bernardino identifies unaltered dollar words
We duplicate the empty string, read a single character (,), duplicate that character, and move it to the original stack ({). … Still on the right stack, we compare the top two values (the empty string and our character) and use the conditional mirror to jump to the right edge if they are equal: =|. …
4
votes
Prefix Notation to Postfix Notation
Python 3, 117 112 105 100 98 76 62 61 59 bytes
def p(s):x=next(s);yield from[x]*(x>"-")or[*p(s),*p(s),"-"]
Changelog:
removed linebreaks where possible (-5 bytes)
lambda instead of a full functio …
1
vote
"DDoouubbllee ssppeeaakk!!"
Aceto: 5 bytes
,dppO
Doesn't work on TIO, because it hangs indefinitely. Buffering might prevent you from seeing the result, run with -F to immediately flush all output.
1
vote
Divisible strings
rM@dp
Explanation
We read a string and €xplode it, push the stack length and Memorize that.
Then, after setting the exception catch point (@), we always duplicate the top stack element, negate (!) … it, and m|rror horizontally if we get a truthy value (string has ended; we popped a 0). Otherwise, we get the ordinal of the character, Load the memorized value and do modulo (%). …