
The Lx Programming Language - kick
https://github.com/c3d/xl
======
c3d
Disclaimer: Author of the language / web page speaking.

This one is hopelessly outdated. See
[https://github.com/c3d/xl](https://github.com/c3d/xl) for the current state
of things. A bit of history of the language here:
[https://github.com/c3d/xl/blob/master/doc/HISTORY.md](https://github.com/c3d/xl/blob/master/doc/HISTORY.md).

Warning: this is currently under heavy repair / refactoring, so Nothing
Works™.

An interesting (if old, 2010) application of the language here:
[http://tao3d.sourceforge.net](http://tao3d.sourceforge.net).

Contributions and ideas welcome.

~~~
axilmar
What you did there is very cool! I am speaking for both LX as presented in the
old link and the new work that you are doing.

Personally I have given up creating a new programming language about a decade
ago because I realized no matter what language I create, people will not use
it, it it comes from a random github page.

Also, existing languages cover almost all business needs and while languages
like LX provide a lot of improvements, the cost of change seems to be greater
than the cost of not having these improvements.

As for ideas, what I'd like to see in a programming language is signal-based
programming: the execution flow of a program is not 'one instruction after the
other' but reactions to signals. A program shall be built by wiring output
signals to input signals.

I'd also like to see types morph based on run-time conditions.

The most fundamental problem of all the current programming languages is that
types are too rigid and don't allow for catching all the possible outcomes.
For example, a File morphs between a closed file and an opened file, however
in current systems any operation can be applied to a file, irrespectively of
whether the file is actually opened or closed.

I believe that the combination of signal-based programming and type morphing
will increase the reliability of programs, leaving only bugs that cannot be
proven to be solved due to their nature (aka like the halting problem).

I may not be necessarily correct, but I have a strong belief in the above.

~~~
Shoop
The thing you are referring to with open and closed files is called typestate.
Check out its implementation in the Plaid programming language:
[http://www.cs.cmu.edu/~aldrich/papers/onward2009-state.pdf](http://www.cs.cmu.edu/~aldrich/papers/onward2009-state.pdf)

~~~
codetrotter
There was a post here on HN about typestates in Rust too yesterday. For anyone
that didn’t see it:
[https://news.ycombinator.com/item?id=21413174](https://news.ycombinator.com/item?id=21413174)

------
LessDmesg
Hmm, one might think there's a trend in how almost none of the 'programmable
programming languages' catch on. Lithp, Rebol, Forth, Nemerle, this one.
Perhaps it has something to do with readability being more important than
writeability? Me, I find macros and implicits repulsive. Give me Zig over LX
any day (Zig purposefully contains no macro facility).

~~~
pjmlp
Java has compiler plugins, annotations, reflection and aspect oriented
programming as metaprogramming tools.

.NET has T4 templates, attributes, reflection, expression trees, and F# adds
code quotations to the mix.

~~~
thelazydogsback
T4 barely counts, as it's string- and not AST-based. For meta-programming to
be useful, IMHO it really needs to be part of the language and base tool-
chain. I certainly don't want to write code in Java, f'rinstance, that needs
random compiler plug-in to weave in AOP calls, etc. But in Lisp, Prolog (and
not Elixer, etc.) macros are part of "how stuff works".

~~~
pjmlp
Then languages like D don't have metaprogramming capabilities if using AST
based one is considered a requirement.

------
Reisen
It makes me so happy to see more rewrite based languages. Another one that is
extremely cool that I almost never see brought up is [pure][1][2].

[1]: [https://agraef.github.io/pure-lang/](https://agraef.github.io/pure-
lang/) [2]: [https://github.com/agraef/pure-
lang/wiki/PureIntro](https://github.com/agraef/pure-lang/wiki/PureIntro)

------
pmontra
The name of the language is XL, not Lx. The title of the Readme is "XL - An
extensible language" and the URL ends with /xl

~~~
c3d
I'm not too sure about the dates, but the rough history is this:

LX: Langage expérimental (~1992) Ada like with "pragmas" extending the
language

LX: Langage extensible (1998): Rewrite with documented object-oriented parse
tree

LX/XL: Extensible language (2000) based on object-oriented parse tree, cross-
language framework called Mozart, that also had a Java front-end called Moka

XL2: Extensible language (2002) based on simple parse tree, 8 node types, Ada-
like in syntax

XL2: Self compiling compiler (2005?) with same 8-node parse tree, Ada-like

XLR: LLVM-based functional variant (2008-2009), same parse tree, functional,
very simple, library-defined if-then-else

Tao3D: real-time 3D graphics running on XLR (2010-2015)

ELiOT / ELFE: Distributed programming (2015?), based on interpreted version of
XLR

XL: Reconvergence of all of the above (WIP), all merged, implemented as a
library with a tiny front-end.

~~~
c3d
I forgot to mention that XLR meant "XL Runtime" and was initially thought of
as a back-end for XL2. Then it took a life of its own.

