News for hackers. Stuff that matters.

eiriklv

The whole post is AI-generated..?
High SHBG and lower free hormones isn't a good thing usually. Starving and anorexia (as an example) can make your SHBG levels skyrocket, resulting in low free hormone levels.
Re:I'm 60 years old. Claude Code has ignited a passion again on Saturday March 07, 2026 @10:38AM (#47288569)
Is this a bot? I feel like HN is dying (for me at least) with all the em-dashes and the "it's not just X, it's Z".
Re:Why outcome-billing makes sense for AI Agents on Wednesday December 17, 2025 @03:05PM (#46304797)
Why does it produce different ticks and em-dashes?
Re:Understanding React Compiler on Friday June 28, 2024 @01:56PM (#40823144)
I feel like redux-saga [0] also belongs on that list of algebraic effects - at least as an honorable mention.

[0]: https://redux-saga.js.org/

Re:Understanding React Compiler on Friday June 28, 2024 @01:54PM (#40823113)
In Rick voice: Well, that just sounds like generators with extra steps..
Re:Effect – Build robust apps in TypeScript on Friday June 14, 2024 @02:59PM (#40683829)
A bit on the side:

Stream processing of data is nicer using a declarative approach. Though I've found that describing control flow is often more intuitive using an imperative approach. It's a shame that redux-saga got tied to react/redux, because the idea of generators and declarative effects are universal - useful on both backend and frontend.

Re:Deep Learning in JavaScript on Friday March 29, 2024 @10:22AM (#39864447)
I feel you - Python has much better (more flexible) argument support than JavaScript in this case. Converting the entire set of arguments into a keyed object is usually what happens, but then it wouldn't look like PyTorch anymore.
Re:Deep Learning in JavaScript on Friday March 29, 2024 @10:04AM (#39864253)
Edit: Great work! I'd love to have a nice alternative to PyTorch in JavaScript :)

Edit: formatting

Making JavaScript look like Python in this case could potentially bite you in the ass.

From the example:

    const torch = require("js-pytorch");

    // Instantiate Tensors:
    x = torch.randn([8,4,5]);
    w = torch.randn([8,5,4], requires_grad = true);
    b = torch.tensor([0.2, 0.5, 0.1, 0.0], requires_grad = true);

And:

    class Transformer extends nn.Module {
      constructor(vocab_size, hidden_size, n_timesteps, n_heads, p) {
        //.....
        this.b1 = new nn.Block(hidden_size, hidden_size, n_heads, n_timesteps, dropout_p=p);

For both `requires_grad` and `dropout_p` you wouldn't be able to change the ordering + you're creating global variables.

    /**
     * All of the arguments for this function are positional
     * and cannot be provided in a different order than defined
     */
    function performOperation(values, arg1 = false, arg2 = -1) {
        //....
    }

    /**
     * This works, but only because of the order
     */
    const result = performOperation([1, 2, 3], arg1 = true, arg2 = 10);

    /**
     * This does not work
     */
    const result = performOperation([1, 2, 3], arg2 = 10, arg1 = true);

    /**
     \* What is actually happening
     \*/
    arg1 = true; // global variable
    arg2 = 10;   // global variable

    const result = performOperation([1, 2, 3], 10, true);
Re:Samsung bets on MicroLED and 8K for its premium 2023 TVs on Thursday January 05, 2023 @07:33AM (#34258823)
It also helps to use the default resolution to avoid supersampling/anti-aliasing effects.
Re:Samsung bets on MicroLED and 8K for its premium 2023 TVs on Thursday January 05, 2023 @07:25AM (#34258755)
I had the exact same issue and spent a lot of time figuring out why this was a problem for me, as I would alter between my old 15 inch and new 16 inch and feel the difference each time.

Long story short, I found a solution that removed all my issues;

- Use the accessibility «contrast» feature set to level 2

- Use an app[0] that applies a gamme filter to adjust the white level down to account for the contrast increase

- (optional) use an srgb color profile that disables temporal dithering of colors

This reduces you max brightness level to the same amount as the old 15 inch (I don’t need the extra brightness) but allowes you to keep the backlight at max output, minimizing the pvm strobing effect[0] that some people seem to be sensitive to.

[0] https://michelf.ca/projects/gamma-control/

[1] https://osxdaily.com/2021/05/14/workaround-pwm-oled-iphone-i...

Re:Software Library: MS-DOS Games on Friday June 03, 2022 @05:54PM (#31614167)
CRT monitors made things look so much more vivid than on LCD. So when you look at old games today and think «Did it really look this bad and pixelated?», the answer is actually «no».

Ref: https://www.reddit.com/r/gaming/comments/anwgxf/here_is_an_e...

Edit: typo

Re:The reMarkable as a notebook and eBook reader on Monday November 22, 2021 @08:25AM (#29306060)
Another lefty here - same issue. Did the pre-order long ago. I’m back to pen and paper as I could not tolerate it. It would be great if it was possible to calibrate it somehow, by hack or not. I’ve kept it in case such a solution surfaces.
Re:Open Insulin Foundation on Friday July 16, 2021 @08:36AM (#27855597)
How much of the insulin is used for type 1 vs type 2?
Re:Diablo II: Resurrected on Saturday February 20, 2021 @05:03AM (#26203041)
That might not all be attributed to nostalgia. CRT displays actually make things look more hi-res and «depthy» [0]. We’ve barely caught up with 4/8K and OLED. This is why CRTs are so popular for retro gaming. Some effects aren’t even possible to display correctly on a non-CRT (without shaders at least) [1].

[0] - https://www.reddit.com/r/interestingasfuck/comments/9xg8w3/t...

[1] - https://mobile.twitter.com/gamesnosh/status/1232731118354550...

Re:React is becoming a black box on Thursday September 03, 2020 @09:15AM (#24363705)
Hooks are both a blessing and a curse.

The most telling difference after starting to use hooks when working with both junior developers and more seasoned ones is that code that seemingly (and intuitively) behaves in one way actually does something slightly different, or worst case - something entirely different. Most often the culprit is a combination of the hooks themselves, the rules and the more general issue of the dependency array and lack of built-in immutability in the language.

This happened before hooks as well, but the class syntax and lifecycle methods felt like a thinner layer on top of JavaScript. Hooks is a much more proprietary concept that tries to solve a much wider problem - having stateful functions, except they make no sense outside the realm of react as they exist right now. Maybe some form of implementation using generators would bring it closer to the language, but that would most likely introduce it’s own set of challenges.

Don’t get me wrong - I enjoy working with hooks, but it just doesn’t feel quite right that they are so tied to some «magical» implementation that requires a large set of rules to behave as expected. It helps to look into the implementation, and especially to reimplement a simple version of react with hooks yourself - but that’s just not a realistic option for many.

Kudos to all the innovation coming from the React team and community though - I’m sure they think about this stuff all the time.

Re:The 2020 MacBook Air on Friday March 20, 2020 @04:17PM (#22641223)
Are you sure it’s 16GB RAM? I maxed out mine and only have 8GB.
Re:Ask HN: How to become confident and take risks? on Sunday April 14, 2019 @12:13PM (#19660209)
Hit the gym. Increase Testosterone/DHT.
If you don’t feel anything - are you really living? Look up emotional bluntness and anhedonia.
Lifting weight increases androgens (testosterone/dht) which seem to have very positive effects when it comes to alleviating depressive symptoms.

[1] - https://jamanetwork.com/journals/jamapsychiatry/article-abst...

That should not necessarily be attributed to increasing serotonin though. Sunlight increases a lot of things - endorphins, hormones, nitric oxide, etc.
So many people (including doctors) seem to be set on the idea that serotonin makes you happy and therefore is the solution to depression. This is only half true, and not in the way that most think. Serotonin (if high) makes you numb [1]. But that might be the lesser of two evils when it comes to depression [2], which is why it’s become popular as a mechanism to treat it. It not a solution, it’s just masking the underlying problem by replacing one set of symptoms with another.

[1] - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2989833/

[2] - https://www.health.harvard.edu/depression/is-your-antidepres...

I am the same. It seems like when your body doesn't have to spend energy/overhead on keeping your temperature up it can make it all available to your brain.
Re:On managing outrage in Silicon Valley on Monday August 07, 2017 @01:52PM (#14949538)
Just popped into my mind as I recently saw a documentary about him.
Re:‘This’ in JavaScript on Thursday August 03, 2017 @11:46AM (#14920557)
As nhpatt notes you're not actually calling obj.method here, you're passing it as an argument, which will be called at a later time.

Looking at a possible implementation of setTimeout makes it clearer:

  function setTimeout(func, delay) {
    // wait for the delay to complete..
    func();
  }
Here you can see that when the function is called there's nothing to the left of it.
Re:‘This’ in JavaScript on Thursday August 03, 2017 @08:40AM (#14918995)
Simple(r) explanation; this is whatever is "left" of the function call (i.e - obj.method() => this === obj inside the called method), unless you've used .bind/call/apply which explicitly sets what this should be via an argument.

If you're doing a direct function call like myFunc() there is nothing "left" of the function call. But you might think of it as actually doing window.myFunc(), which again explains why this === window. In strict mode this behavior has been "fixed" so that this === undefined.

It's all about how a function is called.

Re:Ask HN: Do you use a UI layout constraint solver? on Friday May 19, 2017 @06:20PM (#14379763)
Flexbox isn't that bad actually. Miles ahead of floats at least.
I do this semi-regularly both on smaller scale (1on1) and larger scale (teams), mostly focused on JavaScript and modern web architecture (from idea to mvp usually). It can be a very rewarding process for both parties.

Booked until July though..

Older »