« first day (2435 days earlier)      last day (2391 days later) » 

6:00 PM
@EriktheOutgolfer k
 
@H.PWiz in fact I needed it in jelly today I'd have outgolfed matl
like, prepend a 0, exactly what I needed
btw I could add some to my mass pull request :p
 
9 bytes in Pyth!?!?! too much
Help pls
 
@LeakyNun did you look at my challenge?
 
hS.u+YNQ0
Wait
 
@orlp I opened it in a tab but I haven't looked at it
@Mr.Xcoder there is "prefix"
 
6:03 PM
@LeakyNun Ik
 
as leaky said .u is an issue
 
Wait
 
My shorter solution did not work
Because I was missing commas in the test cases
ಠ_ಠ
 
also your test cases have some x-y stuff
 
6:05 PM
hSsM._+0
@EriktheOutgolfer Because I was missing commas in the test cases
 
mine is hS+0sM._
 
@Mr.Xcoder wtf is 7-3 doing there
@Mr.Xcoder ninja'd heavily
 
@LeakyNun Because I was missing commas in the test cases
Lol ninja'd the ninja
Lol I love this one (although it is longer): shosN._+0
o/
 
0
Q: Overall Programming Languages scoreboard

Federico AlvarezIt would be nice to have like a score for all programming languages, summarizing all matches. Something like: Score could be anything: won/matches, won/avg, matches/avg, ... It would be nice to be able to sort columns... Hope someone likes the idea! Best regards, Federico.

 
6:13 PM
@orlp I just saw your problem. I gave up within a minute.
(I may try it tonight)
 
@Mr.Xcoder PowerShell, 38 bytes -- $l=0;(,0+$args[0]|%{($l+=$_)}|sort)[0]
 
it's basically how GPS works
sans the relativity part
 
@LeakyNun you did?
it's actually pretty easy
 
yes but I don't have time now
 
in fact this challenge is the runner up to a vastly more difficult problem I'm actually stuck on
 
6:14 PM
it's 19:14 now and I still have a million things to do
@orlp what is the probem?
 
I'm going to post the next one as a code-challenge optimization problem
@LeakyNun it's the same problem, except this time you get all the distances rounded down to the nearest multiple of 5
 
@orlp wat da hell
 
basically
if the distance matrix says 5
it means the real distance is between 5 and 10
now the challenge is to find the algorithm that can best approximate the points
@LeakyNun essentially introducing uncertainty
so instead of circle-circle collision resulting in points
you now have anulus-anulus (disk with a hole in it) collision resulting in regions
 
sure
 
now THAT is a much harder problem
 
6:18 PM
annulus
 
right
but I do believe that with a lot of points you can get quite high accuracy
@LeakyNun the difference between GPS and this is that in GPS you have well-known fixed locations of satellites
 
mone carlo :P
 
@LeakyNun that's one approach, but I'd be interested to see what people come up with
 
Monty Hall
 
@LeakyNun but consider for example a network of bots that can send eachother pings and measure response times to get distance measurement, broadcast those measurements to eachother, but have no angular measurement tools, and all bots are always in motion (so no 'anchor' bot)
 
6:21 PM
Mark each possible point with a goat and add up the number of goats to the number of cars, with cars being the actual points.
 
and their distance measurement isn't that precise either
but I strongly believe that their collaborative measurements should add up to something significantly more precise
especially if you add a temporal dimension (measurements over time), but that is a possible challenge #3 or never :P
 
@EriktheOutgolfer iirc bitwise and/or predated logical and/or so needed to be lower precedence than the relational operators so that you could and/or their results
 
@orlp that's just another dimension :P
 
@LeakyNun only if bots can track how much they moved from their last position
 
I see
 
6:31 PM
sad that the Evil Numbers code is some magical bitwise stuff I could have never come up with
 
@Lynn what is it?
 
n=0;exec'print n;n=n+2^(n^n+2)/2%3;'*400 is 40 bytes
 
@Lynn wtf
that's nice
 
I have no idea how to reason about n^n+2
 
TIL that ISO has a standard for how much solids must be present for tea to be considered tea. I have to wonder what the ISO hasn't standardized.
 
6:34 PM
@Lynn it's the bits that change when a number is incremented twice
so the rightmost two bits are always 10
and all the other bits are exactly those bits that got carried
so it's 10, 110, 1110, etc
 
@Lynn Does Python not have a += operator?
 
@AdmBorkBork it wouldn't be shorter
once again someone confused by precedence
 
that’s n=(n+2) XOR (n XOR (n+2))/2%3
 
Oh, because of the modulo at the end.
 
no
you could remove the modulo
here is what you read:
n=n+(2^(n^.....
here's how it actually works:
n=(n+2)^(n^.....
 
6:38 PM
OK, that seems weird to me
 
@LeakyNun 55 bytes: i,m,s;f(int*a,int l){for(;i<l;m=s<m?s:m)s+=a[i++];m=m;}
 
@Mr.Xcoder not reusable
 
In case you didn't know, variables declared globally are assigned to 0
@LeakyNun I don't mind
 
@Mr.Xcoder it's PPCG rule
 
:P
Ik
 
6:40 PM
@AdmBorkBork bitwise operators have low precedence
 
OHHHH, it's XOR not exponent
Right
durr
 
CMC: Given an array of integers, return the difference between the maximum element and the minimum element.
[1,3,4,6,-6] -> 12
 
leaky's so gonna hate this...
 
@EriktheOutgolfer but i'll defend to the death his right to use floats :P
 
6:41 PM
Uh oh why?
 
@LeakyNun but he's the asker ;p
although he does have the right to answer
 
@LeakyNun or integers, if you prefer - Perfect for ya :D
Edited.
 
jelly, 5 bytes (untested): Ṣ.ị_/
or negative for 4 bytes: Ṣ.ịI
(latter is full program)
 
Pyth, 6 (?): -eSQhS
Nice Erik
 
@Mr.Xcoder PowerShell, 28 bytes -- ($a=$args[0]|sort)[-1]-$a[0]
Works for either float or integer or a combination
 
6:43 PM
ooh nice, powershell is kinda competitive (for practical languages)
 
or 3 bytes: Ṁ_Ṃ :p
 
Ṁ_Ṃ ≈ inverse palindrome Ṁ_Ṃ
 
Python 2: def f(l):l.sort();print l[-1]-l[0]
 
rotate 180 degrees: Ẇ_Ẉ
 
Uh god Jelly why
 
6:44 PM
( might soon be z - 2 btw)
 
@orlp lambda a:a.sort()and l[-1]-l[0]
 
@LeakyNun shouldn't that be or?
 
Also 34: l=sorted(input());print l[-1]-l[0]
 
@orlp right
 
either way it returns False if the difference is zero
not sure if that's allowed
 
6:46 PM
@orlp really?
 
@LeakyNun Yes
 
why?
 
because if both arguments to or are falsey it will return False, no?
 
Because 0 is falsy...
 
no it won't
never mind
 
6:47 PM
@orlp @LeakyNun It returns None instead actually
 
@Mr.Xcoder Can we assume that the input does not contain any 0's?
 
@Mr.Xcoder PowerShell usually trades blows with Python and JavaScript, unless the challenge is math-heavy or involves string reversals.
 
@Mr.Xcoder that because he uses and instead of or
it should be or
 
@DJMcMayhem Yes, you may.
 
Sweet
 
6:47 PM
Oh right
 
@Mr.Xcoder I got 3 bytes in Jelly Ṁ_Ṃ
 
umm, why that assumption???
 
@J.Salle Ninja'd badly
3 mins ago, by Erik the Outgolfer
or 3 bytes: Ṁ_Ṃ :p
 
@orlp no?
 
@J.Salle Well done anyway!
 
6:47 PM
@Mr.Xcoder I wasn't looking at chat >.>
 
@LeakyNun no I was wrong about that
 
I'm doing a regex puzzle and the challenge is to match words that have fu on the end, $ not allowed. I've been stuck for a while and it's supposedly a really simple challenge, can anyone tell me what I'm missing >_>
 
@Pavel impossible to answer without the exact dialect and rules used
 
6:49 PM
Anyway @LeakyNun WTH:
> lambda a:a.sort()or l[-1]-l[0]
 
@orlp JavaScript
 
@DJMcMayhem oh so that's what the assumption is for
 
Yep
 
Like, a.sort() and then l[-1]??!?
 
@Mr.Xcoder you sure about l and a there?
 
6:50 PM
although I think you could use [] for "stack length"
 
@Pavel Lazy matches instead of greedy matches?
 
oh wait was that in leaky's original? :D
yes it was haha
 
@EriktheOutgolfer I can, it's just longer
 
I tried (?!=.) instead of $ but it didn't work.
 
@orlp I'm stupid
6
 
6:50 PM
@Pavel what site is the puzzle on
 
@EriktheOutgolfer alf.nu/RegexGolf
If you complete the puzzle "warmup" the challenge "It never ends" unlocks, which is what I'm stuck on.
 
@Pavel I don't know what flavor you're using, but fu.\@! works in vim-regex
 
Why does one... Star a... Message with Leaky being self-criticist/critical?!? (I am not sure if the last word is a thing lol)
 
Or fu\n I guess
 
@Pavel fu\b
 
6:51 PM
:O TY
 
@DJMcMayhem nope
 
Why not?
 
why should there be a trailing newline at the end?
 
Oh wait a second, words that have fu at then end, not lines
 
@DJMcMayhem Lol sorting is not Brain-Flak's forte
>_>
 
6:53 PM
Most definitely not
 
@DJMcMayhem even if it were lines you can't assume the line you're testing isn't the last one where no trailing \n is present
 
The comparing the first and last elements is only 24 bytes, the rest is the sorting
 
@DJMcMayhem deep stack = brain-flak sucks a lot :p
 
Deep stack?
 
like, the whole stack, not just the top element
 
6:54 PM
Oh
Yeah, usually
 
@Mr.Xcoder R, 24 bytes: cat(diff(range(scan())))
 
Not always. It can do stuff like increments
It's really comparisons that it's terrible at
 
PLS halp 5 bytes: -▼⁰▲⁰ (husk). I am sure it should be 4 (or even 3)
 
@Mr.Xcoder §
 
That's a funny face
 
6:55 PM
@EriktheOutgolfer Yep just about to use it too
 
(yay this time didn't forget it :D)
 
@DJMcMayhem I can't tell if it's looking at the upside-down triangle, or if it's looking away and that's its ear.
 
2
A: Primitive roots density of number

Leaky NunPython 3 Why am I using Python for fastest-code >_> 8.89 sec for 1,000,000. def f(a,b): primes = [True]*(a+1) primes[0] = primes[1] = False for p in range(2,a+1): if primes[p]: for j in range(p**2,a+1,p): primes[j] = False primes = [i for i in range(2,a+1) if primes[i]] count = 0

any advice?
 
don't use python :p
 
@AdmBorkBork looks like the face is looking at an upside down triangle moving towards it
 
6:57 PM
CMC: Given a list of at least 3 integers, all unique, return the largest number in that list that is the GCD of two of other integers in the list. Example: 2, 3, 4, 7, 8, 10 -> 2. You may assume that at least one integer in the list will be the GCD of two other integers. Other example: 4, 8, 13, 1, 14, 2, 3, 15, 12 -> 3
 
If someone did that in brain-flak, I would cry
 
@DJMcMayhem then comes funky computer man
 
@DJMcMayhem did what?
 
HN's CMC
 
no :P
 
6:59 PM
And by HN, I mean HyperNeutrino, not Hacker News
 
of course you don't mean that big off-topic question source :p
 
what if I am Hacker News
 
@Erik §-▼▲
 
7:02 PM
@HyperNeutrino That's gonna be pushing 200 bytes in PowerShell.
Not very mini
 
@EriktheOutgolfer Vim always matches \n at the end of a line: tio.run/##K/v///COw@v@/08sTkkDAA
 
@HyperNeutrino Can you explain your second test case?
I don't think it is correct.
 
@DJMcMayhem because it's one of the editors which automatically include a trailing newline if it's not already there?
 
3 is the gcd of 15 and 12
 
what do you think the answer should be then?
@Giuseppe uh yes
 
7:03 PM
Oh nvm
 
@Giuseppe no it's 8
 
hi @Giuseppe
 
Sorry, my mistake
 
nice to see you here
 
What do you do if you want to reopen your old question? I edited it to put it in the review queue and it got another reopen vote, but it's still closed.
 
7:03 PM
link it here :P
 
(It's this)
 
@LeakyNun hello! I've been popping in recently
 
Just got another reopen vote...
 
@Challenger5 You can flag it for moderator attention.
 
it's 20:04 and I have procrastinated for too long
 
7:04 PM
I have 22 bytes in Jelly for my CMC
 
time to leave
 
@Challenger5 you can also do nothing ;p
 
@AdmBorkBork If it doesn't get enough reopen votes right now, I'll flag it
 
@Pavel you finish Abba yet
 
your edit will bump to the front page
 
7:05 PM
@HyperNeutrino If the Jelly solution is more than a dozen bytes, you know that it'll be a pain in any other language
 
(not that it's used by everybody around)
 
@DJMcMayhem yup :P
or perhaps I'm bad at Jelly and thus got 22 bytes but really you can get fewer :P
 
@EriktheOutgolfer I'm not going to edit it unless I see something to edit.
Which atm I don't
 
you said you edited it before
that will not only put it in review queue but also on the front page so it gets even more (although admittedly not really that much :p) attention
 
@HyperNeutrino Pyth, 17 bytes: eS@iMfqT-TiFT.cQ2
 
7:07 PM
ooh nice
> 102 views
 
@HyperNeutrino by "other" do you mean the maximum integer itself can't be one of the gcd function's arguments?
 
I've edited it, but at this point it's out of the front page and review queues. I am not going to edit it just to put it back.
 
NVM it is wrong
shoot
 
@HyperNeutrino that's most probably what makes it difficult
 
7:08 PM
so you must find maximum a in a, b, c such that a = gcd(b, c)
@EriktheOutgolfer yes
 
@HyperNeutrino where a,b,c are distinct
 
yes
this is one of the reasons I said the list would be all distinct, though I'm not absolutely certain that that matters. It's just to disambiguate
 
@HyperNeutrino Wait your test case is still wrong, gcd(8, 12) = 4, 4 is in the list.
 
For reference, the SHA-256 of my solution in Jelly is f8f60c4ef4273695cdc432a133576a92d9a48b15cba511f3aa0d1dc9c2766d96
 
@HyperNeutrino R, 121 bytes: function(l)max(l[sapply(seq(l),function(x)l[x]%in%combn(l[-x],2,function(g,a=g[‌​1],b=g[2])max((q=1:(a*b))[!a%%q+b%%q])))])
 
7:10 PM
@Mr.Xcoder whoops you're right I removed 12 at the beginning to make it not 4 and then accidentally replaced it :( yeah it's 4
 
Hence, Pyth, 16 bytes: eS@iMf!/TiFT.cQ2
 
@HyperNeutrino as others have said second test case should result in 4 right?
 
@EriktheOutgolfer Yes.
@HyperNeutrino How long is your Jelly solution?
 
7:11 PM
22 bytes :(
 
I use the combinations built-in. Maybe you should too (?)
 
I believe I have 13 bytes
 
I use the powerset builtin
now 20 with the combinations builtin thanks
sorry I meant 16
 
That would make it 18 bytes in Pyth: eS@iMf!/TiFTfq2lTy (powerset)
 
ah ok
 
I want to solve it in Jelly now ಠ_ಠ
Poll: How miserably will I fail?
 
not too badly I think
 
pessimistically, there's much of a probability you'll fail ;p
 
@EriktheOutgolfer Yeah I know
 
it's not whether or not he'll fail but how miserably :P
 
7:15 PM
In fact realistically, not pessimistically
 
@HyperNeutrino "how miserably" isn't an expression we often use in a community where every last byte must get out of your code ;p
 
sure
@Mr.Xcoder same thing
 
ಠ___ಠ
 
@Poke no had to go to class
 
7:17 PM
CMP: In my golfing language, should operators (quicks) (adverbs) be prefix or postfix?
 
Postfix
 
postfix 10/10
 
I have 9 bytes just for getting the pairs of two combinations ಠ_____ಠ
Using Powerset
Now 3 2 bytes
 
@HyperNeutrino Hopefix.
 
7:19 PM
ಠ_ಠ
 
Anyfix
 
no anyfix doesn't work when the arity is subject to change at runtime
 
That was a joke ಠ___ಠ
 
anyfix is really a mess imo
 
agreed
also I've decided against custom operators; just thinking about it makes my head hurt and I'd rather have a working (for a very liberal definition of "working") language than a cool idea that doesn't work.
(then again, when has anything I made every really worked?) :P
CMP: Tacit or Stack?
 
7:26 PM
NVM
 
hm maybe you're checking 4 with 4, 8?
 
@HyperNeutrino Stack, much easier
 
hm
which one's typically golfier? I think it's tacit IIRC
(rephrase question: is either consistently more golfy?)
 
No.
 
hm ok
 
7:29 PM
@HyperNeutrino Stack is easier because you can always tell what the arguments are, tacit tends to be shorter because you can reuse arguments more without duplicating the stack often
 
@EriktheOutgolfer Solved it in JHT, 16 bytes; HEHE I didn't fail
 
heh you went there :p
 
 
1 hour later…
8:35 PM
@Lynn I think the bitwise stuff is not as magical as it looks, and you could have gotten it.
Perhaps Dennis or someone will post an explanation
There's a fairly principled way to get to most of that expression.
 
8:54 PM
@xnor did you see my latest challenge?
 
is that a salmon slice chucked on top of rice?
 
Mmmmm Chicken pork and rice.
Yum.
 
that's how well my first cooking attempt went
it's pork
 
ah
@LeakyNun youtried.png
 
8:57 PM
all's well that ends well
 
@LeakyNun a simple recipe: broccoli, pasta, chicken, pesto
 
[insert murphy's law]
 
@LeakyNun What's in the bowl behind it? Brussel sprouts?
 
@DJMcMayhem lettuce
 
@DJMcMayhem looks like cabbage
cut chicken in small chunks, and fry in oil (at least 10 minutes), meanwhile cook pasta and broccoli in boiling water, mix 2 eggs with a cup of cream cheese and pesto to taste, combine everything
@LeakyNun super simple super delicious :)
 
9:01 PM
thanks :P
 
with rice I like to eat shrimp and peas in a black bean sauce
which is also super simple
 
@orlp Starring cause I don't know how to cook and that looks delicious
 
if you have time to prepare
heat bacon cubes in low heat in pan until they've lost all their fat, remove from pan, cut 1kg beef in chunks, and brown in bacon fat (do it in batches, don't overfill the pan), remove from pan, add 2 onions, 2 celery sticks, 2 carrots all sliced to the pan and cook for 10 minutes, add all beef and bacon back and cover in 1 liter of wine, let simmer in open pan for 2 - 2.5 hours, add 500gram onions, 400 grams pearl onions (weight before leaking) and 400 grams of potato cubes, simmer more 1 hour
it doesn't look that amazing, but it tastes fantastic
and you can eat like 4 days from it
and you can use tough cheap beef cuts because you're stewing
 
Is it worth posting a tip if it only saves bytes under very specific conditions?
 
@orlp I can't buy wine :/
That sounds good though
 
9:11 PM
@Shaggy I think if you've used it at least three times in different answers, it'll help somebody...
 

TNB Teaches Cooking

16 mins ago, 13 minutes total – 27 messages, 3 users, 1 star

Bookmarked 17 secs ago by DJMcMayhem

 
@orlp nope, looking now
 
@DJMcMayhem which is sad, because during the cooking process all alcohol evaporates
 
@Giuseppe I haven't (yet), but it has potential for certain types of challenges.
 
I was going to suggest to use beer instead (which is also nice) but then I thought for a second longer :)
 
9:18 PM
@orlp Yeah, try telling that to the cashier as I check out :P
@orlp I'm sure I could steal borrow some from my roommate :P
I'm starting to notice how often I use :P. It's almost like every other message for me
 
how ironic that my attempt is included as part of the teaching :P
 
@DJMcMayhem I was going to ask why but then realised that would only lead to one of those moments where I'm reminded that I'm surrounded by children and I <s>run</s> shuffle off to cry quietly in the corner!
 
@Shaggy I'm not a child, I just live in a society where for some strange reason it was decided that adults shouldn't be allowed to buy alcohol for 3 arbitrary years.
I don't care too much, I just think the inconsistency is really dumb. They should either lower the drinking age, or raise the adult age.
 
@orlp the lettuce is bitter af
 
9:30 PM
TNB: teaching new broths
 
@DJMcMayhem If only that were the weirdest thing about ... America(?)!
 
(correct)
 
@DJMcMayhem Phew! I hate making assumptions!
 
Haha, no worries
 
@DJMcMayhem It's OK, though; I'm sat in a boozer right now drinking pints enough for both of us!
 
9:44 PM
Much appreciated
@Shaggy UK?
I've never heard the term boozer before
 
@DJMcMayhem You wound me, sir! (Ireland)
Boozer = pub.
 
it's a list of dogs
not breeds, just random dogs who have done something cool (mostly)
 
@Riker I'm offended that I didn't make the list! Is learning to use SE not considered "cool" by humans. Ugh ;P
 

« first day (2435 days earlier)      last day (2391 days later) »