comp.lang.ada
 help / color / mirror / Atom feed
From: Chris Moore <zmower@ntlworld.com>
Subject: Re: Make A Lisp .. in Ada
Date: Fri, 25 Mar 2016 22:43:54 +0000
Date: 2016-03-25T22:43:54+00:00	[thread overview]
Message-ID: <rajJy.88083$vw.22722@fx33.am4> (raw)
In-Reply-To: <ea8875c3-cfe7-40bb-add2-eb10b0cfef1e@googlegroups.com>

On 25/03/2016 21:37, Shark8 wrote:
> On Friday, March 25, 2016 at 2:33:15 PM UTC-6, Chris Moore wrote:
>> Hi,
>>
>> There was a post on Hacker News (#1) just over a year ago about Make A
>> Lisp (#2).  They had implementations in many languages but not for Ada
>> so I've made one (#3 on branch ada).
>>
>> I'm pretty close to getting it accepted (put in the pull request today).
>>    It's slower than the C and C++ implementations.  Seems to spend a lot
>> of time finalizing the smart pointer according to gprof.
>>
>> Chris M Moore
>>
>> Refs:
>> 1) https://news.ycombinator.com/item?id=9121448
>> 2) https://github.com/kanaka/mal
>> 3) https://github.com/zmower/mal/tree/ada
>
> Nifty.
> Did you happen to see my Ada 2012 tutorial which was making a LISP? -- I've been told one of the nice things about it is that it internally uses an ARRAY, rather than a linked-list for lists.
> https://github.com/OneWingedShark/Ada_Tutorial
>

No.  I hadn't seen it.  I do use a indefinite array in 
Types.Make_New_List but otherwise its smart_pointers all the way down, 
including the list nodes.  It made managing the objects easier but I 
seem to have paid a price.  It does work correctly though, including the 
self-hosting tests.

There's an equivalent to the final stepa_mal.adb phase that doesn't use 
the eval_callback at
https://dl.dropboxusercontent.com/u/638983/malia.tar.gz
for those of you who just want a quick play.  Source code only.  Haven't 
tried it on windows or other compilers but I think I've missed out 
gnat=isms and 2012 features...

Happy Easter!

Chris


      reply	other threads:[~2016-03-25 22:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25 20:33 Make A Lisp .. in Ada Chris Moore
2016-03-25 21:37 ` Shark8
2016-03-25 22:43   ` Chris Moore [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox