Tag: LISP

Elixir: Wrapping Lisp Calls in a Macro

Written by on August 1, 2020 in Elixir, LISP, Programming with 0 Comments
Elixir: Wrapping Lisp Calls in a Macro

In the last article, I showed how to make calls to Lisp functions from Elixir. We followed this pattern: 1) Initialize the Lisp environment by calling Lisp.init 2) Call Lisp functions as needed 3) Free the Lisp environment by calling Lisp.quit Using the powerful macro programming capabilities of Elixir, we can write a simple macro […]

Continue Reading

Calling Lisp Functions from Elixir

Written by on July 19, 2020 in Elixir, LISP, Programming with 0 Comments
Calling Lisp Functions from Elixir

In the last article I showed how we can simulate the idea of Lisp’s “closure” in Elixir. Today, I would like to demonstrate how we can call Lisp functions from Elixir using the NIF interface. What is the need to integrate Elixir with another language? I can think of two reasons: 1) We have a library […]

Continue Reading

Closure in Lisp vs Elixir

Written by on July 5, 2020 in Elixir, LISP, Programming with 0 Comments
Closure in Lisp vs Elixir

I started learning Elixir a week ago. Although this has been at the top of my To-do list for quite a while, I couldn’t take it up due to other commitments.  I love Elixir. It is a great functional programming language. Having programmed in Lisp for a long time, I immediately noticed the similarity between Lisp […]

Continue Reading

Calling Lisp Functions from Go Language

Written by on June 10, 2018 in Golang, LISP, Programming with 0 Comments
Calling Lisp Functions from Go Language

In the previous post, we saw how to invoke a Go function from Lisp. In today’s post, I would like to explain how to go in the other direction, namely, how to call Lisp functins from Go. There are two ways to do this. The first approach is to load the Lisp DLL (like any […]

Continue Reading

Calling Go Functions from Lisp

Written by on May 27, 2018 in Golang, LISP, Programming with 1 Comment
Calling Go Functions from Lisp

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 language! Due to lack of […]

Continue Reading

CLPython: Python in Common Lisp – Part 2

Written by on July 22, 2017 in LISP, Programming, Python with 0 Comments

We looked at the basic features of CLPython in our last blog. In today’s post let us look at the support for Python classes. PYTEST 130 > (defun pyclass ()   (run  “class Employee:    def __init__(self, name, dept):      self.name = name      self.dept = dept    def dump(self):      print ‘Name […]

Continue Reading

CLPython – Python in Common Lisp

Written by on July 7, 2017 in LISP, Python with 0 Comments

My work in the area of NLP requires me to work with several frameworks across multiple languages such as Java, Python and Lisp. Sometime ago I got a chance to experiment with CLPython, an open-source implementation of Python in Common Lisp. Although CLPython is not under active development now, I found it quite usable. In fact […]

Continue Reading

Definite Clause Grammars in Lisp – Part 3

Written by on June 23, 2017 in LISP, Natural Language Processing, Programming with 0 Comments
Definite Clause Grammars in Lisp – Part 3

In today’s post, let us see how we can enhance the grammar representation discussed so far to include both Number constraint and Parse Tree. Fortunately, this turns out to be quite straightforward. Just as we do in Prolog, we need to include additional parameters, as needed, to each grammar rule. In the earlier two posts, […]

Continue Reading

Accessing Azure BLOBs in Lisp

Written by on April 8, 2017 in LISP, Programming with 0 Comments
Accessing Azure BLOBs in Lisp

Recently I was looking for a Common Lisp library for accessing Azure services. Azure has official SDKs in many languages, but Lisp is not one of them. Quite understandable and I have no complaints. Because the services are all exposed via REST interfaces, it should not be difficult to implement a Lisp wrapper to use […]

Continue Reading

Multi-value Return in C# 7.0

Written by on February 3, 2017 in Programming with 0 Comments
Multi-value Return in C# 7.0

One of the nice language enhancements to C# in the latest release (7.0) is the ability to return multiple values from a function. Although one could use Tuples for this purpose, it is not an elegant or efficient approach. For more details, see this article. By the way, returning multiple values from a function is […]

Continue Reading

Top