hermitdev

Joined 10 years ago

Karma
3,614
Submissions
1,445
Member since
Jun 13
View on Hacker News

Recent submissions

Comment · 3 days ago
In most (all?) US states, you need a license to be a _Professional_ Engineer. This is a legal distinction that carries weight _and_ legal liability. It doesn't mean that you cannot "engineer" without a license. There's legal distinctions on what work a licensed engineer can and cannot do, and what work must be done by or under the supervision of a licensed engineer. e.g. a junior's work has to be signed off by a supervising PE. To become a PE, a licensed Engineering Intern must have first passed a preliminary exam issued by the state and worked under a PE for a minimum amount of time with satisfactory performance (think apprenticeship).

It's the legal liability that SWEs don't want. e.g. You wouldn't be able to just slap "This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." on your software and walk away from it when lives are at stake. A so-called Profession Software Engineer would have to accept liability for their work product, and those of the juniors working under them.

I started down the road to becoming a Professional Engineer while I was in college as I studied Electrical Engineering and was more interested in hardware/power engineering. I took, and passed, the Engineering Intern Test in my state (which is the preliminary exam you take before you can start your journey to become a PE). Then life happened and job/career opportunities took me in a different direction/industry, and I've been doing software instead. So, I never became a licensed Professional Engineer. I'm still a licensed engineering intern, though. I'm still bound by the legal and ethical standards that it entails and could lose my license for violations.

Comment · 4 days ago
> Python is harder to JIT because of the way __dict__ works.

Heh, how about how `__class__` works? Not that I recommend actually doing this, but you can literally change the type of an already instantiated object by reassigning `__class__`:

    >>> class Dog:
    ...     def hi(self):
    ...             print("woof")
    ...
    >>> class Cat:
    ...     def hi(self):
    ...             print("meow")
    ...
    >>> dog = Dog()
    >>> dog.hi()
    woof
    >>> dog.__class__ = Cat
    >>> dog.hi()
    meow
    >>> isinstance(dog, Dog)
    False
    >>> isinstance(dog, Cat)
    True
    >>>
Comment · 11 days ago
Does Steam, itself, disclose its use of AI in a prominent manner? It's built on top of Linux, which allows AI assisted contributions.
Comment · 19 days ago
I interned at a Fortune 500 starting in 2000.

Most of my work was on an intranet page used for tracking internal servers, apps and databases. One of cool (at the time) features I implemented was a server-rendered ping of the servers shown on the dashboard. We're talking usually a few hundred at a time. The site ran on IIS & NT 4, written in VBS & ASP. (I think my first server was actually a dual Alpha chip, wasn't even x86, sure as hell was way before x64).

To implement the ping functionality (yes, we're talking just a straight ICMP ping), I ended up doing a COM server, written in C++, called into it from the VBS side. Eventually, .Net came out, and once .Net Framework 1.1 was released, I was able to convince my boss to let me rewrite the whole site in ASP.Net. I ditched the C++ COM object and was able to do it in C# with raw sockets (and appropriate permissions, which was a bit of a pain to get right at the time, before google and stackoverflow were around to help). Getting the C++ COM object working was actually easier because at least the MSDN library (the entire stack of CDs & DVDs it was on) had extensive documentation. The .Net side was good initially, but it just did not have the same depth as the C++ side already had at that point.

Comment · 19 days ago
> Track record is extremely relevant when the "argument" is mostly about judgement and subjective opinions.

Ironic given this article is from CNBC, employer of Cramer, host of "Mad Money", who has been so inconsistently wrong that his picks have literally sparked an ETF. Just search using your engine of choice "Inverse Cramer ETF".

I work in finance. Past performance is not a guarantee of future returns, but is a damn good indicator, which is why everyone always wants to see your past performance anyways.

Comment · 1 month ago
> It's not engineering if you're just guessing as to what is degrading the performance and what might improve it.

Engineering is literally the art of making educated guesses and then testing/proving/disproving/improving upon them. Nothing is exact. Everything is approximate. Iterate until the result is good enough.

Comment · 1 month ago
> The latter example, sounds like something trivially done by the compiler.

Taken by itself? Absolutely. In the middle of 50-deep templatized call stack? Maybe not. Compilers have their limitations (memory, runtime, other cost budgeting algorithms), and the more complex the code, the hard the optimizer has to work. But, yeah. Most of the gains from branchless code is going to come from this like numerical tools, vectorization and loop unrolling, things of that nature. It was an admittedly contrived example.

Comment · 1 month ago
What people refer to when they say "branchless code" is something very particular, and it refers to not triggering the CPU's branch prediction. That is, don't make the CPU have to guess which fork in the code you're going to take. This is usually accomplished in one of two ways: either bit twiddling hacks or specialized instructions that do not affect the CPU's branch prediction, such as the 'cmov' family in x86. If you search for `examples of branchless code using conditional moves` using your search engine of choice, you'll find numerous examples.

A trivial example is actually written with a branch in C/C++, but relies on compiler optimizations to kick in. If you compile a ternary operator in C/C++ (and probably rust, C# and other languages) such as in:

   int min_branchless(int a, int b) {
        return a < b ? a : b; // Often emits cmov with -O2
   }
With gcc/clang a -O2, one would expect the compiler to emit the following assembly:

    cmp edi, esi
    cmovle eax, edi   ; select a if a <= b
    ret
There's numerical tricks for other operations/comparisons, and compilers know a lot of them. But, I just suggest compiling your code and configuring your compiler to emit the generated assembly with references to the code it was generated from (you should be able to get it to emit source line references in the assembly). You'll likely be surprised at the optimizations applied at -02, and utterly confused by what you find at -03.

edit: Also, it doesn't mean to never branch, but to minimize branching, especially in tight loops. Branch outside loops, not inside, for instance.

e.g. don't do:

    for (...) {
        if (condition independent of loop variable) { 
          ...
        } else {
          ...
        }
    }
do:

    if (condition independent of loop variable) { 
        for (...) {
          ...
        }
    } else {
        for (...) {
          ...
        }
    }
Comment · 1 month ago
I don't mean to be dismissive, but isn't this old news? Hasn't it been the case that _all_ "smart" TVs have been spying on users since they came out? I've personally operated as if they are: my TV is not connected to the internet. At least, not through my internet connection. It's not on my wifi, nor is it connected to my LAN.
Comment · 9 months ago
Comment · 10 months ago
Comment · 1 year ago
Comment · 1 year ago
> This is a terrible idea.

No, it isn't. Any decent datacenter will have on-site generation in event of power grid failure, anyway. When I was an intern, the company I worked for would routinely go off grid during the summer at a call from the electric company. The electric company actually gave us significant incentives to do so, because us running on our own 12MW generator was effectively like the grid operator farming out a 12MW peaker unit.

Comment · 1 year ago
Comment · 1 year ago
I started using C# towards the end of the 1.0 beta or maybe just after RTM...I embarrassingly called it "C pound" for quite a while. Because, even as someone born and raised in the US, pretty much my only exposure to the symbol was in the context of phones. "Call me at blah, pound one-two-three" as in the extension is "#123".

Remember, it was originally release +20 years ago (goddamn, I feel old now); recorded video or even audio over the internet were much, much, MUCH rarer then, when "high-speed" speed internet for a lot of people meant a 56K modem.

Back then, most developer's first exposure to C# then was likely in either print form (books or maybe MSDN magazine).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton