« first day (1495 days earlier)      last day (3334 days later) » 

12:20 AM
yup, verified that this works @ 18
 
When on the site's homepage, hovering over the Pure Sourcery question gives a (comparatively) massive block of hovertext.
 
@Runer112 Interesting... I've been avoiding A% until now because I thought 11 or 13 being prime was better, hm...
 
I've just been brute force searching
I've got a pretty fast setup
 
Ahaha k :P I'm brute forcing pretty slowly here
Well I just got something which could be an 18 using the same trick, bit late :P
Hmm a lot of these map to the same final values... I wonder if I'm oversearching
 
12:36 AM
@NathanMerrill Sorry for not posting anything to your KOTH.
 
0
A: Sandbox for Proposed Challenges

Martin BüttnerShotgun Numbering code-golfnumbersequencepermutations The Shotgun numbers are defined as follows. Start with the natural numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ... Now take all numbers at indices divisible by 2, group them into pairs, and swap the num...

 
@MartinBüttner I like the sandbox post! Interesting thing about the prime numbers - took a while to figure out why but it makes sense
 
yay for the OEIS webcam :)
it's also one of those nice sequence that's really chaotic but does have some structure
 
And simple to define yet nontrivial
 
if you look at the plot linked to on OEIS (under Links), many numbers fall into a handful of linear bands, but a lot of other numbers are all over the place
heh
 
12:49 AM
It worked for 4, so I was extrapolating D:
 
3 is prime, 5 is prime, 7 is prime, all odd numbers > 1 are prime
 
9 is a bug
 
9 is a statistical fluctuation
11 is prime, 13 is prime, 15 is another fluke, 17 is prime, 19 is prime... I think we've seen enough.
 
It isn't just odd numbers. 2 is prime, 3 is prime, all numbers > 1 are prime :)
 
@MartinBüttner I think the simple bruteforce would be n^2, do you want to prohibit that?
 
12:54 AM
Or wait... 2,3,5,7,11... so to get the nth prime, you multiply the n-1th prime by 1.5 and round (round down/up, alternating)
 
like no number over O(n^2) influence s(n)
 
yeah probably
I think I'll require N=1M or 10M to be doable within a minute
I'm just checking how fast golfscript runs on the linear approach
god, golfscript is slow...
it needs 4 seconds on 10k
Mathematica does 1M in 1 second
I might try something new
either hard time limit, or you can show that your code uses linear time and space
 
seems reasonable to me
 
Don't get me wrong, it's your challenge, but what does it matter if the naive way is taken? Sure it's a bit trivial, but that's not exactly a new thing for code golf, is it?
 
actually the naive approach will be O(n^3)
@Geobits hm, you might be right... I think the linear approach might actually be golfier in many languages anyway
I just don't like challenges where - the challenge being code golf - the only sensible approach is brute force
and often, more interesting approaches are longer
so people don't get to implement them unless they have to
but I think that might not even be the case here
(which I sorta could've noticed after implementing it twice...)
 
1:06 AM
I was really just curious, since the LCS golf has the same restriction (and no answers as of yet).
 
0
A: Sandbox for Proposed Challenges

steveverrillICS Maritime Flag alphabet The International Code of Signals flag alphabet http://en.wikipedia.org/wiki/International_maritime_signal_flags is used by ships for communication, particularly for static signals. Your challenge is to write a program or function that will take a string from STDIN or...

 
but LCS in linear time is much harder than this
 
true ;)
 
no restriction then
 
1:33 AM
Core Wars is actually rather complex to program.
More complex than I though it would be, actually.
 
1:54 AM
@PhiNotPi It's fine. I didn't really expect a big reaction
I think that my challenges are conceptually interesting, but that I don't do a good enough job of explaining it in an interesting way
I should probably start adding images
 
@NathanMerrill I think that's a good/great challenge but hard to see it's value at first look
probably examples would help so people would understand what the strategy/goal of the game is
 
yeah, I had a hard coming up with interesting examples
 
I promise I'll eventually submit a bot.
 
@PhiNotPi with your Core War challenge, what ambiguities were there originally?
there were quite a lot of bots, so I can't imagine it was anything critical
 
What core war challenge? I'm creating that right now.
 
2:07 AM
I know
you say "This instruction set draws from the original spec, but modified to resolve ambiguities."
 
For example, the original spec had an ADD opcode, but did not specify how addition was handled when two lines had different numbers of fields.
In this version, each instruction has two fields, but in the original, some had one.
Also, I think a large difference is how the two addressing modes are handled.
With the changes, any addressing mode can be used anywhere.
 
Does my syllable counter seem ready?
 
@NathanMerrill Have you decided on the scoring yet?
 
oh, yes I have
N-(M*10)
 
Hm k
@Runer112 Would you mind making a minor edit to your Sourcery post? I misclicked and downvoted instead of upvoted before I left the house, and now it's too late
 
2:19 AM
this means having stuff like an exceptions list isn't really a good idea
but coming up with generic exceptions might be
 
I have something which scores about 3.8k, which should serve as a good baseline
For the most part, you can pretty much ignore 6/7 syllables considering how few words there are
 
yeah
but theoretically, if you are actually inspecting the words, they really aren't that hard to get
I find that there are some really crazy 1 or 2 syllable words
@Sp3000 what language are you using to run your program repeatedly?
 
@Sp3000 I can potentially make a major edit
 
Well the funny thing is... I wrote my solution in Python, ported it to Ruby and don't really have a tester in Ruby itself
(because I don't really know Ruby)
 
2:24 AM
@Runer112 Oh nice :) I think I've pretty much given up - not getting lucky with the permutations at all
@NathanMerrill btw did you ever fix the syllable word list?
 
yes I did
I might have missed a few, but I manually went over the entire 1-syllable list trying to find my mistakes
I can only think of the one tag: code-challenge
is there any other applicable tag?
 
Is there a word tag?
 
no
wait, yes there is
 
Why does Java do negative mods?
 
@PhiNotPi yes but they always go positive
so -2%5 = 3
 
2:31 AM
Woop correction, I said 3.8k. I meant 7.8k :/
 
@NathanMerrill No, -2 % 5 = -2
 
not in Java
oh, nevermind
 
Yes in Java.
 
you are right
that is odd
so ((a%mod)+mod)%mod
 
Yeah I had to make a bunch of fixes like that.
 
2:35 AM
@Sp3000 edit made :p
 
Oh you find a nice solution
:)
 
I got greedy and searched for LCG-like mappings for the empty block results
and found some
I actually made the empty block smaller than the solid block, which is a problem lol
because my results aren't designed to optimize the solid block size at all
 
I wouldn't expect so :P
 
yeah I can't see any results I've collected to bring it under 14
 
@NathanMerrill Just to double check my program - how many words are there?
 
2:53 AM
er, let me check
9462
 
k, matches. That's good :)
 
its not a good check that you have the updated word list
because I didn't remove any words
 
I just updated :P
 
just moved them to a different syllable count
:P
 
It's a good check that my Ruby works though
 
2:55 AM
true
 
... I'll update again
 
I last pushed 3 days ago
 
Oh, then I'm all good :P
 
3:20 AM
a ([syllable count] [word])* list could be helpful for testing too
 
@Calvin'sHobbies I'm assuming answering your latest meta post won't actually affect the sandbox right now
that it will lead to follow-up questions
 
0
Q: Is The Sandbox Effective?

Calvin's HobbiesThis is a poll to find out the general concensus on the effectiveness of our Sandbox for Proposed Challenges. To participate, up-vote exactly one of the answers below. There are only "Yes" and "No" answers. There is intentionally no "Maybe" answer, choose "Yes" or "No" as best you can. By "effe...

 
@Nathan don't forget to delete your posted sandbox proposal ;)
clutter and stuff
 
Oh, we delete them now?
not just link?
 
we did for months
ever since we merged all sandboxes into a single thread
 
3:32 AM
@NathanMerrill Maybe. I have no changes to suggest if the poll turns out No. It's just to gauge the overall opinion on the Sandbox.
 
30
A: We Have a Messy Sandbox

Doorknob5. Delete posted challenges, keep abandoned.

 
Well, I got Core Wars working.
Now to write a decent parser.
 
Oh hey Martin's still up
 
indeed
 
Isn't it like 3:36 AM over there?
 
3:37 AM
yes it is
 
@MartinBüttner Is it possible to not have to repeat s.scan(regex).size twice here?
 
Your sleep cycle must get pretty messed up sometimes.
 
it used to be worse
but the girlfriend has a night shift tomorrow, so she's staying up late tonight to get into the cycle for the next three days... and since I don't have lectures tomorrow I'm staying up, too
@Sp3000 hm, I don't think so
 
Damn :/, k
 
Well, I'm going to bed.
 
3:41 AM
I found a 13 solution
 
Core War could be posted tomorrow if I try hard enough.
 
it's taking increasingly longer to make improvements
 
13 :o
 
@Runer112 how surprising
I think it would be good if the high-rep users could go through the sandbox, sorted by votes and cast a few delete votes on the old negative-score proposals
it starts on page 14 if you sort by votes
 
Would outright deletion work too? :)
 
3:45 AM
oh, you're around :D
I think there's one such post from just yesterday
while I don't think it's salvageable, I'd probably leave that one
seems a bit harsh otherwise
 
Hmm, I'd say something like deleting all -3 or lower posts that are at least a month old (which is, at the time, all of them) would be fair. (don't want to abuse the super-delete too much)
 
fair enough
 
I earned the tag synonyms privilege!
 
I think I've honed this search enough, so I'll just let it run overnight
and see if it finds any solutions < 13
seems pretty unlikely
 
Done. (Feel free to rally a few other 4k+s if you think some others should be deleted too.)
 
3:51 AM
it's also running super slow because I've had to abandon some heuristics to make sure I get full coverage
 
@Rainbolt did you actually report the chat bug earlier?
@Doorknob thanks
 
@NathanMerrill Interesting I've got only 8 words which are more than 1 off
horsemen 3 1
yourselves 4 2
sometimes 4 2
difficulties 4 2
remarkably 4 2
specifically 5 2
theatre 1 3
inn 1 3
inn has been mentioned, but I'm not sure about difficulties there :P
(the numbers are guess followed by actual)
 
more fixes!
horsemen should be 2
 
Yeah, I'm not saying my program's right :P
Just found it amusing that it's not that far off
(e.g. theatre's definitely not 1)
 
well, assuming the second number is from the lists
horsemen 2
difficulties 4
remarkably 4
specifically 5
inn 1
then those need updating to those numbers ^
 
4:00 AM
Yeah, that's what I'd go with too (specifically could also be a 4, depending on how you pronounce it)
 
I can only think of 5
 
I pronounce it spe-ci-fic-ly
 
Martin keeps ninja'ing. Every time.
 
have you seen how many messages I've posted in this chat? every single one of them is practice. ;)
 
4:02 AM
lol
 
 
3 hours later…
6:38 AM
Hmm, so when is that guy posting the question ...
 
what guy? what question? (have not been paying attention)
 
I will leave it open ended :D
 
aww. i gotta scroll and read and shit?
@Sp3000 Martin is a damned ninja.
 
6:57 AM
:P
Well this is awkward, my new regex matches more and it's shorter
 
specifical. my new favorite adj.
specifically. specifical. sensical?
nonsequestrian?
 
7:22 AM
all is calm.
 
 
3 hours later…
10:36 AM
0
Q: Code challenge - do your best with limited code size. How much to allow?

anatolygI would like to make a code challenge (or a new type of challenge), which is based on code size, but in a "dual" way to code-golf: code size is limited, and the winner is whoever makes the best code (with some objective definition of "best"). Something like this challenge (which was awesome) but...

 
 
1 hour later…
12:00 PM
What was that word we found meaning orthogonal or diagonal?
 
Moore neighbourhood?
 
JabberWocky ?
 
it was an adjective
 
I vaguely remember "octogonal". Not sure though.
 
Octolinear?
 
12:15 PM
Octilinear sounds right
can find uses, but definition
hmm I wonder if it's really a good idea to have 14 instructions for changing direction
oops missed one, it's 15
 
Why not :P
 
I could run out of letters!
 
You have 95!
 
1:04 PM
@feersum yes octilinear:
41
A: What word describes something that can move orthogonally and diagonally?

Jimi OkeI have been doing some academic research in this area. The current coinage, which I think perfectly applies to the movement of the queen in chess, is octilinear. This term has been used to describe metro-map layouts that have followed Harry Beck's paradigm. The vertices of a unit-spaced octilinea...

 
@MartinBüttner Hey Martin, does Retina have a multiline match mode as in it prints the number of matches, one per line, for each line in the input file?
Not that it's necessary, just easier for bulk debugging
 
no, I haven't thought of that
sounds like a good option for grep mode
 
Ah k :P
 
do you want to add a ticket?
 
(I could technically go up by 200 score if I switched Ruby out with Retina :P )
 
1:07 PM
@Sp3000 what did I mess up with the commits?
 
Some of the things you previously fixed have creeped back in
See the comments on the post
@MartinBüttner Is ticket = issues on Github? I can't seem to figure out how to tag it as enhancement
 
ah yes
I can do that
 
How many characters is the longest possible English haiku?
 
I know that "strengths" has the largest letter/syllable density
so that puts an upper bound on it
@Sp3000 thanks
 
It's hard to beat the letters-per-syllable ratio of strengths either, e.g. for two syllables there's breakthrough (and maybe a few with a few letters more), but definitely not a 9:1 ratio
 
1:13 PM
@Sp3000 I read the comments
and you say that the words nutki talked about were fixed then undone
but I don't see nutki informing me about mistakes anywhere
 
nutki didn't directly ping, but the 1-syllable list was pointed out
I'm assuming you might want to check anything else in the same update (i.e. the history link I posted)
 
bah, there are so many problems now
 
does this look ready?
2
A: Sandbox for Proposed Challenges

Martin BüttnerShotgun Numbers code-golfnumbersequencepermutations The Shotgun numbers are a sequence with a rather simple definition but some interesting structure. Start with the natural numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ... Now take all numbers at indices di...

@Runer112 awwww someone didn't like CJam on the staircase challenge
(or Clip or Pyth for that matter)
 
Hmm maybe I should shotgun in ><> ...
 
1:27 PM
Can I assume n >= 1?
... oh can't do ><>, factorisation's a pain
 
yes
@Sp3000 even divisibility testing?
 
... oh I guess that's all I need really, isn't it
gets back to it
 
I guess that means "it's ready" :P
0
Q: Shotgun Numbers

Martin BüttnerThe Shotgun numbers are a sequence with a rather simple definition but some interesting structure. Start with the natural numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ... Now take all numbers at indices divisible by 2, group them into pairs, and swap the numb...

 
1:47 PM
@durron597 did I summon you? ;)
 
@MartinBüttner You did
Replying now
 
Oh boy shotgun is short
 
Wish I could CJam it
 
I got 30 in CJam, but I think shorter is possible
 
1:50 PM
Man my Python solution would be 17 bytes shorter if I could request the user input the number twice :P
 
@MartinBüttner Replied
 
thanks
@durron597 I just read up on the chat discussion
people there had a point, so you might not exactly be achieving the goal of the levelling the playing field as you intend, but I think it should nevertheless be an interesting challenge
you might want to consider counting the unique number of characters though
 
Regarding the Core Wars challenge, i can't decide whether or not to reverse the operands of the instructions. It could either match 8086 instructions or match the way Core Wars actually does it.
 
it'll be hard to find out the actual bytes used for multi-byte characters and it'll lead to some discussion about which encoding people use
 
@MartinBüttner My ideal scenario would be some assistance from the peanut gallery (e.g. you) for how to fix the problem, then post the fixed question
 
1:56 PM
I don't think there is a good fix for your intended goal or people would be using it all over the place
any scoring criterion will put some challenges at an advantage and others at a disadvantage
and I don't think that's a bad thing
 
@MartinBüttner I don't think it's possible to get a LEVEL playing field
just to get one that's competitive
 
but not even atomic code golf is
well actually, the fairest criterion we have is probably , but that's because the criterion doesn't even depend on the implementation
your scoring criterion will definitely change the balance
BF and other esolangs are likely competitive with verbose production languages
but I think the golfing languages will still have the edge
 
Well the original question (pre-edit) was unique bytes squared (times total bytes)
 
then again the output string is long enough that it'll dominate the code in most real languages which already serves to balance things a bit
 
no one is VTC the level playfield thing
 
2:01 PM
@Optimizer why would I? it's an objective criterion, it's just broken.
 
thus VTC
 
@durron597 I think that only serves to push the production languages even further away
 
Which do you think is better? (I don't remember what I had concluded back then, after the chat discussion)
 
@Optimizer with what reason? "VTC because your challenge is bad?"
that's what downvotes are for
 
winning criteria is broken
 
2:02 PM
@durron597 I'd prefer not squared
@Optimizer well close it then
 
Remember, the string contains A-Za-z (with some dups), and some punctuation
 
could do a restricted source "no string literals"
 
@MartinBüttner No. Should I?
 
(I'm just brainstorming here). I fear the "getting too complicated for the sake of balance" problem
 
2:03 PM
@Rainbolt why not?
@durron597 meh, sounds quite gimmicky. and I can just encode the string in a number or a variable name. and not all languages have string literals.
 
@MartinBüttner Effort. I thought about taking some screenshots and posting but then I had to go write that spiral thing
 
fair enough
if you can't be bothered I might do it later
doesn't even need screenshots since the steps to reproduce are pretty simple
yep
 
@MartinBüttner What are the current rules these days on things like "runnable program" vs "working method/function"; "return a string" vs "print a string" and so forth
What is the "proper" way to state in a question that I care as little as possible about that sort of code overhead
 
9
Q: Default for Code Golf: Program, Function or Snippet?

Martin BüttnerOne of the things many (new?) users forget to specify in code-golf challenges is whether the answers should provide a full program or a function (or even just a snippet). For most such things, we have defaults in the tag wiki (like scoring by bytes), but not for this. The conclusion in chat was ...

12
Q: Default for Code Golf: Input/Output methods

Martin BüttnerIt looks like we have a consensus that we want certain defaults for the format which answers are expected in for code-golf. On that poll, the question arose twice, which input/output formats should be allowed for programs and functions. So here is another poll. This one works different though. A...

 
Thanks
 
2:12 PM
these are the accepted defaults
I still tend to include them in my challenges
in your case, the wording would be "You may write a program or function, returning the output as a string or printing it to STDOUT (or closest alternative). You may optionally include a single trailing newline in the output."
 
Hm. No accepted answer for the second one ;)
 
obviously
there's not one correct answer
"At the end of the week, I will amend the code-golf tag wiki, allowing all methods by default which have 5 net votes and at least twice as many upvotes as downvotes. I will try to keep an eye on this in the future, to amend the defaults if the polls change."
(and the current result is indeed listed in the code golf tag wiki)
 
@MartinBüttner the op took ur advice anyways
 
@MartinBüttner ?
 
@Sp3000 that's pretty dense! :)
@durron597 I hate that tag :D
 
2:20 PM
There's a lot of arrows
 
I still haven't posted the request on meta to burninate it... might do that later today
 
And a lot of copying :/
 
-v = 2 bytes
 
Should have totally got Golfish ready :P
Is it two? I see people counting -p for Perl as 1...
 
@Optimizer technically 3 bytes
 
2:21 PM
yes
@Sp3000 i also thought that, but then martin gave a link to a meta post about it
 
unless the interpreter has -e, then it's 1 byte
see
14
A: On "interactive" answers and other special conditions

J BMy basic guideline would be "as the problem statement says". Which is mostly to mean it's allowed to explicitly override anything it wants from what I'm about to say next. Actions to invoke For test-case/IO programs, I like it better when the whole invocation is possible as a single line, thro...

("special invocations")
@Rainbolt what's that streaming site you've mentioned a couple of times lately?
 
:/ the only reason I did -v was so that I didn't have to bring up the code point thing every time...
 
you might as well use that
 
:/ but layout
 
layout?
 
2:24 PM
Oh I don't need to remodel anything
All good
 
it'd be nice if I could see all my answers in the sandbox
I forget about challenges I post
oh, I can!
I just have to look at my profile
 
@MartinBüttner rainiertamayo.com
Also known as rainierland.com
 
0
Q: Keep the unique characters down

durron597It's very simple: Your program or function should generate the following text: Elizabeth obnoxiously quoted (just too rowdy for my peace): "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG," giving me a look. Fine print You may write a program or function, which returns the output as a string or p...

 
Is there a good way of mapping [0 1] -> [1 -1] apart from -1**n?
 
They got episode 5 of Better Call Saul just yesterday :)
 
2:41 PM
@Rainbolt thanks
@Sp3000 heh, my Mathematica reference implementation also uses i and n but with swapped meanings
 
Same algorithm? :P
 
yes
I might try Prelude later...
I've never implemented mod though... I might have to do that first
 
I like how it looks like arrays, feels like arrays, and nobody will be using arrays by the end of it
 
heh, yeah... although I'd be interested what an array submission looks like
I also want to try durron's challenge with in Prelude, probably with 3 voices
 
@MartinBüttner Not Fugue? ;)
 
2:53 PM
nah, it's too much of a hassle
Prelude is a nice language, but Fugue is really just a gimmick ^^
 
@MartinBüttner Piet works as a language, so why not Fugue? :-P
 
it doesn't really add anything over Prelude, I think... and I'm not much of a composer so I couldn't really make it nice anyway... I guess if there was an editor for Fugue which reads a Prelude program, where I can then just shift the intervals around, I might play around with it
meh, I'm trying to figure out a way to do FizzJazzBuzz in Mathematica without any control structures (merely with clever function definitions), but it's a bit tricky
 

« first day (1495 days earlier)      last day (3334 days later) »