« first day (2230 days earlier)      last day (2943 days later) » 

13:04
@AnttiHaapala "not all legacy code is not yet..."
@AndrasDeak I am just putting it there so that poke can copypaste
Hey
Is mypy able to simply analyze python code w/o running it?
user559633
> the % formatting should have died long ago. Its problem was that it wasn’t really extensible, the syntax was awkward. Its only positive side was that it more or less matched the formatting used in the C standard library.
user559633
nooo i love % formatting
13:09
pfft
user559633
it's so much cleaner to "%s" % my_var than "{0}".format(str(my_var))
what about "{0}" % my_var
'{}'.format(my_var) ?
user559633
@BartekBanachewicz will barf if can't implicit convert
which is good?
user559633
13:11
python is auto-pilot for "close enough". i prefer % because it only barf when something is seriously the wrong type
user559633
and f-strings are implicit and against the zen of python. language ruined. shut it down, folks.
@tristan Zed warned
user559633
We should have listened sobs deeply we should have listened!
... There are classes that can't implicitly convert to str?
@tristan meh, I've seen multiple cases where I explicitely disagree with the "zen of python"
13:13
@tristan 'My object is %s' % foo
user559633
yeah -- i used to run into them with some regularity
@BartekBanachewicz you can disagree with it.
user559633
@BartekBanachewicz yeah, I was being dramatic for effect
it guides Python's development.
I recently googled "how to make a constant in python" and found my comment on SO under the "can't do that" answer
from 8 months ago
that was a sad moment
13:14
Considering basic fallback behavior is built straight into Object, it seems like you'd have to go out of your way to make that happen. Implementing __str__ to raise NotImplementedError or something.
user559633
just add a comment above that says "no no don't touch im serious guys". there, constants.
@BartekBanachewicz make a constant what?
@AnttiHaapala make a constant, period.
@tristan yeah, no.
Make pi! I love pi.
constant or onetime-bound-variable
13:15
As in, how to make a variable that can't be reassigned? Yeah, that's impossible.
@AnttiHaapala it's not very variable if it's constant ;)
local or global?
local.
I know it's impossible
so it is one-time bound name.
13:15
then do not rebind it.
rather easy.
that's not an answer
you're not for a constant. final say.
I can understand the "we can't implement that" reason. "Just don't change it" is not a reason.
"Q: how do I make a private attribute? A: just don't access the attribute where you're not supposed to." "Q: how do I make a constant variable? A: just don't reassign it." Here you see the philosophy of "we're all adults here" in action
When I declare something const in e.g. C++, I also don't mean to change it. It's orthogonal.
13:16
@BartekBanachewicz please tell an use case for that, if it is about a local variable.
unrelated: the pamphlet response is pissing me off on account of containing the original claims
it could be done.
user559633
@BartekBanachewicz no, no. you have to tell others that you're serious.
@AndrasDeak it is not a response :D
self._attr_private__srsldude
13:17
it is just something I typed after my lunch
@AnttiHaapala excusez-moi, refutation
user559633
[but to be serious, yeah, no, i've just come to accept the fact that's not how python works]
SHIIT I just realized I didn't drink the free coffee after the lunch
the pamphlet made you respond in some way, so it's a response #physicisted
@AnttiHaapala well, I want the name to only represent one thing and I want to prevent it to be accidentally changed.
13:18
"accidentally"
accidents happen
you walk down the street, and BAM---eval.
user559633
@AnttiHaapala haha, go down and grab all the remaining carafes, crawl under a table, and pour it down your throat while staring down everyone in the area
a = set()
f(a)
# is a still empty?
13:19
@tristan I came to the office already :7
set = frozenset
hope that works in py3
I thought I will go to the counter to pay, take coffee and write some more. I did go pay, write some more but forgot the coffee.
oops, that' a dict
I keep messing that up
frozendict anyone?
@AndrasDeak right, I keep forgetting that {} is a Dict, not a Set
@BartekBanachewicz that's a different thing again, that's a frozen dictionary.
13:20
f(a.copy()) :P
python should have a frozen dictionary.
user559633
haha okay, only on my first coffee of the day
but then, Java doesn't have such "const-types" either
@AndrasDeak easy enough to forget
@tristan scusi mua.
13:21
why allow simple bugs if you can easily prevent them
user559633
@AnttiHaapala haha, no worries, but i might have looked at my hands and wondered if this is reality
@BartekBanachewicz there is nothing easy about C++ const
@AnttiHaapala you mean mi scuuuuusi
saying that it is easy, then why does C++ then have mutable.
and with that, I bid you farewell:P
13:21
@AnttiHaapala it's way easier than non-const, that's for sure.
rhubarb till later
immutability is easy
Challenge: implement const in CPython and submit a change request.
@AnttiHaapala performance/hardware implications, also C++ is bad
Should be only a few minutes' work, if it's as easy as you say
13:22
in real code you p much never see mutable used
@BartekBanachewicz you know how to butter up Antti
@Kevin I never said it was easy
throw in a snide remark about python 2, and you're set
6 mins ago, by Bartek Banachewicz
I can understand the "we can't implement that" reason. "Just don't change it" is not a reason.
@AndrasDeak well thankfully we're using Py3
I guess I'm interpreting "why allow simple bugs if you can easily prevent them" uncharitably, somehow
13:23
which means I get type annotations, yay
@BartekBanachewicz jolly good;D
@Kevin oh I mean after you have this feature done
user6568562
@AndrasDeak Hahaaa I forgot he was in it : D
user559633
@BartekBanachewicz what's "real code?" (honestly asking)
@randomhopeful I forget he was a "he", I'll get back to that later
(found the pamphlet link, bugrit)
user6568562
13:25
@AndrasDeak Oooh, I remember another movie where it was a woman harassing the protagonist
user6568562
In a train, and they went in a tunnel, and I'm not sure
@tristan Badly phrased. Non-specialized-library code?
Really, it's super rare to see mutable in C++
I remember myself using it maybe once during what, 10 years I've been using C++?
user559633
Where the guard is what, against types being changed?
it's used for things like low-level cache
user559633
Just curious as I spend almost all my time in Javascript and Python, where const is new in JS.
13:27
where semantically, on the outside, the object stays the same, but the cache updates
@tristan const in C++ makes the value constant
but for an instance of a class, "constant" is "what the programmer defined as constant for that type"
@BartekBanachewicz and smart pointers and whatnot :D
@AnttiHaapala what about them?
that one needs to have mutable in C++ because otherwise const would break everything
would it, though? A constant unique_ptr just means you can't reset it
and all it protects is some memory. Java is much saner. An object can say: "this cannot be modified"
user559633
13:29
are constant classes a new thing? given, i don't write a lot of C++, but i don't think i've seen it
in C++ objects are pretty much memory
@tristan every instance can be declared const
user559633
Ah, understand.
class C { public: int x; }
const C c;
c.x = 5; // error
@tristan it is just that C++ is a) brain-damaged, b) does "OOP" in the same brain-damaged way.
@AnttiHaapala that I won't ever argue with ;)
13:30
so a const instance cannot be changed.
well if you go into pointers (not even smart) things change
but then someone noticed that you need to have const instances that can change.
const C * and C const* and const C const* are all different things
thus... the instances can have mutable members that can be mutated even though the shit is constant
which, again, makes sense if semantically the instance remains "constant"
consider
13:31
@BartekBanachewicz lol. const C * and C const * are exactly the same thing.
@AnttiHaapala maybe you need parens, I dunno, I rarely use raw pointers
the syntax for them is ridiculously bad
@BartekBanachewicz it is C * const that is different
@AnttiHaapala std::add_const_t<std::add_pointer_t<C>> c; :P
the const and volatile apply to the item on their left, unless they're the leftmost item, so they apply to the item right of them.
1 min ago, by Bartek Banachewicz
the syntax for them is ridiculously bad
whistles
13:33
I create constant names fairly frequently, but I don't know if I've ever made a constant name bound to a mutable object. Typically they refer to strings or numbers. In the case of constants referring to immutable objects, you never need to worry about f(MY_CONSTANT) modifying MY_CONSTANT, because doing so is impossible.
So the only way MY_CONSTANT would change is if a user directly reassigned it, as in MY_CONSTANT = .... But any Python programmer paying attention to community standards will know the significance of an UPPERCASE_WITH_UNDERLINES name and why it's a bad idea to put it on the left hand side of an assignment.
user559633
i'm having college flashbacks. the same professor that made us code against his binary object also used to quiz us on trivia bits like this
COMMUNITY_STANDARD_EMPTY_SET = set()

def insert5(x):
   x.insert(5)
From this perspective, "let's implement const to protect mutable constants" might fail the negative 100 points test, since only a small fraction of constants are going to be mutable anyway
@BartekBanachewicz Right, and my assertion is that real code would never have a constant set.
@Kevin why not?
(remember you're talking to a Haskell programmer)
Because I've never used a constant set, so I assume nobody else does.
13:36
you should try out a functional language someday :P
incidentally I gave a talk about MapReduce today (on my uni, but still)
immutability of data is kinda key there
@Kevin the important part should be that the class object behaves like a constant from outside point of view...
not that it is constant
If your Python code is influenced by functional paradigms, shouldn't you be shunning functions like insert5 that have side effects? }:-)
@Kevin you should
@Kevin touche. But I also use others' code, and I can't trust it.
user559633
I used Scheme for a while. The hardest part about Scheme is emacs.
13:37
Or rather, it's easy to assume it does not mutate while it does.
you could well assume that insert5 returns a new set with 5 added to it
that would be even worse if it had return x at the end
really confusing: imported some repositories into gitlab @tristan, now the issue tracker lists 10000000000000000000000000000000 different possible assignees.
I know it sounds like I'm suggesting a bandaid solution here, but there's always frozenset. You're probably thinking "yes, sets dicts and lists all have an immutable counterpart, but what about classes that don't? How about the Widget class I just defined five minutes ago?". Ok, yes, you have no defense against the attributes of MY_WIDGET being modified, but now we're getting back into a use case that's sufficiently narrow to fall under the "negative 100 points" heuristic.
Not all code uses constants, and not all constants are mutable, and not all mutable objects have immutable equivalents... The number of users that find a potential language feature useful shrinks multiplicatively as you add additional conditions.
user559633
@AnttiHaapala yeah idk anything about that
@Kevin I think you'd be hard pressed to find code that doesn't use constants.
@tristan are you using the bug tracker on gitlab?
13:46
and frozenset is very much a band-aid; it's a specialcase for something that could be a generic feature
if frozenset has a reason to exist, so does general const for anything
That answer is bad advice too.
I agree that constants are fairly common, but only 10% of those use mutable constants, and only 10% of those use mutable constants that couldn't be replaced by an immutable variant
also, the fact that a group can be deleted with a single click...
user559633
13:46
@AnttiHaapala no sir. i use git version control for the codes and trello for TODO: that get too big to explain inline
user559633
@AnttiHaapala these are issues I'm sure they'd be happy to entertain on an issue tracker
@tristan gitlab issue tracker is like trello on steroids
user559633
they just took a round of funding, so if there are things that are like "i would pay you, but....this is wonky", i'm sure it will get attention
there is a board view not unlike trello, you can add as many lists / lanes you want
@BartekBanachewicz a lot of Python's philosophy is "we're all adults here". Things are written with the expectation that you'll use them as intended. If someone creates a "const" set, a) that doesn't make much sense, and b) they can reasonably expect other devs not to mess with it.
user559633
13:48
i'll check out the issue tracker then -- unfortunately, existing data has weight, and i have like 20 lanes of at least 10 tickets each on trello
@BartekBanachewicz You would still have to read the docs/implementation of the function. What if you pass an immutable object to that function?
@davidism if "we're all adults" philosophy held true, bugs wouldn't exist
Nah, it's about usage assumptions, not about having zero bugs.
@davidism people make mistakes. Languages help prevent them.
the more you can prevent, the better, no?
@khajvah Then it would crash at runtime, which admittedly is more preferable than the code continuing to run but behaving incorrectly because something got modified when it wasn't supposed to. </devil's advocate>
13:49
it's all about reducing the set of incorrect programs
I agree, there are plenty of nice things you get from typing, but you're fighting a losing battle here with Python.
@davidism well I can at least hear out the contr-argumentation
@Antti I’m done.
The argument is what I just said: we write with the assumption that people won't misuse it, but also the understanding that they can if they want. This is nice in some ways, and not so much in others.
Languages that have const also allow some incorrect programs to pass build. They also assume the programmers are "adults"
@davidism That assumption holds everywhere. I don't put in static checks to prevent people from misusing my code on purpose.
user559633
if you want to misuse code on purpose, you can always do that
user559633
#define private public is not a reason for private to not exist
@BartekBanachewicz statically typed languages prevent some bugs that dynamic languages would have
yes, some classes of bugs
user6568562
13:52
@tristan That lady's amazing
but it's not really just about static vs dynamic here, it's about "continue to run" vs "break execution"
user559633
@randomhopeful +100
@BartekBanachewicz yeah but you can bring the same arguments about static/dynamic typing
Wait, I have a medium account
user559633
13:53
that's one of my favorite programming-related photos
@poke god that's long
@BartekBanachewicz I'm not even sure what you're trying to get at any more. We understand why const is nice. We've explained that Python isn't C++. Can we move on to something that's not a never ending argument?
I think we can be assured that "let's make it hard for the user to create bugs" is not on the language dev's priorities list, as long as the default mutable argument gotcha continues to exist.
hehe :D
Russians hacked the US elections :D
@davidism Well, I just asked what your reasoning was.
user559633
13:54
@AnttiHaapala lol, yeah okay. like i lifehacked a cup of coffee today. the hillary corruption machine is going wild
And subsequently questioned it.
Sure, you can break off at any time.
@poke so you want to publish this in your own name only? :D
user559633
@BartekBanachewicz FWIW, I'm enjoying what you're adding to the room
@poke nice. You should email him your response
@tristan that's rare. Usually people get angry for me flamebaiting their fav language. ;)
13:56
I feel like both sides here have made good arguments for why const should and should not be included in a language. This has been productive, insofar as anything occurring in an online chat room can be productive.
@AnttiHaapala I wrote 28k characters (not including quotes) on my own, yes
My answer basically boils down to "Python isn't C++" which I admit isn't very satisfying. But yeah, it's an interesting conversation, I just don't think we're going to resolve it.
@Kevin Also I've learned about frozenset, which is objectively productive.
Remember that in 99% of debates, you're not ever going to change the mind of the person you're arguing with, but you may very well convince the silent audience in your favor.
user559633
@BartekBanachewicz heh, i don't think it's flamebaiting -- i don't think you set out to "win" the conversation
13:57
@poke hehe your version is like you're refuting each sentence
@tristan No, not really. I guess I think that Python is a better language than C++ overall.
@Antti Yeah, I ended up doing that sometimes :P
But I'm writing in Python atm and the grass is always greener... :D
user559633
@BartekBanachewicz Yeah, I generally agree with this. For audiences like my girlfriend, she asked enough levels of "why" that I repeatedly had to say "because implementation detail"
it is rather not the problem of not being able to run Python 2 bytecode on Python 3... but that some of the objects are incompatible...
13:58
@BartekBanachewicz not a big achievement for Python :D
true enough
Every time I write JavaScript I think about Python, then when I go back to Python there's the occasional "JS had this". We can't escape. :-)
@poke what I thought would need to be written is to write an opinion piece that would convince others that they can ignore ZAS concerns.
Yes, please do that. Feel free to reuse as much of my text as you would like to
haha I guess poke had much more steam let out...
14:02
Just finished reading that ridiculous article. "Not turing complete" lol.
"I can't run Java bytecode inside Python virtual machine, so Python is not turing complete"
I mean, one could argue his point. Turing didn't finish writing Python3.
user559633
I always thought of Turing as an FP guy
At least the Hacker News comments about it are rational for once.
@tristan you think of Church
user559633
14:04
@AnttiHaapala no, you think of Church
@tristan only, Turing == Church, which might be the reason for confusion.
user559633
I should probably go outside and start eating healthy
start from tomorrow, enjoy beer and pizza today
@tristan doubt that.
user559633
You doubt what? That I think that or that I think at all?
> This is an excellent treatise on both the value of a computer science education and the importance of being sure that things you say in public aren't verifiably false.
14:09
As a solipsist, I'm pretty wary of anyone claiming that they have internal experiences of the world. But I try not to tell people that, it makes them appear upset.
> (edit: I used to recommend "Learn Python The Hard Way" to newcomers, and have just kept reflexively doing that over the years because I wasn't aware of a better resource. But if this article has accomplished one thing, it's that it's spurred me to look for a replacement)
(they aren't actually upset because P-Zombies don't have feelings, but it's still not fun to watch)
@poke post it to reddit
14:10
Not sure if I have an account for that
Also, which subreddit?
Apparently, Medium also tweeted this out, so feel free to retweet… twitter.com/poke/status/801427380837515268
@poke tag zas :D
I just hope I don’t get destroyed for this anti-rant xD
user559633
Destroyed? Hard to really get destroyed for speaking truth unless you're speaking it to a politician
I just think that I did get somewhat mean towards the end…
I don’t like to be mean
It's for a good cause
14:13
Read that as: I don’t like others to realize I can be mean
user559633
heh, i like the link to sopython in the medium post
I think I have two of those
Oh, three actually.
Just make the whole article a link.
or a screenshot
> If you have an issue with any of these criticisms, or a solution to them, then email [email protected] and state your case.
So, do we want to send an email from [email protected]?
:D
user559633
14:19
plz no
24 mins ago, by khajvah
@poke nice. You should email him your response
@poke not one, but 100/s!
I wasn't kidding
xD
user559633
i'm trying to spend less time here, not more
14:20
lol tristan
user559633
@poke i like your response
Thanks :)
Not too mean?
The only fault I've detected so far is I think that first "inable" should be "unable", a quirk that our enemies will surely seize with gusto and use to declare the entire article null & void
user559633
No. I think it's harsh and strong, but not offensive and kind of the level required when someone has spent so much time in an echo chamber of new users that he thinks there's a conspiracy to get people to drink Python 3 flavored kool-aid.
user559633
@Kevin Python only has None and implicitly returns None from void functions. Newbie.
14:22
Scoundrels they are, our hypothetical enemies.
@tristan he should read a book
@tristan That's why I put null = void = object() at the top of all of my projects, to correct this oversight in the language's design.
I'm back, baby
@tristan Okay, thanks. I just want to avoid going into getting personal. Hope I could control that fine.
eb andras how goes it
user559633
14:23
I fear that my snark is becoming superseded. So proud.
thanks, fine
let me read teh poker
@AndrasDeak Hi, Back!
Hiya BR, how is the new found power?
Phenomenal and Cosmic, I trust
@MooingRawr Not bad at all :)
Learning stuff.
Now I know how to nuke random stuff ;)
14:30
Did you find your inner peace? Oh lord I guess not...
Disintegrated a couple planets in the Andromeda galaxy, pretty par for course re: new mods, really...
user559633
@AnttiHaapala related, his "rails is a ghetto" post is amazing harmful.cat-v.org/software/ruby/rails/is-a-ghetto
@tristan but it's not technical
user559633
@khajvah i never claimed it was technical
14:39
I know, maybe that's why it's amazing
So, has anyone already shared it on reddit or HN?
xD
@tristan wow that's a sad person
yours?
yeah
I shared it on a facebook group
:D
I am sharing it, actually
14:41
nice :D
Haha, @poke, you're my hero:D
thank you ^^
why is that not pinned?
a few guys were arguing with me about the python version, hopefully this will end that
user559633
@BartekBanachewicz i don't think that article is sad -- i actually believe him that he dealt with a lot of passive aggressive people and charlatans
14:42
@tristan so glad I didn't do RoR
user559633
@AnttiHaapala I had to deal with it for a couple years and every time I had to step in to debug something (because it was bringing my systems down), I had to ping people to ask "wait, is this normal for you people?"
:D
some people did try to trick me into doing RoR
Learn Turing Completeness The Hard Way grumble grumble
I like Zed's impressionist work :D
I'm getting an impression, all right
14:46
I wish he'd stop programming / advocating altogether and start painting full time
no need for coffee today
user6568562
@tristan Oh I get it now. Just as he settled into Python, Community goes on and publishes 3
I'm halfway through poke's essay and my ears are already steaming
user6568562
Hard to not take it personally
I hope I never meet him. I've spent too many hours having to undo the damage he's done to impressionable python coders
14:47
@AndrasDeak IMO poke was steaming a bit too much :D
@AndrasDeak And you are reading my filtered one! Imagine reading the original text!
xD
haha:D
you're too easy on him
@poke ah you filtered it some more?
@AnttiHaapala ^^" Is it that bad? Maybe I should have read the whole article first before starting to write a response…
@AnttiHaapala I didn’t respond to every single line ;P
I didn't read the medium one, just the wiki post
14:49
no, medium and wiki is the same, except for a little fix and some note paragraph at the beginning
I should start writing too :D not to this, better not flogging a dead horse Zed...
What happened to "we are nice because matz is nice"?
Now that I essentially started my Medium career, maybe I should write more regularly about things.
poke killed it
+1
> generated from an included xslt i hacked up
You know, someone who willingly does something like that explains a lot, actually
14:50
I originally intended to start blogging years ago about stuff but because I couldn’t finish my website in time I never started..
@poke I just noticed that I did register into medium.com ~a week ago
:D
@poke exactly the same here.
:D :D
gotta go steal all those rss-reading hearts, guys
I'll consider adding your blogs to my feed:P
I could've setup a wordpress site in no time
but how could I run wordpress :D
@AnttiHaapala followed :P
@AnttiHaapala exactly.
Nobody sane wants that
@AnttiHaapala run hakyll blog
@poke I actually have old wordpress in a shell account on a shared computer...
DSM
DSM
14:53
Morning cabbage for all.
Looks like I've arrived just a moment too late to witness poke commit murder?
but it is effectively chmod go-rwx
so not viewable. but the servers have a system that scans for vulnerable software so they will mail me once a week and tell that I have wordpress in my account and it has Yet Another Vulnerability (TM).
6 hours ago, by Antti Haapala
user image
Antti predicted it
user559633
Feel free to override this concern, but I'm not in love with making responses to that inflammatory, error-laden Python 3 article personal against the author
> I’m afraid that, after just reviewing the code you’ve delivered here, I won’t be in the position to say many encouraging things about the quality of your work, not to mention your personality traits.

Lol.
@tristan that's in poke's own name :D

« first day (2230 days earlier)      last day (2943 days later) »