« first day (4237 days earlier)      last day (902 days later) » 
00:00 - 21:0021:00 - 00:00

00:04
Ooh nice, 47777 rep :P
Just need 30k more :P
incidentally I have 65777
1
Q: Persistence of a number

caird coinheringaahingThe persistence of a number \$x = d_1d_2d_3...d_n\$, with \$d_1 \ne 0\$, under some function \$f : \mathbb N_0 \times \mathbb N_0 \to \mathbb N_0\$ is defined as the number of applications of \$f\$ to the digits of \$x\$ before it reaches a single digit integer. That is, if we have the map $$I_f:...

00:49
@NewPosts just in relation to this: vyxal has an element that lets you override the contents of STDIN (that is, whatever was given as input originally is discarded). Is it valid to use it to take a function (and all the other required inputs) as input on the provision it happens in the header and there's no regular STDIN given?
anyone wanna try brute force 81, 82, 75, 66, 78, 80 => 9, 5, 4, 3, 3, 1? I've tried and failed. bitwise ops are fine
@lyxal I'd say no
If it doesn't work when STDIN is given normally, then no
Except functions can't be given through STDIN
The function object is already on the stack in the header
This is just setting STDIN manually instead of having it given on invocation of the interpreter
If there is a way to take function input, I suppose you need to use that
I'd say you can take the function object on the stack, as that's equivalent to assuming it's already defined in the program
00:52
and imo Vyxal has a proper way to do it: write a function that takes a function from the stack
emphasis on "write a function"
@lyxal The problem isn't the function, it's the integer input: that should be provided in a default I/O method
So what if there was an append to STDIN built in?
Could a function object be added to STDIN from the stack?
I think that should be discussed on meta
@lyxal But, my personal opinion is that you'd have to count the code that adds it to STDIN
00:56
I mean, you're hardcoding the function input either way, which is not normally allowed
@Steffan so far i have 3-(x%6)+4*(x%2) which gets all but the first two
80 81 82 -> 1 9 5 sounds hard
yeah haha
im sure theres a better way involving like
writing a program to find it
which is probably what was meant by brute force
yeah
I tried lots of different forms but couldn't find any
01:03
lol i got p close on my own though :P
but yea fair
let me try of form a-x%b+c*x%d like yours
yea mods let you get away with tons of noisy stuff since its like
you might want to also add something to the x's themselves or something to offset the modulos
@lyxal I guess you can introduce a notation for a function on stdin, e.g. Vyxal code surrounded by some delimiter
so youre not relying on just the way numbers are
i have no idea what terms to use for this
nope :/
eliminating the first two gives tons of possibilities
01:10
i have something if you can use bools as 1 or 0
a little long though
sure
this is python
3-(x%6)+4*(x%2)+(x>80)*(x-76) lol
ah nice lol
since its just those two above 80 haha
u can always go back and golf it later when you wanna throw away time and/or computing power
unfortunately that's longer than hardcoding it :/
01:12
yea that was the fear LOL hm
the bigger numbers are char codes so it's shorter than using num lists
well how long is hardcoding it
just to know
so it's just b" "['QRKBNP'.find(x)]
Have you tried using hash?
01:14
byte-strings help a ton
in python 3, hashes differ every time
for strings
only works in python2
unrelated but check out my regex to match even integers in english (ur|lv|[dothxy])(te)?e?n?$ :P
@Steffan gosh dang it I know exactly what this is for now :p
@thejonymyster My regex to match odd integers in English: e :P
5
01:22
thirteen
but also lol
seven
@cairdcoinheringaahing 8 confirmed to be an odd integer
My bad, I golfed 1 byte off it :P
well tbf that isnt "while also not matching even integers" so
01:23
@lyxal I never said it only matches odd integers :P
yeah haha
actually sounds like an interesting challenge
which way around
match all odd numbers and no even numbers; support up to (excluding) a billion (for example)
or even just a regular decision problem
well my regex works if you allow inverse output :P
i wonder if its shorter the other way around though
01:29
@thejonymyster What about billion?
ends with n
Isn't matched though?
Oh wait nvm the (te) isn't
my regex correctly matches all even integers and correctly matches no odd integers
Nice :p
im gonna try going at it the other way though
might be shorter
(might not be, but we never get places by not trying them)
01:34
1
Q: Can Function Objects be Appened to STDIN From the Stack?

lyxalThis is mostly specific to Vyxal, but I've worded the language so that any hypothetical stack language could utilise this Say you have a stack-based language which supports function objects on the stack. And say that there's no way to take function objects on STDIN - they have to be placed in the...

Hmm yes 24 minutes
Man I miss the bots
odds but not evens is way harder
just run it through an answer from this, ez
...yknow, im curious, i will do that
though i suppose that is a modified regex flavour
01:55
oh yeah doh it only takes 1s and 0s haha
You mean this rigt?
sadly doesnt seem to work either :P
for my porpoises
02:21
@emanresuA oh yeah, that's what i was looking for
03:12
:61933025 Why deleted?
Misread a message
For anyone interested, someone on the internet solved this problem in Prolog, with nice explanation for each step involved: john-h-kastner.github.io/regex-complement-prologBubbler 7 mins ago
it's linked in the comments of one of the answers
I never got around to golfing it, but here's regex complement implemented in Prologankh-morpork Feb 20, 2020 at 1:44
Oh there is, somehow I didn't notice it even though I did answer the challenge
maybe it's because it was posted after my answer
it deserves a little bit better visibility anyway
03:29
also the link is broken
I had to trace it back to the GH repo, then it redirected to the new username
03:42
i got the 'odds no evens' regex to two bytes longer than the 'evens no odds'
a bit stuck atm
(?<![^efinr]r?te+|lv|o)[en]$
oh wait it breaks nvm
i have no idea when it last actually worked because it was breaking for something i hadnt accounted for
:P rip that i guess
Do you think anyone would be upset if i submitted the working regex to the even or odd decision problem :P
actually in general;
well it doesn't say you can take it in english
right yeah lol
but i am curious on peoples opinions in general;
what's with the semicolons
are you talking in C
im about to say a thing is why
namely:
CMM: if a problem takes numerical input, would it be OK to take it in english?
or would that be a violation of policy, either by not being a serious contender (i personally disagree), or being "cheaty" input format / not "reasonable"
or anything else
I'd say no because it'll trivialize "convert number to english" challenge, and the english reading of large numbers are not well defined iirc
03:54
fair
trivializing a specific challenge is a bad argument because challenges can always retroactively override defaults (and in cases like this with existing defaults often do)
but i would agree that it's too poorly defined and doesn't have any real rationale
 
2 hours later…
06:25
If you want to write code that is really fast and you want to get it to work in 2 days or less, what language would you learn?
Clearly not C++ :)
Say you can already code in python
@graffe Rust
My catch all answer to all language decision questions
2 days ago, by Radvylf Programs
My parser worked first try after I got all the compiler errors cleaned up
Of course getting the compiler errors cleaned up is the hard part
@mousetail surely that can't be done in 2 days???
Depends how fast you learn
What's your goal?
How advanced knowledge do you need?
@mousetail let's say I want to be able to re-implement codegolf.stackexchange.com/a/251540/108721
I think it's possible
06:30
I can imagine doing that in Julia in 2 days from what I know of it
Then why not use Julia?
But rust looks like a huge amount to learn for a python coder
It's really fast though
You asked for a fast language and fast languages always need to cut some corners in terms of usability. IMHO rust cuts the least corners possible so is the easiest
But if you know some Julia already and think that's fast enough I'd recomend that
Looking at the list of imports, I might not be able to port it to Rust in 2 days
the main blocker being matplotlib
True, the graphs would be more difficult. I assume he just wants to re-implement the algorithm not specifically the visualization
seems a capable alternative to matplotlib
06:47
Yeah you could just use rust to calculate the raw data and then feed it into a python script to make the graphs
CMC: given a positive integer N, output a positive integer M with exactly N digits, where N is a substring of the decimal form of M
fixed
@mousetail I asked for a fast language a newbie could implement something fast in in 2 days :)
It's a trade off
@mousetail yes just the algorithm
I think a beginner could do it in rust in 2 days, if they have sufficient prior knowledge of linear algebra and statistics
06:56
@mousetail what would you point them at to do that?
@mousetail that looks pretty cool
Do the hello world and the binary search guessing game first
I see rust has einsum
And in fact numpy!
I wouldn't use it. It includes a python interpreter so you wouldn't get the performance benefit
Ah....
So the einsum part might be a problem too
There are probably ohher libraries that offer that
att
att
07:53
@thejonymyster apl, string output ⊢⍴⍕
08:16
@thejonymyster Brachylog, 6 bytes: ~l.s?∧
08:51
CMC: determine if a given integer is exactly two less than a power of two
@thejonymyster Vyxal, 2 bytes: Try it Online!
You can assume it's positive
Vyxal, 2 bytes: Try it Online!
I think all[bin] works in Whython
Oh wait nvm that's not how bin works
@emanresuA two less, not one
Oh. Increment then
 
1 hour later…
10:17
1
Q: Number of ways to make an amount with coins

The ThonnuThis is not a duplicate of Sum of combinations with repetition. This question considers 1+2 to be the same as 2+1. The other question doesn't. OEIS link - A000008 Background If you have 4 types of coins (1, 2, 5 and 10 cents), in how many ways can you make an amount? There are 4 ways of making ...

They're getting smarter lol
frick
Soon they'll be correctly formatting them
keep watching FA queue
:D smokey picked them up
@pxeger Where?
10:39
Saw that, smokey did not pick it up
Hm I wonder which mod that was
all deleted by Community, so no mod, just getting enough spam flags from known users
i mean, technically i cast the last spam flag...
Except six spam flags should cause six automatic downvotes right?
(and mod spam flags are binding)
@emanresuA I didn't think spam flags caused automatic downvotes
10:47
IIRC they cause system downvotes or something?
Maybe it's because I always reflexively downvote before spam flagging
Can mods see deleted posts on sites they don't moderate without having 10k rep there?
No.
What I don't get is what they were trying to advertise
just looks like some spammy websites rehosting games
I guess
 
1 hour later…
12:10
I was reading some lecture notes where it has ibb.co/tMb5ZzF . What does the dot over the union sign mean?
I guess it is the symbol for disjoint union
12:28
> V = A Ù B (V is the disjoint union of A and B)
no way
12:44
Funny story: I was doing some vyxal development and went to try out the changes I made on the online interpreter thinking I was running it locally. Turns out I was actually testing on the actual online interpreter, which explains why nothing was changing when I changed things lol
13:12
@pxeger have you ever seen that symbol before?
Probably
:)
what probability?
Unknown unknown
@lyxal hell yes
14:02
0
Q: The "Fly straight, dammit" sequence

The ThonnuBackground "Fly straight, dammit" (OEIS A133058) is a sequence of integers, which has these rules: \$a_0 = a_1 = 1\$ \$a_n = a_{n-1}+n+1\$ if \$gcd(a_{n-1}, n) = 1\$ Otherwise, \$a_n = \frac{a_{n-1}}{gcd(a_{n-1}, n)}\$ In pseudocode: a[0] = a[1] = 1 if gcd(a[n-1], n) == 1 then a[n] = a[n...

0
A: Sandbox for Proposed Challenges

NonoreveRender a triangle in vulkan vulcan The vulkan API is famous for requiring graphic engines to be very verbose. I am curious to see how far we can escape this trend. Task Using vulkan and no other rendering API, have a triangle rendered to screen with a color pattern as seen in this image: For ren...

@NewPosts Is it ok to answer your own question immediatly?
it's generally discouraged, but not forbidden
@mousetail Yes, but usually better to give others a week, especially if you use a more popular language.
I guess in this case it helps illustrate the problem
14:05
You could add a not-golfed reference solution to the problem description.
14:21
@mousetail usually you put your own answer as a reference impl in the question
14:38
What is the hardest math challenge we have ever had?
You know, one that a professional mathematician wouldn't be ashamed to have answered
Determine if the Collatz conjecture is true or not :P
14:51
@user on ccgc?? :)
I think I meant that was answered too :)
15:20
CMQ Consider a stick of length 100. At each step choose an integer break point uniformly along the stick (it could be right at one of the ends), break the stick and remove the right hand part. We store all the parts that have been removed. What is the expected size of the largest part we have removed?
15:51
@Steffan what version do I actually get to use on ATO, tip of master, or is it pinned to a specific commit?
16:24
@Neil It's pinned to what is currently the latest commit. github.com/attempt-this-online/languages/blob/main/languages/…
but it's easy enough to update if you ask me to
16:38
CMC Consider a stick of length 4. At each step choose an integer break point uniformly along the stick (it could be right at one of the ends), break the stick and remove the right hand part. We store all the parts that have been removed. What is the exact expected size of the largest part we have removed?
17:15
@graffe Do you repeat this procedure until the remaining part is 1 unit long?
since we only care about the longest part if we hypothetically continue infinitely removing a length-0 piece from a length-0 stick it doesn't matter :P
@UnrelatedString True, but it does matter whether the base case is when the stick is length 1 or 0 I think
@graffe I wrote some code which goes through all the possible options and I got an expected value of 67/24
But I don't trust my code to be correct
17:53
@97.100.97.109 yes
@97.100.97.109 oh that's cool!
@97.100.97.109 ah :)
Maybe it should be a challenge on main
@UnrelatedString :)
If someone wants to look over the function and see if this is correct, please do so
18:13
0
Q: Does there exist a synchronizing word?

Command MasterA complete deterministic finite automaton is a machine, with some states. Each state in the automaton has, for each character in the alphabet, a pointer to a state (not necessarily a different one). The automaton starts at some state, and then reads a string, character by character. For each char...

@97.100.97.109 What's with the username?
@97.100.97.109 in both cases you've necessarily removed a segment of length at least 1 already
@cairdcoinheringaahing It spells "Adam" (their previous username) in ASCII decimal, but it doesn't look like Adám's username
ahhh
i thought it was an ip address :P
18:31
Me too!
@UnrelatedString Yeah, that's why I chose it :P
Thanks.
But why 97 and not 65?
@UnrelatedString You're right, I'm pretty sure it doesn't actually matter
@Adám I thought it would be more obvious that it was a "translation" of my name if I used the same number for both As, but I don't have a strong opinion on it
18:49
@graffe arguably codegolf.stackexchange.com/q/230737/78410 if you count graph theory and complexity theory as part of mathematics
@97.100.97.109 i got 19/8 but i don't trust my code either lmao
CMC: Given a user name, returns its lowercase's period-separated decimal code points.
E.g. Adam97.100.97.109
@Bubbler it's lovely but I was hoping for a hard question that had been successfully answered here
@Bubbler also not answered!
Answered hard questions are much harder to search for
18:58
@Bubbler I know! That's why I asked here for human help :)
Can you search for time between asking and answering?
@Adám Knight v2.0, 33 bytes: ;=l@;=pP;Wp;=l+l,Ap=pSpF1''O^l'.'
@Adám Knight v1.2, 39 bytes: ;=s'';=pP;Wp;=s++s'.'Ap=pSpF1''O SsF1''
Among my challenges there is codegolf.stackexchange.com/a/240341/78410 where calculating for n=4 was an open problem
19:20
i assume it's mathematically sound to completely ignore the case of removing a length-0 piece
@UnrelatedString that's interestingly larger than 2
looks like this might be oeis.org/A102712
Is there a strategy for soup search? I've tried zillions of times but everything just generates zillions of gliders (and doesn't last very long anyways).
@AidenChow lowercase
@Bubbler that's very cool
@Steffan oh oops, that makes things a bit more complicated
19:38
if there were bitwise ops it would be easy
x&95 gives lowercase, x|32 gives uppercase
19:49
@Steffan That doesn't sounds universal.
ok i fixed it
(hopefully)
@Adám yeah it only works for letters
4
Q: When will the DVD logo hit the corner?

ihavenoideaOne of my favorite memes is the bouncing DVD logo. Yet silly but extremely satisfying, a DVD logo keeps bouncing on a screen and if you ever happened to watch this screensaver, you were most likely anxiously waiting for the logo to exactly hit the corner. I know part of the fun is the waiting, b...

20:13
@Adám Jelly, 6 bytes: Try it online!
Hi TNB! Back from the second worst camping trip of all time
As soon as we got there I got super sick, so it was even worse than it would have been otherwise
(According to a somewhat expired test it's not COVID though)
it could be worse
Yeah, no flaming alligator hurricane
20:21
CMP: zeroth or zeroeth
"but thejonym one of those is red underlined" i have seen both used :P
oh i had no idea name truncation was based on window width
some of yall can see some long ass names i bet
I'm yet to see someone with a cut-off name on my laptop
@AidenChow merriam shmerriam
20:22
caird is the only one on screen cut off for me
i think ltierally all of you are cut off for me most of the time
dang lmaoo
2256×1504 with no scaling is so OP
except like the adams ofc
20:23
i can see full caird if i zoom out 90% :P
and neil and (list of short names)
@UnrelatedString I am not sure this is right.. Imagine you break the stick exactly once. On average you break it in the middle. So the answer for my problem must be at least half the length of the stick. But if you plug in 8 into your code you get a number less than 4
att
att
@thejonymyster zeroth
oh so the process doesn't necessarily repeat indefinitely?
er wait
yeah never mind what
You are looking at the expected length of the longest part you have removed
20:29
oh it's probably because the chunkier partitions aren't weighted properly lmao
Ah ok
Let's make it so the minimum length part is of length 1
att
att
can you break a length-0 or length-4 portion?
So we get rid of the zeros
yeah that should be equivalent
@att you can break at length 4. That is take the whole stick
But I just got rid of taking nothing
att
att
20:35
ok i also get 67/24 for that
@att what do you get for a stick of length 8?
att
att
23727/4480
That looks good!
How high can your code go?
12?
att
att
it's pretty inefficient, trying to rewrite into something that scales better
3734929903/479001600 for 12
20:40
What language is it in?
If you divide it by the stick length it looks like it is converging to something, but what?
And it's golfed!
:)
@att that would be very cool
att
att
that's not golfed (: it's just a train of thought
Any code without white space is golfed to me :)
It will be cool if you make it faster
@att can you check it is actually decreasing as you increase the size? (If you divide by the stick length) . I don't know the language
att
att
it does decrease
20 is 10376194816662503957/810967336058880000 = 0.639742*20
20:52
I just did 22 and you are right
Creeping towards 1-1/e but does it go past it?
CMQ: What's the plural of Rick Astley?
att
att
rick astleys
@emanresuA Ricks Astley
@emanresuA the plural of never?
@RadvylfPrograms I like that
@att 24 is sadly too big
Unless you can implement it in rust
att
att
I can port this to c
20:57
@att that would be great but how will you deal with the big ints?
0.05 away from 1-1/e :)
att
att
ints never get that big
9488417795501045077701247/620448401733239439360000. That's quite big isn't it?
I guess there is uint128
00:00 - 21:0021:00 - 00:00

« first day (4237 days earlier)      last day (902 days later) »