HNHacker News
TopNewBestAskShowJobs

FreeHugs

985 karma · joined August 26, 2015

submissionscomments
FreeHugs··on Inline CSS works better in a component world
I don't think that is the type of "component" the author means when he writes about a "component world". He constantly talks about his argument applies to "modern web apps".

I don't have the feeling that what he really means with "Inline CSS works better in a component world" is "Inline CSS is the better choice since the 90s".

FreeHugs··on Inline CSS works better in a component world

    This definitely leads me to believe that
    you don't have much experience with modern
    web frameworks
Here we go again. It would have suited the discussion even better if you said "it is definitely self evident".
FreeHugs··on Inline CSS works better in a component world
I think we should spend a minute on what is meant with "components" in the article.

Would you say that this very site - Hacker News - is using this type of "components"?

FreeHugs··on Inline CSS works better in a component world

    Every CSS rule is effectively in global scope.
We had this problem in programming forever. These days, you can put your function in a class in a namespace ... still the namespace sits in global scope. But we never came to the conclusion that we should make all code inline to solve it. Fortunately.

So if you make a CSS rule to make links in your userlist red:

    .gizmosUserlist .name a { color: red }
Then yes, it will apply to other .gizmosUserlist instances.

Shadow DOM is a way to prevent it if you want.

Personally, I think it is a good thing, that you can make all links in all gizmosUserlists red if you like and can target a specific one with a more specific selector if you like.

FreeHugs··on Inline CSS works better in a component world

    In modern web applications, it's
    pretty self evident that components
    are the right solution
I often see this argument of "self evidence" made by developers who claim that some modern "best practice" approach is the right one.

In my experience it is an indication that the proclaimed "better" approach is actually inferior. And the author had to resort to the argument of "obvious self evidence" because there are no better arguments around.

I think it is driven by what I call "tool religion". Developers who invested significant amount of time into learning a tool become religiously attached to it. Because they now want to be an "expert" of the "best way". Not just "Some guy with a preference".

FreeHugs··on Django 3.1
It was pseudocode.

If a function like this exists, it would just sleep until the given promises are resolved. I don't see how that is realted to the term "multiprocess".

FreeHugs··on Django 3.1
Why would Django not be able to process other requests while one process is waiting for IO?

I don't know much about Python, but in a typical PHP/Apache setup, Apache simply starts as many processes as needed to answer all requests.

FreeHugs··on Django 3.1
waitUntilResolved() would wait until the promises are resolved and of course let other code execute meanwhile.
FreeHugs··on Django 3.1
I don't know much about Python's async tools, but why couldn't that be done in a non-async view?

In pseudo code I would think it would look like this:

    def my_view(request):
        name = async_get_name() // returns a promise
        city = async_get_city() // returns a promise
        waitUntilResolved(name,city)
        return HttpResponse('Hello '+name+' from '+city)
FreeHugs··on Django 3.1
What would be a typical use case for "Asynchronous views"?
FreeHugs··on The stock market and economy have parted ways

    Historically, the PE for the entire
    U.S. stock market is about 15. But
    today’s market PE of roughly 23 is
    about 50 percent higher than the
    historic average
Every time I see statements about the PE of the market, I wonder which PE they mean?

The price of the companies divided by their past revenue? If so, which past? Last month, last quarter, last year?

The price of the company divided by future revenue? Then future revenue guessed by whom and for which time frame?

FreeHugs··on “Let’s use Kubernetes.” Now you have eight problems
For the load balancer solution, a lot more is needed then to just rent a load balancer.

Example: What do you expect to happen when the server with your DB goes down? Just send the next UPDATE/INSERT/DELETE to DBserver2? Which is replicated from the DBserver1? When DBserver1 comes back, how does it know that it now is outdated and has to sync from DBserver2? How does the load balancer know if DBserver1 is synced again and ready to take requests?

Even if you set up all moving parts of your system in a way that handles random machine outtages: Now the load balancer is your single point of failure. What do you do if it goes down?

FreeHugs··on “Let’s use Kubernetes.” Now you have eight problems

    What happens when the IP address changes?
Changes how? It's not as if the IP of a server magically changes out of the blue.

    Why re-invent DNS?
There is no reason to re-invent DNS. Each docker container will have to have the info where the other containers are. So you could write that into /etc/hosts of the containers for example.

    Also, how do you protect these services
    from unauthorized access?
You need to do this no matter if you use Kubernetes or your own config scripts.
FreeHugs··on “Let’s use Kubernetes.” Now you have eight problems

    If you have microservices then you need
    a way for services to discover each other
Why not run them in docker containers with fixed IPs?
FreeHugs··on “Let’s use Kubernetes.” Now you have eight problems
If your physical hyp dies, how do you redirect your traffic to a different one?
FreeHugs··on “Let’s use Kubernetes.” Now you have eight problems
A typical PHP application that does a bit of database updating per request, gets some new data from the DB and templates it should handle 20 requests per second on a single $20/month VM. And in my experience from the last years, VMs have uptime >99.99% these days.

What made you settle on a multi-machine setup instead? Was it to reach higher uptime or were you processing very heavy computations per request?

FreeHugs··on Show HN: Covid-9 Growth Charts by Country and Region
Wow, this is super informative. How often is the data updated?

Is this the only site of this kind? If so, how can this only have 3 upvotes?

FreeHugs··on Moznet IRC is dead; long live Mozilla Matrix
I did so. Followed the steps to provide an email and then click the link in the email.

That brought me to this page:

https://mozilla.modular.im/_matrix/saml2/authn_response

Which only displayed the word

    Forbidden
FreeHugs··on Moznet IRC is dead; long live Mozilla Matrix
So how do you sign in / sign up without installing additional software on your machine?
FreeHugs··on Show HN: A React Component to Compare Two Images
Might be useful. But it could be just a single javascript file with 50 lines or so.

No need to tie it to react.

FreeHugs··on [dead]
Flagged because sign-up pages are not Show HNs:

https://news.ycombinator.com/showhn.html

FreeHugs··on Consciousness Isn’t Self-Centered
1000 and 2000 are big numbers. 10 and 20 are not.

One can have a legitimate debate about 48, 70 and 99 being big numbers. But not 30, 28 or 19.

FreeHugs··on Consciousness Isn’t Self-Centered
That might be your definition of conciousness. That a system has to match input to something it holds in ram to be conscious. But I don't think it is shared by many.

Is a computer running voice recognicion software a conscious being in your book?

FreeHugs··on Consciousness Isn’t Self-Centered

    to perceive something you have to
    have a representation of it in memory
Why? I cannot think of a definition of "perceive" that would lead to this conclusion.
FreeHugs··on Japan's PM to ask all schools to temporarily close
Maybe. But does that answer my question?

If you touch the soap and the tap, that will surely transfer germs to your hands that the person before you left there?

FreeHugs··on Japan's PM to ask all schools to temporarily close
Is using the tap and soap of a public bathroom really reducing the chances of virus/bacteria infection? Or is it increasing them because the soap and tap carry viruses and bacteria themselfes?
FreeHugs··on Show HN: (crocs) Python2Regex and Yacc-like. Parsing with no steroids in Python
What do those 40 empty lines in setup.py do?
FreeHugs··on Show HN: A truly open source modern headless CMS
I looked at 3 of the source files and all start with an empty line. Example:

https://github.com/internalfx/pageflo/blob/master/system/ser...

Is there a reason for this?

FreeHugs··on Show HN: Web-based Babel alternative for React/JSX (ultra-fast and tiny 5.1 kB)
No.

So React itself brings no function to transform JSX into javascript clientside?

FreeHugs··on Show HN: Runnaroo – A new web search engine
I like the design. I wonder if I would prefer it over Googles design in the long run. My first impression is that I prefer the clean design of Runnaroo. Not sure if I would miss all the stuff that Google throws into it, like images, places etc.
← PreviousPage 3 of 6Next →