« first day (1656 days earlier)      last day (3179 days later) » 
00:00 - 19:0019:00 - 00:00

12:23 AM
1
Q: Tennis ball pickup

devuxerThis one occurred to my while taking a tennis lesson. The teacher and student are standing on opposite sides of the net. The teacher hits the student n balls. The student hits them back to the teacher's side of the net. At the end of the n balls, the balls are scattered on the teacher's side of t...

 
12:40 AM
@histocrat Was your change 2 puzzle supposed to be 17 9s, not 18? Just checking to make sure.
 
I thought it not appropriate to post this as a comment on the change 2 puzzle because it is a sort of general question, but does it matter if the target output is different in an online compiler?
I guess I'll just put a note about it on my post for now
 
1:48 AM
I know it will autopost here in a minute anyway, but I'm really proud of my Prindeal challenge.
 
1
Q: Print, Increment, Decrement, Alias - Interpret Prindeal

Calvin's HobbiesPrindeal (pronounced prin-dee-al) is a new esoteric programming language that only has four commands: print, increment, decrement, and alias. Despite its minimalism, complex mathematical operations can be done in Prindeal by cleverly combining the four commands. Your task in this code golf chall...

 
Nice spec :)
 
Thanks :)
@Sp3000 If it helps I could probably golf my python solution down to 500 bytes which means you could probably do it in 250
 
2:15 AM
5 upvotes in 9 views - this one's going to do well.
 
@Calvin'sHobbies Whoa, that's a great challenge! Nice!
hairy_screaming_armadillo ... You have such a way with words.
2
 
@BrainSteel It's a real animal actually :P
Oh shoot, I got screaming and hairy backwards
 
Oh, nature. What inspiration.
 
@Calvin'sHobbies Hah 250's probably a bit hard. Will try tonight if I have time though, looks fun
(Not writing in Prindeal though, the setup looks painful :P)
 
2:34 AM
@Calvin'sHobbies Did you get the "excessively long" warning for this challenge too?
 
Nah
You only get that if you're within a few of 30k chars
 
How many characters is the current spec?
Perhaps you'll need to clarify a few things.
 
14k
It was different for the koth's, there's no huge hidden line of javascript here
 
Hm. Maybe duplicate the entire thing? That or add a complicated stack snippet leaderboard.
 
@AlexA. Shouldn't you be writing C++ books?
 
2:36 AM
XD
You never know, that could be me.
 
Except I know that's not your last name
 
I was just about to say that you know, but to others, "A." is just mysterious enough to stand for anything.
 
O_o
 
o_O
@BetaDecay Um, you did what?
 
2:43 AM
o_o
 
ಠ_ಠ
 
@Doorknob If a chatroom is ever closed for inactivity can a mod reopen it?
 
Mods can unfreeze and undelete chatrooms, yes.
 
l
 
2:47 AM
m
 
p
 
pqr
 
2:59 AM
Pee queue are?
Hey, @hcl.
 
@AlexA. I was about to question why that pinged me, but then I realized it was you and therefore a stealth ping
(I was hsl before, btw)
 
@NinjaBearMonkey Is that what I'm known for now, stealth pinging?
(hcl, hsl... close enough.)
 
If you look at the message history, it seems stealth pinging breaks the link formatting
 
Your ninja cleverness has caught me red handed.
 
glares
 
3:09 AM
@Doorknob ಠ_ಠ
 
(╯°□°)╯︵ ┻━┻
 
(╯ಠ_ಠ)╯︵ ┻━┻
 
These pings are getting out of hand!
 
That plus the stealth ping... I have been outdone. Good job. :P
 
(╯ಠ_ಠ)╯︵ \( -^-)/
 
3:14 AM
@Calvin'sHobbies I like to think you spent the entirety of the past 2 weeks since your last challenge writing the spec for this one.
 
Probably not far off!
@BrainSteel ( hand ) -------------> pings
@NinjaBearMonkey Thinking of doing a JS answer to this?
 
@NinjaBearMonkey I actually came up with the idea just a few days ago
I've been busy playing Minecraft :D
 
Btw NBM, if you play Minecraft then join the server!
 
(and I'm still ahead of Optimizer so I feel no impulse to post a lot)
 
@AlexA. Probably not, although I followed its development with bemusement. There's already a good JS answer.
And no, I've never really gotten into Minecraft.
 
3:23 AM
@NinjaBearMonkey :O Did you visit the dosa forum?
The only problem with the existing JS answer is that it doesn't correctly deal with the unit conversions/promotions.
 
@AlexA. Haha yes. I admire the dedication of this room to large dosas
 
I still can't believe one of the posts there has over a thousand views.
(I assume you're also talking about Maltysen's large dosa forum.)
 
((Yes))
 
(((Nice)))
 
((((Uh-oh))
 
3:30 AM
)) # don't worry bro I got your back
 
He looks like he has an eyepatch
)
@Doorknob You know things. I have an active bounty for World Big Dosa that ends in 19 hours. I said that I'd give it to anyone who posted a Chef answer but I forgot to mention that if no one did within the bounty period then I'd award it to the shortest valid answer. That was unmentioned, so would it be weird if I gave Dennis the bounty or should I just let it lapse unless someone posts a Chef answer in 19 hours?
 
I still can't believe I was impersonated on the large-dosa forum.
 
@BrainSteel Twice!
 
Distasteful!
 
3:36 AM
Dosas are tasty, therefore not distasteful. Tasteful.
 
But the impersonation was a bit sour for my liking.
 
Disclaimer: I have still never had a dosa
 
You have made me want a dosa quite a lot.
 
Me too
 
We can take a family trip to dosaland.
 
3:37 AM
I don't have the right fonts installed, so for the longest time I thought ಠ_ಠ was supposed to look like □_□
 
@AlexA. You could probably just give it to Dennis. It would make sense to award it to the shortest answer anyway, because nobody managed to solve it in Chef.
 
@Dennis Got a question about your LCS challenge: Do you have solutions, particularly for larger values of n? Or if somebody submits one, will you just believe their result?
 
@Doorknob Great, thank you. I appreciate your input.
@BrainSteel We live about 1830 miles apart, but I think we could meet halfway. I'm sure SLC, UT has dosas.
@RetoKoradi I blindly believe pretty much anything @Dennis posts.
 
I have a friend who may be in that area soonish.
 
Which area?
 
3:41 AM
SLC
 
@AlexA. This is the opposite question: Will he blindly believe it if I post a solution? ;)
 
@BrainSteel Have your friend do some recon to determine whether dosas are present.
@RetoKoradi I will!
 
I'm not entirely sure he cares.
 
Despite the fact that you're sounding awfully suspicious.
 
Actually, the better question is: How would I verify that my solution is correct?
 
3:43 AM
@BrainSteel ಠ_ಠ Unacceptable.
 
I'm not entirely sure he would even know what a dosa is.
 
@NinjaBearMonkey Hahahaha XD
@BrainSteel It's your job to educate him in the large dosa arts.
 
Ugh, I'm so busy as it is!
 
@NinjaBearMonkey I suppose those could be glasses, but it doesn't convey the same message.
@BrainSteel Are you though? I mean, you're on SE chat...
 
You have a point...
 
3:49 AM
@BrainSteel Do I though? I mean, I'm on SE chat...
Since when do I ever have a point in here?
 
Pretty frequently! It's just usually you have points about random things that may or may not be on-topic.
 
Hm. You have a point.
 
I'm going to read that as if you said "+1 points". It's basically the same thing...
 
How many do you have now?
 
4:01 AM
+5 for remembering.
 
70!
 
@BrainSteel 70! = 11978571669969891796072783721689098736458938142546425857555362864628009582789845‌​319680000000000000000
 
That's my new amount of points, right?
 
ಠ_ಠ
No
 
Are you sure? I would be okay with it...
 
4:07 AM
Your points would overflow.
 
@AlexA. If you used a real programming language, there would be no overflow.
 
@ChrisJester-Young And no sadness either?
I assume you're going to recommend Scheme or Racket. ;)
 
TIL C isn't a real programming language :(
 
@AlexA. Why, you'd be correct! :-P
Another version (using for comprehensions): pasterack.org/pastes/18779
 
I didn't know that Racket had comprehensions!
Then again, I also don't know Racket.
 
4:14 AM
Yes, it does, and they rule. :-)
 
:D
Crap, now I might have to learn Racket.
 
@AlexA. Yeah, you should. :-) (I'm biased, of course.)
 
I didn't know we had onebox for Amazon
 
Yes. :-)
I do intend to code up a onebox for Safari since I use that for all my technical reading needs.
 
This looks like a fun book!
 
4:18 AM
:-D
 
Is the whole bignum thing (and perhaps comprehensions) specific to Racket, or do other Lisp dialects have them?
 
All major Lisp dialects have bignums.
 
:O
And comprehensions?
 
Comprehensions are Racket-specific.
 
Ah, okay
 
4:21 AM
Scheme does have SRFI 42 but they're not as readable (IMHO) as Racket comprehensions.
 
Currently no Lisp dialect is at all readable to me.
 
@AlexA. It's not hard to read for me, but seasoned Lispers and Schemers know how to read Lisp code based purely on indentation and not parenthesis counting.
 
I did a project in LISP in college. But I forgot most about it. That was on a LispMachine. Dedicated hardware for LISP. Even the OS commands were in LISP
 
@ChrisJester-Young Isn't that assuming the author of the code in question has actually used indentation?
@RetoKoradi When was that?
 
@AlexA. Any decent Lisper and Schemer worth a salt uses standard indentation.
If you don't, you'll be ostracised.
Anyway, here's some code to compare between SRFI 42 and Racket comprehensions: pasterack.org/pastes/82481
 
4:27 AM
@ChrisJester-Young That's true of most languages though, I would imagine.
 
@AlexA. There's more variance in acceptable indentation styles in C-style languages (C, C++, Java, C#, etc.).
In Scheme, there's pretty much one accepted style, and you either follow it or die.
 
Haha
> Rationale: The parentheses grow lonely if their closing brackets are
all kept separated and segregated.
 
@AlexA. It's a hilarious rationale. :-) The real rationale is that experienced Schemers never count parentheses.
 
The impression I'm getting is that the real rationale is that if you don't do it you'll be murdered by programmers.
 
They either use text editors that have good blinking-paren-matching support, or they use something like Paredit that keeps parens always balanced, 100% of the time.
@AlexA. That too. :-)
 
4:34 AM
@AlexA. Long ago! Around 1990?
 
@RetoKoradi I'm sure even back in 1990, it was already known as Lisp and not LISP. :-)
 
Just like how FORTRAN decided to stop shouting and became Fortran
 
Pretty much. :-)
 
Bedtime for me. Goodnight all!
 
4:43 AM
@ChrisJester-Young Somehow I thought it was officially all upper case? But I wasn't sure anymore as soon as I typed it.
 
@RetoKoradi It hasn't been uppercase since the 70s.
 
@RetoKoradi I don't. But once there are at least two answers, I'll be able compare their results.
 
@Dennis If some information that popped up during a quick search is true, the problem is NP complete. So I doubt that we'll see solutions for large values of n. Otherwise somebody will be instantly famous. I hope that I can get n=3 within the time limit.
 
5:09 AM
@Calvin'sHobbies Just to double check, "These numbers can only appear within the arguments of statement A, B, and C in an alias statement." means that you can't use numbers as variable names, right?
 
The computer went just like the telephone. In the early days everyone shouted when using the unfamiliar technology, but as they got used to it they spoke in normal voices.
 
@Sp3000 Right. Variable names (and command names) cant start with digits and therefore cant be numbers. (See last paragraph of Variables section.)
 
Awesome :)
 
@feersum Not sure about that. I still hear plenty of people who apparently don't believe in the power of the phone, and talk so loud that people 1000 miles away could probably hear them directly.
 
5:26 AM
@RetoKoradi 3 should be doable. According to this paper (paywall), k strings of length n is O(kl(n-1)^(k-1)+ksn) with their algorithm, where l is the length of the LCS and s the size of the alphabet.
I'm less optimistic about 4. I didn't think it would be that hard. :/
 
5:47 AM
@Dennis I wasn't planning on anything very elaborate. At least as a start, I was going to extend the standard DP algorithm to more than 2 strings. I hope that's going to be enough to make it to n=3.
 
Would it be appropriate to edit all of the Robbers answers to say CRACKED at the top if they've been cracked?
 
That's probably a good idea. We've been doing that for all previous CnR challenges, I think.
 
6:35 AM
@isaacg By the way, your submission is driving me crazy. Finding solutions at a distance of 3 was easy enough, but at a distance of 2...
 
:)
 
6:45 AM
Links to cracks editted in.
 
@xnor Ah nice - I didn't expect the complement to do well so I haven't tried it yet. Will do so in half an hour
 
Is there a way to combine a python import and call into one line?
 
@Sp3000 Are you using code to generate expressions?
 
import sys
sys.setrecursionlimit(2000)
^ like that
 
Yeah, brute forcing little bits and piecing them together
I find lengths up to 8 pretty brute forceable
 
6:54 AM
@Calvin'sHobbies __import__("sys").setrecursionlimit(2000)
 
(alternatively, replace newline with semicolon :P)
 
@xnor Thanks
(though it's not shorter :/)
 
There's no shorter way :) For that snippet at least
 
 
(I'm just glad the bytes saved from bit bashing allow me to beat JS... next up: Matlab)
 
7:01 AM
@Sp3000 I could post a Prindeal sample answer if you want
 
Your choice? I probably won't look at it until I've tried though
I think I've only got numeric arguments left, the hard part
@isaacg I'm not sure I'd count Kurousagi's as cracked just yet. It's a little ambiguous
 
I think it's pretty clear.
I'm fairly certain no other solution is possible'
And it would come out exacty the same if copy-pasted into a n answer.
 
I think so too, but Kuro's comments seem to have indicated otherwise so I'm pretty confused...
I guess leaving it as cracked means nobody else will try in the meantime
 
OK, I'll remove that.
I hadn't read the comments thouroughly enough.
 
I'm pretty sure there's no other way, but just in case
Good work on the others though :)
 
7:25 AM
Thanks
 
@AlexA. O.o
 
7:44 AM
Hmmm Prindeal lacks input, damn :P
@xnor btw [4,b%2+1][d] is shorter, so that's 2 (3?) bytes saved at least
 
8:18 AM
@Calvin'sHobbies I congratulate you, that's the most thorough and understandable spec for a Golf this Interpreter challenge I've ever seen :)
 
8:34 AM
@Calvin'sHobbies dupe/dupeH1 is giving me infinite loops :(
 
8:47 AM
@BetaDecay Thanks :)
@Sp3000 Using my solution?
 
Mine :(
 
... oh
I'm not returning the result of the inner called function
It works now :D
 
0
Q: Cops and robbers not yet cracked answers Stack Snippet

jimmy23013You can load this Snippet using the Arbitrary Stack Snippet Loader, with the following parameters: site = 'meta.codegolf'; postID = 5686; isAnswer = false; QUESTION_ID = ; QUESTION_ID is for the question that the answers could be cracked, NOT for the question where the answers are cra...

 
9:06 AM
@Sp3000 We have a problem, now... That Snippet thinks that Kurousagi is still in the running because you didn't use the words 'cracked' when linking to your crack :P
 
That's fine, I was going to fix up the comments once Kurousagi confirmed
 
Oh okay then
 
If Kurousagi confirmed, just adding [cracked] in the header of the answer would be fine.
 
@BetaDecay I'm pretty sure the snippet looks at the link in the answer, not the comments.
 
It looks at both the links in the comments, and text (not necessarily links) in the answer.
 
9:15 AM
I retract my previous comment, then.
 
9:29 AM
@Calvin'sHobbies "It prints the name of the variable passed in and its value (in decimal)..." cheeky ;)
 
9:41 AM
@Sp3000 additional considerations for the elevator language: 1. How do you operate on values? Can the elevators operate on their passengers or do the floors? 2. Will there be basement floors with different semantics to upper floors? 3. Where do you take constants from?
(I'm pinging you because I think you were the only one who engaged in the discussion the other day. Your own fault really...)
 
XD
Let's see...
Lazy way would be to have one elevator per operator, whatever that means
 
yeah, that's something I considered
or one elevator per operator group
(whatever that means)
 
Binary operators could be like going from floor a to floor b
And stack/random access could be basement floors
(whatever that means)
Constants could be ground floor
 
one could also do the same Prindeal and the only operations are increment/decrement: whenever you deposit a value on a floor, the floor number gets added to the value.
@Sp3000 ground floor should be I/O
 
Oh, of course :P
Re Prindeal, depends on how the language turns out I guess. Convenience/niceness payoff
 
9:46 AM
Yes, ideally I'd like the language to be a bit more usable than that
I guess the minimum commands for the elevators should be "enter/leave front/rear", "go to floor X", as well as some sort of conditional based on whether a floor is empty or not, or whether a value is 0 or not. of course, if one wanted to make the language minimal, one could dispense with the values altogether, and make it a glorified abacus
(so all arithmetic would be in unary, represented by the number of passengers in the elevator or on a floor)
 
Weight limit exceeded: 100 passengers in elevator :P
 
0
Q: Dynamic programming not getting right answer

anonymousI was trying to solve this dynamic programming question https://www.hackerrank.com/challenges/equal and my approach toward this is that (1) Sort the array (2) Find the max (3) For each elements from 0 to array length -1 , try to make each element as close to max element by increasing it b...

 
 
2 hours later…
@MartinBüttner Anything wrong with that? Calvin said it was free to use.
 
oh, did he
ah right, didn't see that
 
12:18 PM
Has there already been a challenge which asks for programs which makes SE comments long enough to post?
By say, adding noses into smileys
 
@BetaDecay I just noticed, you swapped our usual semantics of cops and robbers :D
 
Blame Alex
 
did he suggest to swap it?
 
Wait, so I was right and he was wrong?
 
sounds like you were
I was really astonished that your robbers thread had more votes than the cops thread :D
@haneefmubarak This interpretation of cops and robbers is sort of my fault (because I wrote the first challenge assigning the roles this way round). I've first come across the phrase in internet-security capture-the-flag games, where the cops secure a machine (and the flag in the form of some secret) and the robbers break in to steal it. The metaphor I had in mind was along those lines. — Martin Büttner ♦ Jun 1 at 10:07
 
12:26 PM
Haha alright, I'll switch them back
Done :)
That'll confuse everybody
 
@AlexA. ^ see last ~10 messages
 
0
Q: ValiDate ISO 8601 by RX

CrissovChallenge Find the shortest regex that validates, i.e. matches, every possible date in the proleptic Gregorian calendar (which also applies to dates before its adoption) and does not match any invalid date. Output Output is therefore truthy or falsey. Input Input is in any of 3 expanded ISO...

 
12:47 PM
 
@MartinBüttner Not going to put up a hammertime sequel for CnR? :P
 
@Sp3000 hmmm... maybe. I don't have any decent ideas for the challenge yet.
 
:)
 
I like Fatalize's J answer
It's really quite pretty
 
I swear more people are upvoting because of that than the actual submission difficulty :P
(which I don't really understand)
 
12:58 PM
Also, I think it's just because it was the first one
People upvote answers which have already been upvoted
 
Hmm maybe
That does tend to happen (unfortunately)
Sometimes I feel like latecomers with good answers always get the short end of the straw
 
Yeah, I agree. I wonder if there's a way to get people more interested in those answers..
 
Maybe a default sort-by-active?
Or is that something unable to be controlled?
 
Unfortunately sort-by-votes is more useful for "normal" SE sites, because the useful information is at the top
So I doubt they'll change that any time soon
 
Very true, so I'm guessing we don't have control of that being default on a per-site basis.
 
1:11 PM
21
Q: Could PPCG benefit from a new sorting mode for answers?

Martin BüttnerThe default sorting for answers (by votes) seems somewhat inappropriate here on PPCG. In any case it tends to put early answers over late answers, because once a few are there, few people scroll to the bottom to see newer answers and even fewer people sort by activity. If you consider that bette...

 
1:22 PM
big news on meta :) (no we're not graduating)
 
Meta or the meta?
 
Nice :o
 
Ooooh, that is big news.
 
Didn't we get a new moderator not too long ago though? Felt like it was just yesterday...
(+- a few months)
 
1:25 PM
well, that was a replacement because Chris was hired by SE.
 
I remember that. For some reason, it feels like you've been moderator forever, though :D
 
↑ Woop woop
 
Exciting :)
 
What do the white stars mean? Is that when a room owner pins the message?
 
1:39 PM
yep
 
So many great people, so many options.
 
Feel free to go ahead and nominate as many people as you want. I can think of at least 4 people that I'd have no hesitation in nominating just off the top of my head. :)
 
1:54 PM
Picking a user's the easy part. Writing a nomination is hard ::P
 
You can do it! I believe!
 
what's an interpreted language that has a fixed integer size?
 
BF?
 
JavaScript (sort of)
 
(depending on the interpreter)
 
1:56 PM
Lua, likewise
 
javascript won't work
I figured out an equation for codegolf.stackexchange.com/a/54545/20198
 
Bash.
 
Ruby has Fixnum, but it gets converted to Bignum automatically if necessary (similar to Python, I think)
 
but I need a language which automatically mods the numbers
 
ah I see
Julia might work
 
1:58 PM
@NathanMerrill Bash does that. echo $[2**64] prints 0.
 
not on linux
 
(it's JIT-compiled, not interpreted though)
 
@NathanMerrill Was that directed at me?
 
yes, sorry
@MartinBüttner just not wanting to go to java/c++ for a bunch of math problems
Julia is what I'm looking for, thanks
bah, my equation doesn't work
I was hoping I could ignore the mod until the very end
 
1
Q: Counting Pages of a Book

SirParselotYour Task Given the page of a book P on stdin, count the number of times 0-9 appears in the range 1 to P. There is no page zero and your program should handle any number. Your program is not allowed to loop through all the numbers and count the numbers on each. As always this is code golf so sho...

 
2:13 PM
^^ I was about to say dupe, but oddly enough this is a popcon...
 
So many badges.... :O
 
2:29 PM
@BetaDecay in retrospec, I think that the challenge would have been better off without math operations (not to say its not a great challenge, because I've enjoyed it so far)
 
user image
3
retrospec ^
 
Is that a teaser to the old timey filter you've been implementing??
 
it's a showcase of my mad Chrome Developer Tools skills
 
2:45 PM
 
0
Q: Programing Puzzle Question

JITMr. Xhas recently shut down his factory and wants to sell off his metal rods to a local businessman. Mr. Octopus has many rods whose length are represented by array - lengths = {lengths[0], lengths[1], lengths[2],...}.The local businessman will only pay for rods that have same length. Let's say M...

 
I think you may have given the paper too cursory a skim.
 
@Geobits Should have left it to you - the writing would have been better :P
 
Nah, I'm not on for long today, so it would have been quick. It's my birthday :D
 
2:58 PM
Is this a "we're graduating soon" sort of birthday, or actual birthday birthday? :P
 
Happy birthday!
 
(Congratulations!)
 
I was seconds away from posting "I nominate myself. I vow to destroy questions if I am elected." and then decided that I don't want to ruin a serious thing.
 
You're showing too much restraint. What did you do to Rainbolt??
 
@PeterTaylor oh right... I thought it might be something like that, but somehow my mind skipped straight to these and then drifted off :D
 
3:01 PM
@Geobits The same thing you did to Fedorabits. When he comes back, Rainbolt comes back.
 
Hmm...
 
3:51 PM
@Rainbolt I looked at your profile, and clicked on the company you work for. Is it really a business based on reporting communication line downtime?
 
Have you ever played with a Walkie Talkie?
 
You know how when you are talking, your friend cannot?
 
its been a while, so you just reminded me, but yeah
 
That's the kind of downtime we're talking about
We report on that and other stuff
 
3:54 PM
couldn't each walkie talkie be on a different frequency?
 
Yes. One ambulance is on a channel. Another ambulance makes a call, and the software puts it on another channel. Do you buy enough channels for every single cop car, firefighter, and ambulance? Of course not.
The city couldn't afford a system large enough to let everyone talk at the same time
That's my understanding of why I have a job anyway. I don't actually understand most of the statistics I write code to report on. They are all just acronyms and values to me.
 
0
Q: Print a non-clashing binary search tree

Denham CooteBrief Print an ASCII representation of a binary search tree. You should write your own minimum implementation logic of a BST (node, left, right, insert) (50,30,70,20,80,40,75,90) gives: __50__70__80__90 | | | |__75 | |__30__40 | |__20 Detailed require...

 
I wonder if you could make a challenge about public safety officials wandering around a grid trying to make calls on nodes that may or may not be overloaded.
Each official would have a velocity and may need to switch towers while moving, and the tower he needs to switch to may be overloaded, so you may have to ripple
 
4:41 PM
@Geobits Happy birthday!
 
So.. PPCG is giving Geobits a graduation gift?
 
4:56 PM
@Sp3000 For l=l[:(l+"#").find("#")].split(), couldn't you just do l=l[:l.find("#")].split()? It looks like you add a # to the end to ensure you can always find one, but if you don't, it will return -1, which is the ending element anyways.
 
>>> l="i x"
>>> l[:l.find("#")].split()
['i']
^^ It's annoying me
 
Yeah, I can see how that would be :P
 
@Sp3000 Hmph, couldn't you have picked 4648, 4655 or 4676?
 
Damn, that's a lot more near misses than I thought there'd be - now I'm nervous :P
 
Near misses only make it more frustrating. :/
 
5:05 PM
btw if anyone wants to try this, assuming the same format with a=12345;b=932436;r=1103515245;n=99**4;m=2**31; closed form is (a*(r^n-1)/(r-1) + b*r^n)%m
(I'd brute force but I'm not sure what to do about the /(r-1))
 
 
2 hours later…
6:39 PM
@Sp3000 I posted the solution on your answer :)
not sure why everyone missed it on the question :P
@isaacg calvin's most recent question made me realize one thing is missing in Pyth that we may or may not want: first-order value functions
 
00:00 - 19:0019:00 - 00:00

« first day (1656 days earlier)      last day (3179 days later) »