« first day (1864 days earlier)      last day (2980 days later) » 

Anonymous
9:00 PM
And Windows uses that format because DOS used that format
 
@Dennis That is an impressive solution
 
@Mego Apparently, thanks.
89
A: Difference between '\n' and '\r\n'

user1249Backward compatibility. Windows is backward compatible with MS-DOS (aggressively so, even) and MS-DOS used the CR-LF convention because MS-DOS was compatible with CP/M-80 (somewhat by accident) which used the CR-LF convention because that was how you drove a printer (because printers were origin...

 
Anonymous
Further reading:
 
Anonymous
In computing, a newline, also known as a line ending, end of line (EOL), or line break, is a special character or sequence of characters signifying the end of a line of text and the start of a new line. The actual codes representing a newline vary across operating systems, which can be a problem when exchanging text files between systems with different newline representations. The concepts of line feed (LF) and carriage return (CR) are closely associated, and can be either considered separately or lumped together. In the physical media of typewriters and printers, two axes of motion, "down" and...
 
9:03 PM
The fun thing is that in every mechanical typewriter that I've ever touched, the line feed and carriage return was combined.
 
Anonymous
Probably too young
 
The last one I used had a lever for line feed and carriage return was automatic in that pushing the lever would send the carriage back to the start, but you could hold it still and perform a lone line feed.
 
Anonymous
Granted I've never even touched a typewriter, so vOv
 
Switzerland in a nutshell. Everything way to crammed.
 
@flawr Move to the dwelling place of US-ASCII!
Specifically not the area of grunge music.
 
9:11 PM
@EasterlyIrk The vast spaces are really something I miss every since I've been there for the first time=)
 
rofl
You can live with me if my cat doesn't kill you.
 
PowerShell treats \r\n and \n the same when reading files. And you can use (and PowerShell will understand) just \n when writing out to files. Finally. Microsoft is slowly moving toward \n as the standard, but it takes a long while.
 
@EasterlyIrk Cool, I can try to bring some european mice for your cat to try=)
 
Technically `n since PowerShell has to be different, but whatever.
 
@EasterlyIrk What area do you live in?
 
Oh, yeah. Linefeeds everywhere.
You get a linefeed. And you get a linefeed. ...
 
O.o we are close to 2030 than to 2000. !!
 
we're also closer to 3030 than to 1000. crazy innit?
 
The thing is: I was alive in 2000 and will probably be alive in 2030.
Which is not true for the other two dates.
(Probably.)
 
okay okay, we're also closer to 2017 than to 2014.
 
9:17 PM
We're also closer to Wednesday than last Friday.
 
Crazy times.
It is not about plane crashes, but about what sometimes happens moments before:
 
@flawr We're also closer to 22:19 than @TimmyD.
 
That heavily depends on the metric.
Oh, you mean we are close to 22:19 than @TimmyD is.
 
I thought you were saying we are closer to 22:19 than we are to @TimmyD
 
9:20 PM
I doubt that.
 
I've never been compared to time before. I'm not sure how I feel about that.
 
Actually "we" is closer to "22:19" than "@TimmyD" in Levenshtein distance.
 
Zgarb wins.
 
\o/
 
@MartinBüttner Dang, that answer by beatcracker is pretty dang slick. I'm going to have to bookmark that for future use.
 
9:22 PM
@Zgarb As I said, it heavily depends on the metric=)
 
@TimmyD It's actually insane how much effort this problem took to solve though.
 
Well, if you stay within the PowerShell walled garden, everything is fine. ;-)
I mean, that's what you get for using Ruby. :p
 
@TimmyD that kinda defeats the purpose of a command-line...
@TimmyD you can't imagine how annoying this actually is when golfing with esolangs, where a trailing linefeed usually breaks your program
 
Yeah, I believe you. Since 99% of my answers here are solely PowerShell, and >99% of code I do for $DAY_JOB is solely PowerShell, I've not really run into it.
 
0
Q: Collatzanocci -- The collatz of fibonacci

NoOneIsHereThe Code Golf Collatzanocci In this challenge, you need to create the Collatzanocci sequence. The Collatzanocci sequence is the length of each fibonacci number. For example, you have 0, 0 for the first two because 1 and 1 both have Collatz length 0. Here is example code: def x(y): z = y ...

 
9:36 PM
@flawr That's pretty cool. On the other hand, I see now why using HTML tables for layout got such a bad rap.
 
Well the other thing is that it helps if you really use the correct html tags depending on the content. This makes it much easier for non graphical interpretation of the website
E.g. for crawlers or for blind people.
 
If you go to my website and look at the source, you'll see that I have alt-text for basically every single image. For that reason.
 
=)
upping my thumb
 
@El'endiaStarman Quick question: is there an easy way to map each member on the stack with a function in minkolang?
 
...in what language? Minkolang?
ah
 
9:44 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ In what language?
Oh nvm
 
@flawr Edit it a couple more times.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ flags as duplicate
 
57 mins ago, by flawr
user image
 
9:45 PM
Is there a difference between <_< and >_> except the chirality?
 
Chirality /kaɪˈrælɪtiː/ is a property of asymmetry important in several branches of science. The word chirality is derived from the Greek, χειρ (kheir), "hand", a familiar chiral object. An object or a system is chiral if it is distinguishable from its mirror image; that is, it cannot be superposed onto it. Conversely, a mirror image of an achiral object, such as a sphere, cannot be distinguished from the object. A chiral object and its mirror image are called enantiomorphs (Greek opposite forms) or, when referring to molecules, enantiomers. A non-chiral object is called achiral (sometimes also...
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Minkolang doesn't have a map, or a way to do functions other than using F f. So, loop through the stack and use xyF to jump to x,y in the codebox, and f to return.
There's a good chance you'd be better off just putting the "function" in the loop.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I do not really get that "smiley" anyway.
 
@El'endiaStarman Oh, okay. Different question: how do I detect of there are three consecutive 1s on the stack?
 
If there's any built-in for that, it'll be in "Grouped: Lists and Strings". I'm looking there now.
 
9:48 PM
@flawr They're both of suspicion.
 
>_> doesn't always mean suspicion for me.
Sometimes it can mean something like shame.
 
I've always used >_< for shame/wincing
 
I thought it expresses about something similar as facepalm.
 
>_> is annoyance to me
 
Yeah, something between annoyance and facepalm
 
9:51 PM
(-‸ლ)
Facepalm
 
That looks like some guy getting punched in the face.
 
It is important to remember to open your hand before facepalming
 
 
> 0$Z Count multi item; pops n, then pops the next n elements and pushes how many instances of that list are on the stack.
 
@TimmyD To me, that's a sleepy person rubbing their eye.
 
9:53 PM
AH! @CᴏɴᴏʀO'Bʀɪᴇɴ ^^
 
@El'endiaStarman Oh, I see.
 
0
Q: code printing garbage. What am i doing wrong?

conall doherty#include <stdio.h> #include <stdlib.h> typedef struct { char subject[20]; char level[2]; char grade[4]; } results; int result(); int main(void){ result() results r[8]; for(i=0;i<8;i++){ printf("%s: \n%s: \n%s: \n",r[i].subject, r[i].level, r[i].grade) } } int resu...

0
Q: Star Light, Star Bright, nth Star I Draw Tonight

MystagogueA pentagram is quite an interesting shape. Some people ascribe deep meaning to it, and yet it can be drawn in a single stroke! I've found myself wondering what other types of stars can be drawn so easily. So, I propose this challenge. We will define stars thusly: An n-star is a shape wi...

 
@NewMainPosts Fastest-Mathematica-in-the-West ... who's gonna get it.
 
Might be a bug. :/
 
9:58 PM
Oh well.
 
Hey, append a 0 to the stack and it'll work.
 
That is a bug I need to fix. Probably a one-off error.
Also, the loop can be a little smaller.
 
10:01 PM
oh?
 
You can use c to copy an element at a specific place.
 
Where is this mystical element copied to?
 
top of the stack
You can use negative indexing like Python.
 
oh
so 1~c would copy the second-to-top element of the stack to the top?
 
1~ for -1. And I think it would copy the top element.
yep
 
10:07 PM
oh, let me check then
:P
 
2~c is what you want.
 
Oh, cool! :D
 
@MartinBüttner - it's worse now. :P
 
This is why I don't golf. I'd hate to get stuck in an infinite loop
 
0
A: Yahtzee Small Straight Detection

Cᴏɴᴏʀ O'BʀɪᴇɴMinkolang, 24 bytes Try it here! Saved 3 bytes thanks to El'endia Starman! $ns4[2~c-1R]xs011130$ZN. $n C take all input C s C sort the stack C 4[ ] C repeat that 4x C 2~c C copy 2nd elem. C ...

@El'endiaStarman
 
10:13 PM
sweet
Say, what would happen if you dropped the x and the 0?
Is it possible there would be a false positive?
 
Hmm, it works for the tricky case, but ^, that's what I'm looking for now
I tested a couple of things, it seems to work fine
 
0
A: Sandbox for Proposed Challenges

Fricative MelonImplode the Box code-golf ASCII boxes look like this: ++ +---+ +------+ +---+ ++ | | | | | | | | | | | | +-+ | | | | | | +-+ | | | | | | +---+ | | | | +--+ | | | | | | ...

 
Hmm. The only way it could give a false positive would be to have 0 0 0 1 1 1 on the stack, right?
 
That's true...
 
Which would mean the input sorted would have to start with 1.
 
But to get 3 consecutive diffs of 0 would mean 1 1 1 1 2.
Wait, if the input is sorted, you don't need to sort the diffs.
 
The input isn't sorted.
 
And using 2~c apparently eliminated the need to pop off the top.
$ns yes it is
 
Oh wait, the bug makes it so the top of stack is not included in the search.
And the top of stack is indeed the smallest number in the input.
oh wait, you do need to sort the diffs to handle 1 2 3 3 4.
 
10:25 PM
Oh, darn.
 
And what I said earlier about taking out x and 0 doesn't work.
 
Oh, and an input of 1 2 3 4 5 gives 2, which very conveniently works because all that's needed is a truthy value. :P
 
@El'endiaStarman wtaf :D
 
10:29 PM
-2
Q: Programming using loops

Bob bobSo my professor had given me a bunch of challenge programs and told me to do them within a day or so but i can not get them done so i am asking if i can be helped on these quesitions multiples.py Ask the user to input a multiple of 7. If the number is a multiple of 7 it asks for another. This ...

 
pfff
that took a full five minutes
 
Oneboxes really should include [on hold] or [closed] as appropriate.
 
this took 24 seconds
2
 
10:31 PM
@MartinBüttner It was mod-hammered
I wonder what's the fastest time a question has been closed... anyone good at SEDE?
 
probably just three or four seconds or something
 
I'd like it if you would keep the byte count history like other users do. It shows the progression. — mbomb007 14 mins ago
3
^ yes yes yes yes yes
 
http://codegolf.stackexchange.com/q/37797/34718

Top golfers
User23013: 10^(5.2*10^152)
Martin Büttner: 2.8*10^14484
Dennis: 38

I had no idea @Dennis was so far behind @MartinBüttner :D
@TimmyD I thought it was a sleepy dude rubbing his eye.
 
@mbomb007 My exact thoughts.
 
10:55 PM
I saw this today:
> Alcohol has always endowed drinkers with special powers of
enunciation, perception, cogitation, and fine motor control
rarely appreciated by the alcohol impaired.
 
codegolf is fun
 
@mbomb007 If you divide reputation by time since being members they are almost equal, with Dennis a little ahead behind
>> 66775 / (2+2/12),   84022 / (2+8/12)
ans =
     3.081923076923077e+04
ans =
     3.150825000000000e+04
 
11:07 PM
0
Q: Solve a quadratic expression

AMACBThe Challenge Your task is to create a program that can solve a quadratic equation. Input Input will consist of a String. The string will be of the form: <A>x^2<B>x<C> , where <A>, <B>, and <C> are integers (no decimal points). <A> and <B> can also just be -. Output Output will be through...

 
^^ is dupe?
^^ hi
 
More or less
2
Q: Resolve quadratic equation

TotoChallenge: Write the smallest program (in characters) that resolves quadratic equations i.e. ax² + bx + c = 0 Rules: Given 3 numbers in R comma-delimited on STDIN: a,b,c (a != 0), print on STDOUT the 2 roots in C, one per line. R stands for real numbers, C for complex numbers. Examples: In...

 
I just finished the recording phase for episode 3 of my survival minecraft series
 
...except the input format
 
11:11 PM
LETS HEAR THE DUPEHAMMER
 
I accidentally voted to dupe-close and cannot re-dupe close
 
What's a very short bijective function between positive integers?
 
Between positive integers?
 
@feersum Does the identity function count?
 
The identity?
Ninjenga'd
 
11:22 PM
err I was not nearly specific enough
 
I thought so=)
 
I want the function to be its own inverse and to never give f(n) = n
 
So an involution?
 
Actually it doesn't need to be an involution
just easy to invert
 
Well you can always swap two numbers
(1,2,3,4,5,6....) -> (2,1,4,2,6,5,...)
 
11:24 PM
Something like 1<->2, 3<->4, etc.
But I'm hoping for something shorter
 
shorter in what way?
 
in Python ;)
 
What about n -> -n + 1?
 
That's not positive.
 
> positive integers
Another ninjenga
 
11:26 PM
ah, whoops
f(n) = n + 2*(n%2)-1 does the swapping thing.
 
(n-1)^1+1?
 
That is the identity?
 
Er... bad precedence there
 
n=>n%2==1?n+1:n-1 in javascript, quite short, I do not think it is much longer in python.
 
No, actually, he xor'd it.
 
11:28 PM
(n-1^1)+1 seems pretty good
 
^^that's what I meant :P
 
Right.
 
Might be doable with ~ too
 
^^ = doublexor?
 
@Sp3000 Good call.. I think ~(~n^1) does it
 
11:30 PM
@El'endiaStarman I hope you do not mind if I ask you to read a challenge of mine in a few days.
 
...that seems like an odd request. :P
 
Wait, no it doesn't
It puts 1->0.
 
Well I know you know some math.
That is why.
 
Some, yes.
The "in a few days" part is the weird part. :P
 
Oh, well the challenge is not finished yet.
 
11:32 PM
ah, okay
Well, no, I don't mind.
I'm not the only mathy person here though. :P
 
Great, thank you in advance=)
 
Hmm darn - 9 bytes not too bad anyway at least
 
@El'endiaStarman Well you can take a glance at the current state here, but some important parts are missing. I would be just nice to see if I did not do any major mistakes and if people can actually understand my english gibberish.
 
0
Q: Assembly language program (MIPS 32)

Praveen AyyagariDeclare an array of integers, something like: .data size: .word 8 array: .word 23, -12, 45, -32, 52, -72, 8, 13 Write a program that determines the minimum and the maximum element in the array. Assume that the array has at least one element (in which case, that element will be both the ...

 
11:39 PM
Bey
 
yeb
 
ybe
 
eby
 
eyb
yaaaaay
Is there a non trivial continuous function f on R such that f o f o f = id?
 
codegolf.stackexchange.com/a/75049/30688 if anyone was wondering what the bijetive function thingy was about.
 
11:50 PM
Graduation => more nonquestions
 
@flawr hmm
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Considering how graduation basically just meant removing the Beta label (thus far), you're probably falling victim to selection/confirmation bias.
 
@El'endiaStarman huhwat
 
I might be getting biases confused.
 
Can someone help me write a challenge?
It's a based on this game
 
11:57 PM
@lirtosiast ooooh
 
I want it to be the maximum worst-case number of moves for k colors on a grid of size n
but I don't know if it's in OEIS, and I don't know how to find out since the computation time is n^2 k^n^2
 
Whew, just barely made it with 25 moves! :D
 

« first day (1864 days earlier)      last day (2980 days later) »