# Just Launched: You can now import projects and releases from Google Code onto SourceForge

We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps.

## [Sbcl-help] 2D coordinates

 [Sbcl-help] 2D coordinates From: Fredrik Tolf - 2008-10-26 17:04:41 ```Hi list! While I do have some experience with other Lisps, I'm fairly new to Common Lisp and SBCL, and so I'd need some help with common practices. In particular, I'm wondering how to best represent 2D coordinates in CL, especially such that SBCL can easily optimize operations on them. Although I guess the most easily optimizable representation would be to return multiple values, one for each axis, but it would be really helpful if I could represent coordinates as a single value, in order to do compound algebra on them, such as "(coord-add a (coord-mul b 2))" or similar. I will only be dealing with integer coordinates (and probably within fixnum range, but I'm not entirely sure). If I use vectors for coordinates, would SBCL be able to inline compound operations such as the above on them without actually consing vectors for each step? (Vectors would obviously be quite convenient as well, since I could construct a coordinate with "#(x y)"). If not, how about structs? Lists? Conses? Would there be any other particular reasons to choose a certain representation over the others? Thanks for reading! Fredrik Tolf ```

 [Sbcl-help] 2D coordinates From: Fredrik Tolf - 2008-10-26 17:04:41 ```Hi list! While I do have some experience with other Lisps, I'm fairly new to Common Lisp and SBCL, and so I'd need some help with common practices. In particular, I'm wondering how to best represent 2D coordinates in CL, especially such that SBCL can easily optimize operations on them. Although I guess the most easily optimizable representation would be to return multiple values, one for each axis, but it would be really helpful if I could represent coordinates as a single value, in order to do compound algebra on them, such as "(coord-add a (coord-mul b 2))" or similar. I will only be dealing with integer coordinates (and probably within fixnum range, but I'm not entirely sure). If I use vectors for coordinates, would SBCL be able to inline compound operations such as the above on them without actually consing vectors for each step? (Vectors would obviously be quite convenient as well, since I could construct a coordinate with "#(x y)"). If not, how about structs? Lists? Conses? Would there be any other particular reasons to choose a certain representation over the others? Thanks for reading! Fredrik Tolf ```
 Re: [Sbcl-help] 2D coordinates From: Leslie P. Polzer - 2008-10-26 17:15:44 ```> If I use vectors for coordinates, would SBCL be able to inline compound > operations such as the above on them without actually consing vectors > for each step? (Vectors would obviously be quite convenient as well, > since I could construct a coordinate with "#(x y)"). If not, how about > structs? Lists? Conses? Would there be any other particular reasons to > choose a certain representation over the others? I'm not sure about the optimization aspects but complex numbers seem to be the best bet because of convenience and (most likely) speed. If you don't like that then a vector is the next appropriate representation. Leslie -- LinkedIn Profile: http://www.linkedin.com/in/polzer Xing Profile: https://www.xing.com/profile/LeslieP_Polzer Blog: http://blog.viridian-project.de/ ```