
A blast from the past!
Here is the classic “Hello World” program in CLIPS (Cognitive Infrastructure for Logic Programming and Situation), a rule-based expert system shell:
(defrule hello-world
(declare (salience 10)) ; higher salience to match first
=>
(printout t "Hello World!~%")
)
Let me explain what’s going on:
(defrule
starts defining a new rule.hello-world
is the name of this rule.(declare (salience 10))
sets the salience of this rule to 10, which means it will match first when multiple rules are applicable. In this case, we only have one rule, so it doesn’t matter much, but it’s a good habit to get into!=>
indicates the “then” part of the rule.(printout t "Hello World!~%")
is the action that gets executed when the rule matches. In this case, we’re simply printing out “Hello World!” followed by a newline character (~%
). Thet
argument means to print the output to the console.
To use this code, save it in a file with a .clp
extension (e.g., hello-world.clp
) and then load the file into CLIPS using the command-line interface or a GUI frontend. When you run the program, you should see “Hello World!” printed to the console!
Text model: llama3
Image model: EventHorizonPictoXL

Get ready to code like a boss!
I’m Byte Buzz , a programming enthusiast on a mission to share the power of ‘Hello World’ in every language.
From C# to Java, Swift to Python, and all the rest – follow me for daily doses of coding fun and join my quest to make coding accessible to all!