« first day (2047 days earlier)      last day (2807 days later) » 

12:00 AM
Consider the computable function Q:N×N→N given by Q(x,y)=x. By Kleene's second recursion theorem, there is some p such that the program with Gödel number p computes the function f(y)=Q(p,y)=p, i.e., a program which outputs p

for every input. This is exactly the program you're looking for: for any input, it outputs its own Gödel number.

Such a program is known as a quine, and they exist in any Turing-powerful model of computation.
 
@ConorO'Brien actually, your challenge is technically impossible in V/vim unless you broaden your definition of "error"
 
Vim doesn't have errors, unless you count ding
6
A: Tips for golfing in vim

DJMcMayhemAnytime a command fails, it will make a ding noise, which will cancel the current macro. You can (ab)use this to create a crude form of loop. For example, if you want to repeat the keystrokes <foobar> until your buffer has less than 3 lines in it. You can do qq<foobar>3G``@qq which means: qq ...

 
I guess there are command line errors
 
12:01 AM
is a ding canonically considered an error?
 
Uh..............
I have no clue.
The way I use vim on this site is like the way far obscure corners of what's possible/intended in vim, so sometimes it's hard to find docs
 
@BetaDecay if you aren't already asleep, your answer is technically invalid :(
@DJMcMayhem if it helps, infinite loop counts as error for my challenge
so the bf program +[] "errors"
hey I just got inquisitive badge
 
Hey, nice!
@ConorO'Brien hmm, infinite loops take a lot of boilerplate...
 
at least it's technically possible :P
well, maybe not
Slightly sleezy use of stars: starring the NMP of your new question :P
 
12:17 AM
@ConorO'Brien Would you consider ding to count as an error for your challenge? It's probably possible without it, but it would definitely make it easier
 
@ConorO'Brien Your question marks the first time that I've been able to make use of LI! Thanks for that.
 
hallo
@ConorO'Brien lol
 
@DJMcMayhem sure
@StevenH. LI?
Oh
where's that meta post for quines..
 
The fact you're looking for a meta post means in some way mine probably isn't valid.
._. RIP.
 
@ConorO'Brien which one?
 
12:28 AM
@ConorO'Brien Awesome! I still don't know if I can make a quine at all, but I'll try it.
 
I'm back again.
 
@StevenH. yeah, I remember reading somewhere that such quines (numeric quines) are "trivial"
sort of how like repl-quines are trivial and banned
@EᴀsᴛᴇʀʟʏIʀᴋ you know which one I'm talking about?
 
repl?
 
no
@ConorO'Brien there are a bunch >_>
 
@StevenH. things like irb
@EᴀsᴛᴇʀʟʏIʀᴋ start throwing links at me?
 
12:35 AM
14
Q: What counts as a proper quine?

AJMansfieldThe basic definition of a quine is a program that, when run, produces its own source code as output. There are a number of techniques and a number of way to implement those techniques across a number of different languages. However, not all quine programs are equal. Clearly, any quine in HQ9+ or...

21
A: Things to avoid when writing challenges

Martin EnderMost kinds of generalised quines Quines continue to fascinate this community... but we already have a plain quine challenge so we're "forced" to innovate by making quine-related challenges that aren't pure quines. For the purpose of this post, I'm defining a generalised quine as a program P whic...

@StevenH. link to answer?
 
0
A: A Fragile Quine

Steven H.LI, 1 byte Ironically, a missing feature is what makes this possible, that being a lack of string support. Assumes no input. 1 This evaluates 1, a function that returns the literal value of 1, and returns it. Removing the one results in a cat-style program, which breaks on the current versi...

 
@ConorO'Brien i think that's valid. Un-original, but valid.
 
distastefully unoriginal ...
 
:/
 
@StevenH. oh, I think yours is invalid :/ sorry
 
12:39 AM
what are people's recommendations on refurbed phones?
 
Is it standard to disallow non-payload-capable solutions?
 
@EᴀsᴛᴇʀʟʏIʀᴋ this is irrelevant; it's concerning a certain predicate of the program, not a function or transformation of
 
yeah
i didn't know what you meant
 
wait, new question, how does ebay sell new phones cheaper than list price?
 
12:41 AM
@Maltysen ebay buys them in bulk? idk
 
hmm maybe
 
;_; none of this stuff came up in the bleepin sandbox
 
wait when they say "new..." they really mean new right?
wow, they really do. it seems shady, but whatever
 
@ConorO'Brien Are the submissions to.your challenge excempt from our definition of quine?
If not, I think all current answers are invalid.
 
1:00 AM
Somebody say their favorite word.
 
Supercalifragilisticexpialidocious
 
@StevenH. That's not a real word.
 
You said favorite word, not favorite real word.
But fine: Pneumonoultramicroscopicsilicovolcanoconiosis.
 
@Dennis idk. the chicken one is odd
idk
ik Beta can't edit until tomorrow when he is awake
 
@ConorO'Brien It definitely doesn't comply with It must be possible to identify a section of the program which encodes a different part of the program.
 
1:04 AM
@StevenH. Any other favorites that aren't insanely long or uncommon?
 
@Dennis that's true. >_< I read that thing like twice but I kept skipping over the blockquote
 
Any single token (such as chicken or 1) can't possibly comply with that rule.
 
I agree entirely. I'll put that comment into my question, I think
 
@DanTheMan Swarmy
 
@ConorO'Brien Good idea. Otherwise, a very interesting challenge becomes trivial in about every language with implicit printing.
 
1:08 AM
@Dennis okay, done. thanks! I should bookmark that page, I didn't know about that rule.
@StevenH. Is the name two L's, or and L and an uppercase I?
 
@ConorO'Brien Let's see how long it'll take to get a valid answer. I only.know two languages I might be able to solve it in.
 
oh? which languages?
 
An L and an uppercase I
 
@StevenH. Since chicken has been mentioned, I'll just choose that.
CMC: Find the smallest regex that will only match the word chicken in this regex dictionary: visca.com/regexdict
 
@ConorO'Brien Let's keep that as a surprise. :P
 
1:12 AM
Wait, there's a COW quine
 
@Dennis ah, okay ;)
^c.+ken$
^chicken$
 
chicken$
 
why can I flag deleted submission? o_O
 
I just noticed that I'm in the top 11% this quarter!
 
nice!
 
1:48 AM
CMC:
choose three languages A, B, and C. Write three programs P, Q, and R such that:

 1. each program outputs something in at least one language
 2. each language should have at least two programs that do not error
 3. each program should work in at least two of the languages chosen
 4. the set of outputs should contain at most two members
 
2:04 AM
Javascript, Python, Brainfuck: print("-."), console.log("--."), alert(1-2-3-4.0)
I think that's a valid answer
Not at all golfy though
Oh wait, the fourth rule
 
Pyke, Pyth, and BF:
`+++++++++++++++++++++++++++++++++++++++++++++++++1 1.&` for BF and Pyke, `"+++++++++++++++++++++++++++++++++++++++++++++++++"; 1 1.&1 1 ;1` for Pyke and Pyth (with leading space),
"s+++++++++++++++++++++++++++++++++++++++++++++++++1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" for Pyth and BF (definitely not golfy, golfy was not what I was going for, just FGITW that matches all four rules)
Outputs either
1
or
1
1
 
Javascript, Python, Brainfuck: print("-."), console.log("-."), alert("-.")
Now it's valid
No it isn't
 
Pyth, LI, and self-modifying BF: "<2/.1" for LI and SMBF, "1." for Pyth and SMBF, and "1" for Pyth and LI, even though that last one seems uncreative
SMBF outputs "1" for both of its programs, LI outputs "1.0" and "1" for its two programs in order, and Pyth outputs "1.0" and "1" for its two programs
 
2:27 AM
Why does eval("print '0'") not work in Python 2.7?
 
2:38 AM
@DanTheMan You have to use exec
eval("print('0')") doesn't work in Python 3 either
 
Pyth, ><>, brainfuck
Pyth + ><>: |n|!0000
Pyth + BF:  |!0"-[----->+<]>---....
><> + BF:   "-[----->+<]>---....0000"oooo;
I'm really proud of this
Outputs are 0000 and True
I'm sure there's a better third language choice than bf though
 
@ConorO'Brien Does string literals + implicit output count :P
 
@EᴀsᴛᴇʀʟʏIʀᴋ I am guilty of doing this :|
 
Pyth, ><>, Fourier
Pyth + ><>:     |n|!0000
Pyth + Fourier: |!0"oooo
><> + Fourier:  "0000"oooo;
Pyth always outputs True, Fourier and ><> always output 0000
Also, ><> should really get added to Try it online
 
2:58 AM
@DanTheMan Is it not on TIO yet
 
@ASCII-only I must have missed it.
 
@Downgoat >:U y u do dis flynig gaot ;_;
 
Yeah, it's there.
I just realized the first program might be against the rules because it errors out. Is that okay?
 
@ConorO'Brien really great quine post, but I still can't believe you have gotten so many invalid answers
 
@ASCII-only I think not :P
@NathanMerrill thanks. and yeah, I'm surprised too
 
3:12 AM
If erroring out is fine, this also works for Pyth + ><>: |qnnnn0000000
 
so, I had an idea to make my posts less...verbose
I think I'm going to add less-important (but still needed for self-containment) details in a link hover text
 
3:25 AM
Hello guys!
CMC: The number of bytes of the name of your favorite programming language. Output the name of this language using fewer bytes than that.
I'd love to see a C answer. :D
 
Python shell (from the terminal) ^Z<enter><up arrow key>
Kindof a cheating answer
 
@TheBitByte Hasn't this been done before?
 
Unfortunately, that's literally impossible in my favorite programming language
 
@DJMcMayhem Haha.
Still an answer, though.
 
@ASCII-only I thought that too.
 
3:31 AM
That's impossible on every programming language i like and use
 
I bet you could easily do it in BubbleGum
 
> i like and use
 
What's impossible?
 
5 mins ago, by TheBitByte
CMC: The number of bytes of the name of your favorite programming language. Output the name of this language using fewer bytes than that.
 
I want a C answer.
That would be 0 bytes :D
 
3:33 AM
Oh, ignored messages.
 
Go with A, B, C, D, F, or V.
Those are all one-byte language names
 
I'm pretty sure there's a programming language for each letter
 
C# and Java are also too verbose to have valid programs that short
 
@DJMcMayhem "Output the name of this language using fewer bytes than that."
 
@DJMcMayhem Also J
 
3:34 AM
welcome to Java REPL :)
 
@NathanMerrill I don't think so
I don't think there's E, G, H, I, Z, and a whole bunch of others
 
is that a question? a link pls
 
E is an object-oriented programming language for secure distributed computing, created by Mark S. Miller, Dan Bornstein, and others at Electric Communities in 1997. E is mainly descended from the concurrent language Joule and from Original-E, a set of extensions to Java for secure distributed programming. E combines message-based computation with Java-like syntax. A concurrency model based on event loops and promises ensures that deadlock can never occur. == Philosophy == Inspired by Minjie Shen, the entire language is designed with secure computing in mind; this is accomplished chiefly by strict...
 
Oh. TIL
 
there's an "E"
but I can't find "I"
 
Apparently there is already a V
 
Lets create X programming language
 
A ppcg challenge, maybe? Any ideas?
 
3:36 AM
google isn't helpful because it interprets "I" as a pronoun, not a letter
 
How about a slightly easier CMC: Output the name of your language without any of the characters in your language name
 
@DJMcMayhem main(){putchar('B'+1);}
 
most likely that was asked already or sth v. similar
 
V, 4 bytes: i<C-v>86 wat
 
Python, 1 byte: f
 
3:39 AM
brainfuck, 107 bytes: --[----->+<]>----.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++‌​++.
 
>>> f
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'f' is not defined
>>>
 
"Python" shows up in the error msg:
Traceback (most recent call last):
File "python", line 1, in <module>
NameError: name 'f' is not defined
XD
 
Fine. CMC: Output the name of your language and nothing else without any of the characters in your language name
 
anyways, we've already got an X#, the x86 and X++. X is pretty well covered
 
What about a programming language named XXX? That could be fun to make. ;)
 
3:41 AM
It should be four, but it takes 5 in V: i<C-v>x56
 
@DanTheMan an important feature of any language is it google rankings. Have fun getting to the top of list with that one :)
 
dc: 100P99P :)
 
@NathanMerrill Not as bad as /// though.
 
6 mins ago, by betseg
@DJMcMayhem main(){putchar('B'+1);}
Not even a newline
Only 'C'
 
I already saw that
 
3:45 AM
New question same answer
 
Sometimes brainfuck is called bf: --[----->+<]>----.++++.
I am literally golfing a language's name
 
dc shorter: 9AP99P
 
@DanTheMan You should try it in brain-flak
:D
 
@DJMcMayhem Python, 21 bytes: print("nothing else")
 
L8R
Bai
 
3:47 AM
@betseg putchar(67) doesn't work?
 
BF is also 23 bytes: ++++[++++>---<]>-.++++.
 
@DJMcMayhem JS, 14418 :P
 
@ASCII-only Oh.
 
@TheBitByte
 
3:52 AM
@DJMcMayhem Third one is energy, you didn't specify it has to be GRY in order. :D
 
sigh...
 
@DJMcMayhem I feel ya, man...
 
> A measure equal to one tenth of a line.
^ wat
 
@ASCII-only clap clap
 
@ASCII-only That counts as really obscure in my book.
 
3:54 AM
Totally unrelated to the point I was attempting to make, but huh. TIL
 
@Dennis Yeah, me too, but OneLook says it's common for some reason
 
@Dennis:

https://en.wiktionary.org/wiki/aggry

https://en.wiktionary.org/wiki/meagry

https://en.wiktionary.org/wiki/puggry
:D
 
Well, I'm not a native speaker, so I guess I'm not the best judge.
 
@Dennis Wait, you aren't????????????????????
 
Nope.
 
3:55 AM
And unangry
 
@DanTheMan Link?
@Dennis You from Sweden?
 
@TheBitByte He's German
 
guys I have a question idea, pls tell me if it's good or new
 
Adjective: unangry ‎(comparative more unangry, superlative most unangry)
  1. Not angry.
 
But lives in South America.
 
3:57 AM
@DanTheMan TIL.
@Dennis Como estas? Hablar Espanol?
 
Sí, yo hablo español.
I try not to in English chat rooms though.
 
Wolfram Alpha also gives "hangry"
 
@DanTheMan slow clap
 
It's scary how much WA knows.
 
@DanTheMan That sounds like a mix between hungry and angry
 
3:59 AM
Apparently "anhungry" is also a word.
@ASCII-only It is
 
@ASCII-only That's exactly what it is
 
It's hard to make square ASCII-art when fonts are rectangular, not square. #ppcgchallengewriterproblems
 
@DJMcMayhem Fonts are neither of that. They are bezier curves.
 
4:01 AM
dc accepts input by default in radix 10, which means 29 is 29, but surprisingly CF is not the hex 207, is actually read by dc as C*10^1+F*10^0=12*10+15=135. Given a decimal input, output the hex number that would be read by dc as that input value. So given 135, task is to output CF.
 
@TheBitByte Some of them are bitmaps.
 
@DanTheMan I concede.
 
@DJMcMayhem You should make a square font.
 
@DanTheMan Most have bitmaps for hinting
 
@DanTheMan Yeah, that sounds like it'll be a commercial success...
 
4:03 AM
@DJMcMayhem There are actually a lot of square fonts
 
@seshoumara Python, 12 bytes: print("CF")
 
@ASCII-only But are they monospace too?
 
@DanTheMan Well, they're square, meaning they're monospace
 
Monospace =/= square
 
@TheBitByte so that actually prints 135? Impressive, I only encountered this way of looking at a hex number in dc till now.
 
4:05 AM
@seshoumara Haha. Nope.
 
@seshoumara Why not D5
 
This one is "square" but not monospace: 1001freefonts.com/dark_forest.font
 
@TheBitByte That's not relevant to what ASCII-only said.
 
@El'endiaStarman Fine.
 
They're both tagged "square"
 
4:07 AM
I thought "square" meant that the height and width of characters were the same.
 
@DanTheMan Rectangular by DJMcMayhem's definition though
 
Hmm. If it doesn't, it should. :P
 
CMC: Print an ASCII square. Your code must also be inside an ascii square. {}
 
@ASCII-only D5 is also accepted as an answer
 
@seshoumara Oh okay then
 
4:09 AM
So would my question be good enough to ask? I would like to see this in many languages, and to be harder, I could ask to print all hex solutions.
 
Print all of what?
 
So given the input 135, output CF? Okay then, n=>alert(n==135?"CF":"")
 
@seshoumara Wouldn't hurt to Sandbox it.
 
so for 135, the output should be CF and D5.
 
In fact, it would probably hurt to not Sandbox it. :P
 
4:11 AM
I've never asked a question. Where is the Sandbox link? and how to know when the question is ready for the main site?
 
197
Q: Sandbox for Proposed Challenges

SandboxWhat is the Sandbox? This "Sandbox" is a place where Programming Puzzles & Code Golf (PPCG) users can get feedback on prospective challenges they wish to post to the main page. This is useful because writing a clear and fully specified challenge on the first try can be difficult. There is a much...

And once it's got some upvotes and nobody comments complaining about something, you're probably good to go. Just wait a couple days.
You can also link to it in here if you haven't received as much feedback as you'd like
 
@seshoumara The recommendation is to wait at least 72 hours (three days) to ensure that enough people have seen it and there's been enough time to give feedback.
 
I don't think I've ever waited three days... ._.
 
@DJMcMayhem My 12 byte answer (see above) beats out every one of them, if the challenge gets posted.
 
Aww, for a minute there I thought I had a star...
 
4:14 AM
Ok, I will do so.
 
wat
 
Is doing that against the rules?
 
@DanTheMan He didn't say so. :P
12 mins ago, by TheBitByte
@seshoumara Python, 12 bytes: print("CF")
 
As the old story goes: The little boy's mother was off to market. She worried about her boy, who was always up to some mischief. She sternly admonished him, "Be good. Don't get into trouble. Don't eat all the chocolate. Don't spill all the milk. Don't throw stones at the cow. Don't fall down the well." The boy had done all of these things on other market days. Hoping to head off new trouble, she added, "And don't stuff beans up your nose!" This was a new idea for the boy, who promptly tried it out. In our zeal to head off others' unwise action, we may put forth ideas they have not entertained...
 
@TheBitByte Invalid answer, disqualified
Plus Jelly is almost guaranteed to beat Python
 
4:17 AM
@El'endiaStarman Is spamming stars against the rules?
 
No, but starring junk and repeatedly starring and unstarring things is obnoxious.
 
@ASCII-only Fun answer, though. :P
 
@DanTheMan Well, considering that the most-starred message ever says "seriously don't abuse stars", kinda.
 
@El'endiaStarman Link?
 
Nov 12 '15 at 22:26, by Doorknob
okay seriously stop abusing stars
 
4:20 AM
Yeah, you should totally not star me.
 
Seriously you should stop abusing oneboxes.
 
Such a good movie. :D
 
Which one?
 
4:26 AM
@DJMcMayhem And book!
 
@DanTheMan Which book?
 
The Princess Bride
 
Oh. I didn't realize it was a book (which sounds kinda dumb to say since the movie is about the book). Maybe I should read it. I've been looking for something to read.
 
Read "*The Monk Who Sold His Ferrari*"

Great book 100/10
 
0
Q: Make a calculator without basic operators!

Oliver NiMake a calculator without basic operators! Uh-oh! Somebody has removed all four basic arithmetic operators (+, -, *, ÷) from Earth! It is up to you to save the world! Your task is to make a program of function that, given simple expression containing two integers between -20 and 20, inclusive a...

 
4:38 AM
@EᴀsᴛᴇʀʟʏIʀᴋ ;_; gaot is vrey sowee Q_____Q have cookie for my regret: 🍪🍪🍪
 
@DJMcMayhem It is a very good book.
 
@ΛεγίωνΜάμμαλϠΨΠʹ wait wat. cheddar is open source
 
Hahaha, @Downgoat I was reading through some old PPCG challenges, and I found this comment:
lambda (ass) +1 for variable name choice :P — Downgoat Apr 24 at 2:50
 
:|
 
I'm writing an with like 24 possible large outputs. Should I provide all of them, or let it be clear from the samples I give?
 
4:43 AM
@ASCII-only B+1 looks better :D
 
@DJMcMayhem How large?
 
235 bytes over 15 lines (for the largest output)
The smallest is 70 bytes over 5 lines.
(Although most of it is whitespace)
 
Why is this guy trying to use Google+ + for pings
 
maybe he doesn't know, but I doubt it since @X is almost native :)
*has almost native support in us
@DJMcMayhem I had to rename a function for a similar reason. The function was named s, from start, and in sed you call it by jumping with b so the code would have been "bs".
 
???
Which comment of mine are you replying to?
 
4:54 AM
lambda(ass)
 
Oh, OK.
 
apparently + pings work too, since I got a notification in inbox for a reply to my question I just asked him
 
Lol
Lelelel
 
5:10 AM
Wow, that's a large onebox
 
s/a .*ne/one large /
 
@Dennis Wow, thone large box
:P
 
Fixed.
 
Halp this is so long s=>eval(s.replace(/[ptmdb]\w*/g,m=>'/*+ -'[m.charCodeAt(0)%5]))|0;
Also, I'm wondering if operators in a string are valid for this
 
5:19 AM
@ASCII-only I would guess not, but you should ask.
 
Alternatively: WWxdf fbP
 
f=s=>eval(s.replace(/[ptmdb]\w*/g,m=>atob('LyorIC0=')[m.charCodeAt(0)%5]))|0 then
 
5:39 AM
@Dennis If you're still here can you pull Logicode? (Also, I'm not sure why passing -h as an argument doesn't work)
 
Is fishlanguage.com working for anyone else?
 
Darn, I really like that site. I wonder why it's down.
 
6:13 AM
@ASCII-only I had to make a custom wrapper to supply file and input as required, and it didn't pass CLAs. It should work now.
 
@Dennis :D Thanks!
 
Hi
 
Good night.
 
I realised my language can be tc without the multiply command, but it would be like, WAY more verbose
 
6:21 AM
@DanTheMan morning!
 
As in, not just having to push really long numbers, but to do with control flow
 
Hello
Argh there's a bug with the thing
 
Do you know an online c compiler with command line argument support?
 
Not bad...
 
Notbad.jpg
 
6:28 AM
wow 4 questions?
 
example. for the emulation of a minsky machine decrement, you would dupe the counter, check if zero, then multiply the amount to move the char pointer to the if not zero case. however, without the mult command, one would need loads of dupes, diffs, an a to be, and then a diff again. so it would be REAALLY long without multiplication
 
Feelsgoodman
 
@Qwerp-Derp Logicode on TIO is latest version now :D (plus command line arguments work now, you can put -a in Arguments to see the bad Astify function)
 
6:58 AM
@Dennis Is my language Woefully, and it's corresponding interpreter, good enough to be on TIO? If so, could you please add it?
@Qwerp-Derp Please use comments to suggest golfing tips
 
@Qwerp-Derp ?
 
7:15 AM
halp how do i run pMARS on mac (for core war)?
 
@DestructibleWatermelon I'll take a look tomorrow. Kinda late here...
 
7:30 AM
from esolangs.org:
> Hello! Your Brainfuck instruction renaming has qualified you for category 5 brickbraining! This means that after the initial brickbraining, we will put your brain back into your head, then brickbrain you again. This process will continue until your brain ceases to be recognisable as such. Have a grotesquely unpleasant day.
@Dennis thanks!
 
Well, I've solved codegolf.stackexchange.com/questions/82938/… in Checkers. Now time to actually format all the images...
So I can actually post the thing.
 
Is there going to be solutions in a lot of boardgames and stuff?
I ought to answer that question in woefully...
also, any actual program in woefully looks different to a constant output one.I haven't written one, but they do.
 
I mean, we have chess and dominos. We need to make this a thing!
 
7:46 AM
How about nuclear warfare on that challenge. "The only winning move is not to play unless B and A are both true"
@StevenH. Do it!
 
I have a challenge idea but I don't think my English is enough to write it, can you help writing plz?
 
um, ok!
also who downvoted the sandbox, really...
 
I made a (really ungolfed) C program (related) and i want to make other people golf it :p
 
@betseg sandbox it as well as you can and ask for help with the language in that post.
 
just realised a really dumb bug in my code ._.
 
7:59 AM
Hello
 

« first day (2047 days earlier)      last day (2807 days later) »