« first day (2362 days earlier)      last day (2774 days later) » 

also the question isn't a dupe
nothing's a dupe of the sandbox :P
it is off-topic
CMC: Given a number n, output n-1/n
lambda n:n-1/n
@Mr.Xcoder n=>n-1/n
@totallyhuman Nice, id'say
18:03
,,,, 5 bytes: :1-⇆÷
5 bytes, Pyth: -Qc1Q
cQuents, 9 bytes: #|1:A-1/A
@Mr.Xcoder /-Q1Q would work as well right?
Rod
Rod
@Mr.Xcoder you can drop the trailing Q
Jelly,
18:04
@totallyhuman Nope
@Rod Nope, I can't
@BusinessCat damn, beat me to it xD
@BusinessCat ’÷ would work too right?
@BusinessCat Me too
Thanks for reminding me I forgot about 1/n in Gaia...
@totallyhuman no that would produce 0.9 for 10
18:06
@totallyhuman no
or am i still misunderstanding jelly's chaining
@Rod I wonder why though
@cairdcoinheringaahing wut why
@totallyhuman decrement then divide by input
@totallyhuman that's equivalent to LEFT -> decrement -> divide <- RIGHT but RIGHT is LEFT
18:07
(10-1) / 10
@HyperNeutrino oh
I've come up with some of the most random and useless operators I could think of but forgot about 1/n
why
@cairdcoinheringaahing that is what you're supposed to do
@cairdcoinheringaahing it wouldn't but that would be the right output
18:08
@Mr.Xcoder 5 - (1/5) is 4.8...
  ÷
 / \
’   R
|
L
@BusinessCat It is
@BusinessCat -Qc1Q outputs 4.8
@Mr.Xcoder 8 bytes |n|n-1/n
@CensoredUsername What language?
@CensoredUsername ruby?
18:09
Oh when I ran it the first time it gave me 4.8, I ran it again and it died a horrible death
@totallyhuman n-1/n is n - (1/n) not (n-1)/n (bidmas)
CMC: n -> (n - 1) ÷ n
@HyperNeutrino Even better
18:09
oh
urgh why did i forget order of operations
So ’÷ works for this xD
my ,,, answer is wrong then
@totallyhuman everyone's is
@HyperNeutrino 4 bytes (Pyth): ctQQ
18:10
@HyperNeutrino ,,,, 5 bytes: :1-⇆÷
there :P
@Mr.Xcoder Braingolf: .1,/- Note: Braingolf doesn't do floats, but the logic is still correct
Gaia, 4 sad bytes: :(¤÷
@BusinessCat Ties Pyth
18:11
But Pyth isn't sad
Although it is almost Q_Q
Anyfix, 4 bytes: "’«÷
@HyperNeutrino Ties Pyth :)
@HyperNeutrino that just looks like a collection of quote characters
@HyperNeutrino SOGL, 3 bytes: H./
18:13
my caret reply game is weak today
two bytes are just random things required for stack-based stuff etc, otherwise it's just the jelly answer lol
@totallyhuman lol xD
If you don't know Pyth, I will give you a cookie if you gues what the code Pyth does in Pyth
You only have 3 tries
Pls don't look at the docs
Why isn't Pyth on TIO?!
c is divide, t is decrement?
@LeakyNun wait you are familiar with room mean average how do it even work
18:14
@cairdcoinheringaahing It is
Just to prove the logic is correct:

    .1,/-  Implicit input [n]
    .       Duplicate [n,n]
     1     Push 1 [n,n,1]
      ,     Swap [n,1,n]
       /   Divide [n,(1/n)]
        -  Subtract [(n-(1/n))]

:D
@BusinessCat The program Pyth does not contain c.
@cairdcoinheringaahing tio.run/#pyth
Oh lol I misread that
Oh yeah, I can't read
18:15
[2] + [prime factors of input]
@totallyhuman Nope
@totallyhuman Well, technically it gives correct results, but it's not that
@totallyhuman Nope
@Downgoat room mean average?
you mean root mean square?
> technically it gives correct results, but it's not that
18:16
yes i was a bit late
@LeakyNun ah yes
Hint: An implicit Q is added, so it's technically PythQ
if I want to use to find color at position n (n between 0, 1) between colors a, b
@totallyhuman Give up?
do I just do sqrt((red(a) + red(b)) / b)
18:18
@Mr.Xcoder Head of the tail of the powerset of the prime factors of the input
that doesn't seem right though because then I never reach b
@Downgoat root mean square means root of mean of square
@Mr.Xcoder is that the mathematica builtin for "is this Pyth?"
your mean is wrong and you forgot to square
@Mayube True, but I think you used the debug feature of the herokuapp
@cairdcoinheringaahing No
18:18
@Mr.Xcoder of the what-now?
but i was still right though :P
@Mayube 🍪
@LeakyNun oh my god i am so stupid I just need to root, mean, then square shit I think the sheeps are getting to my brain i am idiot
It is also the prime factors of double the input
I used TIO, I just tested each character individually with different inputs to figure out what they did
18:19
@Mayube You already have that cookie
@Mr.Xcoder different way of saying what i said :P
I will treasure it fore-aaand it's gone
The whole thing is Py, in fact
@totallyhuman Not really
Because t is decrement and h is increment
@Mr.Xcoder the best flavour of pie is Py
False. It's Pi
18:22
@cairdcoinheringaahing False. It's 3.1415
Y'all are high or smth the best flavour of pie is Cherry
I really want to get into an argument about mathematical and computational flavours of pie
false it's Phi
False it's PhiNotPi
@HyperNeutrino False it's PiNotPhi
And I killed the room again >_<
18:24
@LeakyNun I know you know a lot of languages. How strong is your brainf---?
@Mr.Xcoder Killing a joke tends to do that sometimes
@ConorO'Brien for example?
@Mr.Xcoder I kill it more often.
10
Q: Hello World socket server

BerndWrite the shortest program that answers "Hello, World" to a network connection. Conditions: Program shall listen on port 12345 When a client connects, program shall write "Hello, World" to the newly opened socket connection and then close the connection Program shall accept connections in a lo...

@cairdcoinheringaahing That I know
this question was closed years after it was posted o0
18:25
:))
@LeakyNun for example meaning languages that you know?
:o we summoned PhiNotPi
@ConorO'Brien I mean, do you have a task in brainf---?
@HyperNeutrino hi
18:25
yeah, I'm basically trying to figure out how to do while(current cell is zero) { asdf }
@PhiNotPi Look ~15 messages above
@totallyhuman a question from '08 on SO got closed as a dupe of one from a month ago
Yeah I saw.
CMC: Given a string, take the first pair of identical characters where the first character is not at the beginning of the string and then move the character before the first character in the pair and move it to right before the second character in the pair
Test case: PhiNotPi -> PiNotPhi
Java Is Cool -> vaJa Is Cool
> the first character is not at the beginning of the string
18:27
New programming language: vaJa
The first character of the pair
"First Pair" is judged by the position of the first character.
@HyperNeutrino VTC as unclear
@ConorO'Brien +[>[<-]asdf] I think
HyperNeutrino -> HyNerpeutrino
@cairdcoinheringaahing how is that not clear
I VTC too
18:28
VTC here
it's crystal clear, unless you are unable to read...
oh wait
I get it
VTRO
it needs a second message = unclear
no, it doesn't...?
CMC: Given a string, find the first character where the character after it occurs more than once in the string, remove it, and move it right in front of the second occurrence of the character immediately following the first character where the character after it occurs more than once in the string.
18:30
For me it took a second reading, but that's true of most challenges I read, so it may not be about the challenge...
There. Even less clear, but more strictly defined.
take the first pair of identical characters where the first character is not at the beginning of the string, so for PhiNotPi, you ignore the identical Ps, because one is at the beginning, and instead use the identical is. Then take the character before the first i and move it to before the 2nd i
@HyperNeutrino That moves the repeated character, rather than the one before it
18:30
the most unclear thing about this challenge is the use of the word "word"
@HyperNeutrino Java is Cool would be avJa is Cool though
@HyperNeutrino No wait - you're right. But that means it's less clear :P
0
A: Sandbox for Proposed Challenges

Bruce ForteGolf me a memory array This challenge is pretty simple: Your task is to draw a schematic of a (simplified) memory array. You will be given two (positive) integers n,m and the task is to draw the n:2^n decoder connected to the memory array with d data lines. The addressing will be in the order o...

exactly :P
18:31
@HyperNeutrino Fair point. I concede
@HyperNeutrino and HyperNeutrino would become HyerNpeutrino
Machine code did an image challenge in 13 bytes. Machine code is the new Jelly
Let's not have a mass name changing again...
Conor O'Brien would become onCor O'Brien
18:33
lol
No HyperNeutrino -> HyNerpeutrino
would you like an encour? :P
totallyhuman would become toallyhumtan
Conor O'Brien -> noCor O'Brien
@HyperNeutrino no, you said move the character before the first of the pair to before the 2nd of the pair, not vice versa, the P doesn't move
What would my username become?
18:34
er. XcodMr
otherwise PhiNotPi would become PPiNothi`
also assume that the input contains a valid substitution
@Mayube I'm stupid.
you're not even following your own rules now
What, no edge cases?
18:34
Mr. Xcoder becomes r. XcodeMr
> arr! X-code 'em! arr!
Business Cat becomes Bsineuss Cat
Some of us carefully chose a name with no duplicated letters to avoid just such problems
likewise
18:36
i don't know how it works but what would my username be
Dennis becomes Dnenis
Okx
Okx
Okx becomes Okx?
@totallyhuman [i'm stupid]
@totallyhuman I already said, it becomes toallyhumtan
@Okx Okx is invalid input
Okx
Okx
18:36
How dare you say I am invalid‽
2
@HyperNeutrino the a pair comes first, not the l pair
I guess aaa becomes aaa.
Baa would become aBa
18:37
@Mayube I like how you understand my challenge better than I do
That's because I actually read :P
lol
now someone solve it actually xD
only if i understand it
it's like how other people outgolf me in my own language
Random question: What are the chances that if I pick a random 5 digit number, it is the product of exactly 2 primes
18:38
@totallyhuman find the first pair of identical characters that does not include the first character in a string, take the character before the first in the pair, and move it to before the 2nd in the pair
@BusinessCat x/89999 where x is the number of 5 digit product of 2 primes there are
@BusinessCat I think that's a brute force question
yeah bruteforce is probably the only way to calculate x
Assuming you pick the 5 digit number uniformly from those with no leading zeroes?
@BusinessCat I'll try to create a Pyth program for that
18:41
what's the largest prime that can be multiplied with another prime to create a 5 digit number?
or better yet, what's the largest prime < 5000?
err wait
largest prime < 50000?
Try SQRT(99999)
Okx
Okx
@Mayube 49999
@trichoplax it'll be a lot bigger than that
@Okx is that really prime?
18:42
Rather than checking all the way up to 50000
Okx
Okx
yes
it's actually prime lol
@trichoplax product of any 2 primes includes 49999 * 2 though
Okx
Okx
CMC: Largest prime strictly below X
p sure Jelly has a builtin
f=x=>x.split` `.map(e=>i?e:(i=e.match(/(.)(.)(.*)\2(.*)/))?i[3]+i[2]+i[1]+i[2]+i[4]:e,i=0).join` `
18:43
05AB1E might too
does Pyth?
Okx
Okx
neim has a 1 byte builtin :)
@Mayube Does pyth what?
98 bytes
@Mr.Xcoder have a builtin for largest prime below X
@HyperNeutrino Pyth, 31 bytes: Jxm>/[email protected]@ztJ
18:43
@Mayube Nope
@Mayube no
Ninja'd
@LeakyNun nice
@Mayube Excellent point. I'll be quiet now :P
18:44
@HyperNeutrino too long
@trichoplax How goes preparations for the anthill KOTH?
@Okx Jelly, 2 bytes: Æp
as long as it's shorter than 1/5 of the python solution, it's not too long xD (:p)
@Mayube you mean QOTH :P
18:45
@ConorO'Brien nice
QOTAH
Okx
Okx
"Jelly, bytes" - Jelly is so short you don't even need to say how many bytes
Note: It's golfier to say b instead of bytes
Also unnecessary whitespace after the comma
The fun fact is that I don't know Jelly
@Mayube I need to fix a minor bug with what gets hidden when running with no display for high speed tournaments, and I need to decide whether to leave the food uniformly distributed or make it more clumped. Then unless more bugs get reported it's ready to go
18:46
hey anybody know of a guide to doing tests for your code?
I have a regex substitution solution for my challenge
specifically python
@Mr.Xcoder Jelly,2b:Æp Outgolfed :D
i want to learn how to write tests
@totallyhuman I like doctest for simple things - it might be a good place to start
18:46
Whatever type of regex Atom uses:
(.+)(.)(.)(.*)\3(.+) -> $1$3$4$2$3$5
> Atom
yes atom
Text Editor
@totallyhuman TIO Header: code=""". Footer: """<newline>while True:exec(code)
no atom
18:47
find and replace
why atom
@HyperNeutrino Pyth, 25 bytes: A<tMht#xRCMzCMz2XH.DzG@zG
cuz i liek it
^^ nice
@Mr.Xcoder :P
@LeakyNun Wooow
@HyperNeutrino Vim: :%s/(.+)(.)(.)(.*)\3(.+)/$1$3$4$2$3$5/ ;)
18:47
lol
@trichoplax oh thanks
My first Jelly CMC answer, yaaay!
I don't like Pyth, it feels too much like what Braingolf could've been if Braingolf wasn't total shit
@HyperNeutrino would (.)(.)(.*)\2 -> $2$3$1$2 work?
lambda s:re.sub(r'(.)(.)(.*)\2',r'\2\3\1\2',s)
import re
18:48
@LeakyNun yup
don't need full matches ;P
CMC: Given a regex find and regex replace, golf the find and replace by removing any groups from the start and end that are not referenced except for in the same order at the start and end of the replace part
@HyperNeutrino k let's tone it down a lil sweetie
Can't we have a close reason called Acutely boring? Not for any of the CMCs above, just in general
CMC: Replace all instances of y in a string with ie
18:52
That's not a close reason, just a downvote reason...
yeah boring is way too subjective to be a good close reason
Plus plenty of really exciting challenges get closed - interesting isn't enough to be on topic.
lambda s:s.replace('y','ie')
i mean...
@Mayube Pyth, 8 bytes: :Q\y"ie (*-1 thanks to Leaky)
VTC: boring
Not so fast, I'm doing it in ><>
@DJMcMayhem It'd be cool if that was the actual solution in Vitsy.
@Challenger5 knows what's up
OMG, My Pyth answer is longer than a fifth of the Python one... WHoops
18:54
@Mr.Xcoder \y is the same as "y"
@LeakyNun Didn't know. Thanks!
,,, (10 minutes from now), 7 bytes: 'y"ie"P
or maybe not P
@totallyhuman Is it just me or are half of the features in ,,, from CMCs? xD
7 bytes, forgot to edit
and the other half from challenges lol
anybody have a good unicode character for replace?
18:55
@Mr.Xcoder If it's obviously not golfable any more it's not too long :P
That's my philosophy with foam. When you see a challenge, you say "what built-in would let you solve this elegantly?" and then add that builtin.
@totallyhuman ®... Markdown... I mean: ®
Good enough?
@Challenger5 similar to how I do Braingolf too, although I try to avoid builtins that I think would be too niche
@totallyhuman
@Mayube SOGL, 6 bytes: y”ie”ŗ
18:57
c'mon you guys got no graphical ones? :P
@totallyhuman
@Mayube I honestly don't care with Foam. The two design philosophies are "unreadable" and "built-in for everything".
@totallyhuman
§... Like in switch
@Challenger5 this is my favourite braingolf example of "Hey if I added this it'd make this challenge way easier"

« first day (2362 days earlier)      last day (2774 days later) »