Re: What's the status of DCG in core.logic?

2018-09-27 Thread phil jones
Thanks. But is there anything specifically about dcg.clj? On Thursday, 27 September 2018 17:37:34 UTC-3, Pankaj Doharey wrote: > > http://minikanren.org/#writtenTutorials > > On Thursday, 27 September 2018 20:33:27 UTC+5:30, phil jones wrote: >> >> >> I see core.logic has a version of Prolog's DC

Re: What's the status of DCG in core.logic?

2018-09-27 Thread Pankaj Doharey
http://minikanren.org/#writtenTutorials On Thursday, 27 September 2018 20:33:27 UTC+5:30, phil jones wrote: > > > I see core.logic has a version of Prolog's DCG grammars. > > > https://github.com/clojure/core.logic/blob/master/src/main/clojure/clojure/core/logic/dcg.clj > > Is this a usable soluti

Re: clojure code routine

2018-09-27 Thread venkata sai
Thank you . On 28 Sep 2018 00:23, "Robert Levy" wrote: > At this point I've given you everything you need to solve your problem. > Look it over now and you'll be able to figure it out. Best of luck! > > On Thu, Sep 27, 2018 at 11:51 AM venkata sai > wrote: > >> thank you very much for helping

Re: clojure code routine

2018-09-27 Thread Robert Levy
At this point I've given you everything you need to solve your problem. Look it over now and you'll be able to figure it out. Best of luck! On Thu, Sep 27, 2018 at 11:51 AM venkata sai wrote: > thank you very much for helping me. can you help me how to map these > values in the output.clj file

Re: clojure code routine

2018-09-27 Thread venkata sai
thank you very much for helping me. can you help me how to map these values in the output.clj file On Friday, September 28, 2018 at 12:14:50 AM UTC+5:30, Robert P. Levy wrote: > > No need for macro > > (let [example-data [['hospice-enc "hospice enc" "HOSPICE_ENC"] > ['hospice

Re: clojure code routine

2018-09-27 Thread Robert Levy
No need for macro (let [example-data [['hospice-enc "hospice enc" "HOSPICE_ENC"] ['hospice-env "hospice env" "HOSPICE_ENV"]]] (doseq [[name-sym desc-string name-string] example-data] (spit "/tmp/clinic.clj" (format "%s\n" (pr-str `(onto/defconc

Re: clojure code routine

2018-09-27 Thread venkata sai
Yes thank you I will try with this approach..but how do I take parameters in macros On 28 Sep 2018 00:06, "Robert Levy" wrote: > Actually, if you are trying to write out to a file, then instead do this > > (doseq [[name-sym desc-string name-string] (prepare-data spreadsheet)] > (spit "clinic.c

Re: clojure code routine

2018-09-27 Thread Robert Levy
Actually, if you are trying to write out to a file, then instead do this (doseq [[name-sym desc-string name-string] (prepare-data spreadsheet)] (spit "clinic.clj" (pr-str `(onto/defconcept ~name-sym ~desc-string ~name-string)) :append true)) On Thu, Sep 27, 2018 at 11:30 AM Rob

Re: clojure code routine

2018-09-27 Thread Robert Levy
I think that if you're wanting to do this then you probably are taking the wrong approach, but taking you at face value I would say try something like this. If you provide more information on what you are actually trying to do, then you might be able to get better advice. (defmacro def-onto-conce

Re: clojure code routine

2018-09-27 Thread venkata sai
that onto/defconcept you need to concatenate . i want to write my output to clinic.clj file by using clojure macros On Thursday, September 27, 2018 at 11:34:56 PM UTC+5:30, Robert P. Levy wrote: > > Oh I didn't see you sent the example again. Where is onto/defconcept > defined? > > > On Thu, S

Re: clojure code routine

2018-09-27 Thread Robert Levy
Oh I didn't see you sent the example again. Where is onto/defconcept defined? On Thu, Sep 27, 2018 at 10:53 AM venkata sai wrote: > thanks for your helping nature. my question is as simple as that by using > macros i need to autogenerate code in the clinic.clj file with csv file as > input > >

Re: clojure code routine

2018-09-27 Thread venkata sai
thanks for your helping nature. my question is as simple as that by using macros i need to autogenerate code in the clinic.clj file with csv file as input On Thursday, September 27, 2018 at 11:18:15 PM UTC+5:30, Robert P. Levy wrote: > > In your other thread you pasted > https://github.cerner.

Re: clojure code routine

2018-09-27 Thread Robert Levy
In your other thread you pasted https://github.cerner.com/Synapse/event-rules/blob/master/src/main/clojure/hi/kern/qip/kern_qip_flow.clj#L454-L551 That is not accessible to the outside world. To optimize your chances of get useful help with this, it would be best to provide a clear and minimal exa

self-driving cars: 2 libraries, 2 tutorial projects

2018-09-27 Thread Eric Lavigne
After graduating Udacity’s self-driving car engineer nanodegree (highly recommended!) I was eager to apply the same techniques in Clojure. Hopefully other Clojure programmers will find this field interesting as well. Figurer: planning library https://github.com/ericlavigne/figurer Figurer handl

Re: clojure code routine

2018-09-27 Thread venkata sai
yes i know but my issue is how to generate a template On Thursday, September 27, 2018 at 8:24:49 PM UTC+5:30, Robert P. Levy wrote: > > I'm sure you've seen this, but you should check out > https://github.com/clojure/data.csv > > On Thu, Sep 27, 2018 at 7:52 AM venkata sai > wrote: > >> yes ex

What's the status of DCG in core.logic?

2018-09-27 Thread phil jones
I see core.logic has a version of Prolog's DCG grammars. https://github.com/clojure/core.logic/blob/master/src/main/clojure/clojure/core/logic/dcg.clj Is this a usable solution at the moment? Does anyone know of any documentatiojn or tutorials anywhere? cheers Phil -- You received this mess

Re: clojure code routine

2018-09-27 Thread Robert Levy
I'm sure you've seen this, but you should check out https://github.com/clojure/data.csv On Thu, Sep 27, 2018 at 7:52 AM venkata sai wrote: > yes exactly but i donot know how to do it in my case > > > On Thursday, September 27, 2018 at 8:04:56 PM UTC+5:30, Robert P. Levy > wrote: >> >> See https:

Re: clojure code routine

2018-09-27 Thread venkata sai
yes exactly but i donot know how to do it in my case On Thursday, September 27, 2018 at 8:04:56 PM UTC+5:30, Robert P. Levy wrote: > > See https://gist.github.com/rplevy/e94555217dac18f0239a68a3c5bdeb5d as an > example that might help you. I recently prepared this gist (pulled out of > a code

Re: clojure code routine

2018-09-27 Thread Robert Levy
By the way, the premise in your original message that you would do this using a defmacro is going to steer you wrong if you stick to that. Macros are for expanding code (as data) at compile time. What you want is not code as data but data as data, which your code will use. (Also, there's a limit

Re: clojure code routine

2018-09-27 Thread Robert Levy
See https://gist.github.com/rplevy/e94555217dac18f0239a68a3c5bdeb5d as an example that might help you. I recently prepared this gist (pulled out of a codebase that was retired when a company was acquired) to show someone how to get data from Google Sheets, but the aspect relevant to your question

Re: clojure code routine

2018-09-27 Thread venkata sai
yes you want to autogenerate code as in .clj file from csv file On Thursday, September 27, 2018 at 6:18:59 PM UTC+5:30, Pankaj Doharey wrote: > > This looks like code from some EMR software, can you upload the definition > of onto/defconcept ? > to know what it does. Also what is the objective

Re: clojure code routine

2018-09-27 Thread Pankaj Doharey
This looks like code from some EMR software, can you upload the definition of onto/defconcept ? to know what it does. Also what is the objective here that you trying to achieve? On Thursday, 27 September 2018 13:02:53 UTC+5:30, venkata sai wrote: > > hii i have attached wrong files.. i have a

Re: clojure code routine

2018-09-27 Thread venkata sai
hii i have attached wrong files.. i have a csv file as input i want to write a code to autogenerate output file as .clj file by using macros.. On Thursday, September 27, 2018 at 3:32:37 AM UTC+5:30, Pankaj Doharey wrote: > > Hmm, your out.csv seems incorrect to me. the clinic.clj has no code. W