HNHacker News
TopNewBestAskShowJobs

GRiMe2D

59 karma · joined April 4, 2016

submissionscomments
GRiMe2D··on Swift: When Unused Code Is a Bug
In C++ world this is expected behavior AND it's documented. But in swift, protocols cannot declare default implementations but it's possible to define implementation to protocol using extensions. So in C++, it might look like this

  struct Greeter {
    virtual void greet() {
      cout << "Hello, world!" << endl;
    }
  };
  
  struct BaseGreeter: Greeter {};
  
  struct LazyGreeter: BaseGreeter {
    void greet() override {
      cout << "sup" << endl;
    }
  };
  
  int main() {
    Greeter *greeter = new LazyGreeter();
    greeter->greet(); // In C++ prints "sup", but in Swift "Hello, World!"
    delete greeter;
    return 0;
  }
GRiMe2D··on How HTTPS Handshake Happens
Loading bunch of assets from different servers to enter a site is a very bad idea.
GRiMe2D··on How Four Native Developers Wrote an Electron App
While nodejs is fast enough, Electron and apps built on it aren't fast. Electron is a mix of Chromium and nodejs. Chromium's rendering isn't meant to be used as desktop app. Especially for laptops. I have a MacBook pro mid 2010 with two GPUs. Integrated GPU uses less battery energy than discrete one. And every Chromium app switches GPU to discrete one and causes battery drain.
GRiMe2D··on Show HN: A new way of blogging about Lua
I typed -1 in factorial demo and script ended responding :)
GRiMe2D··on What is “:-!!” in C code?
This is not related to OP's question in stackoverflow. Your function fails at runtime while running, but C code above fails while compiling
GRiMe2D··on Shadows and Blur Effects in Modern UI Design
Why button from material design rises when you press it? Can someone explain me why google decided this?
← PreviousPage 2 of 2