Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Overview

TrackLog is a collection of Prolog libraries, examples, and guidelines for building a personal knowledge base in pure logic

  1. TrackLog blurs the boundaries between database administration and programming
  2. TrackLog is based on Formal Grammar (DCG): you will develop your own grammar to accommodate your language needs
  3. TrackLog will help you create extremely precise and relevant data fuel to feed to LLMs
  4. TrackLog stands for "Tracking in Logic"
  5. TrackLog libraries are 100% compatible with the SWI Prolog dialect and 99% ISO-compatible, so you can port them to another dialect if you need it
  6. My original goal was to create a medical tracker to help people manage complex illnesses and chronic disorders
  7. Logical Programming is a generalization of functional programming and also a generalization of relational databases. You can see logical programming as a missing glue layer between a database and a program
  8. You can see TrackLog as a second brain to help you capture and analyze data and aid in pure logical decision-making, which is free of 100+ cognitive distortions and biases, completely traceable, and based on formal logic
  9. The main idea is that you track your data as ordinary sentences in the natural language, and each such sentence can be put in a one-to-one correspondence with a Prolog formula. TrackLog takes care of this transition under the hood (parsing and generation of text).

Please use examples.pl as a main guide. I've provided several practical use cases: Learning Tracker, Iterm Tracker, Exercise Tracker, and Programming Tracker.

Codebase VS App

Mode UI Data storage Use when How to track How to search/derive
Codebase Prolog IDE (VSCode + New-VSC-Prolog) *.pl files on your computer - Learning TrackLog
- Low and Medium scale tracking
- doing some advanced static analysis
- developing advanced Prolog features
Manually add entries to *.pl-files Prototracker capabilities (search/1, search_term/1 etc) from Prolog toplevel
App (*) Mobile App Relational Database (PSQL) on a server - High-Scale tracking
- lazy to code
UI forms UI queries

(*) I haven't created any app for TrackLog yet, and I'm not sure if I'll publish them anytime soon. You can vibecode them yourself the way you like to automate your TrackLog use-cases. If you publish an app, send me an email so I can insert the link to your app here. |

Why nobody created such a tracker

  1. Prolog popularity rise was in the 80s, but no smartphones were available at that moment: the mobile revolution happened 30 years later
  2. Prolog abandonment by most researchers created a strong cognitive bias that Prolog is a thing of the past
  3. Prolog job market is virtually non-existent, so most young professionals (including me 10 years ago) had zero motivation to learn it
  4. It requires the end-user to have programming and database administration skills. It narrows the audience a lot for such an app. Even if it was created, most professionals won't publish it
  5. Modern companies reinvent Prolog and recreate logical programming from scratch when they need it. They call it "rule engines". In my personal opinion, they waste huge amounts of time and money to distance themselves from the Prolog brand and all the cognitive biases which are attached to it

How to learn Prolog

In order to use TrackLog, you need to know how to code in Prolog. The best way to learn Prolog is to reimplement it from scratch in the programming environment of your choice. You can use the first 28 of 99 famous Prolog problems as a good starting goal.

You can also avoid reimplementing Prolog by yourself and use an existing implementation (such as SWI Prolog) to solve some share of Prolog 99 problems, use some online learning sources (such as Learn Prolog Now), online exercises with autocheck, or any Prolog textbook or course of your choice. For the intermediate/advanced level, you can read The Power of Prolog.

How to start using TrackLog

FAQ

Why was TrackLog created?

I've used a lot of Android-based trackers (fitness/nutrition/exercises/habits/sleep trackers) for many years, and I know they lack data flexibility; logical derivation power and integration between them is very limited and complicated. I need some medium to store data in a precise, logical way, clean and extendable.

Why TrackLog is relevant in the age of LLMs

Charles Wheelan (author of Naked Statistics) once said: “No amount of fancy analysis can make up for fundamentally flawed data.” TrackLog will do exactly that: it will help you to organize all your data in its purest logical form, so you can give it to AI later for serious analysis. Even if AGI is here, you still need to give it high-quality data.

Was AI used to write code for TrackLog?

Not directly. I used ChatGPT as a replacement for Google and StackOverflow; that's it.

100% of TrackLog code is handcrafted to achieve deep understanding of the computation model and (as a result) build a better system with cleaner architecture.

How is Prolog related to the foundations of mathematics?

Mathematics is based on Set Theory (ZFC). Set Theory is based on Classical Logic (First Order Logic). Classical Logic can be formalized inside Type Theory (Calculus of Constructions). Type Theory is based on the idea of Turing-complete computation models, which you can consider the ground level.

Prolog also runs inside a Turing-complete computation model (based on unification and backtracking).

It uses the algorithm (SLD Resolution) to automatically derive correct logical conclusions from axioms (knowledge base). Resolution is based on classical logic.

Logical programming gives you automatic deduction inside the logical realm. You can consider it as a shortcut between different parts of the logical realm.

Why you should trust my ideas

  1. I've plunged into the Prolog ISO standard very deeply and implemented my own Prolog computational model based on the standard from scratch in Java.
  2. I've read and done all exercises from the first 10 chapters of Applied Mathematics for Database Professionals, so I understand the mathematics behind relational databases and how to derive SQL tables/queries from mathematical foundations (logic + set theory)
  3. I understand lambda calculus on the lowest level and even implemented my own functional programming language ZeroLambda
  4. I understand formal proofs and mathematical logic on the lowest level. I've completely formalized 3 key chapters from Rob's Type Theory and Formal Proof textbook in Rocq Prover

Support

Feel free to connect with me on LinkedIn. I will be looking for a job as a Senior/Lead Java Software Engineer soon, so you can recommend me if your company has such positions. Java isn't used directly in the current TrackLog repository, but I have an experimental Java implementation of a Prolog computational model (based on the ISO standard).

I'm not only a software engineer but also a computer scientist. If you have interesting research positions, you can recommend me directly to a Job Position and send my LinkedIn to the HR manager or your project manager.

Feedback

I'm glad to hear any feedback from you! Contact me via email kciray8@gmail.com or Whatsapp.

About

TrackLog is a collection of Prolog libraries, examples, and guidelines for building a personal knowledge base in pure logic

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages