« first day (1844 days earlier)      last day (1913 days later) » 

12:00 AM
@VoteToClose You're going to name your child Vitsy... XD
@CᴏɴᴏʀO'Bʀɪᴇɴ Yeah. What about it?
> Your mother should've golfed you better
12:09 AM
...remind me to use that later in life. >.>
is forEach or for(var i = 0... generally faster in JS?
@Calvin'sHobbies forEach is probably easier, but you're over optimising if you care
there's also for of if you're into that kinda thing and map has pretty much the same functionality if you're golfing
for of is ES6 only
>not using ES6
12:18 AM
Looks like no one supports ES6 100%
I know it's just sad
I was red across the board. o-o
I was only green 3 times, all of which were in appendix b.
Actually, no one has 100% ES5, but most are at 98% kangax.github.io/compat-table/es5
> Zero-width chars in identifiers
12:26 AM
Seems like a painful feature
I got all but one on max.
Got all!
Date.parse produces NaN for invalid dates
fun game
bonus points to anyone who writes an OCR bot for it
I forgot what R is ._.
12:34 AM
@Calvin'sHobbies Thanks :) I'm very much in favour of keeping the popularity contests, but I'm also aware that they have flaws and I'd like to see continued discussion about potential improvements. Ideally we'd have a way of measuring the popularity without using Q&A votes. On golf challenges I upvote solutions with good explanations - the voting is independent of the winning criterion. With pop cons voting for different purposes are all combined. I still think it works surprisingly well though.
(Just Fanatic but still)
/me quits while he's ahead
@GamrCorps Congrats! :)
@GamrCorps Gold is gold. Nice work :)
Q: Auto BATCH golfer

Cᴏɴᴏʀ O'BʀɪᴇɴI love BATCH, despite its shocking lack of functional commands, despite even due to its lack of non-integer support. Why? Because this works: SET var=SET %var% i=0 This would evaluate to: SET var=SET SET i=0 Fantastic, isn't it? I've used this technique in a BATCH program before, because it...

12:36 AM
@trichoplax Thank you!
@CᴏɴᴏʀO'Bʀɪᴇɴ seems like someone could PR in that pretty easy
I wrote a fun little operator overloading script a few days ago
In what language?
javascript X)
12:43 AM
With symbols?
javascript's internals are always fun to play around with
it's not reaaaaaally overloading them, just overloading the internals that convert non primitives to primitives
you know, {} + []
You can overload the abstract equality
yeah, same thing
I made a script for cookie clicker not too long ago that really exploited the overloading capabilities of JS
@xnor Do you already have a solution yourself? :P
12:46 AM
@Sp3000 no, i was lazy
I wrote some code that fixed the {} + [] but meh
Array.prototype.toString = function(){ return JSON.stringify(this) }
Object.prototype.toString = function(){ return JSON.stringify(this) }
that's a really good way to have a circular JSON loop
gee gee
Someone could write a stringifying library
12:53 AM
you can also use valueOf instead
except you're effectively screwing object types
@Quill Array.prototype.toString = Object.prototype.toString = function(){ return JSON.stringify(this) } is golfier.
And it's cooler.
@ӍѲꝆΛҐӍΛПҒЦꝆ and ES6 dependant
Remove dat whitespace
@Quill Are you sure?
yeah, should be
12:55 AM
Marky wants to eat a helicopter
you can chain variable declarations in ES5.
I know it.
For sure.
@xnor Basic naive solution is very very slow :/ (213 ungolfed)
@ӍѲꝆΛҐӍΛПҒЦꝆ even better: eval(`Array${t='.prototype.toString='}Object${t}z=>JSON.stringify(this)`)
Trying to run on f(3,3) to see if it actually works, but it's taking a while
@Downgoat That's too much.
12:57 AM
@ӍѲꝆΛҐӍΛПҒЦꝆ you can never golf too much :P
Owait you just used my suggestion at codegolf.stackexchange.com/a/70340/41247
I knew it would come in handy somewhere!
this was my string builder class
1:10 AM
@Dennis: for the word tschüss, is the 't'/'s'/'ts' pronounced at all? I imagine it kinda is, but Duolingo makes it sound like "chase".
@El'endiaStarman You do pronounce chase with a t at the beginning, you just don't write it. sch is pronounced like sh is in English.
okay, cool
I like how there are at least three people in here (over the course of a day) who know German. :P
Is there an auditory difference between geschehen and geschen?
@MartinBüttner Any word on Best of PPCG?
@AlexA. ( ͡° ͜ʖ ͡°)
1:22 AM
Holding steady at 10.6 qpd
Y'all better not take as long to announce the winner as it does for us to graduate.
Hey @isaacg quick Pyth question
B can be used to break out of a # loop right
Low bar, I know, but still.
@El'endiaStarman Maybe we're timing it so that they coincide! Yeah, that's definitely what we're doing...
@El'endiaStarman ha
1:23 AM
llama@llama:~$ pyth -dc '#B'
==================== 2 chars =====================
while True:
 except Exception:
-d shows the transpiled code?
Ah. Cool.
Yes, very handy debugging tool
The debug checkbox on the website does the same thing.
Q: An OEIS Lookup tool in Python

DowngoatI'm from PPCG so I was making an esolang and I decided to write it in Python. Eventually it went from an esolang to an OEIS (Online Encyclopedia of Integer Sequences) lookup tool. I'm very new to Python. Essentially this program takes an OEIS sequence number (e.g. 55 for sequence A000055) and t...

one more soul to the list
1:26 AM
@Downgoat TRAITOR
@Dennis: Morgen sounds like morn in English. Is the g completely unvoiced?
@Doorknob D:
I was about to say, we all know the one who yells "TRAITOR!" is the one who dies.
1:27 AM
Feb 11 at 1:04, by Calvin's Hobbies
Let's be friends with Code Review.
@El'endiaStarman No, it should sound like morgue + en.
Can't hear it in Duolingo's sound file. Bad Duolingo.
> # >:D I'm sorry but I have to use RegEx to parse HTML
@Downgoat He said friends, not active members.
1:31 AM
burn baby burn
(Disclaimer: please don't burn babies.)
oh wait I'm late
@El'endiaStarman what a casual
Sometimes I like being casual.
1:33 AM
The <center> cannot hold... — Phrancis 44 secs ago
> This site is for general programming questions, not programming contests or challenges.
Wait a second...
(I almost typed that in a comment just now >_>)
interestingly enough, I'm wearing my regex unicorn tshirt today
I wore that one yesterday
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

Jan 13 at 0:38, by Doorknob
user image
1:36 AM
TIL: King of Prussia, PA is a real city in Pennsylvania.
A: 1-up your average quine

ӍѲꝆΛҐӍΛПҒЦꝆ𝔼𝕊𝕄𝕚𝕟, 11 chars / 14 bytes ⟮ɕṡ+ᶈ0)ď⧺ḁ; Try it here (Firefox only). I'm not sure if copy blocks ⟮ (which, quite literally, "copy pieces of code") are considered "reading source code," but if invalid, I'll be willing to delete the submission. Explanation Quine framework: ⟮ɕṡ+ᶈ0 ⧺ḁ incre...

Q: Program for accepting n inputs and their values from user

radzI need a program that accepts desired number of inputs (n ) from user and allows user to enter value for all of them.

King of Prussia is a census-designated place in Upper Merion Township, Montgomery County, Pennsylvania, United States. As of the 2010 census, its population was 19,936. The community took its name in the 18th century from a local tavern named the King of Prussia Inn, which was named after King Frederick II of Prussia. Like the rest of Montgomery County, King of Prussia continues to experience rapid development. The second-largest shopping mall in the United States in terms of space and size (nearly 3 million square feet), the King of Prussia Mall, is located here. Also located here is the h...
@NewMainPosts 37 seconds :/
Getting slower and slower...
@ӍѲꝆΛҐӍΛПҒЦꝆ I'm guessing the downvote is for the copy-block?
1:37 AM
Doorknob got two patches. I only got one ;;-;;
Well, doorknob is a mod...
I don't see why that would make a difference
Mods are people too @CᴏɴᴏʀO'Bʀɪᴇɴ
I thought mods got another one :P
@Quill hahaha
1:41 AM
\o/ I found a jolf quine!
Made me scroll back up to see what you were talking about, and I noticed that TI-84 Silver Edition calculator. :D
look at this guy, thinks mods are humans
@CᴏɴᴏʀO'Bʀɪᴇɴ Found one? Like, you dug it up?
Jan 13 at 0:41, by Doorknob
that would be my math homework in the background :P
Did you mine for it?
1:42 AM
lol, nice
@CᴏɴᴏʀO'Bʀɪᴇɴ Post it!
@VoteToClose It was always there, it just hadn't been discovered yet ;)
@ӍѲꝆΛҐӍΛПҒЦꝆ Oh, right! Profit!
I'm hoping it's nontrivial.
That looks so suspicious.
1:43 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Are languages created or discovered? :P
A TeaScript quine is longer than a JavaScript quine :(
> Step 1: make programming language.
> Step 2: find quine.
> Step 3: profit.
@El'endiaStarman Both. At the same time.
@ӍѲꝆΛҐӍΛПҒЦꝆ q is the quine function. Q is the double function on strings.
^ shortest known Snowman quine
probably because nobody else is crazy enough to learn Snowman :D
1:44 AM
@Doorknob mods are superhuman beings capable of interdimensional flight
@Quill better, thank you :P
@CᴏɴᴏʀO'Bʀɪᴇɴ Oh... btw, toSource is no longer supported in Chrome. Web interpreter no longer works in Chrome.
When I run code, an error is thrown: callback.toSource is not a function.
1:47 AM
A: An OEIS Lookup tool in Python

Quillimport*: Please avoid importing all modules at all costs. Import each module you use separately Regex ಠ_ಠ Regex is evil, the worst. seriously. stop it. right now. kill python.exe right now and change it. You use beautifulsoup, a dom parsing library, literally a few lines later, but you choo...

only twenty minutes
and that gave me [bronze-badge: ]
> Instead of using % (myString), you should use string.format
f-strings... one day...
waits for 3.6
there is an actual reason, besides not using outdated ways of concatenation
@CᴏɴᴏʀO'Bʀɪᴇɴ Yes.
1:49 AM
@ӍѲꝆΛҐӍΛПҒЦꝆ Well... f*** chrome.
Speaking of bugs in Jolf, I get these errors in the online interpreter:
oh, it's suggested by pep8. right
[Error] SyntaxError: Unexpected token '*'. Expected an opening '(' before a function's parameter list.
[Error] ReferenceError: Can't find variable: isValidISO88597
@Downgoat Just a pedantic difference ¯\_(ツ)_/¯ — Cᴏɴᴏʀ O'Bʀɪᴇɴ 1 min ago
Pedantic? o-o I do not think this word means what you think it means.
1:51 AM
@VoteToClose yeah....
> excessively concerned with minor details or rules; overscrupulous.
@CᴏɴᴏʀO'Bʀɪᴇɴ And it all came crashing down.
@CᴏɴᴏʀO'Bʀɪᴇɴ Persnickety?
@Downgoat o_o
What browser are you using?
@CᴏɴᴏʀO'Bʀɪᴇɴ Safari 9.0.1
@Downgoat Nice. ;)
1:51 AM
Apparently, I need to find a third quine for ESMin that doesn't use copy blocks >:|
@VoteToClose :D
	Math.γ = {};
	try {
		// ES6 code tester
		Math.γ.c = function* collatz(val){
			var step = 0, vals = [];
			while(val !== 1){
				if(val % 2 == 0) val /= 2;
				else val*=3, val++;
				yield val;
			yield [step,vals];
			return ret = {done:true};
		Math.γ.p = function* pythagTriple(){
			var m = 2, n = 1, t = [], a, b, c;
				a = m*m-n*n, b = 2*m*n, c = m*m+n*n;
				// check for duplicates
This should work... >:|
Does python have like a from re import [sub, findall]?
I'm still waiting for another golfing language to implement a Scrabble dictionary.
I'll probably be waiting forever tho
from re import sub, findall
1:53 AM
but I'm not supposed to use Regex...
It's important to import the thing you're not supposed to use efficiently
> Try using Python's style guide, PEP8
what the heck does PEP8 stand for
Python Enhancement Proposal? I think
PEP8 is this one, specifically
1:55 AM
Because Python really does need a heckuva lot of enhancement.
@Sp3000 Indeed
It's funny seeing Conor and Downgoat ask how to do <pseudocode> in Python and get an answer that's almost exactly that. :P
> ♫ Let's all hop on the code review bus... ♫
A: An OEIS Lookup tool in Python

Cᴏɴᴏʀ O'BʀɪᴇɴRedundant code print """This is the OEIS lookup tool You haven't entered the sequence""" % (LANGNAME) This can easily become print "This is the OEIS lookup tool\nYou haven't entered the sequence" You accidentally left some residual code from Putt in there. ♫ Let's all hop on the co...

29 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
@Downgoat He said friends, not active members.
@El'endiaStarman One correction isn't exactly active... ^^"
2:00 AM
Hopping on that bus right now
It's always good to do oneoff answers on other networks
I have three 30+ answers on networks I don't actively browse
@Sp3000 choo choo!
@PhiNotPi ಠ_ಠ
but I'm still parsing HTML with regex
2:02 AM
then it's not fixed
thanks, buddy
in The 2nd Monitor, 14 secs ago, by Mat's Mug
in the end, all PPCG folks will be converted. all of 'em.
@Quill We must rebel!
We should be the ones graduating, not those people over there at Code Review!
A: Golf you a quine for great good!

Cᴏɴᴏʀ O'BʀɪᴇɴJolf, 4 bytes Q«Q« Q double (string) « begin matched string Q« capture that This transpiles to square(`Q«`) (I accidentally did string doubling in the square function), which evaluates to Q«Q«. Note that q is the quining function in Jolf, not Q ;).

I can't decide whether it's more of a sin to be a CR regular here, or be a PPCG regular there
2:06 AM
the 2nd monitor is so ghetto
hey I can downvote on CR now... >:3
@CᴏɴᴏʀO'Bʀɪᴇɴ Hehe, strategic downvoting... Hehe...
@ӍѲꝆΛҐӍΛПҒЦꝆ shhh there's one of them in here--we are no longer safe
uh, okay
Oh, um... nothing happened.
You can't see anything.
It's all just an illusion.
I don't think I can parse the OEIS html with a html parser
<tr> <td>0</td><td>1</td>
<tr> <td>1</td><td>1</td>
^ That's some messed up HTML
2:14 AM
Where's the </tr>?
@CᴏɴᴏʀO'Bʀɪᴇɴ There isn't...
Pssh, who uses tables anymore? It's all about them divs and stuff amirite
divs are so 2010
section is the new div
sections are so 2015. SASS is the new section.
2:16 AM
Naw dude this Bootstrap stuff is the real deal
The only way to vertically center text is still display: table so I don't think tables are dead yet
@Downgoat Naw, man. Flexbox.
@Quill That's only for phones, dude. Although Material Design's pretty chill.
@ӍѲꝆΛҐӍΛПҒЦꝆ Whaaaaaatttttt, when did flex get good support
2:17 AM
@Downgoat I told you, flexbox is the solution.
@ӍѲꝆΛҐӍΛПҒЦꝆ s/flexbox/jquery/ :P
@Downgoat triggered
@Downgoat maybe you should describe that in a comment, instead of writing an absolutely useless one >_>
those libraries are specifically built for screwed up html
2:20 AM
I once wrote an entire website with absolutely no CSS, just jQuery
Like instead of width: 100% I would do $(div).css("width", $(body).width() + "px")
@Downgoat You are officially sub-human in my eyes.
@CᴏɴᴏʀO'Bʀɪᴇɴ it's okay, since then I've mended my ways
@Downgoat *your past self is
I don't know how to CR, but I assume this is how to CR
2:24 AM
Say your code looks like this:


This is equivalent to:

		if(c()) setTimeout(arguments.callee,1,c);
		else codeC();
yeah, pretty much
you could move codeC out of that loop as well, if you wanted
No you couldn't...
    if(c()) setTimeout(arguments.callee,1,c);
Tabs ಠ_ಠ
@Quill Nope. The first function will execute, then the second.
2:28 AM
oh, yeah.
perks of setTimeout
You will notice that this (function(){setTimeout(arguments.callee,2)});alert(3) will alert instantly.
how do I print to stderr in python
raise "the roof"
@Quill but that will throw an error
not just print to stderr
Q: How to print to stderr in Python?

wimI've come across at least three ways to print to stderr: import sys print >> sys.stderr, 'spam' sys.stderr.write('spam\n') from __future__ import print_function print('spam', file=sys.stderr) It seems to contradict zen of Python #13 †, so what's the preferred way to do it? Are there an...

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: exceptions must be old-style classes or derived from BaseException, not str
import sys
print(<blah>, file=sys.stderr)
Either of the top two here are good for just printing to STDERR
2:29 AM
CR font makes i's look like l's
  File "<stdin>", line 1
    print("test", file=sys.stderr)
SyntaxError: invalid syntax
@El'endiaStarman is that python 3?
You need the from __future__ import print_function if you're choosing that one
Because Python 2
@Downgoat Yes, Python 3. Use Python 3 when possible.
2:31 AM
> from __future__
@AlexA. Nuke this?
A: Golf you a quine for great good!

Tomascat, 0 - ∞ characters UNIX cat is a programming language with no syntax. The output of any program in cat language is the source code itself. "you can't just read the source file and print it" I am not doing that! It's the language itself, it's the cat interpreter who does it.

There's also from __future__ import braces, for programmers just switching over from C
@Sp3000 does that mean I don't have to do this indenting crap?
if so that's awesome
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance
2:32 AM
@Downgoat ಠ_ಠ
Can I do this: print "Could not find sequence A%06d" % num with format
If you don't want to name a variable...
>>> num=314; print("Could not find sequence A{0:06d}".format(num))
You don't need 0:06d, :06d works fine (unless you want to reuse num in multiple places)
Oh, didn't think to try. You're right.
You do need the colon though.
2:37 AM
"{0:06d} times {0:06d} is {1:06d}".format(9, 81)
Really need it for getting waste out of your body.
Wait, wrong colon.
@Sp3000 There's a nice anarchy problem out: golf.shinh.org/p.rb?1st+2nd+3rd+4th
@Sp3000 three of us are at 64, but i feel like better should be possible
... ah. This looks familar (Lembik posted the same thing a few days ago)
2:42 AM
how do I split a string in python
"hey how are you".split(" ")
Vihans-MacBook:OEIS-Lookup vihan$ "asdf".split("s")
-bash: syntax error near unexpected token `"s"'
that's not python
2:43 AM
no arg also allowed
> -bash syntax error
@Doorknob Face it: we're often better than Google.
Eh. I'd say we're equivalent to Bing or Yahoo! at best.
@AlexA. Google >> Bing >>> Yahoo.
@xnor What makes you think 64 is non-optimal?
2:45 AM
@Sp3000 Because they released the Gamecube after 64. Surely there was room to improve.
Is there like a re.findall that only returns one match?
Which match do you want?
A: Golf you a quine for great good!

QuillJavaScript, 8 bytes Symbol() Uses Symbol.

the first one
2:46 AM
You could do a findall[0]
But I'm sure there's a specific way to do it
@Downgoat I think that'd be re.match.
Why the downvote on that??
Probably because a REPL quine is trivial
Anyone remember off the top of their head how to do variable size arrays of variable length char arrays (i.e. strings) in C
Doesn't "use strict" count as well?
2:50 AM
@Liam I suck at C but aren't arrays of strings just arrays of pointers so you would just divide by the size of the pointer
@Liam I don't really know C, but I guess that'd be a pointer to an array of pointers to arrays of chars.
yeah its char ** my_array
but I'm trying to remember how to do all the malloc and free
Why does re.match(r'(\d)', 'a1b') not return anything
so that I can push random strings in there
@Liam ¯\_(ツ)_/¯
2:52 AM
--> import <string> and compile as C++
If you're using C++, just use std::vector<std::string>
If i'm not able to figure it out I might have to
@Downgoat I was a bit wrong, actually. match looks for the pattern at the start of the string.
>>> re.match(r'(\d)', 'a1b')
>>> help(re.match)
Help on function match in module re:

match(pattern, string, flags=0)
    Try to apply the pattern at the start of the string, returning
    a match object, or None if no match was found.

>>> re.search(r'(\d)', 'a1b').group()
oh okay thanks
yo @Downgoat would "use strict" count as well?
2:55 AM
@Quill for what?
that quine question
Q: Golf you a quine for great good!

Rafe KettlerUsing your language of choice, golf a quine. No cheating -- that means that you can't just read the source file and print it. Also, in many languages, an empty file is also a quine: that isn't considered a legit quine either. Points for: Smallest code (in characters) Most obfuscated/obscure s...

that one?
Woot, 17k.
@Quill No because it prints use strict instead of "use strict"
2:58 AM
good night people
ah, okay
night @CᴏɴᴏʀO'Bʀɪᴇɴ
Goo dnig ht

« first day (1844 days earlier)      last day (1913 days later) »