CMC: triangularize. You will be given a string of printable characters without whitespace, whose length is a triangular number. You will format it into a triangle as shown in the example. Trailing/leading newlines and whitespaces are allowed as long as the 2D pattern is not broken. The example below will be for the string abcdefghij.
Write a program or function that takes in a string guaranteed to only contain printable ASCII characters except for space, and to be a positive triangular number (1, 3, 6, 10, 15, ...) in length.
Print or return the same string, but shaped into a triangle using spaces. Some examples will best sh...
First, a mathematical interlude, short, and worth your while:
If 0logistic function f(x) = ax(1-x) maps the interval [0,1] inside itself. This means that one can play the iteration game; for instance, if a=2, the initial value $
0.3 becomes 0.42, then 0.4872, etc.
As the parameter a increases, ...
The things you can buy with a quarter popularity-contest
The goal
Do the most interesting thing you can do in your language in exactly 25 bytes. No more, no less. The winner is decided by how many votes your answer gets.
Meta
Is this an interesting challenge?
Suggestions for a suiting name...
I have been considering the creation of a julia based golfing language.
Proposed name: Jules.
In implementation it would effectively resolve every program into a julia AST,
which would run inside julia.
One feature I was considering was name-fallback.
Where if a variable/function name was not de...
Sample the Sierpinski traingle
Inspired by this video..
Task
Your task is to implement the following method to sample a Sierpinski triangle and plot all the intermediate steps.
Method
Given three points a,b,c and some starting point x_0, for each iteration you sample one of the three points ...
@ATaco Any idea why my browser logs thousands of WebSocket connection to 'wss://a-ta.co/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED connect @ VM190:94?
Although this downtime has been a dissapointment, it's the first time something like this has happened, I don't think I'll be changing hosts at a drop of the hat like this.
One of the other issues I have with this service is that you can't import or export images. You can make snapshots internally, you can transfer them between datacenters and accounts, you just can't import/export them.
@ASCII-only One that can't actually run within a finite amount of memory. Instead of having bultins for generating arrays such as every factorial up to n! or every integer up to n, it would have builtins that generate an infinite array of every factorial or an infinite array of every integer, then have functions to operate on those infinite collections
I'd never have to actually make an implementation of the language, just write a detailed spec of it. It'd be a theoretical language because it would be impossible to implement exactly-to-spec
@ASCII-only exactly. And once you've found which parts you want to pick out, those values get calculated.
@ASCII-only Many languages have a function for Nth prime, but conceivably you could re-package that as the array of all primes, and then calculate the wanted one upon indexing.
@Mayube Well Theoretically it will never return infinity, instead it would return a value not representable using every quantum property in all the real and virtual particles in the universe
The infinite series whose terms are the natural numbers 1 + 2 + 3 + 4 + ⋯ is a divergent series. The nth partial sum of the series is the triangular number
∑
k
=
1
n
k
=
n
(
n
+
1
)
2
,
{\displaystyle \sum _{k=1}^{n}k={\frac {n(n+1)}{2}},}
which increases without...
Unique is Cheap code-challenge string restricted-source
Write a function or program that determines the cost of a given string, where
the cost of each character equals the number of how often this character has already occurred in the string
and the cost of the string is the sum of its charac...
Make String Waves stringcode-golf
SANDBOX
Any feedback is appreciated
Suggestions to Test Cases or to Specs
Any other wording / formatting improvements
Other relevant tags?
Given a string as input, output the string with the following algorithm applied:
1. Split the Str...
@ASCII-only sure, but I wouldn't consider it my language. I posted the spec on esolangs specifically so that anyone can edit and modify it and make it less bad
it'll keep going past newlines and run further lines
but <> allow you to flow-control and skip or backtrack
c>\n? will run the ? regardless of whether c returns true or not, depending on the implementation it could be written as c ?, where the space is the character to skip if c is false
> I'm usually a fan of the Numberphile crew, who do a great job making mathematics exciting and accessible, but this video disappointed me. There is a meaningful way to associate the number -1/12 to the series 1+2+3+4…, but in my opinion, it is misleading to call it the sum of the series.
> Furthermore, the way it is presented contributes to a misconception I often come across as a math educator that mathematicians are arbitrarily changing the rules for no apparent reason, and students have no hope of knowing what is and isn't allowed in a given situation.
> In a post about this video, physicist Dr. Skyskull says, "a depressingly large portion of the population automatically assumes that mathematics is some nonintuitive, bizarre wizardry that only the super-intelligent can possibly fathom. Showing such a crazy result without qualification only reinforces that view, and in my opinion does a disservice to mathematics.