« first day (1622 days earlier)      last day (3223 days later) » 
00:00 - 20:0020:00 - 23:00

12:52 AM
When did I get enough rep on meta.se to see deleted questions?!?
 
1:02 AM
0
Q: Javascript function challenge add(1,2) and add(1)(2) both should return 3

MicFinA friend of mine challenged me to write a function that works with both of these scenarios add(1,2) // 3 add(1)(2) // 3 My instinct was the write an add() function that returns itself but I'm not sure I'm heading in the right direction. This failed. function add(num1, num2){ if (num1 &&...

 
 
2 hours later…
2:49 AM
I've got 7 items
3A, 3B, 1C
and I have 3 buckets
how many distinct ways can I put those items in the buckets?
assuming identical buckets?
(I'm looking for a generic formula, but its been too long since I've done statistics)
 
3:19 AM
@NathanMerrill I don't think there will be a nice closed formula, since you will have to 'manually' check for symmetrical buckets
 
hmm
good
 
0
Q: The GOLF CPU Golfing Challenge: Sides of a Cuboid

Nathan MerrillThis challenge is the second of a series of fastest-code problems that should be written in the GOLF CPU. You can find the first here For this problem, you are given the volume of a cuboid (A rectangular cube). Each of the side lengths are integers. You must return the number of distinct cubo...

 
 
1 hour later…
4:56 AM
I haven't been seeing nearly enough flags lately
 
5:26 AM
0
Q: How to solve this necklace stones puzzle?

diegoaguilarSomeone got a necklace with color stones: There's yellow, white, brown, etc, they way we can describe necklace stones from any of them and going always forward and writing down the first letter of stone's color. So, some questions should be answered: How many distinct colors have the necklace...

 
 
2 hours later…
7:10 AM
@Dennis you should leave at least every 5th question for me to answer first ... -.-
 
7:20 AM
@Optimizer: I do. This was the fourth. :P
 
liar!
 
This one is all yours.
7
Q: Shortest Longest Common Subsequence Code

DennisYour task to to solve the SLCSC problem, which consists in finding the shortest possible code to solve the Longest Common Subsequence problem. A valid solution to the LCS problem for two or more strings S1, … Sn is any string T of maximal length such that the characters of T appear in all all Si...

 
sure, leave all the tough ones for me..
 
Not that tough. Has a pretty straightforward implementation in our favorite stack-based golfing language.
(If you can call anything involving j straightforward.)
Well, it's 3:20 AM here. Good night!
 
@Dennis even that character is not straight or forward
 
7:28 AM
0
Q: Decimal Time of Day Conversion

Mwr247Introduction Time is confusing. Sixty seconds to a minute, sixty minutes to an hour, twenty-four hours to a day (and not to mention that pesky am/pm!). There's no room for such silliness in our nowadays, so we've decided to adopt the only sensible alternative: decimal days! That is to say, each...

 
7:40 AM
0
Q: mini SPICE solver

helloworld922SPICE is an electrical circuit simulation program originating from UC Berkeley. Your goal is to implement a minimalistic version which can solve for the nodal voltages and branch currents of a circuit composed of resistors and DC current sources. Input Format The input may come from a file, io ...

 
 
2 hours later…
9:39 AM
0
Q: Go south, east and north, come to the same place

anatolygThere is that famous riddle: A bear walks 1 km south, 1 km east and 1 km north, and comes to the place it started from. What color is the bear? This one is very old, so I'll generalize it: A bear walks x km south, y km east and x km north, and comes to the place it started from. This be...

 
 
2 hours later…
12:02 PM
0
Q: Make this code complex

iZodiacMy challenge to you is to make my VBS script that generates random numbers on popup as complex as you can. intHighNumber = 100 inLowNumber = 100 For i = 1 to 100 Randomize intNumber = Int((intHighNumber - intLowNumber + 1) * Rnd + intLowNumber) Wscript.Echo intNumber Ne...

 
12:31 PM
@NewMainPosts Was I too cold ?
 
12:42 PM
1
Q: Create an OEIS Tag

Nathan MerrillWe have quite a few problems on this site that deal with OEIS. We have tons of problems asking you to produce the nth term (or the first n terms), and we even have a problem specifically dealing with OEIS I think that these problems are often quite interesting, and I could definitely see somebo...

 
1:37 PM
So here's an odd question for the room: Does anybody you know care about pronouns enough to use "xe" instead of he and/or she? After reading this puzzle, I wonder. I know lots of people, male, female, and in between, and I've never heard this come up in real life.
Part of me wants to dismiss it as tumblr-life, and part of me wonders whether I should.
 
I feel like this is proof that my scrum team is maturing: i.imgur.com/cZ3owiZ.png
A few months ago we couldn't stay anywhere near the line
Now we can't seem to stay away from it
If we get too far ahead, we kill bugs. If we get too far behind, we stay a tiny bit late and catch up. No more late nights, no more bugs.
 
I'm not a big fan of "stay a bit late to catch up", but that could be my single-parentedness ;)
Of course, late nights would be even worse.
 
I'm talking 30 minutes for the whole team
As opposed to "We stay until 2:00 AM on drop day"
 
Right. 30 minutes is the difference between me picking my kid up from after school care and having to call around for someone else to do it.
 
It's not perfect but it's waaaay better
 
1:42 PM
But yea, better than 2AM.
 
One of my team leaves to pick up their kid and then comes back if he needs to
It's not strict or anything
He mostly doesn't come back
 
I'd do that (pick the kid up), but it's about 20 minutes each way, so it would be pretty pointless :D
I could easily work from home if need be, though.
Actually, I could do my entire job from home (maybe once a week in the office for face time). Unfortunately, most places haven't figured that out yet.
 
Amen
 
@Geobits "Xe" is not tumblr life; it's real. I used to have a friend named Matt when I lived in Austin, and I knew her as a guy. She got a sex change after I left, and I then two years later she wrote something on Facebook that I found interesting, and I used the wrong pronoun. I got cursed at for not bothering to check her gender or noticing the name change (Matt -> Matty)
She said if I was too lazy to check, I should use xe
But I think she spelled it zhe, not xe
Anyway, I'm not friends with that one anymore. Too sensitive.
 
Interesting. It seems a bit presumptuous to think you should check gender for someone you already knew before using pronouns, but okay.
 
1:46 PM
So I guess I should say that it's real to the people who care
 
That makes sense, though, I guess.
Although even in that case, it seems singular 'they' would work just as well.
 
I've lost a few overly sensitive friends from Austin. I lost one because I cracked a joke about how they may want to ride shotgun because I have a chik fil a bag sitting in my back seat
 
Devil chicken!
 
I lost another because I said the word retarded. Honestly retarded is a bad word to use, but nobody ever told me that so I didn't know.
 
Most of the things we called each other as teens are not acceptable insults today :P
 
1:49 PM
@Geobits you are such a bits!
 
I read that in homo voice
 
what is homo voice ?
 
Think Perez Hilton
 
I can only assume it's the overly flamboyant "TV" gay voice.
 
:D
 
1:50 PM
Not that some people don't actually talk that way, but you'd think all gay people were crazy by watching TV.
 
Only because you can't tell who is gay except for the ones who talk that way
Dumbledore is gay and on tv, and he wasn't flamboyant at all
 
many straight people talk in homo voice too
 
Oh I know why they do it for TV... plenty of other stereotypes are done the same way. Dad's an idiot who can't figure out how to do the dishes, Mom can't throw a ball, etc.
 
nowadays its more like "Dad is a smart*ss who will try to find ways to elude doing dishes"
 
Yea, in any family-based show there's always a "Mom is away" episode where the house turns to shit over the course of a week, whatever the root cause.
Moral: Mom keeps the house in order.
Oh, and sometimes there's a last-minute cleanup so that she doesn't know it.
 
1:56 PM
I had a talk with someone recently about the gender equality thing and they refused to acknowledge that men and women's sports should remain separate
 
sports - its the genes which are stopping us
 
I'm not sure how I feel about that, to be honest. Most sports I don't see much of a difference in gender.
 
I think he meant, playing together ?
 
Full contact sports where pure body mass is key might be different.
 
Look at average serve speed in tennis. It's much lower for women
Look at 100 meter dash times, again much lower for women
 
1:58 PM
all in our genes.
 
Exactly. Men can wear pink and do dishes and women can be the breadwinner of the household but there are physical differences that cannot be overcome
 
oh, we are on the same side..
My mind automatically thought we were on the opposite side of this discussion
 
Llamas be contrary
 
bitses be bitsing!
 
2:18 PM
@Geobits There's also singular "they", which is what I prefer if I'm not sure about a gender
 
I prefer "it"
 
"They" is what I normally use, too. That's part of why I was wondering about xe. It kinda seems like making up a word just for the sake of it when one already exists.
And while I can assume 'xe' is pronounced like 'zee', I have no clue how to say 'xyr', which I first saw today. 'zeer'?
 
"Have you seen Optimizer lately?" "No, it hasn't been on a week"
I guess it works for llamas
 
I assume that xyrs is analogous to his/hers/theirs, but again, it seems awkward to me.
Or maybe xys?
 
@Geobits I assume it's pronounced "zerr"
 
2:23 PM
It works for Super Man too
 
Only before you realize it's not a bird or plane ;)
 
For Batman, only "I" work
 
After a perusal of the chart on Wikipedia, I can only say that I'll be using 'they' for the foreseeable future. Unless/until one in the "newly invented" section becomes standard, it seems like little use trying to please people.
 
hi all.. I have an idea for a new OEIS entry that PPCG could make :)
anyone interested?
 
I always thought that gendered nouns were weird in European languages.
 
@Geobits any genders too?
 
Is it something besides processing strings of zeroes and ones in a matrix? :P
2
 
@Geobits hmm... almost no :)
but I think it is something of general interest to OEIS people
as far as I know there is as yet no equivalent entry for circulant matrices
 
2:47 PM
I should get myself tested for psychic powers :D
 
@Geobits you know .. my view is that there are two options
1) you have one person who is interested in everything
2) you have lots of people, each person is interested in one thing
I am going for option 2) :)
I don't see anything wrong with option 2 either
 
What about 3) lots of people interested in lots of things and 4) one person interested in one thing? For somebody who likes binary matrices, it seems like you missed a column in your table ;)
 
@Geobits :) It was an attempt at humour
option 4 is terrible for PPCG!
 
Well.... yes, it is. But so is option 1 to be honest.
 
right so I am in 2
it's not so bad :)
 
2:55 PM
@Lembik that could be interesting. I'm not sure how different the sequence would be though
 
@Vioz- I can't test your decimal day submission, but I don't think it works for 08:00:00
 
damn it, octal
 
nvm bug
 
@Vioz- it would be quite different according to the wiki
 
:P
 
2:58 PM
hi @Sp3000
 
Wait... no it's right. I forgot I don't need surrounding quotes in the input here :P
 
@Geobits the interesting mathematical angle is.. (are you interested in math?)...
 
Hey Lembik, Dennis stole your schtick
 
@Sp3000 oh really?
 
(Multiple LCS)
 
3:01 PM
@Sp3000 great! :)
 
@Lembik Some math, yes. I haven't gotten into your past challenges much tbh, so I can't say this will interest me. Others may be more interested for sure.
 
@Geobits of course... not all my challenges are identical I should say... despite the teasing :)
 
btw @Vioz-, hint for BF to Unary :)
 
Well, I'm not a fan of matrix math in general, so I'm guessing it won't be my thing ;)
 
We seem to trigger pages long gender equality related discussions as soon as someone writes he/she
 
3:03 PM
@Sp3000 Interesting :)
 
@Lembik As in, you lost me at "...equivalent entry for circulant matrices" :P
 
@Geobits :) I got you. I was just saying that some of my challenge involve no 0s , no 1s and no matrices :)
 
Oh I know :P
 
Are you going to post your Python 3 solution for the time thing?
 
@Lembik How about 2s, 3s and finite fields? :P
Er... nope because it's basically the same as yours
 
3:05 PM
@Geobits but in general I try to ask questions whose answers could be interesting to people not in PPCG... so this does make them a little harder than average
@Sp3000 good idea! :)
I am a believer in crowd sourcing :)
 
(Or, more accurately, I was trying to golf yours)
:P PPCG could do with more group theory tbh, but anyway...
 
@Lembik Oh sure, and I'm not trying to persuade you to stop. I'd still rather do one of those than some random [ascii-art] golf.
 
@Geobits :)
 
"Draw this matrix of 0s and 1s in ASCII art"
 
so... what tags for my new matrix challenge :)
 
3:08 PM
@Sp3000
 
20 secs ago, by Optimizer
@Sp3000
 
@Sp3000 that indexing tip actually adds one byte :(
 
0
Q: Find the maximum determinant for each size circulant matrix

LembikFor a fixed n, consider the n by n circulant matrices with entries which are either 0 or 1. The aim is to find maximum determinant over all such circulant matrices. Task For each n from 1 upwards, output the maximum determinant over all n by n circulant matrices with entries which are either 0...

 
Which indexing tip?
 
3:10 PM
Windows Indexing Tip
 
''.join(x*x for x in y) -> '[x*x for x in y]'[2::5]
 
2 mins ago, by Optimizer
20 secs ago, by Optimizer
@Sp3000
 
Yeah, if you have ''.join(... for ... in ...) rather than ''.join(L). But that's not the part I was pointing out :P
 
it's hard to edit your question when someone else is editing it at the same time!
ok.. I think it is sane now
please take a look :)
 
I griped at someone on SO for making tiny edits to a question that had grammar, indentation, capitalization, spelling, and other issues
 
3:14 PM
@Rainbolt why is that?
 
I would be almost done, and they would submit their tiny edit
 
ah that
it's annoying
 
@Sp3000 Oh! I got it now ;P
 
user image
12
Perfect :D
 
@Vioz- :D nice
waits for @Doorknob's usual message
 
3:19 PM
that icon looks so nice, I must find one on PPCG next to Geobits and click it
6
 
Nah, Doorknob is going to want to smack me with a trout next time he sees me, not congratulate me ;)
@aditsu Go ahead. I care about the screenshot more than the rep, and I've already got it :P
 
oh, in that case you can simply use gimp
 
We can keep clicking it for you so that you can celebrate and screenshot again and again
 
Unfortunately I couldn't get my badges to form a good sequence. 1 24 81 isn't much.
@aditsu But that's cheating! gasp
 
so many bugs! Fixed the example in my question
and it is indeed not in oeis.. which is great news for PPCG fame :)
 
3:47 PM
@Lembik I find them in oeis.org/A086432.
 
@Min_25 yes.. my mistake.. I am fixing the question
@Min_25 2 minutes please :)
@Min_25 I changed circulant to Toeplitz
it's not in the OEIS now unless I made a mistake
@Min_25 and.. hello!
 
Lembik, I've been meaning to say this but if you're going to type 5 sentences in a row for the same person you don't need to ping them in every one all but one of them
 
sorry to all
the thing is that I have no sound on my computer so I forget some people do!
 
Ah... yeah. I don't like that sound personally but it sure does get my attention when I'm doing something else
 
@Lembik Hello!
 
3:53 PM
is the new version better?
by which I mean.. .less done before :)
 
Aren't all circulant matrices also Toeplitz?
 
@ThomasKwa yes they are but not the other way round
so one number is a bound for the other
 
@Lembik I should be posting something very soon :)
 
@Vioz- wow!
real time coding :)
 
It's certainly not going to win, but it'll be a start :P
 
3:56 PM
I think the trick to winning might be a) not recomputing the determinant for every new matrix and b) not iterating over every single matrix!
 
I read a paper on computing binary circulant matrices with greatest determinant, so that strategy could probably be suboptimally applied to Toeplitz matrices
 
Yes, that would be ideal. I, however, have done the brute force approach :P
 
@ThomasKwa that's interesting! Please add it as a comment if you find it again
 
Using Toeplitz fixes that though, since you don't know it's optimal.
 
very glad there is a fellow binary matrix lover here :)
@ThomasKwa what do you mean by "fixes that" ?
@Vioz- I look forward to seeing it! Which language?
 
3:58 PM
Like, if there were an optimal solution for circulant matrices, it wouldn't work for Toeplitz matrices
 
cjam?
@ThomasKwa right.. well it might not
 
Python ;)
 
ah.. I see some very short code using scipy on the horizon!
can you get above n=12 in python?
 
On my work machine, I believe I can get to n=19 in 10 minutes. I'm running it right now.
 
sorry it went down to 2
I realised I couldn't be bothered to wait 10 minutes :)
@Vioz- 2 minutes that is
 
4:11 PM
@Lembik Posted my answer :)
 
@Vioz- isn't the output wrong
take n = 8
(but thank you :) )
shouldn't the answer be 56?
[1 1 1 0 1 0 0 0]
[0 1 1 1 0 1 0 0]
[0 0 1 1 1 0 1 0]
[1 0 0 1 1 1 0 1]
[0 1 0 0 1 1 1 0]
[1 0 1 0 0 1 1 1]
[1 1 0 1 0 0 1 1]
[0 1 1 0 1 0 0 1]
that matrix has determinant 56 I believe
 
man i wish i could be more active on this site, i love code golfing but i'm not a good "real" programmer so a lot of the questions people post i can't even solve at all, let alone with a low byte count haha
 
@Vioz- maybe you are answering an old version of my question? The time limit is also 2 minutes..sorry
@undergroundmonorail there are normally a wide range of questions. Don't be put off by those designed for different sorts of interests
 
I'm not sure many of our questions have anything to do with "real" day to day work as a programmer.
 
@Lembik i'm not put off don't worry! i love this site <3
 
4:16 PM
@Geobits you mean being shouted at?
 
@Geobits yeah i know i just mean, like
i'm not good with algorithms and math and stuff :P
 
or having to fix a bug that occurs rarely when you have the Russian edition of windows and a Ukrainian keyboard layout :)
@undergroundmonorail what stage of your education are you at?
math prof? :)
 
i'm going into my first year of post-secondary in september
so i have a ways to go
 
Many programmers aren't good with that stuff. Unless you're developing architectures or low level stuff, most of the time you don't have to be.
 
@Vioz- ok I think you are answering the old circulant question! :(
 
4:18 PM
My use of "math" at work is basically nonexistant.
 
s/a/e :)
 
And knowledge of algorithms just means I need to know how each performs. I'm most likely never going to write a timsort for work.
 
Yeah, I know. I kind of want to be good at it, though. It's super interesting to me I'm just not good at it. I am taking CS in university so maybe I'll pick it up.
Oh man I've never actually looked at timsort before, this is cool
 
:D
 
Jun 30 at 8:37, by Doorknob
@Sp3000 @Optimizer s/$/\//
 
4:21 PM
:)
 
(needs a modification here but you get the point)
 
I'm glad my misspelling could amuse you guys :)
 
on a completely different note.. say I want to find a matrix with maximum determinant by simulated annealing.. are there any good libraries for this for python?
 
At least you didn't mispell misspell :)
 
I though docs.scipy.org/doc/scipy-dev/reference/generated/… might do but it seems to need a smooth function
and I am not sure jumping around different matrices covers that
 
4:22 PM
@Sp3000 But why not s|$|/|
Assuming this is sed I guess
 
I dunno, I don't sed :P (or Perl, for that matter)
 
@Lembik Yes, I answered the old one :(
 
@Vioz- hopefully it's only a small change to answer the new one
it turns out the old one already had an OEIS entry
which made it less exciting
 
Ah, I see
 
but circulant and toeplitz are not so different programmatically
I want PPCG to be globally famous you see !:)
err.. amongst people who read the OEIS :)
 
4:27 PM
I like to think that I'm really good at bad code. I love writing horrible code, which is a big part of why I love code golf: most golfed code turns out horrible. There's a Project Euler problem where you have to find all the correct equations of the form a*b==c where every number from 1 to 9 appeared exactly one in A, B or C. I solved it by generating every permutation of the string "123456789", inserting "*" and "==" in every legal position and total += eval(s).
 
That sounds like a perfectly legitimate solution to me :P
 
And you call yourself bad at algorithms... :P
 
If I remember correctly in ran in O(my god) time.
 
Usher time ?
 
That's the only joke I have about big o notation i hope you enjoy it
 
4:30 PM
I've heard that the big O is a myth anyway.
I'm sure that's not true though.
 
I don't really understand the toeplitz matrix :(
 
Create and shift a 2n-1 list instead of an n one
Or rather, take n sized slices of a 2n-1 list
 
So a "tape" for n=3 could be [0,1,0,1,0]?
 
Yeah, where the outer two numbers are the bottom-left and top-right corners and the centre one is the main diagonal
 
creating the matrix [[0,1,0],[1,0,1],[0,1,0]]
 
4:38 PM
One time I needed to find the min cost path through a matrix, starting from the left column and going to the right column without ever moving left. I almost wrote for s in start: for e in exit: min_cost = min(min_cost, search(s, e), but I decided I didn't want to do that so I stuck a column of 0s on both ends and told it to go from top left to bottom right. That is one of the only clever things I have ever done when working with actual algorithms :P
 
That's pretty neat :) - reminds me of the max with 0 idea for finding a subarray with maximal sum
 
I am not familiar with that one
 
@Lembik Do you have an example of a matrix for n=7 that gets 32? I seem do only be able to get a max of 20.
 
As my lecturer put it, it's like you take a "free ride" to the start of the optimal solution
 
4:47 PM
this is six lines of code, i should not be having this much trouble figuring it out haha
i think it's like
 
6 - 50K columned lines
 
just keeping track of the longest one it's found so far as it sifts through the list?
 
@Vioz- [0 1 1 1 0 1 0]
[0 0 1 1 1 0 1]
[1 0 0 1 1 1 0]
[0 1 0 0 1 1 1]
[1 0 1 0 0 1 1]
[1 1 0 1 0 0 1]
[1 1 1 0 1 0 0]
 
oh i get it
for each position in the list, it's figuring out the max sum that ends at that position
 
three downvotes! I really annoyed some people :(
 
4:49 PM
maybe
hang on i'm still not sure i get it haha
 
Max sum that ends in that position is right
 
me: won't max_ending_here just be reset to 0 any time it's negative?
me: ...
me: that's exactly how it works yes
i think i get it now
 
your avatar matches your thought process
 
4:53 PM
i think exactly like a cat, this is correct
 
Alright, I think I need to rethink this..
 
5:08 PM
would it look bad to make a purchase at walmart like 10 minutes before i start the orientation for the job i'm getting at walmart
 
inside of the mart or a software job ?
 
just like
minimum wage stocking basically
i've never had an actual job before (delivering newspapers does not count) so idk how i am supposed to behave haha
 
Probably not, but you could do the purchase afterward if it makes you nervous walking into orientation with a bag.
 
if its inside, skip it.
if its software based, do what you want :D
 
If it was an interview I'd say definitely wait.
 
5:12 PM
i basically have the job already, technically they haven't given me the offer yet but they already told me they were going to
 
@Lembik I've fixed it :)
It is annoyingly slow though
 
Have you tried itertools.product instead of your binary approach?
 
Haven't yet
Sheesh, that's much faster :)
 
Builtins exist for a reason, I'd hope :P
Similarly instead of deque i'm not sure if taking successive slices a[i:i+c] would be better
(I'd test, but I seem to have messed up my numpy installation some time ago when I was cleaning out my Python versions)
 
I'll check
 
5:26 PM
BuiltInThatExistsForAReasonButFailsAtCodeGolf
 
Actually, product has been used in Python golf before :P
(many times, I'd imagine)
 
@Vioz- my completely trivial and inefficient python code gets to n = 10 too :)
 
i got duck tape for christmas and finally in july i have a use for it
 
duck or duct?
 
don't worry i know what i'm talking about ;)
 
5:31 PM
that was quick!
 
i had it prepared, in case
 
now I am wondering what else I can ask :)
 
Apparently just changing slicing without deque messes up like half the answers
 
i also have another one where i'm flipping the bird, i wasn't going to post it here but in the skype chat i'm in if someone accuses me of being wrong i'm using that one
 
1,1,1,3,5,9,17,56,125,312
 
5:32 PM
@undergroundmonorail You're.... wrong?
 
@Vioz- bpaste.net/show/2a304143bfaf is even shorter than your code :)
 
i'm not going to do it here i said :P
 
I don't see why slicing would get it wrong... hm...
 
If only I had known there was a toeplitz builtin.. :P
 
Worth a shot :D
 
5:33 PM
@Vioz- :) it doesn't help it just makes the code look neat
 
@undergroundmonorail so, you're taping ducks? to what?
 
@Vioz- Micro-optimisation - don't save r as a list, just use it directly
 
It's almost like you had those images prepared, too...
 
oh jeez, not to CRT monitors! that's animal cruelty!
 
5:39 PM
@Geobits i didn't prepare these ones on purpose, i just am also having this conversation in skype :P
@aditsu nah the CRTs are just for melee
 
CRT keeps them warmer than an LCD would.
 
6:36 PM
@Lembik On my machine, your code is a little over 3x slower than mine. Have you tested my code on yours?
 
6:50 PM
@Vioz- it gets to n = 10
 
Weird that there's such a big difference on my machine
My code gets to n=9 in 8.6 seconds, yours takes 26.6 seconds
 
0
Q: The n-th Ternary

CaridorcI define the n-th ternary as a ternary that returns n and has the form: 1 ? 2 ? 3 ? n - 1 ? n : 0 : 0 : 0 # n - 1 zeroes Write a function or complete program that given an input n will output or return the n-t ternary. Code-Golf. Testcases 0 #=> undefined behaviour 1 #=> 1 2 #=> 1 ? 2 : 0 3 #=

 
@Vioz- 315.0 in 34.8282029629 s
 
@Dennis you also had 19 ?
 
7:05 PM
@Vioz- all that is happening is that 11 is taking about 4 times longer than 10 I suppose
 
@Dennis oh, you have 18 with an extra :0
 
@Vioz- here you go... 1458.0 in 159.465471983 s
about 2 minutes and 20 seconds
 
@Optimizer And after fixing that bug, my code was identical to yours...
 
7:25 PM
@Dennis can't seem to reduce it further :(
 
00:00 - 20:0020:00 - 23:00

« first day (1622 days earlier)      last day (3223 days later) »