@Mayube Right. But effectively, it is a language specific code-golf. Wonder if we should edit the question and answers to make it a proper language agnostic code-golf.
How golfy would you consider this function for calculating sum of n-natural numbers? a=0:0!a¬$a+ (P.S. a feature from my eso-lang in progress, I just added)
@trichoplax Ok yes, I see your point, thanks for elaborating. I do however still think that putting a bounty on that is not gonna solve it any bit faster. I think it just makes people write down suggestions that have been discussed, without reading anything of the discussions and decisions that lead up to that point.
In a company, each manager can manage up to x workers. If the company has y workers total, calculate how many managers are required.
Function should take two inputs.
Eg non-golfed definition:
calc_num_managers(num_workers, num_workers_per_manager)
Examples:
If the company has 4 workers, and...
Create an omnifix calculator
Inspiration.
Evaluate a given omnifix expression.
Omnifix is like normal mathematics' infix notation, but with additional copies of each symbol on the outsides of its arguments. In essence, these takes the place of parentheses, and there is therefore no need for ad...
@TheLethalCoder We have not decided yet. We are letting the community submit suggestions (and nonbindingly vote). However, APLPy is an Astronomical PLotting Library for Python.
Create an omnifix calculator
Inspiration.
Evaluate a given omnifix expression.
Omnifix is like normal mathematics' infix notation, but with additional copies of each symbol surrounding the arguments. The outer symbols take the place of parentheses, and there is therefore no need for additional...
@TheLethalCoder Nah, I'm pretty sure about this one. Normally I post obvious challenges straight to main. I only sandboxed this because of the discussion here.
I agree, I can't find anything wrong with it. Though I prefer code blocks to the inline code but that doesn't mean someone won't find something with it.
Inspiration.
Evaluate a given omnifix expression.
Omnifix is like normal mathematics' infix notation, but with additional copies of each symbol surrounding the arguments. The outer symbols take the place of parentheses, and there is therefore no need for additional parentheses.
You must suppor...
@NewMainPosts I'm really sure we had something similar with "omnifix" expressions before (probably not exactly a calculator) with pre-&in-&suffix combined. I just made omnifix up obviously, i think it had another name.
I was browsing esolangs, and chanced upon this language: https://github.com/catseye/Quylthulg.
One interesting thing about this language, is that it doesn't use prefix, postfix, or infix, it uses all three of them, calling it "panfix" notation.
Here is an example. To represent normal infix 1+2 ...
Gate Keeper code-golf time
I was assigned a task to stay by a gate and count how many people enter it. The problem is that my memory is not as good as it was when I first started this job. I need some kind of program to help me count how many people enter the gate until my shift is over.
Task
...
@Dennis btw python 2 hello world shouldn't be print("Hello, World!") that's unnecessary parenthesizing the string
@totallyhuman yeah you hope...most probably language makers first answer hello world and then ping dennis to add to tio...also dennis might not be the best golfer of every language...wait I'm contradicting common assumption or something? :p
@totallyhuman If you will, then listify of a number could be list of chars, and eval of a list of chars could be eval on each (digit), while skipping the invalid chars, or using them to group the digits.
-123.45 → list → ["-","1","2","3",".","4","5"] → eval → [[],[1,2,3],[4,5]]
@totallyhuman In APL, ⍕ stringifies a number, and ⍎¨ executes each char. So, ⍎¨⍕ only works on positive ints.
The following is the rhombus sequence.
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
Your task is to output this, taking no input and using standard output methods (STDOUT, list of numbers or list of strings, etc.).
However, since this is restricted...
@StepHen My personal opinion would have been for you to have posted a new challenge and not edited the OP's off topic one seeing as you basically wrote it from scratch anyway. Though I'm not sure on the consensus here.
I personally think we should let that challenge die. If you want to re-create it yourself do so. But it might be worth posting it to the sandbox first to iron out some quirks like what TH said
@totallyhuman Then ints should give a nested list: 123 → [[1,2,3]]
0.123 → [[0],[1,2,3]] not [[],[1,2,3]].
I think it is unambiguous then. Actually, a nice challenge.
CMC (or main?) : Given a real number, convert it to a list of lists, with the negative sign (if any) becoming an empty list, the integer part becoming a list of digits, and the fractional part (if any) becoming a list of digits.
Recently I had the idea to create a KotH challenge based on a card game (played with regular 52 cards). I then began drafting the rules of the game and the interface method.
The thing is, I was taken aback by how lengthy the specification of the challenge is. The Markdown file that contains my d...
Disappearing Elements
Given a string S and a list of indices X, modify S by removing the element at each index of S while using that result as the new value of S.
For example, given S = 'codegolf' and X = [1, 4, 4, 0, 2],
0 1 2 3 4 5 6 7 |
c o d e g o l f | Remove 1
c d e g o l f | Remo...
In Base-10, all perfect squares end in 0, 1, 4, 5, 6, or 9.
In Base-16, all perfect squares end in 0, 1, 4, or 9.
Nilknarf describes why this is and how to work this out very well in this answer, but I'll also give a brief description here:
When squaring a Base-10 number, N, the "ones" digit ...
Given a real number, convert it to a list of lists, with the negative sign (if any) becoming an empty list, the integer part becoming a list of digits, and the fractional part (if any) becoming a list of digits.
Examples
0 → [[0]]
123 → [[1,2,3]]
-123 → [[],[1,2,3]]
123.45 → [[1,2,3],[4,5]]
...
Given a real number, convert it to a list of lists, with the negative sign (if any) becoming an empty list, the integer part becoming a list of digits, and the fractional part (if any) becoming a list of digits. The digits must be actual numbers, not strings.
Examples
0 → [[0]]
123 → [[1,2,3]]...
@StepHen Because the same thing with different formulae has been asked a lot
@ASCII-only TIO is on the main challenge, the using is top level just added there for clarity that I'm including it in the byte count. And I like the fact you have to import some things but Linq is so useful almost every class ends up adding using System.Linq; to the top of it.