HackerTrans
TopNewTrendsCommentsPastAskShowJobs

GrantMoyer

no profile record

comments

GrantMoyer
·6 maanden geleden·discuss
The idea is that NPUs are more power efficient for convolutional neural network operations. I don't know whether they actually are more power efficent, but it'd be wrong to dismiss them just because they don't unlock new capabilties or perform well for very large models. For smaller ML applications like blurring backgrounds, object detection, or OCR, they could be beneficial for battery life.
GrantMoyer
·6 maanden geleden·discuss
Even with modern digital codecs and streaming, there's usually chroma subsampling[1], so the color channels may have non-square "pixels" even if overall pixels are nominally square. I most often see 4:2:0 subsampling, which still has square pixels, but at half resolution in each dimension. However 4:2:2 is also fairly common, and it has half resolution in only one dimension, so the pixels are 2:1. You'd have trouble getting a video decoding library to mess this up though.

[1]: https://en.wikipedia.org/wiki/Chroma_subsampling
GrantMoyer
·7 maanden geleden·discuss
> This metalanguage must have some kind of constructs to describe unknown things, or things that are deliberately simplified in favor of exposition.

Perhaps you're thinking of mathematics.

If you have to be able to represent arbitrary abstract logical constructs, I don't think you can formalized the whole language ahead of time. I think the best you can do is allow for ad-hoc formalization of notation while trying to keep any newly introduced notation reasonably consitent with previously introduced notation.
GrantMoyer
·7 maanden geleden·discuss
Linux supports per-process namespaces too, and has tools like firejail to use them for sandboxing, but nonetheless sandboxing is not widely used.
GrantMoyer
·8 maanden geleden·discuss
> if digital painting were solved not by a machine learning model, but human-readable code, it would be an even more bleak and cruel joke, isn't it?

On the contrary, I'm certain such a program would be filled with fascinating techniques, and I have no dread for the idea that humans aren't special.
GrantMoyer
·8 maanden geleden·discuss
I largely agree with this, but at the same time, I empathize with the FA's author. I think it's because LLMs feel categorically different from other technological leaps I've been exited about.

The recent results in LLMs and diffusion models are undeniably, incredibly impressive, even if they're not to the point of being universally useful for real work. However they fill me with a feeling of supreme dissapointment, because each is just this big black box we shoved an unreasonable amount of data into and now the black box is the best image processing/natural language processing system we've ever made, and depending on how you look at it, they're either so unimaginably complex that we'll never understand how they really work, or they're so brain-dead simple that there's nothing to really understand at all. It's like some cruel joke the universe decided to play on people who like to think hard and understand the systems around them.
GrantMoyer
·8 maanden geleden·discuss
Test successful?
GrantMoyer
·9 maanden geleden·discuss
Thanks for organizing for me my thoughts on why even a restricted modern subset of C++ is complicated.
GrantMoyer
·9 maanden geleden·discuss
Ditto. It's also significantly lighter weight than competing readers (at least when I bought mine), has physical buttons, has color models, and has really good battery life possibly because it runs a custom Linux instead of Android.
GrantMoyer
·9 maanden geleden·discuss
Like the author, I've also found myself wanting to recover an accidentally deleted file. Luckily, some git operations, like `git add` and `git stash`, store files in the repo, even if they're not ultimately committed. Eventually, those files will be garbage collected, but they can stick around for some time.

Git doesn't expose tools to easily search for these files, but I was able to recover the file I deleted by using libgit2 to enumerate all the blobs in the repo, search them for a known string, and dump the contents of matching blobs.
GrantMoyer
·10 maanden geleden·discuss
I'm not the author, but these video-in-game projects typically work with a few phases:

1. Get the game into a specific state by performing specific actions, moving to specific positions, performing specific inputs, etc. so that a portion of the game state in RAM happens to be an executable program.

2. Jump to that executable code such as by corrupting the return address in the stack with a buffer overflow

3. (optional) The program from 1 may be a simple "bootstrap" program which lets the player directly write a new, larger program using controller inputs then jumps to the new program.

4. The program reads the video and audio from the stream of controller inputs, decodes them, and displays them. The encoding is usually an ad-hoc scheme designed to take advantage of the available hardware. The stream of replayed inputs is computed directly from the media files.
GrantMoyer
·10 maanden geleden·discuss
There's a somewhat easier way to implement 2-argument-function flip in C++ than the blog post provides:

  #include <functional>
  constexpr auto flip(const auto& f) {
    return std::bind(f, std::placeholders::_2, std::placeholders::_1);
  }
The best I could get the fully general version is still pretty obtuse though:

  // std doesn't have a template version of placeholders::_1, _2, etc., so we need to
  // define our own. 
  template <int I> struct placeholder{};

  template<>
  template<int I>
  struct std::is_placeholder<placeholder<I>> : std::integral_constant<int, I> {};

  // flip must be an object so that the function type can be deduced without needing
  // to explicitly specify its parameters' types.
  template<typename F>
  struct flip {
    const F f;
    
    // operator() deduces the argument types when the flip object is called, but really
    // all we need to know is the number of arguments. 
    template<typename... Args>
    constexpr auto operator()(Args... args) {
      return bind_reversed(std::make_integer_sequence<int, sizeof...(Args)>{})(args...);
    }
    
    private:
    // a helper function is needed to deduce a sequence of integers so we can bind all
    // the placeholder values.
    template<int... Is>
    constexpr auto bind_reversed(std::integer_sequence<int, Is...>) {
      return std::bind(f, placeholder<sizeof...(Is) - Is>{}...);
    }
  };
GrantMoyer
·10 maanden geleden·discuss
Docker Engine without Docker Desktop is available through winget as "Docker CLI"[1].

[1]: https://github.com/microsoft/winget-pkgs/tree/master/manifes...
GrantMoyer
·2 jaar geleden·discuss
Good point; I missed that. On a second reading, I'm inclined to believe they intended the second interpretation.
GrantMoyer
·2 jaar geleden·discuss
> GPL requires you to disclose the license and source code on request

Not quite; GPL 2.0 requires you to at least disclose the license upon distribution, but actual source code may be provided upon request[1]:

> You may copy and distribute the Program … in object code or executable form … provided that you also do one of the following:

> a) Accompany it with the complete corresponding machine-readable source code …

> b) Accompany it with a written offer … to give any third party … a complete machine-readable copy of the corresponding source code …

> c) [option that only applies to non-commercial distribution]

In practice though, GPL software rights holders can't pursue violations they don't know about, and usually only care about getting violators they do find out about into compliance, rather than seeking damages.

[1]: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html