« first day (1881 days earlier)      last day (2964 days later) » 

8:00 PM
Why should it. It's PHP
 
Anonymous
I'm trying to make sure empty values aren't being passed in through a POST request
 
Does anyone have a TI-30X IIS calculator?
 
Anonymous
So I have something like if(empty($_POST['val1']) || empty($_POST['val2']) || empty($_POST['val3'])) { do_stuff(); }
 
Use isset() and/or empty().
Super-Ninja.
 
8:03 PM
is there a shorter equivalent for i/3*3 in Python 2?
 
Anonymous
The values are the values of radio buttons from a page with a form, and thus would only be empty if either I messed up in writing the form (survey says no), or if one of the sets of radio buttons wasn't selected
 
you mean i/(9)?
@quintopia You just want i floored?
try i//1
 
Anonymous
@EasterlyIrk Nope, order of operations. (i/3)*3
 
@Mego So i floored.
 
8:04 PM
round i to the nearest multiple of 3
 
oh okay
 
erm
floor it to
rather
 
Anonymous
i-i%3 is the same length
 
Well, since it's Python 2, does // even work?
 
I don't think so.
@El'endiaStarman yes actually.
 
8:05 PM
after 2.7 maybe
 
Does python have imaginary numbers? o-O
 
Yes.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Yes, complex number support is built-in.
 
hi all
 
ohai
 
8:05 PM
@Mego Actually you have to use both functions I mentioned. Since the parameter could be a) not there or b) set to nothing.
 
Anonymous
@El'endiaStarman Yep, // is always int division in 2.7
 
@El'endiaStarman Python 3?
 
@EasterlyIrk Not anymore! :P
 
Anonymous
@mınxomaτ empty returns true if isset returns true
 
there is a distinction being made by PPCG people between the time complexity of an algorithm and the time complexity of an implementation of an algorithm
I am not familiar with this distinction and have never seen it before
 
8:06 PM
@El'endiaStarman :/
 
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 3i
  File "<stdin>", line 1
    3i
     ^
SyntaxError: invalid syntax
>>> 3+i
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'i' is not defined
>>>
 
is this something common?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Use j.
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ j, not i
 
@Mego Maybe abuse array-key-exists?
 
Anonymous
8:06 PM
ninio'd
 
@CᴏɴᴏʀO'Bʀɪᴇɴ use j
ninja'ed
 
@Lembik the time complexity of an algorithm is sometimes given relative to the complexity of a subroutine, particularly a library subroutine
 
>>> 123j
123j
 
The Python devs came from more of an engineering background than a math background, hence j instead of i.
 
But 3+j errors. ಠ_ಠ
 
8:07 PM
@Lembik that seems like a complicated enough question to ask on meta
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Only multiplication.
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ 3+1j
 
(also idk how common it is, sorry)
 
Try 3+1j.
ninja'ed
 
@quintopia right but people are giving O(n^2) implementations and are claiming they are O(n log n ) algorithms
 
8:07 PM
I'm planning on making 1i the imaginary unit in Pytek, and maybe 1j too.
 
which I just find odd
 
@El'endiaStarman both pls
 
@Lembik show me
 
I know that works, I just don't understand why 2+j doesn't. :P
 
@CᴏɴᴏʀO'Bʀɪᴇɴ j could be a variable that way.
 
@El'endiaStarman Why not just have j be the imaginary unit though?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ j as the suffix to a digit is the specifier of imaginary. j by itself is assumed a variable
it works like the same as e and L
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ......because j is a really common counting variable.
 
@quintopia I guess that makes sense.
 
Anonymous
8:08 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Because j is different than 1j. The second uses j as a suffix, like L in C. The first is referring to the variable j (vars()['j'])
 
OMIGERD
STOP WITH THE GD PINGS
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ...sorry? :P
 
Anonymous
Stop asking questions in a busy chatroom where the only reasonable way to respond is with the reply button if you're annoyed by pings
 
^ there are two conversations going on at the moment.
 
Anonymous
@mınxomaτ I'm not sure that would solve anything
 
8:09 PM
Well, actually, the bigger problem is that there are three or four people in here who are trying to answer @CᴏɴᴏʀO'Bʀɪᴇɴ's Python questions before someone else does. :P
 
@Lembik @Lembik the merge sort one I think is saying that it runs in O(n log n) pop operations?
 
@El'endiaStarman 1i, 1j, 1k. Quaternions FTW.
 
@quintopia right.. but that's no good
 
@AlexA. That is a possibility. That would clash with using 1j as an imaginary unit though.
 
@Mego I asked one question, to one person.
 
Anonymous
8:11 PM
6 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
Does python have imaginary numbers? o-O
 
Anonymous
You didn't address a single person
 
@Lembik nonetheless, it is common in CS to assume certain operations are "units".
 
@El'endiaStarman Well, you wouldn't be able to intermix them in a single expression, but you still have i^2 = j^2 = k^2 = -1.
So it would effectively work the same
 
@Mego Then El'endia responded, and I found someone to answer my question:
6 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
@El'endiaStarman Python 3?
 
Anonymous
@mınxomaτ If you'd like to see the problem in action, the site is live at ppcg-election-mego.c9users.io
 
8:12 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Aside from Mego's point, it's common for people to answer questions addressed to another person.
 
But you also have the benefit of being able to work in quaternions should you need to do so
 
@El'endiaStarman mehh
 
Anonymous
You're literally being annoyed because people are being helpful
 
@El'endiaStarman And it is very much in the spirit of this site for many people to answer a single question
 
Anonymous
Your message is loud and clear; we won't help you next time :)
 
8:13 PM
@Mego Is that your problem?
@Mego <3 you too m8
 
@quintopia right no one assumes things that run in linear time as units
 
@AlexA. .....ooooh, yes. That makes it easy, actually. I can treat all complex numbers as quaternions! :D
(With caveats, of course, but still.)
 
This is amazing: apollo17.org
 
@Lembik But it's not uncommon for pop to be implemented in constant time, it just happens to not be implemented that way in those particular cases. If one did not know the underlying python implementation details, it would be easy for someone to confuse the two.
 
@El'endiaStarman :D That'd be awesome! Just make sure you have your multiplication table set up, so you have identities like 1i * 1j = 1k
 
8:15 PM
@flawr woooaaahhh...
@AlexA. Of course.
 
Anonymous
Oh god I'm an idiot
 
Anonymous
Wrong indices >_<
 
@quintopia true..but they do know!
 
@Lembik I'm not saying that they were following instructions or doing the right thing. I'm saying that someone with a computer science background could easily be unsure of what they were allowed to assume here.
 
@quintopia true
 
Anonymous
8:17 PM
Best PPCG election survey is now up! ppcg-election-mego.c9users.io
 
Anonymous
It's exactly like SE elections, except that you must use all 3 votes
 
@Mego It asks me to sign into c9.
 
Anonymous
@zyabin101 That's... not right
 
Anonymous
Huh that doesn't work either
 
Anonymous
8:19 PM
That's silly
 
Anonymous
Oh well, there went 3 hours of my life I'll never get back, working on PHP
 
Wow, the language-specific meta is contentious
+4/-3 for "Yes, disallow them" versus +3/-2 for "No, they're allowed"
 
Not as contentious as the state of chat
 
@Mego Even when signed in it says "Not authorized"
 
@AlexA. ???
 
8:27 PM
@TimmyD This
 
@Mego try adding us as owners.
 
Anonymous
Try now
 
Anonymous
I clicked the wrong setting when I made it
 
Did you see Martin's name?????
> Martin Büttner
 
Anonymous
8:35 PM
It shows up correctly for me
 
Anonymous
Make sure your browser is using UTF-8
 
And you have a SQL error.
 
Anonymous
What error?
 
> Failed to insert row (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Brien', 'CoolestVeto', 'El'endia Starman')' at line 1
 
@EasterlyIrk Martin Bãttner * ¼? Seems cool.
 
8:36 PM
^
 
Anonymous
Ahh, I failed to escape stuff
 
yep
@MartinBüttner according to my browser's unicode rendering, you are now @MartinBüttner.
 
tac
Feb 15 at 18:02, by mbomb007
user image
 
Anonymous
Try now
 
tac
new logo!!
 
Anonymous
8:37 PM
@EasterlyIrk That would be Latin-1
 
tac
i'm so entertained by this picture.
 
@EasterlyIrk "Martin Büttner? Sounds cool."---Martin Buttner "ninja'd"---zyabin101
 
@Mego works.
@zyabin101 what?
Can I get more votes for this:
7
Q: Should language-specific code golf challenges be explicitly disallowed?

Alex A.In light of a recent code golf challenge in which the specification restricts participation to JavaScript, I think it's time we revisited making a hard rule about language-specific golfs. We may discourage such challenges, but ultimately they aren't off topic. Consider Sklivvz's comment: Eith...

 
Anonymous
Huh... The IP fields are weird
 
Anonymous
They're all 10.240.0.*
 
Anonymous
8:39 PM
Which is... not correct
 
Martin Bгjttner? Sounds cool.
 
Anonymous
And will certainly cause issues
 
@AlexA. Huh. Dennis' answer seems to be the runaway favorite, though. +25/-3
 
The jagged rendering of the name Martin Büttner got me Гj instead of ü in the name.
 
Link to a conversation made entirely from animated gifs?
 
Anonymous
8:43 PM
There, I killed the current DB and did better IP detection
 
Anonymous
So re-cast your votes: ppcg-election-mego.c9users.io
 
Give a better dupe vote message pls.
 
Anonymous
Nah
 
"Failed to insert row (1062): Duplicate entry '172.249.47.98' for key 'PRIMARY'" is a bad one.
 
Anonymous
Too lazy
 
8:44 PM
@Mego Maybe "no moar moderation avocad for you"?
 
Anonymous
No that's stupid
 
Yeah.
This is quite disturbing:
 
@Mego Maybe "You have already cast your vote, didn't you?"
 
..
 
9:08 PM
> Martin Büttner
You and your encoding junk
Are you encoding in ISO 8859-1 or something
ROFL you're using CP-1252
why
 
9:22 PM
@flawr That's a "Labor of Love" website if I ever saw one.
 
@Mego what's dat?
 
testing a chatbot that I wrote this time (last time was not my work), it will copy you
ill take it off i just need someone to say literally anything
 
Literally anything
 
Literally anything
Wut!
 
Literally anything
 
9:26 PM
anything
 
anything
 
Literally!
 
(You guys aren't listening.)
 
something
 
something
 
9:26 PM
somewhere
over the rainbow
 
over the rainbow
 
@El'endiaStarman The first blog post from 2012, released just in december!
 
@El'endiaStarman The first blog post from 2012, released just in december!
 
We have a dedicated room for bot testing btw.
 
it lags 6 seconds
 
9:26 PM
@AlexA.
 
down now.
 
@Mego Btw, when can we see the results?
 
@Mego Btw, when can we see the results?
 
Not that down.
 
@epicTCK You sure? :P
 
9:27 PM
@epicTCK You better turn off the bot asap...
 
Ok its down... I think
 
@epicTCK wtf?
 
yup
 
I think we have other rooms for testing bots, don't we?
 
The content to message ratio is at the monthly low point I see.
4
 
9:27 PM

  Beep Boop Bingus Bin

VITRIFICATION ORDER (1947) CONDEMNED DO NOT ENTER
 
@flawr testing a chatbot its gone now
 
@mınxomaτ Still got nothing on carrot chains though.
 
> chotbot
 
@Dennis Beep Bog Maggot was epmty at the time i was testing, the bot is gone now.
 
Wouldn't it be easier to just ask us to join BBM?
 
9:30 PM
Big, Burly Men?
 
<s>Big Black Man</s>
how does one scratch out?
 
like this
 
threedashes
 
@HelkaHomba new MC skin?
test
wow this is a great feautre
 
> feautre
 
9:32 PM
@phase No, Belgian flag
 
ಠ_ಠ
3
 
@HelkaHomba don't go anywhere beceause I want to talk to you but lunch is calling so brbrbr
 
39
Q: Humans can now run 40 mph. How do I keep the stupid people alive?

TrEs-2bLet's assume that humans can now run 40 mph and the human body can handle it. I know and understand that this is not feasible, but let's just play pretend. Naturally people would have all kinds of fun, but as we all know most people are idiots. I imagine that there would be millions of people who...

 
You don't. Darwin will have his way. — user16295 2 days ago
 
bwahahahaha
 
9:40 PM
^
 
@HelkaHomba Can you link me to the thing you used to create a side view of the MC world?
 
@Dennis I read this already. :D
 
@CoolestVeto BTW did you see that @CᴏɴᴏʀO'Bʀɪᴇɴ moved into your/mine/our minecraft house also?
and ^^
 
in PPCG Minecraft Server, Mar 1 at 18:37, by zyabin101
http://wrim.pl/mcmap/
 
9:42 PM
oooooh coool
 
@EasterlyIrk :D No, but cool!
Feel free to offer that to anyone, btw.
 
okai
 
@Dennis yeah probobly
 
He sorta lives in my roomy thingy
@CoolestVeto to mc chat pls
 
@EasterlyIrk could you help me test my chatbot? in bbm
 
9:43 PM
@HelkaHomba How do I compile programs in this language?
(I don't do... C?)
 
^
euegegh windows .exe
well i just installed win7, so....
 
Use Wine or Mono.
 
will do.
 
Which makes more sense? [1, 2, 3, 4, 5] { print } each or { print } [1, 2, 3, 4, 5] each
(to print 1, 2, 3, 4, 5)
 
@Cyoce Whichever is more consistent with the rest of the syntax.
 
9:47 PM
@Zgarb the rest of the syntax I have so far is not relevant to this one :(. They all deal with having a number of blocks, whereas this one has a block and an iterable.
 
Ah okay, so the syntax is stack-based and the { print } is a block.
 
anyone wanna test my chatbot in bbm
 
Right now all I have in terms of blocks is { body } { condition } while
@Zgarb yes
 
@EasterlyIrk Why wouldn't an exe run on win7?
 
@Cyoce With that, I think it would make more sense to have { print } [1, 2, 3, 4, 5] each
 
9:50 PM
@flawr stahp trolling
 
@HelkaHomba I use os x normally.
I just installing win7 on a vm today.
 
The { print } is the "body", and [1, 2, 3, 4, 5] is the "thing that controls how the body is executed".
Aka the "condition".
 
makes sense (ish)
And what's a general name for all the constructions of if-statement, for-loop, while loop, etc.?
 
@Cyoce Control structure?
 
9:58 PM
there we go thanks
 
@EasterlyIrk Was I summoned?
 
eh, just a pre-emptive ping if he kicked you out.
@CᴏɴᴏʀO'Bʀɪᴇɴ but moar comix
 
@EasterlyIrk Kk, you'll have one today (probably)
 
@Cyoce Their use is usually called "control flow".
 
@El'endiaStarman yeah that's what I have now
 
10:07 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ s/probably/for sure/
 
@EasterlyIrk s/for sure/probably for sure/
 
> $('#datepicker').val().split('/').map(parseInt)
< [3, NaN, NaN]
Should be [3, 17, 2016]. @CᴏɴᴏʀO'Bʀɪᴇɴ, how fix?
 
eugh
.map(Number).
parseInt takes three args.
It happens to everyone.
 
Thanks! :)
 
10:14 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ refreshing the blog constantly, but no change........
> Read everything. There is random information. get to work
 
@EasterlyIrk ಠ_ಠ
 
s/Read everything. There random information.//
 
That was in reference to the code in the picture.
 
what?
 
My most recent comment is a code.
 
10:15 PM
yah
 
Did you get it?
 
nope
 
:3
Link me to your explain, again?
 
> your explain
 
No, that's correct.
He has an explain.
 
10:16 PM
rofl
With no explanations....
 
Hint: binary.
 
I know it shouldn't anymore, but it still surprises me how people pick the answers they upvote. Four answer to the same challenge: 1. Killer 67-byte Python answer. +9 2. My 84-byte Python answer. +30 3. 34-byte Pyth answer. +12 4. My 20-byte Jelly answer. +7
It can't be language bias. It can't be poster bias. What is it?
 
Time of posting?
A combination of multiple factors?
 
It's time of posting (usually).
 
Insanity?
 
10:19 PM
^
morning @Quill
 
Nope. I posted the Jelly answer before the Python answer. The Python answer basically ripped the Jelly answer off.
@Quill By exclusion, the only reasonable explanation.
 
Activity? People probably sort by active.
OK, now without making any changes to my code I'm getting an EOF when trying to post to the chatroom with my Ruby script.
This is ridiculous.
 
@quartata I don't think that's true. Anyway, the Jelly answer has twice as many revisions.
 
Woo, 5 stars on my Vim plugin, 2 from people I don't know! And 15 downloads from vim.org!
I'm basically a celebrity
4
 
You were already.
You were known as the god of avocad, for making the holiness known to mankind.
 
10:22 PM
Move over Tom Cruise, here comes AlexA.
4
 
All hail @AlexA.
 
@EasterlyIrk ( ͡♥ ͜ʖ ͡♥)
 
@quartata I normally have sorting set to votes.
 
@quartata Yeah, but Doorknob is good at things.
 
10:23 PM
@AlexA. Ah, right. Forgot.
 
rofl
 
@Doorknob Have you used Net::HTTP before?
 
so then probably zipwith would be implemented { + } [1, 2] [3, 4] zipwith #=> [4, 6]
 
Also, how on earth did I get things done before without sl
Truly the greatest unix utility of all time
 
yep
very useful...
 
10:34 PM
@Dennis Msybe "familiarity with the language"? Jelly is not well-known outside of PPCG.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ
gtg bai
not coming back for a couple hours, will do more when I can.
@CᴏɴᴏʀO'Bʀɪᴇɴ there better be another comic when I get back in ~4 hours.
 
@EasterlyIrk :D thanks, that was great
 
0
Q: On-liner Python Expand equation

aliqandilSo I've been playing around with python 3 for a while now, And I've realized there is a certain challenge in doing things in one line! I've racked my mind trying to solve certain Puzzles, And just now I found this part of stackexchange, and frankly intrigued by it. I've decided to share some of t...

 
I'm looking at the nominees and I'm wishing that I had half as many good options for the November elections.
 
@NewMainPosts Isn't this basically a really unclear dupe of this: codegolf.stackexchange.com/q/2745/45151
Well, I suppose it's a subset.
tfw trying to fix up a challenge and someone edits
 
10:53 PM
@EasterlyIrk Are you sure "the significance of [3 * 23] is unknown"? :P
 
XD
@quartata tfw wtf ftw!
hey click on the image link
 
I am the edit master
Man, all that effort on a challenge that will probably be closed.
Maybe I rescued it, dunno.
It would be nice if we composed a guide to composing a challenge or something similar.
 

« first day (1881 days earlier)      last day (2964 days later) »