« first day (4193 days earlier)      last day (947 days later) » 

00:00
@Deadcode I usually just forget to upvote even if I think it's cool
@Deadcode Yes, if a question has a score of -4 or less, it doesn't show on the home page. It does still appear on /active tho
@Zionmyceliaadamancy No, it does not appear on active.
@Deadcode Personally, I'll leave a welcoming comment, including saying "Nice first answer"/"Nice first question" but won't necessarily upvote it because, while I like seeing new users take part in the site, I often don't know enough about a language to see if it's actually a good answer, or just a solid first attempt.
(Tho I suppose they both are, I refer to the page I linked when I mean /active)
@Zionmyceliaadamancy I always upvote new users' posts, even if they're below average.
@Zionmyceliaadamancy Well technically they both are, but... anyway I doubt that one you linked gets viewed much
00:08
Better to have a few bad answers early on and be encouraged to keep trying than to just post a few bad answers early on
@Deadcode Personally, I spend more time on the page I linked, because it shows all the posts (plus the layout of the home pages is blech). Tho, I can't speak for everyone
Fair enough.
I do also think that, while I will downvote any post that I have reason to, I will always leave a comment explaining why I've voted, and I by no means encourage others to vote the same way. If you agree with me, then sure, downvote as well, but I strongly disagree with downvoting just cause someone else has.
My vote is simply my own singular opinion, I can't speak for what other users will do
00:35
@Zionmyceliaadamancy i use both pages, in a sort of "maybe theres a new post on the other front page"/"cat wants to go outside actually it wants to come back inside" object-impermanent haze
01:40
Y'know I never actually thought about which of JS's four equality algorithms switch statements use
Just now thought about it since I has a switch statement of normal numbers, then converted the whole program to use bigints (a hellish process)
 
2 hours later…
03:43
0
A: Sandbox for Proposed Challenges

emanresu ARearrange to a palindrome Given a string, shuffle it so that it becomes a palindrome. For example, adadbcc can be arranged into dacbcad, or dcabacd, acdbdca and more. Any of these (or all) is acceptable, and duplicates are allowed if outputting all. Something like abc cannot be shuffled into a pa...

 
1 hour later…
04:52
wait
*four*?
what are the ones other than what == and === use
0
Q: Generate an arbitrary half of a string

Command MasterGiven a string \$ x \$, we say another string \$ y \$ is half of it, if both of the following properties are true: \$ y \$ is a (not necessarily continuous) subsequence of \$ x \$ - there exists a strictly increasing sequence \$ a_i \$ such that \$ y_i = x_{a_i} \$ Each character appears in \$ x...

@UnrelatedString Object.is and something else I forgot
05:23
i just found out about carbon and i absolutely love how the readme on github straight up says that in any case where any other modern language can be used it should be used because carbon exists purely to make it possible to phase existing codebases out of c++
Lol
Link?
C++ is always gonna be around
Like COBOL and similar
come to think of it i wonder why there's no similar project for cobol
Because people don't write new stuff in it nowadays
@UnrelatedString Looks like rust but less arcane
05:52
yeah it seems to be heavily rust-inspired
06:03
^^
@UnrelatedString why not just use rust lol
interoperates better with c++ and is easier to translate from c++
has the tradeoff of being like c++, but still possesses the key virtue of not being c++
att
att
that is indeed an important virtue
06:48
what does flat_map do?
07:13
TIL chat censors credit card numbers
07:33
@emanresuA I think Array.includes uses the other one
@PyGamer0 same as [].concat(...foo.map(...)) I think
Or foo.map(...).flat()
(in even older versions of JS, you have to emulate it using reduce)
This is what Babel's for
08:13
CMC: print the first n numbers which are not multiples of 11
08:34
in fact, more interesting CMC: print all two-digit numbers between which are not multiples of 11
08:50
@emanresuA ooh let me try
4863 8273 1847 2937
Hey wait a minute...
@lyxal This isn't your real credit card number, right?
... it passes the algorithm
Sheet really
Lol
@emanresuA no lmao
The only major cards used here are Visa and Mastercard. Visa starts with 4564 and Mastercard starts with a 5x number.
Other cards aren't really used here
Imagine having a credit card
*debit
Imagine having any sort of bank card
09:02
It's so I can access my kromer digitally and so I can be a trendy gen z and use my smartwatch to pay for stuff
att
att
it's free money
09:21
has this guy not heard of Obelix? writing.stackexchange.com/q/62831
 
1 hour later…
10:34
@emanresuA oh really?
i dont have a credit card
lol
 
1 hour later…
11:36
CMQ I have some points I want to fit a quadratic curve on. But I need that the derivative of this curve is never negative. How can you do that?
Or is it even possible?
12:12
You probably want the math.se chatroom, not tnb
that sounds like a pure-math question
Hey look it's gingerbot
I'm actually ginger
can't get into my main account rn
I was in disguise this whole time! I'm ACTUALLY Ginger! Get BAMBOOZLED!
oh my dog
5
12:34
@GingerBot but this is the best chatroom!
12:45
This is genuinely the only chatroom I know where people actually chat to each other
@UnrelatedString There's also the .includes one
(or maybe it's .indexOf those use different equality algorithms)
@graffe Do you know they're on the curve, or is it an approximation?
If it's the first one, you only need three points, and you can just pick any three that give you a positive leading coefficient
If it's the second, you could try using a quadratic regression, and if it has a negative leading coefficient, removing the highest point in the data until it's positive
That won't be a perfect approach but it'd be a simple one :p
@NoHaxJustRadvylf it's an approximation
In python polyfit does the appriximatiou
Is a positive leading coefficient enough?
Oh wait, I misread that part
Wait what do you mean by "is never negative"?
I guess that's what I don't really understand
The derivative has to be negative at some point unless the quadratic is a horizontal line
Since it'll be a straight line
12:57
@NoHaxJustRadvylf yes you are right
Let me think about this
This screams XY problem
As in, what you're asking seems like it's different from what you actually want. You have a problem X, and choose to approach it as subproblem Y, when Y isn't actually the right thing to be asking
:)
Let me explain the real thing. I have some data points and I want to predict the next one. If you plot they never decrease but the derivative slowly decreases. The simplest thing is to just take the difference between the last two points and then add that on to the most recent
I just want to do the next simplest with a quadratic fitted to the most recent three points instead of a linear fit on the last two
But the value should never decrease
I don't think this is a job for a quadratic
This sounds more like an exponential decay or logarithm sorta thing
13:02
Ah you could be right
The derivative of the curve slowly decreases towards zero
But I don't need anything fancy. Just slightly fancier than looking at the most recent two points
I blame MWEs for the XY phenomenon :)
Find an a * b ** x + c that matches your three points and that should be a good way to do it
Ooh that looks good. Restricting all coefficients to be positive
So I guess b can be less than 1?
@graffe Not necessarily
How can you get decreasing derivatives from this?
If a is negative and c is positive, you'll get an upside down exponential, which approaches c
13:09
Good point
@graffe It almost certainly will
I am going to try this out. Thank you
How did you think of this function?
Just a plain exponential with a constant added
Hey guys look at this nonsense:
>>> sympy.nsimplify("4678")
13841287201*2**(7/16)*3**(7/40)*5**(51/80)*7**(1/8)/17280000
7
sympy.nsimplify takes an argument and returns it as a sympy object
Normal people when they discover a bug: "Lemme report it"
Lyxal: "this is so stupid I'm posting about this in TNB"
13:19
more accurately, it "Find[s] a simple representation for a number"
now sure, it evaluates as 4678.0
but really? does it have to return an expression like that?
because that ain't simple
4678 is simple
>>> sympy.nsimplify("3242")
3242
>>> sympy.nsimplify("46")
46
>>> sympy.nsimplify("467")
467
>>> sympy.nsimplify("4678")
13841287201*2**(7/16)*3**(7/40)*5**(51/80)*7**(1/8)/17280000
>>> sympy.nsimplify("4679")
4679
>>> sympy.nsimplify("4677")
4677
what the actual hell
Try it online! if you don't believe me
13:35
@lyxal this might need an issue opened on github
Which version of sympy?
I'll check
I get the (sad) impression that sympy development is woefully undermanned
1.9
@lyxal does sage do the same thing?
@lyxal I would try 1.10.1 before reporting it
pip install sympy -U
still broken
just installed 1.10.1
13:38
I am not sure what the sage equivalent is
What does simplify(4678) give you?
it gives me 4678 as expected
Ok
I would open an issue on github
Does nsimplify(4678.0) give the same thing?
@lyxal hmm. live.sympy.org
I just get 4678 when I do nsimplify(4678)
Can you try 1.5.1 and see if you do too?
It might be a regression
14:01
Happens for me
When I wrap the number in a string it happens
I reckon it's to do with the whole entire "using eval under the hood" thing
@lyxal oh wow.....
reasons to not use sympy part 69
>>> nsimplify("4678")
                         51
                         ──
             7/16  7/40  80 8 ___
13841287201⋅2    ⋅3    ⋅5  ⋅╲╱ 7
─────────────────────────────────
             17280000
okok what the actual hell
Feb 9 at 13:04, by PyGamer0
@lyxal what kind of bitwise f***ery is that?!!!
14:52
this is sooo weird
15:21
From the code golf Discord
The only logical conclusion is Sympy at its finestâ„¢
okay this is too much call the police quik
Gotta love how the square root of 2 is somehow worked into the calculation of an integer
15:58
at last, python proves it's rational
16:41
@pxeger not sure what this is asking, the question seems malformed
remove the word "between"
I was gonna say "between 10 and 98" but I thought it was simpler to just say "two-digit"
ahhh yeah thatll do it
that is a more interesting cmc i see why
i was imagining some like, 'all pairs of numbers between which...' which could also be interesting.. find all the ranges for which this quality is satisfied
in flax, 10 secs ago, by PyGamer0
anyone have more ideas for quicks?
@lyxal ... what!
reasons to not use sympy part 420
16:47
1 hour ago, by mathcat
okay this is too much call the police quik
so generating A138591 (numbers which are sums of 2 or more consecutive nonnegatives (or just positives if you exclude 1)) could be interesting, however
wait hm
this is a mouthful how do i say this
what on earth
rational=True fixes the problem though
@thejonymyster a challenge where you output every pair of positive numbers except that you skip some. the ones you skip are the ones for which, if you were to take the sum of all the integers between them, would give you a number that youve already had a pair that had the same outcome
so if you print (1,5) you skip (4,6)
since 1+2+3+4+5 = 4+5+6
idk, it might come down to just "find the ways to get n as a sum of consecutives" but with extra steps
17:03
@lyxal petition to keep this behavior but move it to sympy.unsimplify
sympy.complicate
sympy.verbosify
there is sympy.expand but it doesn't work :(
17:51
0
A: Sandbox for Proposed Challenges

AdamRuns of Ones (What Fun!) code-golf sequence Suppose you have an array with some known set of values (e.g. a string of \$0\$ and \$1\$) and you want to get all the locations of \$1\$s. Instead of storing a list of all the indices, if the \$1\$s come in "clumps" you can sometimes save space by stor...

18:13
Is it actually meant to take a string?
Or is that just a type error?
nsimplify(4678) works as you would expect
@Steffan that's correct isn't it?
18:36
0
A: Sandbox for Proposed Challenges

mathcatRepeat after me (draft) Write a program which constantly records audio and plays it after a delay. The delay has to be one second. Rules The volume has to be 100% of the device volume Alternatively, you can continuously print the audio (in binary) Meta: Do I have to specify anything else audio...

Is this a dupe of "Laggy text editor"?
18:51
@mathcat the audio requirement + the fact that it doesnt have to wait for an "enter" the way the prompt does makes it different imo
or hm
hm okay
well hold on actually
laggy text editor also allows "Record every keypress and output those delayed "
which seems like a different challenge so idk why itd allow that lol
also with audio: wouldnt that cause a feedback loop :P
(link for convenience)
right
18:55
i guess just wear headphones
im just thinking like... its constantly taking in audio, playing that audio
on top of the existing real life audio
hmm
yeah it might create a loop
that got me thinking though, i wonder if there could be a challenge along the lines of "apply this well known audio effect"
like reverb or distortion or something
or like "play it back backwards" idk :P
only one like that pcm wave time stretch
@thejonymyster only about three answers (I think?) recorded keypresses, so could I make it a separate challenge?
i do believe it would be honorable as a separate challenge, yes
i dont think the original should have allowed both
plus we need more audio challenges (probably)
@emanresuA thoughts on this? ^^^^
19:05
golfing langs need audio / visual support actually :P
@thejonymyster probably definitely
we need to make enough challenges that it becomes a necessity
 
1 hour later…
20:27
@mathcat As an audio thing, I'd say it's not a dupe :P
@PyGamer0 what are any of the first 68?
@emanresuA thx, just wanted to make sure it's okay with you
 
2 hours later…
22:12
in canvas, May 4 at 23:38, by emanresu A
PRESS F TO PAY RESPECTS TO LYXAL
22:37
here's an idea: cgcc game jam
discuss more in off-topic
Hmm
Or maybe a golflang jam - 24 hours to create a basic golflang
ooh
me likey that idea
1 min ago, by GingerBot
discuss more in off-topic
Golflang jam is probably on-topic
well sure but if this is a good idea it'll have lots of discussion which shouldn't flood this room
and if needed a new room can be made
trying to have good chattiquette
22:41
:D

« first day (4193 days earlier)      last day (947 days later) »