9a93 cons cell implementation in Clisp - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Development > Userland Programming & Scripting

Userland Programming & Scripting C, Shell, Perl, Sed & Awk

Reply
 
Thread Tools Display Modes
  #1  
Old September 16th, 2012, 23:10
asp5 asp5 is offline
Junior Member
 
Join Date: May 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default cons cell implementation in Clisp

Hi all,

I was just wondering how the cons cell is implemented in Clisp and other Lisps. Upon reading briefly, I think that these were registers which can hold 2 pointers (CAR, CDR)... I wanted to know how they are implemented in software? (void *)? but list can hold multiple types, we need to maintain a type of the obj associated with this, for typecasting and stuff. Is there a header for each section (which holds type info and other bookkeeping info). Coming from C land wanted to see how this is implemented. Please share your thoughts or point me to a location where I can get the info.

Thanks.
Reply With Quote
  #2  
Old September 18th, 2012, 03:52
ChalkBored ChalkBored is online now
Junior Member
 
Join Date: Dec 2008
Posts: 90
Thanks: 1
Thanked 27 Times in 17 Posts
Default

http://www.clisp.org/impnotes/src-files.html
You're probably best off digging through the source to see how it's done.
also:
http://www.bcl.hamilton.ie/~nmh/t3x....mpty-space.zip is a book that shows you how to write an implementation of Scheme from scratch. It might be of interest.
Reply With Quote
  #3  
Old September 18th, 2012, 05:29
asp5 asp5 is offline
Junior Member
 
Join Date: May 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by ChalkBored View Post
http://www.clisp.org/impnotes/src-files.html
You're probably best off digging through the source to see how it's done.
also:
http://www.bcl.hamilton.ie/~nmh/t3x....mpty-space.zip is a book that shows you how to write an implementation of Scheme from scratch. It might be of interest.
Thanks. I'm looking at the code. Thanks for the book link.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] Can i use clisp as shell ? sw2wolf General 3 October 18th, 2011 08:09
[Solved] Cell phone (smart phone) imate K-jam - PocketPC -Microsoft Windows Mobile V 5.0 vigol Peripheral Hardware 4 December 25th, 2009 00:58
8.0 Beta 1 pros & cons iic2 General 11 July 8th, 2009 20:55
Any Plans to port FreeBSD to the CELL CPU cpu Other Architectures 3 January 7th, 2009 18:19


All times are GMT +1. The time now is 18:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0