« first day (1908 days earlier)      last day (2949 days later) » 

6:04 PM
What is it an image of? (domain blocked at school)
 
A non-duck bird sitting in the water.
 
pegion -pigeon
 
Did you mean: pigeon?
I thought about bolding that like Google, but figured that'd be a little obnoxious. :P
 
Did you mean: penguin?
 
stupid google.. keeps giving me wrong results
 
6:06 PM
#obnoxious
 
@El'endiaStarman I think he's not gonna be around any time soon.
 
Yeah, the signal-to-noise ratio dropped too low for his liking. :/
 
5
A: The state of chat

Peter TaylorAs the person whose comment triggered Nathan's question, I think I should answer. Yes, there's far too much off-topic chatter The FAQ for chat says: This site is an extension of The Stack Exchange Network, so discussion should more or less revolve around the same topics you'd find at The St...

 
if you had to make a name for a shell, what would you call it? (think bash, batch, cmd, etc.)
 
shell is presumably already taken... :P
 
6:14 PM
yeah >_>
 
sudo
 
Presumably untaken.
 
That would shadow the actual sudo. :P
 
sudont
3
 
turtle?
 
6:15 PM
idk what sudo is :P
@MorganThrapp not a bad idea
 
Really?
 
Really.
I use windows.
 
Well it is a command for unix systems.
 
superuser do
 
6:16 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ .....even as a Windows user, this is unacceptable.
 
Basically for executing commands that require super user access.
 
Basically, it's Window's "Run as Administrator".
 
"Super user"? Like superman?
oh
@El'endiaStarman Thanks, that's more useful than the jargon :D
 
If any command mycommand does not work, the first thing you do is type sudo mycommand.
 
Ah. That explains a lot of xkcd and foxtrot :P
 
6:18 PM
So that might give some people the impression that sudo is your house slave.
 
@flawr That's actually often a bad idea, you should only do that if you know the reason it didn't work was that you didn't use sudo and you know that you should :P
 
58
Q: The versatile integer printer

Stewie GriffinWrite a piece of code that is executable in at least three different languages. The code must output the integer 1 in language number one, 2 in language number two, 3 in language number three etc. Rules: The output must be only the integer, but trailing newlines are OK. The code can't take in...

Just call me Recently Featured Questions.
 
@FryAmTheEggman @FryAmTheEggman Yes I know, this was somewhat exaggerated=)
 
Trying to make a stupid CMD joke, I learned there's a way to print a file with CMD
 
Exaggerating when people don't know what's going on can lead to bad things, I figured you knew, but didn't want to give Conor the wrong idea :P
 
6:20 PM
thanks :)
 
@FryAmTheEggman I think I remember reading an article about how Linux is actually pretty insecure, and that this was one of the reasons. :P
 
Linux is very secure, not all the people who use it are, though ;)
 
ECHO @ECHO Execution successful.>sudo.bat - sudo polyfill in BATCH files
 
@FryAmTheEggman I don't remember what else was said about Linux, but I do remember that for Macs, it is or used to be the case that all you needed to bypass the login screen or override the password was the installation CD.
 
@QPaysTaxes Sure!
 
6:23 PM
@QPaysTaxes Somewhere not in the chat right now
 
@El'endiaStarman Use any live cd.
 
@QPaysTaxes Most questions you Google on Python will have the official documentation as one of the top results. :P
@QPaysTaxes Arrays are not a specific type in Python, that might be why.
 
@QPaysTaxes Yep, lists. I'll go get the doc link.
 
6:24 PM
Gaaaaah
Finally get to sit down
 
@Xanderhall Welcome! Let us waste your time.
 
@QPaysTaxes Yes, that should work.
Well, probably more like {key: val for key, val in list}.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I've already wasted plenty here :P
 
@Xanderhall Let us waste more of your time! :D
 
@QPaysTaxes Yep. a, b = [1, 2] => a == 1, b == 2
No problem. :)
 
6:30 PM
Fun stuff: first, *rest = [1, 2, 3, 4, 5] => first == 1, rest = [2, 3, 4, 5]
 
-1 you didn't use assert
@FryAmTheEggman whoa. what if you do first, *middle, last = [1, 2, 3, 4, 5]?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Syntax error (IIRC). :(
 
@CᴏɴᴏʀO'Bʀɪᴇɴ It works fine for me
 
6:31 PM
No wait, it works fine in 3.5.
 
In 3.5 anyway
ah there's the rub :P
 
What about a, *b, c = [1,2]?
 
b is empty
works fine
 
So, b == []?
 
@El'endiaStarman the unique role of mass is generating a gravity, and i dont see planetes falling downhill to the sun when crazily augmenting their mass !
 
6:32 PM
Well, I guess Python got it right then.
 
Huh, the *middle thing works in 3.3 as well.
 
@QPaysTaxes Just because you don't like the paradigm doesn't mean it's wrong.
 
I don't have 3.0, 3.1, or 3.2 on my computer, so I can't keep testing.
 
@QPaysTaxes Pray.
 
Try python3.5.
 
6:33 PM
@QPaysTaxes Beg the computer.
 
You can do that syntax for any number of items in Python.
a,*b,c,d = [1,2,3,4,5].
 
3.4 is the last stable one, that's probably why it says that
 
Nah, 3.5 is stable.
 
@QPaysTaxes ):< is a devil with a mustache
 
@QPaysTaxes That I'm not sure about.
 
6:34 PM
@QPaysTaxes wait what does that do?
 
>>> first, *second, *third, last = [1, 2, 3, 4, 5]
SyntaxError: two starred expressions in assignment
 
Weird, maybe they didn't update the package thing yet? Idk :P
 
@El'endiaStarman Good. phews
I could see *first, center, *end = [1,2,3,4,5] making sense, but it's far too subjective
I said I could see It making sense, not that it did.
 
What about *first, center, *end = [1,2,3,4,5,6]?
Yeah, thankfully the Python interpreter is sane.
 
@MorganThrapp If I had to define behavior, I'd have first == [1,2,3], center == None, and end == [4,5,6].
 
6:36 PM
@QPaysTaxes I meant that as a counter example to Conor saying multiple starred assignment could make sense.
@CᴏɴᴏʀO'Bʀɪᴇɴ Except thats counter to the normal behavior.
 
Ah-ha, you can't do a, *b, c in a function definition.
>>> def foo(a, *b, c):
	print("a",a)
	print("b",b)
	print("c",c)

>>> foo([1,2,3,4,5])
Traceback (most recent call last):
  File "<pyshell#22>", line 1, in <module>
    foo([1,2,3,4,5])
TypeError: foo() missing 1 required keyword-only argument: 'c'
 
The non-stared item always gets a value.
 
@MorganThrapp There is no normal behaviour >_>
Oh, that type of behaviour.
 
@QPaysTaxes You can't have positional arguments after a catchall, only keyword args.
 
@QPaysTaxes It would mess up the grouping of arguments. f(a,*b,c) would make it impossible to specify c when calling f.
 
6:38 PM
def foo(a, *b, key=None):
    return True
 
@FryAmTheEggman Or just make c the last argument.
 
Works fine.
 
^
Though I've never seen it work like that.
 
Sorry, by "impossible" I meant the interpreter couldn't handle it :P
 
The whole point though is that whatever argument is the catchall should be able to have 0 items.
 
6:39 PM
Python is, sadly, not perfect.
 
@Downgoat make splats be centered in cheddar!
 
Pytek will be, though!
 
@El'endiaStarman s/Python/literally all languages except for Pytek/
Is this Ruby?
I'll have to take a look at it.
Module.
(IIRC)
 
import sys; sys.argv IIRC
 
6:43 PM
argparse is a standard library module for that stuff.
 
Oh, you mean one that parses that?
 
Yeah, argparse or click if you wanna get super fancy.
 
Oops, ninja'd :P
 
Be warned: the examples aren't really thorough enough.
 
6:45 PM
@El'endiaStarman Have you ever heard of tropical geometry?
 
@PhiNotPi I saw you mention that yesterday(?), but otherwise, nope.
 
I figured you might be interested in obscure/abstract math stuff.
@QPaysTaxes tropical
 
@QPaysTaxes No, it really is "tropical". :P
 
Sounds fun. I could use a vacation :P
 
6:47 PM
yesterday, by quartata
Tropical geometry is a relatively new area in mathematics, which might loosely be described as a piece-wise linear or skeletonized version of algebraic geometry. Its leading ideas had appeared in different forms in the earlier works of George M. Bergman and of Robert Bieri and John Groves, but only since the late 1990s has an effort been made to consolidate the basic definitions of the theory. This has been motivated by the applications to enumerative algebraic geometry found by Grigory Mikhalkin. == Basic definitions == We will use the min convention, that tropical addition is classical minimum...
 
My main motivation of messing around with it is that, by simply touching it, I'm putting myself at the forefront of mathematics research.
 
I've been trying (to no avail) to add "imaginary numbers" to the tropical semiring... meaning, numbers X and Y such that X+Y=3 and min(X,Y)=2.
 
@QPaysTaxes I'd only parse the first, it's the most expected behaviour
IMO
Get some other's opinions first tho :P
 
@PhiNotPi Hmm, wait, if we're only interested in real values for X and Y, then there would no pairs that satisfy these criteria, right? If the sum is 3 and the minimum is 2, then the other must be 1, which is the true minimum, therefore contradiction.
 
6:54 PM
okai
 
I agree with parsing in sequence.
 
@El'endiaStarman Hence the fact that I need to invent new numbers.
 
@QPaysTaxes yeah
 
@PhiNotPi You could invent a number phinpi
 
@PhiNotPi Oh, so if it were instead X + Y = 5, then there would be two pairs, (2,3), (3,2)?
 
6:56 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ The point is you have to define rules for the new invented numbers so that they work :P
 
@FryAmTheEggman Yeah. That is a rule.
;P
 
Oh, I've been looking at the definition of tropical geometry wrong. I get it now.
(x plus y) plus (x plus z) would be min(x,y,z).
 
yes
 
7:04 PM
And this doesn't work with complex numbers because there is no minimum?
 
@El'endiaStarman Hence the fact that I need to invent new numbers.
 
Can't you define min(a+bi,x+yi) to be the one with minimal distance from 0?
 
Right. What if you used the minimum of the magnitudes?
Which is what Conor just suggested.
 
That's what it's called.
I forgot the term.
 
That doesn't solve the X+Y=3, min(X,Y)=2 issue.
 
7:06 PM
You could've also called it the absolute value and been technically right but not really. :P
 
You need it to meet a bunch of criteria for it still to be a simiring, I'm not super good at this, but I don't think that will work because that addition doesn't give complex numbers ever.
 
There are actually very few criteria for a semiring.
 
2i+5i yields an imaginary...
 
Actually I'm wrong hang on >_<
 
Oh, I forgot we're in topical geometry >_<
I was just defining min for complex numbers.
 
7:08 PM
@PhiNotPi And you could get that, when? Hmm, if X = 2 + i and Y = 1 - i, then min(|X|,|Y|) would give you sqrt(5). Yeah, that would be an issue.
 
@FryAmTheEggman no, aren't you right?
 
What about doing what Conor actually suggested, which is that you're not taking the minimum of the magnitudes, but whichever one has the minimum magnitude?
 
No the min would return 2i... I think the problem is the distributive property?
 
@El'endiaStarman They aren't the same things?
 
Yeah I got Elendia's mixed up with yours :P
 
7:10 PM
Oh nevermind
I get the difference
 
No you said return the number with smallest magnitude, Elendia said to return the smallest magnitude
 
Subtle difference I didn't pick up on :'D
 
Me either :P
 
The confusion is my fault since I said they were the same. :P
 
Blame the star man.
:P
 
7:11 PM
So, then, the example I gave above would return 1 - i. I guess the real problem is when you have min(1 + i, 1 - i).
 
mmmm.
maybe 1 - i, because the iPart is negative? :P
 
Get that Apple scum out of here! :P
 
XD
Blame TI-BASIC
Who in here knows there Erdo''s number?
 
Mine is infinity.
 
Is that what the default is? :P
 
7:14 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Good try, but what about (-1 - i) and (1 - i)?
@CᴏɴᴏʀO'Bʀɪᴇɴ Yep. :P
 
@El'endiaStarman -1 - i because it's the most negative?
Well, I gotta go.
BAi
 
Just to make sure I'm not crazy, the additive identity in tropical topology is -infinity and the multiplicitave identity is +infinity?
 
That seems right.
 
multiplicative identity is 0
 
But that doesn't destroy the value? I'm confused :P
 
7:18 PM
what about (3+4i) and (5)
 
x mul y = x + y, so x mul 0 = x.
 
Oh, whoops I didn't mean identity, my bad, I meant the "zero".
 
I wonder what that is called.
"In the reals, 0 is the multiplicative destroyer."
 
I propose: "Annihilating Identity"
 
Destroyer is more pithy. :P
"Destructive identity" could work too.
 
7:21 PM
IMO the more things sound like a saturday morning cartoon the better :P
 
So, additive destroyer is -infinity and multiplicative destroyer is +infinity; additive identity is +infinity and multiplicative identity is 0.
 
p   b        ɪ̈   ʊ̈
ɸ   β        ɐ   ɞ̞
pɸ  bβ       ɪ̈ʊ̈  ɐɞ̞
pʼ  ɓ        ʊ̈ɪ̈  ɞ̞ɐ
ʙ   ʙ̥
ʔ   h
12 consonants × 8 vowels = 96 possible syllables
Finished a draft of the phonetic inventory for my conlang idea \o/
 
The title changes!
When I clicked on it, it said 20275.9 grams of chocolate.
 
They set up a bot to scrape view count? lol...
 
@AlexA., this reminded me of you. :P
 
7:35 PM
@El'endiaStarman Most relevant: en.wikipedia.org/wiki/Ideal_(ring_theory)
 
@El'endiaStarman I don't get it=)
 
@PhiNotPi Oh yeah, absorption property.
@flawr Alex says some form of "420 blaze it" all the time despite not being a marijuana user himself. :P
 
@Doorknob so it's consonant vowel like japanese?
 
what is at 4/20?
 
@El'endiaStarman Still have no clue^^
 
7:50 PM
@flawr 4/20 is popular within the marijuana community for some reason, and the comic is basically that someone is getting excited about 4/20, but they don't use weed themselves, so they have no reason to do so.
420, 4:20, or 4/20 (pronounced four-twenty) is a code-term that refers to the annual consumption of cannabis and by extension, as a way to identify oneself with cannabis culture. Observances based on the number 420 include smoking cannabis around the time 4:20 p.m., as well as smoking and celebrating cannabis on the date April 20 (4/20 in U.S. form). == Origins == A group of people in San Rafael, California, calling themselves the Waldos because "their chosen hang-out spot was a wall outside the school", used the term in connection with a fall 1971 plan to search for an abandoned cannabis crop...
 
@El'endiaStarman 5/7
 
cat
2 hours ago, by cat
1 hour ago, by cat
Could someone tell me; was my edit here comprehensive enough for this to be reopened? (also, please let me know of any loopholes or things I forgot!) http://codegolf.stackexchange.com/questions/22/the-luhn-algorithm-for-verifying-‌​credit-card-numbers-etc
 
@El'endiaStarman TIL =)
 
cat
24
Q: The Luhn algorithm for verifying credit card numbers, etc

Chris LaplanteWrite the shortest program or function to calculate the Luhn Algorithm for verifying (credit card) numbers. From RosettaCode, this algorithm for the purposes of this challenge is specified as such, with the example input of 49927398716: Reverse the digits: 61789372994 Sum the odd digits: ...

can someone help me reopen that ^ ?
 
@cat looks OK to me
 
7:56 PM
@cat "sum the odd digits" should be "sum the digits in odd positions"
or even better "every other digit" so you don't get people starting "but I count from 0!"
 
Oh, that's a good point
 
could also mention somewhere if the modulus of 10 is fixed or whether you pulled that somewhere out of the number
 
Anonymous
@QPaysTaxes Try looking at Boost.Any
 
Anonymous
@cat Done
 

« first day (1908 days earlier)      last day (2949 days later) »