« first day (2185 days earlier)      last day (2664 days later) » 

wat
12:12 AM
Is there a maximum length for a Stack Exchange chat message?
 
Not when it's multiline
(well, maybe like 2^32 then)
 
wat
Is this a good deal
 
@wat you're looking for a good computer?
 
wat
no
good LGA1150 mini-ITX motherboard
 
oh
I have no idea, then
 
wat
12:20 AM
If I was looking for a good computer, I would build one
 
Does anyone know of a golfy way to swap parens in python? ex.g.: (AA)B->)AA(B
 
wat
@WheatWizard tr
 
@wat I was looking to do this in python
 
wat
@WheatWizard woops, forgot the name
translate
 
@wat Oh yes
 
wat
12:27 AM
@WheatWizard k
 
unfortunately I have to import string
There has to be a more efficient method
 
.translate doesn't require imports, if that's what you mean
 
What is CrazyPython's comment even supposed to mean...
 
@Sp3000 Oh ok thanks
 
Yeah, "(abc)".translate({40:41,41:40}) in Python 3, for example.
@mınxomaτ Which comment is this?
 
12:32 AM
I dislike the fact that being a room owner also disqualifies one from having their messages moderated. — noɥʇʎԀʎzɐɹƆ 2 hours ago
 
@Sp3000 What about python 2 do I still have to import string?
 
No, but the conditions for it to work are a bit more annoying (I know converting to unicode string definitely works, not sure about regular strings)
@mınxomaτ I guess they're thinking about the situation where a RO might go rogue? Otherwise... not sure :/
 
2 hours ago, by Helka Homba
@Mego Moderators are less likely to moderate other moderators as strongly as they would normal users
I think Crazy is asking "who mods the mods?"
 
Anonymous
The users and the mods
 
Anonymous
This isn't a watchmen scenario
 
Anonymous
12:43 AM
@Sp3000 Yes, because that's something that is likely to happen :P
 
Anonymous
"Breaking news: rogue TNB room owner Geobits has gone on a downvoting spree"
 
So business as usual then
 
I don't see how being a room owner would give you any advantage when downvoting
 
*downstarring
 
Anonymous
@ais523 It was a joke. See: his avatar.
 
12:44 AM
downstarring is something everyone should be able to do IMO (but only on posts that are positively starred at the time)
and maybe should have ⅕ the impact of an upstar (like on answers)?
that way, if something gets jokestarred, people could downstar it back off the starboard
 
3
Q: Approximate Brun's Constant

MegoBrun's constant is the value to which the sum of the reciprocals of twin prime pairs (1/p and 1/(p+2) where p and p+2 are both prime) converges. It is approximately 1.902160583104. Given a positive integer N, approximate Brun's constant by summing the reciprocals of the twin prime pairs where bo...

 
The true beauty of code written in Wolfram Mathematica:
SortBy[Map[
  FromDigits, {#[[1]], #[[2, 3, 1]]} & /@
   Select[Import[
       "http://stdkmd.com/nrr/wanted.htm", {"HTML", "XMLObject"}][[2,
      3, 2, 3, 4, 3, 8, 3, 1, 3,
      2 ;;]], #[[3, 6, 3, 1, 3, 1]] == "Free to factor" &][[All,
    3, {1, 2}, 3, 1]], {2}], #[[2]] &]
 
1:00 AM
Try not to post random code snippets without context :P
 
Anonymous
@ais523 What do you mean by improvable wrt your Brun's Constant answer?
 
@Sp3000 The tag "The true beauty..." was supposed to be sarcastic
 
@quartata may I ask how in Pytek you did implementation of a > b > c? Did you handle this at compile-time or something else?
 
@LegionMammal978 Yeah, but you haven't actually said anything about what it's meant to do or why it's sarcastic, so I'm sure it went over most peoples' heads
 
@Mego fewer bytes
 
1:05 AM
@Sp3000 And that is an excellent demonstration of why I can't social
 
I know Mathematica and it also means nothing to me...
 
@Downgoat You mean chained comparisons?
I'd have to check. It might be a sugar node
but yes it is a parse time thing
 
@quartata Yes
Random Lex/Flex question: What is difference between %{ ... %} and { ... }
 
1:21 AM
Not sure why you're asking how we implement it since our parser is totally different from yours :P
 
I was just wondering if at parse-time a > b > c should be converted to a > b && b > c
 
if I solve the problem via a different algorithm in the same language and it's shorter, do I edit the existing answer or write a new one?
 
A new one
 
@ais523 Depends, if it is your answer then probably edit it unless you really feel like you'll loose something if you remove existing algorithm, otherwise new one
 
turns out @Dennis posted it one byte shorter while I was working on it
so that rather solves the problem ;-)
 
1:29 AM
If it's a significantly different approach it should be fine to post a new answer, for future reference
 
Question: Is there any good set of rules for converting, e.g., non-ASCII German characters to ASCII characters?
 
@ais523 I've edited my answer, so it might not be that similar anymore. No need to delete imho.
 
Wait, nvm
 
1:49 AM
Hello
 
(Not-so) quick question for Brun's: can k*(k-2) ever be a cube for integral k > 4?
 
2:01 AM
Regex crossword, space must be [0-3] but also in [^2013]?
wrong word lol
 
I'm stuck on double cross #2
 
this makes no sense
 
Which level?
 
0
Q: Permanently self-modifying code

NO_BOOT_DEVICENow, we all know most languages have very simple ways to "self-modify" code. However, what if you were to actually modify the code and edit parts of it...on disk? Your goal is to make code that prints a number, then edits its own file to replace the number with the next one in the Fibonacci seq...

0
Q: Detect if your program has been mutated

noɥʇʎԀʎzɐɹƆWrite a program that outputs NOT CORRUPTED If any single byte is changed the program should output CORRUPTED Do not read your source code from a file

 
tel on volapuk or whatever it is
[^2O13]\.\\*(A|P)?
aw fucking hell
the 0 is an O
can someone post the relevant XKCD please
 
2:05 AM
[not 0, 1, 2, or 3], then a period, then a backslash any amt of times, then [A or P]
 
@Sp3000 I can't quickly do the maths in my head, but according to a quick Jelly program (Rµ2+×µÆE%3SµÐḟ), the answer is no for k < 4000: Try it online!
also, "is a cube" is surprisingly verbose in Jelly, it took me a whole five characters
 
@Downgoat for the love of all things holy + goats pls update the tf2 server ;-;
 
Yeah intuitively I feel like the answer is no, but I can't seem to convince myself of it. Basically I'm asking because I'm sure some answer's going to count the number of divisors in k*(k-2).
 
let's see: a cube has all its prime factors occur a multiple of 3 times; each of those has to occur either in k or in k-2, with no overlaps; it's clearly impossible for k and k-2 to both be cubes, so at least one factor has to be split between the two sides; that means that k and k-2 are both divisible by the same prime, which must therefore be 2
that's not a proof by itself though
 
Hmm so I guess the sticking point is showing that k and k-2 can't both be cubes
 
2:15 AM
no, that bit's easy; the sticking point's showing that k and k-2 can't be a cube and twice a cube, either way round
 
... oh right. Hm.
 
obviously you can't split a factor other than 2 between the two
IIRC there's a chat room for this sort of maths problem

 Primes and Squares

For discussion about programming, math, linguistics, music, sc...
that one, perhaps?
 
Didn't realise we had such a room
 
no, one of the problems with TNB is that everyone goes here, so the other rooms are mostly unused
 
Well, having to click through a bunch of tabs to see if there's any chat is pretty horrible
 
2:22 AM
if you join a bunch of channels at once
then the most recent comment in each is shown in the sidebar (above the starboard), in blue if there's recent conversation
and if you favourite a bunch of channels, you can join them all at once without needing them open in tabs
 
I know, but that's still crappy
For example, if one channel has a conversation you're not interseted in, you won't know about the other ones from that
Mathematica claims to know that there are no solutions to 2b^3 + 1 = a^3 or b^3 + 1 = 2a^3.
Other than |a|,|b| < 2.
 
wat
PRELIMINARY UI FOR StackChat
 
@ais523 I'm solving your Incident question right now. Would setting all the characters in the string that aren't in the output tokens to null characters be an acceptable return format?
 
@feersum that doesn't show where the gaps between the tokens are, i.e. it doesn't distinguish between a, a and aa, so I don't think you're constructing the list of tokens at any point; thus I'd probably say no there
 
@ais523 But you said it was ok to output them with no delimiter.
This gives equivalent (or more) information.
 
2:38 AM
yep, the idea is that you should construct the list internally but I don't really care about how it's output
conceptually this question wants to insist on being a function but I wrote the spec as it is to not exclude languages without functions
 
What do you mean "construct the list internally"?
 
0
A: Sandbox for Proposed Challenges

noɥʇʎԀʎzɐɹƆDual Kimian (Error) and Regular Quine Polyglot code-golf polyglot quine Create a program that is a non-erroring proper quine in one language... ...and a proper quine that produces its own source code through an error in another language What is an error quine? The compiler/interpreter/r...

 
that said, it's a fairly difficult challenge, so if you don't comply with the I/O spec in a minor way like that, I'm not going to be arguing for the post's deletion myself
 
I don't care what the requirement is as long as it's clear, but now I'm very confused.
 
@wat Looks good!
 
wat
2:39 AM
@MistahFiggins Thanks
Glade just crashed and so I lost it all
Trying to remake it
 
BTW, is there a way to type "\n" chars in chat? or do you have to copy paste for multi-line?
 
wat
@MistahFiggins shift+enter
like

this
 
Got it.
Thanks!
 
wat
You're

welcome
 
I should probably have written it like that originally?
 
2:41 AM
I'm working on typing out my Del|m|t documentation rn, it's pretty fun
 
wat
@MistahFiggins what are you using? Markdown?
 
@ais523 Huh?
 
err, wow that was confusing, I suspect a chat bug
 
@wat To format it? yea
 
wat
@MistahFiggins k cool
 
2:43 AM
repeating my message from memory in case it disappeared: "basically what you're doing is writing a snippet to output the list of tokens, then adding code to make it into a full program or function"
 
Cat program:
Argument: #
Code: 7#/##1#3#>#?#9
 
If I write the tokens to stdout, then it's OK to have no delimiter?
C is the language, btw.
 
wat
@MistahFiggins four spaces before lines
 
Thanks (lol)
 
wat
@MistahFiggins Tom Hanks?
 
2:46 AM
@feersum in C it's probably simplest to just output each token with a separate call to a print statement; not only does that comply with the spec, it actually is observable to an outside process whether two characters were output at the same time or at different times, if it goes to enough effort
 
@ais523 That's actually quite painful compared to using putchar() in a loop.
 
ah, I see
 
The only way to output N characters of a string is to use fwrite, which requires a#include.
 
is there some point at which you can look at the program's memory and see the string being broken into tokens? (also printf also works but it's rather more verbose; it doesn't need an include on gcc, even though it does on portable C)
 
printf won't work unless I temporarily overwrite part of teh input with null characters to mark the end of what I want to output.
What you see currently is an array that has a[i] = N if there is an N-character token starting at position i, a[i] = 0 otherwise.
 
2:50 AM
printf("%.*s", length, pointer_to_first_character)
I might have the arguments backwards there
 
That's not how it works.
It pads the argument to length if it's shorter than length.
There's no truncation if it's longer.
 
no, that's * you're thinking of, this is .*
anyway, I'd say that given the representation in memory you have, just printing the character or NUL is enough
<man 3 printf> "This gives … the maximum number of characters to be printed from a string for s and S conversions."
 
OK it works, thanks
 
3:23 AM
Prints "987654321" by changing the regex at the end of the first iteration:
Argument: [ -?]
Code: %A&B'C(D)[)Z>^8Q?\
 
@Riker ok
 
> Stack Exchange App Test
 
@Riker done, no update was there
 
Now i just need an interpreter...
 
wat
Hey people
I'm about to post an answer with my new account "Stack Exchange App Test"
Please upvote it enough that it gets to chat
aka 20 rep
 
3:35 AM
Don't beg for upvotes. Make quality contributions.
13
 
wat
...
I have never gotten more than about 4 upvotes on an answer
even when I was the first one
 
Quality is not the same as speedy
Maybe even being speedy is detrimental
 
wat
I know, but the FGITW effect is real
 
Yeah, but not the only way to get votes
 
Be that as it may, the only thing worse than a crappy contribution from a chat sock account is an upvoted crappy contribution from a chat sock account.
 
3:37 AM
being fast increases the chance you get upvotes, but unless the question is so easy that a lot of people can write a good answer quickly, it doesn't help you get more than a few upvotes early
that said, we had a rash of questions where posting a good answer quickly was all that was needed, around the time I joined
 
wat
this isn't even a bot or anything, it's just for testing the login mechanism without accidentally leaking login data for my real account.
 
I was unemployed at the time, it lead to me repcapping a lot
 
wat
All I need is 2 upvotes
 
Is anyone here familiar with Lex/Yacc or Flex/Bison?
 
I am
 
3:39 AM
I am somewhat familiar with bison
tho I'd tust ais523 more >_>
 
@ais523 Could you tell me what the difference between %{ ... %} and { ... } is?
 
@Downgoat one has % signs
 
they both insert literal code; however %{ … %} is used by yacc and bison (EDIT: and lex and flex) as a sort of compiler directive to insert code that it doesn't really look at, typically near the start of the program
 
what do you mean by "doesn't really look at"?
 
whereas { … } is used by rules in yacc/bison (and lex/flex if you want your code to stretch over multiple lines) to specify the code that implements the rule
by "doesn't really look at" I mean it just copies it byte-by-byte to the output
and only reads it to know where it ends
 
3:41 AM
<expect>[0-9]+"."[0-9]+      {
            printf( "found a float, = %s", yytext );
            }
<expect>\n           %{
            BEGIN(INITIAL);
            %}
 
oh, that's ridiculous, I'd use {} in both cases
 
@ais523 ah ok, I see
 
%{ … %} blocks are idiomatically only used at the start of the file (and the end, although often there's a more lightweight syntax to put them at the end)
 
@wat And there's nothing wrong with that. I have a sock as well. Asking for upvotes is where the problems commence. All upvotes should be cast because of the post, not because of the poster.
 
@Dennis wait is ಠ_ಠ your sock
 
3:43 AM
the bison documentation outright says you're only meant to use %{ … %} once in a program
 
Hey does anyone want to play Black Hole?
Maybe like a three player game thing
IDK
I can actually make a decent KoTH now because I know Java yey
 
flex documentation says that lines between %{ and %} with leading whitespace are copied verbatim to the output; unlike {} it doesn't seem to make guarantees about where it ends up
so I'm guessing the %{ … %} is exploiting undefined behaviour to get the BEGIN(INITIAL) into the right place
not sure what the leading whitespace is for, it's probably to avoid violating a standard that specifies what to do with unindented lines
 
Uhh how to make KoTH in Java?
 
@ConorO'Brien Sure, I learnt Octave to create a sock account and give it enough rep to chat, then posted a Julia answer to make everyone think it was Alex's, and finally an ES6 answer just for the heck of it. That sounds exactly like something I would do.
2
 
making a KoTH is much more complex than I can fit into PPCG chat, really
 
3:47 AM
damn, I was gonna go to arqade to ask a game identification question but I don't have a screenshot or whatever
 
Is there a challenge where you have to do something like this?
 
@Dennis it's the sort of thing I would do if I had some reason to get a sock reputation without people knowing it was me, but I don't see why I'd do that
 
@Dennis ... maybe that's how you feed the 11?
 
No, this is how I feed the 11.
 
There's an equilateral triangular grid, numbered 1, 2, 3... all the way until the last dot.
  1
 2 3
4 5 6
Etcetera etcetera
 
3:50 AM
or why its post has a downvote
 
And the task is, given a number and the size of the grid, return the neighbours it has
 
wait, if its post is at +2 / -1, why does it have 21 rather than 19 rep? accepted edit?
also, in retrospect, that post is using a very Dennis algorithm; different golfers have their own style
 
@ConorO'Brien The downvote was cast automatically by the Community user when I edited the answer. I consider this a bug. And I posted the answer precisely to corroborate Doorknob's theory regarding that bug.
 
oh, cleared VLQ flag downvote?
I think that's a bug too, if Community is autoflagging things as VLQ and the post gets edited, that's not a reason to convert the Community VLQ flag into a downvote, on the basis that Community should have downvoted rather than flagging
 
I would have done it with my regular account, but it's very hard to get a VLQ flag from Community with a high-rep account.
 
3:53 AM
ahh
 
Nov 30 '16 at 16:22, by Dennis
@Geobits Close enough. Dennis' mortal account
 
there's a partial fix, in that the downvote is cleared if the post is ever upvoted, IIRC
 
since the real Dennis is immortal
 
but only if the upvote happens after the post is edited, for some reason
(you'd think an upvote beforehand might be a clue that the answer isn't actually that terrible…)
 
@ais523 That's true for regular VLQ flags, but not those cast by the Community user.
 
3:55 AM
oh, that's surely got to be a bug, or at least fairly stupid
come to think of it, maybe Community might get some rep on PPCG if the bug were fixed
(Community's rep is nearly always 1, but that's not due to a special case or anything like that; it's because it downvotes so many things)
 
@ais523 Quite stupid, yes.
 
and it still hasn't been fixed... :/ would offering a bounty help remotely?
 
It would at least burn some meta rep.
 
my contribution on elendia starman leaving and stuff
 
not normally, bounties tend to attract regular users who can answer the question, but the developers don't need reputation much
 
(also, I don't really have SE-meta rep to burn, my meta rep's still low enough that I can make a noticeable gain from suggesting an edit there)
 
mine's at 100
 
@DestructibleWatermelon What on Earth is that supposed to be?
 
@Dennis the new starman
 
Suddenly I want to leave too...
 
3:59 AM
association bonus + 1 downvote?
 
@ais523 some convoulated combination of upvotes and downvotes and a bounty
@Dennis NO PLEASE DON'T :(
 
I don't know how to do this :(
I'm making Black Hole in KoTH probably for multiple players
 
@Qwerp-Derp what is this koth?
@Dennis ._.
 
@Qwerp-Derp is this black hole from tom scott?
 
@NathanMerrill yup
 
4:03 AM
I actually already made a controller for that, but never posted it
and I think it is much better as a 2 player game
 
what is this black hole you speak of?
 
@NathanMerrill So do you have to play in order?
 
4:09 AM
Yup
Uhhh I kinda want to try out a game of Black Hole in chat just to see if there's any strategy
Maybe I should make a room?
@NathanMerrill Do you have the repo for the controller?
 
nope. I don't have the code on me either, as that computer is getting repaired
 
but it should be really easy to write with KoTHComm
 
You need to write specs for KoTHComm though
 
I'd guess around 3-4 hours
I know
 
4:12 AM
@anyone Does anyone want to play BlackHole in a separate chat room?
 
ok, I'll write up a bunch of specs for KoTHComm
 
So what does KothComm do exactly?
 
everything but write the game
it can communicate with players over piping, download players from a question, run multiple games, aggregate the scores into a single ranking
 
Oh
Whoa that's cool
@DestructibleWatermelon Do you want to play a game of Black Hole?
 
@Qwerp-Derp maybe
 
4:15 AM
@Qwerp-Derp I'd highly recommend making the board bigger for the real tournament. I feel like a 18-grid is too easily brute forced to find the optimal solution
 
make the room
 

 Black Hole

Playing games of Black Hole here.
I've made a challenge spec on Meta, hang on I'll send you a link @NathanMerrill
 
maybe you should alter the game to work with an infinite grid
 
or, wait, I have an idea
 
4:16 AM
@DestructibleWatermelon Go on the room
 
@DestructibleWatermelon that doesn't work. You need a point to finish and score
 
multiple bots, big grid, memory between games
@NathanMerrill I know
 
I was thinking multiple players, but with multiple black holes
So there's not just one black hole, and it makes the game much harder to bruteforce
 
it would be a large modification to the game if that happened
also why not hyperbolic play field so that each space has adjacent 10 spaces
 
@NathanMerrill Do we start off with 10 or 1?
 
4:23 AM
1
and you make it 2 player, and 1 black hole
anything else makes things too undeterministic IMO
 
Mmhmm
I think the first few moves are random and then it just gets strategic at the end
@NathanMerrill You want to join the room?
 
nope. Working on the spec for KoTHComm
@Qwerp-Derp that's not true.\
 
@Downgoat ... well it updated so
I tested just when I sent the frist message, just did agin and it work
 
especially not for computer players
 
@NathanMerrill Kindofbutnotreally
 
4:27 AM
you want your low numbers to touch as many spaces as possible
 
so in the middle?
 
yeah, but not necessarily in a cluster
 
4:38 AM
@Qwerp-Derp it turns out I did push it to github
that said, it is not using the latest version of KoTHComm
 
Oh
Wait when did you make KothComm?
 
its been a WIP for about a year now, I think
 
Oh nice
What version is it now?
Or does it have no version yet
 
I really should start to version it\
I've been wanting to put it on maven
so people could easily grab a jar
but as of now, I work off of the repo
 
4:43 AM
typically, I add KoTHComm as a git submodule within the project
 
How much specs do you have to do?
If you're finished do you want a game of BH?
 
4:59 AM
I think Black Hole is kindof counterintuitive
 
Anonymous
@Dennis Wait that's not what you did?
 
Anonymous
(disregarding the fact that we've all-but-confirmed that disapproval-face is VTC's sock)
 
@Mego Sure, VoteToClose learnt Octave to create a sock account and give it enough rep to chat, then posted a Julia answer to make everyone think it was Alex's, and finally an ES6 answer just for the heck of it. That sounds exactly like something VTC would do.
(It's fun to see y'all guessing when I can check. :P)
 
@Qwerp-Derp added a readme
I'm going to bed
 
cya, i should too at some point
 
Anonymous
5:07 AM
@Dennis The thing is, VTC absolutely would do that :P
 
too busy working on an interpreter for del|m|t
 
@Mego Would, but hasn't.
 
If I posted an ES6 answer, that'd be the ultimate deep cover.
 
Anonymous
So if I keep guessing, you'll keep sarcastically responding, letting me know that the guess was wrong, thereby allowing me to work out the true owner via process of elimination
 
Anonymous
Here's an interesting idea for a statistic: which PPCG user has used the most diverse set of languages?
 
5:12 AM
Guven that we have 46k users, that might take a while.
 
Anonymous
Oh
 
Anonymous
It's minxomat
 
Anonymous
I think
 
Anonymous
Maybe not... Luis is a decent candidate
 
Anonymous
I mean, this comment kinda gives it away:
 
Anonymous
5:17 AM
I'm only missing some eval here to make it really EVIL :-) — Luis Mendo Oct 5 '15 at 0:11
 
Anonymous
But at the same time, I hope I'm not right, because trying to figure out who owns disapproval face has been one of the few things everyone in TNB can rally around. It'd be sad if the mystery was gone.
 
Guesses are a dime a dozen, diamonds are priceless. :P
 
Anonymous
One day we will figure it out. And then we'll be sad because the great mystery is over, and we'll have to find something else with which to occupy our time.
 
5:33 AM
Huh? I thought it was commonly known to be flawr.
 
Anonymous
@feersum This is news to me
 
maybe feersum is trying to confuse people
and is actually feersum
 
"Maybe feersum is actually feersum." —Destructible Watermelon, 2017
5
 
What a novel thought
 
Anonymous
Wow, I never thought of that
 
Anonymous
5:42 AM
@feersum Care to comment on these salacious allegations?
 
> salacious
 
I don't see how anyone could believe that.
 
> treating sexual matters in an indecent way and typically conveying undue interest in or enjoyment of the subject
I think Google gave me the wrong definition.
 
or we have both completely missed out on some important detail
@Dennis "Hey, that's not what 'allegations' means!"
 
Anonymous
@Dennis I've always heard/used "salacious" to mean "scandalous"
 
Anonymous
5:45 AM
Like, juicy-gossip-TMZ-scandalous
 
I think I've heard it used once or twice, but never really committed the meaning to memory
 
Anonymous
Which, actually, fits that definition more often than not
 
Adjective: salacious ‎(comparative more salacious, superlative most salacious)
  1. Promoting sexual desire or lust.
  2. Lascivious, bawdy, obscene, lewd.
 
Anonymous
Huh
 
Anonymous
TIL
 
5:48 AM
"But I wanna say one thing to the american people - I, feersum, am not feersum. I did not tell anybody to lie, not a single time, never."
 
Anonymous
"I did not have sockpuppet relations with that account."
2
 
"These salacious allegations are false, and I need to go back to work and stop idly browsing PPCG"
response: "Why would you do that?"
 

« first day (2185 days earlier)      last day (2664 days later) »