Home
Cat
Programming language test went well. Did a bit too much work for the final question; for some reason the obvious solution never occurred to me. Perhaps it's this expectation that questions progressively get harder?

Palindrome test, relationally defined )

On another happy note, the Nokia 770 wireless tablet started shipping to developers today. Full release for mere mortals should be just 1-2 weeks away.. woohoo!

Update: Forgot to credit [info]mge for the efficient implementation. It traverses the list twice (once for reversing, once for doing equality testing; mine .. actually traversed the list twice as well, just with a heapload of if expressions to evaluate on top.

On logic programming

  • 2-a de okt 2005 at 6:43 PM
Cat
Scheme with Mini-Kanren is like C or Objective-C (take your favourite, or love-to-hate, derived language): you can program in a relational style, but you can drop back to functional programming as needed. Which is bad if you're a purist, or, even as a pragmatist, bad for maintenance in the long run, but great for making deadlines.

After using it for about a week or so I'm sort of nostalgic for Prolog. Not that I like Prolog better, but using both at the same time makes me appreciate Prolog more than I used to when forced to use it. And with XGP one can use Prolog from the comfort of a Mac-based IDE!

Ah, the joy of declarative programming. Of being able to say "give me all ways of making a rectangle of area A and perimeter P from square 1x1 blocks". Of having your predicates generate members of the set as well as test for membership.

Advertisement

Latest Month

septembro 2009
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Feeds

I'm also on...

Syndicate

RSS Atom
Funkciigita de LiveJournal.com