« first day (2324 days earlier)      last day (2518 days later) » 

12:17 AM
0
Q: Find patterns in numbers based on the similarity of characters?

AlexanderRDTask The task is to write a script that accepts a number from 1 to 20 inclusive. It will then check if the number has a character that is found in every number that was entered before it. If the number has a character in common it will ask for another number. However if the number does not have ...

 
12:48 AM
0
Q: Lazy Click and Drag

fireflame241Your task is to write a program or function which, given two nonzero integers x and y, returns a truthy value if the image at coordinates x east and y north of xkcd's click and drag comic is mostly white and a falsey value otherwise. Specifications The image should be retrieved from imgs.xkcd....

 
1:36 AM
IDK about you guys but ^ does not look like 100% done to me.
 
@Phoenix I think it means your disc is 100% burnt, so you can buy a new one
 
People complain about loud fans but my DVD drive sounds like a bloody jet engine right about now.
It's clearly still doing something
Oh hey it's done
Fedora install DVD complete
Fedora 26 KDE Plasma spin
Prolly still gonna put gnome-terminal on it, Kommander is terrible.
 
What I said was not a terminal. I'm stupid
 
Konsole
Dammit
 
Oh I meant what I said
I said "I prefer LXDE" like a total idiot
 
1:47 AM
I saw
 
Oh I thought you thought I was talking about Kommander
Whatever. confusion
 
Kommander is ok, I forgot what everything was called.
 
If I'm completely honest, cmder is my favorite terminal
 
I like it on Windows
 
I used Bash for Windows (from Git) for about a year before I found out about cmder
 
1:54 AM
Same
Actually for me there was a WSL phase
 
I actually liked Cygwin when I was 13 >.<
 
Not having sudo is annoying tho
 
@Phoenix runas /user:Administrator is equivalent
 
That's like, 4 times longer
 
I don't mind not having sudo since I always use the Administrator account anyway
@Phoenix doskey sudo=runas /user:Administrator $*
 
1:57 AM
I suppose I didn't use the command line on Windows enough to bother.
 
I use it daily
 
I don't really see much of a reason to.
 
I've got a chromebook and a cloud computer for work, and a Windows PC for hobby programming
(hobby programming = writing languages and developing with the Win32 API)
 
@MDXF I have a Chromebook too (well, my wife does), but it runs Linux.
 
Why'd you get a Chromebook then?
 
user165474
1:58 AM
I have a Chromebook too but my school owns it technically (I have it for high school) so I can't put Linux on it :(
 
Don't they like, not have f-keys or something?
 
user165474
Yeah.
 
user165474
But you can still use Search+<Key> to simulate f-keys I think
 
@Phoenix Because they're insanely cheap compared with similar machines that come with Windows. Chrome OS -> no Windows tax
 
user165474
also they're fast
 
user165474
1:59 AM
(for web)
 
user165474
and have like 0 memory but ¯\_(ツ)_/¯
 
There are laptops that come with Linux.
 
Good ones at a good price? None that I know of.
 
user165474
Can someone help explain to a new user exactly why a submission needs to be written in a language that has an interpreter? The user is using a language that has an esolangs wiki page but no interpreter... and they seem to not understand exactly why I don't like that. context
 
I guess it makes sense. Not having f-keys feels so very, very wrong to me.
 
2:01 AM
And those that come close ususlly run Ubuntu. After installing openSUSE, it doesn't really matter which OS I wiped.
 
user165474
actually if I don't want it to be stolen I probably shouldn't post it
 
user165474
@Dennis can you nuke the history on that for me?
 
There is no history. You didn't edit the message.
 
Normal users can't access history on removed messages
 
user165474
Oh
 
user165474
2:05 AM
Only mods and me?
 
user165474
oh nvm then xD
 
Afaik most users won't be able to see the final revision though. ROs and above can.
 
user165474
Ah okay.
 
8 hours ago, by Arjun
CMC : Given n, output n "z"s followed by n dots and then followed by n-1 "z"s and n-1 dots and so on up to n-(n-1) "z"s and dots.
@Arjun Jelly, 10 bytes: r1x2µ⁾z.ṁx
 
user165474
CMC: Find the first CMC
 
2:11 AM
@HyperNeutrino the first usage of "CMC":
Jun 1 '16 at 23:43, by Leaky Nun
cmc: given non-negative integer n, find first digit of 2^n in base-10
 
Jun 1 '16 at 23:43, by Leaky Nun
cmc: given non-negative integer n, find first digit of 2^n in base-10
Ninja'd
 
but, the first usage of "mini challenge":
Jun 5 '15 at 19:50, by Calvin's Hobbies
Mini challenge: What's the shortest url you can make (via shortener or w/e) that redirects to http://codegolf.stackexchange.com
 
@LeakyNun n->Math.pow(2,n).toString().charAt(0)
 
@Phoenix java?
 
Yes
 
2:12 AM
n->(""+Math.pow(2,n)).charAt(0)
 
I always forget about addition with the empty string, even though I constantly complaint about the lack of the feature in Python and Ruby
lambda n:`2**n`[0]
 
user165474
Hm. Interesting. So the first CMC is not the first MC. :P
 
user165474
Is there any way in Python to zip an array and not have it become tuples?
 
user165474
Other than using the obvious map(list, zip(*array))
 
@HyperNeutrino just do map(list,zip(*a))
 
user165474
2:20 AM
oh
 
user165474
Also what exactly does the * do
 
user165474
wait why am I asking
 
user165474
I literally figured this out myself a few hours ago
 
user165474
xP
 
* is a splat operator in many languages
 
2:21 AM
@HyperNeutrino f(*a) is equivalent to f(a[0],a[1],a[2],...)
 
So it is a splat
 
user165474
Oh... Okay. So f needs to be defined def f(*args): <stuff> right?
 
@HyperNeutrino not necessarily
 
@HyperNeutrino What grade?
 
user165474
9
 
2:22 AM
if you're sure that a will only pass 2 arguments, then you can write def f(x,y):
 
user165474
(me)
 
user165474
@LeakyNun Oh interesting. Okay.
 
@HyperNeutrino Don't install Linux and use a Live USB
 
@HyperNeutrino Wow you're quite good at programming for a freshman (if that's what you're responding to)
 
user165474
So is def f(*args): <stuff> equivalent to <T,U> T f(U... args) {}? (If you know Java)
 
user165474
2:23 AM
@MDXF yey thanks :D and yes that's what I'm replying to.
 
user165474
@Phoenix Too bothersome. I never use my chromebook except for late-night programming. I usually use my own laptop which runs Linux.
 
@HyperNeutrino Basically, the generic for T seems kinda outside the point though.
 
I don't need to put Linux on my chromebook
I've got Cloud9
 
user165474
@Phoenix yeah it is. I guess I could just say type f(type... args) {}
 
user165474
@MDXF that looks cool
 
2:25 AM
@HyperNeutrino Yeah it's a free cloud computer
You get 2GB storage and 1GB RAM for each workspace
 
Yeah, ... is Java's splat operator in the same way * is python's
 
but you can have unlimited workspaces
 
user165474
Oh cool. Thanks!
 
user165474
(I just always used it because it worked when I put a star there :P) but now I understand it yay
 
user165474
 
user165474
Actually I just rewrote the whole program from scratch... not sure it that counts as a golf xD
 
^-^
Good for you
TBH I'm not really into the whoe "golfing" thing
I just want to solve the puzzle
 
@HyperNeutrino can you explain to me the significance of lambda: in p=lambda:[[' ']*l(s[0])for i in[0]*V]?
 
Maybe it varies each time its run?
 
user165474
Otherwise the top and bottom become the same reference and then... wait it's symmetrical... hmm... golfing opportunity...
 
user165474
2:29 AM
Because otherwise it does the same thing twice to the overflow
 
@Phoenix it is only run twice in the program
 
Would be shorter than copying the code.
 
user165474
 
user165474
I'm starting to get really into answering old questions that are challenging but not like GoL-Tetris level insanity. Problem is, it takes a LOT of time, time which I don't exactly have to spare :P
 
@HyperNeutrino `input()` is shorter than raw_input() and I think achieves the same thing
Besides, you can just have input() and require that input be quoted
 
user165474
2:33 AM
@Phoenix Oh wait I was using the user-friendly code
 
user165474
I'll just require input be a list of lists of chars, like this:
 
user165474
[['+', '-', '-', '-', '-', '-', '+'], ['|', ' ', ' ', ' ', ' ', ' ', '|'], ['|', ' ', ' ', ' ', ' ', ' ', '|'], ['|', ' ', ' ', ' ', ' ', ' ', '|'], ['+', '-', '-', '-', '-', '-', '+']]
 
@HyperNeutrino Don't strings and char arrays behave the same way in Python?
 
@Phoenix not really.
 
user165474
Strings don't support element assignment.
 
2:37 AM
Ah
 
@HyperNeutrino I'll also include a program in the submission to convert from the user-friendly format to the you-friendly format
 
user165474
Also thanks to -60 bytes :D
 
user165474
@LeakyNun "me friendly" +1, and okay thanks!
 
@HyperNeutrino did you see a trick in the program
 
I'm not sure if a char array in that format is valid input when reading from stdin
 
user165474
2:38 AM
open('.input.tio')?
 
@HyperNeutrino yes
@Phoenix why not?
 
user165474
Yes. I never knew you could do that. :D +1 again
 
user165474
Well we can't really ask OP about that so if you have a conflict with that you can ask on meta. OP has been inactive for a year.
 
I wish #include .input.tio was a thing I could do in languages that supported multiline strings.
 
user165474
Anyway be right back in 15 minutes I gotta go finish something o/
 
2:39 AM
\o
 
C people, why does this not work? putchar(*a>*b?*a++:*b++)
Error is lvalue required as increment operand
I'm completely stumped
 
@MDXF you can't increment an array
 
@LeakyNun What?
 
It's just a pointer to a character
 
23
A: lvalue required as increment operand

naivnomorex++ is the short form of x = x + 1. However, x here is an array and you cannot modify the address of an array. So is the case with your variable y too. What you can do is defined two pointers pointing to the two arrays and increment those pointers or do the following. char x[10]; char y[] = "H...

@HyperNeutrino so you aren't going to include my program?
Also, you don't have an input for your linked program
 
2:58 AM
@LeakyNun edited Oct 29 '16 at 2:22 - MD XF ¯\_(ツ)_/¯
 
@MDXF nice
 
@Phoenix In which language?
 
@Dennis Python and Ruby
 

« first day (2324 days earlier)      last day (2518 days later) »