Recent submissions

Comment · 6 years ago
It's also frustrating for only looking at the last 22,000 years or so. Considering how good Randal has been at presenting much larger scales (from quarks to galaxies, the big bang until now, etc...), I think he really missed an opportunity to compare current temperature changes to those over the last 400,000 years. Visualizing multiple orders or magnitude effectively is practically his trademark, but he didn't do that here.

At the very least, it seems like cherry picking to focus on 4 degree changes in the last 22,000 years while not explaining 10 degree changes in the last 25,000. I guess 25,000 years wouldn't have fit the narrative so well.

Comment · 7 years ago
Comment · 7 years ago
Comment · 7 years ago
A few years back, I re-wired the electrics in my guitar using a semi-complicated setup of a 6 way switch for pickups in-phase or out, and parallel or series, tone and volume pots, and distortion. There was also some choice to be made about what capacitors to use, and picking a diode for passive distortion.

After a first pass trying to just wire it directly, I ended up hot gluing a tiny breadboard into the compartment. That went much better and allowed me to swap candidate parts until it was right.

Comment · 7 years ago
Here's one you can use with (pretty much) any version of C++:

    __attribute__ ((format (printf, 1, 2))) 
    static inline std::string format(const char* fmt, ...) {
        va_list args;
        va_start(args, fmt);
        size_t bytes = vsnprintf(0, 0, fmt, args);
        va_end(args);
    
        va_list again;
        va_start(again, fmt);
        std::string result(bytes, '\0');
        vsnprintf(&result[0], bytes + 1, fmt, again);
        va_end(again);
        return result;
    }
Comment · 7 years ago
> It was about this time that I realized college might not be the thing for me.

Frequently, there are higher caliber instructors in colleges than high schools. If your goal is to learn something you don't know, you may have made the wrong choice.

Comment · 7 years ago
> they rarely encounter children these days who can have a conversation.

I think public schools do a pretty good job teaching kids to not speak openly with adults.

Comment · 7 years ago
That's interesting. I didn't read the paper closely, but skipping to the pictures, it looks like ReLU, but smoothed out so the derivative is continuous. Intuitively, that seems useful.
Comment · 7 years ago
Comment · 7 years ago
Your first line of main is adding -0.0 and -0.0, which is not what I think you intended to show.
Comment · 7 years ago
> quite slow due to GIL

I don't want to defend the GIL, but that's not the reason CPython is slow. PyPy can be 100s of times faster, and it has a GIL too.

Comment · 7 years ago
I'm not the GP, but here's my take on it.

First some good: Python is amazing for how approachable it is. I've tried to teach (non-programmer, but smart) people I know other simpler programming languages, and it doesn't take. For some reason, when I show them Python it goes so much better. Despite the flaws, Guido and crew clearly got this part right. I don't think any other language makes new programmers feel comfortable so quickly.

Ok, for the bad:

Python is a very slow interpreter. If all you're doing is gluing together C/C++ libraries and invoking them from Python, it works just fine. However, my experience writing new algorithms in pure Python is that they run between 50 and 1000 times more slowly than nearly equivalent C.

Python exposed so much of its its internal implementation for making C extensions that the developers hands are practically tied when it comes to improving the implementation. If you look at the Python C API, you'll see most of the structs exposed and 100s if not 1000s of public functions. Important (and complicated) extension modules (such as Numpy) are now dependent on lots of the current implementation details. This is the reason that alternate implementations of Python (such as PyPy) can never really catch up to compatibility. Many other languages provide the same functionality for C extensions/plugins without the same exposure to all of the internals.

Python painted itself into some odd corners by not requiring variables to be declared. Most programmers are surprised by the behavior of this snippet.

    a = 0
    def doit():
        print(a)
        a = 1
    doit()
    doit()
Also, it doesn't happen a lot in my experience, but typos in variables names can be silent errors because it will just introduce a new variable. Similarly, they needed to add a "nonlocal" keyword for when you want to modify something outside your scope. Note, you don't need nonlocal to just read it though.

If there was a "var" keyword required to declare a new variable, you wouldn't need global or nonlocal, you could catch more typos in variable names, and the program above would behave correctly.

There are other issues too, but this post is getting long already, and these are the some of the big ones to me.

Comment · 7 years ago
I didn't think it worked that way. After that, can I be the Silent/Greatest Generation?

Maybe the word "Boomer" will just get redefined to mean "old people with more money than me". Kind of the same way "meme" got redefined from "idea permeating society" to "cartoon or cat picture with sarcastic text", and how "troll" got redefined from "someone who tries to antagonize" to "someone who says things I don't agree with".

Comment · 7 years ago
> Some boomer should have some “OK SLACKER” t-shirts

As part of Gen-X, I feel like that's appropriating from my culture. I was proudly on the "slackers" mailing list as an adult in the 90s when the millennials were being born. Give millennials a new pejorative, don't steal ours.

Comment · 7 years ago
Across the world, what percentage is Portland cement vs the other CO2 absorbing kind? I googled around, but couldn't find the answer.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton