« first day (4552 days earlier)      last day (588 days later) » 

01:00
@RydwolfPrograms in relation to this suggested edit review, I just thought it was worth mentioning that the 💎 needs to be inside the code box. Nothing major, just something to know for future review events
Because having the 💎 inside the code box gives consistency and leeway for any meta data changes that could be made
(it acts as a nice selection point)
ah, mb. To me the edit mostly just looked like it added the link to Lumenspire, didn't realize it also messed with the code
As I said, nothing major and easily fixable (there's nothing at the bottom of the block yet anyway)
It's also a heads up for everyone really
Hm maybe I should add some HTML comments in the generated markdown saying to be careful with edits
That's probably a good idea
Ooh and the html comments could also include a permalink for easy editing rather than having to copy paste into the import button (not that the link would replace the meta data because you might have cases where it's easier to copy the explanation text rather than go to the post source)
 
3 hours later…
04:59
@Simd It will return what letters appear in the greatest number of words. I have no idea if it's the shortest.
This might be slightly shorter: lambda x:max((y:=sum(map(list,map(set,x)),[])),key=y.count)
I would like some apple flavoured butter please.
05:14
I use Android you doofus
@mousetail could you explain the code please. It is confusing me
@Simd Convert each word to a set to remove duplicate letters, then concatenate them all into one long string, then take the item that appears the most often in that string
Very nice!
The sum is the first mysterious part to me
It concatenates the lists somehow
Why do you need the []?
05:37
Because otherwise you can't add 0+[]
Where does the 0 come from? We are just adding lists aren’t we?
at least that is resolved :)
05:54
Now I just have to understand max….
 
1 hour later…
07:20
0
A: Sandbox for Proposed Challenges

l4m2Compute 0.1+0.2+0.3+...+0.8+0.9+0.10+0.11+0.12+...+0.[n] Sandbox Note Dupscanner

@SandboxPosts Can't find anything by searching 0.1+0.2+0.3
Does that constant have a name?
10
A: Things to avoid when writing challenges

BubblerReal-valued output without further specification, or with a bad one For integer outputs, you can check correctness with exact equality. For exact fractions, many challenges require to output a (numerator, denominator) pair which has worked out pretty well in practice. But for real number outputs,...

It'sinfinity when n->oo
so an upperbound is necessary
07:34
@Simd ∪¨⎕ removes duplicates from each input, ⊣¨⌸∊ flattens and bins characters into a matrix of rows of identical characters, padding short lines with spaces, ' '~⍨⊢/ selects the rightmost column and removes spaces from it, picks the first.
08:23
@Adám nice, I had {A[⊃⍒+/⍵∘.∊⍨A←∊⍵]}, always forget about Keys
@lyxal could you explain t he edit on my answer related to luminespire? why does one diamond go inside the block, and one outside? also I thought I just pasted the result from the tool, but maybe I messed something up :)
@RubenVerg ∘.∊ is just an obfuscated ∘.= right?
no, because the input is a vector of vectors
I'm tabling whether each letter appears in each string
08:38
@Simd You know math right? Can you tell my why sum x=1 to infinity of` x/(c^x) = c/(c-1)^2`. Or what this general category of formula is called so I can search it better
@RubenVerg Ah, I see.
@RubenVerg so what happened there was that someone suggested a formatting edit to make the link an actual hyperlink. However the edit placed the diamonds outside the code block. So instead of rejecting or accepting, I clicked the "improve edit" button and moved one of them back in the code block
I must have missed the second one
And because I clicked improve edit, it attributed the edit to me
right, I see, thanks for clarifying, I'll edit the second one as soon as I have time
Luckily it's still just a quick fix :p
@mousetail I don't think this has a name but I could prove it
08:52
That would be helpfull
I noticed wolfram alpha can solve it even for more complex variants but it won't tell me how unless I pay
I hate doing latex on mobile, as soon as I get to my computer I'll sketch a proof
I'm just curious, I don't need this for anything. No rush
09:08
@Adám interesting. I can't even tell why that gives the right answer
@mousetail they are geometric sums I believe.
The ratio is not always the same though
Right... Hmm
09:24
@Simd it's the derivative of the geometric series with an extra c term
09:49
Why someone is randomly caring about case when n=10^17?
10:14
@mousetail here you go
forgot to crop it oops
@SandboxPosts lambda x:sum(eval(f"0.{y}")for y in range(x+1))
this is better
this is definitely not rigorous but hopefully good enough
also, this obviously converges only for z\not\in[-1, 1]
oh also I think you could prove this without calculus but I'm lazy and derivatives of powers are like 16yo calculus
10:30
@mousetail Try online
@RubenVerg Thanks
@PlaceReporter99 f=lambda x:x and eval(f"0.{x}")+f(x-1) Recursive shorter
11:03
@mousetail there are two mistakes which cancel out, I just noticed
f(x) is 1/(1-x), and I forgot a minus sign in the derivative
so the derivative is actucally correct
11:23
@RubenVerg I had that thought too
11:47
0
A: Sandbox for Proposed Challenges

Jos WoolleyTic-Tac-Toe: Maintain the Draw! Tic-Tac-Toe is a game for two players who take turns marking the spaces in a 3x3 grid with an X or a O. If a player succeeds in placing three of their marks in a horizontal, vertical or diagonal line they are the winner; otherwise, the game is considered drawn. Cha...

 
3 hours later…
14:49
0
Q: Continuously Count Consecutive Cases

Jacob CreutzfeldtBackground Imagine that I'm creating a really long necklace, consisting of only two characters, A and B. You must count the number of occurrences of the substring AB in the string. However, since it's a necklace, you must also consider if the last character and the first character join to make AB...

Hello!
Hi!
15:33
@Simd Pip, 16 bytes: @:-#{aN_FI\g}SKz
Might be golfable using a different approach
15 bytes: @:#{aN_FN\g}SKz
"HTML pages don’t suddenly stop while you’re browsing them…"
@TheThonnu depends on how lax the requirement is
I'll skip the review and leave it to someone else
15:51
Reminder to reviewers that invalid answers should not be VLQ/NAA flagged; vote "Looks OK" and mod flag. — Rydwolf Programs 3 mins ago
^
@DLosc cool!
> Reminder to reviewers that invalid answers should not be VLQ/NAA flagged; vote "Looks OK" and mod flag. — Rydwolf Programs
5
 
2 hours later…
18:13
posted on July 17, 2023 by I am kind of a language dev

Outputting a Lazy list/Lazy data type in fastest-code challenges This just moves the computation to after runtime. For example, in Python, the code: def f(): return 492084389428**209480438084, 6356425635**23984723879 takes a very long time to run. However, if you use the yield keyword to generate a Lazy List: def f(): yield 492084389428**209480438084 yield 6356425635**2398472387

18:41
0
A: Sandbox for Proposed Challenges

I am kind of a language devDecimal to fraction In the pool of questions on CGCC, I have not found a question with this task. Given a float in base 10, output a fraction in simplified form, improper or mixed. The output format can be any reasonable one. In code-golf, the shortest answer wins! Test cases 3.5 -> 7/2 or 3 1/2...

 
1 hour later…
20:04
@SandboxPosts Vyxal, 0 bytes lol
not even any flags?
Nope, Vyxal's normal number representation is rational
Which is exactly the output format of the challenge
That did probably inspire the challenge (since PlaceReporter has been doing a bit in the Vyxal organisation recently)
And anyway it's a duplicate: codegolf.stackexchange.com/q/17239/114446
c--
c--
20:47
@emanresuA I'd expect most interpreted languages to have some form of --help of --version
I just followed the transcript link from the sandbox, didn't realize the message was so old
 
1 hour later…
21:55
Hi all
22:07
@TheThonnu woo! Finally a benefit of using Sympy for everything and having to have dealed with all the cringe that library has caused! :p
22:46
@lyxal Could you please unfreeze The Tarpit?
As you wish :p
(If it's a tarpit, maybe "unfossilize" is the better analogy? Hmm.)
As you wish :p
Lol
When you ran for PLDI mod, did you anticipate that it would lead to an increased workload on CGCC also? :P
Kinda lol
I knew I'd still be around here so I knew I'd be able to do chat support stuff

« first day (4552 days earlier)      last day (588 days later) »