Thanks, I figure now in 2014 disk space is not a big deal, and any two 
sequences of text will compress to something really small, so saving disk 
space is not a compelling reason for reference data.  There was in fact a 
decent reason I wanted these to reference the same object, but of course I 
can't think of what that was now.  It'll return to me when I'm half asleep.

On Monday, August 11, 2014 7:49:51 AM UTC-7, James Reeves wrote:
>
> If your purpose is just to save disk space, then I'd suggest just using 
> compression. Two identical data types should produce the same sequence of 
> bytes, which are easily compressed. I believe Nippy has a fast compression 
> via Snappy enabled by default.
>
> - James
>
>
> On 10 August 2014 19:36, MS <5lvq...@sneakemail.com <javascript:>> wrote:
>
>> I'm trying to write an EE schematic capture program in clojure.  I'd like 
>> to be able to define a prototype component, say a resistor with value=10k, 
>> then be able to instantiate that many times, with each instance having an 
>> additional property such as a name string.  It's easy to ensure (identical? 
>> (proto instance1) (proto instance2)) returns true while in-memory, 
>> however I'm not sure how to write this out to disk.
>>
>> It seems the serialization libraries, print-dup, edn, etc., operate on 
>> values, so reading the database back in won't guarantee it's really the 
>> same object.  I'd like to have the thing defined *once* then instantiated 
>> many times, and have this captured in the on-disk version.
>>
>> Am I barking up the wrong tree?  ie, given immutable data structures, 
>> there's kind of no point in doing this.  I'm actually trying to save disk 
>> space, so I'd like to be able to refer in a few characters a potentially 
>> large structure that was defined earlier.  It would also be nice to have 
>> this be human readable.
>>
>> Would one of the JSON serializers do this for me?
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to