News for hackers. Stuff that matters.

veidelis

Re:Ask HN: What're You Reading? on Wednesday September 30, 2026 @01:16PM (#49911732)
Politics by Aristotle
Re:Don't use your phone while you poop on Saturday August 08, 2026 @10:55AM (#49222434)
I don't believe in planning when to stare at the wall. I just do it when I feel like it - whenever - sometimes family members are around. Be reasonably spontaneous - you'll calibrate on you're own. Don't be afraid. Breathe, baby!
Unfortunately the big game is opaque it's close to impossible to understand for the common folk. So many questions, so tough to grasp answers. Sickening. The enemy is hiding. One could say that paying the taxes in some form is a path toward a destruction. Phrases like "war economy" are lunatic. It all starts in your mind, and that's why it's the most important to protect your children from the propaganda. Take care!
Honestly there might be truth to it, I don't get the downvotes - why?
Re:The Birth and Death of JavaScript (2014) on Monday June 15, 2026 @01:16AM (#48536916)
I personally think null is useless. I write TS not JS btw.
Re:Organic foods are not healthier or pesticide free on Wednesday June 10, 2026 @06:19PM (#48483533)
It might be like that. Everyone should strive to make the best decisions and not go with the mainstream. Always question the mainstream, it's dangerous. Make a change for the better. Everything starts with you. Then your family, friends, neighbors... Do you have the opportunity to grow something yourself? Do that.
Re:Organic foods are not healthier or pesticide free on Wednesday June 10, 2026 @06:12PM (#48483441)
That's just one aspect of it. I don't believe one can take such argument seriously and make conclusions from it. That's just silly.

The climate scam is a different topic.

Re:Port React Compiler to Rust on Wednesday June 10, 2026 @08:38AM (#48475403)
My company tried it but reverted the changes. The biggest reasons - it's not compatible with mobx and we didn't notice any perf gains on an existing codebase.
Do you find anything "bad" about this code solving the problem?

    use std::rc::Rc;
    use std::cell::RefCell;
    
    struct Button {
        text: String,
        on_click: Option<Rc<dyn Fn()>>,
    }
    
    impl Button {
        fn new(text: &str) -> Self {
            Button { text: text.to_string(), on_click: None }
        }
        fn draw(&self) { println!("[Button: \"{}\"]", self.text); }
        fn fire_click(button: &Rc<RefCell<Button>>) {
            let cb = button.borrow().on_click.clone();
            if let Some(cb) = cb {
                cb();
            }
        }
    }
    
    fn main() {
        let button = Rc::new(RefCell::new(Button::new("Click me")));
        let cb_handle = Rc::clone(&button);
    
        button.borrow_mut().on_click = Some(Rc::new(move || {
            cb_handle.borrow_mut().text = "Clicked!".to_string();
        }));
    
        button.borrow().draw();
        Button::fire_click(&button);
        button.borrow().draw();
    }
Prints:

  [Button: "Click me"]
  [Button: "Clicked!"]
You world view is very one-sided, it borders with total naiveness.
The US also are by law not allowed to start a war without the approval of Congress, right? But they did anyway in Venezuela.
+ 3 bits for piece type?
Re:The end of the kernel Rust experiment on Wednesday December 10, 2025 @02:50PM (#46222739)
From kernel side, I meant - I wasn't clear. Now I understand what's the meaning of "don't break rust code". Happy that rust's journey in the kernel is successful so far. The pace seems strong.
Re:The end of the kernel Rust experiment on Wednesday December 10, 2025 @03:03AM (#46215286)
Is rust code part of user space?
Re:Why aren't smart people happier? on Wednesday November 05, 2025 @04:38PM (#45828390)
Totally agree. One might require to be "in their head" a lot of the time to not get swung down, and enjoy himself such as laughing at his own jokes. To make it possible, one has to be free enough to express oneself (also internally). But freedom of thought and action is on the decline as I've come to observe lately, but that's another topic.
Re:Why aren't smart people happier? on Wednesday November 05, 2025 @04:33PM (#45828339)
Yes, that's an OK take, no big deal. Also it can be added that life in itself really doesn't have a choice, on some level it just happens (thinking more about chemistry here).
Re:React Won by Default – and It's Killing Front End Innovation on Thursday September 25, 2025 @02:40PM (#45377035)
Is there a way to connect components similarly like react-redux so that they can access external state without prop drilling? Good job.
Re:The Core of Rust on Thursday August 21, 2025 @04:17PM (#44977523)
Can one do 3D in Gleam?
Re:Show HN: Draw A Fish and watch it swim with the others on Friday August 01, 2025 @11:24AM (#44758209)
Does not work for me on desktop Firefox. When I press the "make it swim!" button, there's an error in console: "Uncaught (in promise) Error: Fish model not loaded"
Re:Why Elixir? A Rebuttal to Common Misconceptions on Tuesday July 29, 2025 @02:16AM (#44719659)
For a simple dev like me, that would be learning the lang and using it for some project.
Re:Why Elixir? A Rebuttal to Common Misconceptions on Thursday July 24, 2025 @06:02AM (#44668939)
I don't find Elixir appealing for various reasons personally. But on a related note, I'm willing to bet on Gleam big time.
Can you tell more, please? I'm interested to know what did you build that had an interesting growth to you. Could you please expand on one project of yours? Thank you!
What I've had heard so far about cod's troubles in the Baltic sea is that it's not salty enough for them. For cod to reproduce, their eggs need a certain salinity so that they swim to the right depth after they are spawned.

Here's an article in Latvian news site about it - https://nra.lv/neatkariga/intervijas/481931-mencu-zveja-balt...

Re:Error handling in Rust on Tuesday July 01, 2025 @10:56AM (#44434516)
Probably yes, with From and Into traits.
Re:In React {Transitions} = F(state) on Monday April 07, 2025 @05:44PM (#43616281)
"This is the famous UI = f(state) mental model of React". Famously incorrect generalization. Why? For example, the useRef hook enables components to hold their own state. React components are not guaranteed to be pure functions. Of course, it can depend on how one writes their code, but it's not a guaranteed that UI = f(state) in React in general.
Re:Earth's inner core may have changed shape, say scientists on Monday February 10, 2025 @03:47PM (#43004950)
Sorry to tell you, but Bruce Willis has dementia.
No, not really. Some do, some don't. There are valid criticisms to dislike them. I'm on the side that thinks they are bad.
Not a crazy take.

Then try something like snabbdom or mithril.js.

That's right.

Older »