« first day (3940 days earlier)      last day (904 days later) » 

1:01 AM
@hyper-neutrino if only you'd recalled correctly
 
1:25 AM
@Neil IIRI?
 
1:48 AM
IIRC's always been "remember" not "recall" to me, but they're close enough synonyms it doesn't seem like it'd matter in any situations (unlike the "imho" one)
 
heavy/honest/humble?
 
Never heard heavy before
 
I know exactly one person who uses heavy, and he's adamant that that's what it's always meant
 
that doesn't even seem plausible
 
IMHO it does
 
1:50 AM
that same person argues to great lengths about whether the f in tfw and mfw means face or feeling
 
@RedwolfPrograms in my hecking opinion
3
 
@Mayube I used to think it was some weird variation of wtf. "the f***? what?!"
 
i thought that for so long
or maybe it was the other way around
or both?
 
@UnrelatedString when that face?
 
wait not hat was with ftw
 
1:53 AM
@UnrelatedString Fuck. The What?
 
precisely
 
mfw I realized "mfw" doesn't mean "motherf***er, what?!"
 
@Mayube no, I don't think I will
 
@Mayube That makes even less sense than "tf? what?" lol
 
...what permutations of wtf aren't valid txtspeak, and how can we remedy that
 
1:54 AM
tfw lyxal won't f** the what
@UnrelatedString fwt
and twf
 
My school has a maintainence room of some sort labeled "IDF", and I've always read it as "It's da f***?" when I walk past :p
 
For what, twat?
 
i think i've seen fwt used for "fuck with that"
 
and wft
 
wii fit trainer
 
1:54 AM
@UnrelatedString oh yeah good point
 
The what, friend?
 
@Mayube "what? f*** that"
 
@RedwolfPrograms I see that as an Asexual's variation on "IDK" or "IDC"
"I Don't F***"
 
@RedwolfPrograms imma gon have to pass on that too
 
@Mayube Actually that's what I read it as more often, yeah, but it's not as funny sounding as "It's da f***?"
 
1:56 AM
@Mayube They should move to Florida, I hear there's plenty of places to fish there
 
imagine walking into an asexual forum and spending 5 minutes very confused as to why they're talking so much about the israel defense forces
5
 
You stole my joke D:
and it's better too
 
I assume the IDF DF (around)
 
Hold on, lemme get an Asexual's opinion on what IDF means
 
@RedwolfPrograms now you know how it feels :p
 
1:57 AM
@RedwolfPrograms smh patent it first so you can charge people insane amounts of money for it
 
That'd be copyright not patent you desalinated salmon
2
 
r/rareinsults
 
@RedwolfPrograms Salmon are actually anadromous, meaning they live in saltwater but swim to freshwater to breed
 
I guess user doesn't IDF
 
@RedwolfPrograms ?
 
2:00 AM
Well if you're a saltless salmon, you're in freshwater, so you're there to breed
 
There are also some species of salmon, such as Kokanee salmon that are entirely freshwater based
 
Then you mean user doesn’t F
 
Also I asked an asexual what she thought "IDF" stood for, and she refused to even guess. She just said she has no idea. Lame.
 
Someone make a pun about inverse document frequency pls, i too tired
 
@Mayube because she doesn't frick about idf
 
2:03 AM
@RedwolfPrograms Also how am i saltless im salty af
idf around with my salt
 
Such a useful international review
What would I do without this priceless knowledge
 
Canadiens do be like thyat /s
 
Could be an American using tor
Because I was allegedly in Canada earlier today lol
 
Sus
Why you usitng tor
 
Lyxal vented to Canada
 
2:05 AM
@user to visit a public health site that doesn't load using Chrome based browsers on mobile
Why tf else would I use tor?
 
Hacking the non-upside-down people
 
I already do that with my organisation - how else do you think I get all the limbs I steal?
 
¯\¯\¯\(._.)/¯/¯/¯
 
@lyxal hiring hitmen of course
 
@user yeah but how else do they get the limbs
 
2:07 AM
Also just use internet explorer smh
@lyxal you hite hitmen to steal limbs for you
 
@user Now tell me how tf imma use internet explorer on my phone
 
Install firefox then
 
@user yeah but they don't need tor to hack people
 
Tor is just based on ff anyway
 
^^^
Firefox ftw
 
2:08 AM
@user tor is based on Firefox so I just use that
 
Kinda sus
 
@user No I can't be bothered to download an extra app
 
@lyxal no but you need tor to get into the dark web because other browsers don’t have lights and you can’t see stuff
Also onion sites make you cry in chrome but tor protects your eyes
@lyxal Fair enough
 
@user i don't even know any dark web addresses lol
the most stupid thing I've used tor to do was chat here
 
I was kidding lol
I don’t know much about the dark web either but I’m pretty sure Tor doesn’t help you with that too much
 
2:14 AM
no, you were user.
get it right.
 
I was named kidding when I was born
 
we're gonna need a birth certificate to verify that
 
The doctor was like “You’ve got to be kidding, that’s one ugly baby” and that’s what my parents named me :p
 
F ;p
ever wanted to see what happens when someone who mains python uses js?
function f(thing){
    if (thing.length == 1): return thing
}
 
@user ?
Tor's the main browser used for the dark web
Oh wait unless you mean it doesn't help you know much about it
 
2:44 AM
is the only thing wrong here the colon instead of {} block
genuine question as also not a js user
 
yeah the colon
 
@UnrelatedString In that situation a {} block would be pointless
It's cleaner to just do
if (thing.length == 1)
    return thing;
 
oh does js do it like c
neat
 
Doesn't basically every language do it like that?
That has {} blocks
 
i know some languages force you to use braces for compound statements
 
2:46 AM
Huh
 
and honestly i've grown more sympathetic to that except i was just thinking about a split do {...} while (condition) {...} block and realized that would just clash with plain do {...} while (condition) until i realized that if braces aren't obligatory do {...} while (condition) ; actually looks better
(can't remember if existing languages actually do that or not but i sure know java doesn't)
 
What, the semicolon after while (condition)?
 
letting you structure a loop like that
 
the semicolon of course just being an empty statement
 
2:51 AM
What would that do? Run the do, then the condition, and if it passes, the while part, then back to do?
 
Interesting. Don't think I've ever heard of a language allowing that though.
 
interesting
 
In JS it's valid syntax, but it just works like a normal do-while and runs the second block once afterward
 
2:53 AM
So it's just parsed as a do-while and a regular old code block afterward :p
 
3:08 AM
@UnrelatedString That kind of structure is equally cleanly written with a conditionless loop with a break in the middle
 
...true
or perhaps more cleanly since nobody's ever really ready to see a do-while loop in the first place
 
3:21 AM
If anyone's planning to do some AoC in Rust, cargo-aoc and the AoC Rust libs really simplify things a lot
 
oh yeah i should try that
 
3:52 AM
this looks more complicated than hacking together a terribly scuffed python thing
but maybe it's just because i don't know anything about rust so it looks harder than it is ¯\_(ツ)_/¯
 
Well, normally it is even harder than that, because you have to write lib (where you write functions that solve the task) and bin (where you read the input and run the functions) separately and store the input manually at the correct location and etc etc
 
oh, I see. so it's not meant to make it simpler than other language options, just make it better than using unmodified rust. got it
 
With it you just write the solution to the task itself (with a bit of macros used correctly) and cargo-aoc handles the rest
Yeah, basically
How could you expect a Rust setup to be simpler than Python :P
 
well you see I don't know anything about rust so i just thought they were approximately similar :P
 
4:57 AM
@hyper-neutrino Is there any way to autodelete posts that are similar to recently deleted posts on SO?
(I'm guessing there isn't, but is there a MM feature request?)
 
Seems like a feature that'd rarely be useful, maybe building it into a bot would be better
 
Could ask Smokey's mantainers
 
5:13 AM
I highly doubt Smokey would a) have interest in that b) think that's a good idea especially since c) I don't think that's a good idea
 
¯\_(ツ)_/¯ Just an idea, and I can see several problems with it :P
 
it's not that often applicable
and if a question really is on-topic here but not SO
it's possible OP posts it here and deletes it on SO, which would trigger your condition :P
 
Yeah I guess
 
 
3 hours later…
7:45 AM
Me: *plugs in phone charger into phone*
Also me: *accidentally pulls phone charger out of wall at the same time*
 
Well played
 
0
Q: Floating Point indexOf

tshGiven a sorted array of unique positive integers \$A\$ \$(A_0<A_1<\cdots<A_{n-1})\$, and an integer \$t\$, where \$A_0\le t\le A_{n-1}\$. Output the value \$i\$ such that: If \$t \in A\$, \$A_i=t\$. If \$t \notin A\$, \$ \left(i-\left\lfloor i\right\rfloor\right)\cdot A_{\left\lceil i\right\rcei...

 
8:36 AM
yay, managed to golf the closed form formula down to less than brute force
 
8:59 AM
(well, in Charcoal, anyway... other languages may vary)
 
10:22 AM
o/
 
@UnrelatedString rust i think but it doesn’t use parentheses
 
10:48 AM
hi y'all
CMC Find a set of three strictly positive integers a_1, a_2, a_3 so that all sums a_i + a_j are squares
 
11:09 AM
@Anush [2,2,2] but I suppose you don't allow duplicates :-)
 
@emanresuA One of them got shared on Hacker News, the other didn't
 
@Adám no duplicates please :)
I should have said sums of a_i+a_j with a_i, a_j distinct
 
My accommodation has been trying to organise a fire drill for like 2 weeks now, but every time they set a time/date, it ends up raining :P
 
11:32 AM
:) That's hilarious
can they really not have a fire drill in the rain???
 
They can, but they want to avoid having a few hundred or so students standing around in the rain for however long
 
m90
@Anush 6, 19, 30
 
@m90 very nice! How did you do it?
@cairdcoinheringaahing seems like a mistake. It could well be raining when there is a real fire!
 
Yeah, but then the rain will put out the fire. Problem solved :P
 
:) If only
 
11:41 AM
@cairdcoinheringaahing It got even better: the drill was supposed to happen 10 minutes ago (before it got rescheduled), and literally at 11:30, the rain stopped and its now sunny :P
 
m90
@Anush I chose 25, 36, 49 as the squares (their sum must be even, and their values sufficiently close); then the sum of the numbers is half the sum of the squares; then obtain each number by subtracting one of the squares from that value.
 
@m90 That's great. You might enjoy −15863902, 17798783, 21126338, 49064546, 82221218, 447422978
which is more tricky to find
(not strictly positive though sadly)
 
 
1 hour later…
1:13 PM
0
A: Sandbox for Proposed Challenges

AnushConsider all arrays of \$\ell\$ non-negative integers in the range \$0,\dots,m\$. Consider all such arrays whose sum is exactly \$s\$. We can list those in lexicographic order and assign an integer to each one which is simply its rank in the list. For example, take \$\ell=7, s=5, m=4\$, the l...

 
comments please!
should I separate it into two questions or is it ok as one?
 
1:32 PM
I will just add the bytes for the two functions I think
 
2:15 PM
@Anush Personally I think it should be two questions, but I don't think there's anything wrong with keeping it as one
 
@Mayube I was worried about the demon downvoters if I made it two. People like to downvote questions that are on the same topic
but if one more person here says it is ok I will do that
 
Also what's the scoring of the challenge? ?
 
@Mayube yes. well I guess with to stop dumb brute force methods
do you think it needs more examples?
 
It could maybe do with a couple more testcases
 
ok thanks
 
2:20 PM
Are there any edgecases that might not work for certain approaches that otherwise seem to work? Those are always good to include in testcases
 
hmm... I don't know of any except for where the rank overflows a type
 
2:31 PM
Not sure if I should include the possible rule or not
 
@RedwolfPrograms you need to specify what the task is
you say what the input is but not what the output is
 
@RedwolfPrograms (200 - percentage)% × bytes as a scoring measure maybe?
 
I don't like multi-parameter scoring formulas
Too easy to game the actual point of the challenge
@Anush It's still a draft at the moment, mostly looking for feedback on the challenge itself
 
@RedwolfPrograms k
 
Oh no... I have my browser window snapped to the left half of my screen, so it's only half the width of the screen, and it only shows the first 4 characters of names in chat.
That's rather unfortunate for @Anush
 
2:35 PM
:)
any comments on codegolf.meta.stackexchange.com/a/24039/98590 ? I think it's ok now
 
@RedwolfPrograms ok, the 80 char limit sounds cool because it'll end up with a bunch of different compression schemes for different subsets of the chars
i say keep it
 
Which 14 chars are being excluded and why? Is it arbitrary?
 
Yes, you can choose
It's so that you could omit particularly tough characters to recognize, adding a bit of fun/strategy
It also maybe makes using a neural network a possibility, since one of those might not be able to get all 94 mistake-free
This is going to be the first part of a two part challenge, the second of which is much harder
 
2:57 PM
Ugh a user's posted like four answers to the same challenge and none of them work
 
@RedwolfPrograms who? And what challenge?
 
when your sandbox answer is upvoted this doesn't go to your rep it seems
and you don't get notified
 
It's on meta, so no rep
 
^ You don't get rep on meta, only on main
 
soon that will be banned for trademark reasons!
 
3:02 PM
doubt it
 
:)
 
We'll still be able to use "meta" for the same reasons we can still use "oracle". They're actual words, they have existing meaning outside of the name of a company, trademarks can't change that.
 
Mr McDonald can't set up a shop under his name
 
Unless Mr. McDonald sells hamburgers, under most countries' trademark laws I doubt he'd be prevented from using the name
> PHP
login system
OOP
yuck
 
@RedwolfPrograms heh I saw that CR post
imo rolling your own auth system in PHP for anything other than learning is a bad idea
 
3:08 PM
yeah you gotta make sure you don't use == wrong otherwise it won't compare hashes properly or something like that
 
I did it once, in 6th grade, and DoSed my own server the first time multiple people tried logging in at once lol
 
PHP Login and its variants exist for exactly this purpose.
 
@RedwolfPrograms I don't think you could have a department store under the name McDonald's
 
If you're using PHP in 2020 though, I'd question your sanity
2
@Anush Sure you could, from what I can tell.
It's not even a restaurant, so it's unlikely you could make a case Mr. McDonald is using McDonalds' name to gain business
 
@Anush I'm actually pretty sure there's a town/city somewhere in Europe where Mc.Donalds (or possibly some other fast food chain) can't open a store because there was already an existing shop there with the same name.
 
3:16 PM
@Mayube I hope so!
 
My google-fu and memory are both failing me, but I definitely remember hearing about it a while back
 
I think the key problem is "passing off" in law
it's hard to argue people wouldn't assume it was the food giant that owned anything called mcdonald's
oh look, mcdonald's now sells sofas
etc
 
Also local stores tend not to care about trademark and copyright laws
There was a local pizza place near where i used to live in england called "Costa Rica Pizza", but the word "Costa" was stylized in a certain way, and the word "Rica" was printed in very small font, blatantly intentionally misleading people into thinking that major coffee chain Costa had started selling pizza
I miss Costa :(
Timmies and Starbucks both suck in comparison
 
4:21 PM
I am thinking of posting my challenge... I hope people will forgive the brief time in the sandbox
 
0
Q: rank and unrank arrays of integers

AnushConsider all arrays of \$\ell\$ non-negative integers in the range \$0,\dots,m\$. Consider all such arrays whose sum is exactly \$s\$. We can list those in lexicographic order and assign an integer to each one which is simply its rank in the list. For example, take \$\ell=7, s=5, m=4\$, the l...

 
@Anush I don't understand
Can you explain me
 
>:| Instead of doing his job my English teacher's watching a "scariest powerpuff villains" compilation, and I know because his volume is all the way up
And yet I'm still waiting on a grade for an assignment we did a month ago
 
HIM is pretty terrifying
 
@Fmbalbuena what don't you understand?
I hate the silent downvotes!!
 
4:31 PM
 
back up to 0 :)
 
if i understand, upvote
 
@Fmbalbuena ask any question and I will try to answer
do you understand the first paragraph?
 
what does rank(x, y) mean?
 
let's start at the beginning
do you understand the first paragraph?
 
4:33 PM
no
 
ok so let's not jump ahead :)
do you understand the first sentence?
Consider all arrays of ℓ non-negative integers in the range 0,…,m.
that sentence
 
give me a example code of python (ungolfed)
 
you mean an example array?
 
yeah
 
if we set l = 3 and m = 3
 
4:34 PM
l = 3 and m = 3
 
we have (0,0,0) , (0,0,1), (0,0,2), (0,0,3), (0,1, 0), (0,1,1) etc
just going from the first sentence
is that clear?
 
almost
 
which part is not?
in python this is itertools.product(range(4), repeat = 3) I think
[*itertools.product(range(4), repeat = 3)] will let you see them
 
that's a python fail
 
right.. all clear now?
I mean for the first sentence
 
why is (0, 0, 0, 0, 0, 0, 5) not in the list
 
is range(l) or range(m)
 
oh wait you added a cap (M)
i see now
 
@Fmbalbuena l is the length of the array, s is the total sum of the array, and m is the max value of a single item in the array
so it's range(m)
 
4:38 PM
Oh i understand
thx
 
well actually it'd be range(m+1)
 
@Fmbalbuena ok.. now the second sentence
 
yeah
 
. Consider all such arrays whose sum is exactly s
so in fact we don't want all the arrays we just showed
let's set s = 3
for arr in itertools.product(range(4), repeat = 3):
    if sum(arr) == 3:
        print(arr)
take a look at the output
(0, 0, 3)
(0, 1, 2)
(0, 2, 1)
(0, 3, 0)
(1, 0, 2)
(1, 1, 1)
(1, 2, 0)
(2, 0, 1)
(2, 1, 0)
(3, 0, 0)
@hyper-neutrino cool
@Fmbalbuena any questions about this?
 
no i understand
 
4:41 PM
that's great
 
wait
what does unrank mean?
i need to rank or unrank?
@Anush
 
@Fmbalbuena so.. look at the output I just pasted. (0,0,3) is the first array in the list so gets rank 1
so the rank function should return 1 when it is given (0,0,3) as the input
 
@Anush I really need rank or unrank
 
@Fmbalbuena the task is to implement both
and then add up the total size of your code
 
both but separated?
Try it online! is rank?
 
4:44 PM
they are two different functions so yes
 
and how to do unrank?
 
@Fmbalbuena look at the examples in the question
 
rank takes a list and returns the rank of the list, unrank takes a rank and returns the list at that rank
 
bytes reduced Try it online!
 
@Fmbalbuena unrank takes an integer as an argument and returns the array with that rank
@Mayube thank you, yes
 
4:45 PM
show me example.
 
@Anush I assume both functions also have to take l, s, and m?
 
to understand
 
@Fmbalbuena look at the examples in the challenge
@Mayube yes. As in the examples in the challenge
 
wait
@Anush is 0 first or 1 first
 
@Fmbalbuena 1 as in the example in the challenge
(0, 0, 0, 0, 0, 1, 4)  rank 1
(0, 0, 0, 0, 0, 2, 3)  rank 2
(0, 0, 0, 0, 0, 3, 2)  rank 3
[...]
 
4:48 PM
@Anush what does the first array do (last question (?))
 
@Fmbalbuena please ask as many questions as you like!
but I don't understand that question, sorry
what do you mean?
 
what does the (7, 5, 4)
unrank((7, 5, 4), 9)
 
that's l, s, and m
 
thanks
 
:)
 
4:49 PM
notice ℓ=7,s=5,m=4 , in the challenge
I like the ℓ it gives me when I copy and paste! Is that unicode?
 
i understand
i'm making unrank
 
have you made rank?
 
that's not within the complexity restriction
 
@hyper-neutrino don't torture the poor person!
in principle this isn't a hard challenge but hopefully it's fun
 
4:52 PM
cartesian product of y options of size y (which, btw, is wrong, it should be M+1 options with size L) is y^y which is not polynomial
 
Yep! It's the cursive unicode `SCRIPT SMALL L` character, `U+2113`
Apparently in Japan that character is also used as the symbol for metric liters!
 
ok I am totally stuck on how to do this efficiently - it's obviously pretty easy just using product but the complexity restriction makes this a really interesting challenge
 
I like it! Thank you
@hyper-neutrino thanks!
 
@Anush what does unrank((7, 5, N), 9) the N
 
@Fmbalbuena typo?
 
4:53 PM
Agreed, it would be a much more boring challenge without the complexity restriction
 
The third element of array
 
yeah, cuz then golfing languages can all just do cartesian product → filter → index lmao
 
hooray! I have been hoping for years someone might say that :)
@Fmbalbuena can you see the three variables in the challenge?
 
although to be fair, once someone finds a method it's likely just going to be ported - still interesting though, and maybe I'll be proven wrong, maybe there are a lot of optimizations and approaches to be had (I haven't even found one, so I wouldn't know :P)
 
unrank((a, b, c), d)
 
4:54 PM
@hyper-neutrino Agreed, but depending on the method it may be non-trivial to port it to other languages
 
I know a, b, d does but not c
 
c is m, the maximum value of a single item in the arrays
 
my aim is to get more than one upvote!
actually there is an interesting side challenge.. given an array output the next one in lexicographic order
I might pose that later :)
 
@Anush would that not just be unrank((l,s,m),rank((l,s,m),N+1))?
 
@Anush what happened Try it online!
 
4:58 PM
@Mayube yes . If you already have rank and unrank that works. But there might be a more golfed way without using those at all
 
@Anush good point, that could make for an interesting challenge in itself
 
@Mayube I was hoping so
 
keeping the complexity restriction, I'd imagine. Otherwise you'd just have bruteforce[N+1]
 
I feel you should be able to do it in linear time
in fact I think you can do rank, unrank in linear time too
 

« first day (3940 days earlier)      last day (904 days later) »