News for hackers. Stuff that matters.

Freegile

Re:Ask HN: What should I learn and write about next? on Monday December 02, 2019 @08:56AM (#21682282)
How to lean down your stack so it will survive longer.

That is what I am interested in most. A pure html/css/js stack will probably last 10x longer then the typical stack developers use these days.

So if you are similarely productive with a pure stack, you are 10x more productive in the long run. As for the same work you get 10x more time of running software.

If you are 2x slower with a pure stack, you are still 5x more productive in the long run.

I find the question very interesting, where the optimum is.

Just pure html/css/js? html/css/js + a frontend template engine like handlebars? A framework like Vue that you include in the frontend? Or a heavy version of it that also requires something on the backend? Should there be a build process or not?

Re:PHP 7.4 on Thursday November 28, 2019 @10:30AM (#21657955)
But does it have to be =>? How about ~>?

    $a=[$x ~> $x*2, $x ~> $x*$x];
    $a[1](5); // 25
Looks cool to me.
Re:PHP 7.4 on Thursday November 28, 2019 @10:07AM (#21657812)
I wonder why they added the "fn()" thing on the left of the array functions.

    Javascript: $square = $x => $x*$x;
    PHP       : $square = fn($x) => $x*$x;
Probably so that it works inside arrays:

    $a=[fn($x)=>$x*2,fn($x)=>$x*$x];
    echo $a[1](5); // 25
Well, it also makes it a tad more readable, so I am ok with it.

Since we are talking about new features of PHP: Does anybody else wish there were named parameters?

I think PHP is pretty complete. It is my favorite language and I don't really wish for anything added to it. Except for two things:

1: The named parameters of Python:

    def paint(what,color='blue',tool='pen',layers=1)
        ...
    
    paint('house',tool='brush')
2: The short object Syntax of Javascript:

    city={name: 'Berlin', population: 3748000}
Sorry, but none of these are studies about the relationship between depression and inflammation treatment.

Such a study would have to provide a measurement of the severity of the depression. Then split the patients in two groups. Give one group a placebo and the other one the inflammation treatment. And then compare the depression severity in those groups after the treatment.

Hmm.. that seems like a journalistic article that one would have to pay $41.95 for to read it?

I would be more interested in a study. With clearly outlined methology.

    "clinical depression" vs. the run of the
    mill use of "depression"
This is exactly what I am interested in. If it is a qualitative difference or a quantitative.

If qualitative, it would be like a broken leg.

If quantitative it would be like high blood pressure.

I would be very interested if there is any research out there on this topic.

    Depression has plenty of evidence
    linking it to inflammation
That would be interesting. What makes you think so? Any studies you can link to?
What cures it?
So has it been studied? Are there popular theories on what the mechanics behind depression are? I would be curious to know these.

Both, headaches and depression to me seem to have been "intentionally" developed by evolution. Pain has a reason: Tell you to not do certain things. Low energy / self esteem might also have a reason: Tell you to stay at home.

A broken leg on the other hand was not developed for a reason by evolution.

I often wonder if Depression really is a "disorder" that you either have or don't have. And that can be "cured".

Unlike having a broken leg or having the flu, depression seems to be something everybody has to a certain degree.

Is there any research on this available?