« first day (2428 days earlier)      last day (2417 days later) » 

2:00 PM
JS-hell?
7
 
@AdmBorkBork
Sounds like it
 
if it has the added benefit of antagonizing the JS community, I'm ok with that
 
@LeakyNun isn't that 2 bytes in Jelly: Ụị? Try it online!
 
@Neil :o til
 
@LeakyNun What was your solution?
 
2:09 PM
@cairdcoinheringaahing interleave-sort-transpose-last element
 
CMC: Given a string, remove all whitespace (spaces, tabs and newlines) from that string. Example: "\n\t Hello, \nWorl\td! " => "Hello, World!"
 
@cairdcoinheringaahing V, two bytes: Íó
Oh wait
 
Also, current sequence for the OEIS challenge: "Local stops on New York City A line subway." I hate OEIS
 
V, three bytes: Íßs
 
@DJMcMayhem How does that work?
 
2:17 PM
Translates to :%s/\_s//g<cr> in vim
 
@DJMcMayhem Sorry, I don't speak vim either :(
 
That's fine
 
@ATaco Why? Python is probably the top golfing language
And by "top" I mean "most used"
 
@cairdcoinheringaahing :%s/foo/bar means on every line, replace foo with bar. \_s means a whitespace character including Newlines, and we're replacing it with nothing (cause the //). The g just means replace multiple occurrences on the same line if you need to, and <cr> actually executes the command (cause : means shell mode)
 
@mbomb007 codegolf.meta.stackexchange.com/a/13946/72131 should i post this and we can see?
 
2:22 PM
@cairdcoinheringaahing Retina, 3 bytes: `\s
`
 
@Shaggy I took latin for 4 years but never realized it was per se and not per say. :P
 
@cairdcoinheringaahing PowerShell, 18 bytes -- -join-split"$args" Try it online!
Actually, I think you can ignore the quotes
 
does windows come with any japanese fonts
trying to confirm that the yen symbol is the same bitsequence as a backslash
in a japanese font
 
@Poke Yes it is the same sequence.
Source: Accidentally set system locale to Japanese some time ago.
 
2:38 PM
that's really annoying
 
C:¥Users¥Pavel¥git¥jansi¥
CMC: Given an int array, add it with its reversed self: [2, 5, 9, 14] => [2, 5, 9, 14] + [14, 9, 5, 2] => [16, 14, 14, 16]
 
CMC: given positive integers n and r, where n>r, find the number of ways to put n distinguishable balls into r distinguishable boxes, with each box having at least one ball
@Pavel Jelly, 2 bytes: +U
@Pavel Pyth, 3 bytes: +V_
 
2:54 PM
@Pavel PowerShell, 27 bytes -- param($a)$a|%{$_+$a[-++$i]} Try it online!
 
@Giuseppe hi
 
@LeakyNun Mathematica, 17 bytes: Binomial[#2,#-#2]
I think
 
@Pavel I don't think that's right
 
Yeah the more I think about it the wronger it looks
 
@Pavel R, 24 bytes: print((n=scan())+rev(n))
 
2:57 PM
@LeakyNun I think cat is sufficient here
 
@LeakyNun Mathematica, 9 bytes: #2^(#-#2)
 
@Giuseppe hmm?
 
Seems more correct
 
@Pavel I don't think that's right: with each box having at least one ball
 
@LeakyNun rather than print
 
2:57 PM
@Giuseppe oh ok
 
Isn't it? We subtract #2 from # to account for each box containg at least one ball.
Then we multiply #2 by itself for each remaining ball
 
@Pavel you can't pre-choose which ball is the "at least one" ball
 
Oh yeah, right.
 
@Pavel MATL, 3 bytes: tP+
 
@LeakyNun This is tricky.
 
3:04 PM
@Pavel Actually, 4 bytes: ;R♀+
@Pavel Brachylog, 6 bytes: ↔;?z+ᵐ
@ATaco is your tio cmc button working?
 
@LeakyNun Mostly, but it dies when it needs to escape backslashes
 
It's like n!/r!-(n-r)! ???
 
@AdmBorkBork it isnt
@Pavel oh nvm thanks
 
Hmm. I must not be remembering my "n choose k" formulae
 
@AdmBorkBork that is correct for n choose r
n!/r!(n-r)! though, no minus
 
3:07 PM
@LeakyNun 35 bytes: remove the [* and ]
 
@Neil tried, it returns a map object
 
Right, but it's not a simple n choose r
because they're distinguishable
 
>>> f=lambda a:map(int.__add__,a,a[::-1])
>>> f([1,2,4,8])
[9, 6, 6, 9]
>>>
 
@Neil Yeah, but that's Python 2. Leaky doesn't like Python 2
 
@LeakyNun I think this might work: (#2^(#2-#))/(#2-#)!*#!)&
 
3:10 PM
well then he should have said Python 3 :-P
 
Or $\frac{b^{a-b}}{\left(b-a\right)!}\cdot a!$
 
@Pavel what does a=7,b=3 give?
 
Opens W|A
GODDAMMIT
I think it might need to be $(a-b)!$
 
@Pavel it isn't
 
It is definitly not.
 
3:16 PM
@Pavel Jellyfish, 7 bytes: p+R¶ Ei
let's see whether you come up with a solution before I finish doing your CMC in 10 languages
 
Hmmmm
 
Jelly, Pyth, Python, R, Actually, Brachylog, Jellyfish
 
Binomial[#-1, #2-1] works for indistinguishable balls
So to account for the balls being distinguishable... Binomial[#-1,#2-1]#! works?
 
@Pavel no, balls in the same box have no order
 
@LeakyNun just to clarify, the easy case without the minimum is just rⁿ?
 
3:20 PM
@Neil yes
 
@LeakyNun So then it's Binomial[#-1,#2-1]#2!.
 
@Pavel balls in the same box have no order
 
Yes
 
@Pavel J, 3 bytes: +|.
@Pavel justify your solution
 
To be clear, [a, b], [c] != [c],[a,b]? For 3 balls, 2 boxes.
 
3:23 PM
@Pavel right
 
@LeakyNun 10/10 best snek
 
Nope i'm wrong again Binomial[#-1,#2-1]#2! doesn't treat [a,b] and [b,a] as the same but it does treat [a,b],[c] and [a,c],[b] as the same thing
Crud I GTG
;-;
@LeakyNun I think you should post this to main, but on math.se
 
@Pavel nah, i got this from math.se
 
here is a fun coding/golf challenge for those who like web things
starting at theguardian.com/film+tone/reviews , print out the name of every film ever reviewed with its star rating as a number
 
@Pavel 05AB1E, 2 bytes: R+
 
3:29 PM
@LeakyNun I was going to ask if you meant U+ and then I realized that it wasn't Jelly :P
 
would that make an acceptable challenge?
or more suitable for the chatroom?
 
wtf is this even: oeis.org/A000214
@LeakyNun I think I got a proof for the group theory problem
I was looking at it backwards by trying to show that for group G and H1, H2 < G with H1 as a proper subgroup and H1 union H2 = G that H2 would be unclosed, but it was easier backwards :P
 
@HyperNeutrino hmm?
 
Like I just showed that for group H1 and H2, in order for H1 union H2 to be closed, one of them had to be a subgroupeq of the other
like let's say we have group H1 and H2 and G = H1 U H2
associativity, the identity property, and the inverse property of G are all trivial to show since H1 and H2 have these
 
@LeakyNun Is it C(n-1, n-x)?
So (7, 3) would work out to C(6, 4) = 15
 
3:35 PM
@Sherlock9 no it isn't
the balls are distinguishable
 
Well, it isn't C(x+n-1,n)
 
and since if either group is a subgroup of the other then the union will be the group of higher order thus making it not a proper subgroup of the union, then $\exists x\in H_1[x\notin H_2]$ and $\exists y\in H_2[y\notin H_1]$
 
@Sherlock9 it isn't
 
@Pavel that's a bug
 
-3
Q: A java method that identifies the ip address

M MI want a java method that reads the IP address from the user and identifies the class A,B,C OR D

 
3:41 PM
so then we let $x\in H_1$ and $y\in H_2[y\notin H_1]$
 
Tramontane review – musical road trip untangles trauma of Lebanese civil war
3
In Between review – flatmates crash the cultural boundaries
4
On Body and Soul review – bizarre and brutal tale of lovers in the slaughterhouse
4
Our Last Tango review – passion and pain in tango doc well timed for Strictly season
4
In the Last Days of the City review – adrift in Cairo as the Arab spring looms
3
Lawrence of Arabia review – David Lean's sandy epic still radiates greatness
5
The Lego Ninjago Movie review - zippy spinoff brings familiar, forgettable fun
@Lembik
 
Then $xy\in H_1\cup H2\therefore xy\in H_1 \text{ or } xy\in H_2$
$xy\in H_1\implies x^{-1}xy\in H_1 \implies ey\in H_1 \implies y\in H_1$ which is false $\therefore xy\in H_2$
 
@HyperNeutrino we say $y \in H_2 \setminus H_1$
@HyperNeutrino nice proof
 
not done yet but oh ok
and then $xy\in H_2\implies xyy^{-1}\in H_2\implies x\in H_2\therefore\forall x\in H_1[x\in H_2]\therefore H_1\subseteq H_2\therefore H_1\cup H_2=H_2\space QED$; you could say the same for the reverse
I think that's how it goes? @LeakyNun
 
@LeakyNun My first instinct was right: Stirling numbers of the second kind
 
3:56 PM
anyway gtg now o/ and thanks for the hints @Leaky :D
 
@Sherlock9 looks right to me
@HyperNeutrino ok
 
@LeakyNun that's great.. how did you do it?
 
@Lembik Retina
 
@LeakyNun shouldn't you have replied "Retina, see"
(sorry.. pun)
 
lol
 
4:03 PM
@LeakyNun can you get them all that way? That is on all the pages
 
@Lembik I used the source code
 
@LeakyNun I suppose you would need to follow links in that case
 
@Lembik why?
 
@LeakyNun there are pages and pages of reviews
837 pages it seems
 
nvm then
 
4:06 PM
why nevermind?
 
@Lembik I only dealt with page 1 obviously
 
oh right
well you were most of the way there I think
how did you get the star ratings from the one page?
I mean, what did you regex for?
 
I used the source code
golden stars and grey stars
 
ah ok
 
<h1 class="fc-item__title"><a href="https://www.theguardian.com/film/2017/sep/22/tramontane-review-vatche-boulghourjian" class="fc-item__link" data-link-name="article"> <span class="u-faux-block-link__cta fc-item__headline"> <span class="js-headline-text">Tramontane review – musical road trip untangles trauma of Lebanese civil war</span></span> </a></h1>
<div class="stars" role="presentation">
<span class="inline-star inline-icon star__item star__item--golden">
<svg width="14" height="13" viewbox="0 0 14 13" class="star__item__svg star__item--golden__svg inline-star__svg inline-icon__svg">
 
4:08 PM
got it
so if your code can turn to the next page it can do the whole thing I think
saving me hours this evening :)
 
heh, I'm out :P
 
booo :)
I realised it's even easier thanI though
the url has page=400 in it
would you mind sharing your code please?
 
oh it isn't really one code...
it isn't fully automated
wait lemme write the code again
 
thanks
 
Question: why do a bit shift with 0? Doesn’t that not do anything e.g. (x << 0)
 
4:18 PM
Implicit casting?
 
Hey guys, the latest answer to the OEIS answer-chaining challenge yields a sequence that was already answered, can someone comment on that? I don't have enough rep >.>
 
@J.Salle I'll do it; gimme a sec
Are you sure 214 has been done?
 
Nope, that was my bad. I was sorting wrong
It was sorting for active
 
ah ok
use the code snippet :P
 
G`<span class="js-headline-text">[^<]+</span>|<span class="inline-star inline-icon star__item star__item--golden">
m`^.+text">|</span>.+$

<span class="inline-star inline-icon star__item star__item--golden">\n?
1
1+
$.0¶
@Lembik
 
4:29 PM
in JS, >>>0 is particularly useful to cast to 32-bit unsigned int
 
4:39 PM
cool
@LeakyNun
much simpler than I thought
 
@FunkyComputerMan How does Answer-Chaining Fibonacci not have harder answers as the challenge progresses? You seem to be confusing "harder to answer" with "higher quality" which isn't necessarily the case.
 
4:52 PM
Or maybe I'm not understanding your argument.
 
@AdmBorkBork I don't see how it becomes harder over time. Perhaps you might need to explain that to me
 
Each answer reduces the available character set by one.
 
Oh I thought it was a net of zero
I see
I'll update my answer to reflect that.
 
5:31 PM
@EriktheOutgolfer I'm not sure what you mean
 
yeah me neither
I meant something like "cycle arguments" or something for a builtin, but I'm pretty afraid that's not possible
e.g. (something)J (replace (something)) would be the same as RJ if J takes two args
 
No, that's not possible. I'm using R for that. It's just so you can save a byte on the close quotes?
 
but would be considered like one token
@muddyfish hmm...
yeah
also
> just
something like (builtin)"string at the end of the program but I'm afraid it's impossible
 
I think I could do that?
Basically a R that hooks onto the next node?
 
5:43 PM
Oh you found out about time cube!
I keep forgetting how young most of this room is.
 
@muddyfish yeah, but not eval_literal, just one item
eval_literal will break it I guess
 
5:58 PM
@TuxCopter Next we'll need to introduce you to Dancing Baby, Homestar Runner, End of the World, Charlie the Unicorn, Bill Gates' Email Beta Test ....
 
6:12 PM
@AdmBorkBork Charlie the Unicorn is pure gold.
 
@AdmBorkBork It's from 1880. How old are you? :P
(you don't have to actually tell me)
 
@cairdcoinheringaahing Get off my dirt, you kids! (see, cuz the lawn hasn't grown yet)
@cairdcoinheringaahing I'm almost half again as old as Magic Octopus Urn
 
@Xynos "most used" not "most accepted"
 
@AdmBorkBork Half again? As in 150%?
 
If you're going to host a KOTH, as the discussion was about, you want answers to be in a language that is common and easy to program in. There's a reason nobody hosts KOTHs where the answers are required to be in Pyth or Jelly
2
 
6:24 PM
Right
 
That means you're also almost twice my age. :P
 
Yep.
 
tries and fails to work out which way around the 150% is being applied
also, I have bad eyesight and/or fonts, so I always used to think his nick was Um
 
@mbomb007 That reminds me. I need to work on my Jelly KoTH.
@AdmBorkBork Are you ~37?
 
@cairdcoinheringaahing That's why I said "almost." I'm turning 36 in two months.
 
6:38 PM
On Gaming.SE, two answers to the same question were posted at the same exact second. gaming.stackexchange.com/a/318493/115693
They also contained the same answer material, and they currently have the same net vote count.
 
Talk about answer sniping
 
Samurai'd
yesterday, by AdmBorkBork
Over on Arqade, these posting times and vote counts are the same link.
 
But it doesn't look like anybody noticed it when you posted it
 
Nope. It was tossed into a sea of nothingness.
 
I guess it drowned in the discussion about the regex challenge website I brought up
 
6:43 PM
Likely that, too.
 
According to the share link, this answer has id 318493, while the other answer has id 318494, this answer must be the first one posted — Ferrybig 12 hours ago
G.G
 
evening folks
 
7:03 PM
@AdmBorkBork opens "PPCG user information" folder, goes to "AdmBorkBork", files in age Almost complete now :P
Also what is the policy on calling people by their real names in chat?
 
@mbomb007 yay let's upvote the second answer just to make the scores equal! :p (p.s. please don't it's abuse)
 
But then again you probably won't get banned for voting based on score
 
heh "it's just one answer!" I'd feel guilty if I do that just for the sake of equalizing the votes
 
@cairdcoinheringaahing That crossed from the "funny" into the "creepy" category, because I could see someone doing that.
 
@AdmBorkBork I can assure you that I don't do that
 
7:07 PM
and if he did that, then...I don't know if we'd still call him by his username for long
 
Someone please change the subject
 
CMC: given three parallel lines a,b,c and three points A,B,C on line a, construct a point D on line a such that |AB| = |CD| and |AC| = |BD| using only a straight-edge and no compass.
 
CMC: Swap case of some chars
 
@EriktheOutgolfer cv: unclear
 
7:10 PM
@JohnDvorak sorry lost you on the first sentence! :p
@JohnDvorak testcase:
"aaAAyAYyaUSUS", [1, 2, 4, 8, 11, 13] -> "AAAayAYYaUsUs"
(1-indexed)
generally swap the case of the chars at specific indices
 
That's better. But I still prefer my CMC.
 
but...your cmc has some unobservable requirements ("using only a straight-edge and no compass")
not that mine is perfect
 
@JohnDvorak How the deuce can you do that without a compass?
 
It's language specific, so it's objective
@AdmBorkBork It's possible. You have two extra lines to work with.
 
@EriktheOutgolfer SOGL, 8 bytes: {⁴WSF1ž_
 
7:15 PM
so I have a Chinese exchange student at my house
his school has a programming course, but they have to use Visual Basic
 
the first sentence is ok...the last is eugh
4
I'm sorry for that student
 
@EriktheOutgolfer Would it be acceptable to require a space after each number of input?
 
huh?
how would you write indices like 12481113???
 
Is "1 2 4 8 11 13 " an acceptable input format? (note the trailing space)
Note, not not
And trailing not leading, jeez
 
@DJMcMayhem umm, sure?
 
7:17 PM
Sweet
 
is it for v or something?
 
Yep. how'd you know? :P
 
@JohnDvorak Right, I know about parallel lines and traversals cutting proportionally, I just can't figure out how to translate that into line segments on the first line. So, I'm partway there.
 
@EriktheOutgolfer when I was visiting his school, it turns out they also had MATLAB on their computers
 
@DJMcMayhem iirc vim has g?
@NickClifford "had" and "use" are quite different things though
 
7:18 PM
In regex flags? Yes, but that's unrelated to the trailing space
 
I was just like "you have access to something great, and yet you chose visual basic of all things"
true
 
@DJMcMayhem I meant the switch case
 
Oh, yes it does. But I only want to apply it to specific indices
 
good luck then :p
 
And actually, ~ is equivalent to g?ll
@EriktheOutgolfer V, 9 bytes: Ó /|þ\nDJ@
 
7:20 PM
> DJ
nice
 
I like it when my name appears in V solutions
lol
 
umm, ninja
I guess v shows respect to its own father
 
It's also just a really useful idiom
If the trailing space is not acceptable, that could be fixed by changing the first line to Ó¾ ¿/|þ
 
but it is
 
Or Ó¾ü$/|þ I guess
I know
 
7:22 PM
btw
jelly, 4 bytes: Œs⁹¦
and yes I need the duh >_<
 
@EriktheOutgolfer PowerShell, a crapton of bytes -- param($a,$b)-join([char[]]$a|%{if($i++-in$b){("$_".toUpper(),"$_".toLower())[$_‌​-le90]}else{$_}}) -- Try it online! (zero-indexed)
Might be able to golf it using ASCII character codes rather than .toLower() / .toUpper(), but meh.
 
> a crapton of bytes
You are correct
 
Hey, it's under 100
so, got that going for me
 
@LeakyNun APL, 21 bytes: {⍵({⍵[⍺]}⍣(¯1+⊃⍴⍵))⍺} should be golfable but idk how
 
7:38 PM
Wow, almost 24 hours without a new question (that stayed open)
 
@dzaima If you have a block in a block, is there a way for the inner block to reference the outer block's ⍺ and ⍵?
 
@Pavel I have no idea. I only recently started APL. Probably possible with assignment
 
8:01 PM
@AdmBorkBork what if what's making it longer is your salary mixed in there?
 
CMC: Given positive integer x as input, output a list of numbers n where x^n contains no zeros in base 10. Example: x = 9 then output 0, 1, 2, 3, 4, 6, 7, 12, 13, 14, 17, 34 ... you can assume that no output number is greater than 100.
 
@EriktheOutgolfer MATL, 8 bytes, ti)Yo2G(
 
@EriktheOutgolfer Nah, that's on the low end of $-to-other-code ratio
 
@AdmBorkBork Wait, how many numbers are we supposed to output? Just all of them under 100?
 
@AdmBorkBork but that's normal amounts of salary...at least in greece :p
 
8:03 PM
@LeakyNun APL, 19 bytes {(↓⍵)(⌷⍣(¯1+⊃⍴⍺))⍺} - not sure why I need the parentheses around ¯1+⊃⍴⍺
 
@DJMcMayhem Right. It's theorized that all of the sequences are finite, so just outputs under 100 are fine.
 
> 1 Unable to open session file " /TryAPLServer/MiServer/ServerData/TAS000033.dcf"
yeah something might be wrong but I'm not sure if anything's wrong at all in there or everything is alright...
 
@EriktheOutgolfer that's tryapls problem not mine, and idk how to make TIOs APL output. The program is used as 'hello world '{(↓⍵)(⌷⍣(¯1+⊃⍴⍺))⍺}10 8 7 12 5 9 11 6 1 2 3 4
 
it probably is
I mean, I type 1 and it fails miserably
 
@AdmBorkBork can we assume x^n is under INT_MAX?
 
8:07 PM
@EriktheOutgolfer works fine for me
 
There have been a ton of CMCs lately.
 
Okx
and no main posts
 
CMC: post no more CMCs for a week
 
@betseg That really limits the possible options, so I'm going to say no.
 
i wanted to answer in emojicode but rip :(
 
8:09 PM
I mean, 9^10 is already larger, and that's still well under ^100
 
@AdmBorkBork Jelly, 12 bytes: Try it online!
It's a shame I can't use ³
 
Okx
@AdmBorkBork Neim, 7 bytes
 
@AdmBorkBork SOGL, 10 bytes: M∫^r 0W‽FP - could be 8 if I implemented W on number;number - currently it just adds the numbers together as a leftover from copy+paste from +..
 
I'm impressed that these aren't like two-byte built-ins
 
8:28 PM
@Pavel Leaky and Adm became active again ;)
 
0
A: Sandbox for Proposed Challenges

AdmBorkBorkInfinite Array Anti-diagonals Given this infinite array 0 1 2 3 4 5 6 . . . 1 0 3 4 5 6 2 3 0 5 6 3 4 5 0 4 5 6 . 5 6 . 6 . . . . and an input integer n, output the nth anti-diagonal. Examples (zero-indexed): 5 -> [5, 5, 5, 5, 5, 5] 6 -> [6, 6, 6, 0, 6, 6, 6] 9 -> [9, 9, 9...

 
@AdmBorkBork APL, 42 bytes: {(0=+/¨({((⌈10⍟⍵)/10)⊤⍵}¨⍵*⍳100)∊¨0)/⍳100} - 16 of those bytes are to split a number in its digits..
 
@Neil I have no idea how that is generated
 
there are hints now, although my JavaScript answer was close without them
(the hints still allowed me to save 41 bytes)
 
@Neil oh yeah, I didn't notice. I'll try to do something I guess
 
0
A: Sandbox for Proposed Challenges

wizzwizz4Two-Symbol n-state Universal Turing Machine A program is defined as a set of transition rules from one state to another based on the current state and symbol, optionally moving the tape head left or right. The goal is to produce a program that satisfies all of the following criteria: It is a ...

 
9:28 PM
@Poke that was months ago
 
@Pavel /me shrugs. They both like to post CMCs
 
New Oeis sequence is confusing :(
 
Huh, for some reason PAYDAY 2 is listed as FAYDAY 2 in my steam library
 
@HusnainRaza Is that the New York Subway stops?
 
No the Boolean stuff
 
9:38 PM
@HusnainRaza Unless the sequences have a mathematical formula, I don't bother to try to understand them
 
But how I code it
 
You don't?
 
Hahaha •.• is part of my Python program
 
10:11 PM
Facebook abandons it's patent license: code.facebook.com/posts/300798627056246
 
10:32 PM
Did TNB get a social life? Nobody here on friday night :P
 
I am no one.
 
So our social lives are still at where arrays start
@flawr Believe me I know
 
Intel thinks it's Q1 2018 already. I wish we were this far ahead of the dev plan.
 
Good counting, just like apple. 1, 2, 3, 4, 4s, 5, 6, 7, 8, X
 
11:03 PM
@AdmBorkBork Japt, 11 bytes: Lõ k@pX søT
 
11:17 PM
@AdmBorkBork I wonder how one would prove whether that's finite or not. For 2, it's been checked up to 10^10, but I can't imagine any ways to prove it. (probably why it's still an open problem)
 

« first day (2428 days earlier)      last day (2417 days later) »