HNHacker News
TopNewBestAskShowJobs

kahlonel

482 karma · joined January 11, 2017

Embedded Software Architect
submissionscomments
kahlonel··on Go hits the concurrency nail on the head
Apparently there is a C library for green (Go-like) threads called "libdill" or "libmill".
kahlonel··on Kubernetes on Bare Metal
Slightly off topic, but I feel like calling an internet server running an OS "bare-metal" is a disgrace to what "bare-metal" originally and historically referred to, i.e. computer hardware without any OS. Maybe IaaS providers are running out of creative names that they are now polluting other techs' namespace?
kahlonel··on C is the desert island language
I find it ironic that the "system" that you're writing Rust code for is entirely built in C :)
kahlonel··on Should you learn C to “learn how the computer works”?
Depends on what do you mean by "work" here, which is a very vague term. One can argue that assembly doesn't teach you how computers work either because it "abstracts away" how transistors do their job. The point is: Depending on how deep you want to go in your understanding of the underlying system, there is always a level of abstraction that you have to settle on before building your knowledge on top of it.

Turns out that using C as the programming language for your project puts you at a very balanced spot in the abstraction hierarchy, where you don't have to learn processor specific instructions (well, not all of them) while requiring you to fully understand the "programmer's model" of the target processor. Keep in mind that learning C syntax alone doesn't do jack shit. You HAVE to be able to make full use of the tooling that a C toolchain provides. That means you need to learn things like memory layout (linker scripts, injecting code at a particular memory address / ISRs / faults and handlers), boot process (startup scripts, stack setup / data-segment initialization), kernel/user-mode and what not. So yeah, C is THE best language to learn your target system because of the level of optimization of the abstraction of the hardware that it provides you. Your code may be getting translated from a standard C architecture to the specific machine architecture; nobody's stopping you from learning how that process takes place. You could choose to learn the exact process, which C provides you complete tools for, or you could choose to ignore that process and let your compiler do its job. The beauty lies in the many possible levels of control.

kahlonel··on iOS 12, reviewed
I went from 10.3.3 to 12 directly. There doesn't seem to be any performance degradation.
kahlonel··on Git 2.19.0 released
As a developer who often needs to revert other developers' screwups (and sometimes my own): "git show COMMIT_ID -- somefile | git apply -R"
kahlonel··on Preventing Muscle Loss as We Age
Been using it for 3 months only. It is a great routine; quick and effective.
kahlonel··on OpenAI bots competing against Humans right now
They overextended in the enemy safelane. Maybe killing the enemy carry is #1 on their priority list :D
kahlonel··on Show HN: PJON v11.1 an independent, decentralized, open-source protocol
I understood what the project is about as soon as I looked at the first para of README. I guess it takes some patience and some topic related knowledge to get the most of READMEs. You can't really expect the software authors to explain everything in a README, like their audience are 12 year olds.
kahlonel··on Ask HN: How old are you (optional) and what was the last thing that you learned?
30 - How to cook a perfect steak at home
kahlonel··on Conflating pointers with arrays: C's biggest mistake? (2009)
That, or declare them as packed.
kahlonel··on Conflating pointers with arrays: C's biggest mistake? (2009)
I don't think there is any UB case that applies to the given snippet, or am I missing something? Treating unpacked structs as byte buffers is asking for trouble.
kahlonel··on Conflating pointers with arrays: C's biggest mistake? (2009)
Its actually quite common for C programmers to create their own array type that knows its length, and use it in their projects. See this for example: https://github.com/antirez/sds
kahlonel··on Suspend for the X1 Carbon 2018 on Linux
Can you please tell me what the battery life is on Ubuntu (with ACPI patch) vs Windows (with or without ACPI patch)?
kahlonel··on Ask HN: What has the past 12 months taught you?
Not eating healthy, and not doing enough exercise seriously messes up the brain functionality. It isn't apparent if you're young, but it keeps adding up until it explodes.
kahlonel··on Ask HN: How did you transition from Mac to Linux?
Did you apply the "non-official" patch for the deep-sleep? How well does it work? I'm actually waiting on Lenovo to release an official patch for it before buying this machine.
kahlonel··on Apple faces class action lawsuit over failing MacBook butterfly keyboards
whoeversaysmacbookkeyboarddoesn'tworkisclearlylying /s
kahlonel··on A look at terminal emulators, part 2
I just tried it, ran `time cat bigassfile.txt` test. How come it is slower after I enabled this? I have a mid-2013 MBA.
kahlonel··on Ask HN: Is there a bug in the universe which allows pain and suffering?
Think of universe as a reinforcement learning system. A system where its creatures are subject to a cost-function, the output of which is pain and suffering. You'll see how important it is for this world to evolve.
kahlonel··on Don’t buy the MacBook Pros even on sale, in my opinion
That's depressing.
kahlonel··on Don’t buy the MacBook Pros even on sale, in my opinion
Would love to hear it. I'm mainly concerned about the trackpad, wifi performance and power consumption.
kahlonel··on Don’t buy the MacBook Pros even on sale, in my opinion
I'm honestly thinking of switching to Thinkpad X1 Carbon now, but I HATE windows. And from what I've heard, Linux doesn't bode well with it. Anybody here Linux running on X1 Carbon?
kahlonel··on Blind since birth, writing code at Amazon since 2013
As a guy who writes code for a living, one of my biggest fears is losing eyesight. Looking at this guy, I fear a little less now :) There is definitely a need for the tech to evolve for blind programmers.
kahlonel··on Mark Zuckerberg testifies before Congress
I'm not from US, can someone explain how bad it is if anything that Zuckerberg said during the whole session proves to be false/lie/wrong later on? Is it considered perjury, or is perjury only specific for courts/legal matters?
kahlonel··on Show HN: Six Degrees of Wikipedia
This was fun. It somehow connected towels and croissants.
kahlonel··on Fedora KDE
I really wish there was an easy way to change terminal line spacing in ANY of these distros.
kahlonel··on The cost of forsaking C
I partly agree with you. But its a fact that you can't just start learning assembly if you have never learned C in the first place. So, young devs, please start learning C first.
kahlonel··on Upwork banned my account for 'being dishonest'
Actually OP IS a customer. Upwork gets 20% out of his pay for being a glorified invoice generator.
kahlonel··on Fizz Buzz in Tensorflow (2016)
Here is a C version of fizzbuzz if anyone has an interview tomorrow:

  #include <stdio.h>
  int main(void)
    {
      int i = 0;
      for(i=1; i<=100; i++)
      {
        unsigned int f = 0;
        if(i % 3 == 0)
        {
          f = 1;
        }
        if(i % 5 == 0)
        {
          f |= 2;
        }
        if(f == 0)
        {
         printf("%d\n",i);
        }
        else if(f == 1)
        {
          puts("fizz");
        }
        else if(f == 2)
        {
          puts("buzz");
        }
        else if(f == 3)
        {
          puts("fizzbuzz");
        }
      }
      return 0;
  }
kahlonel··on An update on Redis Streams development
How can you compare a programming language and a memory store? How are they even remotely comparable? Redis needs a syntax to exchange data with clients in a human-readable way.

Honest question: Why do you hate Redis?

← PreviousPage 5 of 7Next →