CMP: Trying to rewrite the string task for fitness challenge. For now I used substring replace and count. Do you have any other ideas for "string operations"?
The Fabius function is an example of a function that is infinitely differentiable everywhere, yet nowhere analytic.
One way to define the function is in terms of an infinite number of random variables. Specifically, given a sequence of independent random variables \$\{U_n\}\$, where each \$U_n\$ ...
when i first joined i like posted one and i couldn't golf and stopped doing stuff. a few years later i remembered, and i was like, hey, that might be fun
Tho, I still haven't reached my challenge goal: to write a highly upvoted challenge, with genuinely interesting, compelling answers, that is somewhat innovative
My favourites are this (didn't get enough answers), this (Bubbler trivialised it), this (just a regular CG challenge), plus a few other challenges that aren't upvoted enough imo
I like the OEIS answer chaining challenge, don't get me wrong, but, as answer chaining challenges go, it's really not great, plus, the answers got boring very quickly
@emanresuA Yeah, I'd like to redo it at some point
I don't see any dupes. The similar ones are different 1) by asking for specific denomination only (often USD or Euro) 2) by asking number of combinations instead of permutations
based off my previous challenge, this wikipedia article, and a Scratch project
Your task: given i, calculate π till i terms of the Gregory-Leibniz series.
The series:
$$\pi=\frac{4}{1}-\frac{4}{3}+\frac{4}{5}-\frac{4}{7}+\frac{4}{9}-...$$
Here, 4/1 is the first term, -4/3 is the second, 4/5 is ...
The wizard's revenge
The wizard, annoyed by his witch cousin, is determined to pose the most challenging challenge yet. He poses the following.
The wizard has 50 real number lines, each stretching from 0 to 10 and they re all hidden from you. Also hidden from you, for each number line he choose...
it's not even a draft.. I just haven't written the challenge yet!
Take an input string representing a number and convert it to decimal (base 10). However, the base of the input is not specified. Assume the input is in the smallest base for whi...
@Seggan noob question: what exactly are those externs? i cant guess what they do from the description (dont know what that sort of mangling is), and the example doesnt tell me much either :o
and regular question: why extern and not just ext :P
@thejonymyster basically Rol is transpiled to lua, and to store info about compiled functions, it uses name mangling: putting the function's info into the name. extern prevents that, so its just the function's name that gets stuck in the resulting code and allows for lua interop
if your code page isnt all the same size (like how unicode has characters that are multiple bytes etc) whats that called? not a SBCS since its not Single Byte, so would it just be a Code Sheet / Code Page ?
@Seggan yeah i suppose, but i guess i was just wondering if it had a special name like SBCS or HBCS, or if those ones only have special names because of the fixed character size :P
Clearly, all reasonable languages skip any fn or arg, and simply assume that each line of code is an independent function, that does a different thing depending on how many arguments it is passed
I remember stopping work on TAGL since there ended up being some sort of amiguity that just completely ruined the syntax, but it'd be pretty cool to get it working
Well I can already see a big one, that being that if/for are indistinguishable from function declarations
I have this code which I have written in Python/NumPy
from __future__ import division
import numpy as np
import itertools
n = 6
iters = 1000
firstzero = 0
bothzero = 0
""" The next line iterates over arrays of length n+1 which contain only -1s and 1s """
for S in itertools.product([-1, 1], repe...
This is perhaps one of the classical coding challenges that got some resonance in 1986, when columnist Jon Bentley asked Donald Knuth to write a program that would find k most frequent words in a file. Knuth implemented a fast solution using hash tries in an 8-pages-long program to illustrate his...
> How would you deal with a user who produced a steady stream of valuable answers, but tends to generate a large number of arguments/flags from comments?
@Feeds @AncientSwordRage Would you mind editing this message so it says something more descriptive as a pin on the starboard? Something like **[Submit Questions for the Upcoming Moderator Election](https://codegolf.meta.stackexchange.com/q/25128)**
@pxeger Let n be the number of answers written by a given user. It is trivial to see that, at some given point in time, the user had written 0 answers. Assume the user, having written n answers, will write an additional answer. Therefore, by induction, we conclude that the user has written an arbitrary number of answers
Probably so--anyone who's looking to answer a challenge will read the challenge and form an opinion on whether it needs to be closed, whereas not everyone who's looking to answer a challenge will read every existing answer to that challenge.