Blog of Raivo Laanemets

Announcement: Blog-Core 0.0.13


Today I released a new version of Blog-Core. This followed the very recent release of SWI-Prolog 7.3.12 that contains lots of core changes and I wanted to make sure that I remain compatible with it. Besides, I had some changes piled up that were waiting for a release.

Compatibility

I found no compatibility issues. All tests run successfully for Blog-Core and the rest of the packs that I maintain. This came as no surprise as SWI-Prolog takes backwards-compatibility seriously.

Pack version checks

Blog-Core now checks whether the all dependencies are installed and that they have correct versions. I had to add this as the pack system does not track versions itself. While this is a step forward, it still won't protect in cases when a pack version is overpublished. It would be safer to add packs as Git submodules or directly into the project repository. I will write a guide for this for the 1.0 release.

HTTP error logging

One of the SWI changes was HTTP error logging through debug(http(error)). This makes lots of custom code unnecessary for my web applications. It also makes this technique obsolete.

TF-IDF based search

I added an implementation of TF-IDF-based search. It is a fuzzy text search algorithm that should provide good results. A blog post by Jana Vembunarayanan was really helpful while writing the implementation.

Writing a fast implementation in Prolog was a bit of a challenge. The biggest issue came from calculating vector norms and dot product but I was able to optimize it by keeping a separate index of non-zero terms.

Search results are available as a JSON API. Example query.

The TF-IDF implementation also enables post similarity matching. This is built-in as an API, too. Example: posts similar to this post (similarity requires at least one common tag).

Tag/status filter and autocomplete

This is something I really started to miss after having more than 100 posts and lots of tags. It is now implemented.

Blog-Core tag filter

and

Blog-Core tag autocomplete

The tag autocomplete uses simple dynamic datalist to provide possible values.

Further releases

I have planned only one more release before 1.0 and it will contain small changes only which touch the admin UI. There are no planned changes for the core. After the release of 1.0 I consider Blog-Core "done" and any additional functionality out of the scope.


Comments

No comments have been added so far.

Email is not displayed anywhere.
URLs (max 3) starting with http:// or https:// can be used. Use @Name to mention someone.