comp.lang.ada
 help / color / mirror / Atom feed
* Make A Lisp .. in Ada
@ 2016-03-25 20:33 Chris Moore
  2016-03-25 21:37 ` Shark8
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Moore @ 2016-03-25 20:33 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Make A Lisp .. in Ada
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Shark8 @ 2016-03-25 21:37 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Make A Lisp .. in Ada
  2016-03-25 21:37 ` Shark8
@ 2016-03-25 22:43   ` Chris Moore
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Moore @ 2016-03-25 22:43 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-25 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox