« first day (1718 days earlier)      last day (3108 days later) » 

3:03 AM
I can't find anything in the docs that suggests there's a way to get the number of edits.
view_count
creation_date
link
locked_date
is_answered
protected_date
owner
last_activity_date
last_edit_date
score
accepted_answer_id
question_id
tags
title
answer_count
 
0
A: Sandbox for Proposed Challenges

VTCAKAVSMoACEThe Meme in the Room popularity-contestascii-art Ugh. Memes. We've all encountered them. THE CHALLENGE Write a code that will return any meme you see here, accurately (recognizable to the audience, the voters). SCORING You don't have to rely on the voters solely to get you through. For ev...

 
@Calvin'sHobbies "Alex makes about the edits." <-- ?
I really want to know what you mean by that ^
 
@NewSandboxedPosts This needs revision, but I'd like to get some advice on it.
 
@AlexA. makes a giid point
or whatever
 
@Calvin'sHobbies Mind if I edit the comment to make that first sentence make sense?
It's really bothering me
 
3:12 AM
I did I think
 
You did
Thanks
:)
<3
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Not sure if there's anything you can do about the edits thing except not use the stat. Not a game breaker, just some may find it annoying.
 
I find it quite annoying. I have no idea how/where to get that number.
 
Well you can get the top number on the revisions page, e.g. codegolf.stackexchange.com/posts/60569/revisions
Or I guess top num minus one
 
So call the API to get everything but edits, scrape the HTML to get edits? I don't think I'll answer this one. :/
Scraping HTML makes me crazy.
 
3:22 AM
@Calvin'sHobbies You like to write challenges like this. Any suggestions?
 
I'm trying to translate something from jsfiddle into a single HTML document.
 
Use script tags
 
Do I basically take all of the JavaScript code and put it between <script> tags to make it work?
Because that hasn't worked.
 
I don't actually know.
 
Yes. At the end if it tries to access html elements (else they won't have loaded)
 
3:30 AM
I put it at the end... let me try and show you...
 
@Calvin'sHobbies Thanks for the suggestion. I think I'll keep it in to prevent this from becoming a standard challenge of retrieving data from the API.
 
@PhiNotPi
TypeError: HighchartsAdapter is undefined
 highstock.js:313:310
TypeError: HighchartsAdapter is undefined
 exporting.js:9:57
TypeError: $(...).highcharts is not a function
 imagetest.pl:21:1
 
How are you seeing those errors?
 
@PhiNotPi I just copied the js into a script tag in another fiddle and it seems to work fine -> jsfiddle.net/xos238ue
 
3:34 AM
@PhiNotPi I opened firefox's console.
 
@Calvin'sHobbies That's not working for me.
 
Really? In chrome I get mixed http/https content warnings but it runs exactly the same nonetheless
But yeah, on the koth page I see the same errors as Conor
hmm
 
Uncaught TypeError: Cannot read property 'addEvent' of undefined
exporting.js:9 Uncaught TypeError: Cannot read property 'fireEvent' of undefined
imagetest.pl:21 Uncaught TypeError: $(...).highcharts is not a function
^ got this from Chrome
 
@PhiNotPi You have jQuery imported, right?
 
3:40 AM
yes
 
He does
 
let me try something...
 
Ah, yes, of course. You'd get an error on $ otherwise.
 
Be glad you're not running this in ><>: Something smells fishy...
 
3:44 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ It takes 3 separate API calls to get a question owner's username, the question stats, and the number of comments. It also requires parsing the HTML on the revisions page to get the number of edits. :/
 
I tried changing http to https, and it had no effect on the website (it fixes CH's jsfiddle, though)
 
It might be something to do with your koth page not liking http/https mixing (maybe not but otherwise idk)
 
I'll try changing them to http
 
@AlexA. I don't know the API too well, but wouldn't looking for the max value of N in <span title="revision N">N</span>?
 
Yes
 
3:49 AM
I don't really think that would have an effect though. Its not the website connecting over http/s. it's simply telling the browser to connect.
 
@AlexA. Okay. When I hear "parsing", I connote it with "labor". ;-;
 
1
Q: Chunky palindromes

DennisPalindromes are fun, but some of the other strings are starting to feel left out. We can turn those strings into chunky palindromes by splitting them up into palindromic arrays of chunks. For example, the string "abcabca" isn't a palindrome if we read it character by character, but we have three...

 
Uncaught TypeError: Cannot read property 'addEvent' of undefined(anonymous function) @ highstock.js:313(anonymous function) @ highstock.js:315(anonymous function) @ highstock.js:420
exporting.js:9
Uncaught TypeError: Cannot read property 'fireEvent' of undefined(anonymous function) @ exporting.js:9(anonymous function) @ exporting.js:24
imagetest.pl:20
Uncaught TypeError: $(...).highcharts is not a functioncreateChart @ imagetest.pl:20(anonymous function) @ imagetest.pl:55n.Callbacks.j @ jquery.min.js:2n.Callbacks.k.fireWith @ jquery.min.js:2n.extend.ready @ jquery.min.js:2I @ jquery.min.js:2
 
@Justin Looks good. I'm not crazy about having floats input since their imprecision ruins the integrity of the output sequence so to speak. Maybe inputting proper fractions and and expecting precision is an option? (That might make things unnecessarily tricky though)
 
3:54 AM
You like chunky peanut butter, don't you, Conor? ಠ_ಠ
 
Nope. ಠ_ಠ
 
Smooth?
 
wat
 
"fuzzy logic"
 
3:55 AM
I wasn't looking for a coefficient of kinetic friction
 
1 = yes, 0 = no, 0 < x < 1 is intermediate
 
I'm not sure how to interpret this.
Do you only kind of like peanut butter in general?
And when you do have it you prefer it to be smooth?
 
claps perfect!
 
Ok.
 
lol
I love smooth peanut butter. Would not eat chunky.
 
3:59 AM
I prefer smooth but I don't mind chunky.
I really enjoy having hard opinions on things, so I tend to say I hate chunky peanut butter.
 
@Justin I'm confused about the -9.8 test case. Shouldn't all the negative terms be present (i.e. 1) for quite a while to get down that low?
I thought I settled the pb dispute in my old question
 
It's never settled.
Multiple spaces vs. tabs questions and weeks of chat argument and it still comes up occasionally.
 
The best peanut butter is to drop that and have Vegemite instead.
 
@Sp3000 That's not peanut butter, that's some unholy, salty mess.
@CᴏɴᴏʀO'Bʀɪᴇɴ Incorrect.
 
4:02 AM
@AlexA. ^_^ How can a word be incorrect?
 
Stabs
There needs to be a middle ground character
 
Can I mention chunky in a question without completely derailing the Nineteenth Byte? Apparently not...
5
 
@Dennis Nor can you reference spaces or tabs.
 
That I knew already. But I didn't even mention peanut butter. :P
 
My girlfriend's dad has had a jar of "soy-nut butter" in his fridge for as long as I've known him (~10 years). I'm fairly certain that he's never tried it and it's the same jar from 10 years ago.
2
 
^ literally laughing out loud
 
@Dennis Should've used lumpy
 
btw has anyone tried this cop? Got about half away and now I've given up
 
@Sp3000 If you removed the 3 you'd look like Spooo
I hope that helps
 
4:13 AM
D:
"SPOOOO - the anthromorphic/furr..." okay no thanks
 
Does anyone have any idea what might be causing my new errors?
 
@randomra @undergroundmonorail Suggestions welcome
 
Good night people
 
G'night!
 
4:47 AM
@Calvin'sHobbies @El'endiaStarman I figured out my problem.
I just had to import jQuery before those other scripts I was importing.
 
Not enough jQuery. Just as I suspected.
 
I am working on a graph to serve as the scoreboard for my bitcoin trading challenge.
Also, I should probably call it a rather than
goodnight!
 
G'night!
....[waits for the Sandbox bot]...
 
0
A: Sandbox for Proposed Challenges

El'endia StarmanThe /\/\aze of Mirrors code-golf ascii-art sniffs...something smells...fishy. The reason being that there's actually a fish! But it's at the end of a maze of mirrors that you have control over. Your task is to rotate the mirrors until you can see that delicious-smelling ><>. Luckily, there are...

 
5:27 AM
This took so long. But it works! \o/
 
5:41 AM
and its long too
 
@AlexA. The question allows URL shorteners, so you could use codegolf.xyz/posts/$n/revisions.
 
@Optimizer Yes it is. It really is.
@Dennis Good call, I'll give that a try. Thanks!
 
|
v
2
 
5:59 AM
Just realized a quine in Minkolang is really easy. "66*2-(O).
 
^^ every 2D language with string parsing, basically :P
 
Good night!
 
Gluten tog!
 
translate: Guten tog!
(from Swedish) Guten took!
translate: Gluten tog!
(from Swedish) Gluten took!
 
translate: Gluten tog!
(from Swedish) Gluten took!
O no u took ma gluten
You broke into my house, ninja'd my Swedish, and stole all of my gluten.
@El'endiaStarman You just realized that? @Dennis has always known this. Dennis knows all things.
 
6:06 AM
@Sp3000 It's shorter than Befunge and ><>'s quines though! :D
 
My reply: :D
 
@Sp3000 I thought you had stopped development of Golfish? (Or was that Slip?)
 
Yeah I did, but I started again yesterday cos I've been ><>ing so much lately
 
@Sp3000 Double quote in code, single quote in output. HRM.
 
Yeah typo, I edited the link
 
6:10 AM
@Sp3000 Do you still do Slip?
 
Yep, but I'm reimplementing things... slowly
Apparently I did groups all wrong last time
 
o nose
What's the implementation language? Python?
 
Yeah, basically the only language I'm confident doing big things in :P
 
Reasons your quine is shorter than mine: you have d as 13 and your H is my (O).. However, I think my choices will prove beneficial for more complex programs. :P
Ha, my implementation language is also Python!
 
To each their own :P
btw how do () loops even work in 2D? I was having trouble getting that to not be a do-while
 
6:15 AM
Do you guys prefer Python 2 or 3?
 
3 definitely. They fixed a lot of broken stuff (the only time I like 2 is libraries)
 
I don't know a whole lot about the differences. What are some of the broken things in Python 2 that were fixed in 3?
 
@El'endiaStarman "As far as I know, this is absolutely the only 2D language to have recursion." - in a way not quite - that's what ><>'s stacks are for actually
 
@Sp3000 True. I'll amend that to say "to directly implement recursion".
 
Well Unicode's easier to work with, and print being a function makes things easier too
input()'s probably the biggest security problem of Python 2, so there's that
 
6:20 AM
input() is evaluated input, right?
 
@AlexA. I stuck with Python 2 when they released Python 3, but I forced myself to work with Python 3 after like, half a year or so (so, Python 3.3). I've used it ever since.
 
Yeah, evaluated as in you can chuck __import__('os').system(...) at it too
 
Um. What.
Nobody realized that was a bad idea???
(Prior to Python 3, that is)
 
@Sp3000 Well, in my language, your two options are 1) don't enter the loop, and 2) do this: (0). Minkolang exits a while loop if the top of stack is 0.
 
They probably did, but I dunno
Re loop: My question is - if you don't enter the loop, how do you know where to go instead?
 
6:23 AM
Not sure what you mean. Use redirectors?
Are you thinking of jumping to the )?
 
Yeah that
How do you know which one is the corresponding ), or does that not matter?
 
Funny thing is...there need not be a single ).
 
Exactly my problem :P
 
I store the location of the opening ( and the direction the program counter was heading at the time.
ndN(d2%,B
?=1dNd:2<.)
 )Nd+1*3<
That's a way to do the Collatz sequence in Minkolang. Explanation of the one line version here.
I wish I had an online interpreter now so I could point you to it and show you an animation.
That'll have to wait until I finish the Python one, though. :P
 
So what happens if something hits the ( and is falsy? Where does it go?
 
6:27 AM
In Minkolang, while loops take all of the parent's stack by default. So truthy/falsy doesn't effect the start of the loop.
 
Does that mean while loops have to run at least once? Or...
 
Hmm k, nvm
 
@Sp3000 after a quick look: is there a reason, z (jump n if not 0) is missing from the qQZ
would a register write and read instruction be useful? I think I wished that sometimes
if you need to store a const, now you have to push it back after every read
 
There's z for not, so it's equivalent to z<blah>Q - I wasn't sure whether it was as useful
There's V variables, do you mean like that?
(e.g. 3VXXXXD;)
 
6:36 AM
There is a bit of a hacky way to make it a proper while loop: push a truthy/falsy value and jump to the closing ) if it's falsy. This will have the side effect of making the while loop run until the stack is empty though.
 
Hm...
 
@Sp3000 I'mnot sure how those work
 
Actually, unless you push a 0 somewhere in the body.
 
Yeah the only way I could think of to do a proper while loop would need specifying the coordinates to jump to if the while loop ends, but that's expensive :/
@randomra V pops top of stack and stores it in the variable corresponding to the next char
 
any unused letter could be a variable?
 
6:38 AM
Actually, there's another way: leave the while loop forever and don't encounter a ) until at least after hitting another (.
 
Any char works actually, cos defaultdicts
 
so register is mostly legacy?
is Gol><> compatible now with ><>?
 
Register's still useful when you need something at the top later I think, I dunno. I wanted it to be mostly compatible with ><>
The main changes are @ rotates the opposite way and backticks escape stuff in strings, but for the most part most programs still work
@El'endiaStarman Sorry, I'm not sure how that would work?
Oh, [] is the other change, but not many people use that to begin with I guess :P
 
@Sp3000 Minkolang keeps a stack of stacks to handle loops and recursion. All stack-based operations operate on the top stack. So if you leave that while loop permanently, nothing in the program will know that they're not actually working with the original stack.
This is a problem if you populated the loop with a subset of the parent stack, though.
Oooh. I need to implement break.
 
Hmm k...
Wait how would break work then?
 
6:44 AM
You'd have to redirect it immediately though to avoid executing the rest of the loop's code.
extend the parent stack with the loop stack.
 
the teleport idea is nice
 
Super mini challenge - output an upside-down tent:
 
Yeah, I'm still not getting how you'd avoid the rest of the loop's code, but okay...
 
If input = 1:
____
\/_/

If input = 0:
____
\_\/
 
@Sp3000 Let's say that, uh, U is <break>. Then you can do ...(d?v...) and have U right under the v. Or do something like ...(d2&Uv...) because & is a conditional n-trampoline.
 
6:48 AM
@Calvin'sHobbies hi
 
@AlexA. Doesn't compile
 
D:
#include <hug>
How about now?
:3
 
@El'endiaStarman So what happens after U? Where does the pointer go?
(trying the mini-challenge tells me I have bugs :P)
 
@Sp3000 Downwards. I'm assuming the programmer would put something there to "catch" it and continue doing stuff...
 
Hmm k...
@Calvin'sHobbies CJam, naive 20
 
6:57 AM
@Calvin'sHobbies Quick attempt in Minkolang: 32.
Attempted to be clever. 35 bytes. Well crap.
 
Not-so-quick attempt gives 28 and a bug in Gol><> :P
 
I've decided to post this challenge to the main site
1
A: Sandbox for Proposed Challenges

PyrrhaTitle tbd code-golf chess Objective The black pawn wants revenge. Plot out its last attack. Rules The black pawn (U+265F) starts at the top row and moves downwards. Maximise points taken, indicating the path with X. Pawns (U+2659) are 1, bishops (U+2657) and knights (U+2658) 3, rooks (U+2656...

just need to think of a title
>.>
 
Got a 26 byte solution!
"\/_\/"n,2*1+gx25*"_"3D(O).
Actually 27 bytes because of the 0 vs 1 difference. Grr.
....hmmmm....
 
7:14 AM
"/\_/"IR@~`\a`_3R:H currently works
 
But yeah need bug fixing so that the four underscores can be pushed better :/
tbh you're probably right about the more complex programs thing though :P
 
@Pyrrha do solvers have to use unicode chars?
or is PRBNKQ/prbnkq ok too?
unicode chars has a bit different spacing on many machines, but it might not be a huge problem
for title: The Black Pawn's Revenge
 
I actually fixed a bug in D because of this. Thanks @Calvin'sHobbies!
 
Calvin should do this more - finding bugs in everyone's languages :P
(btw time in Minko looks funky)
 
7:32 AM
It basically just falls through layers in one direction and it prefers to do this when possible (i.e., there's a space and you didn't boost the program counter).
 
Sounds like you could almost do functions in it
 
yeah
I actually do plan to add support for libraries.
Written in Minkolang, of course.
 
:) have fun with that
 
@Sp3000 Yep. I can debug code without even writing or running it.
3
 
7:48 AM
@Calvin'sHobbies Give us more super mini challenges!
(Not tonight, though. I need to get to bed...)
 
@El'endiaStarman Output a snowflake with only one instance each of _, /, or \ in your code.
 _/\_
\_\/_/
/_/\_\
  \/
 
That could almost be a main site challenge :P
 
....oy.
 
8:04 AM
(or zero instances)
 
brings out ASCII table
 
@Calvin'sHobbies that's a nice challenge
 
@Calvin'sHobbies To do it with zero instances would probably add only three bytes or so...
 
@El'endiaStarman It's a star, man
 
......
I got nuthin' except a star for you.
 
8:11 AM
lol: `.PVA`[PVB` VC`^PVDABCCaBDBADAaADABDBaDBADCH
 
Huh, very nice!
oh, lol
 
You could probably do something similar in ><> with a g loop
 
@VTCAKAVSMoACE Yes, I hope it is correct.
 
8:24 AM
(Now back to trying to implement recursive Fibonacci...)
 
8:35 AM
@Calvin'sHobbies "/_ "5DI3$["\"7G]I3$["\"3G]I4$["_"56+i2*-G]"_"4GI2$[" "89+G]" "5GI3$[25*63i-*G]r(O).
...wait, no.
I used each symbol thrice. Crap!
 
Can you do 1+ or 1- on the individual chars?
 
Yes. 1+ or 1-. :P
Don't worry, I've got a better way (I think).
 
Then you can do it with zero times!
nvm :P
 
...technically, yes. But it wouldn't be as short. :P
"/"5D"\"5DI3$[5G]I3$[1G]"_"5DI4$[9i2*-G]2G0G" "3D88+G88+G4G0GI3$[25*63i-*G]r(O).
Ta-da!!!
80 bytes. It's actually 4 bytes shorter than my previous version!
It might be better to encode it as a base-6 number and then decode it... :P
 
8:50 AM
I think there's only 5 types of chars, so that could work
 
Right, yes. Base-5, actually.
...if I made For loops take the whole stack by default, that would shorten my code by 8 bytes.
Okay, I really need to go to bed now. G'night!
 
Night :)
 
9:25 AM
1
A: Sandbox for Proposed Challenges

pbeentjeCategorical logic Inspired by this question: Task The point of this challenge is to create a function or program that takes 3 short phrases and returns the logical assessment of the phrases. Input Each of the three phrases will be in the form: [All|Some] [A|B|C] are [A|B|C]., where the two A...

 
9:58 AM
-5
Q: Caffeine also forces the Alpha Peak

reginaldlovettCaffeine also forces the Alpha Peak liver to release more glucose in the blood. This causes blood sugar often followed by a sharp drop in blood sugar. (The need for stairs or another cup of coffee!) Additional Café also puts extra strain on your kidneys.http://www.healthcaresdiscussion.com/alpha-...

 
10:13 AM
hi all
 
This is sort of ready for review:
1
A: Sandbox for Proposed Challenges

Martin BüttnerRender a Polygram code-golf graphical-output geometry I will flesh this out some more tomorrow. Given the number of vertices n ≥ 3 and the "step size" 1 ≤ m < n/2 (indicating the distance between two connected vertices), output a graphical representation of the corresponding regular polygram....

 
0
Q: Non Unique Elements

garg10mayWrite a program to find non unique elements of an array. data = [-34, 0, 1, -34, 4, 8, 4] should output [-34, 4] Winner - Minimum no. of bytes

 
@MartinBüttner I like how you try to close all the "I'm printing black on black so you can't see" loopholes :P
 
:/ I don't like how it complicates the spec
 
But yeah, looks pretty good
 
10:42 AM
@MartinBüttner Not a problem with your wording, but with me jumping to conclusions, but just to let you know my initial assumption was that "multiple closed loops" required filling the enclosed areas in different colours, rather than using different colours for the distinct loops. Reading on and seeing the example images cleared it up completely, so the only thing I'm left wondering is whether you have a requirement for a consistent background colour like in the examples.
@El'endiaStarman Thank you :) I get similar results with that one, choosing which colour to see or shifting to a gradient or blotches. With magenta/green I also seem to be able to get a grey mix if I focus for a while, which I couldn't get with blue/yellow.
 
11:04 AM
@aditsu nice, I had the exact same 13 byte solution :) (but went to lunch instead of posting it ^^)
> - You may choose any (solid) background colour.
> - For polygrams consisting of multiple closed loops, you must support at least 6 visually distinct colours, all of which must be different from the background. (Grey-scale is fine, provided the shades are sufficiently spread out through the spectrum.)
@trichoplax does my edit to the first paragraph clarify things?
 
I think I could still have read "loop" as a little loop to be filled, but "line" clears it up completely.
 
I could replace "loop" by "polygon" but someone could still interpret as a polygon tessellation of the polygram
 
Yes, and I am struggling to think of a wording that wouldn't be potentially ambiguous
 
@MartinBüttner thanks :)
 
Sp's solution is quite nifty, too, though :)
 
11:10 AM
"cycle" might be less ambiguous, but I also think less clear, so it's probably best to stick with the current wording.
 
I tried RLE first, but couldn't get it below 14
 
11:24 AM
beating alephalpha in Mathematica feels as good as beating Dennis in CJam :D
@aditsu eh, dodgy... just because the spec is vague and contains a variable assignment in an example, I wouldn't assume that he intentionally overrode our default "submissions have to be full programs or functions, not snippets"
 
No need to input, you can assume data in variable 'd' — garg10may 40 mins ago
 
oh right... I'll roll back some of my edit
well, in that case, I can use Select instead of Cases
 
11:42 AM
1
Q: Regular Polygrams

Martin BüttnerGiven the number of vertices n ≥ 3 and the "step size" 1 ≤ m < n/2 (indicating the distance between two connected vertices), output a graphical representation of the corresponding regular polygram. If the polygram consist of multiple closed loops, each loop must be rendered in a different line c...

 
12:41 PM
TIL: Caffeine also forces the Alpha Peak liver to release more glucose in the blood
 
Cases[ಠ⋃ಠ,n_/;ಠ~Count~n>1] is also a valid answer to the non-unique array elements (provided the input is stored in ).
I should remember that for the next pop-con...
 
you can just put it in there for lulz
 
12:59 PM
0
Q: Take an array of Integers and get the best minimum cobination of integers that output greater then equal to 30

user17066Take an array of integers and get the best minimum combination of integers that output greater then equal to 30 For example : Input : [8,15,19,20,13,2,25,3,7] Output : [20,13] //20+13 >= 30 Input : [4,7,3,14,23,7,17] Output : [23,7] // 23 + 7 >= 30

 
NewMain is slackin today...
 
Hm, I want to make another regex-substitution golf challenge (like codegolf.stackexchange.com/questions/47566/…). The task would be to transpose (or rotate?) a rectangular input string. I'll have to come up with a different scoring though, because .NET can solve this in a single substitution again (although it's fiddly).
 
1:19 PM
What about rotating a spiral rectangle? As in the center pops to the outer corner, and everything else moves in one?
I'm no regexer, but that doesn't sound like it's possible in a single sub.
 
unclear what you're asking, please provide test cases.
 
What can't .NET do in a single sub? :P
 
987
216
345

rotate once to:

198
327
456
 
oh I see
@Sp3000 anything that requires the conditional appearance of new characters
 
Ah.
 
1:23 PM
@Geobits that sounds like a fun challenge even if not restricted to regex
 
Yea I was just thinking that lol.
 
@Sp3000 also, I don't think .NET's regex engine is TC without looping (at least I haven't found a way yet to trick the engine into a potentially infinite loop).
 
Hmm I see
 
anyway, I think this particular problem might be possible in a single regex substitution... it's just going to be a horrible mess
 
1:37 PM
Ok, I'm satisfied that rotating spirals isn't a duplicate. May post it later :)
 
:) Looking forward to it
 
1:54 PM
0
Q: Code me a Jam!!

J AtkinOn occasion I get a little blue and need a little music to cheer me up, but clicking the start button and finding my media player takes sooooooo long. I want a faster way to play a song. The challenge: Write a program that: Choose a song from my home directory (so you don’t mix-up program sou...

 
2:08 PM
@MartinBüttner Hi
 
I'm not sure that rearrangements of the Alternating Harmonic Series can have any arbitrary rational number as one of the terms of the sequence. I know it can converge to any real number, but not that each rational number q has a sequence with q as one of the terms (of partial sums)
 
@Maltysen I am now
 
@Justin oh, I see the confusion. that's not what I meant by "exact results". I'd still asks for the first n bits - just that you don't tolerate any errors in those first n bits due to rounding.
 
Oh that makes much more sense
 
2:13 PM
are there any rules about what to do if input is a number that appears as a partial sum (and n is greater than the number of terms in that partial sum)?
 
@MartinBüttner I could give a decimal input and require the use of arbitrary-precision decimals instead of doubles.
>>> 1, 10
1 1 0 1 0 1 1 0 1 0
@MartinBüttner 1 appears as a number that was a partial sum, but we continue
Is that what you meant?
 
oh I see
might be worth mentioning explicitly in the rules somewhere
 
Okay
 
I generally prefer rationals over arbitrary-precision decimals (probably because arbitrary-precision decimals are really just a special case of rationals)
also I think you should use consistent output formatting in your test cases (it's clear from your spec that other formats are allowed)
 
Okay.. I'm just thinking of how many languages don't have built in rational types. I only know of Ruby and Python
 
2:16 PM
@MartinBüttner that makes sense until you consider sin and friends
 
@Justin but how many have built-in arbitrary-precision decimals? :P
(and it's not that hard to implement rationals yourself with arbitrary-precision integers, if you only need to support a small number of operations)
 
More. Java does for example.
I guess I could say either is allowed, or I could require rational types but give the code to import the rational type for free. Or something along those lines...
(In truth, I generated the test cases via floating point type, which is why I said that the test cases aren't infallible.)
 
well, not all languages have custom types either. allowing both sounds good to me though.
(you could simply require exact results, which would then imply that some sort of arbitrary-precision arithmetic has to be used)
 
2:55 PM
@MartinBüttner regarding Non Unique Elements, do you think it's enough if the snippet evaluates to the correct result? I.e. no need for p in CJam/GolfScript?
 
probably
 
heh, "probably"
you're the one who added that wording
 
well I would say yes, but ultimately I can't tell you what the OP would say :P
most solutions don't do any printing
 
well, down to 10 bytes then
 
@Geobits hmmm, 50 bytes in CJam for the spiral rotation (provided it's just a single character in a fixed direction, but making the shift a parameter shouldn't be too expensive)
 

« first day (1718 days earlier)      last day (3108 days later) »