« first day (1915 days earlier)      last day (2914 days later) » 

5:04 PM
@aditsu IIUC?
 
@Agawa001 second graph?
 
@zyabin101 IIRC with Understand not recall
 
@Agawa001 What did you do? :3
 
5:05 PM
@MartinBüttner turned it upside down i think
 
Insurrection Inoculates Unaddressed Condom (random backronym)
2
 
comparing to this
 
FRUITW'd /o\
 
@Agawa001 Basically, I applied oeis.org/A059893 to the input before computing the sequence as usual
so it's a reordering of the terms within each bit-length
 
5:08 PM
@zyabin101 wat
 
@aditsu Fastest runner up in the West.
 
⊙_ʘ
 
@aditsu Basically o_O with added pupils.
 
G = """
expr = factor ([+-] factor)*
factor = primary ([*/] primary)*
ident = [a-zA-Z_][a-zA-Z0-9_]*
number = [0-9]+
primary = "(" expr ")" / ident / number / "-" primary
"""

grammar(G).parse("5+3*5-(6+5)/3")
what should this return?
 
@zyabin101 thanks for explaining
 
5:11 PM
@orlp First rule is expr, so we follow it.
 
pegjs returns this monstrosity:
[
   [
      [
         "5"
      ],
      []
   ],
   [
      [
         "+",
         [
            [
               "3"
            ],
            [
               [
                  "*",
                  [
                     "5"
                  ]
               ]
            ]
         ]
      ],
      [
         "-",
         [
            [
               "(",
               [
                  [
                     [
                        "6"
                     ],
                     []
don't think that's particularly useful
 
@orlp ⊙_ʘ We should somehow flatten it.
 
2
Q: How compatible are my strings?

ZgarbIntroduction Consider two strings A and B of the same length L, and an integer K ≥ 0. For the purposes of this challenge, we say that the strings are K-compatible, if there exists a string C of length K such that A is a contiguous substring of the concatenation BCB. Note that A is a substring of...

 
I, naturally, golfed it:
[[["5"],[]],[["+",[["3"],[["*",["5"]]]]],["-",[["(",[[["6"],[]],[["+",[["5"],[]]]]],")"],[["/",["3"]]]]]]]
We should somehow get this:
["5","+","3","*","5","-","(","6","+","5",")","/","3"]
 
@zyabin101 no we shouldn't
that's just splitting the input string up character by character
at that point the parser added no new information
(the point of the parser is to turn the unstructured input in some structure)
 
5:18 PM
Then idk how we should use the monstrosity
The second best way would be use it as is.
I'm now officially unrelated to that thing. ¯\_(ツ)_//¯
Poor shrug emoticon.
 
@orlp pedantics :P
 
Javascript experts - is this a proper quine? If I understand it correctly, its merely getting the code for the function d by treating d as a string
 
I think it's a fairly standard quining technique in JavaScript, but I find function-only quines a bit dodgy in general.
 
I don't really see how it is much different than reading source from a file
 
Looks like it's using Function.toString() which I think is bad
 
5:29 PM
it's stringifying source code
CJam/GolfScript quines work no different (except they're full programs)
 
Right but those are defining a completely separate block and stringifying that
This is stringifying itself essentially
 
It's a string representation of the function, not the program's source code.
 
so, in psuedo-code, is this a valid proper quine:
 
The function is the program here.
 
function myfunc() {
    print(get_source_code_string(myfunc))
}
 
5:33 PM
It only gives the function body though
 
It would be something like function d(){console.log("function d(){"+d+"}")}
Actually..
 
It's like (sort of) a stack based language wrapping around the line to capture a string.
 
I just tested it in chrome and it gives the whole function
 
@quartata yes
 
5:34 PM
But for anonymous arrow functions it gives the body
a=x=>a+"" yields x=>a+""
 
just pulling up my proper quine definition (which is admittedly not perfect), if it stringifies the entire function it wouldn't count, if it stringifies only the body it would.
 
@MartinBüttner This stringifies the entire function
 
hmm, that seems like a pretty fine line
 
Although I don't see why it wouldn't count if it only does the body since it's trivial to just concatenate the rest on
 
enter PhiNotPi
 
5:36 PM
I like the "payload capable" definition. It works in this case.
 
@quartata yes
 
@PhiNotPi exeunt
 
@CᴏɴᴏʀO'Bʀɪᴇɴ But a quining built-in is also payload capable
 
I had an idea for "detecting" quining built-ins at some point which would be, there needs to be at least one position inside the program where you can insert a no-op such that the output of the quine doesn't change
 
@quartata But this isn't a quine built in. So that's kinda irrelevant for this case.
 
5:38 PM
(a quining built-in would just read that no-op since it reads everything, whereas in a proper quine there's some part that is encoded somewhere else, so changing it only in one place won't change the output)
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I feel like it's pretty similar.
Function.toString(), the underlying function, returns the code of a function (in this case a program)
 
@MartinBüttner that's a nice idea. but you could just insert semicolons in the beginning of the js program--is that what you intend to do?
@quartata Granted, but do you honestly think that the toString functionality was for quining?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ To be honest I never know with JS
 
@CᴏɴᴏʀO'Bʀɪᴇɴ well, it's not part of the function any more then... if you really want a function quine, then I'm only considering whether you reproduce the function, not any code that isn't part of it
 
I'm just procrastinating on studying for my finals.
 
5:40 PM
I'm more worried about inserting two spaces inside function f()
 
@MartinBüttner oh, I see.
@quartata That's a terrible response ._.
@MartinBüttner It retains spaces on IE
 
@MartinBüttner this would certainly work for this shell quine (which I think is proper): z=\' a='z=\\$z a=$z$a$z\; eval echo \$a'; eval echo $a
 
@DigitalTrauma "work" meaning?
 
@MartinBüttner I mean it would be a good test
 
ah okay
 
5:42 PM
there are lots of places you can insert spaces and not affect the final output
e.g. between the final eval and echo
 
Also, what about the standard quine in, say, Vitsy (and other 2d languages): 'rd3*Z
It's not capable of such a modification, yet is accepted as a quine.
 
why isn't it?
(as in, how does it work?)
 
Because the ' wraps around to the beginning of the program to finish recording a string--anything in the source code is thus recorded
 
if it's 2D, add a second line?
otherwise, I could relax it to "is no longer a quine", because then you can also insert a no-op at the start. that will change the output, but it's no longer a quine.
 
That's not part of the program, as there is no method statement to jump to another line. (It's 1D)
"No longer a quine" might be best
Well, maybe not
 
5:47 PM
Make sure to add that the addition must be syntatically valid
 
Consider a language that has a function q (quine), p prints, and x (quit): qp is a quine, but xqp is not; it still cheats.
 
yeah, that's why I never added it to the post...
 
Yeah, then that's a problem. So is then the case that the Vitsy quine cheats? It's basically the CJam quine, requiring the extra stuff to generate other parts.
Maybe "if at any time the entire source code is gotten during execution, it is invalid."
 
Why not just part of it?
 
5:59 PM
@EᴀsᴛᴇʀʟʏIʀᴋ HAI
 
@CᴏɴᴏʀO'Bʀɪᴇɴ sounds weird. most quines build up the entire source code before printing it
 
Yeah, but quine builtins do this
unless if people build sequential quine builtins >_<
\o/
 
@QPaysTaxes \o/ How do they work?
 
@QPaysTaxes Yup!
 
6:06 PM
BTW, what is it called when you take [1, 2, 3, 4] becomes [[1, 2], [2, 3], [3, 4]]?
 
> Quine, quine, everywhere a quine
Blockin' out the scenery, breakin' my mind
Do this, don't do that, can't you read the quine?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ CJam calls them overlapping slices but I can't find it called that anywhere else.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Maybe "entire source code at once?"
 
@NinjaBearMonkey cool
@quartata that's what I meant, oops. but then there is the problem of sequential quine builtins
 
@CᴏɴᴏʀO'Bʀɪᴇɴ "get overlapping substrings of length 2"?
for some reason, in Ruby the function is called each_cons
 
6:15 PM
o-o huh
@quartata e.g., q pushes the first half of the program, Q pushes the last half of the program, + concats, and p prints, then qQ+p is a quine.
 
yeah, but non-overlapping substrings are also consecutive :P
 
to be honest, I still fail to see the distinction between quine builtins (regardless of whether they return all or part of the source code at any time) and simply reading source from file
 
@DigitalTrauma yeah quine built-ins are just as cheat-y, I think
 
I wish we could just classify it as "I know it when I see it" :/
 
and the same goes for function.toString() sorts of things
 
6:18 PM
Oh, no dip.
 
Oh, how about this instead: Just stop the quine challenges. They're played out.
13
 
@QPaysTaxes Support.
 
@Geobits well there's that ;-)
 
@Geobits Oppose.
 
6:20 PM
"WRITE A QUINE THAT QUINES A QUINE QUINE QUINE AHHHHH"
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Yo dawg ...
 
Quining is just another mostly pointless restriction to make a challenge less trivial.
 
write a quine that decides whether a quine is proper or not
 
@zyabin101 There are 111 questions tagged [quine] right now. How many more variations do we need? Many are trivial variations anyway.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Did you see my announcement for a new nested programs challenge?
 
6:22 PM
I've been trying to come up with some not-quite-quine challenge like Print a Negative where it's best not to use the standard quine techniques, but it's pretty tough to come up with something that also doesn't have trivial solution.
 
nobody ever got paid for writing a quine, or even discussing them at length. GET BACK TO WORK, DIGITAL TRAUMA!
 
where i was winning for a whole year and then Dennis outgolfs me :/
 
1 minute later, the "stop the quine challenges" message gets 4 stars. >:|
 
1 min 4 stars is actually pretty slow
 
@Optimizer it's what he does
 
6:23 PM
@zyabin101 yes :)
 
f him.
I mean, fire him..
from his outgolfing job.
 
He can't--he's immortal Outgolfer for Life
 
he's AOL?
An Outgolfer for Life
 
Ooo, maybe I can get 25 free hours of his time to help me with my golfing.
 
6:25 PM
IOL :P
 
Was someone talking about matching (unary) Fibonacci numbers with a regex earlier? regex101.com/r/pO2wL7/3
 
@MartinBüttner I did.
 
> In theory, there is no difference between theory and practice. But, in practice, there is. -Jan L. A. van de Snepscheut
2
 
@zyabin101 Do you know what flavour that uses?
 
Probably JS's
 
6:32 PM
@MartinBüttner Nope.
I think PCRE.
 
nope
looks like ECMAScript
I doubt it's possible in ECMAScript
 
23 points: ^xx?x?$
 
@quartata Just writing to let you know I haven't forgotten your program! I have some comments to write on it, but I'm busy preparing for a lightning talk I'm giving tomorrow, so I'll try to do it after this weekend. :-)
 
@MartinBüttner How can I make it work with Retina?
 
@zyabin101 this uses it to filter the input and then converts each remaining number to decimal for confirmation:
http://retina.tryitonline.net/#code=R2BeKCg_Ol58XDEpKF4xfFwxXDJ8KD89KDEkKSkpKSsxJAolYC4&input=MQoxMQoxMTEKMTExMQoxMTExMQoxMTExMTEKMTExMTExMQoxMTExMTExMQoxMTExMTExMTEKMTExMTExMTExMQoxMTExMTExMTExMQoxMTExMTExMTExMTEKMTExMTExMTExMTExMQoxMTExMTExMTExMTExMQoxMTExMTExMTExMTExMTEKMTExMTExMTExMTExMTExMQoxMTExMTExMTExMTExMTExMQoxMTExMTExMTExMTExMTExMTEKMTExMTExMTExMTExMTExMTExMQoxMTExMTExMTExMTExMTExMTExMQoxMTExMTExMTExMTExMTExMTExMTEKMTExMTExMTExMTExMTExMTExMTExMQoxMTExMTExMTExMTExMTExMT
 
6:36 PM
Also, I had to use a link shortener for this.
 
@MartinBüttner when the sequence begins with a significant zero (left direction) how is it approached , because the sequence is supposed to be rotated to the left then the pointer would move to the left rather than the usual direction ?
 
@Agawa001 it never starts with a significant zero.
 
^(xx?x?|x{8}|x{5}|x{13}|x{21}|x{34}|x{55})$, 47 points
 
6:38 PM
iCheated
 
It's probably the shortest way, hardcoding it
 
@MartinBüttner Perfect! Press Enter to go to the next level (or continue golfing your regex).
 
The former
 
PowerShell interprets it as one token. To get a comment, you need a space.
 
@QPaysTaxes Then the latte.
 
6:41 PM
@QPaysTaxes the former, you lazy person
:P
 
I say the former too.
 
If it's otherwise delimited (parens, brackets, quotes, etc.), then it's properly a comment.
Like (abc)#def
So, because PowerShell is great and does all things, you should follow that convention.
Well, Ruby is also great and does all things.
 
I wonder what the golfiest natural language statement meaning "Alex is wrong" is. I think it's Haitian Creole: Alex mal
 
@quartata Or child English: "Alex bad"
 
Natural languages
 
6:45 PM
@QPaysTaxes Or Cheddar: alex = false
 
Yeah, wouldn't unAlex mean 'not Alex' and not necessarily "Alex is wrong?"
 
I can't reply to quartata because he hates me.
 
We've been over this >_>
 
@TimmyD If "Alex" is wrong, then "not Alex" is correct.
 
8 bytes in Creole is pretty hard to beat IMO. stative verbs fwiw
 
6:47 PM
@QPaysTaxes I had thought they got rid of "bad" words, so instead it was "unGood"
It's been a long while since I read the book, though, so I could be unRemembering.
 
@quartata texting: alx=wrng or alx=bad or alx=bd
Definitely a natural language
more bytes
 
Ah, gotcha.
 
I was tempted to do a "how to say alex is wrong in 100 languages" but I just don't know that many languages
 
6:54 PM
I read an interesting statistic that the US Census Bureau estimates there are 350 languages spoken in homes in the United States
That's just mind-boggling.
 
Whoa. I didn't even know there were that many natural languages
 
I think the current estimate is around 6,000 natural languages, and decreasing.
 
Wow.
Go go gadget Euro-colonization. :-/
 
in 3000+ languages there is no new testament.
 
@El'endiaStarman holy smokes
I did not know that
 
7:01 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ This answer says that there are about 2500 languages where some portion of the Bible has been translated to it. The whole thing has been translated into 513 languages.
 
@El'endiaStarman oo, that's cool. nice to know
 
How do you properly blackbox server side validation code when
A) You also have client side validation code, and
B) The submit button doesn't work when JavaScript is disabled
 
the only people with js disabled are old people :P
 
And/or paranoid people.
 
you don't need to worry about them
 
7:06 PM
I agree, but our testers don't like to hear "Oh, we added it just in case. You don't need to test it."
 
Server side validation
 
It's good to have client-side validation to do most of the checking beforehand.
 
mini-challenge: rotate a table/matrix input in any direction once without builtin rotation
 
7:08 PM
That is, after all, something that happens on the client's machines so there's no bandwidth usage and no load on the server for such things.
 
Why does that matter?
 
Which is why you have server-side validation too.
You can ensure a credit card is valid by using client-side validation, which saves the user time and effort when they type it wrong.
 
If the client doesn't disable JavaScript, then it improves the user experience.
If the client disables JavaScript, then it doesn't improve the user experience.
Most people don't disable JavaScript.
The result is an average improvement in user experience.
So yes, there is a real reason to do validation on the client
If you have ever seen a page flicker when you click a button, you know that it isn't as smooth as a message that pops up immediately telling you what went wrong
The goal isn't to make the page work without JavaScript
The goal is to test my server side validation code
I could care less if the page does nothing when the user disables JavaScript. I'd prefer that even.
Developers test things too you know
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Square matrix ?
 
7:14 PM
@El'endiaStarman Relevant link to the LOLCat Bible Translation Project
 
@TimmyD Never would have I thought I'd see this.
And that was a strange way to say that. But grammatically correct, I think?
 
@TimmyD why
 
Ohh, @Rainbolt, you're trying to bypass the client-side validation to make sure the server-side validation is correct, right?
 
@quartata This is the Internet. Ours is not to question why, ours is but to lolcat.
 
And it's not as simple as disabling JavaScript because then you can't even submit it.
Well...um.........hack it? :P
 
7:18 PM
@El'endiaStarman Yes
 
@QPaysTaxes Implementing both makes the number of "bad" calls your server(s) have to process significantly less. Multiply that by thousands of active users, and that's a not insubstantial load.
 
Only thousands ? seems insubstantial
 
I have no idea the workload and didn't want to presume Facebook-levels of usage.
 
We have to support 40 concurrent users. That may not sound like much, but the machine our application lives on reflects the amount of usage it gets.
 
@HelkaHomba added an explanation
 
7:27 PM
Unix epoch?
 
I thought the SQL Server epoch was January 1, 1970. That ended up causing a bug once...
 
@QPaysTaxes 17000.
 
Nah, Microsoft has like 30 different epochs
I only know 3 off the top of my head
 
In the fields of chronology and periodization, an epoch is an instant in time chosen as the origin of a particular era. The "epoch" then serves as a reference point from which time is measured. Time measurement units are counted from the epoch so that the date and time of events can be specified unambiguously. Events taking place before the epoch can be dated by counting negatively from the epoch, though in pragmatic periodization practice, epochs are defined for the past, and another epoch is used to start the next era, therefore serving as the ending of the older preceding era. The whole purpose...
 
.NET uses Jan 1, AD 1
NTFS uses Jan 1, 1601
and Excel uses Jan 0, 1900
 
7:32 PM
@TimmyD lol
 
@QPaysTaxes As I said, 17000.
 
I wonder if we'll have another Y2K problem in the year 3000. I mean seriously... who will remember the mistakes we made 1000 years ago?
Err... I guess it would be more likely to repeat at 2100
That's my new goal in life. Live long enough to witness Y2.1K
Then I can wear a shirt "I survived Y2k and Y2.1K"
Then I can die because I'll be 110
 
Y2.1 patch notes -- fixed two-digit-year bug
 
I didn't survive Y2K, because I was born after it. :P
 
@QPaysTaxes What's happening in 2038?
 
7:40 PM
The Year 2038 problem is an issue for computing and data storage situations in which time values are stored or calculated as a signed 32-bit integer, and this number is interpreted as the number of seconds since 00:00:00 UTC on 1 January 1970 ("the epoch"). Such implementations cannot encode times after 03:14:07 UTC on 19 January 2038, a problem similar to but not entirely analogous to the "Y2K problem" (also known as the "Millennium Bug"), in which 2-digit values representing the number of years since 1900 could not encode the year 2000 or later. Most 32-bit Unix-like systems store and manipulate...
 
I'm just gonna put all the years that I survived on my shirt
It'll have lots of text
Anyone who is my age can buy one when I make it
 
I expect Y2038 to pay for my retirement :-)
 
@Rainbolt and what is your age ... ?
 
3
Q: The Back-and-Forth Sequence

Martin BüttnerImagine a path made up of < and > and ending in a @, e.g. ><>@ A walker starts on the left-most cell. He will traverse the path as follows: If the walker is on a @ cell, he's reached the goal and is done. If the walker is on a > cell, the entire path shifts one step to the right, cyclically,...

 
I awaited it. :D
 
7:45 PM
@NewMainPosts s/walker/zombie/g
 
got fans be like.
 
I wish to do a formula solution.
 
@Optimizer 25
Wait no 26
 
wow, so many of us of the same age.
 
I turned 26 two weeks ago
 
7:46 PM
lol wut?
ok
 
But one: I don't know what is a byte in mathematics, and two: I don't know the formula.
 
@Rainbolt Do you also have that one month after your birthday where you never know how old you are?
 
you are also 25/26 right?
 
@MartinBüttner Last year it lasted for about half of the year
 
7:49 PM
I think this event will ingrain it into my memory for this year
Next year I'll stumble again
 
I had it once when it lasted for about a whole year.
 
@zyabin101 TIL
 
just after I was born.
 
@TimmyD GTYLI
(Good that you learnt it)
 
Agh. I wrote a bunch of validation in JavaScript then I discovered w3schools.com/tags/att_input_pattern.asp
 
7:51 PM
But if a site has no HTTPS thing, what to do?
Like Try it online.
@QPaysTaxes Never! flips table
 
I only use HTTPs for sites I care about. I'm not real worried about someone sniffing my code golf.
 
It sounded to me like a minute ago you were giving everyone in the room a reason to not use it.
5 mins ago, by QPaysTaxes
Also, guys, please link things with HTTPS. It's more secure and it makes my browser stop complaining.
Implying that your browser was complaining
That's a good reason to not use it
I read it correctly. Your browser complains when others link things with http, because you are using https.
So there are two possible solutions to this problem
 
its a good thing
 
@Rainbolt 3
 
Sure, but when someone says there is no point not to use it, and there is at least one point, then I have to correct them.
 
7:57 PM
The third solution, of course, is to nuke it from orbit.
 
Fourth: stop using internet
 
@QPaysTaxes No. If I said "The one point I brought up outweighs your internet security." then I would be saying you should compromise your internet security.
 
@Geobits (V_v)p
 

« first day (1915 days earlier)      last day (2914 days later) »