Live data from Hacker News

Rio: Web apps in pure Python

github.com

191–200 of 205 posts

Re: Rio: Web apps in pure Python

#194
post #128

Earlier quoted context omitted.

react license applies then to products made with this stack? i.e. no product that meta thinks of as a competitor is allowed?

React is fully OSS as far as I know: https://github.com/facebook/react/blob/main/LICENSE I think the term you mentioned was there at the start but has since been removed and React is licensed pure MIT since 2017.

React used to be licensed as BSD + recovable patents: https://engineering.fb.com/2017/08/18/open-source/explaining...

Re: Rio: Web apps in pure Python

#199

Earlier quoted context omitted.

I feel like there is something missing here. What's stopping you from using a normal def? Aside from the definition itself not being usable inline, there is nothing lambda does that def doesn't. And if you really want a definition close to the calling site, just define it there and then put the name where you want to pass it. At the end of the day though there's really nothing to prevent you from creating janky code.…

> Aside from the definition itself not being usable inline, there is nothing lambda does that def doesn't Being unable to position it inline is the problem. You might not see the benefit, but many do. It prevents Python from being a good functional programming, for one thing.

There's 0 problem with doing:

    def outer(a):
        def inner(b):
            return a * b
        return inner
Though slightly longer, for most developers, it's still more grokkable (and related stack traces better) than:

    def outer(a):
        return lambda b: a * b
A very large part of Python's design is to emphasize readability for the majority. I still remember how long it took me to wrap my head around this "lambda thing" that I'd see pop up ever so often, even after a couple years of using Python. I eventually got fed up and took some time to really get to understand it. This shouldn't have to be the case for everyone reading random code.

Python is a primarily OOP-based language with functional aspects. And the design decisions that went into it are what makes it so popular today. It's not Haskell or Lisp or any of the other many that the majority avoid due to language complexity. Don't try to make it into one.

Re: Rio: Web apps in pure Python

#200

Earlier quoted context omitted.

There may be a few restrictions due to complexity, but lambdas isn't one. This is about decent and sane design choice[0] for readability. [0] https://www.artima.com/weblogs/viewpost.jsp?thread=147358

From the blog post you linked: "But the complexity of any proposed solution for this puzzle is immense, to me: it requires the parser (or more precisely, the lexer) to be able to switch back and forth between indent-sensitive and indent-insensitive modes, keeping a stack of previous modes and indentation level." He's saying exactly what I said: that parsing (or more precisely lexing) makes the problem complex, becaus…

You see it as a rationalization, while I see it as good sense. After all he also mentioned the "puzzles solvers" who solved the "puzzle", and some would likely have happily provided an implementation if he had given the go-ahead. But he outright refused specifically because "... a user interface can handle only so much complexity or it becomes unusable". You don't need to try putting words in his mouth after he specifically stated that maintaining a simple user interface is higher priority.

And the really ironic thing is that we wouldn't even be having this discussion now if not for this focus, because Python wouldn't have gained such popularity to the point it's also attracting more folk who would destroy what makes it so popular in the first place.

Post reply on HN