HN user

CmdrKrool

567 karma
Posts4
Comments133
View on HN

I'm confused by this:

  String operations in Python are fast as well. f-strings are the fastest formatting style, while even the slowest style is still measured in just nano-seconds.
  
  Concatenation (+)   39.1 ns (25.6M ops/sec)
  f-string            64.9 ns (15.4M ops/sec)
It says f-strings are fastest but the numbers show concatenation taking less time? I thought it might be a typo but the bars on the graph reflect this too?

In the case of multiple base classes wouldn't it be more sensible for the derived class to forego the lexical convenience of super() and simply call each base explicitly? i.e.

        BaseEstimator.__init__(self, **kwargs)
        ServingMixin.__init__(self, **kwargs)
If one wants to inherit from multiple classes then they should be responsible for specifying the details of how that happens. Why should a base class be expected to add boilerplate just in case some external consumer comes along and wants to use it in some unforeseeable context?

That super() has a "method resolution order" seems like a fudge. Now 'super' doesn't necessarily mean 'superclass' anymore at the point of use. Am I missing some other hypothetical situation in which super()'s MRO brings more value for the price of having to know about this extra, implicit behaviour?

And what's funny is that in the example given, the first base class not calling super() leads to the bad consequence that the other base class doesn't get to set some internal state (self.mode). Yet in the next section, "When to use a Mixin", it advises: "A mixin is a class that [...] does not contain state"

Interesting. I loved Flow and I'm glad the stars aligned for it on this particular occasion. This article [1] lists a bunch of other Oscar-related firsts:

* Gints Zilbalodis, who is 30 years old, is the youngest director to win the Oscar for best animated feature.

* Flow is the first fully-European produced and funded film to win the feture animation Oscar.

* Flow is the first dialogue-less film to win the feature animation Oscar.

* Flow, made for under $4 million, is by far the lowest-budget film to ever win the category.

It also says the winner of the animated short category, In the Shadow of the Cypress, was unexpected since the Iranian filmmakers couldn't do any of the usual in-person campaigning of Academy voters due to visa problems.

[1] https://www.cartoonbrew.com/awards/underdogs-win-latvias-flo...

This inspires me as a programmer and delights me as a player. Surprising variety in the stages and lovely precise feel to the car handling. 3 or 4 goes before I started to beat it, first with keyboard then with a pad. Fired up some smooth techno to accompany me in the background :)

Could do with 3 more stages ;P

One Minute Park 2 years ago

Lovely. Unexpectedly I feel more immersed with the sound off. When it's on it's like I'm watching just another video on the Internet, and the wind blusters through the mic in a way that sounds different to actually being there; whereas when it's off the unnaturally complete peacefulness meshes with the sound of my actual surroundings and the images seem to pop more.

Intriguing and fun. I haven't played it enough to confidently suggest changes to the game mechanics, but I think they're strong enough on their own that any/all added UI comfort would be welcome - like others have been saying, a less clunky dictionary (maybe right-click on a word on the board to look it up?), and maybe a preview of whether your attack is going to succeed or not (maybe just on 'easier' levels, since there is an element of not making a 'simple' miscalculation while you overthink a complex board position, like in Chess. Also, think of a game like Puzzle Bobble / Bust-a-Move where the first few levels give you a line showing you exactly where your bubble is going to land).

CSS Is Logical 2 years ago

CSS is 'logical' in the same way that a pseudorandom number generator is 'predictable'.

In the dev tools settings there is a checkbox "Disable HTTP Cache (when toolbox is open)" which name seems to imply that this only applies to the resources that make up the page, not to DNS lookups (about:config name is devtools.cache.disabled, and it defaults to false).

I investigated and found that Firefox's in-memory DNS cache can be manually cleared by clicking a button in about:networking. To be fair Chrome also has a similar cache and method for clearing it. See: https://www.makeuseof.com/chrome-edge-firefox-safari-opera-b...

It might be good if keyboards were more symmetrical in general. Perhaps the Enter key could be in the middle, below the space bar, instead of on the right which might come from a vestigial bias towards left-to-right languages.

This is the closest thing I found just now by googling, though by similarly 'directional' reasoning I think Del and Backspace don't belong in the central column and should be on opposite sides: https://www.keyboardco.com/keyboard/truly-ergonomic-227-mech...

Yes me too, and it confused me. Does that mean I got all the possible words? I got around sixteen IIRC, but feel like there might be more? I don't know, but that screen is a dead end which doesn't either make that clear or let me go back.

And BTW I'm using Chrome with uBlock Origin enabled here.

This looks very like a problem I encountered some time ago running the closed source 3DO emulator "Phoenix Project", and similarly the open source "FreeDO" project that it was forked from. I narrowed it down (also using strace, IIRC) to these programs repeatedly opening and closing the /dev/input/event* files, and that being weirdly slow. I made a seperate little test program just to open and close those files to confirm it. It was only slow on my main desktop machine; while on my lesser-powered laptop, running a practically identical Arch Linux setup, those file operations were quick and the programs ran fine. None of these programs use SDL. I couldn't/didn't progress any further then, but it's good to find some pointers here for further investigation (ie. the libinput issue).

Funnily enough I'm pretty sure I played Papers Please on this machine at length without problems but I think that was probably the Windows version through Wine.

All Atari Games 5 years ago

E.T. is in the "VIEW ALL" list but it doesn't seem to show under "E", for some reason.

It's desperately out of fashion now, but remember having one's toolbar in the mode of "icons and text"? Giving you both the buttons, and a little label under each like "New", "Open", "Save", etc. Why not just have that in this case, ie. a little "URL" label under the address bar and a "Search" label under the other one. Even if a phrase like "URL" is jargon to a newbie, once they've seen it up there for long enough in context with actual URLs they'll pick up a feel for it. That's how straightforward user education used to work. We all had to be shown and told, that this thing is called this, and that thing is called that, at some point. Finally when these aids are no longer needed, and one cares to shave a few pixels off their toolbar, they just right-click -> "Show icons only", and carry on in new-found independence and style. How did this simple sequence of learning get so deprecated.

That's because MAME is distributed as a single executable which combines support for all the machines it emulates. If there was a mega 'multiple arcade machine FPGA core' that supported thousands of machines in one then you would need to do the same kind of installation management as different parts of that codebase matured. But when using FPGAs you normally have a seperate core for every machine being simulated. By the emulation analogy, you're actually switching between many different 'MAME versions', or single-game emulators when you switch between games on your FPGA.