News for hackers. Stuff that matters.
Re:Lisp implementation in GNU make by Tomte on Tuesday September 15, 2015 @10:12AM (#10220730)
I'd love if make was less capable of implementing a toy Lisp and more capable of quoting characters. Like quoting a left paren. I mean, at all.
Re:Lisp implementation in GNU make by munificent on Tuesday September 15, 2015 @01:28PM (#10221906)
I think we should acknowledge how impressive it is implementing a Lisp of all languages in a language that doesn't let you easily quote parens!
Re:Lisp implementation in GNU make by yarrel on Tuesday September 15, 2015 @12:34PM (#10221570)
IN GNU make there's \( , $(\() and lparen := \( ... $(lparen) .
Re:Lisp implementation in GNU make by Tomte on Tuesday September 15, 2015 @03:19PM (#10222604)
\) didn't work for me (may depend on the context, don't know), and some Google searches and Stackoverflow answers later I settled for LEFTPAREN:=) and $(LEFTPAREN)
Re:Lisp implementation in GNU make by fallat on Tuesday September 15, 2015 @07:06AM (#10219918)
I love the abuse of turing complete tools. It's a weird perversion that I'm starting to appreciate more.
Re:Lisp implementation in GNU make by cromo on Tuesday September 15, 2015 @10:34AM (#10220844)
This reminds me of MAL [1], which stands for "Make A Lisp" or Make, A Lisp" depending on whether you're talking about the whole project or just the make version. It branched out into being implementations of a lisp in over two dozen languages, with instructions to help in writing your own. I was working on a haxe version before my motherboard recently bit the dust.

[1] https://github.com/kanaka/mal

Re:Lisp implementation in GNU make by baldfat on Tuesday September 15, 2015 @11:44AM (#10221278)
And yet there is Racket which is 100% making your own language based on Lisp. Serious question. Why is there mal when we already have Racket?
Re:Lisp implementation in GNU make by cromo on Tuesday September 15, 2015 @12:12PM (#10221434)
I think there may be a misunderstanding here - mal is not the language you make the lisp (or any other language) in, it is the language you are implementing. Indeed, there is an implementation in Racket, and even in mal itself.

The point of mal is to guide an implementer through the steps necessary for making an interpreter using a language they are comfortable in. It gives some insight into how various constructs are implemented, such as closures and tail call optimization. The purpose is not so much to make a lisp-like language (although that is the outcome), but to learn what goes into making an interpreter for one - especially when you can't lean on the constructs that already exist in the host language.

Re:Lisp implementation in GNU make by david-given on Tuesday September 15, 2015 @02:41PM (#10222415)
A while back I implemented Conway's Game of Life in make... by writing it in a custom high level language and then writing a compiler into GNU Make script:

http://cowlark.com/2013-10-19-insane-make

I also wrote an arbitrary precision maths library, because make doesn't support arithmetic. I got as far as addition, subtraction and multiplication before coming to my senses.

Re:Lisp implementation in GNU make by jgrahamc on Tuesday September 15, 2015 @09:01AM (#10220366)
For more wild things you can do in GNU make by pushing the internal language: http://gmsl.sf.net/ And also: https://www.nostarch.com/gnumake

I like they way they've done the arithmetic.

Re:Lisp implementation in GNU make by bla2 on Tuesday September 15, 2015 @02:14PM (#10222234)
Somewhat hidden in the readme: A link to https://github.com/google/kati which is apparently much faster at execution Makefile code.
Re:Lisp implementation in GNU make by amyjess on Tuesday September 15, 2015 @11:07AM (#10221068)
I bet this was inspired by the "Lisp in your language" post from last week, where somebody did it in JavaScript.

That got me to work on a Python version (using tuples, for maximum parentheses), but it got put on the back burner because my life took a turn for the busy lately.

Re:Lisp implementation in GNU make by polymeris on Tuesday September 15, 2015 @11:11AM (#10221087)
A (very basic) version in Lua/LPEG I did a while ago:

https://gist.github.com/polymeris/857a7ae31db0d240ef3f

Re:Lisp implementation in GNU make by jevgeni on Tuesday September 15, 2015 @07:18AM (#10219957)
A part of me loves and a part of me hates the author.

10/10 would lithp again.

Re:Lisp implementation in GNU make by gepoch on Tuesday September 15, 2015 @10:05AM (#10220676)
> There should be a lot of limitations. makelisp behaves very strangely when you pass a broken Lisp code.

I can't imagine why..

Re:Lisp implementation in GNU make by gjvc on Tuesday September 15, 2015 @11:35AM (#10221222)
wonderful