Jaspers Personal webpage
Home
Blog
Projects
Various smaller projects
About me

Projects

This is current/more significant projects, see small projects for the rest.

General Interface Language/Library (Gil)

GIL is currently the main part of the lisp-editor project (i have to update that website, git-repo), which lead me to want to make lisp tools, but in making autodocumentation, i wanted multiple outputs, leading to me making an library/language to do so. (Originally i used LML2.)

Note that i deliberately call it library/language and language/library interchangably, it really is meant to be both. The idea is that, more strongly than code=data, it is 'code as in function usage' = data. I wrote this file in Gil, and this file is data-like, whereas i also use Gil in autodoc, and its use there is library-like.

Gil currently outputs html, used to also output plaintext and Latex, but made changes that broke them. Currently it is more like a general markdown library/language though, it might be that it might not be able to live up to the tile 'interface' gracefully. (then it would have to output scripts to specify rather arbitrary gui behavior.) The word 'interface' might be too ambigious too..

Parts of the lisp-editor project were tools to get data from the code, and autodocument:

Expression hook

Basically it re-evaluates all the macros and allows you to look at all the expressions of them via a function you set. (Unlike lisps macrohook, which only looks at the macros.)

Expression scan

Uses above hook to gather information about functions, macros, variables.

Autodoc

Automatically generates documentation from that data. Can work on packages, 'load-files'(lisp files saying (load "..") and asdf systems. Likely the expression scan could still provide more and autodoc could still use more useful information.

Rinse

My attempt on improving upon current Lisps. Originally, even less originally, called Lang-lisp. (That website desparately needs updating).

It takes the ideas of Lisp(For one, must have closures), of course, and adds:

  • Make a simple effective type system. This works by:
    • Allowing the user to define functions that calculate resulting types of functions. This way the user can make type calculation more accurate. ('Base functions' already have them.)
    • If no 'function' to calculate types are provided, it calculates the type by recursively using the functions of the components it consists of, until reaching the base functions.
  • Allow more things to implemented via libraries because of that. Of course, if the language is very minimal, some of those will be very standard, and come with the language, but it is important that they are conceptually, and in implementation, libraries.
  • Fix some basic things, like not being able to 'overload' operators like +,- etcetera, not having vectors of those, having so many and different names for gethash, getf, assoc.
  • Base on transformations of one kind of code, transforming until it suits the output-language. (I wasn't the first to pick up this idea.)

Progress

My main project is currently GIL and surrounding, but progress has been made on this project aswel.
  • Type inference with closures works. See this blogpost for more.
  • Made headway to output to C. However, very undertested, there might still be some bugs.

Denest

Actually a small macro, but put it here anyway. It is realization that lisp tends to get to nested, and you need to denest it. It comes with some extra utility macros outside this role, to fill a similar role to not only LOOP and iterate, but also things like bind, and let-star

The simplest complete description of denest:

(defmacro denest (&rest args) (if (null (cdr args)) (car args) `(,@(car args) (denest ,@(cdr args)))))

Its principal advantage is that it uses other macros, rather than have a more closed system.

Denest is, by the way, hardly the first iteration of messing with macros to change how i do things. I felt a little silly 'inventing' it, as it is a little obvious.

It used to be here where also earlier messing around with macros is located. but now i just put it in the Gil project for convenience. It is also in the 'small projects' tarball.