« first day (2451 days earlier)      last day (2409 days later) » 

12:16 AM
Probably not
 
Question: What does it mean to 'work on the edge of the economy'
 
To have a small, but nonzero income.
 
oh ok thanks
 
12:54 AM
@cairdcoinheringaahing Mods.
 
 
5 hours later…
6:18 AM
0
Q: Print Queen's Bohemian Rhapsody Lyrics

Assaf G.Write the smallest code that prints the lyrics for Queen's Bohemian Rhapsody.

 
Not dead
 
 
5 hours later…
11:31 AM
I have a suspicion that either Caird or I have too many off-topic conversations.
 
12:14 PM
yay making comment sprees to help with challenge rule update after lots of answers
 
0
Q: Sum the means of the two integers

Mr. XcoderThere are quite a few means in mathematics, such as the arithmetic mean, the geometric mean, and many others... Definitions and Task Note that these are the definitions for two positive integers : The root mean square is the square root of the sum of their squares halved (). The arithmetic me...

 
12:33 PM
@wizzwizz4 Just so long as they don't get trashed, I'm fine :P
@Dennis When was it changed so that regular users couldn't do it?
@NewMainPosts I would try it, but Jelly's gone, and I'm not confident in being able to outgolf Erik :P
 
@EriktheOutgolfer So 2010?
 
well imo it was a good change even though in some cases it's bad
basically since otherwise people would ask bad questions as cw so that they don't get -2 downvote penalties
although question bans would still apply
and you rarely need to cw questions anyways
 
Yeah, but if it happened in 2010, how can this happen:
> Post Made Community Wiki by PleaseStand occurred Oct 21 '12 at 22:35
 
12:45 PM
Hey @Mr.Xcoder
 
Hey!
Up for some JHT?
 
:P I was just working on my atom equivalents. Sure
 
Not much though, I have homework to do and also 2 tests tomorrow
 
@cairdcoinheringaahing I think there was a time when too many edits in a short period would cause an automatic cw conversion...?
 
 
1 hour later…
2:13 PM
My latest challenge involves a sequence not in the OEIS, but I made a submission!
 
was about time :p
 
@EriktheOutgolfer huh?
 
oeis
oh wait you have an even newer challenge
btw @orlp I don't know if what you're asking is possible, have you implemented anything?
 
@EriktheOutgolfer how do you think I got the examples?
 
2:18 PM
if you have the algorithm it's really, really fast to compute
19315115114208983977481161748345434512005374733869168664276344660260915110927039‌​402649729624378283000492086949843819863035984642309676218327143791047516063393014‌​37712346638081302312671676990157749753397508990097385322244934623772368041061876
becomes
28818553572319281110443658531315242162909430908409011496787279901562281430613993‌​898172867219021722188834258096738168849127686939551811337
 
alright then
 
that happens instantly
@EriktheOutgolfer what is the value of f(2^1000 - 1)?
 
don't have the algo lol
 
you don't need to
what does 2^1000 - 1 look like?
 
hmm
@orlp 1000
but how does that help overall
 
2:23 PM
@EriktheOutgolfer it doesn't
it's just a cute special case :)
 
$f(2^x-1)=x$
seems legit
but
 
1
Q: Number of distinct non-empty subsequences of binary expansion

orlpA subsequence is any sequence that you can get from another by deleting any amount of characters. The distinct non-empty subsequences of 100 are 0, 1, 00, 10, 100. The distinct non-empty subsequences of 1010 are 0, 1, 00, 01, 10, 11, 010, 100, 101, 110, 1010. Write a program or function that giv...

 
that would've only helped if $f(x)=binarysubstrings(2^x-1)$ in which case $f(x)=x$
 
as I said
it doesn't help
it's just a cute special case
 
btw I'd recommend making that a ?
 
2:27 PM
@EriktheOutgolfer it's not
the goal is to golf it
the time limit is just to prevent brute force answers
 
heh
so that the challenge gets way nontrivial
@EriktheOutgolfer please stop trying to go the easy way life isn't always easy
 
@xnor A little brainfart? :P
 
let him take his time ;p
(that is, if he wants to answer)
 
@EriktheOutgolfer no, he commented on one of my answers
4
A: Sum the means of the two integers

orlpPython 3, 57 bytes lambda a,b:(a+b+(a*a+b*b<<1)**.5)/2+(a*b)**.5+2*a*b/(a+b) Try it online!

 
probably because it's python 3
where >>1 and /2 are different things so they are probably both used
but yeah confusing <<1 with >>1 is a huge brainfart :p
 
2:56 PM
@orlp they are less-than signs, the number should get smaller :P
 
@orlp Shouldn't f(5) = 5 because of 0,1,01,10,101? Or am I missing something
Also f(7)=4 instead of 3
Oh, wait, it is any subsequence and not continuous subsequences.
 
3:10 PM
-2
Q: Please help me to correct this bash script

S. KanakoI want to use a bash script to do the following things: Monitor the data of traffic used, those data are provided by the vnstat program. run the poweroff command if the traffic usage is large than 1 GiB. I write a script as shown below: #!/bin/bash ax=`vnstat --oneline | awk -F ";" '{print $...

 
3:32 PM
@xnor you should just say you write binary numbers in little-endian :P
 
3:45 PM
@NewMainPosts Nah, that's totally on-topic :P
 
@orlp that would actually make more sense btw
 
@cairdcoinheringaahing Link?
 
@cairdcoinheringaahing that's suspicious
 
@EriktheOutgolfer How so?
 
3:53 PM
was he ever a mod?
 
@EriktheOutgolfer Not here, and as far as I can tell he's not an SE employee
 
4:05 PM
@cairdcoinheringaahing Questions used to be made community wiki when they reached 60 visible answers. PleaseStand made the question CW by posting this answer.
 
@Dennis Ah, that explains it. Sorry for any disturbance
 
@Dennis What program have you used to design TIO (css + html)? (offtopic is allowed, hopefully...) & @ {windows and jelly users} What do you use to type the ʋɲƭ¥ƥ€æɓ£€ characters?
 
@user202729 For Jelly, you copy paste
 
@user202729 On Linux, you can type all characters on Jelly's code page using a US international keyboard layout. I don't use Windows and have no idea how to type them there.
 
4:09 PM
@user202729 There is also this
 
@user202729 I'm not sure I understand the first question. Are you asking which text editor I use?
 
So the only way for Windows users (apart from those) seems to be create a KLC of our own.
You use a text editor?
a.k.a., no WYSIWYG feature?
 
Nothing WYSIWYG, no.
 
ಠ_ಠ I caused a OverflowError in Jelly: OverflowError: Python int too large to convert to C ssize_t
 
BTW the code-page-keyboard doesn't erase the unused characters when switch e.g. jelly to ascii.
 
4:11 PM
@user202729 You'd have to talk to Mego about that
 
why would anyone use a WYSIWYG?
 
I think they are designed to be used
 
Anyone here know CJam?
 
o/
 
@Dennis How do you swap the top two values on the stack?
 
4:19 PM
Backslash.
 
0
Q: Can we change the Low Quality Posts comment?

caird coinheringaahingI was recently going through some posts in the Low Quality Posts, and one answer (which I won't link here) I recommended that it be deleted, and got review to leave a comment telling the user that it wasn't a proper answer, and thought that was it. Later (just now), I happened to find the same p...

 
@Dennis Thanks. Out of curiosity, why /?
 
That's not a backslash lol
 
@HyperNeutrino Same difference :P
 
4:21 PM
Although \ seems to reverse the stack
 
@cairdcoinheringaahing That's a slash. CJam uses a backslash because GolfScript uses a backslash. And before you ask, I have no idea why GolfScript uses a backslash.
@cairdcoinheringaahing No, it doesn't. There's no built-in to reverse the entire stack in CJam.
 
CJam is hard to debug :P
 
ed is debug and prints the entire stack.
 
@Dennis that's odd, you'd think that a stack-based programming language would have a builtin for that
 
@orlp TBH, in my in-dev stack based language, it doesn't have a builtin for the whole stack, just for the top element
 
4:46 PM
There's no builtin to reverse the entire stack in pyke either
 
4:57 PM
@Dennis I thought it was edbug
@Riker /r/ATBGE
 
 
1 hour later…
6:17 PM
To me, CJam's \ is kinda self-mnemonic because it suggests that one thing goes to the place af another. Although com to think about it, an X would be better
 
6:55 PM
1
Q: How can I shorten this python code?

Ranvijay SinghHere is the code which I want to shorten. n=input() while n: s=raw_input() x,r,g,b=(int(x) for x in s.split()) a=x/r%2 c=x/g%2 d=x/b%2 r=((a*10+c)*10)+d if r==0:e="black" elif r==100:e="red" elif r==1:e="blue" elif r==10:e="green" elif r==101:e="magenta" elif r==11:e="cyan" elif r==...

 
Why are people upvoting ^
 
@Christopher2EZ4RTZ I don't know. I don't really like specific questions. The general, "How do I shorten code in language x" ones are OK, but these ones are just annoying.
 
@Christopher2EZ4RTZ Why shouldn't they?
 
Because it is a bad question with not much effor
 
7:08 PM
@Christopher2EZ4RTZ As what?
 
@Gryphon off topic, but can't change it rn
 
@Christopher2EZ4RTZ It's on-topic, and is clear. Why did you VTC?
 
@Christopher2EZ4RTZ But it is on topic. I don't agree with the community on that, but they're the ones who get to decide.
 
I really don't care, to kinda quote geobits. It is my vote i do what I want
 
@Christopher2EZ4RTZ Just because you don't agree with the community doesn't mean you should close vote things that are, according to the community, on topic as off topic. That's not helpful.
 
7:18 PM
@Christopher2EZ4RTZ imo it's just meh. Not worth downvoting, not worth caring about an upvote or two
Definitely not worth VTC
 
-2
Q: Making pyramid using c++ & functions

daniiahyeWhen i separate the two loops at the bottom it works, but when i combine them i can't seem to make the pyramid. The height is the number of rows. include using namespace std; /********** DO NOT ALTER THIS CODE **********/ void printStar(int numStars){ int i; for (i=1; i<=numStars; i ...

 
7:53 PM
Is it a bad idea to include capital greek letters in the codepage of the language I'm making?
 
@JungHwanMin Husk has Greek letters, if that helps.
 
Capital greek letter alpha looks identical to capital A...
I am lost on what characters I should use :p
Characters that are easily accessible on Mathematica, to be specific.
 
Maybe don't use Α
 
There are beta, epsilon, zeta, eta, iota, kappa, mu, nu, omega, pi, tau, upsilon, and chi
all of their uppercase letters look like alphabets
hmm
 
capital pi is Π isn't it?
 
8:00 PM
derp, rho, not pi
 
@JungHwanMin Levant has Greek letters if that helps :P
 
@JungHwanMin use the lowercase ones and fill with cyrillic the entries you're missing
 
@Uriel good idea. Thanks!
 
@flawr subbed :D
anybody but me getting a non-ppcg icon in ppcg rep notices?
also, chat.se doesn't have the fugly top bar
 
I'm seeing the PCG icon next to PPCG rep increases whether viewing on PPCG or CG, but I don't have any PPCG rep increases in the last week. Do your older rep notices have the same problem?
 
8:16 PM
check chat.se
 
Same there for me - looks fine
 
0
Q: Wrong icon for chat top bar notices

RikerI recently got an answer upvote on an answer on Programming Puzzles and Code Golf. However, I ended up checking this on chat.stackexchange (specifically this, but it appears on main chat.se too. Testing looks like favicons for multiple (at least 3) sites are not working. Here is what it looks l...

clearing my cache did not fix
 
> Code Gold
 
thanks
 
8:23 PM
lol
 
The majority of these are intentional :p
 
I know - it caught on in a big way :)
 
8:41 PM
@Riker Can you please change the accepted answer for "Coprimes up to N" - I outgolfed myself in gaia, beating Jelly
 
@Mr.Xcoder could you please provide a link?
@ATaco I don't think anyone on PPCS would ever write a typo intentionally.
 
Jun 19 at 2:57, by ATaco
Everything I write is pure code-gold. I'm flawless. Flicks lettuce like a hair commercial
 
@muddyfish If I was flawless I would just be r.
 
:P
 
8:55 PM
Oh, we should celebrate 607 days of 6-8 weeks.
 
@xnor I submitted that sequence from my latest challenge to OEIS btw: oeis.org/history/view?seq=A293722&v=9
was kinda surprised to see it missing
 
Feb 7 at 5:19, by feersum
There is no site design. Graduation was faked.
 
Graduation is a conspiracy Se spreads to keep us coming back
 
Who knows, we may end up missing these old times when the new design finally comes :-)
 
Indeed. If the design does come, it's sure to be some sort of malicious trick.
 
9:09 PM
@Mr.Xcoder I decided not to
I did notice it though
Gaia was invented entirely after the challenge, whereas the jelly solution semi-existed (even if it wouldn't have worked yet) before the challenge
 
9:27 PM
What do you guys think is clearer code? y = x / 2f; or y = .5f * x;
 
.5f * x is supposed to be faster
 
@HelkaHomba shouldn't .5 * x be enough?
 
@feersum Yeah but I trust the compiler can optimize either way.
 
I dunno, floating points are messed up.
What language is it?
 
@orlp Not for floats. C# will think .5 is a double
Doesn't really matter, just wondering what people think is better style.
 
9:31 PM
@HelkaHomba :) why does that matter to you?
in a modern processor float and double is the same speed for almost anything
the only time you want to use float over double is for memory requirements
 
x >> 1 should be faster, but I’m not sure how that effects doubles
 
Shifting is not a supported operation on doubles.
Although you could try bitcasting to an int and doing an addition.
Do any compilers do that?
 
@feersum no, because float multiply is super fast
 
Faster than int add?
 
and transferring data from a floating point unit to integer unit actually takes time
@feersum should be same time
 
9:43 PM
Float multiplication is in fact very fast, just do x / 2f
 
Suppose you have a pointer to double.
So it won't be in an FP register already.
 
looking at agner fog's tables
on Intel skylake
FMUL has latency 5, with throughput 1
 
Would you even use FMUL?
I thought that's like smoe crappy legacy x86 instruction.
I get MULSD when I try it.
 
@feersum Oops, yeah, it has latency 4 throughput 0.5
@feersum but what exactly do you think adding a double as an integer would do?
it certainly wouldn't double the number
 
Assuming the double has a sufficiently small finite magnitude, it would be equivalent to adding 1 to the exponent part.
 
9:52 PM
@feersum No, it would double the exponent part as well
 
So you could add 1 << 53 or smoething like that.
@orlp Huh?
 
@feersum I thought you suggested literally doubling the integer value
 
Why would I do that?
 
don't know :)
adding 1 to the exponent like that would technically work I guess
 
Probably there are too many preconditions required to be effective.
The double has to not be in a register, and you have to know it's in a certain range.
 
9:54 PM
it'd also be literally the most premature optimization known to man
besides, the load/store is almost surely overshadowing the computation time of a. single. float. multiply.
@feersum it does work though :)
 
Hmm when I try multiplying by a power of 2 (other than 2^1 which can be done with add) gcc does another load, for the constant to multiply by.
So it would prevent the 2nd load from being needed.
 
10:17 PM
I have doubts that this is faster than x / 2f to be frank.
 
10:30 PM
I just added support for changing keybindings to my program, and it was one of the worst experiences of my life.
 
lol that's why you do that from the start ;P
 
Well, I know that now.
 
yup :P
I've never made any programs with keybindings at all \o/
 
I normally don't, which is why I didn't know what I was doing. I do a lot of coding, but it's almost all data manipulation with no UI
 
Ah ok. Yeah same
 
10:42 PM
@HyperNeutrino are you responsible for any of the golfing languages?
 
@EricTressler You mean on TIO?
 
I don't know what TIO is
 
Oh
Well I made Ceres, Anyfix, and Enlist, though they're all quite deficient :P
In terms of golfing, at least.
 
Pssh, who needs golfing languages, I have confusing languages! :P
 
@HyperNeutrino That's cool. I never bothered to learn a golfing language, but I'm considering picking one up just for fun.
@cairdcoinheringaahing like what
 
10:48 PM
I've made Threead, TacO, ReRegex, and MaybeLayer as "Languages that are definitely not golfing languages"
 
*Later
 
what is ReRegex
 
Looks like WPA security on wifi is about to get rekt: twitter.com/kennwhite/status/919522184384729089
 
It's a language that repeatedly calls a set of defined regexes until the output is equal to the input.
 
@EricTressler Add++, Deorst, Commentator and ;# for starters :P
 
10:49 PM
I've made Proton and Positron as "practical languages" which really are extremely impractical :P I've heard people say they'd use Proton over Python if it were better developed so I'm probably continuing that, but Positron is a shame to my existence :P
Ooh learn 05AB1E it's relatively easy (compared to Jelly lol) and quite good for golfing
 
ARBLE is the most practical language I've written so far, probably because It's just piggy backing an actual practical language.
 
@HyperNeutrino Traitor. One more strike and you'll be banned from JHT :P
 
I might pick up 05AB1E. Who wrote that?
 
How many strikes do I have total now?
 
@HyperNeutrino 1 or 2 :P
At least 1
 
10:52 PM
What would be the other? :P
 
@EricTressler Adnan, but Magic Octopus Urn is in chat more and uses it a lot
@HyperNeutrino No idea :D
 
Maybe it's best to leave it as "you know what you did"
 
@EricTressler Nah, cause he doesn't know what he did :P
 
I am very ignorant and forgetful so I would have no idea :P
 
10:56 PM
I have one more change I want to make today, and I'm stalling. maybe I should get back to work.
 
@HyperNeutrino Sure, the guy who saved the OEIS challenge 3 times is ignorant. 100% legit :P
 
(math.SE is my only friend)
 
(What would we swap to if WPA2 is ded?)
 
(chaos)
 
Although that reminds me, the OEIS hasn't been answered for a while. sends in Hyper
 
11:03 PM
@HyperNeutrino do you have a math question?
 
Not right now.
@cairdcoinheringaahing Oh yeah I was looking at that earlier today.
 
@HyperNeutrino Why do I feel as though it's super easy in Jelly?
 
It's... not?
At least I don't think so
If it's like 300 lines in C no way is it super easy in Jelly
 
Isn't it numbers in which 9*n == reversed(n)?
 
really?
Number of non-isomorphic triangle graphs
No, it is not easy.
 
11:11 PM
Ugh, my phone didn't show #225, only #224. Stupid collapsing inbox messages
 
lol
9*n=reversed(n) would be too easy to be unanswered lol
 
New Jelly atom: "Wrap in “lol”" :P
 
I think the best algorithms for graph isomorphism use a lot of heuristics, like SAT solvers. it's not that hard to brute force it, though.
I see that the code for A000080 uses nauty
 
There's a C implementation but copying is evile :c
 
and it starts with: main(int argc, char *argv[])
{
double startTime = CPUTIME;
HELP;
 
11:20 PM
I might read it to understand better because I read code better than English (not really, code is 100% unambiguous tough)
 
@flawr Today I was doing some examples with the discrete Fourier transform (because I just implemented it in MATL) and found a golfy way to generate the roots of unity. I know you use them quite a lot
0
A: Tips for golfing in MATLAB

Luis MendoRoots of unity via discrete Fourier transform Given a positive integer n, the standard way to generate the n-th roots of unity is exp(2j*pi*(0:n-1)/n) This gives the roots starting at 1 and moving in the positive angular direction. If order doesn't matter, this can be shortened to exp(2j*pi*...

 
11:34 PM
@Dennis do you mind if I borrow the sparse application quick in Jelly for my language?
 
Newer languages build on older ones. That's how it's supposed to work.
(And it wasn't my idea to begin with.)
 
You don't normally get hurricanes in the UK at all
 
wtf is this like the eighth hurricane this year
 
@HyperNeutrino They just keep coming. And they're all like category 3/4/5.
Not just nice category 1s
 
11:43 PM
This be the UK: we don't get extreme weather :P
 
I feel like this is a warning to Trump like "hey yo orange dude climate change is a real thing can't you see the eight hurricanes in your 'great country'?"
 
> Orange dude
:-)
 
@HyperNeutrino Who's the warning from?
 
Australia gets random weather.
It was supposed to be 27 today, it's 18 right now.
 
11:45 PM
rip
Canada's weather fluctuates a lot but here it's decently not extreme.
 
We don't get particularly cold (Minimums of around -5), but we do get rather hot.
 
how hot exactly
 
We hit 50 last summer.
 
:o wtf
real or feels like?
 
Real.
 
11:47 PM
what was the apparent heat
 
(That was QLD tho)
I'm not sure
 
what is qld
^^ oh ok
 
Queensland.
The northern most point in Aus.
 
oh ok
The coldest temperature I can recall here is real -40 and the hottest is real 35
we got hail like two weeks ago and we got like high 20s last week
today it was pouring and there was a decent amount of wind lol
 
I'd love it to be colder.
 
11:52 PM
I like the cold way better
 
Anonymous
Here in Texas (Dallas area), the record low is 1 F (-17.2... C), and the record high is 112 F (44.4... C)
 
Anonymous
We regularly have summer days that get up to 105 F (40.5... C)
 
I feel your pain, barring the lows.
 

« first day (2451 days earlier)      last day (2409 days later) »