HNHacker News
TopNewBestAskShowJobs

CmdrKrool

567 karma · joined August 22, 2011

submissionscomments
CmdrKrool··on Python numbers every programmer should know
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?
CmdrKrool··on Uncommon Uses of Python in Commonly Used Libraries (2022)
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"

CmdrKrool··on Blender-made movie Flow takes Oscar
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...

CmdrKrool··on I deleted my social media accounts
'n' -> [chrome or firefox autocomplete] -> news.ycombinator.com I have often been thinking about what this reflex does to my mind.
CmdrKrool··on Defender Sound Studio
Yes, exactly that. Search for "function applyDecay" here: https://www.zapspace.net/defender_sound/defender.js

(It right-shifts by 4 instead of 2.)

CmdrKrool··on Dr1v3n Wild, A 13 kilobyte driving game inspired by OutRun
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

CmdrKrool··on One Minute Park
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.
CmdrKrool··on Show HN: Truncate, a word-based strategy game
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).
CmdrKrool··on Show HN: Bitwise Liminal – A Short Film in 256 Bytes of Code
This video is a couple of years old but it seems to get more into the steps of how he might go about things (disclaimer - I haven't watched the whole thing yet, just scrubbed through). https://portal.gitnation.org/contents/how-to-make-amazing-ge...
CmdrKrool··on CSS Is Logical
CSS is 'logical' in the same way that a pseudorandom number generator is 'predictable'.
CmdrKrool··on Restored 478-key, 31-tone Moog synthesizer from 1968
Is it one Gil Trythall piece in particular? I'm browsing the album and can only find quite casual resemblances. (Album sounds fabulous btw.)
CmdrKrool··on The laptop that won't die
Try this 'one weird trick' if you haven't already. It sounds unlikely but it's worked for me with Thinkpads once or twice: http://www.masnick.com/2007/09/07/the-secret-thinkpad-powerb...
CmdrKrool··on How to type “blimpy” in Emacs [video]
In conjunction with the power of Magit this is going to make cranking out those pesky commit messages so much easier.
CmdrKrool··on Atari Tempest: Time-Lapse Photography (2016)
Here are a few long exposures of sprite-based games I just happened to have lying around: https://imgur.com/a/zmWL1bX

(Not sure why Imgur is gating that with an adult content warning, but I assure you all it contains nothing of the sort.)

CmdrKrool··on Firefox has surpassed Chrome on Speedometer
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...

CmdrKrool··on Firefox has surpassed Chrome on Speedometer
Good reason to avoid Firefox for development imo. Nothing is more annoying than mysterious cache interventions when you're trying to get a handle on an unrelated problem.
CmdrKrool··on Moving the Ctrl Key
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...

CmdrKrool··on Show HN: I made a pretty relaxing puzzle game
Never assume the orientation of a cat :P
CmdrKrool··on Java in the Browser
I remember! Perhaps that is Soda Constructor:

https://en.wikipedia.org/wiki/Soda_Constructor http://maciejmatyka.blogspot.com/2018/02/soda-constructor-re...

CmdrKrool··on A working flight simulator, no computers necessary [video]
Thread of pilots reminiscing about these simulators including common japes of putting spiders or kids' toys on the landscape. Don't miss post #4 for a cool video:

https://www.pprune.org/military-aviation/499352-military-fli...

CmdrKrool··on The Comprehensive List of Window Managers for Unix
It's not a window manager as such, but you might enjoy playing with Eagle Mode: http://eaglemode.sourceforge.net/
CmdrKrool··on The New York Times buys Wordle
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.

CmdrKrool··on Ask HN: Why do new browsers use Chromium instead of Firefox as their base?
Xulrunner specifically, died or at least is not easily revived, because Mozilla killed XUL and XPCOM.
CmdrKrool··on Fixing stutters in Papers Please on Linux
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.

CmdrKrool··on Office 2000 is good to go
> I'd love to see a german, italian, or portuguese version of netscape to see how they fit those labels

https://aware7.de/wp-content/uploads/Netscape_4.png

Doesn't look like a showstopper, at least for the specific toolbar icons that Netscape had.

CmdrKrool··on All Atari Games
E.T. is in the "VIEW ALL" list but it doesn't seem to show under "E", for some reason.
CmdrKrool··on Every search bar looks like a URL bar to users
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.
CmdrKrool··on Defender (1981) by Eugene Jarvis and Sam Dicker
Have a look here too :) http://www.dl.unospace.net/defender_sound/
CmdrKrool··on MiSTer, an open-source FPGA gaming project
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.
CmdrKrool··on Vanilla-todo: A case study on viable techniques for vanilla web development
But due to its micro-size, it won't take long to learn.
Page 1 of 5Next →