Surreal Numbers
Surreal numbers are one way of describing numbers using sets. In this challenge you will determine the value of a surreal number.
Intro
A surreal number consists of two sets: a left and right. The value of the surreal number must be greater than all numbers in the left set and ...
Can you write an instance of (a -> a) -> a? I can't come up with any.
The standard definition of the Y combinator is not a pure function I believe, it would be fix f = f (fix f), which I think is the same as fix = undefined.
Yeah, just give it a function that has no fixed point and it will never halt.
I don't think that type has any instances.
Anonymous
5:19 AM
@WîtWisarhd How is it not pure?
Anonymous
It has 0 side effects, and performs consistently when evaluated with the same arguments repeatedly - it either returns the fixed point if one exists, or runs infinitely if no fixed point exists.
@cairdcoinheringaahing Exactly, we just didn't do anything. The site was particularly inactive when I would have thought it would be even more active due to WB. Not to mention that we're really low on hats on the site-wide leaderboard.
Graph theory is used to study the relations between objects. A graph is composed of vertices and edges in a diagram such as this:
A-----B
| / \
| / \
| / E
| / /
|/ /
C-----D
In the above diagram, A is linked to B and C; B is linked to A, C, and E; C is linked to A, B, an...
I don't think copyright comes into play here because Amazon isn't even using any ideas from APL. Trademark comes closest, I think, since APL is sorta like a "brand", but even then, it hasn't been marketed as a brand or anything like that, so there's no ground to stand on there.
Yeah. While I don't think there's any legal ground to force Amazon to change their naming, maybe a letter or something co-written by the major developers of APL could make a case.
Average Strictly Increasing Sequence
code-golf number random
Imagine rolling a six-sided die. Roll, record, and repeat, until one roll is no greater than the previous. You'll end up with a strictly increasing sequence of at least one integer, but no more than six, having rolled seven times at m...
So far I have "Crossed out __ is __ :(" for pushing a number to the stack, "Explanation of an unreadable Pyth answer:" for a comment, and "Post a question on the Sandbox" to print the top of the stack in it's Unicode value
"Add one byte in a code-bowling submission" An incrementor "Save one byte in a code-golf submission" A decrementor "Post a submission on the __th prime number question derivative" Access nth stack element
Any suggestions on this?
"Ask a question on The Nineteenth Byte" Take input
@Adám is "Ask a question on The Nineteenth Byte" good enough for taking in input?
CMC: Given a matrix A and a matrix B, return the number of times A occurs as a submatrix in B. Occurrences may overlap. E.g. A=[[1,4],[3,1]], B=[[3,1,4,5],[6,3,1,4],[5,6,3,1]] → 2. A=[[3,1,4,5],[6,3,1,4],[5,6,3,1]], B=[[1,4],[3,1]] → 0
@MilkyWay90 If the phrases are rigid, and cannot be nested, then I guess, yes. But just looking at the first few characters to identify operation would be enough, no?
Chat Mega Challenge: There are roughly 43 quintillion valid states for a 3x3x3 Rubik's Cube. What is the largest subset of valid, unsolved states that can be solved without passing through any intermediate state that is also part of that subset, using only the basic twelve moves (F, B, U, D, L, R, F', B', U', D', L', R')?
@JonathanAllan so, I can't really understand the challenge here, but it looks like you can, can you please tell me a bit more? (note: I've frantically tried not to see your answer so far... :P) also, the input you've provided to your answer doesn't look very symmetric to the diagonal to me
@EriktheOutgolfer I see it as "How many ways can you pick a subset of the nodes, of size n, such that the subgraph between those nodes [is symmetric and] has all non-diagonal weights equal?"
and not any sub-matrix, only those representing sub-graphs - i.e. the top-right 2-by-2 of a 4-by-4 (or larger) is a sub-matrix but not one which represents a subgraph
CMC: Given a year as input, output how many leap years have occurred/will occur in the years from 1 to N AD (inclusive). Note that the Julian calendar was used until 1582 when it was replaced with The Gregorian calendar. For this challenge, assume that we will use the Gregorian calendar until the end of time
@DJMcMayhem It was only the leap year system that was begun then, not the actual year label. For a long time that continued to be "year of current ruler's reign".
does 1582 count as a leap year? ("When the new calendar was put in use, the error accumulated in the 13 centuries since the Council of Nicaea was corrected by a deletion of 10 days")