Posts

Showing posts from 2020

Algorithmic Programming

fbp It’s 2020 and we have a plethora of programming languages each having it’s own USP. For business programming, this means the business logic has to be re-written using a new programming language almost every decade to benefit from the advances. Few months back, I had started on a goal of converting an algorithm to executable code with focus on easy maintenance, code re-usability and language independence. I’m glad to share an approach that might just work. Let me know if you find it useful. When one starts on a program, one writes the algorithm as a sequence of steps. Wouldn’t it be nice if a program could convert an algorithm into program and execute it? My approach maintains a one-to-one correspondence of the initial draft with the final program. The name kind of highlights that fact. People familiar with the subject might see similarities with Flow Based Programming (FBP). Though there have been many iterations and improvements on the basic theme, I’ll let t

Semantic font-lock for Java in Emacs

Image
I've been working on Semantic font-lock for Java using CEDET Semantic infrastructure which uses Wisent incremental parsing under the hood. Also it only highlights the visible text on the screen to keep the delays acceptable. So far the results look promising. Builtin font-lock uses jit-lock infrastructure. cc-mode provides the keywords and regexes for language specific highlighting. However, this lacks highlighting using any contextual information. Demo: https://youtu.be/4UcPIdTJLOM Noticeable features: Static variables and functions are highlighted differently. Constant variables are highlighted differently. Not only the declaration, but the usages are highlighted also. Package is highlighted correctly. It uses following face definitions for highlighting. (defvar semantic-format-face-alist `( (function . font-lock-function-name-face) (variable . font-lock-variable-name-face) (type . font-lock-type-face) ;; These are differe