What is NALL [bsnes] ✔ [byuu.org] – ?

|
-> What is the least instrusive solution?

  • Use Nall w/ “Ruby”
  • “Do what you’re doing now”

Remember, the “Audio” class in STD is/should be for/assoc. with Audio Drivers, I think. I have Music_Player class in my head also, and how it relates to “Audio.” That is confusing me. I just want “Audio” to wrap Driver Selection, and involve the following routines:

  1. “Output Device” query – incl. supported samples rates and other assoc. subroutines
  2. Select Output Device
  3. Select Audio Format

2/3 could be one function as well, with persistent settings.

But I really did want to talk about Nall. And ruby. These are “things” made by byuu and co. that I love. Ruby really inspired to write wrappers for my code. It all started when I was about to modify STD to incorporate the newest feature Time_Scrub and it’s been awhile since I’ve been in the project. I realized how convoluted everything was and really deeply involved with the methods the library at hand called for (SDL). And I was writing all the GUI widgets from scratch.. After analyzing Ruby [in fact, I will publish the analysis in my next blog post], I discovered the beauty of the hardware abstraction layer. And now, I aim to find a way to describe STD in a library agnostic manner, accompanied by drivers for some libraries (partially SDL and wholly QT is my aim).

There’s something about Nall – what is it -since byuu is working on his new website, the page for nall is down. We must peruse the web archive of it, thankfully which includes a download. https://web.archive.org/web/20140710210208/http://byuu.org/files/nall_20140107.tar.xz

https://web.archive.org/web/20140108065451/http://byuu.org/programming/nall/

Here is a relevant complete snippet for archival purposes:

nall is a C++11 header library that implements a large number of containers
and classes. Although at times it does reimplement containers that exist in the
C++ standard library, it primarily only does so to offer greater consistency and
enhanced yet simplified functionality.

For instance, nall/string supports tokenization, string-replace, math
parsing via recursive descent, small-string optimization, a customized string
container with string-group-specific functions, and so on. It provides type-safe
string building and printing functions, can store binary data and transparently
be passed to functions requiring C-style null-terminated strings, and uses a
more intelligent composition method than overriding the shift operators.

nall/vector allows O(1) amortized insert and remove at both the beginning and
end of the queue. Resizing the queue does not always require copying or moving
all objects through placement-new syntax and realloc (yet it still supports
non-POD objects and properly invokes constructors and destructors.) It also has
functions to optionally auto-resize an array when accessing an element out of
bounds, or to return a stock object if the array index is out of bounds.

nall also provides dozens of additional small libraries that do not exist in
the C++ standard library. For instance, rather than needing a 300KB dependency
on zlib or a 400KB dependency on libpng, nall/zip and nall/png provide simple
decompression support for these formats in a mere 10KB of code each.

As a header library, no separate object compilation is necessary. Simply
include the header(s) you want, and you can use it right away.

Some of the primary supported concepts implemented in nall are:

  • string
  • vector
  • set
  • hashset
  • map
  • sort
  • thread
  • unzip
  • png
  • image
  • config
  • markup/bml
  • markup/xml
  • varint
  • sha256
  • crc
  • dsp
  • stream
  • optional
  • file
  • filemap
  • directory
  • dl
  • endian
  • http
  • smtp
  • odbc

License

nall is available under the ISC license.

I had no prior experience with the ISC license but I was pleasantified to see this text template, nice and simple – https://en.wikipedia.org/wiki/ISC_license

So we might be overwhelmed at all the cool things that nall has to offer, and I would be foolish to not take time to learn it. I’m mostly interested in maintaining its use in Ruby, the hardware abstraction layer, where the nall::any type is used.. I like it’s light-weight flauntiness. I’m going to try it out. 🙂 Nall is also really useful for its “config” capability as I’ve become well accustomed with in my hacking of bsnes-classic – it makes it super easy to have a config file for various features, and extending the configuration is easy. I will make a tutorial on this.

There are some other questions I have on byuu’s libraries .. Such as Phoenix / Hiro and the difference between the two. I have the instinct that Hiro picks up a dead Phoenix. But I’m not sure. For some reason I’m not too interested in the GUI abstraction provided by Phoenix and possibly Hiro(?) .. This may be of use to someone who is : https://github.com/apollolux/hello-phoenix

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s