« first day (4227 days earlier)      last day (621 days later) » 
00:00 - 23:0023:00 - 00:00

12:05 AM
2
Q: The second even sublime number

Bubblereasy mode of my previous challenge A perfect number is a positive integer whose sum of divisors (except itself) is equal to itself. E.g. 6 (1 + 2 + 3 = 6) and 28 (1 + 2 + 4 + 7 + 14 = 28) are perfect. A sublime number (OEIS A081357) is a positive integer whose count and sum of divisors (including...

cuz feed is slow
> ~-2**31
2147483647
 
correct!
 
@Bubbler Python? or something else
 
Yes python
 
In JS that's a syntax error lol
I'm surprised Python allows that since it's usually pickier about disambiguity operator precedence than JS
I guess that's probably the fault of JS for not adding ** until like two years ago tho
 
unary minus being lower than ** just feels wrong to me :P
 
12:14 AM
1 message moved to ­Trash
@JoKing would you mind unfreezing the bakery?
 
@emanresuA done
 
att
12:46 AM
@Bubbler it's just multiplication ;)
 
Thank goodness the second sublime number is a multiple of 64
 
@lyxal how u figure that out??
 
the number modulo 64 is 0
 
but it output 1 not 0
 
because is divisibility check
 
12:58 AM
@lyxal I showed its prime factorization there, and certainly 2^126 is a multiple of 2^6 :P
 
Well see that wasn't immediately obvious to me :p
 
@Bubbler ok now that u say that, im face palm
 
Sandbox posts last active a week ago: Simplify a Cycle
 
1:15 AM
I was today years old when I learned that dict() and {} (in Python) are not identical
 
how
 
Each time you call dict(), it creates a new object in memory; each call to {} references the same object (I think, based on my experimentation)
 
@Adam huh thats interesting
 
i find this too lol: doughellmann.com/posts/…
 
1:18 AM
That id is interesting but doesn't seem to reflect how it actually works
 
@Bubbler sorry i misread the comment about there being "possibly more sublime numbers" i didnt consider the (hypothetical) odd ones
 
a={};print(id(a)) seems to alternate ids
 
@Bubbler Yeah, I don't think that there's any actual implementation difference between them, but they function differently under the hood which I didn't expect
 
> 0.239us vs. 0.0407us - significant slowdown
 
@JoKing Hmmmmmmm, that's weird -- I guess that when you store the value in a variable, it always has to make a copy, whereas if you're referencing the value independently it can share memory???
The same exact thing occurs for non-empty sets and dictionaries
 
1:28 AM
@Bubbler yea, good thing i dont use dict() anyways :P
 
In order to understand this further, I would need to look through the Python source code, and I don't want to do that
 
bro u guys crazy enough to actually consider looking through python source code?!?!
like that thought has not even crossed my mind until u mentioned it lol
 
I mean, it's just C code, it's human-readable
Anyways, I learned this when trying to make a pseudorandom number generator without using random
 
@Neil Right but that's not what it's doing here. It's returning . exactly every other time.
it acts the same way if you have files in the current directory. <*> does what you're describing.
 
1:46 AM
And I ended up with id(dict())%3%2 (since I'm trying to randomly get a binary value)
 
@Steffan sorry i talk way better in chat than comments lol
 
ok lol
 
@Steffan I know nothing about Perl, but from what I googled it seems that if you don't have any asterisks, then blobs don't return a list of files and instead work like the curly brace things in Unix shells which I can never remember the name of
EDIT: I realize now that the above claim is sort of obvious based on how Unix shells work, whoops
That would explain why `<.>` returns `.` instead of nothing; it doesn't explain why it returns nothing the other half of the time
 
2:15 AM
My best guess is that calling glob flips a flag somewhere which changes how it's parsed (e.g. then it only matches files that are just a period or something)?
All this has taught me is that I never want to use Perl
 
@Seggan designed to be easy to learn
 
mm
 
@Adam It's actually not that bad.
There are so many ways to do any given task in Perl, which is really nice.
I use "pure" Perl (i.e. no module support) sometimes on embedded devices, and it's not particularly painful.
 
3:15 AM
@Adam Yeah, I already found out why it returns .. I just couldn't figure out why it's only half the time.
How I found this was by seeing a golfed solution lol
To determine whether the loop index was even.
also, this only happens inside of loops. outside of loops, it always returns the same thing.
 
 
2 hours later…
5:46 AM
@Steffan well, yes, but think about what your glob is in your case
put it another way: suppose you've got a directory whose only file is a, then print while (<*>); will enumerate a and then stop; print(scalar(<*>)) while (1); will alternate between a and the empty string
 
att
6:26 AM
Any last-minute feedback/thoughts for codegolf.meta.stackexchange.com/a/24957 before I post?
 
@att cant understand any of it but it looks good!
 
6:45 AM
Suggestions welcome: (github.com/TvoozMagnificent/SunSip)
 
7:22 AM
2
Q: Implement Level-Index Addition

attLevel-index is a system of representing numbers which has been proposed as an alternative to floating-point formats. It claims to virtually eliminate overflow (and underflow, in its symmetric form) from the vast majority of computations. The usual floating-point format internally represents a num...

 
0
A: Language nominations for the "Learn You a Lang for Great Good" chat event

Number BasherSunSip This is a language I created myself. From the GitHub repo: SunSip, SLWNSNBP, or Simple Language Which Name Shall Not Be Pronounced, is a Turing Complete, Practical, Whitespace Insignificant, Simple programming language (which name shall not be pronouced). SunSip is based on variables, wit...

 
7:48 AM
-1
A: Language nominations for the "Learn You a Lang for Great Good" chat event

Number BasherSunSip This is a language I created myself. From the GitHub repo: SunSip, SLWNSNBP, or Simple Language Which Name Shall Not Be Pronounced, is a Turing Complete, Practical, Whitespace Insignificant, Simple programming language (which name shall not be pronouced). SunSip is based on variables, wit...

 
@LYaLNominations bruh rip it went from 0 to -1
 
8:13 AM
0
A: Sandbox for Proposed Challenges

Number BasherDebugger, Inspired by this challenge. Your goal is to write a function that takes in two strings and outputs a character. Yes. That's it. But the trick comes from the scoring. For every single character deletion, we will get an stdout (possibly empty) and an stderr (possibly empty). We then feed ...

 
any feedback (not posting yet but still): codegolf.meta.stackexchange.com/questions/2140/…
 
8:42 AM
Why are all LOTM posts community wikis but not LYAL posts?
 
8:55 AM
the general consensus seems to be ok with deleting the finished LYAL posts. does anyone have any last second objections?
i'd also like to add a list of completed ones to the actual post, so that users without permission to view deleted answers can see them too
 
I'll do that, you can do the deleting
speedruns flagging every single answer
 
@NumberBasher already did that lol
well, 10 of them at least
 
@JoKing lmaooo
 
I'm doing it based on chat history so I can link to the events
So gimme fifteen minutes
Also, there are some without an announcement e.g. ><>, so I went with tthe next best thing:
Sep 14, 2021 at 23:39, by Jo King
so, we're doing ><> for LYAL?
 
was Coconut the last one, i remember there being some discussion on it
 
9:05 AM
Honestly idk
Okay what
Nov 24, 2021 at 0:02, by caird coinheringaahing
Welcome to the seventh Learn You A Lang For Great Good! Today, we'll be learning Zsh, a Bourne Shell derivative that's used semi-frequently around the site. Feel free to ask questions about Zsh, post CMCs ("ZMC"s) related to the language, and just discuss the language in general. TIO.
Dec 22, 2021 at 0:00, by pxeger
Welcome to the ninth Learn You A Lang For Great Good! Today, we'll be learning zsh, a Bourne shell derivative that's (sometimes) good for golfing. Feel free to ask questions about Zsh, post CMCs ("ZMC"s) related to the language, and just discuss the language in general. ATO (or TIO, if you're so inclined)
 
lol, double dipping
 
Oh wait #1 wasn't official
 
That's not even far appart
 
was there even a seventh LYAL?
I'm just gonna roll with it
 
has anyone titled their esolang the empty string? missing opportunity there
should be like Whitespace, but everything is zero-width characters
 
9:11 AM
How would you even run it?
 
Feb 22 at 15:21, by Adám
@PyGamer0 I've reserved the empty string for my upcoming golfing language.
You've been ninja'd by six months lol
 
./.py code
@emanresuA damn. foiled again by the immutable rule of dibs
 
Jan 19 at 0:12, by caird coinheringaahing
@lyxal vtc Vyxal as dupe of Perl :P
 
@JoKing Wouldn't the name of the language be .py in that case?
 
Okay, the twelfth and thirteenth LYALs are void
 
9:14 AM
@mousetail i wouldn't count extensions of the interpreter as part of the language name
(though i don't know if that would be a valid filename to call)
@emanresuA as in, we didn't learn a lang that week, but still counted it in the numbering scheme?
 
Honestly don't even know
It looks like they were respectively scala and maybe-dc
 
9:29 AM
Is it reasonable to say that LYALs have to have positive scores to be accepted?
 
@emanresuA ya that sound super reasonable
 
9:59 AM
+1
Um, I think we did-ish coconut, right?
 
 
3 hours later…
12:32 PM
@JoKing version two of this lang would make it ` 2`
 
12:46 PM
@NumberBasher yeah
 
@lyxal please use software and fonts :-)
 
gotta practice those hand-drawn graphs
 
also i still dont understand why [1,2,7,2,7,2,3,7] => [1,2,3,7] and not [1,2,7]
 
because it's not minifying the cycle
just making it simple
 
1:01 PM
what property is preserved in 1,2,3,7, that isnt in 1,2,7?
(besides "the node 3" as youve already shown that some nodes can be removed lol)
 
@thejonymyster the edge that connects 3 and 7
sure 1,2,7 is a cycle, but it isn't the same cycle simplified
 
how do you determine whether it is the same cycle? what is significant about the 3<->7 edge that isnt significant about the 2<->3 edge or 3<->4 or 4<->2 edges in [1,2,3,4,2,5]?
 
A cycle that visits all those edges between 2 and 7 is the same as one that only visits one of those edges
 
Is the 2<->3 edge important?
 
for this challenge, yes.
@thejonymyster the idea is that you're removing loops and parallel edges from the cycle, while maintaining the edges that aren't loops/parallel
@lyxal also, don't mind the fact I screwed up the drawing
 
1:13 PM
so could [1,2,3,4,2,5] be either [1,2,5] or [2,3,4]
 
no
 
0
Q: All times of a wall clock in which arrows are x radians apart of each other

xakepp35Take 12-hour regular wall clock with hour and minute arrow. Given x radians as an input - produce and return array of 24 elements, containing all possible valid minute and hour combination, where arrows are x radians apart of each other. (if x is a multiply of pi - then its 12 distinct values eac...

 
only [1,2,5]
can't be [2,3,4] because you've lost the first vertex after the start vertex
and the last vertex before the start vertex too for that matter
 
ok, so this isnt some orderless set, the start and end (same point) of the path is significant, yes?
 
> As the input represents a cycle, the vertex that is the start and end of the cycle will not be in the input.
 
1:15 PM
ah right
the secret 0 point
 
correct
well it's more assumed than secret
 
right
i dont think it is very helpful to hide it in the input lol, it just makes it harder to see why it matters
 
I was thinking it might help some algorithms out that might try and return the start/stop node
 
i dont understand the difference between excluding 3 and 4 in the right graph, from excluding 3 in the left graph
 
3 isn't excluded in the left graph
 
1:20 PM
i know, but i dont understand why
to me its the same as excluding 3 and 4 from the right graph
 
that's the definition I'm going off
 
@lyxal this is incredibly dense :P
 
@thejonymyster maybe this will help: 1,2,4,5,7,2,7,2,3,7 would also be 1,2,7,3
as would 1,2,7,2,3,7
and 1,2,7,4,2,7,2,3,7
I summarised it as "if a vertex appears twice, snip out the part in between the two appearances" in my notes from the lecture they taught this in
 
that i can work with
but that math description is impenetrable
 
I'm just going off what they said at the lyxture :p
 
1:25 PM
lol fair enough
 
excuse the highlight and annotations
that's the OG slide material
which I tried my best to paraphrase
 
it seems more like you cut out important parts of it :P
like the part that includes v0
and how it equals vm and u
 
isn't that a given seeing as how it's a challenge based on cycles?
 
i... guess? it definitely seems like theres another ... in that second list though
but i digress
even just the "if a vertex appears twice, snip out the part in between the two appearances" would be nice to include
 
done
 
1:30 PM
oh also i guess maybe make it clear that youre not allowed to get rid of anything that isnt removed in this way
since its not about minifying, its about simplifying what is redundant
but yea thank you for taking the time to sit with me on this one i think i get it now :-)
 
> Note that the simple cycle may not be the shortest cycle.
is that good or does it need a bit more?
@thejonymyster this is good for me too: it helps consolidate what I'm learning :p
 
id add the reverse as well "and the shortest cycle may not be the simple cycle" ? :P
 
also done
 
its a good challenge btw i hope other ppl also understand it lol ^_^
now to close mspaint and go back to pretending to work
well now im curious what properties this simplified cycle has other than that it exists sfdg
like if youre studying it it must have some significance
am i gonna have to sit in on one of these lyxtures :-)
 
It's a kind of guaranteed cycle
 
1:43 PM
@lyxal wait wasn't that what i said in the comment you disputed
 
@UnrelatedString probably is then
I'm new to this whole graph theory thing, so I may be a little smooth brain terminology-wise :p
CMQ: What's the default output rules for decision challenges?
 
it's in the tag wiki IIRC
 
is it enough to say "default decision problem output rules apply" or do I need to specify some criteria?
asking because it's been a while since I last wrote a decision problem
 
i'm honestly not sure if you need to say it as long as you include the tag, but that would be enough yes :P
 
2:02 PM
@lyxal True. Consider a maximal connected subgraph of G, G'. There must be a maximal path in G'; WLOG let it be m~n. By the question, n has another neighbor, and as G' is a maximal path, the other neighbor of n is in G', z, and thus z-n~z (through the maximal path) is a cycle. Q.E.D.
 
yes
my point was more that it was another example of a guaranteed cycle
 
ough now i wanna think about graphs forever :-)
 
i remember there was also, a graph G with finitely many vertices each of degree ≥3 contains an even-lengthed cycle
 
my brain just came across the (obvious) construction that any cycle can be extended by adding a vertex anywhere
and i dont know why but that is so awesome. love that
 
So maybe, for any n, a graph G (...) ≥ n+1 contains a cycle which length is divisible by n
who is willing to change the nineteenth byte into a MSE chatroom?
Anyways, let me see that question...
 
2:06 PM
0
A: Sandbox for Proposed Challenges

lyxalIs This an Equivalence Relation? code-golf decision-problem Given a relation, and a domain, output whether the relation is an equivalence relation. Context For this challenge, a relation is defined as being a set of ordered pairs that is a subset of the cartesian product of a domain with itself. ...

 
oh hey that's me
I wasn't expecting the X to be that far indented from the left :p
 
seeing a latex issue in that post :P
 
There's too much math in code golf
1,654 questions has the tag
 
@thejonymyster huh, TIL MathJax requires matching brackets
 
About this, I think all implementations will use no math
at least most of the
m
 
2:12 PM
Code golf is math though right? We're all collectively trying to find the algorithmic complexity of a problem, which we will be doing forever since it can be proved impossible
 
> algorithmic complexity
you don't know a thing about code golf, assuming you are talking about time complexity
 
Algorithmic information theory (AIT) is a branch of theoretical computer science that concerns itself with the relationship between computation and information of computably generated objects (as opposed to stochastically generated), such as strings or any other data structure. In other words, it is shown within algorithmic information theory that computational incompressibility "mimics" (except for a constant that only depends on the chosen universal programming language) the relations or inequalities found in information theory. According to Gregory Chaitin, it is "the result of putting Shannon...
No, not asymptotic complexity, but information density
 
@lyxal
about this
1
A: Sandbox for Proposed Challenges

lyxalSimplify a Cycle code-golf graph-theory Given a path of vertices that form a cycle on a graph, output a simple version of the cycle. That is, if a vertex appears twice, snip out the part in between the two appearances. Context Let \$u\$ and \$v\$ be vertices of graph \$G\$. If there is a cycle fr...

I think a cycle is not allowed to have repeating vertices, which makes this question trivial
i think you mean a loop
And, request for a test program
 
55 mins ago, by lyxal
I'm just going off what they said at the lyxture :p
55 mins ago, by lyxal
user image
 
Hmm, ok then
I really think you should remove the edges for simplicity and elegancy and understandability
because it doesn't matter
 
2:23 PM
I did
the challenge already states that edges don't matter in this case
 
I mean, in the example, the question body
> ... any cycle 𝑣1,𝑒1,𝑣2,𝑒2,...,𝑒𝑚,𝑣𝑚 with a vertex ...
A cycle ... do not travel to any vertex twice. from MSE, math.stackexchange.com/questions/1490053/…
but it also seems that,
> A loop is commonly defined as an edge ... with both ends as the same vertex.
Oh wait, it's called a circuit
> A cycle in graph theory is a closed path i.e., we start and end at the same vertex. In between, **we don't get any chance to travel twice**.

The circuit is defined as a closed trail. It means that it is a path that starts and ends at the same vertex. (so we can travel twice)
7 mins ago, by Number Basher
And, request for a test program
@lyxal
 
maybe tomorrow
12:28am is way too early/late to be thinking big brain stuff :p
 
ok, see you tmr
I can post a test program in the comments
Questions for @lyxal : 1. can we output [1,2,7] as [2,7,1]? 2. can we output [1,2,7] as [7,2,1]? 3. [1,2,4,3,2,4,5,3] ==> [1,2,4,5,3] or [1,2,4,3] ? or both OK?
 
2:48 PM
i think it has to be 1,2,4,5,3, since the edge between 4 and 5 isn't part of a removable cycle
@thejonymyster @NumberBasher here's where I asked the same thing, and the following discussion where we tried to sort out an explanation because I wasn't understanding it either
in case that helps :-)
 
 
1 hour later…
4:05 PM
I have a Python question: why does print(b'\xff') print \xff, but print(*b'\xff') prints 255?
I guess the answer is just "that's how the spec is defined"
 
4:20 PM
@Adam I imagine it's because a bytes object is conceptually an array of bytes. If you print the whole thing, it'll treat it somewhat like a string, but if you index into it (which you're essentially doing by splatting it), you get an integer between 0 and 255.
 
More specifically, print calls str() on its arguments, so print(b'\xff') outputs the __str__ representation of the byte string, which returns an escaped version of it
But when you use print(*b'\xff'), you're splatting the bytestring into the arguments of print. A byte string, when iterated over, returns a sequence of integers for the codepoints
so in this case it's equivalent to print(255, )
and print(*b'hello') is equivalent to print(104, 101, 108, 108, 111, )
 
@pxeger I guess my question was "why does iterating over a byte string turn it into an array of integers?"
And the answer to that is "because that's how it's defined"
 
Honestly no idea
 
@Adam Because a byte string is an array of integers
 
I would guess it's because there's no "byte" object
 
4:24 PM
But a string is also fundamentally an array of integers, and when you iterate that you get a sequence of length-one strings
 
True, but technically everything is an array of integers on disk
 
I guess it's on the assumption that with bytes you care more about the byte codepoint values
 
If you're iterating over a string of characters, you get each character. If you're iterating over a string of bytes, you get each byte. It's possible that a given byte is only part of a character, so it doesn't make too much sense to treat it as a character.
 
The question is more why don't you get a length-one byte string?
(which, actually, you do in Python 2)
 
Hmm. I had been assuming that a bytes combined multiple bytes into a single character when displayed, but now I see that's not the case. So I guess I don't know. Maybe it's expected that you'll be doing some math on the byte values??
 
4:32 PM
Bitwise operations, more likely
@DLosc bytes has no assumptions about encoding; there's nothing to say it's UTF-8
 
Ah, fair
 
5:11 PM
I just found a site where it says "Longer is better" next to the password field when signing up, and "better" links to xkcd.com/936
 
5:22 PM
With modern tools I think they're about equally difficult, at least within a few orders of magnitude, since guessing words is another method that people use
Wait no, Munroe took that into account
 
still not on a first name basis with randyrands i take it?
also, where does he take it into account? :-) i didnt finded it when i looked at the page
every now and then i consider having a freakishly long uncrackable password but then i worry about 1. forgetting it 2. it being leaked through no fault of my own anyway e_e
well, less forgetting it and more having to type it :P
 
@thejonymyster Oh no, we go way back.
Met in kindergarten.
(I forgot which was his last name :p)
@thejonymyster 44 bits is 4*11 bits, and 11 bits is a (low) estimate of how much entropy a common english word has, definitely no where near the entropy of all the characters in the word combined
 
Mandall Ruht-roh
ahh fair
its always weird when people call him "the xkcd guy"
wait im veering into offtopic, ill ask my associated question in ottnb
 
5:45 PM
@thejonymyster This is why my password is hunter2. Very easy to remember
It's pretty unlikely someone will hack me/Google and take all my monies, right?
 
5:56 PM
@user hey, we're password buddies
 
Ooh gimme ur email
Then I can hack all your accounts
 
6:32 PM
@Steffan It's spamspamspam@pxeger.com (yes, really)
 
thats a good email
 
7:10 PM
@user whyyyy
 
 
1 hour later…
8:28 PM
what if a challenge is too big for a cmc but too small for main
 
CMegaC
 
"CMegaC" is normally for things that are essentially impossible
 
I know
I guess it could just be CC (chat challenge) if it's not mini or mega :P
 
8:45 PM
it's categorically a cmc if it's too small for main :P
 
so does chat imply mini?
 
or mega
unsuitable for main
 
mini implies chat?
are these labels necessary or sufficient?
someone write a proof
 
probably™️
 
Oh guys do you know Unrelated's theorem, one of the most famous proofs in 21st century mathematics? Yeah it was that one that concluded with "yeah, maybe, I guess"
10
 
 
1 hour later…
10:01 PM
@thejonymyster it can either be [1,2,4,3,...,5,3] or [1,2,4,3,...]
Wait, argh, the server broke
 
@pxeger "And so, we conclude that the Riemann hypothesis is correct. Maybe. Yeah, maybe. I guess?"
 
"Yeah I mean this collatz thing looks pretty sound to me. Maybe. Yeah. Yeah."
 
"Pretty sure P is, like, maybe somewhat in the vicinity of NP, kinda? Like, if we squint, they look like the same roughly similar thing?"
 
"We're about 90% sure that Fermat's Last Theorem is true. Maybe."
 
10:16 PM
That one's been proved though
And it doesn't end with any probablies :p
 
@RadvylfPrograms Kinda maybe proved. Why not? Let's say, sure it's been proved
 
has it really though?
 
Y'know it would be really funny to make a multiple-hundred-page proof of something like P=NP and hide a sneaky little "assuming P=NP" in there somewhere just to waste people's time
On like page 98
 
lmao
 
@Ginger What if someone finds x, y, z, n such that the theorem is shown to be false? Check mate liberals
 
10:19 PM
dammit :b
 
00:00 - 23:0023:00 - 00:00

« first day (4227 days earlier)      last day (621 days later) »