01:00 - 16:0016:00 - 00:00

1:36 AM
mm yes O(2^n) time complexity for my solution to phase 2
i can probably make it better by adding a ∪ to the code tho
orrrr... not

2 hours later…
3:12 AM
@Bubbler Those problems are designed to work out nicely in APL.
3:50 AM
"nicely" - them I'm clearly doing something wrong :p

1 hour later…
5:01 AM
@Ginger of course common operations have to be weird sounds
+ -> ɬʼ
@Seggan I think the one about change is O(k^n) for me, where k is the amount of possible denominations and n is the amount of change

1 hour later…
6:12 AM
@RubenVerg hi, welcome to the Nineteenth Byte!

1 hour later…
7:19 AM
oh did I never write here
been lurking for a long time then :/
Heh, until this message, RubenVerg had written the last message in every SE chat room I'm in.
:) now again
I've written the last message in every SE chat room I'm in.
7:38 AM
I could write a message about how I've disrupted that claim, but I prefer my messages to be more meta and self referential (like this one)
Like the message two messages above (and this one too probably)
And now for the replies and conversation continuations doing one of the following: a) making a meta message joke in response to mine, b) pointing out some sort of logical flaw in one of my four messages (counting this one) or c) contradicting this message by either directly referencing it or completely ignoring it
8:07 AM
Is there a vanilla natural log challenge yet?
@mousetail Instead of starring that quesiton, I'll just give you a ⍟
I'd be interested in implementations in languages that lack a builtin. Even the vanilla multiplication challenge had some really interesting answers
BQN has no built-in, and isntead uses ⋆⁼ which is the inverse of exponentiation.
I'd count that as a builtin
@mousetail Not against such a challenge, but note that it is not easy to specify well
8:16 AM
Thanks, good point. I'll add a required accuracy. The formula suggested by math overflow has a accuracy of 3e-6 so surprisingly close to your suggested 1e-6 but just barely too much
interesting
8:36 AM
Hx = lnx + gamma + 1/2x - ex
Hy = lny + gamma + 1/2y - ey
lnx = Hx - gamma - 1/2x + error_x
lny = Hy - gamma - 1/2y + error_y
ln(x/y) = lnx - lny = Hx - Hy - 1/2x + 1/2y + error_x - error_y
ln(x/y) ~ Hx - Hy, when x and y >= 1e6
I think this works...?
(Hx is 1 + 1/2 + ... + 1/x)
@Bubbler note that that sum is approximately ln(x)
8:53 AM
@mousetail What if I iteratively approximated a number y such that eʸ=x?
@Adám sounds like newton's method is good for you
@Adám That would be a valid solution
@Adám take a good first guess and use the function $e^y-x$. Remember to take the derivative w.r.t. $y$ (That will result in $e^y$).
What if I had a built-in that took a function and a result and iteratively approximated a number such that the function applied to that number would give the given result, and then I used that?
That would be a valid solution I think, it's not a builtin that computes the log specifically
8:57 AM
What if that built-in was denoted ⁼ and took the function on the left and the result on the right, and the f(x)=eˣ built-in function was denoted ⋆?
@Adám so you need to do ${guess}_{n+1}={guess}_n-(1-\frac x{e^{{guess}_n}})$
Depends how it's implemented I guess
That would be unobservable, another thing to avoid in challenges.
fun fact: $\log_x y \times \log_y x = 1$
Not allowing builtins is a exception to that "thing to avoid" though
I might just allow builtins just downvote any answer that uses them though
To avoid the drama
9:00 AM
@mousetail that's kinda unfair...
Sure, but ⋆⁼ in BQN is not a built-in. It is two completely separate built-ins that together implement a solution to the challenge.
You know that you did
@mousetail me? or someone else?
@Adám I'm unfamiliar with BQN, I'd assume it would assume the inverse of a function especially mathematical would be special cased with a efficient implementation
9:01 AM
@mousetail I suppose that's my math.factorial answer to the vanilla factorial challenge...
Could mathematics be a valid language for code golf?
No, it's not properly specified
But you could make a language that's like mathematics
@mousetail I don't know, actually. I'm not familiar with the implementations. Maybe some do, some don't. I really don't think it should matter.
@PlaceReporter99 Hard to byte-count.
Here is my solution btw: mousetail.github.io/Fish/…
Even that's hard. What constitutes a token?
@mousetail Desmos looks a lot like LaTex… APL is basicaly a hyper-evolved continuation of traditional mathematical notation.
9:05 AM
@Adám $x$,$y$,$\log$,etc. . I'm not so sure about brackets...
The issue is mathamatics includes basically infinite number of functions you could use
Many of whom have the same names
And everything is ad-hoc, and depends on the goodwill of the reader.
A language should be unambiguous, one text should correspond to one program
@mousetail but there can be multiple programmes that do the same thing
Yes, but there shouldn't be one program that does 2 things depending only on the authors intent
9:08 AM
Right. E.g. in TMN, "sin x cos y" solves two distinct challenges:
∘ given x and y, compute the sine of the product of x and the cosine of y
∘ given x and y, compute the product of the sine of x and the cosine of y
it is only the goodwill of the reader (using the context of the stated formula) that determines the correct interpretation.
Similarly, "a/bc":
∘ given a, b, and c, compute a divided by the product of b and c
∘ given a, b, and c, compute the product of a divided b and c
Or G can meant both 6.674e−11 or 1e9 depending on context
ab can be a single variable named "ab" or 2 variables a and b multiplied
I don't think TMN supports multi-letter vars.
Is π(3+7) = 4 or 31.416?
What is TMI, can't find any information on it except This which I don't think is what you are talking about
@mousetail Desmos looks a lot like LaTex… APL is basicaly a hyper-evolved continuation of traditional mathematical notation.
@PlaceReporter99 No, it is off by Euler-Mascheroni constant
9:21 AM
@Bubbler I got that approximation via numerical integration.
@Bubbler is requiring that the result is the closest possible to the one that the chosen float type supports not enough?
standard loopholes would cover "oh my floats are 1-bit sign 1-bit exponent 1-bit mantissa" exploits
@RubenVerg that is not "not enough", that is way too strong for practical reasons
Euler's constant (sometimes called the Euler–Mascheroni constant) is a mathematical constant, usually denoted by the lowercase Greek letter gamma (γ), defined as the limiting difference between the harmonic series and the natural logarithm, denoted here by log: γ = lim n → ∞...
@RubenVerg If you do that you'll constantly exhaust the precision limit in intermediate steps, making it very hard to actually get the final state right without losing accuracy when combining them
@Bubbler that is, every basic arithmetic on floats accumulates errors, and unless you rely on hardware support, any reasonable impl will use thousands or millions of float arithmetic
so you almost never get the "closest possible float" with any reasonable means
@Bubbler Could you use that basic approach but hardcode gamma then just add it to the result at the end?
9:35 AM
@Bubbler yeah okay tried it and you're definitely right
I can only get ln2 to be 0.693147180559945309417232121458176 but the best repr is 0.6931471805599453094172321214581766
@mousetail gamma is only the difference towards infinity, and the error for finite x (difference between lnx+gamma and Hx) is ~1/2x according to wikipedia
so it doesn't quite work when x is small
also I guessed I need to handle non-integer inputs
@Bubbler this works with non-integers (because any float can be written as a rational, and any real can be approximated to one) and limits the "finite" error to small enough value
@Bubbler dyalog apl sets two things equal up to tollerance if |x-y|/max(|x|, |y|) <= e, is that compatible?
Default tolerance might be too small
can be changed
I just can't tell if it is stricter or looser than the one in the article
@RubenVerg Almost. If Dyalog APL says two are equal (with chosen e), then it solves the challenge. Not necessarily the other way around
9:42 AM
alright
10:04 AM
@Bubbler You can play around with this graph for an approximation of ln(x).
How do you say "to make something not dynamic any more"? Undynamicise? Statify?
Fix?
That works. Fix sounds like there was a bug. The code was just unnecessarily dynamic.
@PlaceReporter99 Very nice graph, though the accuracy seems quite bad for x<1
10:08 AM
Verb: staticize (third-person singular simple present staticizes, present participle staticizing, simple past and past participle staticized)
1. (transitive) To make static.
Ooh.
@mousetail to get better accuracy for x<1, drag the slider to the negative end. However, you will lose accuracy for x>1 by doing this.
Hmm so you'd need to dynamically compute the value of k to actually solve the challenge
@mousetail or just use the fact that $\log(\frac1x)=-\log(x)$
10:14 AM
That would also work
@mousetail but guess what I’m using for this approximation.
10

My favorite way of calculating the natural logarithm: $$\ln(x)\approx-\gamma+\sum_{n=1}^x\frac1n$$ Where $\gamma$ is the Euler-Mascheroni constant. Not only is this easy, but it works quite well for something like $x>10$. If you need to calculate other bases, like $\log_b(x)$, use $\log_b(x)=... @mousetail close. There is no Euler-Mascheroni constant. I can literally just see the formula you are using I added the constant myself to improve the accuracy @mousetail it doesn’t need intervention from Euler to be precise. Just drag the k value higher. 10:20 AM It will still be off @mousetail it’s off by less than 0.01 The point is it won't converge to the correct value Fixed version 11:01 AM @PlaceReporter99 In Ba Sing Se 11:21 AM my exponents! 11:33 AM @cairdcoinheringaahing earthbending junk? No thanks! @mousetail with k=1M, it is off by about$10^{-6}$. That's a pretty slow convergence the other formula gets like 8 digits with k=10 @mousetail it depends how precise you are with your Euler-machesroni constant. True k=10 was for the power series approximation, not the corrected version of your formula An interesting property of my function is that the error is around 1/k the error is about gamma/k 11:46 AM 0 Vanilla Natural Logarithm Challenge code-golfmathnumber There is a challenge for multiplying two numbers so I guess this counts too Given as input a positive real number n compute it's natural logarithm. Your answer should be within \$10^{-6}\$for \$1 \leq n \leq 10\$and within \$10^{-3}\$for ... @mousetail create a community wiki answer for all the built-in answers solves the problem of boring answers (they become edits on a single post) yet still allows for a catalogue of languages with built-ins without anyone getting "free" rep (if that's a concern) Good idea it's what I did for the "is everything in a list equal" challenge so it's got some precedence too @mousetail are you sure? For$10^6$the error is approx.$9.997\times10^{-7}$. My mistake ^ 1/k is approximately gamma/k, at least in terms of order of magnitude 12:01 PM @mousetail it is approximately 1/x for small x Not if x=0 @mousetail 1/x is undefined for x=0 @mousetail and that counts as no x instead of small x, I believe. 0 is definitely a number it's also small You should look at the error terms for my formula with a big positive k and x<0. I did 12:06 PM @mousetail I mean it’s less than small, it’s a null quantity. It's not a null quantity It's perfectly valid @mousetail do you notice that it makes a tiny shaded graph that seems to resemble a reciprocal polynomial function? @mousetail yes, it is, but it represents nothing. I'm really confused, like I said the error is gamma/k which is a reciprocol function @mousetail you said gamma/k My bad gamma/k is a reciprocol function 12:11 PM @mousetail I think it’s spelt “reciprocal” i c'ant cpel @mousetail I somehow understand what you’re trying to say… It's really not hard to read text with spelling errors people make a way to big deal out if it Tbf my phone does have autocorrect. Autocorrect usually makes things worse That's why I say defiantly so much 12:14 PM @mousetail you’ll have more credibility if you have good spelling. Not really, a lot of the people I respect the most have terrible spelling I respect them for good content @mousetail I’m talking about in a scientific or academic setting One plus one is two. or Exactly, I'm talking about my college professors etc. most of them can't really spell won plus won is too @mousetail they’re gonna have a hard time when writing a scientific paper then… Nobody really cares 12:21 PM ^ If they where actually submitting to a journal they'd probably have some secretary look it over but for most daily teaching tasks it doesn't really matter Is it just me that occasionally sees the raw MathJax in light grey immediately to the left of its rendering? I've seen that occasionally too yeah exactly like that 12:26 PM I think it's the image alt text Since it sometimes renders as a image and sometimes as HTML There's no image right now. Yea the image is broken and showing it's alt text instead It is a span.MathJax_Preview Hmm not a image then it's not happening now, but I can't remember whether I saw it on mobile or desktop 12:31 PM New theory is it's supposed to show while loading but isn't removed properly afterwards 12:44 PM @Hippopotomonstrosesquipedalian : i REALLY don't care which whacko codepage it is in - show me the exact hex dump or octal dump of those 19 bytes you claim, or base64 or URL encode it, whichever way you prefer - you claim 19 bytes i wanna see how you substantiate your claim — RARE Kpop Manifesto 9 hours ago someone really doesn't like APL @RubenVerg im doing bioinformatics @Seggan I do feel their pain this is APL tho, which we've been doing forever, not some fancy logbyte lang or whatnot It's confusing that dyalog unicode is not actually unicode on that, i concede i think the meaning is more that its a codepage for that subset of unicode A codepage for a subset of unicode is just a non-unicode character encoding 12:50 PM @Adám do you have an explanation for this? Also why are "abcdefghijk" in the codepage 2 times? interesting 50 Prompted by this. The question of APL's encoding often comes up, and many times a helpful soul links to Wikipedia's article on the APL EBCDIC codepage. However, each implementation of APL has its own encoding rules. What are they? So the encoding is not actually named "dyalog unicode" and Hippo was just making stuff up? ^ the question was about the strange choice of name 12:55 PM @mousetail 5×52 is 260, but there are only 256 chars in the codepage, and we even dropped the first 12, so ⍴ loops around. @Seggan I remember someone complaining about the K-pop kid. what's that @Seggan I think they were talking about RARE Kpop manifesto ah @Seggan This was the message: May 17 at 10:06, by Shaggy Any mods on that could have a word with that KPop kid about their shockingly bad attitude and unnecessarily argumentative nature? 1:01 PM @Seggan lmaooo @mousetail Correct. Dyalog Unicode is the interpreter version (which hints at how the interpreter stores text internally), but code golf submissions are assumed to use my SBCS. @Seggan bioinformatics is fun, also seems to be a common set between years @Seggan I was going to say "skill issue" but then I realised who I am and that my APL is horribly unoptimised @Seggan Hex dump of the 19 byte solution using my SBCS: fb 8d 4c 8d 50 2d 47 30 8f 39 8d 4c 8d 2e 5 52 8f 78 fd 82 Python needs a sigma operator 1:14 PM you mean sum()? @mousetail I mean$\sum_{n=1}^{10} \frac1n$but i guess that works... sum(x for i in range(...)) @mousetail but there isn't a builtin for capital pi Nah, all you need is a nicer notation for reduction and mapping. @PlaceReporter99 Pretty easy to write yourself with reduce 1:20 PM @PlaceReporter99 i can see why... @emirps : it's ambiguous even though it literally has the word a.w.k. right at the the start of the command not named "echo" ? are you a professional troll or just an amateur one ? That piece of code i wrote is 100% POSIX-compliant and you wanna claim it's ambiguous ? or do i need to explain what echo is about ? — RARE Kpop Manifesto May 9 at 2:02 If a chat room has tags will it show up in the sidebar of questions with that tag? which sidebar? I don't know if that even exists on sites other than SO oh that's not tag related It is 1:35 PM that's literally active rooms It will show different rooms depending on the tag of the question It's 100% tag related maybe on SO not other sites But what I don't know if it's a SO only feature it isn't Sad Would be nice to have TNB visible next to every question 1:37 PM it appears on meta when there's active rooms at least, it used to It still does, not on main though @zoomlogo the comment below is even funnier - most of the shortest answers above involve blatant cheating i'm surprised you have no issues with that as if that wasn't, you know, the point yeah .. 1:52 PM @zoomlogo I dropped my red flag on that 🚩 @Adám yeah I used APL for that ... @Seggan : i apologize for not being well versed in a language that requires a trademark infringing codepage in order to meet its byte claims — RARE Kpop Manifesto 1 min ago what @Seggan Wait, manually? I just used the SBCS.To function. Wait that's a thing not manually, the code was { uiota omega uepsilon box AV } each code this K-pop is really annoying I've flagged the above and this one @Hippopotomonstrosesquipedalian : and what correct answer have you provided other than rushing to lecture others about not knowing a language that requires trademark infringing codepages to work ? — RARE Kpop Manifesto 3 mins ago @Hippopotomonstrosesquipedalian : and isn't it funny … this language somehow felt the need to be so comprehensive it has separate operators for NAND and NOR, despite both being a direct inversion of the outcomes of AND and OR, and yet, doesn't have an operator for XOR. And you actually believe these choices are logical ones instead of them stemming from a language that was, and still is, directly manipulated for individual code golfing challenges ? — RARE Kpop Manifesto 1 min ago @Seggan wait i didn't see that one or the one below 2:05 PM 3 and 1 mins ago i am actually interested why APL doesn't have xor @Seggan Shaggy agrees: May 17 at 10:06, by Shaggy Any mods on that could have a word with that KPop kid about their shockingly bad attitude and unnecessarily argumentative nature? APL is ironically the language not designed specifically for golfing @Seggan jokes on them not equals acts as xor Oh yeah lol @mousetail i was gonna say, I don't think they realize APL was designed in the 60s :P @mousetail fix the link in ur comment I don't know how Parenthesis break links 2:07 PM @Seggan the ridiculousness of that makes me laugh @mousetail add another ) at the end Oh right @Seggan and that's what they think of apl Wait till they see actually dedicated golfing languages I'm surprised I haven't seen any kpop comments on anything I've used vyncode on That seems like it would be something that would definitely rile them up :p If you think a SBCS is cheating already fractbyte doesn't really make a difference @mousetail SBCS isn't but fracbytes are if you are using unary ($\log_{256}1=0$) reminds me of my "agregious" unary answer How is that related to kpop's opinion? 2:13 PM @mousetail its not just thought i'd mention Then why say it? @mousetail but i wonder how kpop would like to see my dashly answer @lyxal Or Sledgehammer. 2:38 PM @Seggan ?! just... what mf tried to mansplain APL 2:55 PM @lyxal yeah, they chose the wrong language to pick on :P lol.. someone should tell them to continue the conversation in chat... its getting too big (or move the conversation to chat) True Adam already did can't the OP move to chat themself? (@Seggan) I think they can yes 2:59 PM I've done it before AUGH what the HELL did they do to the vote icons?! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Oct 4, 2022 at 18:16, by Ginger STACK EXCHANGE DEVS: STOP CHANGING THE GOD DAMN UI. IT IS GOOD THE WAY IT IS AND YOUR CHANGES ALWAYS SEEM TO PISS OFF MORE PEOPLE THAN THEY PLEASE. JUST LEAVE IT BE. -109 About a year ago, the Product team, focused on improving the general experience, conducted an experiment to update the styling of the voting arrows on Stack Overflow in order to improve accessibility and meet Web Content Accessibility Guidelines (WCAG) compliance. We shared positive results from ... -110 lol @mousetail huh? 3:05 PM @Ginger eww omw to userscripting it back I guess and their explanation is no better @mousetail that was pertaining to the golfs he made > This change is part of a holistic exploration of the voting mechanism and what it means for everyone. what the frick does that mean @Seggan Oops you are correct A net 28% increase in votes? I wonder if it's downvotes... I don't think they accounted for other factors 3:06 PM Probably close votes me omw to make a userscript to undo this does anyone have a cached version of the old arrows? @Ginger not on mobile apparently lmao the score just keeps going down @Ginger I think I'll take this chance to just use some arrows from whatever icon set I like the most which is probably gonna be bsi ok, attempt 1: 3:13 PM @hyper-neutrino ty is there such a thing as a "user style" manager? nice, there is @mousetail AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @Ginger oh, is this css only? ngl i totally forgot that was a thing i wonder if they waited until everyone assumed it was cancelled before rolling it out :P @mousetail +90% downvotes apparently 3:16 PM wait are the triangles in the buttons off center?????????? i legitimately can't tell but they feel slightly off center nope the svg is flexbox-centered and the actual path is centered in the svg @Seggan ? @Ginger AHHH i don't feel like voting now @hyper-neutrino for dealing with the comments That was caird. 3:28 PM Ah oops done I think came here to complain abt the buttons, guess i’m a little late We should boycot voting entirely Thank you so much 3:40 PM &thumbsup; The new buttons look **** @Seggan You're welcome :P hopefully it works, I've never used a userstyle manager before time to get that meta rep @Ginger oh you just use the icons that are already there yup 3:44 PM @TheThonnu$#!+?
@Ginger you have control over se?
@PlaceReporter99 it's a userscript
no, I'm actually Jeff Atwood
@Ginger how do you install a CSS userscript?
@TheThonnu how am i receiving the changes then?
3:46 PM
I know how to install a JS one
@TheThonnu i think it depends on browser
Microsoft Edge on Mac
(don't question pls)
i use Arc on mac which makes it really easy
I use Stylus
@TheThonnu there's an extension for it
^^
3:47 PM
like a separate css dedicated extension?
is there a way to just make greasemonkey do it
like by using js to inject the css
Yes
You can quite easily make greasemonkey inject a stylesheet
^
(also I just fixed it so it also works on answers)
Is weireds my out how proud top stack overflow members are about how much they downvote. Yes it's important for the quality of the site but you don't need to brag about how negatie your vote ratio is
it's at -139 :b
maybe that's a sign that nobody likes it?
The acceleration when it went live is saying something
3:57 PM
@mousetail Downvoting is a form of content moderation
@Ginger afaik userscript are most often put in stackapps
On sites like SO, which have much larger volumes of low quality posts, more downvoting = more moderation
I get that, I don't oppose downvoting. I just think it's weired to brag about having x times more downvotes than upvotes
@Ginger 53 ppl do
01:00 - 16:0016:00 - 00:00