« first day (4358 days earlier)      last day (470 days later) » 

12:21 AM
0
Q: Tips for golfing in Zig

DialFrostNot sure if I've seen this one before :/ Any tips for golfing in Zig? Please post 1 tip per answer and don't post obvious tips like "remove whitespace". Github link

 
@NewPosts I don't think a lang with 10 total answers needs a tips question
 
it could be warranted circumstantially... with the main circumstance being, the poster has already thought of one or two meaningful tips
 
1:25 AM
https://i.stack.imgur.com/6ZidA.png
https://i.stack.imgur.com/4G6JB.png
Why this come to my inbox?
 
2:23 AM
it isn't MGS though. It's just one way of encoding programs
that's the full form
it's like that one language where the program is the file name
and the byte count for those answers includes the filename length
 
> A post’s author comments on a post you have previously commented on, when the only other (undeleted) comments on the post belong to you or the author. (Source)
 
@emanresuA also, scoring y2k is covered by these meta posts
meaning that the multifile scoring system is actually a sort of disadvantage
 
Language Custom (different version is different compiler), used to mean a theoretical bound of a challenge
 
3:23 AM
CMC: Find the user with the most (of caird's) brownie points
 
4:06 AM
https://codegolf.stackexchange.com/a/256318/76323
Although requirement only need lowest type of randomness(for some input, there's multiple possible outputs), does this code generate all possible outputs?
(It repeatly move the last element to position 0 or 1 randomly (0-index) until intended order
 
It terminates with probability 1 so I'd say yes
 
I know it's valid, just how random is it
 
 
3 hours later…
7:31 AM
Found this link lol
 
It just reloads forever?
I'm really sad this requires support for negative numbers codegolf.stackexchange.com/questions/60610/… Could do a really short ><> solution otherwise
 
8:26 AM
@emanresuA LMAO
 
Wonder if it's a valid answer to this
 
8:47 AM
@mousetail appreciate the code.golf referral! :3
 
9:01 AM
@emanresuA dang it Dion, why couldn't you make better redirects than this? :p
Also wow it's been way too long since I last thought about MAWP
 
9:20 AM
hi
 
9:55 AM
This feels like ChatGPT right? codegolf.stackexchange.com/a/256327/91213
 
looks like I managed to outhat Community this year
 
@mousetail I thought that too
 
def
 
What is interesting is the account is 6 years old but posted here for the first time
 
10:03 AM
8 years old on so
 
@mousetail feels too informal for chatgpt
Just doesn't have the same feel. Doesn't mean it's not using some other tool though
 
If you type the question in ChatGPT what do you get? I don't have access to it
Also maybe a mod can remove it from HNQ? This type of question shouldn't really be HNQ
 
@mousetail okay maybe it is chatgpt then
I was genuinely not expecting that
 
^ that's what I got
 
Pretty close to what I got too
And close to the answer
 
10:11 AM
same
 
Probably is ChatGPT then
 
Does chatGPT give different answers to different people?
 
Yes
It's non-deterministic
 
You can press "regenerate response" and it will give you a different response as well
 
I imagine it'd have a temperature of 0.7 like the default settings of gpt3 do on the open ai site
(temperature 0 would be deterministic, always the same result)
gptzero.me could be a helpful resource for detecting ChatGPT answers
it's down right now, but I've signed up to be alerted about when it comes back up and to join the beta
 
11:04 AM
I wonder if ChatGPT can detect ChatGPT-style text.
 
better ask ChatGPT :P
(my guess is no, because if it has an adversarial component then the whole point is that it can fool itself, but it could also totally have some kind of emergent capacity for that anyways)
 
11:18 AM
Whether or not ChatGPT can detect ChatGPT-style text depends on whether or not ChatGPT can be taught to recognise that style.
Humans can often spot some common patterns in ChatGPT responses, and ChatGPT can be taught to do detect patterns, so it should be possible to teach the patterns to ChatGPT.
In conclusion, ChatGPT should be able to detect ChatGPT-style text.
 
...did chatGPT write that
 
11:42 AM
@mousetail No, I tried emulating its style.
 
That leads to a follow up question
could chatGPT recognize a person trying to imitate it's style
 
Well, I'd certainly spot the word "recognise" which ChatGPT would have spelled "recognize".
Uh:
> Can you detect if a given text was written by ChatGPT?

I'm not able to detect if a given text was written by ChatGPT or any other specific language model. However, there are ways to determine if a text was generated by a machine or written by a human. For example, one way to do this is to use a machine learning classifier that has been trained to distinguish between machine-generated and human-written text. This can be done by training the classifier on a large dataset of texts that are known to be either machine-generated or human-written and then using the classifier to predict the ori
Compare my prompt to the last sentence of its reply!
 
It’s contradicting itself between the first and last sentence
 
chatGPT is being trained on this conversation right now
 
So, I gave it this and it replied:
> Based on the content of the text, it does not appear to have been written by a machine language model such as ChatGPT. The text provides specific advice and recommendations for improving the performance of code, which suggests that it was written by a human with knowledge and expertise in programming. However, without more context it is not possible to say for certain whether or not the text was written by a human.
 
11:48 AM
The logic it gives for suggesting it’s a human doesn’t even make sense considering itself can give recommendations like that
 
Don't get fooled: ChatGPT is just a very fancy ELIZA. It has no actual understanding of anything.
 
It's a paradox. ChatGPT things the other answer can't be by AI because it gives specific advice, but this text itself is specific.
 
@Adám that's right
13 hours ago, by lyxal
even then, it doesn't actually "know" Vyxal or Jelly or any other language it purports to know. It simply writes stuff that it thinks should be statistically completed based on what it's been fed. It may look like it "understands" code snippets, but it's simply the most appropriate/probable token generation from the tokens you give it
applies to everything it says
 
Transformers are just the new fancy encoder architectures, but it boils down to the same concepts of embedding data in large feature spaces
 
does a human actually "know" Vyxal or Jelly or any other language it purports to know?
or are we, too, simply writing stuff that we think should be statistically completed based on what we've fed ourselves?
 
11:53 AM
i know i am :P
 
I’ve worked on them with my Ph.D. student for something else, attention mechanisms are interesting features but they’re not that revolutionary from a theoretical standpoint
I guess the main reason they’re popular now, besides impressive applications for image/text generation, is that they’re significantly faster to train
So you can feed them even larger datasets
 
@pxeger no, not really. When we solve a problem, we can somewhat actually understand what and why we're doing it instead of spitting out tokens based on probabilities.
 
It can't count
2+2+2+2+2 = 8?
 
And it got it wrong as well: A is definitely not encoded as "A!"
 
11:56 AM
@pxeger In Adám’s example, a human would know that the last sentence does not make logical sense after having said the first one
 
@TheThonnu that last 2 is actually an impostor
 
We also use a lot of statistical reasoning, but it’s in conjunction with symbolic reasoning. Combining both in a general purpose way is a long-standing problem of AI
 
@TheThonnu Well, statistically speaking, if you add together "a bunch of" 2s, you get 8.
 
It did figure out the mistake eventually
But it's still very wrong
 
@lyxal my point is, does it matter if it "really understands" what it's doing? I believe I understand what I'm doing (sometimes), and I get the impression from your behaviour that you understand what you're doing. But can I ever really be sure that you understand what you're doing, and that you aren't just really good at pretending to understand, by generating your replies statistically?
I think I can't, and so it doesn't necessarily matter that ChatGPT can't "truly understand" the things it talks about
 
12:00 PM
Well it's not like I have a tablualatorara look-up table of words that wet frequently appear one mornign on eee after based on training data
unless GPT has been trained on complete gibberish, that sentence would be highly unlikely to be statistically generated
 
I think the main relevant difference between a human and ChatGPT is that a human is able to sit down for an hour and think about stuff, and then come up with something entirely new as a result
Whereas if you don't feed ChatGPT any more input, it won't come up with any new output
I don't think the understanding is what matters
 
@pxeger Even that is not really true
e.g. models that learn to play chess/go by playing against themselves and that end up better than humans with new ideas
 
my point is more that when it gives you an answer, it hasn't really "thought" about what it's saying like we would, it's just strung words together based on the frequencies of combinations of words. It hasn't thought "hey I should check if what I'm giving as an answer is correct", it's just "pick word after word"
 
I’m sure you could use a transformer-based model to translate from english to a random new language, which would be pointless but which would be statistically "sound" and new
 
@Fatalize A chess model can come up with new good ideas, but it's only by determining that a randomly generated idea is good, which it can do easily by winning chess matches against itself
I don't think ChatGPT has an easy way to check if a randomly generated idea is good other than by comparing it against the input it's been fed already
 
12:06 PM
@pxeger How is that different from a human? They try new ideas and see if they work
At first they might be random but as training progresses, the new ideas it tries are guided by its existing knowledge of the game
 
Yeah I didn't mean actually random
 
@pxeger It doesn’t but that’s mostly because its sole purpose is text generation
You could add additional models and objective functions to do something else
The question of what it actually understands doesn’t really matter
The main point is that you can show that some of the things it comes up with do not hold against symbolic reasoning, and there is no obvious way to map feedback from symbolic to statistical
 
 
1 hour later…
1:16 PM
Hi
 
1:35 PM
iH
 
I really wish Python's ZeroDivisionError was only for moduluses
With zero divisions it should return float("inf")
Porting Scratch to Python is hard due to this
 
:/
 
You know, creating a 3D program
Divisions by zero will be frequent
 
@UndoneStudios it doesn't make sense you know
 
and should return infinity
It works in Scratch, but not in Python
 
1:38 PM
1/0 -> inf and 1/-0 -> -inf
 
And since in Python 1/float("inf") == 0.0, shouldn't the converse be true as well?
@PyGamer0 No hold on
-1/0 -> -inf
 
@UndoneStudios But 0/0 just isn't float("inf")
 
@mathcat yes, that should return float("nan")
 
I meant n/0 isn't infinity either
 
._.
what are you talking about? there is only one correct answer to division by zero and it is undefined
 
1:42 PM
Makes sense, because 0xinfinity is not 0
 
nah
Infinity isn't a number, don't mess with it.
 
^
@UndoneStudios what exactly are you trying to do here? :p
 
@mathcat It's true
0/0 == 0*(1/0) == 0*infinity
 
@UndoneStudios nope, wrong
anything divided by zero is undefined
 
depends on your value of 1/0 however
 
1:44 PM
undefined
it's always undefined
 
and since 0/0 is indeterminate, so is 0*inf
 
anything times infinity is infinity
 
@Ginger depends on whether you're a practical kind of guy
 
@UndoneStudios no it does not
 
In the practical sense, yes
 
1:45 PM
If you aren't working on set theory, calculus, or anything like that, just ignore infinity.
That's the best you can do.
 
Mathematics does not depend on your perception of reality :b
Infinity + anything is infinity, 0 / anything is undefined
that's just the way it is
 
Anyways, the reason I was about infinity was because Scratch's method of handling infinities makes it easier to create a 3D game
since divisions by zero will be frequent
 
why???
 
@Ginger because z clipping
if I remember correctly
 
@UndoneStudios can you not add a safeguard that keeps divisions by zero from happening?
 
1:47 PM
Sadly, Python's Big Brother style of looking at divisions resembling "x/0" makes me have to write a lot of code
 
o noes
 
@Ginger that's not going to help the 3D game
The only way is to make x/0 be infinity and not some obnoxious error
 
In what kind of 3d things does 1/0=infinity make sense?
Matrix libraries should take care of this stuff
 
@mousetail I'm not sure, when rendering things at the player's position
 
You chould cull faces closer than the near plane anyway
 
1:50 PM
@mousetail yeah
 
that's why you have the near and far clipping planes
 
@mousetail but it requires infinity divisions sometimes
you never know
I found out the hard way
 
Numpy or whatever matrix library you use should take care of it
 
@mousetail I use built-in libraries, not third-party ones
 
Actually no, even numpy would be too slow. You want to do it in your shader only
 
1:54 PM
Yeah, that's why I write all the modules for my code by myself
@Ginger Actually, I think it's anything / 0 that's undefined
0 / anything works OK
 
@UndoneStudios whoops :p
typo
 
Do the culling with numpy only on bounding boxes then per vertex only in the shader which will run on the GPU
 
@mousetail Yeah for starters, like I told you, I don't use numpy
 
Then use numpy
 
And I'm not planning to
 
1:56 PM
Or another linear algebry library
there are many
 
@UndoneStudios why
 
smypy-fam
 
I'd rather create my own
 
WHY
 
I hate outside stuff! I'd rather write my own code because at least you'll understand it
Steve Jobs style
 
1:59 PM
Linear algebra code is really boring though
 
one does not simply rewrite a matrix algebra library
I can't stop you but I can tell you that you will regret that decision
 
@Ginger you could make that a meme
based on "one does not simply outgolf Dennis"
 
chat lag :/
 
@mousetail Yeah right I love algebra
 
It's not hard just tedious
No linear algebra
completely unrelated to algebra
 
2:00 PM
@UndoneStudios though it'll have to be "One does not simply outgolf xnor"
@mousetail it's fun
honestly people are stereotyped against math
:(
 
I love math
But I want to just mutiply 2 matricies
not worry about if X1 = Y3*X3+Y4 etc.
 
I think it's time for a "Do I love math?" checkup
 
@UndoneStudios Math is literally half of my username
 
@mathcat approximately 4/7ths
not a half
 
But I agree with mousetail, writing matrix libs is tedious-hard, not fun-hard.
 
2:05 PM
yeah if you truly like math you'd still find it fun
doesn't sound like you do :(
 
No
WTF do you think math is
It's not tedious remembering of fomulas
 
No it's not
but it sounds like you're lazy
that's all
 
@mousetail linear algebra is kinda related to algebra :P
 
I don't see how
Algebra is solving for X
linear agebra is how to multiply matricies
 
you were talking about that kind of algebra?
No sorry I don't know just yet how to multply matrixes
Maybe later
 
2:19 PM
uhm okay
 
A massive amount of linear algebra is the study of vector spaces, an algebra is literally a type of vector space
 
That's why you want a library that can do that efficiently
 
@cairdcoinheringaahing I heard the term "algebra" comes from the Arabs
However although I can speak arabic I don't know whether that's true
but the arabs have done a lot, so I think they did
 
Wikipedia says it is:
> Algebra (from Arabic ‏الجبر‎ (al-jabr) 'reunion of broken parts,[1] bonesetting'
 
IIRC europe adapted algebra from an arabian book or smth
 
2:22 PM
@cairdcoinheringaahing ooh
 
Fun fact: The "Al" in "Algebra" and "Alcohol" just means "The"
 
The Compendious Book on Calculation by Completion and Balancing (Arabic: كتاب المختصر في حساب الجبر والمقابلة, al-Kitāb al-Mukhtaṣar fī Ḥisāb al-Jabr wal-Muqābalah; Latin: Liber Algebræ et Almucabola), also known as Al-Jabr (الجبر), is an Arabic mathematical treatise on algebra written by the Persian polymath Muḥammad ibn Mūsā al-Khwārizmī around 820 CE while he was in the Abbasid capital of Baghdad, modern-day Iraq. Al-Jabr was a landmark work in the history of mathematics, establishing algebra as an independent discipline, and with the term "algebra" itself derived from Al-Jabr. The Compendious...
 
Yeah I know
 
ah
 
@mousetail In fact, "al-" makes "a" and "l" the most frequent characters in arabic, which was the first breakthrough in breaking the monoalphabetic cipher
@cairdcoinheringaahing I also remember something about the origins of "algorithm"
Somebody named khwarismi
 
2:25 PM
Exactly
So "The Algorithm" is actually redundant
 
It sould be Al Gorithm" or "The Rithm"
 
so the arabs are the reason of most of the words used in programming today
nice
 
@UndoneStudios Literally the author of the book I linked
 
@cairdcoinheringaahing total coincedence
but yes, he was respected
until his death
indeed, had the arabs not been destroyed by europeans in 1924, our society could be even further today
sad
 
2:32 PM
The arabs invented a huge part of modern math yes
Even things named after other people
 
Yeah, pretty sad that they were repayed by being demolished
That wasn't fair at all
@mousetail What do you think the world would be like without them?
 
Exactly the same
 
somebody else would've invented it lol
 
No like today
 
2:37 PM
They were just the ones to do it first.
 
in the future, yes, but I'm talking about today
 
This was 1000 years ago
 
That's another of their astonishing characteristics: they survived from the 7th century to 1924
A long time
About a millenium and a century years
But I can't remember another empire that lasted that long. Romans?
 
Which empire are you talking about?
Ottomans?
 
2:49 PM
Those where not the same people who invented math
those came before
 
oops
But yeah, I don't think we have a name for those
do we?
 
I don't think there was a single empire or kingdom but many small ones
 
Perhaps
yawn Why are we talking about this? Would it be on-topic?
On second thought, a lot of borderline of off-topic stuff is on-topic
 
If it gets in the way of a more on topic discussion these messages will be deposited in OTTNB
 
3:15 PM
@mousetail ah
 
I really like your PFP btw
 
@mousetail thanks
It was created by a Scratch script by messing around with polygons
Which means it's not actually symmetrical at all
 
It's only like 5 pixels accross so it's really hard to notice
 
In the middle is a triangle
but it's shadowed by other shapes
so yeah
but yes, it's amazing that it looks like something it is not
Wish it was on Tweetable Mathematical Art
 
Does it fit in a tweet?
 
3:21 PM
I guess
It's a screenshot of about 480x360 though so can't tell
SE strips it to become a square
But I don't know... Even a question like TMA without the tweet would still be off-topic
 
4:06 PM
@UndoneStudios obligatory, al-khwarizmi wasn't arab, the name literally means one from the region of khwarezm which is more or less in persia
 
@UndoneStudios The Bacteria™
 
 
1 hour later…
5:29 PM
@PyGamer0 Right
That makes sense
@user41805 Oh
 
 
1 hour later…
6:55 PM
@user41805 persian numerals then?
@UndoneStudios they were repaid for Other Things™
 
7:11 PM
@UndoneStudios It could be a popcon
Images with all colors is still open
 
7:22 PM
0
Q: Round to nicer numbers

Wheat WizardThe standard way to round numbers is to choose the nearest whole value, if the initial value is exactly halfway between two values, i.e. there is a tie, then you choose the larger one. However where I work we round in a different way. Everything is measured in powers of two. So wholes, halves, ...

 
TIL (and TI want to unL)
 
i knew that for a while
 
 
1 hour later…
8:51 PM
0
Q: Language of the Month for January 2023: Elm

Wheat WizardIn accordance with our meta agreement, since one candidate received more votes than the others, we have a new featured language! Throughout December 2022, our Language of the Month will be: Elm What's a Language of the Month? See the meta post for nominations. In short, during January, those wh...

 
9:09 PM
@Seggan According to Wikipedia, they were also spread by Arab merchants, not just Al -Khwarizmi, so calling them Arabic numerals isn't wrong
 
9:55 PM
Aw, hats are gone
I'm no longer verifiably lyxal™
How will people know I'm the real me now?! :p
 
Maybe your hats are gone
 
Well at least I won on the hat count leaderboard here :p
 
Huh I got fiftth
 
10:16 PM
I don't think I actually made specific efforts to get any hat, but walked away with 21 hats at #7 on the leaderbboard
I also think I was the only user on the site with the Over 9000! hat
 
No? Ginger had it
What was it anyway?
 
Start a post of score 2 or more
@emanresuA Oh yeah, Best Of started
 
Ah makes sense
 
@emanresuA l4m2 had it too
 
Interesting
Pretty sure their meta post was posted before WB started, right? Dec 18th?
 
10:19 PM
Possibly one of their caching issues
Apparently for some hats they had forgotten to clear testing data from before the event started
 
@cairdcoinheringaahing Looking at the list of hats, there's easily 5 secret and 3 regular hats I could've gotten with a bit of effort
 
 
1 hour later…
11:38 PM
0
Q: Wordle games without repeating letters

matteo_cGiven a word list, find all sets of five words of five letters each, such that the words of each set have 25 distinct letters in total. This challenge was inspired by this video by Matt Parker. Testcases Use this file if you want to test your code against the English vocabulary. Sample output: ["...

 

« first day (4358 days earlier)      last day (470 days later) »