Skip to main content

Timeline for draw ASCII function plots

Current License: CC BY-SA 3.0

26 events
when toggle format what by license comment
May 6, 2015 at 23:19 answer added blutorange timeline score: 3
May 6, 2015 at 19:45 comment added FUZxxl @blutorange The scoring scheme is flawed anyway.
May 6, 2015 at 18:48 comment added blutorange I think numerics should count like strings, or somebody could take some data consisting of bits bbb... and encode that as a number 0.999bbb..., which counts as pretty much 0 (Log_256(0.999...)). Or perhaps, count numbers without the decimal point or other separators: 1.75 would count as 175, the rational number literal 9992345/10000000r in ruby would count as 999234510000000 (and not as 0.9992345) etc.
May 6, 2015 at 15:23 answer added Ewan timeline score: 1
Feb 4, 2015 at 20:19 history edited FUZxxl CC BY-SA 3.0
added 26 characters in body
Feb 4, 2015 at 20:18 comment added FUZxxl @MartinBüttner Good catch...
Feb 4, 2015 at 18:56 comment added FUZxxl @Ypnypn As described in the question, a string counts as one point per character it contains. For instance, the C string "a\n" counts as two characters, the C string u"aä", too.
Feb 4, 2015 at 17:38 comment added FUZxxl The first behaviour (the "crappy" one) is correct. I'm on a trsin right now, let me amend the specificarion in a minute.
Feb 4, 2015 at 17:35 review Close votes
Feb 5, 2015 at 16:45
Feb 4, 2015 at 17:30 comment added Peter Taylor Or, indeed, am I guessing wrongly that the shaded pixels in the column should always extend to the x-axis? For all I know, the example image shows sin(x)sin(1000x) and the line does actually pass through all of those shaded pixels.
Feb 4, 2015 at 17:28 comment added Peter Taylor The spec needs to explicitly state the criteria for shading a cell, because there are a number of plausible options and we can't tell which is intended. In particular, is the cheap and crappy "shade a pixel iff its midpoint is between 0 and the value at that x-coordinate" intended, or should the program attempt to compute the extrema of the image of the column and either shade the pixel iff its (centre-bottom / midpoint / centre-top) is between 0 and one of the extrema, or shade the pixel iff at least 50% of its area is?
Feb 4, 2015 at 17:00 comment added FUZxxl @MartinBüttner No. It's correct like it is. Where un(der)specified, your solution is free to choose reasonable behaviour. This is an explicit design decision in crafting this challenge.
Feb 4, 2015 at 16:59 comment added Martin Ender I like this question, but I think it could have benefited from a pass in the sandbox.
Feb 4, 2015 at 16:59 comment added FUZxxl @MartinBüttner The horizontal line denotes the place where y = 0 on the cartesian coordinate system you are plotting on. The output format is intentionally a little bit fuzzy so you have more freedom for finding a solution.
Feb 4, 2015 at 16:58 comment added Martin Ender @FUZxxl Of course, but that doesn't tell me where I should put it if y = 0 falls between two lines of the ASCII output. An example output would be helpful.
Feb 4, 2015 at 16:57 comment added FUZxxl @MartinBüttner The horizontal line does not have to be exactly in the center.
Feb 4, 2015 at 16:57 comment added Optimizer Also, it cannot be both code-golf and atomic-code-golf
Feb 4, 2015 at 16:57 comment added Martin Ender More importantly, how should we the horizontal line be placed if it doesn't fit exactly on a particular row like in your example? (e.g. if the function is a sine, but h is even)
Feb 4, 2015 at 16:57 comment added FUZxxl @Optimizer Fixed that loophole.
Feb 4, 2015 at 16:56 history edited FUZxxl CC BY-SA 3.0
remove tag code golf.
Feb 4, 2015 at 16:56 comment added Martin Ender If your main concern is readability of the code, ask people to include an ungolfed version. If your main concern is golfing languages, then I guess you'll have to go along with scoring by tokens, but in my experience it doesn't really help a lot, because in most languages a function call is 3 tokens (function name plus parentheses) + 1 token for the first argument + 2 tokens for every further argument (because of a delimiter like a comma), whereas in CJam, say, it's just number of arguments + 1.
Feb 4, 2015 at 16:52 comment added Optimizer It does not and should be clarified by the OP if he does not intend to let people abuse them, like you did with string and number
Feb 4, 2015 at 16:52 comment added FUZxxl @MartinBüttner Hm… That counts as a standard loophole in my opinion.
Feb 4, 2015 at 16:51 comment added Martin Ender Your definitions of how to count tokens are probably going to be abused as they are. E.g. by base64-encoding the code, naming a variable like this (which is a single token) and then getting a string representation of the variable name and base64-decoding it again.
Feb 4, 2015 at 16:51 comment added FUZxxl @FryAmTheEggman I didn't know that tag existed. Thank you for the information.
Feb 4, 2015 at 16:46 history asked FUZxxl CC BY-SA 3.0