cl-parametric-types icon indicating copy to clipboard operation
cl-parametric-types copied to clipboard

Several questions.

Open commander-trashdin opened this issue 5 years ago • 10 comments

  1. So this is implemented in pure common lisp without using any c/c++ code and cffi?

  2. Any plans for future updates and getting out of beta?

commander-trashdin avatar Oct 25 '18 18:10 commander-trashdin

Exactly, pure lisp. It started as an exercise to demonstrate that c++-style templates can be implemented using macros, including partial specialization and compile-time Turing completeness.

My interest decreased when I realized that macros run too early in the lisp compiler to ask for the type of an expression, and thus type inference cannot be implemented.

So it's basically stalled as a fully functional proof-of-concept

cosmos72 avatar Oct 25 '18 18:10 cosmos72

I suppose you can say that type inference is up to those responsible for sbcl and general language standards. I wonder if there's a way to add something major to them right now.

commander-trashdin avatar Oct 25 '18 18:10 commander-trashdin

Okay, so we have been working on the problem, and here are the results (my lib and what its built on, mine is just a big sketch for now). Unsure if you are still interested in the topic, or in lisp at all, maybe this will help. Or maybe not) https://github.com/commander-trashdin/cl-overload https://github.com/digikar99/adhoc-polymorphic-functions

commander-trashdin avatar Mar 19 '21 17:03 commander-trashdin

I am still interested in the topic, but my motivation is shifting toward making a new language that is separate from common lisp.

guicho271828 avatar Mar 22 '21 17:03 guicho271828

I can understand that. I was thinking about that too. However, this is a "lisp curse" in its purest form -- that is, doing something completely new is a .... well, a wormhole. There are already some foundations at least, like Carp or something.

As a said note, to deal with all those problems I started gathering all the suggestions here: https://github.com/commander-trashdin/clng I feel like for a new language or for something along those lines there should be some concentrated interested form at least part of community.

commander-trashdin avatar Mar 22 '21 18:03 commander-trashdin

My official job is to do research, so that is not much of a problem. Im making a living for making something new. Thanks for the clng link, some are overlapping with my interest. I am less interested in consolidation e.g. api, libraries or naming convensions. My focus will be on compilers and type systems and machine learning.

guicho271828 avatar Mar 24 '21 17:03 guicho271828

We are trying to deal directly with CL type system and in particular sbcl inferer. That is obviously required to make a proper static dispatch. If you have sbcl-devel subscription, you probably saw related conversation. Currently I'm trying to come up with some sort of metatype protocol because it seems to be the only sane way to deal with complicated lambda lists and functional subtypes. Naturally, any help would be much appreciated. Especially since you have extensible knowledge of sbcl.

All that said, I really don't wanna push you at all, so that's it, I just wanted to share. You do you, man.

commander-trashdin avatar Mar 24 '21 17:03 commander-trashdin

Rewriting SBCL, stripping most of CL-specific optimizations and make it understandable was indeed one of my ideas.

guicho271828 avatar Mar 25 '21 10:03 guicho271828

I was thinking (this is not mentioned in clng, since its main purpose is to gather well known ideas for all community, and not my personal ones) about some sort of more lisp specific llvm like language, made with lisps in mind. One that can provide an efficient platform for compiler writers, not just CL compiler btw, Scheme &rest alike. That does sound like a better way of "uniting" various standards.

commander-trashdin avatar Mar 25 '21 10:03 commander-trashdin

I also had that idea. So much in common :)

guicho271828 avatar Mar 25 '21 22:03 guicho271828