« first day (1586 days earlier)      last day (3249 days later) » 
00:00 - 14:0014:00 - 00:00

12:03 AM
Q: Sorting a list in ascending order in c

user41319I wrote a program that accepts integers from a user and puts them in a list and then sorts the list in ascending order. When the user presses enter without entering a number the program should stop asking for numbers and sort the list. My program keeps asking for numbers in an infinite loop, what...

12:50 AM
What was this about?
@Calvin'sHobbies see the lower message with seven stars
Ahh ...
Just the usual Nineteenth Byte shenanigans.
@Calvin'sHobbies: It feels like it's been a while since you've posted a challenge. Is everything okay? :P
1:02 AM
@AlexA. It's the shock of you not being a goose anymore.
It was time.
Let me know if there's anything I can do to help you through this trying situation.
(Other than going back to being a goose)
@AlexA. Pick a word or topic and I'll try to make a challenge about it right now
I was away from my computer and missed a golden opportunity
1:11 AM
Oh, I thought that was Alex
That was BrainSteel.
Dr. Brian Steele, MD
Wha, no, I don't know what you're talking about... I'm a magpie... squawk
@AlexA. You give me a word too, and we'll see what happens
Parachute is a pretty good word though
I like the way it sounds.
Of course I am now drawing a blank on every word in the English language.
1:14 AM
Quite the conundrum.
Parachute is indeed a good word.
Why am I an MD, by the way?
Why not?
hi everyone
Hello, Thomas.
@Calvin'sHobbies I've got it: "steel." I figure that might make a nice combination with "parachute."
1:16 AM
a steel parachute
How many holes must one poke in a steel parachute to make it less embarrassing?
Inspired by Dr. Brian Steel, JD, Attourney at Law.
@BrainSteel how big are the holes
Twitch BRIAN?!
1:18 AM
Yeah, I called you Brian when I also implied that you had a medical doctorate.
It's your academic name, apparently.
Gah! My name isn't Brian! I don't even know anyone named Brian!
it's okay Brian, you don't need to be embarrassed by your name
It sounds more legit than Dr. Brain Steel.
I feel a new Jimmy in the making.
No! Don't star that! Why would you star that?!
1:20 AM
Stop! Before it's too late!
It was always too late...
Before what's too late, Dr. Brian?
My eyebrow is twitching.
I guess you wont be doing any surgeries today then, Dr. Brian.
1:22 AM
He's the attending physician! Who will revive him now?!
no one...
You've gone and done it now.
I'm passed out, just because you swapped letters.
1:23 AM
You didn't do anything -- It was always too late...
I have incurred the wrath of the nautilus.
RAWR! wiggles menacingly
I'm shaking in my feathers
I'm pretty sure you're more likely to try to eat me than I am to try to eat you...
How big are nautiluses?
1:25 AM
>However, most nautilus species never exceed 20 centimetres (7.9 in)
The nautilus (from the Latin form of the original Greek ναυτίλος, 'sailor') is a pelagic marine mollusc of the cephalopod family Nautilidae, the sole extant family of the superfamily Nautilaceae and of its smaller but near equal suborder, Nautilina. It comprises six living species in two genera, the type of which is the genus Nautilus. Though it more specifically refers to species Nautilus pompilius, the name chambered nautilus is also used for any species of the Nautilidae. Nautilidae, both extant and extinct, are characterized by involute or slightly evolute shells that are generally smooth,...
whats this 624 mean
I guess Eurasian magpies are 17-18in, 50% of which is tail.
I don't think nautili and magpies pose any appreciable threat to each other.
@ThomasRoss network-wide reputation
(took me a few seconds to find a 624 you were referring to)
@MartinBüttner What is network-wide reputation?
the sum of the reputation on all sites you have an account on
Oh, okay.
Got it. 8069
1:30 AM
Star his (removed)
You can't
oh you cant :(
Only if it's actual text:
now remove that
oh ok the stars go away
1:31 AM
You guys may have legitimately made me go crazy. I could have sworn I heard a doorbell.
Was it Door...knob?
There was no one there.
It's okay Brian, it's probably just your Brain
How about Dr. Steel?
1:32 AM
Dr. Steel is okay. I could get used to that.
Or, you know, John Steel, Master of Science.
That looks so strange
So does that string of o's. It's messing with my steel brain.
1:35 AM
My Brian isn't made of steel.
, Brian
By the way, John Steel is apparently pretty cool.
Oh wow, he's a badass!
30 years from now when I'm a mad scientist, I might cite this conversation as the moment I lost it.
Whatever you say, Dr. Steel
1:37 AM
I'll be long gone by then and will thus not feel guilty.
You'll be what, 55?
About that, yeah
I will have already perished in a tragic mathematics incident though.
You will rue the day you did this to me! Muahahaha!
I've had a couple of those.
You'll be too young to be a mad scientist in 30 years!
Mad scientists are old curmudgeons.
Give it at least 50 for you.
You underestimate my ability to go mad.
1:42 AM
You make the starboard a lot. Do you have the silver badge for it yet?
Also, at what point does referring to you by the wrong name go from playful banter to harassment to murder?
I've got the "Outspoken" badge, yes :D
That's part of the fun! I can't just tell you the answer!
Maybe thirty years, maybe never... Maybe as soon as I build a working death ray.
So... you want me to keep making you crazy by calling you the wrong name until it becomes harassment?
I don't know if I'm that into this joke.
Definitely never :P I don't get mad at, well, anything.
That could change....
Science changes a man.
1:47 AM
Of all the things that will one day make me go crazy, I doubt a couple of letters will contribute too much.
Are you sure, Brian?
Of course, a couple of letters repeated a hundred bajillion times might.
We now have 4 starred messages directly related to my inevitable crazytude, so who knows...
In other news, I haven't heard from @Calvin'sHobbies in a while. I wonder if he's off constructing a parachute challenge.
1:49 AM
A steel parachute challenge, even. Hopefully it's not a Brian steel parachute challenge...
Then I'd feel very obligated indeed to answer it.
I felt obligated to answer @Katya's goose challenge. But then I didn't answer it.
Getting there
I did too.
@Calvin'sHobbies Please no Brian.
1:52 AM
Sigh of relief
You don't know that's what the "No" meant
There will be no Briain
1:53 AM
Or any variant thereof
@Calvin'sHobbies That looks like you were trying to spell "Britain" but were bad at spelling.
I feel like the 't' is the easiest letter to remember, too.
New puzzle: How many questions, on average, does @Calvin'sHobbies make per week?
That's just querying data.SE and doing a quick calculation.
1:55 AM
Or dividing my question count by how many weeks I've been a member
That's the quick calculation I was talking about
What about "Write a program that predicts the date of Calvin's next challenge" :P
Haha that could be fun, but what would the scoring be?
Prediction methods can differ so code golf doesn't seem quite appropriate.
1:58 AM
I don't know. Wait for him to post 5 challenges, and sum the absolute errors of the programs.
After all, Calvin is (presumably) human, and we do like patterns... It might actually be interesting to see if it's predictable.
puu.sh/ianKx/284eeda6c2.png the pattern isn't very clear.
Not going far enough back!
Of course, we'd have to keep the challenge a secret from Calvin, which would be... Err... hard...
Especially since he's active in this chat
and it would be even harder if someone starred all of the messages
Like... what you're doing?
I mean, what?
2:04 AM
O_o I'm watching you.
I'm on data.SE developing a Calvin query. I feel a little creepy.
I might try to built a predictive model for a Calvin question score.
Hello @NinjaBearMonkey.
Nice work on your French JavaScript. I thought it was better than the other French JS.
2:16 AM
Thanks. Mine seemed a bit more elegant than chaining replaces.
2:40 AM
I want to find a non-English programming language and translate it to English.
Are there any non-English programming language other than the esolang in Korean?
Non-English-based programming languages are computer programming languages that, unlike better-known programming languages, do not use keywords taken from, or inspired by, the English vocabulary. == Prevalence of English-based programming languages == There has been an overwhelming trend in programming languages to use the English language to inspire the choice of keywords and code libraries. According to the HOPL online database of languages, out of the 8500+ programming languages recorded, roughly 2400 of them were developed in the United States, 600 in the United Kingdom, 160 in Canada, and...
Ah yeah, I was thinking Aheui.
I had no idea there were that many.
3:00 AM
Well, I've begun building a predictive model for Calvin challenge scores in R.
How is that going?
So far pretty good. I made individual indicator variables out of the tag list. Still working on the actual model building.
Haha, well keep us updated :D
There's a very significant correlation between question score and view count but that's certainly not specific to Calvin.
Nor is it particularly surprising.
3:07 AM
In other news, I came across what may be a promising golfing language: Mouse.
I have a golf question almost ready to post, but I feel like I should put some fairly lenient time limit on it. I'm not sure what would be a reasonable time to avoid excluding slower languages though
Depends on the task.
A: Sandbox for Proposed Challenges

trichoplaxWorst Case Manhattan Exclusion code-golf geometry grid packing Imagine a W by H grid of squares that wraps toroidally. Items are placed onto the grid as follows. The first item can be placed on any square, but subsequent items must not be within a Manhattan distance R of any previous item (als...

It's manipulating integers/arrays, depending on the language and approach, I suppose
I'd say on the order of minutes, not hours.
For the problem size in the example image?
3:11 AM
Idk. In general. I never want to wait an hour for non-production code to run.
I'd make a limit something short enough that if I went to make a cup of tea the code would have finished by the time I got back
I mean that large inputs will inevitably give large running times - I just want it to be a reasonable time for some defined input
@Katya Tea is the best
@trichoplax Do you have a reference implementation?
@Katya That sounds ideal, so I just need to decide what input size it would be reasonable to expect that kind of time for
I wonder, could you determine the answer to the example problem and create an image of that?
3:13 AM
@AlexA. I don't - I suppose I should, and that would give me an upper limit for the time
@PhiNotPi The least I can find by hand using the snippet is 6, but without a reference implementation I don't know if that's optimal
I also don't know if there's a better way than brute force
Can a reference implementation be posted as a self answer, or would that be deleted for not being golfed?
Just include the reference implementation at the bottom of the post if you want to include one
in a gist or pastebin or something
@Katya I like the idea of it not taking up space in the question, maybe I'll make it another snippet so it can be hidden
Or include the reference implementation as an answer.
3:21 AM
@AlexA. That was my original thought - I'd like to do that if it won't be deleted as not golfed
Make it a CW if you're worried about that
(not just for rep and HNQ - I'd like to keep the question and answer separated for clarity)
@AlexA. Ah that might be just what I need.
@Optimizer Are you and Mr. Llama related?
I am Mr. Llama
Puppet account?
3:33 AM
no, we are not related.
Are you secretly an alpaca?
Well its done, just not happy with making it code golf
Oh well
Then make it something else?
@BrainSteel It happened
3:46 AM
Challenge idea: given an image of a electrocardiogram and the scale, determine the patient's heart rate and if their heart beat is abnormal
It would probably be code-golf. Thoughts?
Heart beats and what constitutes normal aren't exactly the same between people.
(Obviously similar but there can be differences)
Yeah, I was thinking more along the lines of looking for specific phenomena
like RSR patterns, etc.
Q: Chute-A-Pearing

Calvin's HobbiesHere are 5 images of pears and a steel chute: A: B: C: D: E: These are only thumbnails, click them for full size! (I made these with Algodoo.) This class of images always has the following properties: They are always 400×400 pixels with a white background. (It may not be exactly whi...

@Katya Would they really be images or generated graphs?
Actual ones probably
Hmm... if I used actual ones it would only be heart rate
3:51 AM
Why so?
Ethical violation to post patient cardiograms on the internet
I can use my own though, which is what I was thinking for the challenge
Don't violate HIPAA for the sake of PPCG.
Do you work in medicine?
Is that like a radiologist?
I operate medical imaging technologies
like x-ray machines, mri, ct, etc.
3:54 AM
Okay yeah, I don't know where you are but that role is typically called radiology in the US.
That's why I hadn't heard radiographer.
But that's a complete aside.
Very cool! Do you enjoy it?
It's fun most of the time
Sometimes you get bad patients though which can be frustrating
Like ones that want to wiggle in an MRI?
Usually when they're in the MRI they'll stay still
it's more getting them onto the table in the first place
Mm yeah. Great that you can do it though, that's an important job.
(Radiography, that is, not getting people on the table)
Getting people on the table is half of the job lol
3:57 AM
Did it require a lot of schooling? I imagine it would require very rigorous training to operate those machines.
Three years
+1 year supervised year
Is programming a part of your work at all or is it more of a hobby?
no, it's a hobby
How did you get started with it?
codeacademy :/ just thought it would be an interesting thing to learn
4:02 AM
Why the :/ ? There's nothing wrong with Codecademy. I did the Python and JavaScript tracks there, it's a decent way to get exposed.
Is imaging what you want to do long-term or do you think you'd want to move toward a career in programming?
No, I like imaging
patient care and all that stuff
It's an admirable calling. :)
Thanks :D
Err, what happened?
Calvin posted the steel parachute challenge.
4:09 AM
I got liberal with "para"
I prefer the term "creative" :)
Ooooh, I like it! Dang, you're so good at this :D I think I'm going to have a go at this one.
I would but I don't know how to do image processing in any language. :/
hao duz i prosses ur imajs
Out of curiosity, has anyone done Voronoi game as a KotH? (Short version: Begin with a set of points S. Each player takes turns placing points, and at the end each player gets all points in S which are closer to them than the other player. Player with more points wins)
I'd code but I don't have the JS skills :/
@Sp3000 Sounds cool (but don't look at me...)
4:23 AM
(I was looking at you actually :D)
Well I've already got lots of ideas for JS koths that I'll never get around to
Ahaha okay then. Looking forward to them :)
No promises
This was probably already discussed yesterday, but are we basically going to stay in beta forever?
pretty much
10 questions a day is pretty unrealistic
unless you make a programming puzzle assembly line or something
(that was not a serious suggestion)
Even if we could get that many well received challenges a day, I'm not sure there would necessarily be more people doing them :/
4:31 AM
Yeah, the amount of people using the site would have to increase at least threefold...
Q: Regex golf best scores

Aequitashttp://regex.alf.nu/ So I've been playing this game which is regex golf, write a regex that matches the left column but not the right, and was wondering what the perfect solution is to each of them, highest points possible, as they don't seem to be listed anywhere. I see that it's a lot so I'm ...

4:59 AM
@Optimizer Going to CJam chuteapear? Worried Martin will outdo you with Mathematica?
office time.
5:17 AM
oh, its image input. Forget it anyways :P
Q: Write a program that prints "Hello World" to a terminal without using the standard "print" functions

moonman239Your task can be summed up in one line: You are to print the phrase "Hello World" without making use of whatever printing function is taught to beginners. You are also to refrain from using third party libraries that directly use the said functions. If you choose Java, for example, you are not ...

6:15 AM
A: Sandbox for Proposed Challenges

KatyaHeightmap of Boxes code-golf ascii-art Have a look at this ascii art diagram of various boxes: +--------------------------------------------------------------+ | | | +-------------------------------+ +-------+ | | ...

Q: What's the time?

WallyWestI like to save time quite literally, by wearing three watches on my wrist... Problem is they each give a different time. One watch is x minutes behind the actual time. One watch is x minutes ahead of the actual time. The last watch shows the actual time. Problem is, I can't tell which watch has ...

6:46 AM
For all those it may concern: The Pyth server has been updated. I haven't done it for a while due to reinstalling my operating system, but it is done now.
3 hours later…
10:11 AM
hey who knows C & Python?
i need help w/ something which shouldn't be overly difficult, but my C knowledge is essentially nonexistent
Have so knowledge in C (well, can do pretty much everything with it). Leave your problem here and I'll answer asap (gotta eat for now ^^')
ok so i'm trying to do this: stackoverflow.com/questions/16441903/…
the issue is that my "shift" is a global python object variable containing a Polynomial1D model (from astropy.readthedocs.org/en/latest/modeling ). i'm not sure how to alter the cython code to make use of this
11:06 AM
Looks like it's more about the python than the C, won't be able to help you here, never really used python&cython :/
1 hour later…
12:08 PM
@trichoplax I don't like that. If you don't want it to take up space in the question and don't want to link to it externally, put it in a collapsed stack snippet.
@MartinBüttner Thanks - I'll go with that (it came down to that or CW)
Hey, so I was thinking about the birthday problem
is there some term for the "reverse birthday problem"?
with unbirthdays?
where you have n people, and k birthdays
and you want to be 90% sure that all spots are filled
the Weak Pigeonhole Principle
12:57 PM
the DoveHole Principle ?
@MartinBüttner posting RAAoD #5 ?
hm maybe... I did improve the spec a bit last night, but I'm not sure about the time limit yet.
I think there shouldn't be one
without a time limit I'm afraid that answers won't even run to completion for N = 3
although I'm considering to allow efficient rejection-based algorithms with something like "Has to complete within 1 minute in 4 out of 5 cases".
oh, is the time limit only for n <= 3 ?
and I think printing a random tiling under 1 minute is fine.
and I think, if truly a random approach is chosen, printing any n tiling is plausible under 1 minute (not limit to IO)
and I think
1:12 PM
@Optimizer I might increase that to 4
Hello :)
@Optimizer changed it to "For N ≤ 4, your submission must produce a tiling within 1 minute in at least 4 out of 5 runs."
1 minute, 80% of the time ?
I meant, change it to that ?
1:16 PM
oh okay
Should it still include a specified minimum number of runs though? So you can't just run twice and call it 100%
@trichoplax I think 80% of the time implies "on average over many runs"
Oh fair enough
anyway, I'm not sure rejection-based algorithms are particularly golfy here
what is rejection based algo ?
1:18 PM
@Optimizer create a random string, check if it's a valid tiling
I don't see how you could verify that a tiling is valid in less code than building one
any other comments for diamond tilings?
I am trying out the logic.. let me see if I have any
I did a 2x1 tiling once by generating all possible grids of vertical/horizontal segments and checking if each one was a tiling
right, but for a hex grid the verification seems much harder than that
Sounds like a job for a 2d regex language
1:32 PM
Does it just take cycling through every 3x2 block of characters?
It looks like each can be judged correct independently
(In that an incorrectness would show up in at least one of them if present)
hm, not sure
I feel like you might overlook stuff like this:
00:00 - 14:0014:00 - 00:00

« first day (1586 days earlier)      last day (3249 days later) »