« first day (3933 days earlier)      last day (1206 days later) » 

18:06
How you iterate over all lists on
How you iterate over all lists of 10 non negative integers whose sum is 10 in an efficient way?
I feel like this must be known
Consider: how do you iterate over all lists of 9 non negative integers whose sum is 9 in an efficient way?
How do you iterate over all lists of 8 non negative integers whose sum is 8 in an efficient way?
How do you iterate over all lists of 7 non negative integers whose sum is 7 in an efficient way?
...
did you mean to change the list lengths for those 2nd and 3rd ones?
How do you iterate over all lists of 0 non negative integers whose sum is 0 in an efficient way?
@Mayube no, but I do now :Þ
How do you iterate over all lists of n non negative integers whose sum is n in an efficient way?
regarding the idea to scan all chat messages - unfortunately there is no way of distinguishing a message that's been deleted or is in a private room from a message ID that is yet to exist; thus, just iterating up in message ID won't really work
one way to circumvent this is to have a bot periodically post a message in the sandbox and report its ID so we know where the boundaries are, and every 404 before it is just hidden
18:12
well, actually, {all lists of 10 non negative integers whose sum is 10} = (map (1:) {all lists of 9 non negative integers whose sum is 9}) ++ (map (2:) {all lists of 9 non negative integers whose sum is 8}) ++ ... ++ (map (10:) {all lists of 9 non negative integers whose sum is 0})
so yes, @Mayube I did mean that
@hyper-neutrino context?
@pxeger we were discussing the easiest/best method to scan all new incoming chat messages from all rooms to do a smokey-like scan in TL and I asked here and Redwolf came up with a few ideas
one of them that I also had is to just while True: x++; get(chat.stackexchange.com/message/x)
I doubt it'd really do much. just a "fun" (for some definition of fun) little idea
@hyper-neutrino does the "in TL" apply to "we were discussing", or "do a smokey-like scan"?
the former
if you only want to scan all new incoming chat messages, you could just join all rooms, couldn't you? or is the goal to avoid doing that
There's currently 800 unfrozen rooms lol
And that tends to be the average from what I've seen
18:17
but there isn't any technical limitation on joining that many rooms, is there?
not really. but having a random account exist in every room is sure to raise questions
can't you join silently, as happens when you're reading the live transcript?
No, that just checks the /events every few seconds
Which, for 800 rooms, is also called a DoS attack lol
wait what? lmao
18:44
@Mayube im trying this with desmos, i dont know if theres a way to turn a list into a smaller list, so im going to have to think of how to mathematically extract this value :thinkingemoji:
lists of X non-negative integers that sum to Y is just [k, lists of X-1 non-negative integers that sum to Y-k] for all k ∊ 0 .. Y
oh wait pxeger already said that but differently lol
@RedwolfProgrammed ... which it is...
*which it can be
But it's annoying
are any words improved by having their plural form be the same as their singular form
is the singular not datum
18:48
It was, yeah
it used to be
besides buffalo for lore reasons
but thanks to the social construct that is language...
I mean, it still is, but "data" is also now an uncountable
wait how can you use data as a singular anyway
so it is a singular, and it doesn't have a plural
18:49
what even is "a data"
What's a datum either?
@RedwolfProgrammed a data point, or a piece of data
it works the same as the word "information"
@thejonymyster it's uncountable, so you can't use it with "a", but you'd still say "this data is" (grammatically singular) instead of "these data are" (which is the old / "technically correct" version)
18:50
Uncountable is so much better
why on earth would ever say these data are? these information are
@pxeger No such thing as "technically correct" in english
@RedwolfProgrammed "uncountable" isn't even a noun, let alone an uncountable noun, so you can't say "uncountable is" :Þ
What's technically correct is what people understand
@pxeger [having it be] uncountable is...
18:51
@RedwolfProgrammed I'm aware, I should have said "technically correct" rather than technically correct
@thejonymyster joke
nod
but yea no nobody should be debating how to use the word data because theres only one sane way
@RedwolfProgrammed no, it has a singular
It had one :p
If you still use "data" as plural though, you've lived in a cave for the last few decades
@RedwolfProgrammed I'm going to need more data to substantiate your claim
wahts the singular form for "information"
18:54
@RedwolfProgrammed it still does, because, as this datum shows, some people still use it that way
@thejonymyster "information" is singular
whats the plural form for information
there isn't one
because "information" is uncountable
This is a pretty pointless argument though
data is the plural form of datum
@RedwolfProgrammed or you work in academia
what is one datum genuinely because i thought data was like, by definition uncountable
5 mins ago, by pxeger
@RedwolfProgrammed a data point, or a piece of data
oh, thats fine
a datum of data
a datum is one piece of information or numerical result
data is the plural of datum
now in my head its not a weird debate about plurals, its just "theres this funny word that means a single point of data"
18:56
data is still uncountable, datum is just its own thing (to me at least)
I'm sorry cartograpghers and engineers, but what the fuck?
so 3 is a datum. [2, 3, 6] is an array of three data
@Mayube that would be incorrect :D
thats three datums ^_^ hope this helps
datums is not a word
18:57
@pxeger yes it is :P
data is the correct plural form of datum
@Mayube "datums" is a word, because cartographers and engineers use it as a word
language is a social construct
@Mayube but thats just begging the question
@thejonymyster in the context of cartography and engineering specifically, sure
18:58
@Mayube right sorry that one was a joke, but i think if were going to have the word "datum" it cant be part of the same word as "data" anymore, "data" has moved on and become a strong independent uncountable
@Mayube it's still a word, just maybe not the correct one to use in other contexts
@thejonymyster it's not fighting a losing battle against change, because nothing's changing. data is the plural of datum. data is also an uncountable noun. Words can have multiple usages depending on context
The only correct usage of "data" as a plural is to refer to the character from star trek
@Mayube but thats so bad
19:00
(Don't star that it's an overused xkcd)
@RedwolfProgrammed star of shame
@RedwolfProgrammed But there's only one Data. Datalore is not Data
@thejonymyster Why?
because its one word for two closely related things in the same context
which leads to unnecessary confusion
like monads
welcome to the english language
@Mayube Personally I dislike "data" as a plural because it's inconsistent with "information", and I find the concept of a single datum kind of pointless
But this argument's still pointless :p
19:01
>datum
>pointless
@RedwolfProgrammed because you don't work in statistical acadamia
Yep
It's fine for a word to mean different things to different people, the worse english is the more I like it :p
well as long as it makes for interesting word puzzles i guess
English is actually just an esolang experiment to make an esolang so inconsistent that the only way to build a parser for it is to evolve life
every day we plow through syntax errors
wait lol programming language descriptivism
19:05
oh no
syntax error*
`error` is the plural of `errum`
the "correct" syntax is whatever the programmer uses
for those of you who are annoyed by how many chat flags math.se chat generates
you'll love to hear that math.se is starting an election in 3 days
@thejonymyster isn't that just JavaScript?
personally i think every plural should be the singular form with an "s" at the end
dogs, cats, fishs, datums, etc
19:06
personally I think we should just not have singular/plural forms, like mandarin does
@thejonymyster Can you think of a plural noun that becomes a singular noun when you add an s?
there might be multiple in english, but I know of 1
i cant, is there one? :O!
princes
ohhh hehe
19:07
plural of prince, add an s it becomes princess
new rule: no words can end with s other than plurals
sheesh
that's gunna mess up some words
the sheer mass of that change would cause quite a lot of stress
who could guess
but i digress
19:09
also what about continuous verbs?
walks eats becomes writes codes
i tried to read that as a single sentence haha
hahaha
new rule: code is a single lexicographic token, codes is a complete program
we don't write code we write codes
codum and coda
codums
but only in cartography and engineering
low-effort call backs are one of my favourite forms of comedy, up there with non-sequiturs and post-irony
and of course puns
i like it when the low effort call backs keep accumulating together like a big dumb joke katamari
19:15
> 塊
@Mayube Bring back and repurpose walketh, eateth, becometh, etc. as continuous
that's a funny looking kanji
@hyper-neutrino if you squint real hard it looks like a person with a sword and a swollen leg
... interesting
i wish i looked like that
19:20
"My pronouns are he, not him.. cos I'll never be him"
Don't you hate when you spend like half an hour writing a super detailed explanation of your code, then notice multiple ways to golf it and have to rewrite the whole thing?
writing explanations for my code is actually where a lot of my golfs come from
because as I'm typing an explanation for it I realize "wait this is dumb"
same, but when it's a ~460 byte interpreter in python it's a lil soulcrushing
lol
yeah
a lot less annoying for a like 10 byte jelly answer to rewrite an explanation that took me like 4 minutes
@Mayube I do that with basically every Whispers/Add++ answer, which may be why I don't really use them :P
There've definitely been a few times where I have a few hundred byte JS answer with a beautiful explanation, then I significantly golf it and just give up and remove the explanation :(
19:29
I do remember one Jelly answer where I did "indices; powerset; index into input" and HN pointed out that was just "powerset" :/
@Fmbalbuena You're learning Add++?
CMC iterate over all arrays of 10 non negative integers whose sum is exactly 10 without creating 10^10 arrays and filtering
@Fmbalbuena what can I help with? :)
Try it online! Why i cant use?
@Mayube solved in desmos :D! this was fun even solving it, ill have to golf it when im not at work. input with i, output is o. Everyone should click this i think
2
19:33
@Fmbalbuena You need to separate the On and Ox commands with ,,: Try it online!
Impressive, good job!
How do we score desmos answers? :P
The indentation and newlines aren't significant in Add++, so it ignores them and tries to run OnOx, which isn't a command
@Anush I think you can do it with less than 10^10 arrays, while still filtering :P
@Mayube you score it based on the code you paste into desmos to make it work
in its current state, it isnt actually scoreable
@cairdcoinheringaahing how much less?
19:35
im just excited there is a solution :]
Well, we know trivially that [0,0,0,0,0,0,0,0,0,0] doesn't, so, we can say that 10^10-1 is an upper bound, at least :P
@thejonymyster that's awesome
@cairdcoinheringaahing thx but how can execute a variable as Python
@Fmbalbuena Like, if a variable has a string, how do you run that string as Python code?
19:37
@Mayube YES. It's so annoying.
@Anush i dont think i will be solving this one in desmos :P
You'd have to use functions for that, as Python exec isn't a command in vanilla mode
@emanresuA just realised toward the end of writing up my explanation that 4**9 is both fewer bytes and a larger value than 2**15. A small change, but I have to change it in 4 places: Code in answer, code in TIO, ungolfed code in TIO, explanation
@Anush alternatively, I can do it by creating a lot more than 10^10 arrays and filtering :P
@cairdcoinheringaahing and i want to upvote the language
19:41
@Fmbalbuena Well, if you have a Github account, you can star the repo. You can also upvote its LOTM nomination instead :P
Tho that does mean I have a month to finish v6 :?
I already upvoted LOTM
And i star your github repo
In my mind, that counts as upvoting the language :P If you're interested in using Add++ on the site, there is a open bounty for answers in it
@cairdcoinheringaahing Try it online!
Alright it's finished. I'm gunna cry if this gets significantly golfed and I have to update the explanation.
Also @cairdcoinheringaahing some of that code might look familiar ;)
@cairdcoinheringaahing :)
No lovers of Knuth here :(
19:52
@Mayube Does that use the Brainflump strategy of indexing into a list of code? :P
@cairdcoinheringaahing yes. It also uses Brainflump's strategy for handling loops
@cairdcoinheringaahing See you later
really it was just an adaptation and further golfing of brainflump's interpreter to handle volatile instead :P
19:54
cmegac given a list of integers output the coolest one
@thejonymyster JS, 14 bytes: a=>a.sort()[0]
Braingolf, 1 byte: x
@rak1507 noooooo
@Mayube Sorry for golfing, but why are you assigning C when you only used it once?
@emanresuA it's used 4 times
I mean capital C
20:01
oh uppercase C
C=u[i]
if c==C:f+=1
good point :P
And before you try it, f+=int(c==u[i]) saves no bytes.
Also, loop#2 can become for c in a, then you can get rid of the assignment to c
no it can't
i is assigned for loops
can't go backwards in for c in a
20:08
happen to know of a 3-byte expression that evaluates to >= 2**15?
oh dang I forgot about e
Also (not s[-1]) can become ~s[-1]
forgot about dr e
woah, i cant infix that?
You can, you just need spaces around strikethrough
---a--- b
20:10
but then it messes up the
@emanresuA can it? Isn't that bitwise NOT?
Yes but overloading/type conversion is bleh
but if it's a bitwise NOT it won't do any type conversion. It's multiplying a string, if the result is anything other than 0 or 1 it's gunna have unintended consequences
wait are negative numbers falsey in python2?
Idk but it seems to work on the other testcases
no they aren't
@emanresuA doesn't work if top of stack is negative
volatile's loops are != 0 not > 0
20:15
Ok nvm
I think I had a whole-ass unnecessary line in there too
Dammit maqrkdown
edit it on TIO and post the link
At the end you can assign e to [e,...][g+1] for -3 bytes:
https://tio.run/##NVHLbsMgEDzHX4EiRYCNnbjqpZDtF0T5AcuqLIwdJAcQfqS95NddcNMD7GrZ2Zkd3M90s@ZtXTtv78g3pg1B3531U5o04JvHlzZunggVGhY4iRGqWljAjoyFs47Qw/hKKBYDDMoIB2PROKdMm7SqQxcyM8muzFOeIN2huZB2NhOR9HzlXk2zN3mZoBnminNfiw5OCeqsRxppEyX1igxkpgG@C3AJoVHXvMug3AodwP8cFPtyncWQEv95osnjpgeF9HkgTeSX0ASwUICx6AE/eYGLTps2qNnEycCJszw9Yq7AHmQsYoIBJF8CYQRquJCG7emeLaykOCXGTmis8rLeRmC6dW/Stip/AUgE5CUNy@7UMCq@5GGDSFpmfWCrgqfxA3Tw5sTe0/QjWMqi0dvsmPr4Fs9fieK66usEqW8lkRI6CFzXJ8@LJz9mBdlu@gs
your change didn't take in the link, but I see what you mean
in fact i can skip assigning e at the end altogether and just exec [e,...][g+1]
20:25
Nice!
wait if I put e at the end I don't need the +1
a grand total of 43 bytes golfed so far. Thanks @emanresuA!
One more thing - Why assign g?
20:44
because at the time it was used in the if and the array index, but now the if is gone
So -5 bytes by removing the assignment
-4*
Do I have too many tabs open?
@Mayube I count good
@emanresuA We don't need to be able to math and count, we have computer for that ;)
20:46
@UnrelatedString ಠ_ಠ
@UnrelatedString Imagine having that warning turned on in 2021
1022 is an anagram of 2021
oh hey so it is
CMQ: Cool name for a chat program?
epikchatzz9000
20:49
@RedwolfProgrammed Cool name for a chat program
you can have that one for free
@RedwolfProgrammed "Quot"
@emanresuA cnfacp
@RedwolfProgrammed do what I do when naming projects: tr -dc a-z < /dev/urandom | head -c 4
how about cvih
20:55
with a couple of synonyms you can make that pronouncable: `Cifaca`
Cool identifier for a chat app
Although try pronouncing that
See-fah-ka
I think emanresu meant cvih
k-vee
@Mayube That's exactly my point
What does that sound like?
20:58
@emanresuA if you think it sounds like that you're not stressing the ah enough. Think the way a bostonian would pronounce "far"
I guess... Still sounds a bit wrong to me
@emanresuA /kəvɪx/

« first day (3933 days earlier)      last day (1206 days later) »