Programming
In addition to the conventional “==” operator that checks if two objects are equal, Julia has the “===” operator to check for equality. What is the difference between these two operators? The “==” operator checks whether two objects have the same value. Here are some examples: Cell 5 shows that the RHS float value is […]
The ability to enumerate stack frames at runtime is one of the interesting features introduced in C++23. This is made possible through the <stacktrace> header. The interface is quite simple. Here is a piece of code showing how to use the library. There are 4 functions and here is the call chain: The “dumpStackTrace()” function […]
I had written about std::optional<> in an earlier article. C++23 introduces std::expected<> as an interesting extension to std::optional<>. Whereas std::optional<> contains a value or none at all, std::expected<> contains a value or an error code associated with it. This gives better control to the caller in terms of handling the outcome of the function call. […]
The defer statement in Vlang causes code to be executed when the enclosing function returns. This feature is inspired by Golang, but is slightly more flexible since it allows any block of code to be associated with defer instead of just a function call. defer is used primarily to handle “clean up” logic, such as […]
The relatively new V Programming Language (Vlang) boasts of some interesting features such as “fast compilation” and runtime performance “as fast as C”, at the same time being a “simple language”. As I normally do with other languages that I learn and use, I decided to see how easy it is to build a shared […]
A few weeks ago I registered with OpenAI to access its services through API and created a secret Key for my use. I then decided to build a simple application to try out the “Chat” and “Completion” models. Since I have several tools at my disposal (RAD Studio, LispWorks, Allegro CommonLisp, Visual Studio, and Xojo), […]
Julia supports calling external functions, especially those written in “C” language. As Julia documentation says, such calls do not involve any “boilerplate” code and hence are efficient. In today’s article, I am going to show how to call functions defined in a DLL (Windows 64 bit). Instead of using direct “C” functions, I will discuss […]
Title: Adventures in Rule-Based Programming – A CLIPS Tutorial Author: Gary Riley Publisher: Secret Society Software, LLC Year: 2022 In an earlier article, I had talked about the relevance of Rule-based systems today. In that article I had also listed a few Rule engines that are popular and widely used. One of them is CLIPS, […]
Recent Comments