I'd say sure
After all, a float is just a fraction with some extra rules on top. If you can output a fraction that's approximately as accurate as a typical floating point number, I see no reason it shouldn't be allowed.
I think the easiest way to handle this would be to apply any rules the author specifies for floating point numbers' accuracy to fractions, ...
BQN is a powerful modern language based on the ideas of Ken Iverson's APL, which is already quite popular on CGCC.
The main aim of BQN is to remove irregular and burdensome aspects of the APL tradition while adding newer modern concepts to the mix. This makes BQN oftentimes more practical than APL, and gives it a much more consistent, streamlined design ...
List of all Zsh answers posted in November 2021
(first-time posters in bold)
Universal Spooky Meme Translator by roblogic
How long is the number in this base? by Dingus
Rotate N Values in a List by GammaFunction
yes is 91 lines long by roblogic
Swap every two elements in a list by pxeger
Digit small numbers by Seggan
Universal Spooky Meme Translator ...
Create the shortest code snippet of the power functions 1 through 10 which can be compiled to assembly code and which contains the minimum number of imul assembly operations. For better comparison use https://godbolt.org/ and either GCC or LLVM.
Did you know the fastest way to calculate x⁴ is not x*x*x*x, but y = x*x; y*y which saves one ...
This could totally work
The sandbox has thousands of challenges, many of which are good, and many of which will never see the light of day. Cleaning up 25 of these and adding some winter theming on top shouldn't take too much work, especially since we can work on the later ones throughout early december. We still have nearly two weeks until the first, which ...
Community Wiki posts are specifically for posts that are edited often by multiple members of the community. The LOTM nominations body is a perfect example for this, and so the question should be made CW.
Unfortunately, making a question into a Community Wiki also makes all answers to that question Community Wiki as well, which appears to be ...
Scala was previously the language of the month for January (see that post for more detailed information on Scala). It blends OOP and FP into a concise, expressive package. While it has some advanced features that couldn't be learned in an hour, the basics are probably easy to grasp, especially those involving code golf, which is what we're most ...
AoCG2021 Day 1: Automated delivery frenzy
The story continues from AoC2015 Day 3, Part 2.
Santa is delivering presents to an infinite two-dimensional grid of houses. He begins by delivering a present to the house at the starting location, and then follows the commands written as a sequence of moves ^>v< (moving to the neighboring house ...
AoCG2021 Day 4: Infinite Elves and infinite houses 2
Related to AoC2015 Day 20, Part 1.
To keep the Elves busy, Santa has them deliver some presents by hand, door-to-door. He sends them down a street with infinite houses numbered sequentially: 1, 2, 3, 4, 5, and so on.
Each Elf is assigned a number, too, and delivers presents to ...
Because it does not have a objective scoring criterion.
As phrased the shown challenge has a single correct answer. We require challenges with multiple correct answers which can be ranked, so that you are encouraged to improve on your answer.
As such this is either regular Q&A and as it says in our tour page:
We are not a Q&A site.
Or more likely ...
Worst case of Slowsort code-golf sequence sorting
Slowsort is an in-place, stable sorting algorithm that has worse-than-polynomial time complexity. The pseudocode for Slowsort looks like this:
procedure slowsort(A, i, j) // Sort array range A[i ... j] in-place.
if i ≥ j then
m := floor( (i+j)/2 )
Light it up
Imagine you have a grid where some squares are walls, some are empty, and some are lights that shine for arbitrary distances in the four cardinal directions until they meet walls:
In the above grid, the lights cover all the tiles. But in some cases, they may not be:
Your challenge is,...
Leave ABACABA on the tape
Note that will be removed post sandboxing: This challenge is Brainfuck-specific, but I hope that its contents make the reason why sufficiently clear.
Write a brainfuck program which leaves the following sequence on the tape:
0 1 0 2 0 1 0 3 0 1 0 2 0 1 0 4 0 1 0 2 0 1 0 3 0 1 0 2 0 1 0 ...
This sequence may be familiar to some as ...
Inspired by my geography class
Simulate weathering / erosion.
Input will be given as a string of any 2 character you like in the shape of the rock (here i use space and hashtag):
Or if your language doesn't support strings, a square matrix of 1s and 0s, a matrix of chars, whatever makes ...
Climbing up slippery stairs code-golf math combinatorics
You're standing in front of a stairway with \$n\$ stairs in total. (If you label each staircase \$1,\cdots,n\$, the starting point counts as the 0th staircase.) You can climb up \$1,2,\cdots,k\$ stairs at a time. But some stairs are slippery; if you step on it, it will cause you to slip ...
Lexigolf: Is this number a prime?
Write a program that, given a strictly positive integer n as input, determines whether n is prime and prints a truthy or falsy value accordingly.
For the purpose of this challenge, an integer is prime if it has exactly two strictly positive divisors. Note that this excludes 1, who is its only strictly positive divisor.
100 rep for interpreting a TC language in Tarfish
Answers should go to this question. Add a comment to this as well.
Any tag system
Anything implemented in the linked question
Groovy is a static/dynamic language that runs on the Java Virtual Machine. It supports a large subset of Java, but features such as dynamic typing, optional semicolons, and implicit returns allow writing of code that is much shorter than Java (here is a nice demonstration of how short it can be compared to Java). Groovy is also widely used in DSLs, ...
An event with this name just isn't complete without the language that started it all.
Taken from the Haskell Wiki:
Haskell is a computer programming language. In particular, it is a polymorphically statically typed, lazy, purely functional language, quite different from most other programming languages. The language is named for Haskell Brooks Curry,...
I'm fully in support of such an event, but...
... maybe it's too late to build such an event for this year, I guess?
The main issue is about coming up with the challenges in the first place, obviously. Eric Wastl, the host of AoC, is known to spend the whole year to prepare for the 25*2-1 challenges. Probably we're in better situation (we're a bunch of ...
AoCG2021 Day 2: Naughty or nice?
code-golf decision-problem string
The story continues from AoC2015 Day 5, Part 2.
Santa needs help figuring out which strings in his text file are naughty or nice. He has already tried two sets of rules, but they're totally ad-hoc, cumbersome, and janky, so he comes up with a single rule that will rule them all:
A string is ...