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

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.
  • ...I want to wait until I have a solid test suite and some decent documentation before I start profiling and optimizing.
    Shouldn't you have done that first? ;)

    I've been trying to follow all your posts, but I just don't understand 'em. Why have you put a lot of energy into that whole thief stealin' thing?
    • I didn't write the tests firsts because I was porting this from W-Prolog and frankly, since I wasn't entirely certain what W-Prolog was doing half the time, I wasn't certain what I was writing tests for. However, by doing a faithful port from a known-good program, I could run them in parallel and keep the Perl one working properly. Now that it appears that I've nailed down the behavior of the Perl version, I'm writing tests. Curiously, in the process I've found a discrepancy between the Java and Perl ver

      • but WAY above my level of comprehension. :)

        - Jason
        • Actually, I doubt it's above your level of comprehension. Logic programming isn't that hard, it's just a weird way of looking at things. For example, remember syllogisms in logic class?

          All cats are mammals.
          All mammals have fur.
          Therefore, all cats have fur.

          In prolog:


          furry(X) :-

          The :- is read as "if" and the comma is read as "and". I'm sure you can figure out what that means :)

          In logic programming, you don't tell the computer how t

          • I actually laughed out loud about the shaved part - guess it helps to start with a simpler explanation.

            I can see how it's kind of neat, especially getting computers to figure things out. I'm still stuck at seeing this, though, as a static set of switches. How is it learning or going beyond what you provide it? I mean, it seems like you're still having to provide a lot. When you say another mammal, it's only b/c you ruled that mammals have fur (and aren't shaved) that the mammal is furry. But you're st
  • What exactly is AI::Prolog going to do?
    • In the long term, the intent is to allow logic programming in Perl. However, I realize now that many people don't know what that is, so I'll write another entry to explain it. It's fascinating, but not something done much in Perl (because Perl has no native ability to do that, aside from a limited equivalent with regular expressions).

      • I like the sound of this. I've not tried to build SWI-Prolog and either of the XS modules that wrap it, but would like to have some Prolog-ish rulesets once in a while. The prior attempt [] at a Prolog-in-Perl hasn't moved in years. Starting over with the WAM (Warren Abstract Machine) [] Prolog engine sounds good to me. (Yes, I did some Prolog back during the AI wars.)

        For those that don't know what we're talking about, you might want to check out a Prolog Tutorial [], there are quite a few available.

        In the long

        # I had a sig when sigs were cool
        use Sig;
        • Actually, I have downloaded the WAM book and started working with it, but I don't have as much free time as I would like. That could be a very long project and the current implementation actually works (and also appears to be based on WAM, but it doesn't fully implement it.)