« first day (1719 days earlier)      last day (3117 days later) » 

3:03 PM
> ...an out-of-towner and a loyal lapdog team up to pass through a region of abnormally short residents on the advice of a magical entity and join a mission to solve a convoluted geopolitical struggle alongside an eclectic coterie of traveling companions — a stalwart guardian, an axe-toting hothead and an enigmatic denizen of the woods — in order to once again return to their bucolic existences.
^ The Wizard of Oz or The Lord of the Rings?
 
heh, nice :)
 
0
Q: Area of the triangle

André MutaAnother easy challenge for you. Your task Write a program that takes 3 pairs x and y coordinates as input and calculates tha area of the triangle formed inside them. For those who can't remember how to calculate it go you can find it here. Example: f([1,2],[4,2],[3,7]) # input 7.5 ...

 
3:23 PM
@MartinBüttner I think I got 3x3.
 
nice :)
 
I have a feeling the OP is about to DQ my answer :(
 
Nope
 
wrong name
@feersum hmmm, golfed Mathematica to 77 (still using gcd)
70
 
3:46 PM
Matrix determinant in APL: {∇{⍵+(¯1*+/∧\⍺)×⍵⍵[⎕io;⍺⍳0]×⍺⍺ ⍺/1 0↓⍵⍵}⍵/(↓≠/¨⍳⍴⍵),0 0≡⍴⍵} o.O
 
wat... how is there no built-in for that?
 
I wish I had an answer for that.
 
Most APL implementations define a built-in called det or something similar, but it's not standard.
 
I didn't know that. Does Dyalog do so?
It appears not
 
Probably yes, but not at tryapl.org
 
3:49 PM
I tried it in the desktop version of Dyalog 14.1.
 
Oh, maybe it's in some library then.
 
I have no idea how to import libraries in APL. I didn't even know you could.
 
I don't either, I just remember googling this exact thing a long time ago. :P
 
hm, I wonder what's the shortest way to compute a determinant in CJam
 
Would this make a good catalog challenge?
Shortest determinant per language?
 
3:53 PM
Any challenge becomes 14 times better if you add "catalog" to the name.
 
:P
 
@feersum For some weird reason, it actually seems to make a difference.
 
Yes. 14 != 1.
 
@feersum What evidence do you have to support this claim?
 
I think [king-of-the-hill] is a clear exception: Survival Game - Create Your Wolf Catalog
 
3:56 PM
Haha
 
@AlexA. Huh, apparently some APL variants give . a unary meaning as determinant: -.×A is determinant of A, +.×A is permanent.
 
I posted the same challenge with and without "catalog" in two alternate universes, and the catalog version got 14 times as many upvotes.
 
@MartinBüttner I don't think it's all that surprising. I think it's the difference between "this guy has no idea how to write a decent challenge" and "okay, this is neat, we're making a catalog for the betterment of humanity."
 
Stupid rep cap. I got triangles in 18 bytes... :(
 
Nooo
 
3:57 PM
@Dennis post it anyway?
 
^
 
More likely, it's "this challenge explicitly encourages weird languages, no matter how bad they actually golf."
People answer catalogs because they're simple challenges and they encourage weirdness.
 
@Geobits right, but ideally all challenges should be viewed like that (of course, most challenges are way too hard to be fun in weird languages)
 
Should be, sure. It's not explicitly stated, though.
 
@Zgarb Interesting. In Dyalog both give a syntax error though.
 
3:59 PM
Most people don't submit answers in several languages to the same challenge, either, where they do on catalogs.
 
Guess I'm not most people. :P
 
No, you're not. You're one person :P
 
I still haven't posted Hexagony on FizzBuzz
I have an ungolfed solution, but I'm not sufficiently happy with it to start golfing it :/
 
@Dennis I'm Dennis, you're Dennis, we're all Dennis.
 
@Dennis anyway... 3x3 integer matrix on the stack... replace it with its determinant... I've currently got 24 bytes and it feels horribly clunky
23
 
4:07 PM
Srsly tho, determinant challenge?
Nvm
5
Q: matrix determinant

olivecoderCalculate the determinant of a n x n matrix. Rules read matrix from standard input write to standard output do not use ready solutions from library or language input: columns separated by any space char input: lines separated by cr and/or lf Winner The shortest code :)

 
Yay, it's been done and I won't have to write a Java entry for a catalog post :)
Or something like that.
 
:P
 
I want to get that meta post up to organise the catalog challenges a bit better... some have now been done... some have been done in the past and could be edited into catalogs... some have been done so badly that they could use a reworked version to act as a dupe target... and some haven't been done at all.
 
Which have been done so badly that they could use a reworked version?
 
1
Q: Cat-like program in fewer than 100 bytes of code

KokizzuThe mission is to implement a cat-like program (copy all stdin to stdout) in less than 100 bytes of code. Rules: You may only use standard libraries Indentation must be either two spaces or a single tab (in languages which require indentation) Scripts must use shebangs The result of cat anyth...

Others, like Chris's Fibonacci challenge could easily be edited into a decent catalogue.
 
4:13 PM
+1 for unicorn waffles. — Martin Büttner ♦ Jun 15 '14 at 13:55
^ wtf?
 
Do you hate unicorn waffles or something?
 
Haha
@Geobits No meat should be pressed into waffle shape. Meat waffles sound terrifying.
 
I should answer "-1 for unicorn waffles" when people want an explanation for downvotes.
4
@AlexA. They're waffles for unicorns. Kinda like dog biscuits aren't made of dog.
 
4:15 PM
haha
Are you sure they aren't?
 
Not to mention baby powder.
 
I was about to make a joke but I realized that it's extremely inappropriate for chat.
 
Was it about powdered babies...?
 
No
Well, kind of
Actually yes
 
Are you sure you were about to make a joke? It doesn't sound like you even know what it's about.
I use a pretty standard definition of it as far as I know o.O
^ flagging :P
I suppose that actually does depend on the definition then.
 
4:21 PM
Haha told you.
Also, person with most implementation? What? — nyuszika7h Jun 15 '14 at 18:50
babby is person with least implementation
 
Not yet :
> EDIT: winning criteria, person with most implementation until end of June 2914
The revision history for that post is... interesting.
 
Wow, that's even after Rush travels to the future.
(2112)
 
Speaking of which, I think Marty's due in California in about a week.
 
Whose hoverboard is he going to steal though?
 
I assume he must have gone back again (not shown in movies) and screwed the timeline for us.
 
4:28 PM
He had a chat with Elon Musk and convinced him to manufacture hoverboards instead of electric cars.
 
But Musk quit when he couldn't get one to go over water?
 
@Dennis shortest determinant I found so far is 18: {3,.m<_:.*:+\}2*;-
 
@MartinBüttner can has explanatn pl0x
 
It's just a movie. In the real 2015, hoverboards are illegal
 
We always knew they would be in the UK. California is a different story ;)
 
4:32 PM
@AlexA. the idea is to shift the second row by one, the third row by two, such that the original (wrapping) diagonals become the columns. then multiply across the columns and sum them. the same is done again, which means that the columns are now the original anti-diagonals. at the we simply subtract the two results
 
@MartinBüttner Nice. Sarrus?
 
@MartinBüttner That's crazy clever. Nice work!
@Dennis Who or what is Sarrus?
 
@Dennis yes
@AlexA. I had to look that up too
it's the shortcut for 3x3 matrices to just add the diagonal products and subtract the anti-diagonal products
 
Sarrus' rule or Sarrus' scheme is a method and a memorization scheme to compute the determinant of a 3×3 matrix. It is named after the French mathematician Pierre Frédéric Sarrus. Consider a 3×3 matrix then its determinant can be computed by the following scheme: Write out the first 2 columns of the matrix to the right of the 3rd column, so that you have 5 columns in a row. Then add the products of the diagonals going from top to bottom (solid) and subtract the products of the diagonals going from bottom to top (dashed). This yields: A similar scheme based on diagonals works for 2x2 matrices...
 
4:34 PM
For interested parties ^
 
@MartinBüttner I just used this tag because I thought of some other challenges involving labyrinths, and I thought the distinction makes sense, as the construction is quite distinct, and 'sovling' is only really a problem in mazes. Would you prefer not having/deleting that tag? Or merging/expanding the maze tag?
(Sorry for the late answer, had no internet connection since yesterday evening.)
 
I'd use the maze tag on your challenge and add a short note to the tag wiki excerpt that the maze covers labyrinths as well
 
@MartinBüttner If this uses Sarrus' scheme, that's for 3x3 matrices. What about arbitrary size?
> internet connecti
Is that the plural of "connectus"?
 
@AlexA. I was specifically looking for 3x3 code (because I considered using it for the triangles, but it looks like Dennis already found a shorter solution in CJam)
 
I thought it was the first half of "internet connection lost"
 
4:37 PM
Haha
 
unfortunately, the arbitrary size solution won't be as short
(or elegant)
 
But you could do a recursion via laplace?
 
@AlexA. internet connecti => i(...)ti => Illuminati confirmed.
 
@flawr I don't know what exact solution "laplace" is referring to, but "recursion" sounds like the technique I'd implement. it would be way longer though
and I can't think of any neat shortcuts
 
4:39 PM
 
yeah, Laplace
 
 
4:42 PM
E?
 
 
Whaat
 
Wåt
 
Only mods can send empty chat messages...
 
4:42 PM
Watt
 
 
It's an important moderation tool
 
 
Thoes that mean I am mod now?
 
4:43 PM
@flawr Are you a secret mod??
 
 
@MartinBüttner For that particular determinant, you can simply subtract the first column from the others and use Laplace (which is precisely what my code code does).
 
But shhh!
 
@flawr HL3 confirmed
 
So now we've gone from off-topic to no topic. Interesting.
 
4:43 PM
@AlexA. Yaheee!
 
I got a stealth ping but no number in my avatar. Super stealth ping??
 
Extreme stealth
 
Extreme stealth looks more like this:
 
That one had a number
 
4:44 PM
I need to learn stealth pinging.
 
See, you can't even see the line it's on.
 
@Geobits I see what you didn't do there...
 
Looks like you already know it.
 
One of these days, I'm going to post a bug report about stealth pinging. :P
 
Please do.
 
4:45 PM
On that day I will weep.
 
@AlexA. No that was flawr...
 
@Dennis Rather, you should post a asking for the ability to stealth reply.
 
@trichoplax I know. You just got an extra special bonus in that message.
 
We need to update the wheel of blame
 
4:47 PM
I just copied your message=)
 
@Geobits
 
Wheel of blame?
 
@AlexA. You saying that doesn't make it true. Quite the opposite ;)
 
30
Q: The Many Memes of PPCG

DoorknobCatchphrases and concepts that spread from person to person are known as memes, which, courtesy the Internet, can now explode across the Earth like a highly contagious virus (hence "going viral"). As with their real-life counterparts, some infectious diseases are global (pandemic), while others a...

 
4:49 PM
@trichoplax The Official PPCG Wheel of Blame is not listed in that post
 
yet...
 
:O
 
LOL
68
Q: He who must not be named? (aka Anyone can ping everyone in chat)

FabbyFor some or other reason, typing @ᔕᖺᘎᕊ in a chat room pings everyone who's been in that chat room for the last 7 days... Seems to work in all chat rooms (I only tested 2 as I don't want to upset too many people...) How should we proceed?

 
I know it says status-completed and all, but.... @ᔕᖺᘎᕊ
 
@ᔕᖺᘎᕊ
D:
 
4:51 PM
@ᔕᖺᘎᕊ
 
Sadly, that does nothing.
 
My life is sadness
 
Nothing happens.
 
Haha, gotta love bugs.
 
I'm not really a fan of insects.
 
4:53 PM
But you love bugs?
 
I have a feeling we might have a visitor soon...
 
Ninja'd :D
 
Samurai'd
 
Shogun'd
 
4:55 PM
 
@Trasiva Offutt?
 
@Geobits I was there for TDY once upon a time.
 
Ah. Profile says Iowa, USAF avatar, was curious.
 
Why does my challenge have 19 upvotes already but still no answers?
19
Q: Home improvement for the Minotaur

flawrHome improvement for the Minotaur The cretan labyrinth is quite easy to draw. Just start with a symmetric shape (here in red). Let us call all the endpoints of those lines 'nodes'. Then you begin drawing the arches (black): The first one alway begins in the top middle node and connects to the n...

 
It's interesting, yet not easy? I dunno.
I can downvote it if that will make you feel better.
 
4:58 PM
Hrmpf. Second question I answered today after hitting the rep cap... :/
 
@Geobits I -was- in the AF until about four years ago. I got the 'We're force shaping, and you're a cripple, so even though you do great work, have a nice life!"
 
:(
 
I got out in '12. Saw a lot of people leave during 'force shaping'.
 
I'm not familiar with the term "force shaping."
 
2
Q: Print a Symbolic Negative of your Code

Luke(This is a variation on Print a Negative of your Code, which I enjoyed a lot! Thanks to Martin Büttner♦ - almost all of this text is his.) Let's consider the symbols to be the following printable ASCII characters (note that space is included): !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ And the alphanu...

 
5:00 PM
I believe the term 'permanent layoffs' is less jargony.
 
Pretty much @Geobits.
 
Basically, "we now have too many people, so get out".
 
:/
 
It's a means of them not having to give medical discharges for injuries gained while in service.
 
It seems to go in waves. They ramp up recruiting for a while, then cull the herd a couple years later. Rinse, repeat.
 
5:01 PM
As well as kicking out troublemakers who clearly aren't going to make it (Article 15s and whatnot).
 
@Trasiva That's the shittiest thing I've heard in a very long time.
 
@AlexA. Then don't read about the VA.
 
^
Unfortunately, the VA is great in some places and absolutely terrible in others.
 
I have mine in my phone as the Veteran's Assassin.
So...apparently SQL won't let you use CONVERT() inside of a function call. That's fun.
 
Which dialect? Can you use CAST instead?
 
5:05 PM
CAST failed too. It's SQL Server, so probably a Microsoft logic fail.
 
That's a user logic fail for using SQL Server ;)
 
I have no choice.
It's a manglement decision.
 
Normally is, but that isn't nearly as funny a response.
 
True
Sorry, I'm only on my third cup of coffee, the neurons aren't quite firing at maximum capacity yet.
 
Clearly you need to do this more efficiently.
 
5:10 PM
Sorry, exit door only. No entrance permitted.
 
While wiping off my keyboard, I inadvertently searched chat for "Z`"
 
That's uh...quite the character combination.
 
You should search for 'whiping' instead.
 
I should
I should also either add a p or remove an h.
 
I was being kind and ignoring that mistype, haha.
I'm not sure what you're into Alex, but more power to you.
 
5:13 PM
@AlexA. I need a demonstration of you whipping off your keyboard, please :P
 
@Trasiva I think you're the only one here who would ignore it rather than harass me. I appreciate it. :P
@Geobits So that's what you're into.
 
@AlexA. If that'd had been any easier, I'd have slipped a dollar in your G-string.
 
...I hope you mean the one on my guitar...
 
@AlexA. That would be entirely too vanilla.
 
@AlexA. Better than weird bird stuff.
 
5:17 PM
@Geobits Or whipping key boards.
Oh wait, damn, nevermind.
 
@Dennis Isn't one of the APL operators absolute value in its monadic form?
 
|?
 
Ah yes. Thanks
 
Is there a way to save my question to post later?
 
@AndréMuta You can post it to the sandbox
87
Q: Sandbox for Proposed Challenges

SandboxWhat is the Sandbox? This "Sandbox" is a place where Programming Puzzles & Code Golf (PPCG) users can get feedback on prospective challenges they wish to post to the main page. This is useful because writing a clear and fully specified challenge on the first try can be difficult. There is a much...

 
5:28 PM
Thanks, I will post it there.
 
Noooo, I got an unupvote. :(
Huh? Nvm.
 
-1
Q: Factorial function without loops and reassigments

renonszDefine C/C++ functions that implement factorial of a natural number Interface: int fact( int num ); Code must not contain imperative elements, like loops (for, while, goto etc.) and variables must not be assigned more than once. Solution with most votes after three weeks wins. Code size doe...

 
@Dennis Re-un-upvote?
 
No, but I got the rep back. I thought I wouldn't.
 
Hm
I didn't realize that could happen.
 
5:31 PM
Still, I wonder what triggered it. It's the "disputed" post.
 
Disputed post?
 
0
A: Averages of Angles

DennisCJam,  44  40 bytes Ie3_2*,f-:e-2{ea:~f{-P*180/mcmC2#}:+}$0= Try it online in the CJam interpreter. Test cases $ for i in 1\ 3 90\ -90 0\ -120\ 120 0\ 810 1\ 3\ 3 180\ 60\ -60 0\ 15\ 45\ 460 91\ -91 -89\ 89 > do cjam <(echo 'Ie3_2*,f-:e-2{ea:~f{-P*180/mcmC2#}:+}$0=') $i > echo > done 2.0 180...

It has a mysterious downvote.
+1/-1. Used to be +2/-1.
 
@AlexA. After a recalc by Community, the undone upvote from yesterday got canceled out by a posterior upvote. Now, the upvote from yesterday and the unupvote from today show no rep change.
 
That's... odd.
 
6:15 PM
@Sp3000 I have not. I continue to be put off PPCG in light of Pyth and CJAM. I might try to learn one of them eventually.
@AlexA. I did mean "golfing" as a verb in the way it's used on this site. Why would you assume I meant the sport?
 
0
A: Sandbox for Proposed Challenges

ZgarbImplement an API for probability distributions code-golf random Introduction In this challenge, your task is to implement a collection of simple functions that together form a usable mini-library for simple probability distributions. To accommodate some of the more esoteric languages people ...

 
So if @Optimizer is the llama keeper and @Doorknob was the monkey-handler, who was the meerkat expert?
 
@Sparr Then I'm entirely confused. You had a game on your calculator where you golf code?
@quartata Optimizer doesn't keep llamas, he is llama.
 
He could be a llama who keeps llamas. I don't know if the llama slave trade has been abolished.
 
@quartata If we're going by the number of times I was forced to watch Animals United, I am.
 
6:30 PM
@Geobits Llamas rose up and enslaved alpacas.
 
How do I write equations here?
 
@AlexA. And the birds watched, and did nothing.
@AndréMuta If you mean with something like MathJax, you don't. It's not enabled on the site.
 
@AndréMuta However you want, but the site and chat do not support LaTeX, if that's what you're wondering.
Samurai'd
 
Yeah it was that. Thanks Alex.
 
@Geobits Why would we? They're alpacas. :P
 
6:31 PM
> First they came for the alpacas...
 
Who are you quoting?
 
"First they came ..." is a famous statement and provocative poem written by Pastor Martin Niemöller (1892–1984) about the cowardice of German intellectuals following the Nazis' rise to power and the subsequent purging of their chosen targets, group after group. Many variations and adaptations in the spirit of the original have been published in the English language. It deals with themes of persecution, guilt and responsibility. == The textEdit == The best-known versions of the speech are the poems that began circulating by the 1950s. The United States Holocaust Memorial Museum quotes the following...
 
@AndréMuta If you want to use formulas formatted in LaTeX in a post, you can use an online service that renders LaTeX into an image that you can then embed in the post.
 
That's one verbose edit summary:
 
I'm making a new challenge, can you take a look and help Alex?
 
6:37 PM
Use !http://latex.codecogs.com/gif.latex?<yourlatexhere>
@AndréMuta
 
@minxomat You use ! to embed images in a post? I had no idea.
 
@AlexA. Err, no. In Chat.
 
Oh, thanks @minxomat
 
@AndréMuta Sure thing! Is it in the sandbox?
 
But the code applies to posts using the proper Markdown image tag.
 
6:38 PM
0
A: Sandbox for Proposed Challenges

André MutaTime Series Analysis The challenge Write a program or function that take a time series vector ts and output the sum of residuals of a simple linear model estimated by a ordinary least squares (OLS) model. ts is a vector of integers of length from 2 to 99. You can assume that the variable ts i...

Yep
 
@Dennis That never happened. >.> <.<
 
Edit summary longer than entire post? This should obviously award a badge.
 
In that case, I take it back. It totally happened and I definitely deserve a badge for it.
 
Sorry, but if anybody deserves a badge for edit reasons, it's random:
 
@AndréMuta Your challenge contains lots of jargon. I don't know what time series analysis is, and "the sum of residuals of a simple linear model estimated by a ordinary least squares (OLS) model" is even more obscure to me.
Oh, Geobits commented on that already.
 
6:43 PM
Good. If you aren't sure about it, I feel much better about not understanding :)
 
0
A: Sandbox for Proposed Challenges

André MutaTime Series Analysis The challenge Write a program or function that take a time series vector ts and output the sum of residuals of a simple linear model estimated by a ordinary least squares (OLS) model. ts is a vector of integers of length from 2 to 99. You can assume that the variable ts i...

 
@Zgarb If you have a set of points in two dimensions, you can fit an "ordinary least squares regression model" to the data by estimating the coefficients a and b for a line y = ax + b through the data points such that the sum of the squared distances from the points to the line is minimal.
 
I like how random's rep graph is almost linear.
 
So I assume the input is better described as points (or paired coordinates), not just a series of numbers?
 
Yeah. In this case since he said it's a time series, I think it's safe to assume that the points are pairs where the first element of the pair is the position in the series.
 
6:48 PM
Not really, you must assume the points are a a sequence.
 
@AlexA. Okay, that sounds familiar. It's been a while since I did any data analysis. :P
 
i am just omiting the time there.
 
@minxomat With (⌐■_■) random fluctuations?
 
sigh I think I need a picture :)
 
Hold on
 
6:49 PM
@AndréMuta Right. But if you're given [4, 2, 5, 7] then you'd fit a model with [(1,4), (2,2), (3,5), (4,7)], yeah?
 
Yeah, exacly
 
Wow. Minkolang answer to the area of triangle question is only 4 bytes longer than the Pyth answer!
...and 16 bytes longer than the CJam answer...
 
Concerning this comment, what is a complete program in JS, and for that matter what are the requirements for others? Can someone point me towards some knowledge?
 
The heights of the points are the given values of the series and the horizontal positions are the indices of the elements.
 
6:51 PM
Well, I meant a picture along with explanation, but let me take a guess here? The series given is plotted (evenly) along the x axis with the term along the y axis. Estimate the red line.
 
@AlexA. Since when is matlab supported for in the SE syntax highlighting?
 
Showing a picture with negative x values made me second-guess myself, I must admit.
 
I just realized that the sum of residuals will be always 0 for a OLS.
 
@SvenTheSurfer A full program is something that runs and produces output on its own. Your code will only print something inside a REPL environment (such as a browser's console). If you save it to a fie and run it though a JS interpreter, it will do nothing.
 
Lame on me.
 
6:53 PM
It happens. That's what the sandbox is for :)
 
@flawr Since always. The only thing that doesn't work is % comments.
(well, not always)
 
So I will ask to output a vector of the residuals
 
@Geobits Yes, and sorry about the negative x, this is just the first image I found.
 
It never worked when i tried it=/
 
0
Q: All Website redirect to ww9 (fake dns record)

user46195I have centos 6 and all account (user websites) redirect to ww9.domain.ext When I check the nslookup find some fake record : ww9.mydomain.net IN A 166.78.101.108 604800s (7.00:00:00) *. mydomain.net IN A 77.247.178.109 604800s (7.00:00:00) *.mydomain.net IN A 77.247.178.109 ser...

 
6:54 PM
@flawr <!-- language-all: lang-matlab --> ?
@AndréMuta Why that rather than the sum of the squared residuals?
 
@AlexA. <!-- language-all: lang-matlab --> !
 
@isaacg After your last answer , I finally figured out how you use .u. It never occurred to me that you could call reduce on an integer. That's one handy built-in!
 
^
 
Alex, the sum of the squared residuals will be always 0 on OLS
because that is the equation is estimated by minimizing the errors.
 

« first day (1719 days earlier)      last day (3117 days later) »