« first day (1283 days earlier)      last day (492 days later) » 

04:54
1
A: Is it a Lynch-Bell number?

alephalphaNekomata + -e, 3 bytes Ɗ¦ů Attempt This Online! Ɗ¦ů Ɗ Decimal digits ¦ Divided by, and check if the result are integers ů Check if all elements are unique

This has been making me unhappy
3 bytes and we're stuck with 7
And tbh I've been thinking about whether there'd be some benefit to incorporating some form of non determinism
But I've come up with a better idea
Uno flip
Or specifically, a flip modifier that makes elements return a null or fail type for certain inputs
So like you might write flatten flip: int-div all-unique?
And the flip modifier would make div by 0 and non-int results a fail type
My current working name for the fail type is the nuh-uh type
Like that kinda nuh uh
It's a bad name I know but it's good for now
If a flip modifier was given a function or modifier, flip mode would be applied to everything in the function
So I suppose it'd be a context thing too
And there could also be a flag to have everything flipped by default
The name flip comes from how uno flip has double sided cards
And you can switch which side gets played on with a flip card
Hence why it's called the flip modifier
 
3 hours later…
08:20
I think a nuh-uh type would also be beneficial for knowing when a thing has failed or whether it's just returned an empty value
Or even to have a simple way to know that something has errored without actually having errors
A null type?
Nuh-uh seems like an interesting name for a null type.
It's not null, as such
It's a "hey this operation failed" type
Nuh-uh isn't the final name btw
It's a stand in name to avoid bikeshedding over what it should be called
An error type?
Interesting I would suggest the name of "error" or "fail".
That's the point of the temporary name
To avoid getting caught up in what it should be called :p
Oh.
But I think "error" or "fail" make more sense.
08:29
That's for later
If even ever
I don't know whether it's worth adding yet
The whole point of mentioning it was to discuss the concept and the proposed implementation
Because it'd require a bit of a code refactoring
Okay.
Which automatically means I'd need user's input
So we could just do nothing.
And make the programmer check themselves.
So "is this a nuh-uh type?"
There currently is no such type. And the idea is more "is it a golfy thing"
Oh right.
But we can just make checking it easier.
Maybe one builtin just for that.
08:32
I'm saying should the type even be added at all in the first place
Forget checking for it
Yes.
It's a requirement.
This specific proposal isn't something I've thought about in depth you know :p
I've yet to play test it outside of a single use case
IT'S A REQUIREMENT.
A REQUIREMENT.
It's not
Well yeah.
08:33
I haven't decided that it needs to be a thing
Error handling could happen other ways.
Meaning it's not a requirement
@The_AH this is code golf. Traditional error handling isn't a thing
@lyxal Traditional, not all error handling.
This idea is only because non-deterministic programs seem like they might be shorter sometimes
Error handling is not a priority.
This would be a neat side feature
What would happen in a zero by division error then?
How would the programmer respond?
If you were building the smallest calculator possible for example.
08:35
@The_AH it returns 0
No error thrown
So that means you already have error handling.
Okay.
So errors are just 0 values then.
No
Division by 0 is special cased
Because it's useful for golf
What does that mean?
Special cased?
Theres an explicit check for 0
What special case?
What happens then?
08:37
There's an if statement that says if rhs == 0: return 0
OH.
Operators can optionally implement checks for edge cases like that and return a default value
But error handling isn't really a thing outside of places where an error case can be turned into useful behaviour
Okay that seems like an interesting way of error handling.
The programmer has no control over it. If there's ever a runtime error, it's either strange data, or a bug on our end
That seems like a horrible way of error handling.
08:40
It would be if the main concern wasn't code golf
But this is code golf, so it's not a problem
Yeah ik.
Anyway , I need to flesh the idea out a bit more
Yeah.
 
4 hours later…
12:36
Lyxal pushed a commit to Vyxal/main in Vyxal/Vyxal: Update pyproject.toml
@Ginger An error occured while processing event a68297c0-70d7-11ee-8440-19cdb2351af9!
Ruh roh
that's like, one of the features that shouldn't be broken
12:49
@lyxal LLVM has this! it's called "poison values" and it does effectively what you're suggesting
thanks chat
Anyhow
Given that the bot errored on it
13:19
@lyxal shit, that was a release event?
It was
>:|

« first day (1283 days earlier)      last day (492 days later) »