Gary your last comment hits what I look for exactly:

"If you are looking for an encoding of clojure's syntax extensions into 
pure edn reader tags (as my crystall ball tells me you might be), I haven't 
encountered such a thing yet, even though it's conceivable."

My use case is to pass functions in configuration files (thus effecting 
behavior), sending functions over the wire or storing them is another use 
case 

Its not enough to include the body, but also include required namespaces, 
params it expects etc..

Thanks

On Thursday, May 28, 2015 at 8:14:41 PM UTC+3, Gary Verhaegen wrote:
>
> Not very clear to me either, but, in the spirit of reducing the field of 
> possible understandings of the question: are you aware of eval? If so, can 
> you reframe your question around it, i.e. what is it missing for your 
> use-case or haw it's not a good fit? (If you are not yet aware of eval, 
> know that it is just as bad as read security-wise.)
>
> Or perhaps you already have a clear idea of what you would want to do with 
> the data structures in your edn file, and you're actually asking about how 
> to register your custom literal reader with the edn reader?
>
> On Thursday, 28 May 2015, Herwig Hochleitner <hhochl...@gmail.com 
> <javascript:>> wrote:
>
>> 2015-05-27 18:14 GMT+02:00 ronen <nark...@gmail.com>:
>>
>>> Ok ill expand the question a bit hoping to make it clearer :)
>>>
>>
>> Still not clear to me, but I'll try to expand a bit in the hope of 
>> showing what is unclear.
>>
>> Clojure EDN has support for literal tags 
>>> <https://github.com/edn-format/edn#inst-rfc-3339-format> and the 
>>> ability of extending it with custom ones (records for example 
>>> https://github.com/miner/tagged). 
>>>
>>
>> Right, so what additional functionality are you looking for then? Clojure 
>> is basically EDN + a bit of additional syntax, like anonymous fns #(), vars 
>> #', deref @, syntax-quote ` ~ ~@, discarded expressions #_, read eval #= 
>> and recently read cond #? I suppose you're not talking about that 
>> additional syntax, because then it wouldn't be EDN anymore.
>>
>> I have a use case for storing functions in EDN and Iv found this 
>>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FDatomic%2Fday-of-datomic%2Fblob%2Fmaster%2Fresources%2Fday-of-datomic%2Fclojure-data-functions.edn&sa=D&sntz=1&usg=AFQjCNHi_41fzdbV7ygT3-_g3oI4ZeJVJw>,
>>>  
>>> which seems to be an EDN form containing serialized Clojure functions for 
>>> Datomic (which is closed source so I can't use its reader). 
>>>
>>
>> As I implied above, Clojure code not utilizing any of the extra syntax is 
>> perfectly readable by any EDN implementation. As far as datomic #db/fn is 
>> concerned: If you pass clojure code in a string, I'm pretty sure it uses 
>> clojure.core/read to read it. If you pass forms, as in the example you 
>> posted, I guess it just uses those forms as they were and they will already 
>> have been preprocessed by the reader before being passed to the reader 
>> function of #db/fn, so again, clojure.core/read (normally).
>>
>> My question is if there is any open source implementation, I can't seem 
>>> to find one.
>>>
>>
>> There are many readers capable of reading EDN (clojure.tools.reader, 
>> edn-java, haskell's edn, clojure.core/read, cljs reader, ...) some of those 
>> will also be able to read the extensions that make clojure syntax.
>>
>> If you are looking for an encoding of clojure's syntax extensions into 
>> pure edn reader tags (as my crystall ball tells me you might be), I haven't 
>> encountered such a thing yet, even though it's conceivable.
>>
>> kind regards
>>
>> -- 
>> 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.
>>
>

-- 
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