@AkivaWeinberger I think it's fine (and an interesting pattern). You probably won't get a lot of answers, but that's okay--we have plenty of easy challenges, it's nice to get a moderately difficult one sometimes.
That's our most common tag, and the easiest to get right. If you can't think of any other scoring systems, code golf will work just fine
If you do want to use another scoring system, you'll likely have to edit the question (depending on that system). With code-golf, you can just add the code-golf tag and you're all set to go
>>> 0xfor (lambda a, b: a + b) in [1, 2, 3, 4, 5]
15
>>> eggs ,= 0xfor (lambda a, b: a + b) in [1, 2, 3, 4, 5], # You can save it to eggs with ,= operator
>>> eggs
15
A Latin square of order n is text which is arranged as a square of n lines by n columns, contains n different characters, and each character appears once in each line and column. For example, here is a Latin square of order 9:
Code gOlf
ode gOlfC
de gOlfCo
e gOlfCod
gOlfCode
gOlfCode
OlfCode g...
You are the treasurer and you have received information that a counterfeit coin has entered the treasury. All you know is that the counterfeit coin is lighter than the original
Knowing how many coins you have in total and using only a balance scale, you need to determine for the minimum number of...
Let's say you are given an integer array. Create a function to determine the largest sum of any array's adjacent subarrays. For instance, the contiguous subarray with the largest sum is [4, -1, 2, 1] in the array [-2, 1, -3, 4, -1, 2, 1, -5, 4].
You can employ a variant of Kadane's algorithm to r...
You are given a matrix of size m x n where each cell can contain either 1 or 0. You need to find the largest square submatrix that contains only 1's. The output should be the area of the largest square submatrix.
For example, given the following matrix:
1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0
Th...
Write a program that takes an undirected graph and finds the minimum cut, i.e., the set of edges that, if removed, would disconnect the graph into two or more connected components. The program should have a time complexity of O(n^2m), where n is the number of vertices and m is the number of edges...
Ad:Register now for APL Seeds '23, a free online user meeting on 22 March 2023 from 14:00 UTC. This event is aimed at new APLers and the APL-curious (although all are welcome) and includes a brief introduction to the language and the available learning resources as well as some application demonstrations. More details to follow soon.
Random point inside boundary
Given an ASCII art with closed Eulerian paths using | and - (pipes and dashes), output a random point inside the boundary.
Eg. given:
---- ----
| |- --- => |12|- ---
| | | | |456| |7|
----- --- ----- ---
Any point 1-7 shoul...
Worth noting in Rust you still need to specify self as an argument, despite it having special meaning (that's so that you can clarify whether the method mutates the object)
So it's not a Python-only thing to have that annoying self in every method
the cpython/pypy things seem top-aligned with the buttons which looks a bit odd. also about the colons and alignment, have you tried right alignment or do you not like that
The table's just to make the column of variant names a consistent width, and prevent overflowing from putting them underneath the variant name
@hyper-neutrino That's true I guess
(although the way this is meant to be used, it would imply that. I'm just using made up Python versions, but it's supposed to be the same versioning for the different interpreter options)
I am considering dropping the multiple-variants-in-the-same-language thing tho, and just having different versions, with multiple languages (like Python (CPython), Python (PyPy), etc.)
It does make it more cluttered (and possibly intimidating to someone who isn't sure which Python or which JS they're supposed to use), tho
(I mean, I suppose that problem exists for either solution, but with the current one you can have the most recent version of a sensible default interpreter selected)
I think I'm just gonna end up writing my own (domain-specific) JS framework lol
The page layout is entirely dynamic (e.g., you don't need compiler args for brainfuck, but you need two sets for a language that transpiles to a compiled language, you use an image upload/editor instead of a text input for non-ascii piet, etc.)
Which makes it very annoying to write with JS's built-in DOM stuff
Saint Valentine (Italian: San Valentino; Latin: Valentinus) was a 3rd-century Roman saint, commemorated in Western Christianity on February 14 and in Eastern Orthodoxy on July 6. From the High Middle Ages, his Saints' Day has been associated with a tradition of courtly love. He is also a patron saint of Terni, epilepsy and beekeepers.
Saint Valentine was a clergyman – either a priest or a bishop – in the Roman Empire who ministered to persecuted Christians. He was martyred and his body buried on the Via Flaminia on February 14, which has been observed as the Feast of Saint Valentine (Saint Valentine...
all of the object's methods are in scope unqualified, you can treat normal functions like they're methods supplying the first argument as the object they're called as methods of, if you call a function with too few arguments it tries a method call with an implicit this argument
Brainchild just forces an additional argument into function definitions/calls called this, although this is not a keyword and can be re-assigned or assigned outside a class/function.
Though BrainChild also has no way to handle varadic or default arguments…
Define the (unnormalised) Willmore energy of a surface as the integral of squared mean curvature over it:
$$W=\int_SH^2\,dA$$
For surfaces topologically equivalent to a sphere \$W\ge4\pi\$, and \$W=4\pi\$ iff it is actually a sphere. Thus the energy quantifies how spherical a surface is.
In Septe...
Entity Component Systems. Data is split into "Components" which store data, and controlled by "Systems" which operate on Components. They are collected as "Entities" which can refer back to the Components and Systems.
@emanresuA Can theoretically be also used for Database stuff.
Best used when you need to reuse code for properties shared by many things, but those things are conceptually different.
except that they can take any type (not just functions), and since functions are syntax sugar for variables in Rol, any variable assignment can be annotated