« first day (3070 days earlier)      last day (1756 days later) » 

12:44 AM
@J.Sallé I once moved an entire linux distribution to /www/. Never give a client access to things they shouldn't touch, even if you trust them.
 
Anonymous
1:11 AM
Clients are much like children in that regard
 
Anonymous
Also the screaming, crying, and inability to comprehend simple concepts and follow simple directions
 
"a common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools"
7
 
 
7 hours later…
7:54 AM
@MilkyWay90 Also it's pronounced rep-rex, but means repr-ex. I don't like morpheme boundaries in the middle of my syllable boundaries.
 
8:39 AM
0
A: Sandbox for Proposed Challenges

LegenDUSTJust idea. Not sure what to do exactly. Evolutionary Golf code-golf answer-chaining restricted-code Make simple (not golfed at all at first) code for (some program) with language (something). Now, change a little bit (maximum 3 byte) of code to make it shorter. Altered code must work properl...

 
9:12 AM
@ATaco My next-door neighbour once managed to move an important directory, but as I recall this was Windows 9x so there wasn't much to prevent them.
 
 
7 hours later…
4:06 PM
hi all
 
in python, if I have bin edges and counts for each bin, is there a nice succinct way to sample from the probability density function this implies?
 
such PDF doesn't sound unique
 
@Anush What do you mean by bin-edges?
 
let me explain. Say bin_edges = [0,2.1,6.3,23.5]
and counts = [5,2,10]
the probability density function is a step function with steps at [0,2.1,6.3,23.5] and the probability of falling in the first step/bin is 5/(17* 2.1)
the prob of falling in the second bin/step is 2/(17*4.2)
and so on
does that make sense?
 
4:13 PM
Yes, that makes perfect sense.
 
if you fall in a bin/step the value you get is uniformly sampled from the x-values of the step. So if you fall in the first step it is uniform between 0 and 2.1
@DJMcMayhem cool! :)
 
Unfortunately, I don't know enough about how to calculate a pdf to help you
 
I feel there will be some numpy/scipy magic to just do it for me succinctly
but I don't know what it is
@DJMcMayhem no problem at all
@JohnDvorak ?
maybe it should be a ppcg challenge :)
 
5:09 PM
67 consecutive days I just need 33 more days for the Fanatic badge
 
I had over 1000 until I broke my streak recently.
 
It will be my first gold medal
@DJMcMayhem Woah!
I hope I go for a vacation after July 29th
It is my 2nd or 3rd time getting close to the Fanatic badge
But a vacation ruins it everytime
One day I got 97 consecutive days
 
Just leave your computer on with an F5 autoscript
ezpz
 
My computer gets shutdown
Which is also a detriment to my NationStates auto-telegramming program
Maybe I could do that, actually
hmm
@Veskah I could do an AutoHotKey script for Ctrl-R
But are bots allowed?
 
@DJMcMayhem I know of a user with almost 2000 consecutive days
 
5:17 PM
If it's a bot with golfed or obfuscated source code, then it's in the spirit of this site even if it's not allowed
 
@DJMcMayhem Woah
@ThePlasmaRailgun AutoHotKey can almost never be golfed
 
True
But if it's something else, it could probably be golfed
 
VIM commands to generate the AHK script
 
HAHA
I love vim, it's such a meme
 
22
Q: Multiply two numbers

dkudriavtsevInput: Two decimal integers. These can be given to the code in standard input, as arguments to the program or function, or as a list. Output: Their product, as a decimal integer. For example, the input 5 16 would lead to the output 80. Restrictions: No standard loopholes please. This is code-go...

I think I'm going to try this in Geometry Dash
 
5:25 PM
@ThePlasmaRailgun Ooh, that reminds me of a CMC: Implement the <C-a> (increment) command. Given a printable ASCII string s, and an integer n, essentially, put the cursor on column n, and increment the next integer found in the string.
Test cases (all 1-indexed):
 
s: "The number 6.", n: 1, output: "The number 7."
s: "The number 6.", n: 13, output: "The number 6."
s: "Test with negatives: -1", n: 1, output: "Test with negatives: 0"
s: "Test without negatives: - 1", n: 1, output: "Test without negatives: - 2"
s: "1 2 3 4", n: 1, output: "2 2 3 4"
s: "1 2 3 4", i: 2, output: "1 3 3 4"
 
That would be very interesting!
I saw a really cool thing someone made, it was a sed script calculator
 
@MilkyWay90 Also, you only need to Ctrl+R once a day (twice a day if you're worried about missing server rollover). Your bot would probably get lost in the noise
 
I'll give a cookie to the first person to answer with a text editor
 
5:26 PM
Haha
 
@Veskah Oh
 
I actually want to try that now...
 
@ThePlasmaRailgun Try what?
 
It should take 6 bytes in vim
 
The successor function in a text editor
 
5:27 PM
@DJMcMayhem vim, 1 byte:
 
int add(int x, int y) {
return !y ? x : add(x ^ y, (x & y) << 1);
}
That's a kind of formula you could try and follow
 
@EriktheOutgolfer How are you taking n as input?
 
Just adding and carrying
Ok, I think I have a simple idea for a two-regex process to increment a number
It doesn't handle negatives though
Anyways, what ends up happening is you need one substitution to make a lookup table appear at the end of the number
 
@DJMcMayhem Oh, forgot to mention: You don't have to implement any number format other than decimal
 
@DJMcMayhem I saw "implement <C-a>" and answered :D
 
5:39 PM
Does TIO do multiline sed commands?
 
Maybe it's finally time to get my Bubblegum compiler running ... nah. Not worth it.
 
5:54 PM
I here to kick ass and fire up my compiler
 
This is what I've got so far for multiplying two numbers
 
@DJMcMayhem um... how does one manage to read a number in less than 10 bytes
 
50% done with the nondestructive addition
 
@EriktheOutgolfer It's input to the buffer
 
but I don't think there's any way to handle a number other than <C-a> or <C-x>, right? and I don't think those two can really provide anything useful
 
6:05 PM
If you had a way to repeat them they would
 
you mean the operand?
 
Yeah
Wait, I forgot my own CMC, my advice is bad don't listen
You use the number to get to a specific column my bad
 
yeah, that's what I was going to ask next :D
like, is it possible to put a number in the buffer as an operand? (ah... if I used V life would be easier...)
 
Do you know how macros and registers work?
 
kinda just read about them :P
from what I read, eh... I did think of using a q...q or something, but can it really interpret the value in the register as a number?
 
6:10 PM
So qq...q puts ... into register "q. But that's not the only way to get something into a register
You can also use the various delete commands
 
tbf I do want to delete the input :P
oh, so I put the value in the register, append with a qA...q and run the macro?
that... seems kinda longish
 
Not quite
 
@DJMcMayhem I've got a series of 10 PCRE regexes that accomplish the incrementing of numbers!
 
@EriktheOutgolfer Do you want more concrete help, or just vague tips? lol
 
hm, dd""|<C-a> doesn't seem to work...
 
6:19 PM
What do you guys think of my regex?
 
@EriktheOutgolfer That's actually incredibly close
 
Actually, regexes, but you get the point
 
@DJMcMayhem oh whoops it looks like I'm catching a leading newline
 
And also "" isn't how you run register "
 
yeah I guess I should use @"
wait no that won't work
 
6:24 PM
Yes it will
 
Wait, are you guys trying to do it with vim?
 
and I'm not exactly known for my proficiency in that :D
 
Does vim support PCRE regexes?
 
6:24 PM
Yes (I think)
 
Then my program SHOULD work
 
@DJMcMayhem gvim outright made a warning sound with that though
 
What was your full keystroke sequence?
 
dd@" and then it got rejected
 
Ah, yes
 
6:25 PM
it was supposed to be dd@"|<C-a>
 
> oh whoops it looks like I'm catching a leading newline
 
oh so that's still an issue? and I thought @" was magic
 
It runs whatever is in " which includes the newline. So you get <n><cr>| and <n><cr> most likely tries to go out of bounds
 
so... how do I put the input in the register without the newline? because putting it on top instead of at the bottom doesn't help
 
dw, or de, or diw, or d$, or D or whatever
 
6:31 PM
0
Q: Is it all right to edit challenge to recognize the winner?

BarrankaI know that the best answer in a code golf challenge should be the accepted one. Is it a good idea to add a "final positions table" to the end of the post once a winner is found? Something like this: Congratulations! Final positions: 1. FooLang, 25 bytes, by JohnDoe 2. BarLang, 37 bytes...

 
@DJMcMayhem so that leaves a trailing newline... that's what I was afraid of with D
it's allowed, but it's ugly :(
 
@EriktheOutgolfer You want to know my favorite vim-trick?
DJ. For two different reasons :D
 
so I put the input above?
 
Yep
 
weird how it doesn't include a leading space
 
7:05 PM
0
Q: Rotate 2D string array 45 degrees

Ben MorrisonYour task is take an integer and generate a 2D Array from it and then rotate it 45 degrees. For example if you are given the integer 3 your 2D Array should look like this: a = [["0", "1", "2"], ["3", "4", "5"], ["6", "7", "8"]] and your rotated output would look like this: b = [[" "...

 
I'm almost positive that's a duplicate
2
 
7:18 PM
Didn't see which challenge dzaima linked but this is pretty close
 
@Veskah yep, that's what I linked, but the new challenge has a bit more attached. I'd still say it's a duplicate though
 
Hmm, if padding is required, the doubly-wide entries might make it novel enough to leave it open
 
7:55 PM
Server Error in '/' Application.
Runtime Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
 
pretty sure I've seen that one somewhere before...
 
Is SO dead?
 
8:22 PM
not for me
 
 
2 hours later…
9:58 PM
0
Q: Two palindromes are not enough

Robin RyderSome numbers, such as \$14241\$, are palindromes in base 10: if you write the digits in reverse order, you get the same number. Some numbers are the sum of 2 palindromes; for example, \$110=88+22\$, or \$2380=939+1441\$. For other numbers, 2 palindromes are not enough; for example, 21 cannot be...

 

« first day (3070 days earlier)      last day (1756 days later) »