Print out all words found here: https://en.wikipedia.org/wiki/2020_United_States_House_of_Representatives_elections. It doesn't have to be formatting similarly. It can't take any input.
Gaussian integer is a complex number in the form \$a+bi\$, where \$a,b\$ are integer and \$i^2=-1\$.
The task is to perform such operation for Gaussian integers \$a,b\$, that
\$a=q \cdot b+r\$ and \$|r|<|b|\$ (\$q,r\$ are Gaussian integers, \$|z|\$ is defined as \$\sqrt{a^2+b^2}\$ for \$a+bi=z\$...
Flags Mashup Bot is a small Twitter bot that generates a new flag based on two random flags and tweets the result every couple of minutes.
Task
Your task is to replicate what the bot does by writing a script or a function based on the following criteria:
The input is any two lossless images ...
print 1000 digits of \$\pi\$ base 3
every digit has to be either +1, 0, or -1, coded +,0,- resp,
output is likely starts with +0.0++-+++-000-0++-++0+-++++++00--++
may be code-golf
or maybe should include some other constants printed that way like exp(1) or euler or gamma(n)
How long should this song last?
Enter the world of sheet music. A composition (the musical piece, which may or may not be a song) is divided into bars. The length of a bar is defined by the time signature.
The time signature states how the bar is divided into beats, and what length of note carri...
@A_ Uh, no, this chat room is for topics related to CGCC, not its users' usernames. Is suggest you frequent this chat room. Username acronyms are 100% on-topic there.
@A_ You were not engaged in a conversation, but rather a monologue.
I'd argue that trying to start an off-topic conversation would be fine; trying to start an off-topic conversation, failing to engage other users, and proceeding to monologue without audience less so.
@JohnDvorak 1. My sentence is an off-topic conversation starter. 2. It engages at least one user because they are known to be commenting on my messages. 3. There is a conversation that happens after this sentence is posted. This seems to fullfill all of your conditions.
@A_ However, the amazing thing about the chatroom I linked you to, is that you don't have to make any considerations at all. All topics are on-topic there!
@A_ Instinct‽ You can make that chat room a favourite (click the star!) and SE will ask you to join the room when you log in.
No input. We need to compute and print the values of \$\pi\$ and Euler constant \$\gamma\$
to \$1000\$ digits after decimal point
in base \$3\$ with digits \$-1,0,1\$ represented as -,0,+ respectively.
For \$\pi\$ output is likely starts with +0.0++-+++-000-0++-++0+-++++++00--++.
\$\pi\$ can b...
Background
The Look and Say Sequence is built up by reading off the digits of previous entries in the sequence, counting the number of digits in groups of the same digit. For example:
1 => 11 # (one 1)
11 => 21 # (two 1s)
21 => 1211 # (one 2, then one 1)
1211 => 111221 # (one 1, then one 2, the...
Reproductive strategy of oozes can be summarized as follows:
o O 8 oo
A population of oozes at generation N is described by a string, for example:
ooooo88ooOoOo8Ooooo8OOoo8Oo8Oo8oo8oooooo8OOooO88o
To compute the population at generation N+1, take one character randomly, and replace it by...
CMC: golf a diophantine equation, a polynomial P(x,y1,...,yn)=Q(x,y1,...,yn) where y_i∊N, ie. {0,1,2...}, such that the corresponding set, {x|x∊N and x fulfills the diophantine} is the set of all fibonacci numbers; the solution with the smallest degree wins
I might main this depending on the feedback I receive
CMC: Given two numbers, return the sum of their squares. Winner is the user who finds a language where this task takes the most bytes (and implements a solution in said language)
This is not code-bowling because you must submit a golfed version, and other users may golf your solutions if possible
@DJMcMayhem I feel like it wouldn't be so bad to exclude BF (or Brain-Flak). As in, the challenge is to find a language with an explicit addition operator that takes the most bytes, fully golfed, to add the square of two numbers.
@DJMcMayhem So APL's tacit functions will be natural for you. Also, as you probably know by now, APL uses atoms and quicks (called functions and operators in APL lingo).
E.g. + is a function and / is an operator here.
⍨ looks like a stylised photo selfie, so it changes a dyad into a monad by using the lone argument as both arguments. Like Jelly does implicitly if you start your link with a dyad but only have one argument.
So you can use ×⍨ to square, i.e. lit. multiply-self.
I tend to do it like this for byte counting purposes, and to avoid having to make output explicit. (TIO's "Input") is actually what one would type into the REPL.)
@DJMcMayhem You can also use an anonymous function inline: (+/×⍨)3 4. In fact, in this case, you could even use the expression +/×⍨3 4 which just calls the two prefix functions without ever combining them into a single function.
@DJMcMayhem Well, in a tacit function, obviously not. You'd have to refer to them my means of a no-op function. A⊣B gives A and A⊢B gives B, so those two functions can be used to address the arguments without modifying them. In an explicit lambda, we use the symbols ⍺ and ⍵ for the left and right arguments (the letters being at the left and right ends of the Greek alphabet, respectively).
APL has three functional forms: tacit, lambda, procedure.
You can e.g. write the sum-of-squares function as the lambda {(⍺*2)+(⍵*2)}
@DJMcMayhem Because the * needs two arguments. You can tell it to use the unmodified argument with f←+/2*⊢
@DJMcMayhem A second functionality of ⍨ is that if you do provide two arguments, it commutes them. so 3÷⍨6 is 2. So you can do 2*⍨⊢ to square the right argument.
@DJMcMayhem Alternatively, you can Curry (or "bind") an argument to a function using ∘. So the square function can be written as *∘2
You can also write ×⍨ as ⊢×⊢ i.e. right-arg times right-arg.
@DJMcMayhem No problem (always feel free to ping me in the APL Orchard). APL distinguishes tacit function phrases from plain expressions by looking at what's on the far right. If an array, then this is an expression, but if a function, then this is function. 2 is an array, so it just starts evaluating Σ0+e²
@Adám better understanding of types? if a variable is 0 or 1 it's quite normal to think it's just a number whereas True/False specifically says it's a boolean
@Adám no? i was showing that more to display how python stored numbers (as they must be objects on the heap), but i have no idea what's happening in python 3
@Adám You can just ignore Pythons is and continue on, just as you could add an is equivalent in APL (though its behavior would be very strange & mostly pointless due to APLs immutability)
@DJMcMayhem Not that I can see. You can shorten (⍳⍴) to ⍳∘⍴ and btw, you should get used to using ≢ instead of ⍴ if you just want the count of elements (major cells) and not the entire shape of the array.