Declarative programming can be a powerful paradigm for organizing software systems. By defining the business processes once, we ensure there is a single source of domain knowledge. From this foundation, we can derive other parts of the system such as API endpoints, database schemas, and even user interfaces. This approach reduces repetition and helps prevent bugs caused by misaligned domain…
Names are a key aspect of one’s identity. Too many people have dealt with software systems where entering their name does not go quite right. A character is rejected. The order feels wrong. A name is truncated, reformatted, or “corrected” into something else entirely. While these may seem like small elements within the software, they can have big consequences for the person whose name is…
In the age of generative AI (GenAI) , being precise matters more than ever. Large Language Models (LLMs) , for example Copilot or ChatGPT, are usually helpful, but they also eagerly fill in gaps we did not intend to leave. This becomes especially true when we interact with AI using natural language. While plain language makes these systems feel accessible, it also creates space for…
Creating interactive web experiences can quickly get complicated. Often, you’re juggling a front-end in one language and a back-end in another, all while figuring out how they communicate. LiveViews offer a simpler alternative: you can build rich, interactive pages entirely from the back-end. LiveView keeps the server and browser efficiently in sync, letting you focus on the user experience rather…
When it comes to learning a new programming language, I’ve found that building a small, practical program is one of the best ways to get started. Recently I began exploring Rust , and to get a feel for the language I decided to write a tool based on a game I was playing at the time: Magic: The Gathering Arena (Arena) . The game’s log files contain a lot of information, including records of the…
If you ever need to represent knowledge in a way that's easy for both humans and machines to understand, while working seamlessly with existing JSON tools and libraries, JSON-LD has you covered. JSON-LD, short for JavaScript Object Notation for Linked Data , allows you to express knowledge as a graph in any domain. A good example is how Google is utilizing Linked Data to very precisely list…
The Turtle language , along with the Semantic Web , offers a powerful way to represent and work with knowledge across virtually any domain. Unfortunately, it is often overlooked in practice due to several reasons: limited tooling, unfamiliarity with Semantic Web concepts, and the fact that much knowledge still exists in less structured formats, such as natural language. However, in the age of…
Image generation using AI that can run locally on a desktop or even a laptop has seen a tremendous leap in the last few years. When I first wrote about it after the public release of Stable Diffusion , getting everything installed was quite an involved process, involving configuring the right dependencies and terminal commands. This was especially true for those who wanted to experiment with…
Code notebooks, which can provide an interactive combination of code, data, AI, text and visualizations, have seen increasing use in recent years. Livebook is such a notebook environment that has some interesting features to explore. In this article I will write a basic Livebook notebook to show off some these features. This notebook will describe information from the Green Lantern series of comic…
Logic programming with Prolog can be a very effective way to find solutions to a number of problems. Within Prolog one can define a program by describing it with facts (that represent what we know), rules (that show how to derive new knowledge) and queries (that describe what we would like to know). By using queries on a knowledge base of facts and rules we can solve a variety of problems in many…
Large Language Models (LLMs), such as those that enable Chat-GPT, have been shown to be incredibly capable for language understanding and generation tasks. With the right prompt, they can answer questions, categorize input, rewrite pieces of text, perform sentiment analysis and more. As good as these tools are, many of them require data to be sent to a remote server and/or take some…
One interesting place to look for nice photographs is the Accidental Renaissance subreddit . It is a forum where photographs that resemble Renaissance art, or other art movements that existed between the 14th and 19th centuries, are shared. Photo of part of a kitchen in renaissance style, generated using mage.space. A related question is how to decide on what counts as Renaissance (or Baroque,…
Abstract "A credit rationale forms an integral part of the credit granting and credit decision making process. Historically such credit rationales were written as a natural language document. This meant that automated handling of the meaning, i.e.: semantics, of such documents by machines was too complex to be done with sufficient accuracy. As a consequence, the creation and verification of a…
Stable Diffusion is one of the latest models that is capable of translating a piece of text, such as "arid, desert dunes" into great looking images. Unlike some other tools and models, Stable Diffusion can be installed and run locally on a desktop machine (see this repo and instructions ). One of the great features of the Stable Diffusion model is the ability to combine a text input with a…
Recently I started to do the latest version of the course Practical Deep Learning for Coders from fast.ai . I am very much enjoying the hands-on approach of the course and it is quite amazing to see how a deep learning based image classifier could be built with very little code. In the first chapter of the book that accompanies the course a model is trained to recognize whether an image depicts a…
One of the programming languages that I have stumbled upon not too long ago is Raku . This language, which was previously known as Perl 6, is chock-full of really cool features. It has support for programming in both object oriented and functional paradigms, optional gradual typing, a nice story for async programming and more. A really nice feature of Raku is that Grammars are a core part of the…
One of the most difficult parts of developing software for a particular task is understanding the (business) domain in which the software needs to operate. This is due to the fact that software engineers often lack the expertise in complex areas such as health, law, finance, etc in which the software they create needs to solve problems. A similar situation holds for domain experts. For example,…
Recently I have been aiming to explore the Pharo programming language. The close combination between the language and the Integrated Development Environment (IDE) , makes it quite unlike most other languages that I have encountered. You can, for example, inspect every program element in a visual environment, even on a currently running program. While exploring, I spent much time using the…
Meditations are a series of notes that the Roman emperor Marcus Aurelius wrote for guidance and self-improvement. While it is likely that the emperor wrote them purely for his own benefit, they have been published after his death and contain elements of Stoic philosophy that many people have consulted since. One way achieve a bit of self-improvement, coding-wise, is to pick a small project to do…
One of the most well-known and popular online multi-player games is League of Legends . In this game two teams of five players compete against other. Within the game each player controls a champion that they can use to defeat the enemy team by destroying their base. There are many aspects required to winning a game of League of Legends: good in-game strategy, good control of champions but also…
Human beings enhanced by machine parts, often called cyborgs , are a staple of the science-fiction and comic books. The, very aptly named, hero Cyborg , is a good example of this. Due to advanced mechanical modifications he not only has greatly increased strength and the ability to fly, but he is able to interface directly with computer systems to organize and plan ahead. These skills make him an…
One of the greatest Star Trek episodes is titled Darmok in Star Trek: The Next Generation . It has the hallmarks of a great Star Trek: TNG episode: a first contact between two civilizations and a dilemma that is not solved by violence but by thinking and understanding. One of the nicest logic programming languages is miniKanren . This is due to the fact that it is a small, relatively easy to…
Scooby Doo is mystery horror cartoon series in which a group of teenagers named Fred, Daphne, Velma and Shaggy alongside the titular Great Dane named Scooby-Doo, ride around in their van named "The Mystery Machine" solving mysteries. The episodes of the show generally follow a set structure. First their van tends to break down near a place apparently haunted by a ghost or another supernatural…
Abstract "Semantic Web technologies have shown to have great potential in many different domains, to facilitate knowledge representation, exchange and reasoning, in a formal and yet both human and machine understandable way. In particular, within the health domain, they enable knowledge integration and understanding by explicitly defining and linking concepts and relationships using ontologies to…
This article is the fifth part of a series, examining the use of the Clojure language for representing Linked Data, using examples from Aesop's stories. The topic of this article is to explain the somewhat contentious subject of blank nodes. One of the strengths of RDF as a graph representation format is the way resources are named. Through the use of Uniform Resource Identifiers (URIs) every…
Deep Learning is a field within Artificial Intelligence (AI) that has got quite a lot of attention lately, due to some truly impressive results in recent years. From recognizing objects in images with accuracy that rivals humans, to generating realistic looking texts, to even beating professional players in Starcraft 2 , some truly groundbreaking applications are done with Deep Learning…
The use of logic is a common element in Science Fiction. In the Star Trek universe Vulcans are a species that is famously known for aiming to live by logic and reason. Because of this they are often considered masters of these subjects. Yet there was a case in an episode of the Star Trek show Deep Space 9 , where Quark , a Ferengi , was able to convince Sakonna, a Vulcan, of the error of her logic…
This article is the fourth part of a series, examining the use of the Clojure language for representing Linked Data, with examples from Aesop's stories. The topic of this article is to describe how to do some basic conversions from our Clojure representation of Linked Data, to some of the other formats, such as Turtle , NQUADS or JSON-LD . In previous articles of this series, we created a…
This article is the third part of a series, examining the use of the Clojure language for representing Linked Data, with examples from Aesop's stories. In part one the basic elements of "The Fox and the Stork" story were formalised as Linked Data in Clojure, while in part two we investigated how various literal values can be described. In this article we examine how information about facts…
This article is the second part of a series, examining the use of the Clojure language for representing Linked Data, with examples from Aesop's stories. Part one can be found on this site where the basic elements of the Fox and the Stork story were formalised. In this article we examine how literal values can be represented, using Clojure, in Linked Data. The code to enable the functionality…
The stories called Aesop's Fables or the Aesopica, are an ancient collection of stories that have been passed down to modern day. These stories are of diverse origins they cover a wide variety of themes. Although originally intended for an adult audience, in later times were often used for the education of children. One of such stories is the tale of the Fox and the Stork. There are many…
History is full of legends of ancient treasures and powerful artifacts, lost to time or hidden by purpose, that would bring glory, power and riches to their discoverer. A winged bull depicted on an on archaeological artifact from the Assyrian empire between 1400 and 1200 BC. Cylinder Seal with Winged Bull - Walters Art Museum Licensed under CC0. }} --> Although the history of software development…
Spider-Man is one of the most iconic heroes of the Marvel universe. Created by Stan Lee and Steve Ditko, Spider-Man is a regular teenager named Peter Parker, who due to being bitten by a radio-active spider, gains abilities such as the proportional strength of a spider, wall crawling and a spider sense to detect upcoming danger. One of the biggest draws of Spider-Man that although he is a…
Programmers, like professionals in other fields, are passionate about their tools. One of the main elements in the toolbox of coders are programming languages. They allow their users to express solutions through code to tackle a large variety of problems in many domains. Programming is also an art, as described in the article by Donald Knuth titled Computer Programming as an Art and in certain…
Welcome to the first post on my blog on which hopefully many will follow. My intention is to write about knowledge representation, reasoning, AI and coding, in an easily digestible but in depth-way.
Regulatory compliance is the goal of an organization to ensure it complies with all the relevant policies, regulations and laws. Failure to comply can have grave consequences for an organization, with huge fines and penalties being imposed. Regulatory pressure has been increasing over the years, with new and more complex regulation being enacted. This is especially true for the financial sector,…
The time of clinical health professionals is incredibly valuable. Software can alleviate the burden of physicians, nursers and other health experts and allow them to provide better, more effective health care to patients. Creating, maintaining and using software in clinical environments is a difficult process. Not only it is paramount that such software needs to be correct, it has to have an…
Software bugs and errors have a monumental negative impact on society. Not only can they have huge monetary cost, ranging into billions of dollars annually in the United States alone, but in some cases can even lead to disasters that lead to the loss of life. Preventing such issues from happening requires a large amount of effort in designing and maintaining software. However designing and…
Abstract "Semantic Web technologies have shown to have great potential in many different domains, to facilitate knowledge representation, exchange and reasoning, in a formal and yet both human and machine understandable way. In particular, within the health domain, they enable knowledge integration and understanding by explicitly defining and linking concepts and relationships using ontologies to…
Abstract "Semantic Web technologies are used in a variety of domains for their ability to facilitate data integration, as well as enabling expressive, standards-based reasoning. Deploying Semantic Web reasoning processes directly on mobile devices has a number of advantages, including robustness to connectivity loss, more timely results, and reduced infrastructure requirements. At the same time, a…
Abstract "Semantic Web technology is used extensively in the health domain, due to its ability to specify expressive, domain-specific data, as well as its capacity to facilitate data integration between heterogeneous, health-related sources. In the health domain, mobile devices are an essential part of patient self-management approaches, where local clinical decision support is applied to ensure…
Abstract "Assistive technologies in smart environments were developed in order to maintain and improve the quality of life of people with dementia or other health problems. In order to provide adequate support at the opportune moment, it is necessary to deploy ambient services, such as activity recognition and assistance planning. Clinical Decision Support Systems (CDSS) that implement clinical…
Abstract "Dynamic analysis is the analysis of the properties of a running program. In order to perform dynamic analysis, information about the running program is often collected through execution traces. Exploring and analyzing these traces can be an issue due to their size and that knowledge of a human expert is often needed to derive the required conclusions. In this paper we provide a framework…
Abstract "In this paper we present the possibility of using an ontology based framework in order to model Dynamic Analysis techniques. This work relies on similar ideas applied to the case of Static Analysis, in which ontologies are used to represent some knowledge about the programs to be analyzed. In the approach proposed in this paper we describe how ontologies can be applied to Dynamic…