Google weirdness: “connect prolog to actionscript in flash” (or “Prolog lives: just”)

! Warning: this post hasn't been updated in over three years and so may contain out of date information.

clustr.pngJust a few days ago, I wrote about the clustrmap that I’d added to this blog to enable me to see how many people were visiting and where they lived. Then Microsoft forced Windows Desktop Search upon the world, I blogged about it, “Jo” referred to the Register’s take on subject, which caused a ping-back to here to appear on the Register and the next thing I know, I had 4,000 visitors from across the world visit in just one day. This made a total mess of the clustrmap that previously had been tracking nearer 40 or so visitors a day.

stats.pngSo having decided that the clustrmap really wasn’t that useful to me after all, I tried a WordPress plugin – WordPress.com Stats – instead. Whilst the details it provides are less public and less visual, they provide more conventional information, including search engine search terms. Those of you unfamiliar with the stranger workings of the web may be unaware of this, but when you visit Google etc and enter your search string, then click on a link, the site you visit is passed a copy of the search string you entered. As an aside, this is how when you entered say “pointless stuff” into Google, Ebay could have a sponsored link saying “get great deals on pointless stuff”. Ebay simply offered up their own search results page using the same search string when you clicked on that link. Ebay (or maybe it’s Google) have got smarter recently though and Ebay’s sponsored link only tends to appear if you enter an actual item as your search string, but the technique of passing the search terms across is still used.

Anyway back to the actual point of this post. The search terms that have led people here recently are things like “how to remove Windows Desktop Search” and “disable windows desktop search” and “connect prolog to actionscript in flash”. Yes someone really did type the last string into Google. This raises two questions in my mind: why? and how does that link to here?

To answer the second question, I entered the search string into Google myself and looked at what it linked to. Turns out I mention prolog, flash and actionscript in my first ever post. Bit of an anticlimax that one, I now see how it could link to my blog.

psharplogo.gifWhat about the “why” question? As I’ve mentioned before, I love prolog, but sadly there is no real-world use for it. Or so I thought. I guess there are some people out there that use it. I’m still amazed though that anyone would want to link it up to actionscript. This set me thinking though: could it be linked up to actionscript? The answer, somewhat surprisingly, is “yes”. The key is two bits of handy technology: P# and Spaghettisort Janus. The first is a prolog “compiler” that converts prolog code into C# code that can then by compiled up into an assembly. Janus is a “flash projector” that supports .NET. A projector let’s you link flash and application code together into a – in this case Windows – executable such that the actionscript can access application code as an extended set of “builtin” classes.

So should someone in the future want to connect prolog to actionscript, they’ll not only be directed here, they’ll get a proper answer too. Of course the reason why this person wanted to do it will likely remain a mystery and my guess is no one else will want to “connect prolog to actionscript in flash”, so the usefulness of all this is somewhat questionable. I don’t care though, I learned about P# though and may have to have a play with it at a later date. 🙂

5 thoughts on “Google weirdness: “connect prolog to actionscript in flash” (or “Prolog lives: just”)

  1. “””Of course the reason why this person wanted to do it will likely remain a mystery and my guess is no one else will want to “connect prolog to actionscript in flash”, so the usefulness of all this is somewhat questionable.”””

    Jejejej, are you sure nobody would want to connect prolog to actionscript?? 😀 Searching through Google to see if it is possible I have finished here. I want to connect Prolog to ActionScript!!! The reasons:
    1. I know ActionScript.
    2. I know a bit of Prolog.
    3. I have done a Prolog translator from numbers to written-in-words numbers (in Spanish).
    4. I teach Spanish.

    Thus, I can build a Flash miniapplication for my students to learn and practice numbers in Spanish, by entering a number and obtaining how it is said 🙂

    Jejej I will post the result. By the moment,

    thank you very much!!!!!

  2. I’ve got another reason for connecting prolog to actionscript, a weird one to be sure.

    I want to use prolog as scripting language for game prototypes. The goal is to make it so you can run prolog either inside or outside of a flash-based game engine. You may want to catch design bugs in your game at the logical level (just in terms of abstract mechanics), or simply iterate on your computational prototypes without having to get the concrete representations (graphics, physics) working each time. The “qualitative simulation” code can be come the “rule logic” of your playable prototype if you can get flash to run inference over the rules. I’m skipping over all of the technical details that actually make this a reasonable thing to do, but you get the idea.

    I implemented a basic resolution engine in HaXe before finding your post. Given your suggestion, I’ve traced down the prolog cafe project and am considering moving my whole project to Java (giving up faster load times in exchange for tasty opengl performance). I want my prototypes to be redistributable across platforms, so the Janus route is out.

  3. And that’s three! I also came here when searching for “ProLog in ActionScript”. I have some experience with Flex and AS3, and am currently considering learning Java for clinical decision support systems programming. Java has the advantage that it has some AI libraries from ProLog. And as I am working on Mac, I want something that is cross-platform, for development as well (yeah, Mono, I know… could do it for C#)

    Anyway, the Flash player is much more widely distributed than Java VM for applets, of JavaFX as a modern alternative. So for that reason, ProLog in AS3 (or future versions) would make sense in my opinion.

    Pieter Kubben, MD
    Dept of Neurosurgery
    Maastricht University Medical Center
    The Netherlands

  4. Me four!

    I work for a broadcast company that uses Flash to build educational games and learning tools. As a part of my own education, I’ve begun to learn prolog, and have taken an interest in AI. I’d love to be able to combine the two!

Comments are closed.