« first day (1615 days earlier)      last day (3081 days later) » 

1:01 AM
@Dennis I have a feeling you are.
1:28 AM
@Dennis Sorry I didn't get back to you sooner about that - pesky timezones.
2 hours later…
3:03 AM
@trichoplax No worries. I had a bug to fix anyway and I didn't have the time for it until bow.
Ah not so bad then :)
Cost me 5 bytes. Pesky zeroes...
Do you mean trailing zeroes?
Hopefully p decimal places is sufficiently clear that any trailing zeroes must be printed? I didn't think to explicitly state that but I guess it's implicit
Leading (sort of). I use modular division to separate integer and fractional part, which ate any zeroes after the dot.
I was actually going to ask about trailing zeroes when I had the time, so I guess it's worth mentioning.
Not that it affects me, since I don't use bulitin floating point arithmetic.
Ah I see - the leading part of the fractional part - that hadn't occurred to me
I'll edit in a line about trailing zeroes just to be clear then
3:19 AM
That's one sneaky avatar color by the way. I'm never sure if you're still in chat or not. :P
I still haven't got round to changing it - it was just an experiment to see if I could use the chat refresh to give 2 frame animation. I decided changing avatar took too long to do any more testing so I abandoned the idea, but it should flash a pattern of lower frequency (thicker) lines every so often in the avatar bar to the top right. For me it's about every 10 seconds
(They all do it, I just tried to emphasise it. Yours goes from smooth to speckled alias patterned)
So it's intentional! :D
Yes - I put in a variety of frequencies hoping that the result would let me understand how to design a specific shape, but the scaling doesn't seem to line up an integer number of times with the full size profile avatar so I don't know how to extract the relevant numbers without trial and error, which takes forever with a slow avatar upload
I was hoping it would be a nice simple ratio and might make the basis of a challenge, but I don't think so anymore
I know nothing about images...
@trichoplax Speaking of images: I find your stack snippet a little confusing. I had to look into the source code to figure out how to make it calculate the score. Accepting Enter (or preferably, adding a button) would make it a little more intuitive, I think.
All I know is that if you have stripes and scale them down until they are narrower than a pixel, they can't be represented so unless they are smoothed the ones in between the pixels get missed out, resulting in much wider stripes
@Dennis Ah good point - thank you. I suppose a dummy button would work as it still counts as the input losing focus - so it should be a very quick change
As long as that doesn't cause problems if someone clicks on it while it's in progress.
It will still work if they've updated the input, and if not I suppose it doesn't make a difference.
3:36 AM
So, wanna bet how long it takes for somebody to find the optimal solution? :P
Lol at least this time I haven't posted something I'd already worked out the optimal solution for...
It took me so long to realise the optimal solution for the primes one that I thought it would be a challenge. I underestimated how much less time other people take than me...
With this one though, I'm expecting to be surprised but I'm confident there is no chance of an optimal solution for that size any time soon.
Well, Jimmy has done a lot of things that I wouldn't have figured out in a million years.
I'm hoping to be surprised by interesting approaches rather than a trivial solution this time
Does the program for your challenge have to be deterministic?
I hope people don't think I posted one with a trivial solution to tempt people into this unsolvable one...
No I'm expecting most to be stochastic
I guess I should specify that
Just to be clear since my example is deterministic
I've added the button now, and it seems to behave as you might expect a button to behave (even though it has no code)
3:42 AM
Yes, I've seen it. Much better.
I've edited to say "Your code does not need to be deterministic. You may post your best output."
So, are you from San Diego?
Is the species trichoplax big in San Diego?
Or do you mean based on timezone?
Might be. 619 seems to be a strange number to pick at random.
Is 619 pertinent to San Diego?
It's just the largest prime that will fit in an image in a SE post
3:47 AM
Ah, OK. 619 is San Diego's area code. I think.
Anything wider than 630 gets scaled down to 630, so a square image can't be larger than 630 x 630
I don't know if there's any difference in solvability so choosing a prime was just a wild guess
Ah I see - I'm not familiar with San Diego so I couldn't guess the connection
Me neither. Wrong side of the continent.
My guess was that maybe a prime side length would allow slightly more points to be packed in, giving less chance of finding an optimal arrangement
I don't have an argument to justify that though...
4:01 AM
OK, that stack snippet is a tad slow.
I got ~760 pixels and still nothing after 7 minutes...
@Dennis Ah - I was wondering how quickly the number of pixels would go up. With that many I'll need to make it calculate in steps - anything over about 10 seconds and SE kills the snippet
@trichoplax Nevermind, I have a bug somewhere.
Did it pick up duplicated lines?
I'll still need to make it cope with longer calculations than 10 seconds anyway, so I'll go ahead and make that change now
Shouldn't try these things when I'm already tired. It's highly unlikely I'd get anywhere near 760 pixels.
It didn't get to show any output. I killed it when I found the bug.
When I was writing this I ran into a bug due to only checking the lengths for a new pixel against all the existing lengths, neglecting to also check if the new lengths might be duplicates of each other
4:10 AM
That's exactly what I did.
@Dennis I've realised that if it doesn't show any output after 10 seconds or so then SE kills it. So whereas in jsfiddle it would just hang until finished, in a stack snippet it will fail silently and make the user think it is still calculating. So I'm working on that as a priority...
4:23 AM
@trichoplax 487 should be an upper bound for the attainable score, in case that helps.
I was just wondering about provable upper bounds... That's quite low - I wonder if I need to refactor the snippet after all then
I'm beginning to think that the only reason to separate the code into short chunks that won't time out is to avoid confusion for people who post incorrect data that can be much larger
But that is also important... I can't have the snippet giving the impression it is busy calculating when it's not
Well, if 487 is an upper bound, you could directly filter out proposed solutions with more points.
Ah - that would do it
How did you get to 487?
Although did you say you got a timeout with less than double that?
According to my CJam code (619,2m*{2f#:+}%_&,), there are 118800 unique numbers that can be written as the sum of the squares of two integers between 0 and 618 (both inclusive).
n pixels require n(n-1)/2 unique distances between each other. For n = 488, that gives 118828.
Wow. You use CJam for non-golf problems
4:31 AM
I use CJam for everything. It takes much less time to write.
I understand the second line of your reasoning. I'm still processing the first line
So 118800 is the total number of distinct lengths that exist in a 619 x 619 grid?
Well, not everything, but everything related to puzzles or with a straightforward implementation.
Occasionally as a calculator. :P
So yes, that seems like a proof that 487 is an inclusive upper bound
Should be. 619,2m* generates all vectors in {0,...,618}x{0,...,618}, 2f# squares each component, :+ adds the squares, _& discards duplicates and , counts.
Now I just need to test that 487 points doesn't cause a time out
4:41 AM
@Dennis Talking about CJam. :) Got a quick question if that's ok. Is there an elegant way to test if a given character is an upper case letter? Apply el to it, and see if the result is different?
@RetoKoradi That's probably the best way. 4 chars is hard to beat.
Will only work for ASCII characters though.
Cool, thanks. Working on that "counting double letters" thing. I hope assuming that the input is ASCII is fine. Don't think I will come very close to Pyth anyway. regex functionality helps for this one.
Pyth has regex now? Great...
Looks that way. See the 21 character solution: codegolf.stackexchange.com/a/52515/32852
I have something fairly elegant in CJam for the basic part of finding the character with the most duplicates. But now I have to exclude non-letters (should not be too bad), and list all of them when there is a tie (which could be painful).
The last part should be unpleasent, yes.
5:03 AM
@Dennis do you mind if I include your upper bound proof in the question?
@trichoplax Not at all. Go ahead.
Thanks :)
5:39 AM
@Dennis Ok, I got something that doesn't look too horrible. Still 37 characters compared to 21 for the best Pyth solution. Will be posted in a bit once I type it up with explanation.
Since I had good luck with RLE last last time, I used it twice this time!
@RetoKoradi Not bad. I think I got 34, but I'm way to tired to check if I made any mistakes.
Ah yes, 37 is ok for an amateur then. :) Mine seems functionally fine. Works with mixed case, special characters are excluded, ties come out sorted.
6:04 AM
Ok, posted: codegolf.stackexchange.com/a/52522/32852. Thanks for the advice.
7 hours later…
1:10 PM
Dead chat :(
This message was flagged as spam or offensive: "@ixSci Ну что я могу сказать. Лечиться вам надо от гомофобии. Лоботомией."
Seems like language specific flags shouldn't leak out from their home site
Well that guy was angry about something
translate: Ну что я могу сказать. Лечиться вам надо от гомофобии. Лоботомией.
(from Russian) Well what can I say. You need to be healed from homophobia. Lobotomiej.
Well that's a reasonable thing to say
... O_o
1:15 PM
But in Russia homophobia is rampant, yes?
Something must've happened during translation to English, should be Lobotomy at the end there.
@Rainbolt I don't believe there's effective legal protection against it in Russia, which I imagine could lead to very strong feeling
Yea, I remember reading about it during the last Olympics
Hmmm I bet the Olympics are fun times for SE chat
I'd rather hear about programming than the Olympics...
Do you mean lots of moderation required?
No, I mean hearing about how every country is faring in each sport
I imagine there are champions that get televised in other countries that get zero screen time in the US
1:31 PM
In the UK they seem to show everything. I don't follow sport but in passing there seems to be a list of sports covered longer than the number of sports I thought existed...
We cover everything too but I mean, if Michael Phelps was about to swim, then any other events that were also going on were shifted to the late hours as reruns
Ah I see - biased towards US competitors rather than biased towards certain sports
Wow I'm actually getting answers. I'm used to posting broken or unappealing questions :)
You have pretty low expectations considering all your questions have at least two answers. A full quarter of mine only have one :(
@Geobits Um, it's generous of you to include my self answers in the answer count... :)
Oh. Fair enough, I was just looking at this: codegolf.stackexchange.com/users/20283/trichoplax?tab=questions :D
In that case, I take back what I said. Your questions are bad and you should feel bad :P
1:46 PM
Yes just looking at that now myself - it's much better for the self esteem than looking at the individual questions
To be fair, your questions are much more involved/interesting than the average question here :)
So half of mine only have one answer that isn't from me. That's not actually as bad as I thought it was
@Vioz- Thanks! I think I used to worry too much that my questions would be too trivial, but then overcomplicating them probably means fewer answers
If you go answer one of mine with one answer, I'll answer one of yours ;)
Just don't make it the fencepost one. That one was just a bad question :(
@Geobits I could post my appallingly bad hunger gaming answer, but that wouldn't be in the spirit of things so I'll have a look at your others
I might have to wait until Monday to do it, though. It looks like my weekend is full.
1:52 PM
@Geobits No rush :) You don't know if I'll be able to answer one of yours yet...
I take it you'd prefer an answer to a question with only 1 answer so far?
Yes, and same for you?
Sounds good
The one I'd really like an answer for is fillomino, but it's not trivial...
I'll read it and see if I'm up to it...
Not trivial might be an understatement :p
2:03 PM
Well it is trivial if you have a nearly infinite amount of time to brute force it ;)
Well yes :P
@Dennis Regex actually was in Pyth for a quite long time. It has been added last October.
But there are only two functionalities you can use.
-Regex substituation (replace every non-overlapping matching with a string)
-Regex search, which returns a boolean (indicating if the regex was found)
But these features are rarely used. Most of the time using different Pyth methods is shorter.
Ah, OK. That's still more useful than no regex at all, but close to nothing compared to other languages...
Even your non-regex answer is shorter than anything I can think of in CJam...
This proves that the argument everyone else had about minimal regex support in CJam was wrong
2:21 PM
I wouldn't go that far. CJam is more verbose for some tasks, so these operators might still help. But replace with expression and an op that actually returns the matches would be much better, yes.
A method the would return the matches would probably be quite useful.
If you look at Maltysen's answer: he had to replace the matches with null-byte and later count them.
Simply get all matches and get the length would be much shorter.
1 hour later…
3:29 PM
@Dennis I found a 16 byte solution which uses no regex at all. Regex support is not necessary.
4:14 PM
I feel like using a recursive solution essentially uses a call stack as "moar memory". But I don't really know how lisp works
A: Print an ascii spiral in O(log n) memory

coredumpCommon Lisp - (golfing in progress) A recursive implementation, totally not golfed for the moment. (defun spiral (n &optional (d 0) ) (flet ((prefix () (format t "~4d~4d | " n d) (dotimes (i d) (princ "* "))) (postfix () (dotimes (i d) ...

Anyone have any ideas for symbols that reflect diagonally?
`/` & `\` seem good, both they reverse instead of reflect diag.
well, in some fonts
My first thought was 8
- and |?
: should work too, so does % I think
4:28 PM
so : should not work
neither - and |
% works,
I think . does too
% is for division though
and . is clone
I'm confused what your purpose is for
Is this something you're adding to a language?
Make the movement flow diagonally.
4:30 PM
I thought about a pair of characters which are the reflections of each other
If the lines in # weren't slanted it would work
what about +? I guess that's for addition though
X works
@Vioz- # reflects in the opposite direction, so UP_LEFT goes to DOWN_RIGHT, X is for a random direction
@Doorknob that's addition
If we knew what symbols can't be used that would probably help
i.e. reserved symbols
4:33 PM
You could make something like @ random, so X could be that
everything on here, since I haven't changed anything yet
@ is swap the top 3
@durron597 I guess it depends on whether it uses a lot of stack space or uses tail recursion instead
What about Z?
Q: Multiples of 3 and 5

Shahzaib AhmadIf we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. This is The Question and i have tried to figure it out and it's answer given is "266333" i want to know is it...

I don't know lisp so I can't tell
4:35 PM
@Vioz- Z would work, but we'd need a reverse Z
@NewMainPosts nice, 4 closevotes in 6 minutes :P
I don't think there's other options that can easily be typed on a keyboard
@Vioz- Z & Y?
@Doorknob Your close vote was 20 seconds before me - I clicked on the page, read a few lines, and then when I clicked on "close" it was already closed
They'd work, but if I'm understanding correctly, Y doesn't reflect diagonally
4:38 PM
I still can't tell if you're looking for things which look the same after diagonal reflection or things which look different
I can't think of an answer under which Z does reflect diagonally but Y doesn't
darn spaces
@Phase try ctrl-K
So does "reflect diagonally" mean convert an orthogonal stream of characters into a diagonal stream of characters?
b and p?
4:44 PM
@trichoplax yes
How about ( and )?
For converting diagonal to orthogonal, rather than the other way around
{ and } for splitting an orthogonal stream into two diagonal streams?
They're used for less than and greater than
I guess you might need to settle on just using spare characters that don't necessarily give a visual clue to their function
You want characters that take input streams from a certain number of directions and convert them to output streams in one of a certain number of directions?
Do you want each character to be able to handle multiple directions?
So perhaps one that always rotates 90 degrees?
I just want one stream, and all the characters should handle multiple directions if they don't change the direction. 90 degree is a good idea
call 444-4444 for legal help -_-
5:07 PM
Q: minimal nethack

tolosNetHack is a roguelike game where a player must retrieve the Amulet of Yendor from the lowest level of the dungeon. Commonly played via telnet, the entire game is represented with ASCII graphics. The game is extremely challenging and requires knowledge of many game mechanics in order to succeed. ...

@trichoplax Yeah me neither.
That's the trouble with challenges that have a non-obvious restriction. It's hard to tell whether an unfamiliar language meets the condition
@trichoplax I know FP well enough to ask good questions
I don't know what FP stands for
@trichoplax functional programming
5:18 PM
Ah right. That's alright then.
6:07 PM
Hmm, I hope this unique pixel distance finder gets done before I head out of town...
About halfway done with its checks, found 107 so far and still chugging along after 150 minutes.
6:31 PM
A: Sandbox for Proposed Challenges

TNTModified Game of Risk king-of-the-hill java Introduction In this game, players use their armies to capture territories, fight other players' armies, and become the last man standing. Each turn, players receive a base number of armies to use at their disposal. By capturing territories in certai...

1 hour later…
7:37 PM
What is the general consensus on putting a time limit on programs that are scored by byte-count?
By default, there's no time limit.
@Vioz- i've seen it done sometimes to enforce a non brute-force solution
If you're the OP, it's up to you.
Ok :)
usually it's something that a program either passes easily or violates hugely, so you don't need to be that exact
7:40 PM
I've just decided to lower the limit on number of terms that need to be calculated so everyone's answer should execute in a short time, no matter the language
I was going to do up to the 100th term, but when I remembered that the 31st term is 140,000 digits long it might be unable to complete the task depending on the language
8:11 PM
Just wanted to let everyone know, I'll be travelling for almost three weeks (until the 19th), with only sporadic internet access (and probably other worries than checking the PPCG flag queue first), so don't expect to see me around a lot. Doorknob knows and I'm sure he'll handle the mod duties just fine. :)
Work or holiday? ;)
holiday :)
Lucky you then, have fun!
(This also means I'll almost definitely lose my 475 day Fanatic streak.) :(
@Vioz- thanks
OH GODS NO!! You can't leave us here with Doorknob! It'll be nethack everywhere!
8:13 PM
A: Sandbox for Proposed Challenges

Vioz-Descriptive Recursion Recently, I made my very first contribution to OEIS by extending and adding a b-file to sequence A049064. The sequence starts with 0, and then the next values are derived from giving a "binary description" of the last item. For example, the second element would be 10, bec...

Or in other words, have fun! :D
@Geobits Better than ASCII Art Hex-grid everywhere!
1 hour later…
9:31 PM
Also, for those not following Meta that actively, Dennis posted a new answer regarding ANSI escape codes which I think deserves some attention:
A: Are control characters and ANSI escape codes allowed in output?

DennisThere seems to be some confusion regarding this, so first and foremost: ANSI escape sequences are supported by the terminal, not the shell. Despite of what this answer did, I've shown in my answer that there's no need to involve a shell at all. This means that all that is needed is a video te...

10:09 PM
Woohoo! I just hit 30k on SU.
@Dennis Congrats! :)
10:38 PM
@Geobits >:D
@NewMainPosts !!!
furiously upvotes

« first day (1615 days earlier)      last day (3081 days later) »