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
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.
( 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
- Music:"Messe Solennelle de Sainte Cécile: V. Sanctus" by Orchestr
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.
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.
- Mood:
content
