Bot Factory KoTH (2.0)
king-of-the-hill javascript
This challenge is a modified redo of Bot Factory KoTH, which was completely broken by a mistake in the spec.
In this challenge, bots (consisting of JS functions) move around an infinite factory (playing field), collecting characters. These chara...
From the subreddit r/SpeedOfLobsters:
Edit the text of an image to create a new phrase
This meme format/style is pretty self-explanatory. Simply have a browse through the subreddit if you need more examples. However, when coming up with ideas, it can be quite difficult to decide exactly which l...
CMC: Given a Boolean list and a count, return the index (0 or 1-based) of the first occurrence of a run of the given count of falses. If no run of that length is found, return a recognisable value e.g. -1 or the list length or for 1-based indexing: 0 or 1+length, or null etc.
Radical of an integer math code-golf
The radical of an integer (written as \$rad(n)\$) is defined as the multiplication of all prime numbers which divide it.
For example, since \$ 504 = 2^3 \cdot 3^2 \cdot 7 \$, \$ rad(504) = 2 \cdot 3 \cdot 7 = 42 \$.
Challenge
Your task is to write a function o...
@Adám Gaia, 2 bytes: ċI (Try it online!) (these are the built-ins "create n zeroes" and "find first occurence") (I don't know why is swapping the inputs twice in the beginning necessary)
@rak1507 You should try out Scala, it's really fun! Since it's the language of the month right now, I can give you a bounty if you use it for a code golf answer :)
I'm looking for a python lib or function that can do the same as itertools.product, but with the constraint that every returned element has only unique items. That is, uniq_prod([1,2], [1,3]) should return [(1, 3), (2, 1), (2, 3)]. And I want it be efficient, in that it should not construct the full list and then filter. Doesn't have to be golfy, can use numpy, etc. Asking here because just because of the number of python experts.
@rak1507 yeah saw that. from the accepted answer: "you generally have to either post-process the itertools result sequence, or "roll your own".". i was hoping someone here might know of another way saving me from rolling my own.
@Jonah I'm not a python expert, but does this work? I can't comment on the efficiency, though, you may prefer a generator of some sort. Perhaps a set would also be better for lookups.
Write a Length interpreter
Length is a simple stack-based esolang where instructions are encoded as line lengths
The instruction set is as follows:
| Line Length | Name | Description |
|-------------|---------|---------------...
Objectives
Instantiating objects, sending messages, and managing multiple files
Continued practice with loops and decomposition
For this assignment you'll be using the DrawingPanel.java class provided with the textbook. You will need to have this file in the same BlueJ folder as your solution.
Th...
@rak1507 I promise you your professor will give you a good grade on every assignment if you tell them this: Vide hic et paulo Pedicabo ego canis tuis te currere si non dabis mihi bonum gradus (I used Google Translate, so I don't know if it's retained its meaning).
You weren't kidding about it being terrible. A few iterations of English -> Latin -> English and I now have "Looking for your dog if he does not, and the man to whom you want to run, little'm to me, give me, and I do not get good grades." At least it doesn't have any profanity left now.
See also Stack Exchange Glossary - Dictionary of Commonly-Used Terms.
Abbreviations marked with a star (*) are chat specific.
Catalog: A type of simple on-topic challenge where the challenge's aim not so much to find a winner as it is to create a catalog of solutions in many languages.
CG: Code G...
> Eleven: To delete something using moderator powers, e.g. "Yeah, the post is gone, Dennis 11'd it". mod abuse -> mod abuse!!! -> mod abuse !!11!1!! -> mod abuse !!eleven!1!! -> mod abuse eleven -> eleven
In the wild: if you drink milk, you get nutrition. If you drink water, you get waterborne brain eating parasites. Seems like pretty clear evidence that nature prefers milk over water
@user If the cows didn't want to be farmed, they shouldn't have made their milk so delicious. I don't know what they were thinking to be honest, rookie error
> What is the link between Dihydrogen Monoxide and gun violence?
"The incidence of gun violence seems to be rising at an alarming rate. A recent stunning revelation is that in every single instance of violence involving guns, both in the U.S. and internationally, Dihydrogen Monoxide was involved. In fact, DHMO is often very available to those who would do harm to others. Meanwhile, apparently no efforts have been made to limit the availability of this potentially dangerous chemical compound."
> Married couples have found that regular ingestion of DHMO can improve their marriage-related activities, while couples that never ingest DHMO often find that their marriage suffers as well.
Prolonged submergence in DHMO at childbirth is fatal. However, if you submerge an infant in milk, they will be able to stay within the milk for the rest of their life!
SimpleHearts KOTH
SimpleHearts
SimpleHearts is a four player trick-taking card game similar to Hearts, with a few simplifications. Hearts has several possible rule variations, and the rules I will use are outlined here.
For each game, each of the four players are dealt 13 of the cards in a standa...