Hacker Newsnew | past | comments | ask | show | jobs | submit | boxed's commentslogin

It's wrong. Python3 eliminated mountains of annoying bugs that happened all over the code base because of mixing of unicode strings and byte strings. Python2 was an absolute mess.

You think so but then you write a function with a default argument pointing to some variable that is a list and now suddenly the semantics of that are... what?

you could just treat argument initialization as an executable expression which is called every time you call a function. If you have a=[], then it's a new [] every time. If a=MYLIST then it's a reference to the same MYLIST. Simple. And most sane languages do it this way, I really don't know why python has (and maintain) this quirk.

What are the semantics of the following:

    b = ComplexObject (...)
    # do things with b

    def foo (self, arg=b):
        # use b

    return foo
Should it create a copy of b every time the function is invoked? If you want that right now, you can just call b.copy (), when you always create that copy, then you can not implement the current choice.

Should the semantic of this be any different? :

    def foo (self, arg=ComplexObject (...)):
Now imagine a:

    ComplexObject = list

I wonder, why that kind of ambiguity or complexity even comes to your mind at all. Just because python is weird?

def foo(self, arg=expression):

could, and should work as if it was written like this (pseudocode)

def foo(self, arg?): if is_not_given(arg): arg=expression

if "expression" is a literal or a constructor, it'd be called right there and produce new object, if "expression" is a reference to an object in outer scope, it'd be still the same object.

it's a simple code transformation, very, very predictable behavior, and most languages with closures and default values for arguments do it this way. Except python.


What you want is for an assignment in a function definition to be a lambda.

  def foo (self, arg=lambda : expression):
Assignment of unevaluated expressions is not a thing yet in Python and would be really surprising. If you really want that, that is what you get with a lambda.

> most languages with closures and default values for arguments do it this way.

Do these also evaluate function definitions at runtime?


yes they do. check ruby for example.


I am using Claude Code with Elm, a very obscure language, and I find that it's amazing at it.

I wouldn’t call Elm obscure. It’s old, well understood, well documented, and has a useful compiler. This is nearly the perfect fit for an LLM.

I picked up a change that had broad consensus and quite a bit of excitement over even by some core devs.

That ticket now just sits there. The implementation is done, the review is done, there are no objections. But it's not merged.

I think something is deeply wrong and I have no idea what it is.


Looking at your PR, the ticket is still marked as Needs documentation: yes Patch needs improvement: yes

If this is done, you should update it so it appears in the review queue.


Aha. Damn, I always miss stuff like this in trac. I really with they'd move over to github tickets!

Have you tried pinging in the Discord about it?

I'm banned for expressing my opinion that harassing new joiners who say "hey guys" is a bad idea. They claim it's anti-women to do that, even though the dictionary clearly says it's a gender neutral expression and you can see it in countless movies being said by women to only women.

Imo it's not inclusive to harass people for using English properly. But they think it's inclusive to ban me for that opinion. To each his own I guess.


I'm sure you believe that's the reason you got banned.

I'm sure you don't believe me. To each his own. In any case I'm banned.

> It hasn't worked with nuclear waste, has it?

You mean the nuclear waste that we banned companies from using as nuclear fuel for modern reactors? I think you will find that regulation actually stopped us from solving this problem.

> It's not working for corals either.

Imagine if we had much more nuclear power so we didn't produce enormous amounts of CO2! The corals would be in a much better position.

The "environmental movement" has been an anti-nuclear power movement that doesn't care about the environment since the beginning sadly. They've managed to harm the environment more than all nuclear accidents by several orders of magnitude.


> You mean the nuclear waste that we banned companies from using as nuclear fuel for modern reactors?

There is no need to ban this because it (and reprocessing in general) is economically idiotic. It would be like saying government bans prevent companies from setting money on fire.

Dry cask storage is a quite acceptable and economical way to deal with nuclear waste. The demand that something permanent be done immediately reflects a desire to use waste as a lever against nuclear energy. Nuclear fans would do well not to fall into this trap and think immediate reprocessing is necessary or desirable.


Sure, it's fine, but we've ALSO effectively banned research into reactor types that use "nuclear waste" as fuel. In Sweden it's not even effectively, we had laws on the books until quite recently that banned nuclear research.

> effectively banned

This simply isn't true. Not as much may have been invested in said research, but that's more a reflection of the lack of a business case for such things. They are not a magical panacea to all of nuclear's woes.

Your logic reminds me of people who confuse consumer preference with boycotts.


The lack of a business case is do to the regulatory environment. The nuclear regulatory agency that was set up to license new nuclear plants just didn't. For decades they stalled all applications. That's why the industry died.

Obviously it's an S curve yes, but we are so far from living in an Ian M. Banks Culture novel that we don't have to worry for probably a million years. Anti-growth people are ideologues with bad imagination and some pseudo-religious hate of humanity driving their political trend.

I think at this point comments like this are equivalent to saying "I didn't like this article, because it's written in too good English".

I would edit sentences like this:

"Erlang is the strongest form of the isolation argument, and it deserves to be taken seriously, which is why what happens next matters."

It doesn't add much, and it has this condescending and pretentious LLM tone. For me as a reader, it distracts from an otherwise interesting article.


I don't think you can get an LLM to write that personally. I tend to write with a bit too long run on sentences like that and have to edit myself carefully to make it readable. I don't think LLMs do that.

It's like when my kids say "that's AI!" about everything now. We're overreacting and thinking everything bad about writing is because of LLMs, but in fact, I think LLMs write better than 99% of humans now. A year ago that wasn't the case, but we need to update our priors.


That what the only place that made me stumble, because “what happens next” doesn’t really make sense in that context.

But mistakes like that are what makes it human! I really don't know anymore that we can have certainty about things being AI or human.

Mistakes yes, but “this obviously makes no sense” less so.

Sorry, good English is good grammatically and structurally while being unique and feeling creative. and AI-written English is not good. It’s correct but totally repetitive, formulaic and circular. It’s like expecting a pizza and finding it’s made of cardboard.

Or maybe more like expecting Italian food and getting pizza?

I liked the content of the article enough to read it to the end, but I did have a hard time due to inflation with LLM-isms. Then again I am not a native so how would I know if this is good English? I can only tell that to me, it is hard to read despite interesting content.

It shows a lack of care for the reader. Use your own words.

Or just a lot of smaller hearts.

It's just a unique ID of a person, it's not a password. I don't see how you can be confused by this.

It's also "anyone's brokerage account holdings, addresses, phone numbers" according to the comment that this subthread of the conversation is about.

It only gives read permissions, to make any changes requires a password.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: