The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
Apr 26, 2018 15:49
Thanks for finding a new trick for me to use :)
Apr 26, 2018 15:46
@Cowsquack If you don't give a pattern to match it will use the pattern from the previous substitution. I didn't know this feature existed. I only realized it because I happened to run sss123s.
Apr 26, 2018 15:34
@Cowsquack link?
Mar 12, 2018 22:32
@seshoumara I have to go for now. Ping me if I can help with anything else.
Mar 12, 2018 22:25
This will print " y":
echo "; x x y y"|sed -r 's/;(( .+)\2)*$/\2/'
Mar 12, 2018 22:24
\2 is overwritten the next time (.+) is matched.
Mar 12, 2018 22:23
The * basically makes this /;(.+)\1(.+)\2/p
Mar 12, 2018 22:22
g would just allow the whole pattern to match multiple times across the line.
Mar 12, 2018 22:16
On the second time through (from the * at the end) it captures a new string.
Mar 12, 2018 22:15
I think it's matching " x" not " x x". it's closer to <string1><string1><string2><string2> I think.
Mar 12, 2018 22:13
I don't even have time to follow new questions anymore :(
Mar 12, 2018 22:12
I just got moved to a new project that's behind schedule and have been working a lot of extra hours. I worked my first Saturday last weekend.
Mar 12, 2018 22:10
@seshoumara Hi to you too. I haven't seen you here in a long time (might be because I'm not very active anymore)
Mar 12, 2018 22:09
; matches the ";"
your second capture group (.+) matches "<space>x"
the \2 matches "<space>x"
Now we repeat the first capture group but this time match "<space>y" for both
there aren't any characters left, so the $ matches the empty string at the end.
Does that make sense? I haven't used sed in a little while.
Nov 2, 2017 21:04
@Mr.Xcoder That's definitely one thing it really struggles with
Nov 2, 2017 20:58
@Mr.Xcoder м is push a.remove(all elements of b), but it seems to only work on strings
Nov 2, 2017 13:32
@Mr.Xcoder 05AB1E, 5 bytes: žOÃÃÙ
Oct 26, 2017 22:16
@ASCII-only True. Didn't look at that.
Oct 26, 2017 22:15
@ASCII-only @Uriel September 11
Oct 26, 2017 22:13
Sep 20, 2017 20:11
@Mr.Xcoder 05AB1E, 3 bytes: %_O
Sep 19, 2017 14:46
@FunkyComputerMan I thought it could go either way (leaning toward looking for help), but 4 others marked it as off topic because it's a stack overflow question. Either way it's now deleted by the author.
Sep 15, 2017 15:23
@Neil ø and ζ
 

 The Third Stack

A chat room for discussing the Brain-Flak programming language...
Dec 19, 2017 22:35
@DJMcMayhem I'm a little late, but ((((([()]))))) is 14 bytes and output 15 bytes.
Nov 30, 2017 20:33
I'm glad I didn't try to figure out the OEIS sequence or the math behind it. I don't even know what half of the words the title mean.
Nov 30, 2017 20:30
I was really close to yours with that first one I posted here.
Nov 30, 2017 20:21
It's surprising how often there are multiple solutions with the same byte count.
Nov 30, 2017 20:17
Was mine the same as yours?
Nov 30, 2017 20:15
That was really fun, but I mostly just got lucky.
Nov 30, 2017 20:09
@WheatWizard I think I got it :)
Nov 30, 2017 19:52
I did, but I basically had this already.
Nov 30, 2017 19:46
This prints the right thing, but is 2 bytes too long. tio.run/##SypKzMzTTctJzP7/…
Nov 30, 2017 19:40
Nov 30, 2017 19:24
That probably means I'm way off though.
Nov 30, 2017 19:20
@WheatWizard I think I'm really close to getting this. I'm only one off. 10993593 instead of 10993592
Oct 26, 2017 21:38
This one. No, and I reverse the stack 4 times, but there is too much other stuff going on to do this more than once.
Oct 26, 2017 21:28
It only saved 2 bytes on one answer. I thought it would have been a lot more than that. It's too bad you can't search for brain-flak code.
Oct 26, 2017 21:11
I bet I have a bunch of answers that I could improve with that.
Oct 26, 2017 21:09
@DJMcMayhem I've never seen that trick before. It's genius.
Sep 15, 2017 13:34
Yeah. Yours is definitely better even if it's a little longer
Sep 15, 2017 13:33
Yep.
Sep 15, 2017 13:33
P for pad. It makes the program not a palindrome.
Sep 15, 2017 13:30
 

 05AB1E - Oasis

For discussing and golfing in 05AB1E and Oasis
Oct 18, 2017 21:39
I forgot about that too...
Oct 18, 2017 21:37
What does å do if the first argument is a list? I can only get it to return 0 or [0]
Oct 18, 2017 21:27
Wait, I don't think that works
Oct 18, 2017 21:26
Not that I know of, but ʒå} should work.
Oct 18, 2017 20:51
@MagicOctopusUrn ÅA Does Arithmetic mean
Oct 12, 2017 13:13
My vote is for 3 also. It only takes one extra byte to get to 1 and 2.