« first day (2208 days earlier)      last day (2618 days later) » 

wat
11:00 PM
I wanted to keep people from deleting all the items
 
Is there some context I'm missing?
 
Why is the auth token just stored in an input..?
 
wat
@Pavel There is an item list which has accessible delete buttons
@ATaco huh?
where"
 
 
wat
?
 
11:01 PM
Never trust a user, I unhid the input
 
wat
That's the hidden authenticity_token input
 
There's also a tick.
 
wat
It's there to verify that the user is not a bot. It changes with every request.
 
0
Q: Renaming CSV files being imported in Python

DashieI have a Python program which automatically goes to a specific website and downloads a CSV file automatically using a package called Selenium after it downloads the file it imports it into the program and outputs a graph. Problem: Everytime it downloads a file it is saved with a custom/unique n...

 
wat
The controller compares it with the internal value. If it's not there or has a different value, it raises an error.
@NewMainPosts No
Also, I will remove it in a few seconds by changing the input type to get.
 
11:05 PM
@LuisMendo Once you boil down the fluff, it's literally just asking for the minimum of a list, with the first number /=3 beforehand.
Lolwut, how did I get the Announcer badge?
 
wat
BTW @ATaco No more auth token field.
Also the form now uses the method "get"
 
Code like the world is actively trying to break everything you write.
 
wat
@AdmBorkBork What was your username before you changed it?
 
TimmyD
 
wat
@ATaco I usually do that. The field is just a verification feature anyway, it's there for security not as a session token or anything
@AdmBorkBork Thanks
 
11:14 PM
Congrats to @mbomb007 for being the second person to get the copy editor badge yesterday!
4
 
@Riker What is it? Can't reddit rn.
 
a guy promised to eat 1 habenero pepper per 100 upvotes
he's at 11.2k
rip
 
This happens all the time tho
 
first time it's hit this many upvotes tho
 
wat
11:24 PM
upvotes changed
they now do not filter them to around 5K max
they are now unrestricted
 
Anonymous
@LuisMendo After removing the fluff, the challenge is "given [a, b, c, d], output the minimum of [a/3, b, c, d]". That's not sufficiently different from the list statistics challenge (in which one of the subchallenges is to output the minimum of the input list).
 
Anonymous
1 message moved to Trash
 
That was probably for the best.
 
Anonymous
@ATaco This goes for you, too
 
@Mego They have a strong intersection, but each challenge has things the other doesn't, so maybe not dupe. Anyway, I agree it was not a very interesting challenge
 
Anonymous
11:30 PM
@LuisMendo There's also a meta discussion about splitting up the list statistics challenge into multiple challenges, in which case the minimum of a list challenge would be the dupe target.
 
Except for the "divide first by 3" :-) Not saying that's a very significant difference, but...
Anyway, I was just curious
 
It was easier for me to look at the other answers to understand what was going on than to read the actual spec
 
Divide the first element by three could triple the length of a Jelly solution.
 
@Pavel I'd be surprised if it was only tripled
 
Anonymous
@LuisMendo Exactly - it's a trivial modification for many of the answers, thus dupe
 
11:34 PM
@muddyfish Divide by 3 is two bytes, minimum is one byte, if I understood right.
Would it be correct to say that the worst-case complexity of Bogo Sort is infinity?
 
Anonymous
@Pavel But dividing by 3 would vectorize across the entire list, so you'd have to either head-divide-cons-min or input each argument individually, divide the first by 3, cons, then take the minimum
 
@Pavel Yes
 
pop 3 / push min
 
So... 4 bytes?
 
Not a very complicated action
 
11:37 PM
I want to calculate the average time complexity of Bogo Sort, but I'm not really sure where to start >_>
 
CMC: Return the minimum of a list where each item is divided by it's index in the list, one indexed
 
Anonymous
@DJMcMayhem That's not gonna work
 
Why not?
 
Anonymous
Divide by zero
 
1 indexed.
 
11:40 PM
a->a.map(i->i/a.indexOf(a)+1) Almost works, but with the number of holes in it it would be easier to write a more naive approach.
Actually, I'm not sure. It could work.
 
[1, 3, 5] --> 5, [2, 2, 2] --> 2
 
@DJMcMayhem Java, 35 bytes: a->a.map(i->i/a.indexOf(a)+1).min(). Untested, might not work.
 
Anonymous
Actually, 9 bytes for 1-indexing: ñ`iu@/`Mm
 
@Mego Explanation, please?
 
RProgN, 15 Bytes ~10={01+`0=0/}R
Do I get points for using 0 as an incrementor?
 
Anonymous
11:44 PM
@Pavel Enumerate, for each { flatten, increment index, swap, divide value by index }, take minimum
 
How do you set those bounds for the for-each in the program?
 
Anonymous
`stuff` pushes a function whose body is stuff
 
Anonymous
M maps a function over a list
 
Oic
I din't notice the second `
 
Anonymous
So `iu@/` pushes flatten, increment, swap, divide as a function, and M maps that over the result of ñ
 
11:46 PM
@ATaco Taking inspiration from Forte?
 
I did it first. ;-;
 
@ATaco Forte is from 2006
 
I did not do it first.
But I did it independently.
 
I think FORTRAN did it first.
 
The 0 as an incrementor is just the function 0, 0x0 still pushes the value 0
~]L1\▬/ 9 bytes should theoretically work, but doesn't.
 
11:49 PM
So, I just checked out your TIO link, it doesn't quite do what it's supposed to?
It returned a list.
 
~{01+`0=0/}R min should actually work
 
... Why, in a golfing language, is the builtin for minimum three bytes?
 
min was one of the functions I created first.
RProgN is not a golfing lang.
Actually, I think I have a one byte builtin.
 
Oh, I thought it was.
 
Nope, I don't
 
11:53 PM
So, it's very short, but nor a golfing lang. What you're telling me is that you made Perl?
 
It's a language I wrote that I stuck golf functionality to.
The ZSS functionality might as well be called the golf function.
 
MATL, 10 bytes: ttn:/tX>=)
 
My Java solution is only around three times longer than the golfing langs ^-^
 
`i 0 asoc function i 1 + `i asoc i / end replace min
That's the verbose equivalent.
Well, it should be, but for some reason it's erroring.
Googly Prettify makes this very pretty.
 
Woah, that's gorgeous
Too bad it probably wouldn't work on mobile
 
Anonymous
11:57 PM
That actually looks pretty terrible
 
Anonymous
But I'm colorblind so I might be missing something
 
Syntax Highlighting is its own beauty.
 

« first day (2208 days earlier)      last day (2618 days later) »