I ported Brainhat to Omnios (I really like Omnios!). I say 'ported' because the compiler complained about my code... a lot! I've just run the test suite. There are things to fix.
Gabriela looks like it didn't run. Tests 126 and 127 look broken. Probably more. Very few of the test outputs appear to agree with the saved outputs. I don't see a difference in every case though. It might be due to a line feed missing or such. I had to change the sed invocation in the makefile, and this probably has something to do with it.
Hmmm... I am seeing this message from httpd.c when trying to fetch a page:
httprequest: nreads = MAXREADS; shutting down.
Doesn't appear to shut anything down, though.
Here's one line that is causing gabriela to dump core:
"Jorge returned to Tapachula to study law."
Digging into it.
BUGs:
>> i returned home to study <--- "home" should be interpeted as "to home". It's a one-off.
autohash3_a: couldn't find a CHILD-OF in Root-OBJECT
autohash3_a: couldn't find a CHILD-OF in Root-OBJECT
You did return home studies.autohash3_a: couldn't find a CHILD-OF in Root-OBJECT
and
>> i returned to home to study
./run: line 6: 12384: Memory fault(coredump)
This is the same bug as in Gabriela. Tough to find(!) What does this say, anyway? "I returned to home because I study."
--effect-- because --cause-- ?
Does it work for "the dog went to the bowl to drink"? Yes. It works. Sort of. Which is the cause and which is the effect? Maybe it says "dog to drink because dog went to the bowl."
Or maybe it says "dog went to the bowl because dog to drink". That seems better. The cause is the second part--to drink or to study.
How do I capture that in grammar? I'll work that. But first! And why AM I GETTING a segv?
>> i returned to the bowl to study
You did return to the bowl.
>> i returned to the home to study
./run: line 6: 12540: Memory fault(coredump)
Hmmm.... "home" has a problem but "bowl" does not.
Ach! It's a problem with a rewrite rule! I'm an idiot; routine rewrite was in the traceback. I was looking past it to grammar issues. And, in fact (though the rewrite seems broken...), it's already translating the input into cause and effect. This is the problem with working on a 30 year-old project. I've been here already!
Anyway, the rewrite is working under Linux. I musta messed something up. Yep...needed a static int declaration. It is working now.
I also had to increase a setting of "MAXREADS" in the http code from 9 to ... 100. The Omnios version was resetting the connection because it saw too many incoming web connections(?). I dunno. I wrote the code, is all.