{"id":1642,"date":"2019-03-18T20:23:38","date_gmt":"2019-03-18T20:23:38","guid":{"rendered":"http:\/\/demensdeum.com\/blog\/?p=1642"},"modified":"2024-12-16T22:32:40","modified_gmt":"2024-12-16T19:32:40","slug":"zakaz","status":"publish","type":"post","link":"https:\/\/demensdeum.com\/blog\/2019\/03\/18\/zakaz\/","title":{"rendered":"Declarative language Zakaz"},"content":{"rendered":"<\/p>\n<p>I present to your attention a pure declarative programming language &#8211; Zakaz. The main idea of \u200b\u200bthe new language is that an application contains commands for execution, written in any form, which must be executed by &#8220;executors&#8221;. If no &#8220;executor&#8221; can execute a command, then the program execution stops. Applications are called technical tasks (tez) and must have the extension .tez. The syntax of Zakaz requires two rules to be followed:<\/p>\n<\/p>\n<\/p>\n<ul class=\"wp-block-list\">\n<li>Each command starts on a new line<\/li>\n<li>Each command must be written in formal language that is understandable to humans<\/li>\n<\/ul>\n<\/p>\n<p>Example Hello World.tez:<\/p>\n<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\">Show <span style=\"background-color: #fff0f0;\">\"Hello World\"<\/span> text on screenShow <span style=\"background-color: #fff0f0;\">\"Zakaz 'tez' example\"<\/span> text on screen<\/pre>\n<\/div>\n<p>An example of a technical specification that displays a description of the operating principle and opens the site http:\/\/demensdeum.com in the Firefox browser<\/p>\n<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\">Show <span style=\"background-color: #fff0f0;\">\"Show website demo\"<\/span> text on screenShow <span style=\"background-color: #fff0f0;\">\"You need Firefox installed on your system to run this 'tez', and it should be callable through <\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0;\">\\\"<\/span><span style=\"background-color: #fff0f0;\">system<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0;\">\\\"<\/span><span style=\"background-color: #fff0f0;\"> C function\"<\/span> text on screenShow <span style=\"background-color: #fff0f0;\">\"Also there should be <\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0;\">\\\"<\/span><span style=\"background-color: #fff0f0;\">FirefoxPerformer<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0;\">\\\"<\/span><span style=\"background-color: #fff0f0;\"> assigned to Zakaz Runtime, please check manual for more information\"<\/span> text on screenShow website with address <span style=\"background-color: #fff0f0;\">\"http:\/\/demensdeum.com\"<\/span> in Firefox<\/pre>\n<\/div>\n<p>The example above must be run together with the FirefoxPerformer executor, which is capable of handling the last command to output the site via Firefox<\/p>\n<\/p>\n<pre class=\"wp-block-preformatted\">.\/ZakazRuntime openDemensdeumSite.tez FirefoxPerformer<\/pre>\n<\/p>\n<p>To implement your own performer, you need to implement it as a dynamic library using the abstract class ZakazRuntime::Performer, and return it together with a smart pointer from the global function method createPerformer(). As an example, you can use the implementation of FirefoxPerformer.<\/p>\n<\/p>\n<h2 class=\"wp-block-heading\">Source code<\/h2>\n<\/p>\n<p><a href=\"https:\/\/gitlab.com\/demensdeum\/zakaz\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"https:\/\/gitlab.com\/demensdeum\/zakaz (opens in a new tab)\">https:\/\/gitlab.com\/demensdeum\/zakaz<\/a><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I present to your attention a pure declarative programming language &#8211; Zakaz. The main idea of \u200b\u200bthe new language is that an application contains commands for execution, written in any form, which must be executed by &#8220;executors&#8221;. If no &#8220;executor&#8221; can execute a command, then the program execution stops. Applications are called technical tasks (tez)<a class=\"more-link\" href=\"https:\/\/demensdeum.com\/blog\/2019\/03\/18\/zakaz\/\">Continue reading <span class=\"screen-reader-text\">&#8220;Declarative language Zakaz&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[84],"tags":[],"class_list":["post-1642","post","type-post","status-publish","format-standard","hentry","category-software","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"en","enabled_languages":["en","ru","zh","de","fr","ja","pt"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"ru":{"title":true,"content":true,"excerpt":false},"zh":{"title":true,"content":true,"excerpt":false},"de":{"title":true,"content":true,"excerpt":false},"fr":{"title":true,"content":true,"excerpt":false},"ja":{"title":true,"content":true,"excerpt":false},"pt":{"title":true,"content":true,"excerpt":false}}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/posts\/1642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/comments?post=1642"}],"version-history":[{"count":10,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/posts\/1642\/revisions"}],"predecessor-version":[{"id":3966,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/posts\/1642\/revisions\/3966"}],"wp:attachment":[{"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/media?parent=1642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/categories?post=1642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/tags?post=1642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}