« first day (2375 days earlier)      last day (2469 days later) » 

Anonymous
2:00 PM
So many ninjas in here
 
Woah, that exponentially generates responses
 
@trichoplax let's find out
Dunno what e.g.f. is though
 
@Mego did I use it incorrectly, or is it incorrect on the OEIS?
@orlp e.g.: function
 
@orlp OK, it was just misleading short term behaviour...
 
Anonymous
2:01 PM
@StepHen I didn't look at OEIS, but the 2^n term in the denominator shouldn't be there
 
@Mego actually it should
because the golden ratio is (1+sqrt(5))/2
 
OEIS says:
 
@Mego Is that just the 2's from your phis?
 
F(n) = ((1+sqrt(5))^n-(1-sqrt(5))^n)/(2^n*sqrt(5)).
Alternatively, F(n) = ((1/2+sqrt(5)/2)^n-(1/2-sqrt(5)/2)^n)/sqrt(5).
 
Anonymous
Gah I should use MathJax. Trying to read flat equations is hard.
 
Anonymous
2:03 PM
I missed that the /2 terms weren't in the numerator because of the mess of parentheses
 
Anonymous
I should never try Lisp :P
 
fib=lambda n:(4<<n*(3+n))//((4<<2*n)-(2<<n)-1)&~-(2<<n)
This is using the g.f. right?
 
6 mins ago, by orlp
my solution is based on the generating function
 
@orlp ok
 
Anonymous
Oh I see now. I also missed that message in the sea of other messages :P
 
2:07 PM
"🚮🐕3" -emojicode
 
Wonder if this calculator's got bitwise operators
 
@totallyhuman cQuents does
as of 2 days ago
 
Cquents is not a calculator :P
 
@totallyhuman no it's a sequence generator, even better - you can calculate the result of your math infinitely many times
Just do :1+2 and it'll tell you it's 3, a lot
 
@orlp let's do a real solution based on generating function
 
2:10 PM
Looks like it does not :c
 
@LeakyNun define real solution
 
0
A: Sandbox for Proposed Challenges

Magic Octopus UrnEncrypt/Decrypt a Decimal in Binary Given either an integer a or two integers b and c, either encrypt or decrypt the integer(s). Encrpytion Given a=11100092, for example: Split a into consecutive runs: [111,000,9,2]. Replace all runs with alternating 1's and 0's starting with 1: [111,000,1...

 
@orlp you really generate the array instead of using bitwise hacks
 
no i'm talking about this calculator
it doesn't have bitwise operators :c
 
@LeakyNun generate the array of what
 
2:12 PM
@orlp of the coefficients of the power series
 
@LeakyNun that's just the fibonacci series itself :P
 
@orlp I mean, how can we use the gf x/(1-x-x^2)?
if I didn't know that it is the fib series to begin with?
do I need to do (x+x^2) + (x+x^2)^2 + ...?
 
@LeakyNun for that, you write an answer to this challenge: codegolf.stackexchange.com/questions/130341/…
 
@orlp never mind :P
 
but I'm interested in the same thing as you are
 
2:15 PM
Actually I do have an algorithm but I don't want to implement it now
 
given a generating function
 
It's mostly convolution
 
how do you extract coefficients
 
1 min ago, by Leaky Nun
do I need to do (x+x^2) + (x+x^2)^2 + ...?
Using this method
 
well, I'm interested more generally
not just rational functions
 
2:15 PM
heh?
 
@Mr.Xcoder APL: ⊃∘⎕A
 
and also for other kinds of generating function
like e.g.fs
@LeakyNun for example
f(x) = (1 - sqrt(1 - 4*x)) / (2*x)
 
@orlp oh, ...
 
@LeakyNun can you find the coefficients of this function? what series does it generate?
 
@orlp well I can use the generalized binomial theorem
 
2:20 PM
@LeakyNun (it was a real challenge question btw, I didn't just randomly make that up, it's a well-known series)
 
@orlp I can probably find the coefficients but I can't probably identify the series
 
@LeakyNun surely you can
what do you normally do when you have a bunch of numbers and want to find the series? :P
 
@orlp I ain't gonna use OEIS
 
@LeakyNun why not?
 
@orlp that's cheating
 
2:23 PM
@LeakyNun in this context I would consider it cheating if you directly put in the g.f., but after you got a couple coefficients and put that in I wouldn't consider it cheating
the goal, after all, is to extract coefficients from a given generating function
 
so, sqrt(1-4x) = 1 - 2x + 2x ...
I can't do mental math
 
0
A: Sandbox for Proposed Challenges

OkiChallenge Given a string of indented text, complete it with braces and semicolons based off its indentation. All braces/semicolons should be placed starting at a fixed column. The challenge is inspired by this screenshot Input and output will be a string [or an array of strings by choice] Inpu...

 
def f(n):k=9**n;return k**-~-~n/~-(k*~-k)%k
this works too?
i found it on the fibonacci question
 
> -~-~n
 
@totallyhuman that's just the gf
 
2:28 PM
@StepHen obfuscation is quite the craze
 
f(x) = (1 - sqrt(1 - 4*x)) / (2*x)
2xf - 1 = sqrt(1-4x)
4xxff - 4xf + 1 = 1 - 4x
xxff - xf + 4 = 0
 
ofc my recursive 1-indexed solution trumps all of your silly math nonsense :P f=lambda n:n<3or f(n-2)+f(n-1)
 
@orlp You know, I've never liked imaginary numbers, mostly because I never had a teacher when I learned about them
 
@StepHen when x <= 0.25, there are no imaginary numbers involved
but you misunderstand generating functions
 
@orlp I do
 
2:33 PM
you never evaluate the generating function for a specific x
 
0
Q: (Cpp)Why does input value fill in automatically?

user151005Hi there i'm learning cpp as a beginner my value of x will be filled into the y value. The code is suppose to ask the user if they have a calculator and the user is suppose to respond. It skip the cin>>y; and prints cout <<"Cool,thanks!"<

 
@NewMainPosts Wow, not only is that off-topic, but there's no way we could help even if it was
 
@BusinessCat "my code should do this, here's a sideways picture of half the output"
 
2:38 PM
"plz send teh codez"
 
that was fast
 
10 views
Nice
 
@totallyhuman Here you go
That's what was wanted right
 
@BusinessCat No, it was supposed to output 7 if you entered 3, but he forgot to tell you
 
2:42 PM
xxff - xf + x = 0
xf - f + 1 = 0
a(n) - a(n+1) + 1 = 0
a(n+1) = a(n) + 1
seems to be wrong @orlp
 
yes, that's wrong
 
f(x) = (1 - sqrt(1 - 4*x)) / (2*x)
2xf - 1 = -sqrt(1-4x)
4xxff - 4xf + 1 = 1 - 4x
4xxff - 4xf + 4x = 0
xff - f + 1 = 0
f = 1 + xff
right, I forgot to square it
 
that is correct
@LeakyNun now you gotta ask yourself, what does it meant to square a generating function :)
 
@orlp convolution with itself :p
 
can you write that in sum form?
 
2:49 PM
@orlp sure
 
maybe there's a hint there :)
 
a5 = a0a4 + a1a3 + a2a2 + a3a1 + a4a0
and a0 = 1 of course
 
@LeakyNun now write f(x) = 1 + xf(x)^2 in sums of a(n)
where a(n) is the mystery series
 
@orlp I just wrote it?
 
no
 
2:53 PM
@orlp well, a(n) = sum(i=0..n-1,a(i)a(n-i-1))?
 
e.g. $f(x) = \sum_{n=1}^\infty a(n)x^n$
then you get $\sum_{n=1}^\infty a(n)x^n = 1 + x\sum_{n=1}^\infty \sum_{k=0}^{n-1} a(k)a(n-1-k)x^n$
 
that took you 3 minutes to type :)
 
we can ignore the 1, as it only effects one term
($a(0)$)
@LeakyNun btw you have chatjax enabled, yes?
 
@orlp yes
 
otherwise this is a total pain
 
2:57 PM
@orlp I think I can still read it without the chatjax :p
@orlp the left hand side should have $n=0$ :p
 
on both sides, actually
 
right
 
so we get $\sum_{n=0}^\infty a(n)x^n = x\sum_{n=0}^\infty \sum_{k=0}^{n-1} a(k)a(n-1-k)x^n$
dividing both sides by $x$ we get
 
and you should have $k=-1$
or shift the entire sum by $1$
 
we get $\sum_{n=0}^\infty a(n)x^{n-1} = \sum_{n=0}^\infty \sum_{k=0}^{n-1} a(k)a(n-1-k)x^n$
which you can also write as
$\sum_{n=0}^\infty a(n+1)x^{n} = \sum_{n=0}^\infty \sum_{k=0}^{n-1} a(k)a(n-1-k)x^n$
which means our series in question has the identity
$a(n+1) = \sum_{k=0}^{n-1} a(k)a(n-1-k)$
simplified a bit
$a(n+1) = \sum_{k=1}^{n} a(k)a(n-k)$
 
3:02 PM
@orlp that's pretty much what I wrote?
9 mins ago, by Leaky Nun
@orlp well, a(n) = sum(i=0..n-1,a(i)a(n-i-1))?
 
@LeakyNun oh, I thought you were still talking about f
zzz
you skipped all intermediary steps :P
 
lol
so are we basically done?
 
alright, off by 1 errors notwithstanding (I'm sure both you and me made a mistake somewhere in the sum limits), what series is this
 
@orlp our solutions are actually equivalent, I think
well, a0=1, a1=1*1=1, a2=1*1+1*1=2, a3=1*2+1*1+2*1=5, a4=1*5+1*2+2*1+5*1=14, ...
1,1,2,5,14,...
what series is this...
 
@NathanMerrill That one's less clear-cut. Haven't made up my mind yet.
 
3:05 PM
Catalan? @orlp
 
@LeakyNun correct
 
lol, I'm surprised I recognize it
 
1
Q: Count the word from matrix

Mickey JackBackStory Given a square matrix of alphabets which contain English letters in arbitrary manner. While searching a word in it, you can go left to right horizontally, vertically downwards or diagonally towards left (both upwards and downwards). You have to find the number of matches of a given wo...

 
more surprised by the recursive formulation of Catalan
 
@Dennis so you're definitely against "all winners" but not necessarily against "some winners"
 
3:06 PM
and even more curious about how they are equivalent
 
@NewMainPosts This guy has a bunch of deleted answers because of competitions. Is this one too?
 
are you not surprised the catalan numbers have a simple ogf?
 
@orlp I am
 
but I want to know
what is the broadest set of generating functions
we can programmatically get coefficients out of
using a predetermined algorithm
 
@orlp I think we have basically exp,ln,pow, at most?
 
3:07 PM
and without writing a full-blown CAS that actually tries to solve the euqations
@LeakyNun I don't know
for example (1 - sqrt(1 - 4*x)) / (2*x) is already a bit more complicated
because of the square root
 
@orlp that's just generalized binomial theorem
 
but what about sqrt(x*sqrt(1 + x))?
it's not that simple
 
@orlp I'm not sure if that is possible
 
0
Q: What is the broadest set of generating functions with guaranteed direct solutions for their coefficients?

orlpGiven a rational ordinary generating function we can directly compute the coefficients of that generating function. What is the broadest set of generating functions that allow for direct computation of their coefficients? I'm interested in both ordinary and exponential generating functions. Wit...

 
@NathanMerrill This is beyond what I think about this. The rules in our help center make challenges without objective winning criteria off topic. Unless that changes, entirely cooperative KotHs don't even require discussion.
 
3:08 PM
I asked a question
 
the 1 is missing from the first sqrt
 
but no one answered
 
So the thing inside the outermost sqrt has no constant term
 
@LeakyNun it does, the constant term is 0 :)
but what about sqrt(1 + x + x^2)/x as another example
 
@Dennis but your post is about what you think. It's supposed to be your opinion, so I can vote on it
 
3:10 PM
@orlp I don't think that's possible
the coefficient of x is 0.5
before dividing by x
and after dividing by x you even have an 1/x term
 
we're trying to come up with a finer definition of "winning criteria" means. I don't see anywhere that says "a single winner"
 
@NathanMerrill If you read my answer again, you'll see that I'm stating a fact, not expressing an opinion.
 
7
Q: Should the victory condition for a challenge always ensure that it has only a single winner?

user62131Back when I first posted a challenge, it was closed as unclear, on the basis that – despite having an objective victory condition – the victory condition allowed ties. After searching Meta, I can't find a rule about this anywhere, so I think it's about time to start a discussion on what is and is...

The input format is specified clearly.@StepHen OK that is 100% a competition
 
@Dennis true
 
@NathanMerrill And that's why I'm not sure about the other post you brought up.
 
3:14 PM
because I can create an objective winning criterion of "everybody wins"
 
@NathanMerrill that's not objective, objective means anyone see the winner
 
sorry, that wasn't clear
 
@NathanMerrill the close vote reason is Questions without an objective primary winning criterion are off-topic, as they make it impossible to indisputably decide which entry should win., that implies a single winner
 
@ATaco It looks like your Š operator isn't quite right in RProgN 2. If you try and take log_2(2^128) it returns 127.99999999... Don't know if that's a limitation of what you're using on the backend, or just cutting off of precision
 
@StepHen true, but we've historically allowed multiple winners. Also: codegolf.meta.stackexchange.com/questions/1917/…
 
3:18 PM
@Dennis here's a Github repo that has the exact same wording as the latest questions: github.com/debmalya/allgo/blob/master/bojha/src/…
 
I agree, we want both win and loss states. Saying "you won" if there's no possibility of loss is a ridiculous, off-topic challenge. The question is really where we draw the line
do we want to allow all submissions to win as long as it is possible to lose? Or do we require at least a single loser?
(assuming more than one submission)
 
I'd go to meta with that if I were you
 
And I think that's where I got confused with Dennis' answer. He read the post as "can we have a challenge with no loss state", and I read it as "can we have a challenge where its possible for everybody to win"
 
@NathanMerrill Well that question is definitely the first. I don't know about the second though.
 
that said, I think he was asking about the former
 
3:24 PM
But... can't you just have a challenge where it is possible for everyone to win, then just tack on and shortest winner wins?
 
you can still tie in code golf
 
welp why I delete and undelete my answer constantly
 
@EriktheOutgolfer Just saying, the question is probably from a competition
 
I'm trying to ignore ties and scoring altogether. Like, lets say I make a KoTH of some survival game. You win if you survive 50 rounds.
 
@StepHen hmm...not completely sure about that
 
3:25 PM
its entirely possible for all submissions to survive all 50 rounds
 
although it does have an image
 
@EriktheOutgolfer they guy's got quite a track record though
plus the restriction on formatting, plus github.com/debmalya/allgo/blob/master/bojha/src/…
 
more like voting fraud though
 
@NathanMerrill ooooo boy. looks like a popcon koth. guess that question is getting closed
 
@NathanMerrill some way to up the ante?
make the environment harder, anyone that survives plays again, until only one is left?
 
3:27 PM
oh, absolutely, I could do that. I likely would if I was making the KoTH.
the question is whether the former is on-topic
 
@NathanMerrill I believe not - you'd have to, say, have the shortest in bytes survivor win
or the survivor that responded the fastest, took the least damage, etc
 
then what about a team challenge. You have zombies and survivors. The zombies win if all survivors die, the survivors win if they last 50 rounds.
 
What's a formula to calculate the chance if the chance are:
`n=1` -> `1/2`
`n=3` -> `1/4 1/2 1/4`
`n=5` -> `1/8 1/4 1/2 1/4 1/8`
etc...
 
@NathanMerrill run it a bunch of times with subsets of the bots, whichever bot is in the most survivor-y subsets wins
 
@StepHen I'm not asking how to objectively choose a single winner. You are absolutely against a team winning?
 
3:30 PM
@NathanMerrill I'm not personally, but I believe it would be off-topic as of right now
barring a new meta post
 
if that's the case, then this should be closed
 
@NathanMerrill team? how do i know which answer to upvote!?
o that one is a neat challenge
 
@NathanMerrill The victory is primarily about team glory, but I will accept the highest voted answer on the winning team.
I guess that works
good ol popcon
 
17
Q: Can I post a cooperative challenge where there isn't a single winner?

GeobitsI've got an idea for a team based challenge, where entries will choose the team to participate on, and teams will compete against each other. I don't want to get into the details much here, so let's keep it somewhat vague and high-level. If I can't determine a good way to pick a single winning ...

we definitely allow for multiple winners
 
I might be misinterpreting this - sorry if I am, I'm just one person :)
The Team v Team had losers and winners
Your proposal could have only winners
 
3:34 PM
@StepHen Put the challenge on hold for now. If that GitHub repo is the original source of the challenge, all the post is missing is some attribution. I can't find it anywhere else on the web.
 
which proposal? the zombie one or the non-zombie one?
 
1
Q: Is it an Ordered Word?

AdmBorkBork(inspired by this post over on Puzzling. CAUTION: SPOILERS FOR THAT PUZZLE ARE BELOW.) The standard telephone keypad correlates letters to numbers as follows: 1 -> 2 -> ABC 3 -> DEF 4 -> GHI 5 -> JKL 6 -> MNO 7 -> PQRS 8 -> TUV 9 -> WXYZ 0 -> A given input word is defined to be an Ordered Wor...

 
f = x/(1-x-x^2)
-xxf - xf + f = x
f = 0 + x + xf + xxf
 
4:02 PM
0
A: Sandbox for Proposed Challenges

TheLethalCoderThe Double Slit Experiment code-golf ascii-art physics random animation A lazy physisict has the job to perform the double slit experiment. However, they are lazy and can't be bothered to set up all the equipment themselves and so are going to simulate the effects. They can't program though so ...

 
@LeakyNun umm, what is that?
 
@EriktheOutgolfer gf of fib
 
Woo, halfway to Socratic.
 
@LeakyNun gf?
 
generating function
 
4:09 PM
Ah
 
4:19 PM
@LeakyNun Can I ask you a jelly question?
How can I do Try it online! but have it return 2?
(if that's clear enough)
Jelly is 1-indexed
 
@DJMcMayhem I've already answered that challenge fyi...
 
I want to find the first index of an item in X where Y occurs in X
@EriktheOutgolfer I still want to answer it if I can
 
yeah you can try to outgolf me
 
Can you answer my question?
 
you asked leaky...
 
4:22 PM
Cause I didn't know you were in here :P
 
hey is there a jelly atom for deltas?
nvm found it
 
@DJMcMayhem just address with "does anyone know jelly?" then...you don't have to guess who's here
 
I figured it out
 
@DJMcMayhem sorry later
@DJMcMayhem oh good
 
Ugh. I've got "CAT" --> [1, 1, 7] in 20 bytes, but when I try to get the increments it stops working.
Every time I use jelly, it's just banging my head on the wall until it works, and then I hit a new snag. :/
 
4:30 PM
I need help thinking up a name for my new mainstream (non-eso) language
 
Does its syntax resemble any existing languages?
 
@EriktheOutgolfer Can I ask your help in JHT? (Even though I'm trying to outgolf you)
 
@DJMcMayhem or you can do modular arithmetic and have it in way less bytes
 
What's the challenge?
 
@DJMcMayhem Can I see what you have so far?
 
4:32 PM
@LeakyNun Except that there's the PQRS and WXYZ edge cases
@BusinessCat Sure, come to JHT
 
@DJMcMayhem except that you can subtract by whether it is larger than R to merge S and R
 
@DJMcMayhem sorry gtg for ~1h
 
No worries.
 
DJ, according to the downvotes I received on my answer, I believe I have done screwed up
 
What answer?
 
4:38 PM
The rolling question
The answer you timed yesterday
 
@HyperNeutrino Yep, C and BASIC
 
I think I borrowed too heavily from Anders' answer. Just now edited to not use numpy, which sends the unofficial timing way up to 109s
 
Ah okay.
basiC? xD
no
 
Nah :P I don't want it to be like a silly name, something intelligent and creative yet descriptive and serious
 
> intelligent
okay then don't ask me :D :P
 
4:39 PM
:P
 
@DJMcMayhem To be clearer, this answer: codegolf.stackexchange.com/questions/124654/…
 
@MDXF How about Embark? As in, GOTO C, lol.
 
agh no i can't be out-golfed by 2 bytes
 
@totallyhuman that's only if your solution is 1 byte :)
 
@orlp -1 bytes using jQuery
 
4:44 PM
@MDXF any of Cardinal, Central, Critical
 
@AdmBorkBork I don't get it
 
Going out to sea, you embark on a ship.
 
@StepHen Cardinal is already a language, Critical probably is too, but none of those really fit with the language
 
ಠ_ಠ
 
@AdmBorkBork Ah :P
 
4:45 PM
I see what you did there ಠ_ಠ
 
Me too o_o (RasPi doesn't have that unicode)
 
oh lol
 
@MDXF I just picked synonyms of basic that started with c :P
 
@StepHen Oh lol
I'm thinking some kind of acronym for its features
Each main source file starts with a header that controls various settings throughout the language
 
@MDXF Baesik
 
4:47 PM
Like SYNTAX = ASCII makes it use traditional C/BASIC syntax. SYNTAX = ENGLISH makes it use some Pascal-style stuff
FIX = POST makes it use postfix notation for mathematical stuff, FIX = PRE and FIX = IN are also a thing
CAST = YES or CAST = ALLOWED allows explicit casting
 
Also do FIX = ANY :D
 
Ha, that was honestly the inspiration for the entire language
(Anyfix)
 
lol yay I inspired a thing \o/
 
I originally started calling it Anytax, like Any Syntax, but it sounded weird
 
that's an interesting name
 
4:50 PM
Jul 22 at 18:02, by HyperNeutrino
Anyfix is too dysfunctional for use anywhere
 
oh yeah
 
BaSynAck
 
@AdmBorkBork ?
 
Just brainstorming
 
Syntaxonomy
no that doesn't even make sense
 
4:51 PM
Syntastic
 
It kind of does but where does Taxonomy come in
I came up with SFPL, the Syntax-Free Programming Language
or PLUS, the Programming Language with Undefined Syntax
 
Is GitHub slow for anyone else or just me?
 
Or even CE-PLUS, the Configurable and Extendable Programming Language with Undefined Syntax
 
@BusinessCat me too, got a couple overloaded redirects
@MDXF I like that one
 
me topo
 
4:53 PM
This page is taking way too long to load.
Sorry about that. Please try refreshing and contact us if the problem persists.
 
@MDXF I would just do C+ but that's already an esolang
 
Expload is already an esolang, should I call mine Explode still?
 
no call it xPlode
 
CE+
 
@MDXF Why not just SynFree?
 
4:54 PM
@HyperNeutrino too cheesy
 
I've had enough cheese with cQuents xD
 
@AdmBorkBork 'cause Syn means way more things than Syntax
 
how about chee-Z
 
@HyperNeutrino cc Cheddar
 
4:54 PM
lol
@MDXF How about TaxFree
 
@HyperNeutrino Free Taxes?
 
@MDXF Sure, but so does "Java"
 
@StepHen ಠ_ಠ no
 
@HyperNeutrino Sounds like a presidential candidate slogan lol
 
OK imma call it Explode, cuz why not
 
4:55 PM
@MDXF lol
 
@MDXF C*
 
Yeah but * is not +
THATSCPLUSCODENONOTCPLUSPLUSCPLUS{includ =iostrea; usin namespac st> in mai()|cou == ^^Hello World!^^ == en>retur -1>?
 
+C
prefix C+
You should also add FIX = OMNI
 
@HyperNeutrino +C+C+
 
4:58 PM
how is an interpreter supposed to figure out what iostrea means? How can it guess whether cou should be cout or some user-defined function? The whole lang is dumb
 
Also that is just purely hideous
 
THATSCPLUSCODENONOTCPLUSPLUSPLUS{ what the fudge
 
New challenge?
 
Any C(#|\+\+)? programmer would be insulted xD
 

« first day (2375 days earlier)      last day (2469 days later) »