« first day (1751 days earlier)      last day (3097 days later) » 

11:02 AM
Yay, another BF answer=)
1
A: 1, 2, Fizz, 4, Buzz

flawrBrainfuck, 16321 3602 1597 Almost as short as Java. This is just the trivial answer generated by another program, This is still a computer generated answer, but I am sure there are way shorter solutions! The general idea is initializing the cells to 4 B F i u z. If the program has to output a nu...

 
11:22 AM
@MartinBüttner I missed that you implemented Pada, nice!
and you added a random functionality too: new_state = @state.pop || rand(2)
if it will be used, that randomness will be a great source of confusion
 
@randomra I discussed that with the author via email... I think he wanted to make some changes to the language and also implemented it in the meantime.
 
11:53 AM
0
A: Sandbox for Proposed Challenges

Martin BüttnerStarry Metagolf meta-golf stack Starry is a funny esoteric programming language in which code consists only of +*.,`' where the actual command is determined by the number of spaces in front of it. That makes it tricky even to golf fixed-output challenges, because different commands can account ...

 
@MartinBüttner Seems like a cool challenge! (It isn't a codegolf, that's unusual and makes the challenge unique! :D )
 
we've had a few of these before (see ), but I think Starry should be particularly interesting.
 
meta.codegolf.stackexchange.com/users/31362/sandbox <==How did that guy get his 5 rep? By posting the question?
 
XD
@MartinBüttner Ok, I will add an explanation of what duct tape coding is. And, should I leave the bonus out? (Or should I just remove the underhanded tag?)
 
12:00 PM
with or without the bonus, the tag doesn't seem right
 
Ok!
(But I love that tag...XD)
 
as for the bonus, it's not a bad idea, but you might want to decide to either make it mandatory or leave it out completely.
@Stefnotch when I saw the tag my mouse moved instinctively towards the downvote button, which I only didn't press because after reading the entire proposal I noticed it had nothing to do with the usual underhanded challenges :P
 
Oh! Ok....
Hmmm...should I leave the bonus out or will it make the challenge too easy? If I were to make it mandatory, would the challenge be too hard?
I guess I will leave it out...
 
I think any non-trivial task is tricky with duct-tape-coding.
You could even allow regex. I don't see it making the task trivial.
 
:D Maybe...
Though, I guess I will just leave it there. I doubt anybody is going to even try to solve it with a regex...
 
1:05 PM
0
Q: Pentomino Validator

muddyfishAs someone who can't be bothered to look at their pentominos to see if it makes a rectangular shape, I've decided to make you write a program that does it. Your task Given some input split by newlines containing 12 unique characters, decide if it is a valid solution. A valid solution MUST Ha...

 
1:55 PM
I don't know what to put as my length 5 snippet for Vitsy. :c
 
2:18 PM
0
Q: Layout my tiles for me

TimI'm retiling my kitchen with different coloured tiles. In fact, it's going to have at least 2 colours - and 26 colours as a maximum. But, I'm fussy. I want this wall to look random, but sometimes random isn't random enough. So, when I lay out my tiles, I don't want to have any the same colour n...

 
2:44 PM
@MartinBüttner just saw the new ticket, what's wrong with {…}fI for example?
 
@aditsu The intention is that the command would also work with while loops, maps and all other sorts of loops.
 
ah, ok
 
Maps like that are sort of doable now with ee, but it's not ideal either
In fact, you could then retire fX for a different use, because {}* would work like it.
oh, except for ArrayList Block fX I guess.
 
If it helps, a good use case would be something like Collatz, where you want to find the length of the Collatz chain starting from n
 
Anonymous
So on the topic of:
 
Anonymous
2:56 PM
8
Q: Disallowing Explicit Exclusion of Languages

MegoWe've had discussion on a related topic before, where the general consensus is that challenges should be language-agnostic by default, but specific-language challenges were also acceptable within reason. Spurred by this question (which was closed for an unrelated reason), the discussion was brou...

 
Anonymous
Is it fair to say that we are all in agreement that challenges that ban/heavily penalize certain lanaguages for no specified, legitimate reason are off-topic and should be closed as such?
 
Anonymous
There's still some debate it seems about explicitly banning languages for semi-legitimate reasons (such as the task being trivial in the language), but I think we have a pretty clear consensus of what constitutes an illegitimate reason.
 
@Mego if the task is trivial in a certain language, it's probably the task's fault for being boring
 
Anonymous
@Doorknob That's how I feel, though Peter's proposal (which only differs in the proposed method of handling those challenges that are trivial in certain languages) has a lot of support as well.
 
I don't get why TIOBE Top 20 is apparently okay but disallowing specific languages/language classes isn't
 
3:02 PM
codegolf.stackexchange.com/questions/63942/… aww deleted just as i was finishing my solution...
 
Anonymous
@Sp3000 This meta post seems to indicate that specific-language (or specific-set-of-languages) questions are on-topic, though less preferable to language-agnostic questions. I don't necessarily agree with it either, but the consensus is there.
 
Anonymous
I think the votes will decide if a specific-language challenge is interesting enough to overcome the fact that it's not agnostic
 
@TheDoctor how were you able to write a solution to such an unclear challenge?
 
random.choice()
import sys,random as r
a,b,c=map(int,raw_input().split())
x=[[0]*a]*b
for i in range(a):
	for j in range(b):
		b=list(range(c))
		try:b=[i for i in b if i!=x[i-1][j]]
		except:pass
		try:b=[i for i in b if i!=x[i][j-1]]
		except:pass
		x[i][j]=r.choice(b)+1
print x
idk...
 
I'd be careful with the reuse of i as a variable there
 
3:10 PM
blinks
ohhhhhhhhhhhhhhhhhhhhhhhh
 
@TheDoctor haha, somebody hasn't read (or doesn't understand) xkcd 221
 
@TheDoctor This is why you should use long, descriptive variable nam— wait a second.
3
 
@Mego I'm not sure I'd consider TIOBE Top 20 as a "set of languages" as such, because there's nothing much in common apart from, well, their commonality (also there's no mention of TIOBE in your linked post). To me, I kinda see TIOBE as a long list of disallowed languages, even more "legitimate" ones :/
@TheDoctor List comps leak. (Credits to Lembik for teaching me that)
 
@Sp3000 I don't have a strong position on either side, but it's worth noting that there's a difference between a "blacklist" and a "whitelist" of languages, so to speak.
 
Or, at least in Python 2 (it's 2 right? You've got raw_input and print without parens, yet you do list(range()) for some reason)
 
3:13 PM
@Sp3000 ??
 
x = "Hello, World!"
y = [x for x in range(10)]
print x
Oh wait, wrong comment. What were you trying to point out?
 
0
Q: Layout my tiles for me

TimI'm retiling my kitchen with different coloured tiles. In fact, it's going to have at least 2 colours - and 26 colours as a maximum. But, I'm fussy. I want this wall to look random, but sometimes random isn't random enough. So, when I lay out my tiles, I don't want to have any the same colour n...

 
repost? o_O
 
carrot.svg
 
Anonymous
3:29 PM
@Sp3000 That's the impression I got from the meta discussion, at least - whitelists are allowed, blacklists typically not unless there is a really good reason. I personally don't like restricting languages (though I was going to do it for a challenge, I thought about it and decided against it). Like @Doorknob said, there is a difference between a blacklist and a whitelist.
 
Anonymous
The best way to approach these issues, I think, is to take small steps that the community can agree on, and work from there. Disallowing challenges that forbid languages for no good reason (or no reason at all) is a policy I think we can all get behind.
 
Anonymous
There are good reasons to have specific language challenges though - using a single language is a popular choice for KOTH because it drastically simplifies setting up the controller.
 
allo
 
Anonymous
Hiya
 
I see gamma golf has a lot of answers now
And all of them use Zereges formula wow so creative
Did I miss anything of interest?
 
Anonymous
3:36 PM
The Lanzcos and Spounge approximations are neat
 
@Mego But not short enough sadly
My TI-BASIC Spounge one was 81 bytes (at least it would have been if it worked)
The brute-forcey one is 35
Might have made an interesting
...not saying that it isn't interesting as it is, just that it would have made a cool
 
Anonymous
@quartata Maybe. Though that would add a lot of complexity - requiring speed and precision
 
Anonymous
I'm glad you liked it :) it was a simple idea that worked well
 
Anonymous
I'm sandboxing my first KOTH right now :P
 
@Mego ooh
I've never participated in a KOTH because I'm too stupid to figure them out
 
Anonymous
3:42 PM
This one isn't too complicated
 
(Doorknob already got 44 stars...)
 
Anonymous
@quartata Want a hint?
 
@Mego ?
 
Which KOTH is it?
 
Anonymous
 
3:50 PM
Checkers...
That I can do!
 
What is a KOTH?
 
King of the Hill
You write bots and they duke it out to win $10,000
 
@quartata s|</?s>|---|
 
It's funnier when it isn't actually struck through though.
 
@Doorknob Is that a regex expression?
 
3:52 PM
@quartata ¯\_(ツ)_/¯
@ΚριτικσιΛίθος yes
 
lol
 
@ΚριτικσιΛίθος Probably in that hellspawn language they call Ruby
 
LOL strike through
:D
 
@quartata ... Ruby? huh?
 
@Doorknob Ye
fite me
 
3:53 PM
I didn't know that regex is specific to Ruby...
 
@ΚριτικσιΛίθος "|" most likely stands for "or"
 
Who uses pipes to separate them?
Traditionally it is /
 
me, when there's /s in the pattern or replacement, so I don't have to escape them
 
I put @Doorknob's regex in regexr.com , but it says there is an error
 
I guess you can use whatever char you want in Perl or Ruby but it isn't the tradition dammit
Think of the tradition
 
3:54 PM
@quartata only Perl AFAIK. And sed of course.
 
@ΚριτικσιΛίθος It is the "or" at the end...
 
@ΚριτικσιΛίθος well duh, regexr apparently puts in the delimiters for you (not to mention it's not a regsub, just a match)
@Stefnotch no it doesn't
 
The error there gets caused by that...
 
1 min ago, by Doorknob
@ΚριτικσιΛίθος well duh, regexr apparently puts in the delimiters for you (not to mention it's not a regsub, just a match)
 
Uh?
 
3:56 PM
@Doorknob What's the point of showing your message again?
 
@ΚριτικσιΛίθος to answer @Stefnotch
 
(And I still am confused)
 
@Stefnotch The website apparently already includes the regex delimiters (/.../) for you. Also, it's a simple match, rather than a replace.
 
Anonymous
@Stefnotch tl;dr regexr is dumb
 
^
 
3:58 PM
@Mego Oh, that's simple! :D
 
regex101.com also says that there is an error.
 
Anonymous
@ΚριτικσιΛίθος also dumb
 
...
5 mins ago, by Doorknob
@ΚριτικσιΛίθος well duh, regexr apparently puts in the delimiters for you (not to mention it's not a regsub, just a match)
 
This regex gives no errors: s|<\/?s>|---|
 
0
A: Sandbox for Proposed Challenges

Darrel Hoffmancode-golfmath Find runs of triple multiples of squares Your task is simple: For a given input N, find all runs of three or more consecutive integers which are all perfect squares or multiples of perfect squares. You should then list each triplet (or greater) on a single line, indicating the sq...

 
4:00 PM
@ΚριτικσιΛίθος are you reading the message that I'm continually quoting? :/
 
@Doorknob What is a delimiter?
 
um, anything that delimits
(usually / in regexen as noted by @quartata)
 
What's a regsub?
 
regex substitution
 
regexr.com has a substitution thingy...
 
4:05 PM
I even tried the regex on the JS console, it gives an error:
`Uncaught SyntaxError: Unexpected token |(…)`
 
JS doesn't support arbitrary delimiters
 
Where will your regex work?
 
Perl? sed?
 
Oh. I don't do Perl or sed.
 
llama@llama:~$ sed -r 's|</?s>|---|g'
these are <s>some</s> words
these are ---some--- words
 
4:09 PM
Javascript
"these are <s>some</s> words".replace(/<s>|<\/s>/g,"---");
 
or just /<\/?s>/...
 
Oh, yeah! (I keep forgetting that the ? exists..)
 
? is not even necessary
_? can be translated by (_|)
so it's not a primitive
similarly, _+ can be translated to __*
 
Anonymous
Shame on you @orlp
 
Anonymous
Use those syntax highlighting tags
 
4:15 PM
hrm?
what do you mean
 
Anonymous
In your tile code
 
Anonymous
<!-- language: lang-python -->
 
Anonymous
Add that two lines above the code
 
usually it autodetects
 
Anonymous
Nope
 
Anonymous
4:18 PM
waits for sandbox bot
 
@Mego yes?
on stackexchange it usually automatically detects the language used and highlights
 
Anonymous
@orlp Oh huh, I've never seen it do that. I've always had to go in and manually add syntax highlighting to my answers.
 
Anonymous
Probably because my code usually ends up not resembling the language it's written in
 
example
0
A: Writing recursive solutions to a list

orlpI would suggest iteration over recursion: def catalan_numbers(N): C = [1] for n in range(1, N): C.append((4*n - 2) * C[-1] // (n + 1)) return C

 
Anonymous
"is that brainfuck?" "no it's python" "are you sure?" "no"
 
Anonymous
4:21 PM
@orlp The interesting thing about that question is, in the second piece of code, there actually is a base case. for x in range(0,0) doesn't execute.
 
Anonymous
The issue is that the code is wrong
 
Anonymous
int*list doesn't work
 
Anonymous
catalan_numbers(n) should be catalan_numbers(x)[-1]
 
Anonymous
Or just don't use a for loop like the answers suggested :P
 
Huh, what's that syntax highlighting thing you are talking about?
 
4:23 PM
@orlp that's done by the tag. Without a language tag, syntax highlighting falls back to either generic highlighting or none
 
Anonymous
Hah! I knew it!
 
@Doorknob ah
 
Anonymous
Which is why we have to manually tag our languages
 
0
A: Sandbox for Proposed Challenges

MegoKing Me - Draughts King of the Hill Draughts (or checkers, as it is known in the United States) is a well-known international game. I was surprised that we have not had a draughts King of the Hill yet, so here's one! In case you're unfamiliar with the rules (or perhaps you need a refresher), her...

0
A: Sandbox for Proposed Challenges

insertusernamehereCan I win in two more moves at Three Men's Morris? code-golf game The Game You remember the classic game "Nine Men's Morris" or simply "Mill"? There's variation called Thee Men's Morris which is a bit like a mutable tic-tac-toe. Rules This is the blank board of the game: [ ]–[ ]–[ ] | \ ...

 
Anonymous
@NewSandboxedPosts Yay
 
4:25 PM
Would <!-- language: lang-brainfuck --> work?
 
Anonymous
@Stefnotch I don't think there's syntax highlighting for bf. Not that it needs it, there are only 8 characters.
 
@Stefnotch that would be equivalent to lang-none
 
Anonymous
No words/expressions means no use for highlighting
 
Anonymous
The only syntax rule in bf is that you need matching []s, and highlighting doesn't help that any
 
XD What languages do have syntax highlighting?
 
4:28 PM
 
Anonymous
 
Oh!
 
4:43 PM
@ZachGates I explained it in that answer.
 
Anonymous
Programming in Java makes me wish I was doing something more fun, like having a root canal without anesthesia
 
LOL! (I see, a Java fan...)
 
5:00 PM
doesn't understand the hate for Java
 
Anonymous
It's an unpleasantly mediocre language
 
its not exceptional in anything, but does well in everything
 
Anonymous
Jack of all trades, master of none
 
Anonymous
5:20 PM
tumbleweed.png
 
@Mego I agree
I haven't touched Java since last term, and I won't unless I need to.
 
Anonymous
Crap, I'm up to 9 votes on showcase
 
Anonymous
I haven't even figured out what to do for #8
 
Oh, suggestion for Seriously: A large-number constant
2^32 or so
(Unless it's unnecessary; I don't know the language well enough to tell)
 
Anonymous
5:36 PM
5╙╙ == 2**32
 
if I flip a coin continuously until I get a tails, and I get 1 point for each heads, what is the distribution called?
 
@Mego That's three bytes long
@NathanMerrill Exponential? Geometric?
 
Anonymous
@NathanMerrill Bernoulli
 
@Mego Huh, didn't know it was called that
 
Anonymous
I paid attention in stats class :)
 
5:39 PM
Wait no
It's not Bernoulli, it's geometric.
Bernoulli is (1-p)% chance of 0 and p% chance of 1
 
woof
 
Anonymous
Oh, the Bernoulli is a single trial
 
Right
 
Anonymous
It's binomial for multiple trials
 
No, @NathanMerrill was asking for the distribution of
the number of heads before the first tail
Which is geometric
 
Anonymous
5:41 PM
Ooohhhh
 
Anonymous
Yeah
 
Anonymous
It's hard to think about stats and board games at the same time
 
you guys are switching too fast for me to look these things up
 
@Mego which board game?
 
Anonymous
@ThomasKwa Draughts
 
Anonymous
5:46 PM
I'm working on the controller and stuff for my sandboxed koth
 
6:01 PM
I'm actually working on a Connect 4 AI in TI-BASIC
It's really difficult to implement minimax with such a limited language, especially because I need to think about speed optimization from the start
 
6:16 PM
@ThomasKwa games in ti basic are difficult: github.com/red-green/Ti_Tidbits/blob/master/TI-84%20Programs/…
 
@TheDoctor Don't use so many Goto, and don't Goto out of an If:Then:End block.
 
Goto is slow
 
Anonymous
Goto considered slow
 
Also, Goto out of an If:Then:End block or a For( loop or a While loop causes the calculator to think it's still in the loop, and keep the loop pushed on the stack
This causes a memory leak of 10ish bytes every time you do it
 
Anonymous
6:21 PM
TI really needs better optimizations for TI-BASIC :P
 
So if you do it more than a few times, your program gets slow and eventually throws ERR:MEMORY
 
Anonymous
And by better I mean more than 0
 
Also, there's a single-line If
 
usually shut the box ends before that
 
6:21 PM
If (condition):one-line statement
 
i wrote that two years ago...
 
You don't need to do If:Then:[one-line statement]:End
Oh, okay
 
Anonymous
I need suggestions for things to show off in Seriously for the popcon showcase
 
Seriously, nobody understands it but you
 
Your README.md got a few cool ones?
Take a bunch of Dennis' programs and turn them into seriously small programs?
http://meta.codegolf.stackexchange.com/a/7346/33160
 
6:30 PM
Do we consider it beating Dennis if we use a different language?
 
@TheDoctor *shudders*
 
Not sure...but outgolfing one of Dennis' CJam programs does take a lot of skill!
If you feel like being evil, you could try to beat his PPCG masterpiece:
http://codegolf.stackexchange.com/questions/51228/rearranging-words/51238#51238
 
That ain't though
 
6:34 PM
@ThomasKwa Dennis is adaptive to new languages, so it does count, but it won't last long.
 
@ETHproductions I don't think Dennis will ever touch TI-BASIC
 
@Mego Do you intend to use all ascii characters as commands in Seriously? (At some point in the future?)
 
@ThomasKwa Well then, you're our only hope.
 
Then again, TI-BASIC will probably stop winning any challenges now that there's Seriously
APL/J/K and Pyth beat TI-BASIC at simple math challenges too
but Seriously is probably just better than TI-BASIC
 
How about TI-ACIDIC?
3
 
6:37 PM
.....maybe I'll call my next language that. :P
 
I'd love that=)
 
@flawr That took me a while; at first I was like "is that a play on EBCDIC"?
 
I considered making a derivate of Octaved and call it Septime=)
 
when will is stop?? 45 stars and counting on the pinned post
 
Anonymous
@flawr yep
 
6:44 PM
okay seriously stop abusing pins
 
Unless I'm mistaken, that's almost twice as many stars as second-place
 
Anonymous
@ThomasKwa No, it's a chemistry pun
 
@Mego I eventually got that; it just tripped me up at first
 
@ETHproductions IIRC second place has 23 stars. So just one more.
 
Anonymous
@ETHproductions He learns... Adapts...
 
Anonymous
6:45 PM
@PhiNotPi ?
 
Anonymous
@TheDoctor Challenge issued
 
<a href="http://example.com">test</a>
 
use square brackets around the text, followed by parentheses around the URL
 
Anonymous
@TheDoctor [text](url)
 
i know that
i was testing
 
Anonymous
6:47 PM
@Stefnotch That's never gonna happen lol
 
I have the gamma function in 27 bytes of TI-BASIC, and 19ish of Pyth
 
@Mego It's supposed to be related to the pinned post.
 
Anonymous
@PhiNotPi Oh, a pin pun
 
@ThomasKwa WHUT?
How'd you get rid of 8 bytes?!
 
Sorry, Pyth 21
Oh
 
TI-BASIC has product of a list.
 
I should work on Japt's interpreter more
 
That however doesn't work, since TI-BASIC only has 999 element lists
 
Ahhh...
 
TI-BASIC also has summation, which doesn't store the results in a list, but not capital-pi product
 
6:53 PM
Minkolang does too, but to use it is no change in the number of bytes.
 
So I take the log of everything, use summation, and then take e to that power
 
oooh
I think I can use that trick too.
 
I still need to test it, but I don't see any issues with rounding
Wait, I may be able to do that in Pyth too...
 
Is the log of negative numbers not defined?
It should be complex, right?
 
...wait
are there ever negative numbers in the product?
Of course there are -_-
Yes, it's complex
 

« first day (1751 days earlier)      last day (3097 days later) »