« first day (4774 days earlier)      last day (48 days later) » 

12:48 AM
@emanresuA ...this gives me a funny idea
__""-
another five byter that looks straight out of symbolic python
 
Lol
 
@emanresuA ooh, took me a while to realize you're stealing the colon from https://
 
@DLosc Retina, 5 bytes: .+#<newline>:
 
Wow that's nice
 
12:56 AM
Also translates to a perl -p, 7 bytes
s;.+#;:
 
Sandbox posts last active a week ago: Morph a string into another, Answer 1
 
1:28 AM
@DLosc is the message ID guaranteed to be 8 digits?
ok seems like it isn't
i really like this one:
@DLosc GolfScript, 7 bytes ":"""@~
uses eval to get the integer
it would be shorter but the top of the stack has to be the empty string in order for the URL to eval without errors
alternatively, 5 bytes: ":"\~, but the output has a bunch of leading :
 
2:28 AM
@noodleman ... What kind of weird eval strategy is Golfscript using? xD
Ohhhhh, eval as Golfscript code?
@DLosc Pip, 7 bytes: O':a~XI
Output a colon without newline, then output the first integer (`-?\d+`) regex-matched in the input.
Can't use the eval trick because # would give the length of the message ID rather than the number itself.
(Oh and because // doesn't parse as / / and therefore gives a syntax error... details, details.)
@cairdcoinheringaahing If the triple can be taken as three separate command-line arguments, in Pip it's just [1ab] (if it has to be one list argument, then HaPE1 is still 5 bytes)
 
2:47 AM
No regex, no eval, just split on the octothorpe and prepend a colon to the last item
 
> :p
I can tell what you thought of the challenge
 
\#/
 
Hmm, signals are mixed
@DLosc Acc!!, 63 bytes:
Count i while N-35 {
}
Write 58
N
Count i while _ {
Write _
N
}
Skip characters up to and including #, write :, write remaining characters unchanged until EOF
 
@DLosc K (ngn/k), 10 bytes: `":",*|"#"\`
@DLosc Python, 29 bytes: lambda i:":"+i.split("#")[-1]
 
3:12 AM
@DLosc yep!
well, if the stack is empty it will error, but if it's a non-empty string it'll produce incorrect output
i was just lying for brevity
 
Funnily enough eval also works in vyxal - as long as you take the second half of the url (5 bytes: ∷Ė\:p)
 
https://chat.stackexchange.com/transcript/message/65236820#65236820 yields 65236820 because: :/ sets the variable / to the empty string. / yields its value. https, chat, stackexchange, com, transcript, and message all do nothing. each / pushes the empty string. each . duplicates the top of the stack. everything after the # is a comment.
 
Oh, nice! Didn't realize it was the first instance of the number that was getting evaluated.
 
@lyxal yeah that was my idea before i realized eval was shorter for GS
 
In vyxal, https yields some string, :/ splits it on itself yielding ["",""], then / tries to split the input on one of those ""s and crashes. Like in vyxal when taking only the second half the number is pushed and the # is a comment
(also we should probably fix that crash, there are situations where you might want to split on an arbitrary potentially-empty string)
 
3:22 AM
@DLosc yeah, it has to be this way because GolfScript prints the entire stack on program end, not just the top
 
@cairdcoinheringaahing BitCycle -u (can only handle nonnegative integers), 38 bytes:
?v  <
 ABv
v  =^
v   <
ABv
 @= ^
01>>!
Seems really over-complicated, but I'm not sure how to do it better... the directions that the switches use are pretty inconvenient here.
 
1pṪ is probably the best possible in vyxal - prepend 1, remove tail
 
Hmm... BQN is 3 bytes: 1»⊢
Shift list right with a default value of 1
 
3:46 AM
@cairdcoinheringaahing Japt, 5 bytes: ËpEÀ0
Raise each D at index E to E != 0
(assumes int array)
 
That gives [1, b, c] but the CMC asks for [1, a, b]
 
oh wait i did it wrong
yeah
easy fix tho
actually no it isn't oof
well the obvious way is the same length
Japt, 5 bytes: [1UV]
U is the first input, V is the second input
 
Nice, same idea as Pip and nearly the same code :D
 
i should hang out on SE chat more, cool CMCs
i'm always on the discord but not a lot of golfing going on over there
@DLosc what's the Pip look like?
 
1 hour ago, by DLosc
@cairdcoinheringaahing If the triple can be taken as three separate command-line arguments, in Pip it's just [1ab] (if it has to be one list argument, then HaPE1 is still 5 bytes)
 
3:54 AM
cool
is pip anything like Japt?
 
I don't know much about Japt, but I think they do have more in common than most golflangs, yes. If I'm not mistaken, they're both imperative and expression-based (not stack-based or tacit).
 
yes, i think
not quite sure what expression-based means in this context
Japt is kinda like chained method calls like A.b(1, 2).c() * 3 + 4.d(2) only with different syntax
 
And Pip uses infix operators like JavaScript/Python/etc.
 
4:50 AM
so pretty similar
 
@DLosc HaPE
New word just dropped
 
It's pronounced like "happy," but with a pause in the middle as if you're a robot that's just learning how to speak
 
@noodleman in case you want to use it, I unfroze the pip chatroom

 Pip

Discussion of the Pip golfing language. github.com/dloscutoff/pip
Because if you like japt I think you'll enjoy pip
 
cool, i'll check it out more since it sounds similar to the lang i'm making rn
 
@lyxal based
 
4:59 AM
i think the golflang i'm making is also expression based, using your definition
i imagine it's closer to golfscript semantically though, but i really know next to nothing about pip so i wouldn't know
 
 
7 hours later…
11:38 AM
0
Q: Is the king in check?

MickeyChallenge: Given a 2D array (8x8) of characters, is the enemy king in check? The program should return true if and only if the king is currently in check. Standard chess rules apply. Specifications: The game is provided using a 2D array, where blank space means there is not a piece on that square...

 
CMQ what is a golfy way to compute the number of bytes needed to store x bytes? That is divide x by 8 but round up if it isn't an integer number
the main issue is types I think
 
11:56 AM
> number of bytes needed to store x bytes
???
@Simd this ( if i understood the question correctly )
Python, 17 bytes: lambda x:-(-x//8)
 
@zoomlogo oh wow that is amazing!
I meant x bits
well inferred :)
 
:P
@Simd i'm kinda suprised at myself i managed to think of that
 
a surprising genius
 
@lyxal madness :)
 
12:51 PM
flax, 3 bytes: ⌈÷8
funny its just the reverse of the vyxal program
 
ceil(x/8) is a pretty obvious approach :p
 
@lyxal math.ceil :)
how about in C?
 
1:25 PM
@Simd i guess (int)ceil((float)x/8) is shortest
 
@Simd (int)ceil(x/8.) probably? (i don't know C)
 
ah yeah that also works
 
nice
where does ceil come from in C?
 
of course
thanks
 
 
1 hour later…
m90
2:41 PM
@Simd x+7>>3
 
@m90 i need to know how you came up with that
wait... >>3 divides by 8
and the +7 is to round it up
 
oh wow thats smart
 
2:58 PM
@m90 that's wild!
 
i like
 
I hope you are making millions in your day job
 
m90
3:25 PM
Unfortunately not. (Did you have something in mind?)
 
@m90 anything in finance or data science
or financial data science
 
Data scientists don't make that much usually, it's become a profession rather than a hype now
 
3:52 PM
CMQ There are some 14-sided dice formed by cutting the vertices of a cube, creating 8 triangular faces and 6 octagonal faces. Each face is labeled with an unique number from 1 to 14, and all opposite faces sum to 15. How many different up to rotation of these dice can be created?
(additionally, how many dice can be created if the opposite sum doesn't have to be 15, but just consistent across each opposite pair on the same die?)
 
m90
4:10 PM
@RubenVerg There are 7! ways to assign pairs of numbers to pairs of opposite faces, then 2⁷ ways to split up all the pairs. This shape has the same group of rotational symmetries as the cube, which is S₄, which has order 24. Thus the number of rotationally-distinct assignments is 7!*2⁷/24 = 26880. (The second question has the same answer, because all seven opposite sums must add up to the sum of all the numbers, thus if they are equal, they can only be 15.)
 
oh right of course the second one is the same
thanks! turns out to be easier than I thought
 
CMQ how many different planar, undirected, connected graphs are there with 5 vertices where every edge is in a 3-cycle? By different I mean non-isomorphic
I feel the answer should be, not many
but I don't know how to count them
 
4:29 PM
@Simd thats a lot of fancy words. one day i will understand all of them :P
 
@zoomlogo I can explain each one! None of them is hard
 
@Simd 0, according to me. according to somebody else, probably some other number
 
@noodleman it has to be at least 1!
doesn't it?
 
no, according to me
my argument is made on the basis that i know nothing
 
@Simd i just need to know the meaning of planar and non-isomorphic
 
4:42 PM
that's one
@zoomlogo planar just means it's possible to draw it on a piece of paper with no edges crossing
@zoomlogo two graphs are isomorphic if they can be made the same just be relabelling the vertices
so take the graph above. If I called the vertices a, b, c, d, e it doesn't change the graph
so matter what order I assign those labels to the vertices
 
4:58 PM
@Simd can you give an example for non-isomorphic graphs?
 
5:34 PM
@Simd My guess would be five: that one, that one with v3v4 removed, that one with v2v5 added, that one with v2v4 added, and that one with v2v5 and v2v4 added. But I'm just making stuff up unsystematically; I'm far from sure that I haven't missed something.
Yep, I found another one (start with a 3-cycle v1v2v3, then add edges v1v4, v3v4, v1v5, and v3v5).
 
6:10 PM
@DLosc oh this looks good!
 
6:38 PM
@Simd there are 21 connected graphs with 5 vertices, and only K5 is nonplanar of them, it shouldn't be hard to test them all.
Sage apparently has graphs(n) which can generate all graphs with n vertices
 
7:11 PM
@CommandMaster that would be cool.
 
8:03 PM
0
A: Sandbox for Proposed Challenges

vengyTitle Exaggerate Challenge The goal of this challenge is to take an input string and output a version where each chracter is repeated a number of times equal to its position in the word (with the first letter being in position 1, the second in position 2, and so on). Examples Input Output ...

 
 
1 hour later…
9:26 PM
@CommandMaster do you think all of the remaining 20 have all edges in a 3-cycle?
 
9:55 PM
Not sure why it has posted the line before and after my typo fix. Seems to be an android incompatibility
 
 
1 hour later…
11:14 PM
@Simd nah it's a chat problem
chat is goofy sometimes
1 message moved to ­Trash
 
11:47 PM
@lyxal :(
 

« first day (4774 days earlier)      last day (48 days later) »