Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Wednesday February 23, 2005
01:37 AM

AI::Prolog Math

[ #23322 ]

I barely have 'net access at night. I've improved the situation slightly by switching to a different outlet, but I think the electricity in this building is just too noisy and between 6 and 7, when people get home and start turning on their TVs, my DSL goes out (and there are only four apartments here, so it's not like a huge building.)

So after going around, buying supplies and generally trying to get things to work, I finally gave in and was at least relieved by having *some* connectivity. After I got that done, I had a weird realization about AI::Prolog. The reason I haven't done math is because I want to build the operators into the parser. However, those operators are merely syntactic sugar for regular Prolog predicates. If I get the predicates to work, I have math and I don't have to do much to the parser, though I confess that I'd like to update the parser at a later date.

Once I realized that, I added the is(X,Y) predicate. It took a while to get it to work, but once it did, it made things clearer about how to proceed on the rest of the math. However, in porting this predicate from XProlog, I saw that the original version did not match expected Prolog behavior. In fact, it fails drastically in some cases. I'm going to have to be careful about not blindly porting lest I copy bugs I don't want to copy.

Oh, and I added listing and println(X), too.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • It's worth it - trust me.

    A good UPS will not only work like a surge supressor to handle spikes and give you enough power to shut down when the power goes out - it will also give you a steady consistant stream of power.

    Relatively speaking - they are not that expensive.
  • If your power is too noisy, you might look into using a UPS. That might filter out the noise.

    Be careful about extending that is operator - a recent slashdot item noted that Microsoft got a patent for is-not. :-)