« first day (1783 days earlier)      last day (2102 days later) » 

6:02 AM
Well, look at my response
Arrays are mutable, meaning A=a[0] doesn't save the value of a, but rather the reference to it.
At least humor me and try it then tell me what happens
Well, I'll be darned
I learned a thing
(and there was much rejoicing)
@Cyoce Thanks a bunch
6:05 AM
Sure no problem :)
Glad to help a fellow programmer out (as long as it won't put their byte count below mine :P)
@Sherlock9: Did you notice my comments on your answer? I wonder why you’re not responding.
No I did not
Hang on
did you apply my suggestions yet? I'd like some credit :P
I'm editing as fast as I can
@Cyoce It might not decrease the byte count
I'm still checking though
@Timwi, I was trying a new thing. Forgot to check if plain old ==2 was cheaper
Well it would appear to have the same byte count...
6:11 AM
@DigitalTrauma I managed to reduce your Retina solution by 1 byte
@DigitalTrauma I had a 24-byte solution while it was in the sandbox.
damn python's whitespace indentation
It looks shorter, but that's a lie...
@Timwi how so?
Oh that didn't take into account 11... But it would still be 27 bytes I think
@DigitalTrauma You still wanna know, after @MartinBüttner said he can do much shorter? :)
@DigitalTrauma I changed ^(8|1[18]$).* to ^8.*|^1[18]$
6:13 AM
@Sherlock9 if you ignore the mutability and use J=p[j][0] it saves 3 bytes.
@Timwi :) <searching through sanbox edits now>
@Sherlock9 edit faster!
@DigitalTrauma I don't think I posted it
@Timwi nice - thanks!
@MartinBüttner go ahead - you're the retina master!
6:15 AM
@Sherlock9 if you switch to python 2 you can use tabs as a shortcut for a second indent level
@Sherlock9: I think it’s another 2 bytes shorter if you said a="an"if .... else"a";print(a)
@Cyoce He only has one indent level, so it doesn't matter
explain how that is 1 level
@DigitalTrauma retina.tryitonline.net/… (minus multiline mode. It's quite similar, do you still want me to post it separately?)
@DigitalTrauma: OK I got 27 bytes
6:19 AM
@Cyoce Oh we're talking about different challenges, disregard
I thought you meant the a/an challenge
Oh good
I thought I was the only one getting confused
@MartinBüttner Yep, I got exactly the same
@MartinBüttner Go ahead - I don't think I would have got that
6:21 AM
@Sherlock9 can you switch to Python 2? Or are you using a python3-specific functionality that I missed?
@Cyoce You're on the right track with the mutability thing. I'm working on another idea
Wait, why Python 2?
several reasons
1. print doesn't need ()
@MartinBüttner I might borrow the method for my sed answer though
2. you can use tab characters and spaces to represent two distinct indent levels
More precisely: 1 tab == 8 spaces
I think I'd lose bytes on the input()
6:23 AM
(in terms of how python2 will treat it for indentation)
why? I think 4 bytes is worth the savings for the indentation
Because you put in an integer into input() and it gives and int. I need it as already a string.
Oh carp, wrong challenge again
"oh carp"?
Rather than "crap"?
6:25 AM
@Cyoce Like crap, but more ><>y
New language, I assume.
I propose we make a language called )()
pronounced carp
@El'endiaStarman Make it like ><>, but every adjacent pair of characters except the first and last are transposed.
@Mego How would that work given the 2D-ness?
Or if you want a special encoding, call it ›‹›
6:26 AM
@El'endiaStarman \n is a single character
Read it row by row
Or, for more accuracy, every adjacent pair of bytes except the first and last byte are transposed
So 00 01 02 03 => 00 02 01 03, 00 01 02 03 04 05 => 00 02 01 04 03 05
just thinking about that makes my brain hurt
I dunno what to do about odd-length strings
6:28 AM
I guess append a null and then apply the transpose?
Or leave the center character untransposed.
That works too
or combine them!
00 01 02 03 04 05 06 => 00 02 01 03 05 04 06
add half to the left and half to the right
6:32 AM
@MartinBüttner Saved me 10 bytes in my sed answer!
Back in a few
7:11 AM
A: Sandbox for Proposed Challenges

MegoCounting Up The goal of each answer is to output the integer that is one more than the previous answer's output. For example, if the previous answer's output was 5, your answer's output should be 6. Sounds simple, right? Here's the catch: you must output the next integer N, using at most N byte...

@Cyoce Back. WHICH ONES?
@Sherlock9 Make ALL the edits!
7:29 AM
This one?
def m(s):
 l=len(s);r=range(l);p=[[i,s[i]]for i in r]
 for i in r:
  if s[i].isalpha():
   for j in r:
    if j!=i:
     if a<=k[0]<=m:k[0]-=1
     elif m<=k[0]<=a:k[0]+=1
That's 261! I'm at 260!
@NewSandboxedPosts I probably posted that at a poor time, considering most people are asleep
@Sherlock9 switch to python 2 and use tabs/spaces for indentation. it will make that construction much less costly
Well, I just made a bunch of edits
There is now less indentation
link (I'm lazy)?
But it still Python 3
A: Letters, Get Moving!

Sherlock9Python 3, 278 275 273 270 260 258 249 248 bytes I should really golf this down better, but here is my solution, with thanks to katenkyo for his help with the logic, and to Cyoce and Mego for their help with the golfing. def m(s): l=len(s);r=range(l);p=[[i,s[i]]for i in r] for i in r: if s[i...

7:44 AM
python 2 is ∞ better for 99% of ppcg
@Cyoce 99% of the time, it works every time
I don't know Python 2, for the record
@Sherlock9 It's the same as Python 3 but golfier
it's basically the same
except no parens for prints
and 1 tab = 8 spaces
and trivial stuff like optimization
How does filter in Python
7:46 AM
oh yeah also Python2 has reduce. for python3 you need
from functools import reduce
print and exec are statements. Everything returns lists instead of generators/generator-like objects, except for itertools stuff which is worthless for golf. Tabs are valid indentation. Strings are byte strings (but act like strings and not byte lists). / is integer division if both arguments are ints/longs. int and long aren't the same thing.
A: Alex-style Addition

FlagAsSpamVitsy, 12 10 bytes aR)[1+0m]+ aR Get a random number in [0,10) )[ ] If its truncated int is 0, do the stuff in brackets. 1+0m Add 1 to one of the items and execute the 0th index of code. + Add the numbers together. Try it online! Note that this has a tiny chanc...

@FlagAsSpam y so salty
@Cyoce Nah that's xnor. I just picked up a few things from him :)
7:48 AM
I'm the second shortest answer now. Because Pyth.
@FlagAsSpam Technically 3rd. Seriously is also 2nd, but mine was posted first :P
only 2 more rep to do review queue
7:50 AM
@Cyoce For your sake, I hope you never get the rep
it's optional
I didn't just up vote his question what're you talking about >.>
Access to the review queue is more of a punishment than a reward :P
a last resort for when I'm bored
7:51 AM
It's optional. :P
It's optional but encouraged. Also it nags you if a bunch of reviews pile up.
I don't get review notifications. :D
The Every! Body! Gets! A Hat! hat really is the easiest one to get.
Just got it on Travel.SE.
ya dont say...
@FlagAsSpam That's because the queue tends not to build up too much
7:53 AM
I think I've seen a review notification a single time since getting the privilege
^ 4 times.
Also, I've decided that procedural langs make no sense to me.
I prefer the stack.
Yeah me too
I've gotten to the point where my C++ skills have notably decayed
Despite it being my first language
I love forumming
7:55 AM
I program mainly in Java for APCS. shiver
Also, I'm thinking about making a cross-compiler for Vitsy to java.
Java. shiver
I found the Compiler class. :D
It wouldn't be too hard to make a Python transpiler for Seriously
(given that it's written in Python)
7:56 AM
I'm just too lazy to actually do it
Just replace all the characters with the methods used in the code.
And it won't provide any noticeable speedups
Also means that a 5 byte Vitsy code will turn into a 3k .class file.
But still.
@FlagAsSpam Simple now, but when I add things on my todo list that require more complicated lexing, it'll suck
7:57 AM
i.e. Methods.
What are thooooose?
i.e. ?
Methods don't make sense in a stack lang
/me wonders how a Minkolang-to-Python transpiler would work
> method: m
> Go to the line in the source code file as defined by the truncated top item of the stack.
@El'endiaStarman It wouldn't.
7:58 AM
i.e. ?
@FlagAsSpam Works great when newlines aren't operators.
@Mego They aren't. c:
This page lists English translations of notable Latin phrases, such as veni vidi vici and et cetera. Some of the phrases are themselves translations of Greek phrases, as Greek rhetoric and literature reached its peak centuries before the rise of ancient Rome. This list covers the letter I. See List of Latin phrases for the main list. == I == == References == Notes Sources...
@FlagAsSpam In Seriously, they are. Or, at least, they will be. Eventually.
Second (or third) row of the table.
7:59 AM
@El'endiaStarman You'd have to find a way to make a method out of every list, and then find special movements for F.
I can't find any way to drop 3 bytes from my 10-byte Seriously answer :(
I cry for you
No, I meant i.e...
did you
8:01 AM
it'll suck: that is, methods.
@FlagAsSpam I think it's all the directional stuff that would make it a nightmare. Arrows, mirrors, gosub (f F), wormhole (w W), trampolines, etc...
I'm considering removing x, !, | and > from Vitsy.
I thought you were referring to "things to be added"
@Cyoce Oh, no, I was talking about my own lang.
which one is that?
8:02 AM
I'm sorry everyone is making a language these days...
It's all good. :D
Even I am
Yeah, there's definitely a proliferation of languages...
8:03 AM
Which is cool, I think.
@El'endiaStarman <insert that graph here>
I think that there was a sudden increase 2-3 months ago.
@FlagAsSpam That's when we showed up \o/
It's like all of us appeared at once.
8:04 AM
So, ?
tbh I don't remember how I found this place
Accident, for me.
@FlagAsSpam Yeah, which was weird.
8:05 AM
I was trying to get to SO.
@El'endiaStarman And all decided to make funky 2D stack based langs. xD
I think I found a link to here from an SO question
As in the stack was 2D.
Me, I had been lurking for years and then I saw a post that used Befunge, so I went and learned it...then I answered "Beatles and Hexagons" with it...
that's not fair mine is 1d
Seriously is ?d
8:05 AM
@Cyoce You're gonna have a bad time. xD
@Cyoce Mine has a stack of stacks.
@Mego Because you can make arrays of stacks?
@FlagAsSpam Registers
oh yeah
@El'endiaStarman ^^^^ Same.
8:06 AM
They complicate the stack-based definition
I thought you meant 2d as in befunge lol
@Cyoce That's true of mine as well. :D
@Cyoce Yeahno, Vitsy's (kinda) 1D.
Well, properly, it's (2+1)D...
I just posted a new combinatorics challenge. Should be easy but fun.
8:07 AM
PlatyPar can have any number of dimensions
[waits for the inevitable question]
Although my instruction set is parsed three-dimensionally.
Challenge issued: make a (3+1)D language, where the source code is the space-time continuum
{} create a new stack
5 upvotes in 5 views!
8:08 AM
@isaacg It blows my mind that the sequence also describes non-intersecting chords on a circle.
I know, that's crazy
5 votes, 3 views on my screen. O.o
Pretty sure view count is cached...
Same deal with YouTube video likes/views.
After refreshing, I have 7 upvotes in 7 views
Well, perhaps not so much cached as verified at regular intervals.
8:10 AM
7 upvotes in 1 view
Just stumbled upon this:
Q: Draw with your CPU

bebeI have come across an article where students used network traffic to draw their university on the country's IPv6 graph. [image] Your goal is simple to tell, but hard to implement. Draw the text MAIL (as it is one of the few words that can be read on a 1D graph) on the CPU graph. It should look...

Q: Motzkin Numbers

isaacgThe nth Motzkin Number is the number of paths from (0, 0) to (n, 0) where each step is of the form (1, -1), (1, 0) or (1, 1), and the path never goes below y = 0. Here's an illustration of these paths for n = 1, 2, 3, 4, from the above link: The desired sequence is OEIS A001006. OEIS has some...

I may end up borrowing quintopia's Catalan solution for this :P
8:24 AM
A: Motzkin Numbers

MegoSeriously, 22 bytes ,;╗ur`;τ╜█@;u@τ╣║\*`MΣ Borrows some code from quintopia's Catalan Numbers solution, specifically the improvement I made in the comments. Explanation: ,;╗ur`;τ╜█@;u@τ╣║\*`MΣ ,;╗ get input, dupe store one copy in register 0 ur get ra...

Why was Vista afraid of 7? Because 7 8 10. — Thomas Kwa 2 days ago
^ 100 votes.
It's the truth
I should make unprintables be regex operations in Seriously
No answers yet...
Q: Symbolic Integration of Polynomials

FlagAsSpamApply an indefinite integral to a given string. The only rules you will be using are defined as such: ∫cx^(n)dx = (c/(n+1))x^(n+1) + C, n ≠ -1 c, C, and n are all constants. Specifications: You must be able to integrate polynomials with any of the possible features: A coefficient, possibly...

8:39 AM
@FlagAsSpam Q is hard
Plz fix.
8:59 AM
What's the current opinion on writing code for things in the sandbox?
Like, not implementing new lang features, but just writing the code.
Gopher it
AppleScript has builtins for this.
I'd prefer people didn't, but not as strongly as a loophole.
@isaacg There's no real way to prevent people from doing it, though. We couldn't enforce the rule if we had it.
Sure, I was just voicing my opinion.
9:05 AM
And I was responding with my viewpoint :)
I think Martin does sometimes post code he wrote while it was in the Sandbox.
set n to(current date)
if date string of n contains"March 14"then
log"Pi Day"
else if a(n)contains"3:14:"then
log"Pi Minute"
else if a(n)contains"3:14"then
log"Pi Second"
log"No Pi Time"
delay 1
end repeat
on a(b)
time string of b
I've never used the methods in AppleScript before, but it does actually save bytes.
1 hour later…
10:13 AM
( ͡° ͜ʖ ͡°)
10:49 AM
11:21 AM
@xnor I saw your comment about leap days getting boring and thought I'd post a challenge about the Forgotten Realms calendar... turns out that one has leap days too -.- (although I think it's limited to every fourth year, without the additional rules for 100 and 400).
A: Sandbox for Proposed Challenges

Quill - HAT MANIACSanta's Decision: In this challenge, you will help Santa decide whether somebody on their list has been naughty or nice, and subsequently get coal or toys. Input Input will come in as the person's name followed by one whitespace and then either naughty or nice. The name will have no whitespace...

Although I guess in general, challenges about fictional calendars might be a good idea to circumvent built-ins without having to disallow them artificially.
@NewSandboxedPosts oh look it's me
(And if people manage to map a problem for an artificial calendar onto a real calendar to use built-ins after all, that could be interesting in its own right.)
hello there
11:22 AM
hi (I was just about to leave again, though...)
where's ppcg's design status at?
it's not a thing
there's no evidence we'll graduate any time soon
why not?
is a certain stat not being met?
yes, we don't have 10 questions per day, but I doubt we'd graduate if we did.
area51 seems to think it's okay
11:29 AM
Q: Graduation, site closure, and a clearer outlook on the health of SE sites

AnaBack in April of 2010, Joel shared our assumptions about the role of small sites in the newly minted Stack Exchange network: If a site does not have enough activity at the end of 90 days, it will be closed down. Any existing Q&A will be archived and made available for download, but the site...

stats aren't everything though
there is no guarantee any site will graduate just because it meets those stats
yeah, I suppose
@Quill-HATMANIAC Left you a comment on your sandbox post. :P
Yeah - bonuses are kinda specific to the type of challenge; you probably want a percent bonus, because there are going to be really short solutions for this one.
oh, like closer to 25% or 50%?
11:42 AM
Well, is this code golf?
Or something else?
um, i'm new here dude
Okay - are you measuring the score by lowest byte count?
Then it's code golf.
So yes, it's code golf - for the duplicates thing, I'd offer 25% - just to make the shorter answers actually have a benefit in going after it.
11:52 AM
alright, how's that @flagasspam
I like it. :D
There might be some issues with simple regex replacement questions (might be an almost dupe), but the fact that it's the season makes it alright.
My god, it's full of stars.
@Quill-HATMANIAC Yup - I put the relevant tags on the end of it, I can't think of any more.
Will there be any invalid input?
um, should I cover that too?
If there won't be invalid input, then you probably should mention that, too. :P
Something like "You can assume that all input is valid".
Or, create a requirement for an invalid input handler.
@Doorknob冰 If Doorknob was a metal artist, what would happen?
Code golf with metal jokes in it?
12:28 PM
Q: Eye tracker application programming

yalanIs there any websites or blogs concerning building application for eye tracking device. Thanks yalan

12:39 PM
Q: How many weeks?

Filip HaglundYour task is to output a single number; the number of ISO weeks that a given date range intersects. To quote Wikipedia: An average year is exactly 52.1775 weeks long, but this is not about the average. Input consists of two space-separated ISO dates: 0047-12-24 2013-06-01 The end date is neve...

1:04 PM
reference implementation and test cases done:
A: Sandbox for Proposed Challenges

Martin BüttnerHelp, I'm trapped in a Sierpinski triangle! code-golf fractal graphs path-finding Drawing the Sierpinski triangle has been done to death. There's other interesting things we can do with it though. If we squint hard enough at the triangle, we can view upside-down triangles as nodes of a fractal ...

if no one has any complaints in the next hour or so, I'll post it
oh, we have a rare guest. hi, @Gareth :)
1:18 PM
@MartinBüttner Looks good to me
thanks :)
1:43 PM
I have a Python question and the answer is probably reduce but I'd like to make sure.
How do you make a list comprehension that uses the result of the last calculation in the next one?
wait, let me read the question.
For example to calculate all possible combinations for n (the nth row of Pascal's triangle). I could do the following:
A: python : can reduce be translated into list comprehensions like map, lambda and filter?

dawgIt is no secret that reduce is not among the favored functions of the Pythonistas. Generically, reduce is a left fold on a list It is conceptually easy to write a fold in Python that will fold left or right on a iterable: def fold(func, iterable, initial=None, reverse=False): x=initial ...

oh but if I understand you correctly you want something like a generalised accumulation function?
there's this question with an unhelpful answer: stackoverflow.com/a/13828611/1633117
def comb(n):
 c = [1]
 for i in range(n):
 return c
1:49 PM
Something like that I suppose. I'm not familiar with all the terms but it seems like both answers would suit me fine ... if I wasn't golfing
.wday==1 is the same length as .monday? in Ruby ;(
.wday<2. or is Sunday 0?
Sunday is 0, yeah
who does that.
VBA sunday = 0?
so everyone?
1:52 PM
Pretty sure two languages isn't everyone :P
especially those two.
At least where I'm from, weeks always start on Sunday.
.NET has Sunday as 0 as well
@Doorknob冰 I always found that weird.
@MartinBüttner Actually, that last one may work. Thanks!
1:54 PM
@MartinBüttner And I've always found weeks starting on Monday weird. ;)
are you familiar with the term "weekend"? ;)
@Doorknob冰 I like calculating Sunday as 0, but weeks starting on Monday because I'd like my weekend not to be split
Though perhaps we should start our weeks on Saturday so that we start with rest
@MartinBüttner haha, I suppose you have a point
hmm I think my ISO week function may have an off by 1 error but I can't think up a set of dates to test it on that would cause it.
@Doorknob冰 how can you possibly reconcile the fact that half your weekend is at the beginning of the week o.O
1:56 PM
Well, it's not, technically. All it changes is how things show up on a calendar, and... I guess I'm just used to it since I've always seen it that way.
@MartinBüttner Yeah. The weekend is on either end of the week. ;-)
@Doorknob冰 If you could Use function arguments would that whole first line of your code do away?
@JimmyJazzx If I could take input as two Time arguments, then yes
if they had to be strings, not so much (I could still reduce it though)
... wait, no, actually, maybe a single string instead of two string arguments is shorter. An array of strings would shorten it though.
@Doorknob冰 Anyway, there's an ISO standard for this, so everyone who disagrees is wrong anyway. ;)
well then you wouldn't need to split it twice atleast.
1:58 PM
much like...
@JimmyJazzx right
@MartinBüttner 'Murica
I should make a challenge about the format on the bottom next to the cat.
The one directly to the left?

« first day (1783 days earlier)      last day (2102 days later) »