{"id":2645,"date":"2021-12-25T13:36:54","date_gmt":"2021-12-25T08:06:54","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=2645"},"modified":"2021-12-25T13:36:54","modified_gmt":"2021-12-25T08:06:54","slug":"calling-lisp-functions-from-d-language","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2021\/12\/25\/calling-lisp-functions-from-d-language\/","title":{"rendered":"Calling Lisp Functions from D Language"},"content":{"rendered":"<p>After exploring <em><strong>&#8220;newLisp&#8221;<\/strong><\/em> in the past few posts, I would like to start looking at the <a href=\"https:\/\/dlang.org\" target=\"_blank\" rel=\"noopener\"><em><strong>&#8220;D Programming Language&#8221;<\/strong><\/em><\/a>\u00a0(<em><strong>DLang<\/strong><\/em>).<\/p>\n<p><em><strong>DLang<\/strong><\/em>\u00a0has been around since 2001. It was originally created by <em><strong>Walter Bright<\/strong><\/em> and later <em><strong>Andrei Alexandrescu<\/strong><\/em> joined the team in 2007. The main inspiration for <em><strong>DLang<\/strong><\/em> was <em><strong>C++<\/strong><\/em>, although it uses ideas from other languages such as <em><strong>Eiffel<\/strong><\/em>, <em><strong>Java<\/strong><\/em> and <em><strong>Python<\/strong><\/em>.<\/p>\n<p>Incidentally, <em><strong>Walter Bright<\/strong><\/em> was also the creator of the famous <em><strong>Zortech C++ Compiler<\/strong><\/em>,\u00a0which I had used in early 1990s.<\/p>\n<p>The first thing I look for when I work with a new language is its interoperability with <em><strong>C\/C++<\/strong><\/em> (<em><strong>C<\/strong><\/em> is considered by many as the <em><strong>&#8220;universal assembly language&#8221;<\/strong><\/em>). In that respect, <em><strong>D<\/strong> <\/em>scores high.<\/p>\n<p>In today&#8217;s post, I would like to show how a program written in <em><strong>D<\/strong><\/em> can call a <em><strong>Lisp<\/strong><\/em> function. My example uses <a href=\"http:\/\/www.lispworks.com\" target=\"_blank\" rel=\"noopener\"><em><strong>LispWorks Lisp<\/strong><\/em><\/a>\u00a0 64 bit edition for <em><strong>Windows<\/strong><\/em>. For programming in <em><strong>D<\/strong><\/em> and building the project, I am using <a href=\"https:\/\/rainers.github.io\/visuald\/visuald\/StartPage.html\" target=\"_blank\" rel=\"noopener\"><em><strong>&#8220;VisualD&#8221;<\/strong><\/em><\/a>\u00a0installed in <em><strong>Visual Studio 2017<\/strong><\/em>, Professional Edition, on <em><strong>Windows<\/strong><\/em>.<\/p>\n<p>First, here is the simple <em><strong>Lisp<\/strong><\/em> program:<\/p>\n<figure id=\"attachment_2646\" aria-describedby=\"caption-attachment-2646\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Lisp.jpg?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"2646\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/12\/25\/calling-lisp-functions-from-d-language\/lisp\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Lisp.jpg\" data-orig-size=\"1011,360\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640414717&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Lisp Function Called from D\" data-image-description=\"&lt;p&gt;Lisp Function Called from D&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Lisp Function Called from D&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Lisp.jpg\" class=\"wp-image-2646\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Lisp.jpg?resize=550%2C196&#038;ssl=1\" alt=\"Lisp Function Called from D\" width=\"550\" height=\"196\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Lisp.jpg?resize=300%2C107&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Lisp.jpg?resize=768%2C273&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Lisp.jpg?resize=675%2C240&amp;ssl=1 675w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Lisp.jpg?w=1011&amp;ssl=1 1011w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2646\" class=\"wp-caption-text\"><strong>Lisp Function Called from D<\/strong><\/figcaption><\/figure>\n<p>The program takes an <em><strong>&#8220;int64&#8221;<\/strong><\/em> parameter and returns another <em><strong>&#8220;int64&#8221;<\/strong> <\/em>value. It uses <em><strong>Lisp&#8217;s<\/strong><\/em> built-in function <em><strong>&#8220;random&#8221;<\/strong><\/em> to generate a random number.<\/p>\n<p><em><strong>LispWorks Lisp<\/strong><\/em> has extensive support for <em><strong>Foreign Language Interface<\/strong><\/em> (<em><strong>FLI)<\/strong><\/em>. Here is the script to build the 64-bit DLL:<\/p>\n<figure id=\"attachment_2647\" aria-describedby=\"caption-attachment-2647\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Build-dll.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2647\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/12\/25\/calling-lisp-functions-from-d-language\/build-dll\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Build-dll.jpg\" data-orig-size=\"1184,640\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640414560&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Building Lisp DLL\" data-image-description=\"&lt;p&gt;Building Lisp DLL&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Building Lisp DLL&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Build-dll-1024x554.jpg\" class=\"wp-image-2647\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Build-dll.jpg?resize=600%2C324&#038;ssl=1\" alt=\"Building Lisp DLL\" width=\"600\" height=\"324\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Build-dll.jpg?resize=300%2C162&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Build-dll.jpg?resize=1024%2C554&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Build-dll.jpg?resize=768%2C415&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/Build-dll.jpg?w=1184&amp;ssl=1 1184w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-2647\" class=\"wp-caption-text\"><strong>Building Lisp DLL<\/strong><\/figcaption><\/figure>\n<p>Once the <em><strong>DLL<\/strong><\/em> is available, there are essentially two ways to use it:<\/p>\n<p style=\"padding-left: 40px;\">1) Create a <em><strong>LIB<\/strong><\/em> file from the <em><strong>DLL<\/strong><\/em> and link it statically with <em><strong>D<\/strong><\/em> code<\/p>\n<p style=\"padding-left: 40px;\">2) Load the <em><strong>DLL<\/strong><\/em> functions dynamically and call from <em><strong>D<\/strong><\/em><\/p>\n<p>I have chosen to go with the second approach because it is easier in this case.<\/p>\n<p>Here is the <em><strong>D<\/strong><\/em> program that makes a call to the <em><strong>Lisp<\/strong><\/em> function:<\/p>\n<figure id=\"attachment_2648\" aria-describedby=\"caption-attachment-2648\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/DCode.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2648\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/12\/25\/calling-lisp-functions-from-d-language\/dcode\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/DCode.jpg\" data-orig-size=\"990,708\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640343670&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"The D Program\" data-image-description=\"&lt;p&gt;The D Program&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;The D Program&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/DCode.jpg\" class=\"wp-image-2648\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/DCode.jpg?resize=550%2C393&#038;ssl=1\" alt=\"The D Program\" width=\"550\" height=\"393\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/DCode.jpg?resize=300%2C215&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/DCode.jpg?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/DCode.jpg?w=990&amp;ssl=1 990w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2648\" class=\"wp-caption-text\"><strong>The D Program<\/strong><\/figcaption><\/figure>\n<p>In <em><strong>VS 2017,<\/strong><\/em> when you create a <em><strong>&#8220;New Project&#8221;<\/strong><\/em>, you need to select <em><strong>&#8220;D\/VC++ Based Windows Application&#8221;<\/strong><\/em>.<\/p>\n<figure id=\"attachment_2649\" aria-describedby=\"caption-attachment-2649\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/ProjectType.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2649\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/12\/25\/calling-lisp-functions-from-d-language\/projecttype\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/ProjectType.jpg\" data-orig-size=\"1274,476\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640421602&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Visual Studio Project Type\" data-image-description=\"&lt;p&gt;Visual Studio Project Type&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Visual Studio Project Type&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/ProjectType-1024x383.jpg\" class=\"wp-image-2649\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/ProjectType.jpg?resize=550%2C205&#038;ssl=1\" alt=\"Visual Studio Project Type\" width=\"550\" height=\"205\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/ProjectType.jpg?resize=300%2C112&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/ProjectType.jpg?resize=1024%2C383&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/ProjectType.jpg?resize=768%2C287&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/ProjectType.jpg?w=1274&amp;ssl=1 1274w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2649\" class=\"wp-caption-text\"><strong>Visual Studio Project Type<\/strong><\/figcaption><\/figure>\n<p>Once the project is open, here is how the <em><strong>&#8220;Solution Explorer&#8221;<\/strong><\/em> looks:<\/p>\n<figure id=\"attachment_2650\" aria-describedby=\"caption-attachment-2650\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/SolutionExplorer.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2650\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2021\/12\/25\/calling-lisp-functions-from-d-language\/solutionexplorer\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/SolutionExplorer.jpg\" data-orig-size=\"423,356\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640421743&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Solution Explorer\" data-image-description=\"&lt;p&gt;Solution Explorer&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Solution Explorer&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/SolutionExplorer.jpg\" class=\"size-medium wp-image-2650\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/SolutionExplorer.jpg?resize=300%2C252&#038;ssl=1\" alt=\"Solution Explorer\" width=\"300\" height=\"252\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/SolutionExplorer.jpg?resize=300%2C252&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/12\/SolutionExplorer.jpg?w=423&amp;ssl=1 423w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2650\" class=\"wp-caption-text\"><strong>Solution Explorer<\/strong><\/figcaption><\/figure>\n<p>When you build and run the project from within the <em><strong>IDE<\/strong><\/em>, the program prints the value received from the <em><strong>Lisp<\/strong><\/em> function. Because the <em><strong>Lisp<\/strong><\/em> function uses <em><strong>&#8220;random&#8221;<\/strong> <\/em>internally, the result will be different each time you run the <em><strong>D<\/strong><\/em> program.<\/p>\n<p>I did not face any challenge in interfacing <em><strong>D<\/strong><\/em> with my <em><strong>Lisp<\/strong><\/em> function in 64-bit mode. This is likely to be the case when interfacing <em><strong>D<\/strong><\/em> with any other language (e.g. <em><strong>Elixir<\/strong><\/em>, <em><strong>Go<\/strong><\/em>, etc.) that has a well-documented <em><strong>C<\/strong><\/em> language interface.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>You can download the sources <a href=\"http:\/\/www.rangakrish.com\/downloads\/D-Lisp Sources.zip\" target=\"_blank\" rel=\"noopener\"><em><strong>here<\/strong><\/em><\/a>.<\/p>\n<p>That is it for this article. <em><strong>Have a Merry Christmas and a Wonderful New Year 2022!<\/strong><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After exploring &#8220;newLisp&#8221; in the past few posts, I would like to start looking at the &#8220;D Programming Language&#8221;\u00a0(DLang). DLang\u00a0has been around since 2001. It was originally created by Walter Bright and later Andrei Alexandrescu joined the team in 2007. The main inspiration for DLang was C++, although it uses ideas from other languages such [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[302,18,17],"tags":[304,303],"class_list":["post-2645","post","type-post","status-publish","format-standard","hentry","category-d-language","category-lisp","category-programming","tag-d-language","tag-lisp-dll"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-GF","jetpack-related-posts":[{"id":2668,"url":"https:\/\/www.rangakrish.com\/index.php\/2022\/01\/23\/template-mixins-in-d-programming-language\/","url_meta":{"origin":2645,"position":0},"title":"Template Mixins in D Programming Language","author":"admin","date":"January 23, 2022","format":false,"excerpt":"When I heard the name Mixin\u00a0for the first time in the context of Dlang, I imagined it would be something similar to the mixins\u00a0of Common Lisp, but I was completely wrong!\u00a0 Mixins are a very interesting feature of D language. They allow code to be \"injected\" into the source at\u2026","rel":"","context":"In &quot;D Language&quot;","block_context":{"text":"D Language","link":"https:\/\/www.rangakrish.com\/index.php\/category\/d-language\/"},"img":{"alt_text":"Simple Template Mixin","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/01\/Defn-300x98.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2658,"url":"https:\/\/www.rangakrish.com\/index.php\/2022\/01\/09\/universal-function-call-syntax-ufcs-in-d-language\/","url_meta":{"origin":2645,"position":1},"title":"Universal Function Call Syntax (UFCS) in D Language","author":"admin","date":"January 9, 2022","format":false,"excerpt":"One of the many \"cool' features of Dlang is \"Universal Funcion Call Syntax\", which permits non-member functions to be invoked using the member function call syntax. When you add to this the fact that this applies not just to user-defined types but to primitive types as well, things get interesting.\u00a0\u2026","rel":"","context":"In &quot;D Language&quot;","block_context":{"text":"D Language","link":"https:\/\/www.rangakrish.com\/index.php\/category\/d-language\/"},"img":{"alt_text":"Example-1","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/01\/Example1-300x234.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/01\/Example1-300x234.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/01\/Example1-300x234.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3555,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/11\/22\/multiobjective-optimization-moo-in-lisp-and-prolog\/","url_meta":{"origin":2645,"position":2},"title":"Multiobjective Optimization (MOO) in Lisp and Prolog","author":"admin","date":"November 22, 2024","format":false,"excerpt":"Recently I came across a nice article\u00a0by Jose Crespo, where the author stresses that the future of programming revolves around the application of math concepts such as Functor, Monads, Folds, etc. In addition, he argues that familiarity with C\/C++ is essential in this modern AI age. The author goes through\u2026","rel":"","context":"In &quot;C++&quot;","block_context":{"text":"C++","link":"https:\/\/www.rangakrish.com\/index.php\/category\/c\/"},"img":{"alt_text":"Lisp Code for Pareto Front","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/11\/lisp-code-249x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3070,"url":"https:\/\/www.rangakrish.com\/index.php\/2023\/04\/02\/building-v-language-dll\/","url_meta":{"origin":2645,"position":3},"title":"Building V Language DLL","author":"admin","date":"April 2, 2023","format":false,"excerpt":"The relatively new V Programming Language (Vlang) boasts of some interesting features such as \u201cfast compilation\u201d and runtime performance \u201cas fast as C\u201d, at the same time being a \u201csimple language\u201d. As I normally do with other languages that I learn and use, I decided to see how easy it\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.rangakrish.com\/index.php\/category\/programming\/"},"img":{"alt_text":"V Program","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2023\/04\/V-source-267x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":928,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/05\/27\/calling-go-functions-from-lisp\/","url_meta":{"origin":2645,"position":4},"title":"Calling Go Functions from Lisp","author":"admin","date":"May 27, 2018","format":false,"excerpt":"For the past few weeks I was travelling in the USA and had the pleasure of meeting several friends, some of whom are senior developers and architects. It was interesting to learn that many of them were either using Go language in their daily work, or were passionately endorsing the\u2026","rel":"","context":"In &quot;Golang&quot;","block_context":{"text":"Golang","link":"https:\/\/www.rangakrish.com\/index.php\/category\/golang\/"},"img":{"alt_text":"Part of Header File","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/05\/Header-file.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/05\/Header-file.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/05\/Header-file.png?resize=525%2C300 1.5x"},"classes":[]},{"id":2927,"url":"https:\/\/www.rangakrish.com\/index.php\/2022\/10\/20\/why-learn-lisp\/","url_meta":{"origin":2645,"position":5},"title":"Why Learn Lisp?","author":"admin","date":"October 20, 2022","format":false,"excerpt":"In the last article, I had shared my views on why programmers should learn Prolog, preferably as the first language. What language should one learn next? I strongly pitch for Lisp, to be precise, \u201cCommon Lisp\u201d. Lisp happens to be the second oldest (1958) programming language, only after Fortran (1957)!\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=2645"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2645\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=2645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=2645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=2645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}