Here is the definition of a computer language that I go by.
Instructions in human readable form that tell a computer what to do.
Based on this definition, I believe that RM and Webcore are computer languages.
Here is the definition of a computer language that I go by.
Instructions in human readable form that tell a computer what to do.
Based on this definition, I believe that RM and Webcore are computer languages.
I guess, but RM and Webcore are literally apps that run on Hubitat. Groovy is the actual programming language in use, and it is the language that both RM and Webcore apps are written in. An app is something designed for end users to perform specific tasks, in this case, making automations in Hubitat, and controlling devices.
Webcore is much closer to a programming language than RM, but it is still an app. I actually code my automations in Groovy directly, using the Groovy language to create an app in Hubitat that I then use, just like the people who programmed RM and Webcore apps used the Groovy language to create them.
You could maybe call RM an IDE, as it is a development environment. IDEs are used to create apps, using code, but even IDEs themselves are considered apps (Eclipse, NetBeans, Visual Studio, etc).
There is also the distinction between writing code directly using a language, and using app provided controls and fields. RM and Webcore apps have controls and input fields coded into them, they were coded for the user app functionality using the Groovy programming language.
If you write a paper, you wrote it using a language, building the logical sentences. RM is like a text to speech converter, as you can use a speech converter that to write a paper in the English language, even if you don't know how to read and write in English. RM lets you create automations that run in Groovy, even if you don't know how to write code in Groovy.
Fortran is called a programming language, but all it does is automate the process of taking human readable text and turning it into machine language. It doesn't matter how many steps it goes through along the way.
Yes, Fortran is a high level language, but it is a language. You can write an app with it it in a text file, and then compile it onto a running app. Maybe you could call RM a very very high level language, very very far removed from the compiled code that ultimately makes it work.
Already answered by RM's creator:
Technically speaking, Rule Machine, which lacks most of the major hallmarks of an actual programming language, is instead a domain-specific interface.
What was intended and what is are two different things.
Most programming languages are targeted at some specific area. For years I programmed in database languages. However, anything I did in a database language could have been done in Fortran or C. The reverse is also true.
The only REAL computer instructions are written entirely numerically. Which I have done in my far distant past. And the ultimate step is pure binary, which I have also done.
Unfortunately, my mind is no longer up to such tasks.
Fam, this definition is giving delulu dog water vibes. Ohio flex, but ok ![]()
I agree. Their creators may not have intended to create a language per se, but the fact remains that both of these systems produce human readable instructions in a structured form with syntax and semantics, even if not formally defined.
If one was so inclined, I'll bet that a compiler could be written to parse the "code" that RM and WebCore generates into an AST which could then be used to generate whatever output you wanted (e.g.: Groovy, Java, C#, etc. or even directly into machine code).
I actually think it would be relatively easy as you can assume that whatever RM or WC generates is both syntactically and semantically correct. Since neither is a true language with a Backus-Naur Form that formally defines them, you'd have to create one, but it shouldn't be terribly difficult.
In another life I wrote a non-trivial compiler (and supporting runtime libraries) so I have a good understanding of what's involved.
I'm not so inclined though
although it would be an interesting exercise.
I think that RM and Webcore are programming languages.
Computers understand 1 and they understand 0 and that's about it. There are any number of ways to get the necessary instructions in a format that the computer can understand, while still being relatively straight forward for humans to create.
I'm old. I started programming on punch cards in a language called RPG. I think it stood for Report Program Generator, but we fondly referred to it as Random Page Generator. Writing in it required a template that was used to determine what holes to punch on the card. At one point in my checkered career, I also had a lot of fun writing CICS in self-modifying Assembly language. (No desire to do this today.) And I've done stuff in a myriad of other languages. Some were more removed from the bare metal than others, but all were ultimately converted to 1s and 0s.
If I create instructions and a computer does what I tell it to, I think that's a language.
To me rule machine is more of a script than a language as it is executed by groovy which itself is executed by a java virtual machine. Rule Machine is several abstraction layers removed from the metal (machine code). It looks like a language but is missing many of the features of a programming language. Never the less it is close enough that one trained in a language which compiles into machine code can learn it quickly.
This may be because I'm getting too old, but I have found that my previous training is often getting in the way of using RM. My mind makes assumptions based on past experience that are incorrect for RM.
I'm sure that with a few more weeks of RM under my belt, I'll have my mind retrained, and things will go smother.
A thing I learned many years ago, is that the best language for a job is the one you know the best. So far, I have not found a task I wanted to do that could not be done in RM.
Just my 2 cents.....
I've been writing code since I learned assembly back in the early 70's. Semantics or not, I feel that WC certainly is a programming language.
That was my hurdle too. Looks like coding. I could do such and so with a function or an array or a sub routine. But not available. The other was in that devices can be controlled physically as well as digitally so be able to track that. And some of the logic can be in the trigger conditionals and even from another App skipping the triggers (the rules are even called apps). Keep after it and the logic of how it plays together are revealed. Expect to redo a rule several times the result of an ah ha.
When I started to use HE + RM for all my automations I thought the RM code is interpreted (if not compiled) by Java engine. So I asked Bruce this question. The answer was neither one. Later I learned the HE functionality is based on Data Base. But regardless to my eyes the RM code looks like an application specific Programming Language. You feed the RM code into black box (HE hadware plus many different software layers), it executing this code and produces a result you asked for.
That was my first exposure to programming languages. Everything was on punch cards and once a week we made a trip to the school's admin building and the computer staff would run our cards when they had spare time and we'd get the results the next week. Heaven help you if you dropped the box of cards. For some unknown reason, I kept my copy of the IBM RPG programming manual until about 10 years or so when I moved and purged a lot of old stuff.
I remember reading that answer from Bruce as well. I never understood why RM didn't generate Groovy or Java code and compile it into a native app. Maybe the performance gain wouldn't be worth the effort.
Yup! RPG on 80-column cards and COBOL on 96-column cards. And lord help you if the student who ran your cards had the paper in the printer wrong because your assignment was going to be either incorrect or late.
I threw away my old templates and manuals and stuff a while back when I was cleaning house one day and decided that I was firmly retired. I kept the IBM 360/370 Principles Of Operations (known as the POO book) because it was the only useful manual IBM every printed.
I have a hard time to understand how DB entries translates into machine code (eventually it does because CPU understands only a machine code). Yes, a performance gain could be significant if RM code compiles into a machine code after hitting a Done Button. I thought this is/was a case but apparently it is not.