Name: Jasper den Ouden
Member since: 2009-04-03 17:06:28
Last Login: 2009-05-17 15:53:06

Homepage: http://lang-lisp.berlios.de/

Notes:

Homepage not really homepage,just largest project of mine, might come later.

Recent blog entries by Jasper1984

Higher order functions, what does the data do for you? (Thinking out loud)

A while ago, i thought about how higher order functions in a language require garbage collection.(All be it without loops, afaics.)

Now, i understand how to use recursion pretty well. Recursion provides one with a stack, so the implementor does not have to keep track of that data himself.

So, this brings up the question, can i understand the data higher order functions keep for you the same way i under stack, and does this suggest other ways of coding that are better?

Maybe i haven't read enough books though :), maybe it is obvious to some people.

How Lang does conversion to C or Lisp

Lang has a reader, reading trees with the symbols, a resolver, which resolves all the types from constants specification by the user and function overloading. This little article is about what follows, converting to C, or Lisp. (Or anything else)

From that last one one also, of course wants to convert to something that can actually execute. I used to have a rather ugly function to convert to C directly. The problem with that is that C does not have higher order functions or bodies inside function arguments.

The older solution solved that in the conversion itself, which is probably why it stunk so much. The newer version works differently; it uses conversion functions that can only convert a subset of Lang.

However, i add transformations that change Lang code such that it is in those subsets. That way, if i want to add conversions to other languages, it should be easy, unless the language a smaller subset then previously encountered. In that case, i would have to make another transformation. I might be overconfident here, though.

Note that it is still very incomplete, no higher order functions yet. Making a transformation to that subset for C might be tricky, for conversion to Common Lisp it isn't a subset. Another thing that i didn't do yet is types for the common lisp version. First, i am planning to express number types like this: (integer from to) and (number from to), that would work with lisp better. (I also want to keep C-like number treatment though.)

This principle, and the code might well be able to convert Common Lisp to other stuff as wel, i guess i don't have to worry that this work is useless if the Lang project fails.

3 Apr 2009 (updated 7 Apr 2009 at 13:11 UTC) »
Hello,

My main interests are in Lisp languages. But i know C/C++.

I am working on a lisp language of my own, because i consider common lisps type system too much just slapped on an untyped system.

Lately i have been daunted by this challenge though, i still have to learn more about typed lambda calculus, Haskell, and other attempts on what i have been trying.

 

Others have certified Jasper1984 as follows:

  • fzort certified Jasper1984 as Apprentice

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page