« first day (1913 days earlier)      last day (2931 days later) » 

10:01 PM
And reversed isn't a common operation?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ There's also len and sorted.
 
@El'endiaStarman those are common
 
Look bottom line: a function that doesn't modify an object directy shouldn't be an instance method. Python has no class methods. That leavs procedures.
That's an implementation thing you're not supposed to mess with
 
10:03 PM
len calls __len__
 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 
Is Ba'al related to El'endia?
Ba' vs El'
 
@QPaysTaxes Use %
 
@QPaysTaxes maybe
random button is addicting
 
@EasterlyIrk I would hope not!
 
10:07 PM
@quartata Except Python 3 encourages .format()
right?
 
No one actually uses .format that I know
 
@EasterlyIrk Ba'al is an idol
 
@El'endiaStarman same.
@CᴏɴᴏʀO'Bʀɪᴇɴ i know.
 
Why use format when you can use '%' with the same formatting specification that you know from every other language?
 
10:08 PM
I think .format is indeed the "proper" way to do it, and it's also a little more powerful/flexible/maintainable, but I usually use % anyway because it's quicker and easier. :P
 
I like the {} method; it's what Rust also uses
 
BAI to do work.
 
0
Q: Write an interpreter for dc

AbbKazPowYour task is to write an interpreter for the stack-based programming language/calculator dc. dc has a relatively small instruction set, and has a very terse syntax.However it must not be taken lightly, because it is an arbitrary-precision calculator. For those of you who do not know what dc is,...

 
@EasterlyIrk BAI to you
 
as soon as you just let go of all these Ruby OOP expectations you'd realize Python is beautiful place of gumdrops and unicorns
 
10:10 PM
gumdrops taste bad after a while and unicorns don't exist
 
@feersum because format replaces all {0} with the same string, and "{0} test {0}".format('asd') is simpler than '%s test %s" % ("asd","asd")
 
@QPaysTaxes You're not a pythonic unicorn, so you're fine
 
> gumdrops taste bad after a while and unicorns don't exist
ftfy
Gumdrops are awful.
dangit, trying to leave.
 
@EasterlyIrk where did you get the 3d avocad at the top?
 
BAI FOR REAL
@epicTCK google images
 
10:11 PM
If you really want to do heavy OOP then use Java. Python isn't about that. Python is about clean pretty code that just works by any paradigm necessary
 
I want functional. Which lang does that?
 
Racket
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Any languege with functions.... :P
 
10:13 PM
@QPaysTaxes Already explained this. It's still good practice to have an explicit pass at any rate. People don't read comments often
 
@epicTCK Doesn't work that way.
@CᴏɴᴏʀO'Bʀɪᴇɴ Haskell.
 
@flawr ":P" I know
 
People who do read comments end up understanding the code wrongly because the code was edited 3 times since someone wrote the comment 5 years ago.
 
@QPaysTaxes A pass tells me right away this section is under construction
 
10:16 PM
then why is it there?
 
Why woud you bother with an else clause then?
 
I believe you do need empty statements sometimse although I can't recall an example.
 
@feersum One might be overriding an inherited method to make it do nothing.
@QPaysTaxes Yeah, so you do pass #comment.
 
label at the end of a block might need an empty statement
 
I think at this point you're just looking for reasons nt to like Python. That's fine: you can just say I don't like Python. I don't really give a shit, just don't then try to force yourself to use Python and get mad about it
 
10:19 PM
Though if you're in a hurry, you need not write the comment.
 
def you_shall_not():
    pass
 
@QPaysTaxes __len__ isn't an instance method. well it is, but not the one that len() calls
 
I often use pass in functions that I will define later, and want to be sure I have the layout already.
@QPaysTaxes Aren't comments completely ignored?
@QPaysTaxes I don't get what you're asking.
 
Then you are never going to find a language that won't bug you in some way.
LsoI already told you why it was written like that two days ago
 
If you have a piece of code like this, shouldn't the interpreter throw an error since you probably made a mistake?
def foo():

def bar():
    return 5
Comments are stripped out though.
 
10:22 PM
Do you seriously think functional comments are a good idea?
 
Comments HAVE to be stripped out first due to how indentation works. It would be a massive pain in the ass for such a dumb feature
 
@QPaysTaxes You mean, why it was decided that comments would be totally ignored?
 
Comments that alter the program semantics.
 
@QPaysTaxes comments that actually have an effect on the code
 
I've always found it amusing that you can comment out newlines in LaTeX
 
10:24 PM
Here lemme dig up this exact same conversation where I explained this
 
@QPaysTaxes What if you comment out lines at the first character (like IDLE)? If we're following Python's rules of indentation, then this will cause all kinds of problems.
 
I think we should all recognize that we're getting trolled now.
I mean come on, comments that affect the program...
I agree.
 
@QPaysTaxes That's not what I said at all.
Chat search on mobile is a pain in the ass. Look it up yourself if you really care.
Basically you would have to make comments respect indentation which is highly problematic
 
what operators should strings have behavior for besides + and *?
 
... what would * do on strings?
 
10:29 PM
@Doorknob repetition
 
def foo():
    def bar():
##      return 5
 
e.g. "foo" * 2 = "foofoo"
 
Oh, I was thinking called with two strings
 
@QPaysAxes that would mean else with an empty body is allowed which isn't good
 
Can you divide one string by another string?
 
10:30 PM
@Doorknob I was thinking the same thing till I Googled it and was like "Oh, I already knew how to do that."
 
@DrGreenEggsandHamDJ no, unless a good reason can be provided for the behavior
 
@Downgoat I honestly like the idea of char removal, e.g. "Hello, World!" - "l" = "Heo, Word!"
 
@DrGreenEggsandHamDJ If you can multiply a string by another string, maybe you can come up with the inverse.
 
@QPaysTaxes which block does that comment belong to?
 
@QPaysTaxes bai
 
10:30 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ bai
 
not leaving >_>
 
@El'endiaStarman like finding the longest repeated string? :P
 
@Doorknob With two strings some esolangs (like Pyth) have cartesian product defined for that, idk how common that is outside of that though :P
 
@El'endiaStarman Lol, I've actually thought about that as a challenge, but I can't come up with anything that makes sense.
 
Division: "Hello world" / 2 = {"Hello","world"}
 
62
Q: Why is the minus sign, '-', generally not overloaded in the same way as the plus sign?

Digvijay YadavThe plus sign + is used for addition and for string concatenation, but its companion: the minus sign, -, is generally not seen for trimming of strings or some other case other than subtraction. What could be the reason or limitations for that? Consider the following example in JavaScript: var...

@Rainbolt 0_o Woah...
 
So it behaves like split?
I could get on board with that
 
But then * should be join... :o
 
Then does "HelloWorld" * " " == "H e l l o W o r l d"?
 
@FryAmTheEggman ....HMMM....that might be useful...
 
10:33 PM
No because "HelloWorld" isn't a list
 
bai
But a string is practically a list of chars.
 
In Ruby, ['a','b','c'] * ' ' -> 'a b c'
 
If division splits a string into a list, then multiplication joins a list into a string
 
That would be kind of neat that they would be inverses but yeah it's probably a terrible idea :P
 
Especially it you're from a python background
"Foo" / "" == UniverseError
 
10:34 PM
DivideByEmptyStringException
 
@Sp3000 lol u rowdy boy i v just saw u second ranked on project-euler scoeboard
 
Uh wouldn't that just be ["", "F", "o", "o", ""]? :P
 
wait if / is split then wouldn't "foo" / "" => "Foo"?
 
@FryAmTheEggman How many empty strings are in between each of those letters?
 
No, because you can't divide by 0. :P
 
10:35 PM
Answer: Infinitely many
 
Exactly one according my supreme authority: whoever designed regex :P
 
Regex was designed by so many different people.
Since there are so many different standards.
 
We either need to fix regex or fix mathematics
 
oh look who is the first, that is martin with twisted family name
 
(I know my previous statement is full of wrong things just in case it seemed serious :P )
 
10:42 PM
sigh Allergies are the worst.
Even worse than Javascript.
 
ಠ_ಠ
2
JavaScript is best script
 
Lol, sorry.
But seriously, allergies really suck.
 
Ik
Even worse than Python
:P
 
10:44 PM
Lol, sorry.
But actually, allergies really do suck
 
Can a PPCG mod clear the comments here?
 
It's fun to take random potshots at languages that I don't actually harbor any negative feelings towards.
 
@EasterlyIrk Not just any mod. You need a PPCG mod for that
 
Try PHP, there's always fuel there
 
10:46 PM
Except for PHP and VB. I really do actually hate those.
Ninja'd
 
@trichoplax hmph
@DrGreenEggsandHamDJ why hate on VB?
disclaimer: never used it
@CᴏɴᴏʀO'Bʀɪᴇɴ D:
 
@EasterlyIrk You can flag one of the comments for mod attention and request they be moved in the text box that comes up
 
2 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
:P
 
@EasterlyIrk At work, I was tasked with rewriting some old VB that a bunch of professors wrote. It was the most poorly written code I have seen in my entire life.
 
The real star wars has begun
 
10:47 PM
 
TBF, that's not the fault of VB, but now I have flashbacks everytime I think about VB.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ my ammo was fired on the ಠ_ಠs
@DrGreenEggsandHamDJ rofl
 
@EasterlyIrk I still have mine >:D
 
Plus, there some things that are just obnoxious, like 1 to n loops, If Then Endif, etc. Strict Off
 
@CᴏɴᴏʀO'Bʀɪᴇɴ D:
reclaimed 2 of mine
 
10:49 PM
:(
:D
 
really?
 
While it's still on the starboard, does anyone else have any feedback on the line widths in my Sierpinski Knot image?
 
who starred my "my ammo" message.
 
@trichoplax I saw it earlier, it's perfect
 
10:50 PM
@trichoplax not on the starboard anymore.
and ^^
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Wow. Thank you.
@EasterlyIrk It dropped off as I posted lol
 
rofl
RESTAR IT:
 
@EasterlyIrk: Perl takes too much time to properly explode your memory :-)
 
user image
2
@TonHospel rofl
 
\o/ language learning is in public beta
 
10:51 PM
:D
 
@Downgoat That's cool. I commited, then did absolutely nothing.
 
^ but without the commit. I partipated a bit though.
 
@DrGreenEggsandHamDJ ಠ_ಠ
 
¯\_(ツ)_/¯
I commited cause I like ELL.
 
10:53 PM
@EasterlyIrk Ha ha now that someone has starred your post you'll get the questions on what it is :)
 
@CᴏɴᴏʀO'Bʀɪᴇɴ cergos hasn't updated in a while........... D:
@trichoplax hmph
 
Sorry, it's almost the end of the school year
2
 
hmph
moar hmph
if you don't make more comix i will become himarm jr again
 
10:55 PM
Awh I can log in to chat from elinks but can't send messages. :(
 
@CᴏɴᴏʀO'Bʀɪᴇɴ About four more weeks or so?
 
@El'endiaStarman For my school, about three. We let out earlier
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Cool.
 
@EasterlyIrk I have a file of a lot of comic ideas, but I can't draw.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ :/ we have a month and a half
 
10:56 PM
@quartata Ever seen/considered sprite comics?
 
quartata: That why stick figures were invented
 
@Maltysen kehehe
 
Most of them are math/CS puns so maybe that's a good thing
 
@quartata I can help with that :3
 
@quartata ^
 
10:57 PM
@quartata Sounds like an ideal opportunity for collaboration
 
@TonHospel Yeh but xkcd already does that. I don't want to rip off both content AND art style
 
@quartata: Or lego pictures (my absolute favorite is irregularwebcomic.net/2339.html)
 
@quartata I do, and have no qualms
 
heh
 
Though I draw mine digitally, and it yields different style
 
10:59 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ while I eat dinner.... :P
 

« first day (1913 days earlier)      last day (2931 days later) »