« first day (2860 days earlier)      last day (2279 days later) » 

00:03
@Zacharý Dibs on the sombrero
I'll just wear my ∩
4
00:39
@Cowsquack Lazily apply dynamic programming with no math involved. (that's why no closed form)
Ah...
Now I see why the dp solution implies the answer is n-bonacci number.
@Anush Simple? }.,+/ iterates 1 iteration, ^:1000 iterates 1000 iterations.
(btw. Of course a language is hard to read if yoi didn't learn it)
Anyway, there is a closed form formula for any recurrence relation, of course. But that isn't the most efficient wáy to compute it.
01:01
I'm really disappointed winterbash2018.stackexchange.com doesn't currently have some easter egg. (Or maybe I haven't looked hard enough... who wants to go through the minified JS with me? :P)
01:55
@Quintec Just take a quick look, nothing appears to be very interesting.
@DJMcMayhem There is a pretty trivial closed form formula that uses matrix power.
Which can be used to compute the result for huge n.
However Mathematica takes forever to get a closed form solution in terms of reals. Probably because it's very complex.
02:19
@user202729 What is it?
@DJMcMayhem see my solution
@lirtosiast Looks correct
The closed form in terms of reals should be sums of powers of eigenvalues or something, right?
Of course...
I don't see why that should be hard for mathematica
What exactly is happening there?
He tried to google Google
@lirtosiast It simplifies to Indeterminate after throwing a bunch of errors
Yeah but why
I don't know...
Let me see.:
Hm... it may give wrong result.
Run with mathics: tio.run/…
learn about eigenvalues (again)
03:06
Eigenvalues were a bit of a bastard to crunch out by hand
What... it gives correct result for machine precision.
Nah, I meant back in the days of Calc classes
Not all that hard but easy to botch if you weren't paying attention
03:28
The problem is that the eigenvectors are not linearly independent
Computing the eigensystem takes no time, even with exact input.
@user202729 can't you still get a power of a nondiagonalizable matrix from its Jordan form?
I don't know that much about linear algebra
Anonymous
@lirtosiast yes
04:11
0
Q: Given an input, print all exponents where all the bases and powers all up to the input

Embodiment of IgnoranceSo this is my first challenge on this site. What this challenge is is that you input a number, and your code spits out numbers which can be calculated as an exponent. The sum of the exponent and base in the number must equal the input. The numbers must start from \$1^{n-1}\$ to \$(n)^0\$. Examp...

04:27
It's a bit of a messy title but I'm not sure how I'd word it
Less messy: "\$1^{n-1}\$ to \$n^0\$ for \$1\cdots n\$"
heh
"\$i^{n-i}\$ for \$i=1\cdots n\$" would be better, mathematically
All code-golf titles should simply be the current shortest solution to the challenge in the winning language
/s
Hmm
@lirtosiast That would be Jelly.SE then
2
04:35
I wonder how many PPCG questions have answers shorter than their titles
7
A good deal of them, I would imagine. Pretty much all mathy/array manip things with a golfing language answer for starters
Even something like codegolf.stackexchange.com/questions/176521/ascii-art-h-trees is surprisingly close, despite the title not fully specifying the challenge
At least: any question that has a Jelly (or 05AB1E or whatever) answer with 15 bytes or less
I guess it comes down to which is greater: how much the title underspecifies the challenge, or how much more concise golfing languages are than English
The title cannot be less than 15 bytes
04:42
Actually, on average, what language is king of the golfers?
Jelly or 05AB usually seem to a byte or two shorter than the alternatives
(Correct answer is ><>, fite me)
Well what distribution are you taking the average over?
Distribution of questions entered, or distribution of all questions here? Because Jelly is often fairly long at tasks it's unsuited for, and Osabie is proabably worse in that regard
That is a fair point. The most useful distinction would probably be per challenge 'type' but overall might also be interesting to ponder
Oh yeah, Pyth is a pretty good slugger too. Forgot about him
import data.fintype

def A007778 : ℕ → ℕ :=
λ n, fintype.card (fin (n+1) → fin n)
how do I test that?
04:57
import data.fintype

def A007778 : ℕ → ℕ :=
λ n, fintype.card (fin (n+1) → fin n)

#eval A007778 3
(don't go bigger than 3)
works in chrome
> cold-golf
Looks like there's no 4 byte solution
Do any languages have 1-byte reversed range?
Somehow I made a n^fib(n+1) instead of n^(n+1): Try it online!
it’s probably the footer
05:11
ooh cool
@Bubbler Dyadic ¡ behavior
Okay, made a proper n^(n+1) with nothing doing +1
@Bubbler nice
O______o how does that work
05:51
@Downgoat Lookup the docs on tagged template literals and String.raw...
 
3 hours later…
08:26
@lirtosiast I think I somewhat understand it now, the rows are the starting card, and the columns are the last card, and you get the new statistics of drawing a card by multiplying the matrices?
0
Q: Number in Number-squared

Vedant KandoiConsider a sequence of natural numbers in which N appears in N^2. Output the nth element of this sequence. Rules Program takes only n as input and outputs just one number - N. The sequence can be 0-indexed or 1-indexed. Sequence: 1 5 6 10 25 50 60 76 100 250 376 500 600 625 760 ... Squares: ...

@user202729 how so?
@Cowsquack correction: a(-8..-1)=0 and a(0,1)=1, so 1000th term of this sequence is calculated
08:51
@Cowsquack (for the Fibonacci case) Given a bitstring of length n-1, All of them can be turned into bitstrings of length n by adding a 0 to the front. The ones that start with a 0 can have a 1 added to the front. The number of bitstrings of length n who start with a 0 is the same as the number of bitstrings of length n-1.
I think the general case can be shown in the same way
Perhaps, it would have been clearer to use n-1 and n-2 in my last sentence
@H.PWiz ah I understand now, very elegant
@Cowsquack hi
hi @Anush
09:25
I really want to ask a challenge which is to read a page of math from a pdf. I just haven't worked out how to make it a good question yet :)
Hmmm.. maybe it could just read a single integral
ah ok.. so I could write code to produce random latex code for integrals, render them and give them as input
the output should be "integral from x to y of ... "
in ASCII
how does that sound?
maybe just have polynomials in the integral to make life easy
I guess it should be from images as I can't include a pdf in a question
 
4 hours later…
13:20
@Anush Would the input be the PDF, or a bitmap of the equation? I haven't done extensive research on the subject, but I think the majority of our golfing languages don't have pdf support.
14:15
I'm sad that the taco userscript for syntax highlighting on TIO breaks as soon as you edit the text :(
14:27
@Skidsdev what? for me it is broken until text is edited :p
Just checking in and....... yep. Still the beta theme. Ok.
huh, odd
both chrome & FF seem to work fine for me
the only case i've seen it break is on line wrapping
yeah it breaks on line wrapping for me too
(FF Dev Edition, Win10)
really i'm not sure what you even mean by it breaking upon editing text as you have to edit the text to get literally any syntax highlighting
14:34
Nope
lemme show you
it works when I first load the page
it breaks as soon as I edit the code
@Skidsdev huh, both chrome & FF work fine for me
@dzaima did you edit that script when you made your script mashup? Might be that
@J.Sallé no, I directly installed it separately (though i did change a 5 to a 4 for prettier code but it worked before that too)
Then I've got no idea. I don't even have that script installed, I think
I wonder if creating a Sigmar's Garden solver would be a good challenge
15:23
@maxb Re codegolf.stackexchange.com/questions/176685/… : PPCG is not really well-defined regarding huge input, so just make sure that the algorithm is not obviously cheating and works fine with small input is ok.
Hmm.. what would be the best way to represent a hexagonal grid in JS?
"Best"? close as primirily opinion-based
I mean I could just use a 2d array and have weird lengths, but it seems pretty clunky
Use 2d array sounds fine...
the formulas are simple.
I might make a class wrapper around a 2d array to make things easier
15:27
Usually I use the "axial coordinate" system.
hmm.. the cube coordinates one would work better for me, given the shape of my grid is a hexagon
although the axial coordinate system would be more feasible to implement
@user202729 I wasn't really satisfied with that answer. Usually you run into integer overflows for "big inputs", but since my code doesn't even handle all the test cases in practice (but in theory it does) it felt a bit like cheating. That's why I added the alternative answer which is more useful as a program.
 
1 hour later…
16:35
is -(-n + x) equivalent to n - x?
if it is an additive abelian group, sure
additive abelian group?
the more natural form would be -x + n
but if addition is commutative then it would be equal to n - x
commutative means you can swap the operands without changing the outcome right?
right
16:38
Ok great, thanks
5 - Math.abs(y) is a lot easier to read in code than -(-5 + Math.abs(y)) :P
So... are there cases where addition is not commutative?
I mean, you haven't exactly told me what kind of objects are n and x
@Skidsdev Quaternion addition is not commutative, iirc
quaternion addition is commutative
it is quaternion multiplication that is not commutative
fair. In this case they're signed integers (well, JS numbers which are technically doubles, but still)
Ah yeah I knew there was one of them that wasn't
16:41
Ah right gotcha, so for example in some arbitrary language Array + Object might append the object to the array, whilst Object + Array might not, so that would be non commutative?
0
Q: Check for phonemicity

snorepionEnglish has a set of "phonemes", or sounds that are distinguished. These are usually transcribed in the International Phonetic Alphabet. Your task is to check a text and see if it has only English phonemes, returning a boolean output like 0/1, Y/N, etc. The list of symbols, not including affrica...

@Skidsdev right
so python lists for example
String concatenation would be non commutative too, for languages that use operators for that rather than functions
'a' + 'b' == 'ab' but 'b' + 'a' == 'ba'
right
ok, I understand now
So uh.. what's an additive abelian group?
also called a commutative group oh
thanks google :P
16:46
@Skidsdev basically, fancy mathemathicians' language
yup
My math knowledge stops at basic vectors, trig and algebra, so all this fancy language and notation goes over my head
yeah mine's like that, although I do know some of the fancier words from watching hundreds of hours of Numberphile
I've watched a moderate amount of numberphile
Brady Haran's channels are my youtube crack. Can't go without them
17:23
@maxb Let's say image then
17:47
in this formula: n ^ e = x, which component is the exponent? And what are the other 2 components called?
@Skidsdev n is the base and e is the exponent
How long has gmail had tab completion?
x would be the result, if you'd want to name it
@Pavel for e-mails? As long as I can remember using it
@J.Sallé okay, thanks. Main confusion for me was whether e or x was the exponent
@J.Sallé For text content, not addresses
17:48
@Pavel oh then I don't know, I've never tried tab-completing text before
@Pavel few months at least
You can type On an<tab> and it'll complete it to On another note,
It was added semi-recently
I lo<tab> becomes I look forward to speaking with you
how long before I can just type Hi<tab><tab><tab><tab> to write out my full email?
@Skidsdev not long, I think. Google will eventually have microchips implanted into everyone's brains so we can use every google app on the fly
17:51
awesome
literally on the fly after google buys uber and dumps billions into their flying taxi R&D
@Skidsdev Kinda already? There's already a feature to send one of a few autogenerated simple mails.
nah I want the ML stuff to figure out who I'm talking to, why I would possibly want to talk to them, and exactly what I want to say to them
@Pavel Android's autogenerated text responses are hilarious. Someone texted me the other day "So-and-so is resigning" and the responses were like "Great!", "Ok, thanks!", and "Awesome, haha!"
@DJMcMayhem Also <poop emoji> for some reason
I find they actually work pretty well though
Ehhh. More like "They work Ok-ish about 50% of the time"
I think my biggest complaint with them is that generally all 3 choices effectively mean the same thing. It's like three different ways to say "yes" and never a way to say "no"
18:00
when I was interviewing for new jobs, I got an email asking if I would be available for a call at X time, and my options were "Yes I will be available", "That works for me" or "Sorry, that doesn't work for me"
which works pretty well
Also the auto-responses are one thing, we're talking about gmail's autocomplete system, which is much better because it handles common email phrases, rather than entire responses
Oh yeah, absolutely. It's a lot easier to predict that "Sounds g" --> "Sounds good to me." than parsing and understanding what a text is about and how I'd respond to it
yep, for sure
Posting a question without sandboxing it first. That's a bold move, Cotton. Let's see how it plays out
0
Q: Self-contained powers

SkidsdevGiven integer n, output the smallest exponent e greater than 1 such that n^e contains n as a substring. For example, for 25, the answer should be 2, as 25 ^ 2 = 625, which contains 25 as a substring, but the answer for 13 should be 10, as 13 ^ 10 = 137858491849, so 10 is the lowest exponent for ...

0
Q: Split Mark mark's

mdahmouneChallenge Mark is a student who receives his N marks in a concatenated way in a one single line. The challenge is to separate his marks, knowing that each mark can only be 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10. Input N natural number and one line. Output A set of natural nu...

19:03
I wonder if in the future we'll ever see "Neuron-golf" challenges for creating simple machine learning neural nets to complete a challenge using the lowest number of neurons or something like that
19:38
Seems like that would already fall under code-golf
what lirtosiast said, neurons are somehow defined as objects
 
1 hour later…
20:50
> If you get a syntax error, add random spaces until it works. -- Quintec
7
21:04
true for any lenguage program.
lol, very true
21:29
Well, I answered for the first time in awhile today :-)
Isn't that true for Whitespace as well?
@Adám whitespace also has tabs & newlines, just adding spaces severely limits what you can change
<sarcasm> Tabs shouldn't exist </sarcasm>
@dzaima I know this says "lenguage program" but my brain interpreted it as "programming language" and left me very confused
21:57
^ Same
Lewd
Most of my attention is taken trying to cope with his name ...
A baby scientist‽
This is why the world needs hyphens
22:37
1
Q: Print a square!

CortexPrint this text: _________ | | | | | | |_________| Shortest code wins. Notice the space at the start of the first line.

22:55
Feels bad when you forget how to optimally stringbuild
Somebody charcoal the heck out of that, and Canvas as well/
Oh boy, almost at that 750 milestone.
23:13
Woohoo!

« first day (2860 days earlier)      last day (2279 days later) »