Welcome to Gaia! :: View User's Journal | Gaia Journals


View User's Journal

Report This Entry Subscribe to this Journal
Silly hacks, strange ideas
I've been neglecting this, haven't I? Truth be told, I had typed up a very long post the same evening I wrote the first entry, but either Firefox or Gaia ate it, and I was too pissed to start again, so set it aside for a while.

Today, I feel more like venting, though.

I've been experimenting with Boost::Spirit, which really greatly simplifies writing parsers for arbitrary grammars. I'm liking it so far, but I've run into a rather frustrating inconvenience:

For a rule like this:

using boost::spirit::qi::rule;
using vmml::vec3f; // vmml::vector<3, float>
rule<typename Iterator, vec3f()> = lit('v') << float_ << float_ << float_;

I'm forced to populate the structure's members (a float[3]) explicitly, and the documentation isn't clear on whether accessing a value's members through phoenix lambdas is possible. So, I'm more or less forced to rewrite it like so:

vmml::vec3f vert;
rule<typename Iterator> = lit('v') << float_[ref(vert[0]) = _1] << float_[ref(vert[1]) = _1] << float_[ref(vert[2]) = _1];

... which is a lot uglier, IMO.

Ah, hell. I'll get this figured out.

Edit: On a side note, it seems this page doesn't have a style defined for the ".code" class, and the two-cell table it's in only has one real style: width:90%. Anyone happen to know if there's a way to get styles on journals?

psychic stalker
Community Member
psychic stalker
Prev | Next»
Archive | Home

  • [04/13/10 09:37pm]
  • [09/10/09 06:00am]

  • User Comments: [2]
      It really is a shame when good writing gets eaten up.. Sadly, I would have looked forward to seeing what you had to say about any topic.

      I am just passing by. Please do no be alarmed or too inclined to put me on an ignore list. Thank you.

    comment ~Black Petals~ · Community Member · Wed May 30, 2012 @ 05:31am
    I bet you are going to ignore me when you see this. -shrugs- it's so sad that everyone is becoming so hostile.

    comment Sidney Has A Kidney · Community Member · Tue Nov 19, 2013 @ 12:16am
    User Comments: [2]

    Manage Your Items
    Other Stuff
    Get GCash
    Get Items
    More Items
    Where Everyone Hangs Out
    Other Community Areas
    Virtual Spaces
    Fun Stuff
    Gaia's Games