News for hackers. Stuff that matters.
Re:Reflex – Web apps in pure Python by ecshafer on Wednesday August 02, 2023 @01:19PM (#36973853)
My major complain here is that, as far as being a web framework there is precious little information here about the framework. How does this framework scale with multiple requests? What concurrency strategy is it using (threads, processes, actors, etc?). Is this opinionated (it doesn't seem so but it also doesn't say it isn't either). How does this work with popular libraries x,y,z. The full docs have a little bit more information, but not a ton. But mostly there are some cute toy examples and "built in python" and thats about it.

Lets compare this with for example play https://www.playframework.com/ I know from this that it built on Akka, its stateless, aims for predictable resource consumption, has non-blocking io, etc. There is a ton of really important information on what does this web framework actually do that is really important when you are making a choice of a framework.

I have no idea how good this framework is, but besides a few toy examples, I can't see anything that makes me thing "wow this is great I need to use this". Using python to generate front end attributes isn't new, most any web framework can do this also.

Re:Reflex – Web apps in pure Python by drcongo on Wednesday August 02, 2023 @01:36PM (#36974124)
But there's emojis on the readme!
Re:Reflex – Web apps in pure Python by bombolo on Wednesday August 02, 2023 @04:48PM (#36977179)
They even have that long bunch of meaningless badges to say that tests are passing or whatever!
Re:Reflex – Web apps in pure Python by apetuskey on Wednesday August 02, 2023 @05:04PM (#36977417)
We have 5 badges in total, and 1 of them to points to our integrations test passing. And the integration test do serve an important purpose in making sure we are compatible on multiple different os and don't make a change that would break WSL for example. More info here https://github.com/reflex-dev/reflex/tree/main/.github/workf...

The others are the current latest version, python version we support, how many people are on our discord (A metric to see community activity), and a badge that points to our docs. I think all of these are important but open to suggestions on ones you think would serve a better purpose.

Re:Reflex – Web apps in pure Python by bombolo on Wednesday August 02, 2023 @05:58PM (#36978251)
They serve no purpose, other than make life hard for disabled people.

I expect tests to always be passing before merging anything.

pypi metadata has the list of supported python versions, in text format

A link to your documentation? Ok but why can't it be a regular link?

I use forums or IRC, so the online users on whatever aren't super meaningful to me personally.

Re:Reflex – Web apps in pure Python by apetuskey on Wednesday August 02, 2023 @06:03PM (#36978318)
I see thanks for bringing this to my attention, I didn't know that badges caused this problem for disabled people.

We will look into this, I think the info is still important to show but there probably is a better more inclusive way of doing it.

Re:Reflex – Web apps in pure Python by zlg_codes on Wednesday August 02, 2023 @10:57PM (#36980836)
Can you be more specific in your criticism wrt disabled people? It's a lot easier for someone to receive feedback when it's specific, especially when discussing something like a README. It can be helpful to others reading who are on the fence about badges and their ilk, too.

What, specifically, is the issue with the badges concerning accessibility? Most badges I see can be reduced to a div containing two spans and some text, which should be usable with a screen reader. Is there missing alt text, aria attributes, etc?

Re: tests, it comes down to developer culture. It may be acceptable for experimental or alpha/beta versions to not pass tests, live on a separate branch, etc. Distros should be live-testing any packages they ship, too; upstream releases aren't guaranteed to be tested, depending on the upstream you're working with. It's nice to know that the latest commit is actually working without having to double check CI locally. However, tests also aren't created equally. The project author(s) could be learning how to refine their tests, and not actually trust the CI's results (yet).

Can we argue that's sloppy, or that they should've never done that before merging and pushing? Sure. Not sure where it gets us. Actionable feedback and cautionary advice is useful, though.

Re:Reflex – Web apps in pure Python by bombolo on Thursday August 03, 2023 @02:52AM (#36982270)
They can, but are they?

If a test is not working/outdated, remove or fix the test. It's not what the badge is showing anyway.

Re:Reflex – Web apps in pure Python by impulser_ on Wednesday August 02, 2023 @01:56PM (#36974444)
It's just Python code that gets translated into a NextJS app.
Re:Reflex – Web apps in pure Python by marwis on Wednesday August 02, 2023 @02:20PM (#36974768)
Where did you find this information?
Re:Reflex – Web apps in pure Python by n3storm on Wednesday August 02, 2023 @02:57PM (#36975379)
F12 o Ctrl+U on most browsers
Re:Reflex – Web apps in pure Python by marwis on Wednesday August 02, 2023 @04:09PM (#36976594)
Most browsers are mobile so that won't work :)

I was hoping there is some technical explanation how the compilation step works (especially what do they do to event handlers) but their documentation is very light on details.

Re:Reflex – Web apps in pure Python by wwtdtgotiatl on Wednesday August 02, 2023 @04:55PM (#36977273)
Firefox on android allows you to inspect source.

You need to prefix the url, ie.

    view-source:https://news.ycombinator.com/
Re:Reflex – Web apps in pure Python by ilc on Wednesday August 02, 2023 @05:45PM (#36978072)
If you actually do the demo project thing, you'll find a .web directory, with all the next-js code. :)
Re:Reflex – Web apps in pure Python by apetuskey on Wednesday August 02, 2023 @05:48PM (#36978113)
We do use nextjs but I think what's the most handy part of Reflex is the simplification of state management and event handling so there is more complexity to the framework.
Re:Reflex – Web apps in pure Python by turtlebits on Wednesday August 02, 2023 @02:39PM (#36975081)
This isn't a web framework, it's something to get you up and running ASAP. It's probably not worth it for anything other than utility/one-off, but there's nothing wrong with that.

No offense, but the play framework docs are objectively worse, it feels very "enterprisey" and too many clicks (the "Hello World Tutorial" spans 3 pages)

Re:Reflex – Web apps in pure Python by tzhenghao on Wednesday August 02, 2023 @04:32PM (#36976949)
Their github repo README has the following: > Performant ...

Do we have benchmarks for this? More generally speaking, I don't see more technical differentiation besides it being a Python DSL. Nor do they provide numbers to back it up.

Re:Reflex – Web apps in pure Python by apetuskey on Wednesday August 02, 2023 @05:00PM (#36977352)
I agree we need some benchmarks working on getting this asap.
Re:Reflex – Web apps in pure Python by robertlagrant on Wednesday August 02, 2023 @05:27PM (#36977798)
I don't really understand how "stateless" fits in here. As in it's HTTP-based? As in it doesn't need a database behind it? What does stateless mean in this case?

In general, I think the readme's not bad. I think the example is eye-catching, and I can imagine this would be really nice to make a prototype with. Whether or not it would scale well etc, yes, it would be good to have some of that detail. But I can see a really good use for it already.

Re:Reflex – Web apps in pure Python by ecshafer on Thursday August 03, 2023 @01:57PM (#36989358)
stateless in web frameworks means that requests don't alter state of the code for a user. If you look at say JSP with traditional Spring, it tracks the state of each user on the website, which page they are on, which flags they have, etc.