Extra optional attr-map argument on defn... why?

2021-08-08 Thread Robert Levy
In a private chat (I will not expose their names, but they may feel free to
identify themselves in this thread) someone posed a question:

Anyone know why the multi-arity version of `defn` takes an extra optional
`attr-map?` argument?
https://github.com/clojure/clojure/blob/clojure-1.10.1/src/clj/clojure/core.clj#L290

Someone in the chat offered:

I am sure someone wanted to do (->> {:more :metadata} (defn ... )) and
fixed the issue right there.

Someone else in the chat did some detective work and this is what she came
up with:

* defn went from a simple form that could only create single arity
definitions to the current multiple-arity definitions, and when it did
this, it introduced the metadata options. Back then, all of this was in
src/boot.clj. The checkin was 23df286 on Mar 7, 2008

https://github.com/clojure/clojure/commit/23df28671fe46d4a39d2aadc36262c9dae1f406a
* Rich updated defn in 2009 and it was in there prior to that.
* Alex added the extra arglists entry that describes it in 2011.

So the multiple attr-map? values have been around since attr-maps were
first introduced. No explanation why

Anyone know why?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAEToNjhYaoGCL442u24f_fzQEXmbjtjdfFYqYyM8sXC%3D7S9FkA%40mail.gmail.com.


Re: [ANN] Discontinuing 4clojure.com

2021-07-06 Thread Robert Levy
Just wanted to correct a mistake in what I wrote above. Obviously you can't
clear the password hashes while retaining a link between people and their
accounts, so it would more accurately be stated as all accounts are gone
and you have to create a new account.

On Tue, Jul 6, 2021 at 12:42 AM Robert Levy  wrote:

> Hi Alan,
>
> Just as a thought.  If it's minimal work on your end (eg. if the folks
> from Roam research who chimed in above pick it up) why not clear the
> password hashes and let the new maintainer handle the communication that
> passwords need to be reset?
>
> Rob
>
> On Sun, Jul 4, 2021 at 1:26 PM Alan Malloy  wrote:
>
>> TL;DR: Turning off 4clojure.com by the end of July 2021
>>
>> Hello, 4clojure problem solvers. You've probably noticed SSL errors on
>> 4clojure.com over the last week. The old decrepit system 4clojure runs
>> on has finally gotten out of date enough that I can't even figure out how
>> to get it recent enough that SSL certs will auto-renew anymore.
>>
>> In principle I could start from scratch on a new server and move 4clojure
>> over, but I won't. 4clojure has been piggybacking along on a server that I
>> use for personal reasons, and over the years I have less and less reason to
>> keep paying for that server - it's now pretty much just 4clojure costing me
>> an embarrassing amount of money every month because I haven't wanted to
>> disappoint the community by shutting it down. This SSL thing is just what
>> made me finally pull the trigger.
>>
>> I don't have a specific EOL date in mind, but sometime near the end of
>> the month, since that's the billing cycle. Until that time, 4clojure still
>> works, as long as you don't mind clicking through the security warnings -
>> it really is still me hosting the site, and since the connection is still
>> HTTPS (albeit with an invalid cert) I think that means your data is still
>> safe. If you have solutions to problems you're proud of, you've still got
>> some time to print them out and put them up on your refrigerator.
>>
>> I'm not seeking new maintainers. I'd feel uncomfortable handing over a
>> database with so many email addresses and password hashes in it to anyone.
>> The service has had a good run - just over a decade since the first
>> release
>> <https://github.com/4clojure/4clojure/commit/ff457d0b3b5f5e5a74316a1747809c25b84b3b5e>.
>> I hope you enjoyed it during that time.
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/clojure/385cdef8-fa40-47ba-b5b1-0b3a7cc34935n%40googlegroups.com
>> <https://groups.google.com/d/msgid/clojure/385cdef8-fa40-47ba-b5b1-0b3a7cc34935n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAEToNjiTvXHpZj653-Urho1Z7r7%2BXKU6u%2BxZ-ihob%2BQE_3WCjQ%40mail.gmail.com.


Re: [ANN] Discontinuing 4clojure.com

2021-07-06 Thread Robert Levy
Hi Alan,

Just as a thought.  If it's minimal work on your end (eg. if the folks from
Roam research who chimed in above pick it up) why not clear the password
hashes and let the new maintainer handle the communication that passwords
need to be reset?

Rob

On Sun, Jul 4, 2021 at 1:26 PM Alan Malloy  wrote:

> TL;DR: Turning off 4clojure.com by the end of July 2021
>
> Hello, 4clojure problem solvers. You've probably noticed SSL errors on
> 4clojure.com over the last week. The old decrepit system 4clojure runs on
> has finally gotten out of date enough that I can't even figure out how to
> get it recent enough that SSL certs will auto-renew anymore.
>
> In principle I could start from scratch on a new server and move 4clojure
> over, but I won't. 4clojure has been piggybacking along on a server that I
> use for personal reasons, and over the years I have less and less reason to
> keep paying for that server - it's now pretty much just 4clojure costing me
> an embarrassing amount of money every month because I haven't wanted to
> disappoint the community by shutting it down. This SSL thing is just what
> made me finally pull the trigger.
>
> I don't have a specific EOL date in mind, but sometime near the end of the
> month, since that's the billing cycle. Until that time, 4clojure still
> works, as long as you don't mind clicking through the security warnings -
> it really is still me hosting the site, and since the connection is still
> HTTPS (albeit with an invalid cert) I think that means your data is still
> safe. If you have solutions to problems you're proud of, you've still got
> some time to print them out and put them up on your refrigerator.
>
> I'm not seeking new maintainers. I'd feel uncomfortable handing over a
> database with so many email addresses and password hashes in it to anyone.
> The service has had a good run - just over a decade since the first
> release
> .
> I hope you enjoyed it during that time.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clojure/385cdef8-fa40-47ba-b5b1-0b3a7cc34935n%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAEToNjhC%3DXh-c%3DnyLT1mitYQrh1gBiAmGqKLRC7P9B5VJrhxhw%40mail.gmail.com.


Re: Tour of our 250k line Clojure codebase

2021-06-03 Thread Robert Levy
Great post on the technical choices made in developing this platform.  Do
you plan on writing a post that describes in detail the system architecture
that is the bread and butter of the product/platform itself?

The website intriguingly states, "Red Planet Labs is pioneering a radically
new kind of software tool. It's not just for the initial construction of an
application, but also encapsulates deployment, monitoring, and maintenance.
It implements the first truly cohesive model for building software
applications – a set of abstractions that can build any application at any
scale with greatly reduced engineering cost."

It seems like a full article expanding on the infrastructure-level design,
and the approach to generalizing and abstracting infrastructure, would be
very interesting.


On Thu, Jun 3, 2021 at 7:12 PM Nathan Marz  wrote:

> Derek – we have a bunch of open-source on our Github
> . I'd like to release our new language
> one day, but that won't be for a long time. When I release it I want to do
> it the right way – extensive documentation, academic papers, and a
> commitment to supporting the language in broader usage. At our early stage
> we just don't have the bandwidth for that as we're working hard to get our
> first product out the door. Plus at the moment out language is our "secret
> weapon" :)
>
> Leandro – I started working on this codebase well before spec was
> released. Had spec existed when I started I would have explored it more
> thoroughly, but Schema has met our needs very gracefully. As for
> deterministic simulation, it's orthogonal to techniques like test.check. I
> suggest you check our our earlier blog post
> 
> on the subject.
>
> On Thursday, June 3, 2021 at 3:09:28 PM UTC-10 ldoc...@gmail.com wrote:
>
>>
>>
>> On Thu, 3 Jun 2021, 15:06 natha...@gmail.com,  wrote:
>>
>> Please give the post a read, and I'm happy to answer any questions.
>>>
>>
>> Nice article, Nathan. Definitely, it would be nice to see the code :-)
>>
>> Just curious...
>>
>> 1) You mention using Schema for data definition and validation. Did you
>> consider using other options for this, such as clojure.spec? What's your
>> experience with it/them?
>>
>> 2) You mention using "deterministic simulation". Did you consider using
>> other options for this, such as test.check? What's your experience with
>> it/them?
>>
>> Best,
>> Leandro
>>
>>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clojure/70353370-6dd2-4ddc-af82-2fce32ee6bden%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAEToNjgC-0U5M7myeymisYr0kDthcFQaNDhbhVfh2UVuGYh7%2Bg%40mail.gmail.com.


Radicle

2018-10-17 Thread Robert Levy
I thought I'd share this project I came across, as it's exciting to me for
some of the same reasons I continue to be excited about Clojure.

> Radicle is a peer-to-peer stack for creating open source software
together.

Notes on the language aspect of the system (the language is for
expressively specifying replicated state machines over p2p networks), from
http://oscoin.io/radicle.html

   - High-level, LISP dialect in the flavor of Black.
   - Ability to redefine the eval function, changing the semantics of the
   language.
   - Lexically scoped with a hyperstatic global environment, i.e. free
   variable resolution takes place at definition-site rather than call-site.
   - First-class functions for side-effect free computation on chain.
   - Immutable by default.
   - Deterministic effects system for managing state.
   - *Syntax closely resembling Clojure.*

The Radical paper:
https://ipfs.io/ipfs/QmadmGA6mBWZ93Wv4XKuCu9wdPf7Da8pjH3Corzpe9VGZg

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


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
>
> 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-env "hospice env" "HOSPICE_ENV"]]]
>>   (doseq [[name-sym desc-string name-string] example-data]
>> (spit "/tmp/clinic.clj"
>>   (format "%s\n"
>>   (pr-str `(onto/defconcept ~name-sym ~desc-string
>> ~name-string)))
>>   :append true)))
>>
>> Generates this in /tmp/clinic.clj
>>
>> (onto/defconcept hospice-enc "hospice enc" "HOSPICE_ENC")
>> (onto/defconcept hospice-env "hospice env" "HOSPICE_ENV")
>>
>>
>>
>> On Thu, Sep 27, 2018 at 11:43 AM venkata sai  wrote:
>>
>>> 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.clj"
>>>> (pr-str `(onto/defconcept ~name-sym ~desc-string ~name-string))
>>>> :append true))
>>>>
>>>>
>>>> On Thu, Sep 27, 2018 at 11:30 AM Robert Levy  wrote:
>>>>
>>>>> 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-concept [name-sym desc-str name-str]
>>>>>   `(onto/defconcept ~name-sym ~desc-str ~name-str))
>>>>>
>>>>> (doseq [[name-sym desc-string name-string] (prepare-data spreadsheet)]
>>>>>   (def-onto-concept name-sym desc-string name-string))
>>>>>
>>>> --
>>>> 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
>>>> 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
>>>> 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.
>>>> 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 clo...@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+u...@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+u...@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 

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/defconcept ~name-sym ~desc-string
~name-string)))
  :append true)))

Generates this in /tmp/clinic.clj

(onto/defconcept hospice-enc "hospice enc" "HOSPICE_ENC")
(onto/defconcept hospice-env "hospice env" "HOSPICE_ENV")



On Thu, Sep 27, 2018 at 11:43 AM venkata sai  wrote:

> 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.clj"
>> (pr-str `(onto/defconcept ~name-sym ~desc-string ~name-string))
>> :append true))
>>
>>
>> On Thu, Sep 27, 2018 at 11:30 AM Robert Levy  wrote:
>>
>>> 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-concept [name-sym desc-str name-str]
>>>   `(onto/defconcept ~name-sym ~desc-str ~name-str))
>>>
>>> (doseq [[name-sym desc-string name-string] (prepare-data spreadsheet)]
>>>   (def-onto-concept name-sym desc-string name-string))
>>>
>> --
>> 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.
>

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


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
>
> 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.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
>> example of what you've tried, and what is tripping you up.
>>
>> On Thu, Sep 27, 2018 at 8:11 AM venkata sai  wrote:
>>
>>> 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 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 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 is where the CSV file's data is used to generate a Clojure file
>> defining a one big vector of maps.
>>
>> On Thu, Sep 27, 2018 at 7:21 AM venkata sai 
>> wrote:
>>
>>> 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 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 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. What are you trying to do here?  Is this homework?
>>
>> On Wednesday, 26 September 2018 17:27:08 UTC+5:30, venkata sai
>> wrote:
>>>
>>> i have attached csv file and my output file here.. could anyone
>>> help me autogenerate code  by using macros  that should be in the 
>>> output
>>> file
>>>
>> --
>>> 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
>>> 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
>>> 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.
>>> 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 clo...@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+u...@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+u...@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 clo...@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
>>> 

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
example of what you've tried, and what is tripping you up.

On Thu, Sep 27, 2018 at 8:11 AM venkata sai  wrote:

> 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 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 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 is where the CSV file's data is used to generate a Clojure file
 defining a one big vector of maps.

 On Thu, Sep 27, 2018 at 7:21 AM venkata sai  wrote:

> 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 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 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. What are you trying to do here?  Is this homework?

 On Wednesday, 26 September 2018 17:27:08 UTC+5:30, venkata sai
 wrote:
>
> i have attached csv file and my output file here.. could anyone
> help me autogenerate code  by using macros  that should be in the 
> output
> file
>
 --
> 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
> 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
> 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.
> 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 clo...@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+u...@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+u...@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.
>

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

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://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 is where the CSV file's data is used to generate a Clojure file
>> defining a one big vector of maps.
>>
>> On Thu, Sep 27, 2018 at 7:21 AM venkata sai  wrote:
>>
>>> 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 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 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.
>> What are you trying to do here?  Is this homework?
>>
>> On Wednesday, 26 September 2018 17:27:08 UTC+5:30, venkata sai wrote:
>>>
>>> i have attached csv file and my output file here.. could anyone help
>>> me autogenerate code  by using macros  that should be in the output file
>>>
>> --
>>> 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
>>> 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
>>> 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.
>>> 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.
>

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


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 on how big the code you expand to can be.)  In my example I wrote
data to a file (it perhaps should have been a .edn file actually) but more
often what you'll want to do is simply load in data from csv, generate
clojure data, and use the data.

On Thu, Sep 27, 2018 at 7:34 AM Robert 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 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 is where the CSV file's data is used to generate a Clojure file
> defining a one big vector of maps.
>
> On Thu, Sep 27, 2018 at 7:21 AM venkata sai  wrote:
>
>> 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 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 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.
>>>>> What are you trying to do here?  Is this homework?
>>>>>
>>>>> On Wednesday, 26 September 2018 17:27:08 UTC+5:30, venkata sai wrote:
>>>>>>
>>>>>> i have attached csv file and my output file here.. could anyone help
>>>>>> me autogenerate code  by using macros  that should be in the output file
>>>>>>
>>>>> --
>> 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.


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 is where the CSV file's data is used to generate a Clojure file
defining a one big vector of maps.

On Thu, Sep 27, 2018 at 7:21 AM venkata sai  wrote:

> 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 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 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.
 What are you trying to do here?  Is this homework?

 On Wednesday, 26 September 2018 17:27:08 UTC+5:30, venkata sai wrote:
>
> i have attached csv file and my output file here.. could anyone help
> me autogenerate code  by using macros  that should be in the output file
>
 --
> 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.


Re: Clojure(Script) web apps in 2018

2018-09-21 Thread Robert Levy
Luminus is great. Something people might not know about Luminus is that
it's more of a project template than a framework per se. It solves the
choice paralysis of what libraries to use when starting off.  It generates
a project, and you can take or leave the decisions it makes because after
project creation, as it is no longer involved any further after that.

On Mon, Sep 17, 2018 at 7:36 PM Daniel  wrote:

> Having built a couple of apps with Luminus (including a SPA), my vote
> definitely goes there.  I've even been able to cherry-pick functions and
> project organization from the leiningen template and inject them into a cli
> app which had a server component.  Extremely well organized and
> documented.  Easy to get started.  You'll get a tour of the entire
> ecosystem too - it's the only option IMO which gives you experience with
> all the popular ring-based libraries.
>
> --
> 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.


Unresolvable ns alias in keyword breaks reader before #_ reader macro applies

2018-08-22 Thread Robert Levy
I wouldn't consider this a bug or even an unfortunate behavior necessarily,
but potentially surprising and worth mentioning.  The comment reader macro
#_ works just fine as long as nothing breaks the reader.  The surprise
happens when you don't consider that for namespaced keywords using ns
aliases, the namespace resolution happens at reader-macro expansion time,
prior to evaluation.  As a logical consequence of this is that seemingly
commented out code will fail at read-time if the ns alias or namespace
doesn't exist.

Clojure repro:

user=> (println #_(::fooo/bar))

RuntimeException Invalid token: ::fooo/bar
clojure.lang.Util.runtimeException (Util.java:221)
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException
(Util.java:221)
user=> RuntimeException Unmatched delimiter: )
clojure.lang.Util.runtimeException (Util.java:221)

ClojureScript repro:

cljs.user=> (println #_(::fooo/bar))

cljs.user=> clojure.lang.ExceptionInfo: [line 1, col 23] Invalid keyword:
::fooo/bar. {:type :reader-exception, :ex-kind :reader-error, :file nil,
:line 1, :col 23}
at clojure.core$ex_info.invokeStatic(core.clj:4739)
at clojure.core$ex_info.invoke(core.clj:4739)
at clojure.tools.reader.impl.errors$throw_ex.invokeStatic(errors.clj:34)
at clojure.tools.reader.impl.errors$throw_ex.doInvoke(errors.clj:24)
...

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


Re: Two Senior Clojure developers based in Moscow looking for the interesting challenges and possibility for remote work

2018-08-03 Thread Robert Levy
The bouncer said, "I'm sorry sir, the bar is closed for a private function".

After a brief huddle of whispering to one another off to side, one of the
Clojure developers again approached the bouncer and said "we'd like to
speak directly to your Var"

On Fri, Aug 3, 2018 at 9:59 AM Raoul Duke  wrote:

> what happened after they, "walked into a bar"?
>
> --
> 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.


Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-23 Thread Robert Levy
You can also tell them also that since in practice it can be slippery to
keep track of what type of collection you're dealing with, it's common to
defensively coerce, eg. (conj (vec foo) 1 2) instead of just (conj foo 1 2).

On Sun, Jul 22, 2018 at 2:22 PM Christian Seberino 
wrote:

> - conj adds an element in the place best for the collection type.
>
>
> Is this a valid hypothetical to worry about?...
>
> Imagine you're the teacher and make the comment above.
>
> Student responds..
>
> "But why, Mr. Teacher, is the 'best' place different for lists and
> vectors?  That seems strange that they are opposite."
>
> <30 minute heated discussion ensues about aesthetics, efficiency and
> nuances of lists vs. vectors you were trying to avoid.>
>
>
>
>
>
>
>
>
> --
> 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.


Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-18 Thread Robert Levy
> Of course you have to "evaluate" to know that, but you also have to
evaluate "2" in the same way to know what it means.

I think you're missing the point.  2 is literal because you read it, eval
it, print it, and 2 (the result of evaluation) as printed is the same as
the original input. A function is read, eval'd, printed and is *not* the
same as what was read in. E.g  {:a +}  => {:a #function[clojure.core/+]}

Literals can be persisted to strings and read back in with no problem,
whereas non-literals can't.

On Wed, Jul 18, 2018 at 12:19 PM Gregg Reynolds  wrote:

>
>
> On Wed, Jul 18, 2018, 1:55 PM James Reeves  wrote:
>
>> On Wed, 18 Jul 2018 at 19:38, Gregg Reynolds  wrote:
>>
>>>
>>> On Tue, Jul 17, 2018, 4:11 PM James Reeves 
>>> wrote:
>>>

 A data literal evaluates to itself. So for example, `2` is a literal,
 because we only need to read it to know its value, whereas `(+ 1 1)`
 isn't a literal, because we also need to evaluate it to work out the value.

>>>
>>> Fair enough. But by that definition function expressions are also
>>> literals.
>>>
>>
>> Not at all:
>>
>> user=> (defn literal? [s] (let [e (read-string s)] (= e (eval e
>> #'user/literal?
>> user=> (literal? "2")
>> true
>> user=> (literal? "(fn [x] x)")
>> false
>> user=> (literal? "#(%)")
>> false
>> user=> (literal? "+")
>> false
>>
>> Function expressions don't evaluate to themselves.
>>
>
> To me that means either the definition is wrong or your literal? is
> rigged. Probably the latter; "literal" is meta, it can't be in the language.
>
> Look at it this way: the meaning ("value") of "lambda x.x+1" is just the
> function that increments its arg. Of course you have to "evaluate" to know
> that, but you also have to evaluate "2" in the same way to know what it
> means. Meaning "reduce", and neither form can be further reduced.
>
> Anyway my point is that clojure, like lisp, is a form of the lambda
> calculus, where everything is a function, even the Nats like 2. To me at
> least that is one of the most important lessons of functional programming.
> Ymmv.
>
> --
> 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.


Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-18 Thread Robert Levy
I should have done even 30 seconds of research before sending that last
message.  RRB has been available in Clojure since 2014
https://github.com/clojure/core.rrb-vector/blob/master/README.md If you use
that data structure instead of the normal vector, then concats will perform
better.

On Wed, Jul 18, 2018 at 9:59 AM Robert Levy  wrote:

> Ironically, concat is one of the few operations in Clojure that actually
> very likely to cause you performance headaches that actually will matter.
> Concatting is extremely slow.  I think there's a Bagwell functional data
> structure (RRB ?) that addresses the performance issues with concat, but to
> my knowledge it has not been added to Clojure.
>
> On Wed, Jul 18, 2018 at 8:17 AM Christian Seberino 
> wrote:
>
>> Actually I was just kicked out of paradise.  concat always returns a list
>> and does NOT return a vector for this (concat [1 2] [3 4]) sadly.
>>
>> cs
>>
>> ___
>>
>> Christian Seberino, Ph.D.
>> Phone: (936) 235-1139
>> Email: cseber...@gmail.com
>> ___
>>
>>
>>
>> On Wed, Jul 18, 2018 at 2:16 AM, Didier  wrote:
>>
>>> It's never a good idea to use the wrong data structure for the job.
>>>
>>> And thus Clojure takes the stance that it won't make bad ideas easy for
>>> you to use. Yet, it will never prevent you from doing anything.
>>>
>>> If you want to do something bad, you'll need to get your own hands dirty.
>>>
>>> That's why slow data structure access functions don't exist as standard.
>>> That's why data transforms are lazy by default. And why the non lazy
>>> variant (transducers) do loop fusion for you. That's why mutability is ugly
>>> and requires you to wrap things in extra verbosity. That's why OOP isn't
>>> there, and forces you to use the host interop if you want it. That's why
>>> there's only recursive loops. Etc.
>>>
>>> The Clojure standard lib is opinionated. It's not trying to make
>>> everything easy and convenient. It's trying to make things simple to reason
>>> about, and promote Rich Hickeys opinion of what is a good idea, and what
>>> isn't.
>>>
>>> But, it can afford to be this way, because it made itself a Lisp,
>>> meaning it gave you all the power needed to disagree and make your own
>>> core, which follows your own opinions of good and bad.[1]
>>>
>>> Now, I recommend that everyone should have a core library of their own
>>> that they keep around for cases like this, where they disagree.
>>>
>>> And for beginners, I mean, what are you trying to teach them? What
>>> problem requires them to add items to the beginning and end of an ordered
>>> collection?
>>>
>>> Anyways, my advice is to teach them concat. It's even nicer then
>>> append/prepend. You just give it the arguments where you want them to go.
>>>
>>> (concat [1] [2 3])
>>>
>>> (concat [1 2] [3])
>>>
>>> And it works for any type of ordered collections, even arrays.
>>>
>>> Also, this blog I think does a great job at teaching all this to a
>>> beginner
>>> https://medium.com/@greg_63957/conj-cons-concat-oh-my-1398a2981eab
>>>
>>>
>>>
>>> [1] Except for reader macros. Rich didn't want you to be able to change
>>> the whole program syntax in unconstrained ways. That's probably a good
>>> thing to at least keep the foundation universal accross code bases.
>>>
>>> --
>>> 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 em

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-18 Thread Robert Levy
Ironically, concat is one of the few operations in Clojure that actually
very likely to cause you performance headaches that actually will matter.
Concatting is extremely slow.  I think there's a Bagwell functional data
structure (RRB ?) that addresses the performance issues with concat, but to
my knowledge it has not been added to Clojure.

On Wed, Jul 18, 2018 at 8:17 AM Christian Seberino 
wrote:

> Actually I was just kicked out of paradise.  concat always returns a list
> and does NOT return a vector for this (concat [1 2] [3 4]) sadly.
>
> cs
>
> ___
>
> Christian Seberino, Ph.D.
> Phone: (936) 235-1139
> Email: cseber...@gmail.com
> ___
>
>
>
> On Wed, Jul 18, 2018 at 2:16 AM, Didier  wrote:
>
>> It's never a good idea to use the wrong data structure for the job.
>>
>> And thus Clojure takes the stance that it won't make bad ideas easy for
>> you to use. Yet, it will never prevent you from doing anything.
>>
>> If you want to do something bad, you'll need to get your own hands dirty.
>>
>> That's why slow data structure access functions don't exist as standard.
>> That's why data transforms are lazy by default. And why the non lazy
>> variant (transducers) do loop fusion for you. That's why mutability is ugly
>> and requires you to wrap things in extra verbosity. That's why OOP isn't
>> there, and forces you to use the host interop if you want it. That's why
>> there's only recursive loops. Etc.
>>
>> The Clojure standard lib is opinionated. It's not trying to make
>> everything easy and convenient. It's trying to make things simple to reason
>> about, and promote Rich Hickeys opinion of what is a good idea, and what
>> isn't.
>>
>> But, it can afford to be this way, because it made itself a Lisp, meaning
>> it gave you all the power needed to disagree and make your own core, which
>> follows your own opinions of good and bad.[1]
>>
>> Now, I recommend that everyone should have a core library of their own
>> that they keep around for cases like this, where they disagree.
>>
>> And for beginners, I mean, what are you trying to teach them? What
>> problem requires them to add items to the beginning and end of an ordered
>> collection?
>>
>> Anyways, my advice is to teach them concat. It's even nicer then
>> append/prepend. You just give it the arguments where you want them to go.
>>
>> (concat [1] [2 3])
>>
>> (concat [1 2] [3])
>>
>> And it works for any type of ordered collections, even arrays.
>>
>> Also, this blog I think does a great job at teaching all this to a
>> beginner
>> https://medium.com/@greg_63957/conj-cons-concat-oh-my-1398a2981eab
>>
>>
>>
>> [1] Except for reader macros. Rich didn't want you to be able to change
>> the whole program syntax in unconstrained ways. That's probably a good
>> thing to at least keep the foundation universal accross code bases.
>>
>> --
>> 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.
>

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

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-17 Thread Robert Levy
I don't entirely buy the official story on this feature, but it is what it
is.  In my experience, people do a lot of defensive typecasting, much more
than we reason about performance.  Because the performance just doesn't
really matter in the vast majority of cases, and we're more concerned with
making sure the element goes to the right place.  But like others have
said, that ship sailed in 2008.  I just make sure to cast my collections in
the way that explicitly ensures that conj works predictably.

On Tue, Jul 17, 2018 at 2:47 PM Christian Seberino 
wrote:

>
>> When writing software in Clojure, the data structures are often the
>> keystone of the codebase. When I write Clojure, I start by mapping out what
>> data structures and keywords I need, and from there write functions around
>> them. It's for this reason that I don't think prepend and append functions
>> are particularly useful for students, as the teacher should be encouraging
>> them to think *more* about the data structures they're using, not less.
>>
>
> I presume you mean that thinking more about data structures and thinking
> about computational efficiency are inseparable?  You can't do the former
> without the latter?
>
> cs
>
> --
> 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.


Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-17 Thread Robert Levy
Whoa, I think you are reading way too deeply into what I wrote.  Let me
explain what I meant: Lisp is great, Clojure is great, the community
doesn't typically change the core of the language-- the change process is
very conservative and largely top-down.  The rest of it was a cheap shot at
the drama in the Python community.

On Tue, Jul 17, 2018 at 1:39 PM Christian Seberino 
wrote:

>
> On Tue, Jul 17, 2018 at 3:13 PM, Robert Levy  wrote:
>
>> If you want to you can use the prepend and append found in tupelo lib, or
>> you can write your own training wheels lib for your students.  You have
>> total creative control over your course design.  Shaping your use of the
>> language's raw materials to build up to your domain/application is very
>> much a Lisp philosophy, don't ask Cognitect, go do it yourself.  Versus the
>> style of language where users beg the BDFL, and the conflicting beggars
>> create so much stress on the BDFL as to induce permanent burnout and
>> retirement. ;)
>>
>
> No one is asking for free dev work.  As you ready said, the tupelo lib
> already exists.  Not sure why discussing a question is a threat to anyone's
> emotional health.
> If anyone finds this thread "threatening" by all means please ignore it.
>
> cs
>
> --
> 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.


Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-17 Thread Robert Levy
If you want to you can use the prepend and append found in tupelo lib, or
you can write your own training wheels lib for your students.  You have
total creative control over your course design.  Shaping your use of the
language's raw materials to build up to your domain/application is very
much a Lisp philosophy, don't ask Cognitect, go do it yourself.  Versus the
style of language where users beg the BDFL, and the conflicting beggars
create so much stress on the BDFL as to induce permanent burnout and
retirement. ;)

On Tue, Jul 17, 2018 at 11:33 AM Christian Seberino 
wrote:

> Understanding the difference and why it's important are far more
>> illuminating than just forcing your prior model (like tupelo's
>> prepend/append). If your goal is education, then it's doubly important to
>> take this journey. It may be a few stops longer, but you'll actually learn
>> a lot more and create a mental model that will help you understand more of
>> Clojure's philosophy.
>>
>
> We both agree *eventually* it is important for students to understand the
> journey you are referring to.  I think where we possibly disagree is what
> to do in the absolute beginner programming courses.  For those I think I'd
> still vote for something like  tupelo's prepend/append for a few weeks
> until they get their programming legs.
>
> What is beautiful is that this does not involve some addition to the
> language standard or controversial vote to make it happen.  Basically,
> teachers can start with a beginners'
> library installed by default which they can discard later.  Think of such
> libraries as training wheels.  They aren't meant to last forever.
>
> cs
>
> --
> 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.


Re: [ANN] spec.alpha 0.2.168 and core.specs.alpha 0.2.36

2018-06-27 Thread Robert Levy
While we're pointing out typos/errata, the README for
https://github.com/clojure/core.specs.alpha says

"Clojure 1.9 (still in alpha releases) depends on this"

however 1.9 is no longer in alpha releases.

On Wed, Jun 27, 2018 at 9:01 AM Alex Miller  wrote:

> Fixed, thanks! Copy pasta...
>
> On Wed, Jun 27, 2018 at 10:46 AM, Leon Grapenthin <
> grapenthinl...@gmail.com> wrote:
>
>> Looks like the README of core.specs.alpha has the core.specs deps info by
>> mistake.
>>
>> Thank you for the relases.
>>
>>
>> On Tuesday, June 26, 2018 at 8:41:17 PM UTC+2, Alex Miller wrote:
>>>
>>> spec.alpha 0.2.168 is now available with the following changes:
>>>
>>>- CLJ-2182  Always
>>>check preds for s/& on nil input
>>>- CLJ-2178  Return
>>>resolved pred for s/& explain-data
>>>- CLJ-2177  Return
>>>valid resolved pred in s/keys explain-data
>>>- CLJ-2167  Properly
>>>check for int? in int-in-range? - thanks David Bürgin!
>>>- CLJ-2166  added
>>>function name to instrument exception map - thanks Josh Jones!
>>>- CLJ-2111  Clarify
>>>docstring for :kind in s/every
>>>- CLJ-2068  Capture
>>>form of set and function instances in spec
>>>- CLJ-2060  Remove a
>>>spec by s/def of nil
>>>- CLJ-2046  gen random
>>>subsets of or'd req keys in map specs - thanks David Chelimsky!
>>>- CLJ-2026  Prevent
>>>concurrent loads in dynaload
>>>- CLJ-2176  s/tuple
>>>explain-data :pred problem
>>>
>>> core.specs.alpha 0.2.36 is now available with the following changes:
>>>
>>>
>>>- CLJ-2186 : Map
>>>bindings should be :kind map?
>>>- CLJ-2314 : allow
>>>string array hinting in genclass return type
>>>
>>> If you are using Clojure 1.9.0 (or 1.10.0-alpha*), you'll be getting the
>>> prior version of these libs automatically as deps but you can override
>>> those by explicitly specifying these as dependencies of your library:
>>>
>>> {:deps
>>>  {org.clojure/spec.alpha {:mvn/version "0.2.168"}
>>>   org.clojure/core.specs.alpha {:mvn/version "0.2.36"}}}
>>>
>>>
>>> --
>> 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 a topic in the
>> Google Groups "Clojure" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/clojure/VPRXYgDasuM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>

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


Re: Clojure/flutter

2018-05-29 Thread Robert Levy
A while ago David Kay wrote about clojure-clr + xamarin.  Does anyone have
any success/horror stories going down that path? (It seems like Unity in
Clojure is much more well-trodden, though not open source.)  CLR approaches
may be a better option than React Native and the like, especially for using
APIs like ARCore and ARKit that are not supported by React Native yet (and
personally, AR is my motivation for getting into native app development to
begin with.)

On Sun, Apr 29, 2018 at 3:36 PM, Gregg Reynolds  wrote:

>
>
> On Sun, Apr 29, 2018, 5:24 PM Didier  wrote:
>
>> Honestly, I doubt any project will have more backing then Graal's native
>> image.
>>
>
> Looking at Graal.  Indistinguishable from magic AFAIK.
>
>>
>> So I think its the best shot at Clojure native we've ever had, and
>> probably the ideal one at that, since it'll boast all existing libraries.
>>
>> What could help is to then look at compiler options for Clojure that
>> could help leverage native image, and lower the restrictions imposed by
>> native image.
>>
>> --
>> 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.
>

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


Re: Clojure/flutter

2018-04-27 Thread Robert Levy
>
>
> Then there's the possibility of stealing flutter's thunder and writing
> clj->native compilers. Everybody wants that.
>
>
That would be awesome!


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


Re: Clojure/flutter

2018-04-27 Thread Robert Levy
dartjure?
darjure?
darture?
datura?

Well it's not just a question of how much effort it will take, but whether
the interest in Dart as a target (pun intended?) would be high enough to
sustain the project over time.

On Thu, Apr 26, 2018 at 11:06 AM, Kees-Jochem Wehrmeijer <henc...@gmail.com>
wrote:

> Flutter definitely looks interesting, but I guess to make it work with
> Clojure would require writing a 'ClojureDart', i.e. a Clojure that compiles
> to Dart code. Given Dart sits somewhere between Java and Javascript, this
> is maybe not undoable, but would certainly be a lot of work.
>
> On Thursday, April 26, 2018 at 8:09:13 AM UTC-7, Gregg Reynolds wrote:
>>
>>
>>
>> On Wed, Apr 25, 2018 at 5:01 PM, Robert Levy <r.p@gmail.com> wrote:
>>
>>> What would you say is the advantage of using Flutter instead of React
>>> Native?  Assuming you're not interested in Dart, what is the selling point?
>>>
>>
>> I haven't used it yet but the interesting bits to me are efficiency (no
>> Javascript bridge) and the user-space rendering pipeline.
>>
>> See What's Revolutionary about Flutter
>> <https://hackernoon.com/whats-revolutionary-about-flutter-946915b09514>
>>
>> Gregg
>>
> --
> 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.


Re: Clojure/flutter

2018-04-27 Thread Robert Levy
>
> Oh yeah, I forgot to mention: hot reloading! Have you heard of it? It's
> revolutionary! ;)
>
>>
>> Gregg
>>
> Yeah I've seen that somewhere before, I forget where... ;)

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


Re: Clojure/flutter

2018-04-25 Thread Robert Levy
What would you say is the advantage of using Flutter instead of React
Native?  Assuming you're not interested in Dart, what is the selling point?

On Wed, Apr 25, 2018 at 2:42 PM, Gregg Reynolds  wrote:

> Flutter is looking pretty good to me.  Sure would be nice to have a
> clojure->flutter compiler. Anthing there, there?
>
> --
> 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.


Re: [ANN] A couple of libraries for functional reactive web programming - Ulmus & Recurrent

2018-04-05 Thread Robert Levy
Oh, I misunderstood what jeremykross/recurrent was at first. I thought it
was a cyclejs wrapper, like the various clojurescript wrappers for
reactjs.  It turns out it's a ClojureScript implementation of the approach
that cyclejs implements.

On Wed, Apr 4, 2018 at 8:18 AM, Robert Levy <r.p.l...@gmail.com> wrote:

> Hi Jeremy,
>
> These look great!  This might be the wrong forum for it (or maybe it's the
> best forum for it), but I'd be curious to get your take on why one might
> choose Cycle over React with something like Reagent+Re-frame to do
> event-driven dataflow programming in the browser.  Surely Cycle is a much
> smaller community with a less active supporting library ecosystem.  It's
> true that React has more unnecessary complexity and OO-ish cruft, even with
> nice tools like re-frame to make things better.
>
> Rob
>
> On Fri, Mar 30, 2018 at 8:47 PM, Jeremy Kross <jeremy.kr...@gmail.com>
> wrote:
>
>> Hey everybody,
>>
>> I've been hacking on these for about two years, but I only recently got
>> around to documenting them to a place where they're semi-presentable.
>>
>> First up in Ulmus, a library for doing frp style programming in
>> Clojurescript.  I apes the Elm API to some degree.  Really just
>> higher-level core.async, but I've found it pretty great to work with.
>>
>> https://github.com/jeremykross/ulmus
>>
>> Second is Recurrent, a library for building functionally reactive web
>> components.  It's inspired most directly by cycle.js but I think there's
>> good bit of novelty there as well.  Can't say that it's for everybody, but
>> the way my mind works, it's been real joy to develop and use.
>>
>> https://github.com/jeremykross/recurrent
>>
>> Hope somebody else will find these cool as well.
>>
>> --
>> 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.


Re: [ANN] A couple of libraries for functional reactive web programming - Ulmus & Recurrent

2018-04-04 Thread Robert Levy
Hi Jeremy,

These look great!  This might be the wrong forum for it (or maybe it's the
best forum for it), but I'd be curious to get your take on why one might
choose Cycle over React with something like Reagent+Re-frame to do
event-driven dataflow programming in the browser.  Surely Cycle is a much
smaller community with a less active supporting library ecosystem.  It's
true that React has more unnecessary complexity and OO-ish cruft, even with
nice tools like re-frame to make things better.

Rob

On Fri, Mar 30, 2018 at 8:47 PM, Jeremy Kross 
wrote:

> Hey everybody,
>
> I've been hacking on these for about two years, but I only recently got
> around to documenting them to a place where they're semi-presentable.
>
> First up in Ulmus, a library for doing frp style programming in
> Clojurescript.  I apes the Elm API to some degree.  Really just
> higher-level core.async, but I've found it pretty great to work with.
>
> https://github.com/jeremykross/ulmus
>
> Second is Recurrent, a library for building functionally reactive web
> components.  It's inspired most directly by cycle.js but I think there's
> good bit of novelty there as well.  Can't say that it's for everybody, but
> the way my mind works, it's been real joy to develop and use.
>
> https://github.com/jeremykross/recurrent
>
> Hope somebody else will find these cool as well.
>
> --
> 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.


Re: [ANN] test-runner, a test runner for projects using Clojure Deps

2018-02-20 Thread Robert Levy
Just out of curiosity, are there any plans to provide similar tooling
consistent with this for ClojureScript unit tests via Clojure Deps?

On Tue, Feb 20, 2018 at 9:10 AM, Luke VanderHart 
wrote:

> You're very likely correct about shutdown-agents, I don't think I happened
> to fire up any agents in my test code. I'll try to reproduce as soon as I
> get a chance.
>
>
> On Tuesday, February 20, 2018 at 11:25:01 AM UTC-5, Eli Naeher wrote:
>>
>> I love this, and have set it up in our latest project alongside Lein.
>>
>> I've noticed a delay (~60s) after the tests finish and the results are
>> reported before the process exits. I'm wondering if there's a missing call
>> to shutdown-agents somewhere. Adding it to a shutdown hook doesn't seem to
>> have any effect. With lein test there is no similar delay.
>>
>> Thanks,
>> -Eli
>>
>>
>> On Fri, Feb 16, 2018, at 9:47 AM, Luke VanderHart wrote:
>>
>> The goal is to have a full featured, standardized test runner on a
>> project using basic Clojure Deps, without needing to introduce Boot or
>> Leiningen just for that.
>>
>> https://github.com/cognitect-labs/test-runner
>>
>> Feedback, bugfixes and PRs welcome.
>>
>>
>> --
>> 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.
>

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


Re: Something that has a spec is said to be ???

2017-11-13 Thread Robert Levy
Spec'd also seems to be the most conventional past tense form of spec as a
verb beyond the narrow context of clojure.spec as well.

http://www.dictionary.com/browse/spec-d

On Mon, Nov 13, 2017 at 2:23 PM, Shawn Rasheed  wrote:

> spec'ed appears to be the term used in the guides,
> https://clojure.org/guides/spec
>
> Cheers
>
> On Tue, Nov 14, 2017 at 11:17 AM, Didier  wrote:
>
>> Hey all,
>>
>> I'm facing a naming problem, I can't decide how I want to call something
>> that has a spec.
>>
>>
>>1. Something that has a spec is said to be *specced.*
>>2. Something that has a spec is said to be *speced.*
>>3. Something that has a spec is said to be *specified.*
>>
>> I'm leaning towards number 3. What does the community think?
>>
>> Also, is there any plan to later add a predicate for this? And if so,
>> would it be called any of these? Like specified? I want to start and use a
>> common vocabulary.
>>
>> Thanks.
>>
>> --
>> 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.
>>
>
>
>
> --
> ---sr
>
> --
> 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.


Re: Q: How to find out how much Clojure you use

2017-10-25 Thread Robert Levy
That would be very interesting, especially at an aggregate level, to
visualize clusters of Clojure sub-idioms (?) based on code people have
publicly shared with their name attached.  One way to get going with that
quickly would be write some Clojure code to collect, index, and analyze the
data in Elasticsearch so that you could use the various readymade
visualization tools that come with Kibana for "dashboards".  For one thing
you could look at geographical patterns, to see if that's even a thing. :)
And results over time, to see for example patterns of adoption.  Do people
still use refs and agents?  Does anyone really use transducers? ;) I am
curious to see the results if someone does this. It would be a good project
short enough for a Clojure meetup probably, given some preparation.

On Tue, Oct 24, 2017 at 11:24 PM, Andy Marks  wrote:

> It seems like everytime I watch another Clojure/Conj video or finish
> another 4Clojure problem, I learn about another piece of the Clojure core
> set of functions that I was unfamiliar with... which prompted the question:
>
> *What subset of the Clojure core API do I use?  Which functions are my
> favourites?  Which have I never used?*
>
> Ideally, I would like to point a tool at my GitHub account, have it look
> through all the Clojure code I've written and give me a histogram of my
> usage of the clojure.core API.
>
> My question to you all is: does anyone know of a tool that provides some
> of this functionality?
>
>
> --
> 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.


Re: Clojure IoT?

2016-04-10 Thread Robert Levy
An IOT company called Sensity based in the south bay was heavily recruiting
for their Clojure and Erlang stack last year.
On Apr 10, 2016 2:12 AM, "Mimmo Cosenza"  wrote:

> Hi Gregg,
> my team is working for a customer which is making a very intersting IoT
> device (named Linfa).
> We use cljs on a nodejs running on a microcontroller, clojure to implement
> microservices on the back-end and cljs/react.js/react.native to implement
> the app to control the iot device from any platform (browser, desktop, iOS,
> Android).
> Here is a link of its picture:
>
> https://drive.google.com/open?id=0B6VEMmGF1rzZVGZLa0RCcHgtck0
>
> mimmo
>
> On 10 Apr 2016, at 00:38, Gregg Reynolds  wrote:
>
> A very general question : is anybody other than me working with Clojure
> for IoT stuff?
>
> --
> 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.
>

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


Re: a project template containing clj, cljs cljc files

2016-03-06 Thread Robert Levy
Reagent-template may have improved recently, but the last time I checked,
about 5-6 months ago, I found it to be seriously misleading and outdated in
a number of ways in its opinions on the state of the art for clojurescript
tooling.  The template I found to be the best was the figwheel template.

On Sun, Mar 6, 2016 at 1:14 AM, Colin Yates  wrote:

> Hi Sunil, I always use
> https://github.com/reagent-project/reagent-template. Not sure it
> creates cljc out of the box but all you need to do is create a new
> directory for your .cljc files and add that to the project
> source-path.
>
> On 6 March 2016 at 05:25, Sunil S Nandihalli 
> wrote:
> > Hi everybody,
> >  I am trying to port an old project which uses cljx plugin and reagent to
> > use cljc and reader-conditionals. I was wondering if somebody can share a
> > simple template which has clj, cljs and cljc files in it?
> >
> > Thanks and regards,
> > Sunil.
> >
> > --
> > 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.
>

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


Re: [ANN] debux 0.2.0 is out

2016-02-24 Thread Robert Levy
Looks like there's some overlap with the debugging utils in
https://github.com/AlexBaranosky/print-foo

On Wed, Feb 24, 2016 at 4:57 PM, Philos Kim  wrote:

> Debux is a simple but useful library for debugging Clojure and
> ClojureScript. I wrote this library to debug my own Clojure(Script) code
> and to analyze other developer's Clojure(Script) code.
>
> This version includes the new features of debugging ->, ->>, let and comp
> forms.
>
> https://github.com/philoskim/debux
>
> --
> 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.


Re: is there a community "best practice" for including your co-workers libraries?

2015-10-16 Thread Robert Levy
Many use s3-wagon or a hosted maven. Or you could install dependencies
locally, but that's a pain. On the other hand putting AWS credentials in CI
for example to use s3-wagon can be annoying too.

What about depending on a specific git remote / commit?  This library might
be worth giving a shot: https://github.com/tobyhede/lein-git-deps


On Fri, Oct 16, 2015 at 7:14 PM, Shantanu Kumar 
wrote:

> We are using Artifactory for our internal Maven repo (supports enterprise
> Single-Sign-On):
> https://www.jfrog.com/open-source/
>
> Shantanu
>
>
> On Saturday, 17 October 2015 02:47:29 UTC+5:30, Lawrence Krubner wrote:
>>
>> I know this question has been asked before, but when I went searching I
>> mostly found old entries that were on a somewhat different topic, such as
>> "How to add a java library (that is not in maven) as a dependency for a
>> clojure library?"
>>
>> I wrote a Clojure app and my co-worker wrote a Java app. I have another
>> co-worker who is working on an app that would include the first 2 apps as
>> libraries.
>>
>> I have been able to get the combination working using the Leiningen
>> plugin "localrepo" but my co-worker wants me to make the other 2 libraries
>> available from some central repo that Leiningen can download from. How is
>> this usually done? Do I set up a Maven repo on one of the company servers?
>>
>>
>>
>>
>>
>>
>>
>>
>> --
> 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.


Re: Show: Naive data fitting with Nyarlathotep

2015-08-14 Thread Robert Levy
That sounds interesting!  So far I get a 404.  Maybe the repo needs to be
set public?

On Fri, Aug 14, 2015 at 11:19 AM, Divyansh Prakash 
divyanshprakas...@gmail.com wrote:

 Hey!
 Nyarlathotep https://github.com/divs1210/nyarlathotep is a tiny
 mathematical function generator that can be used as a (very naive) data
 fitting tool.
 It generates random functions and tests them against provided constraints.
 I don't think it's of any practical use, but it is fascinating to watch it
 in action.

 - Divyansh

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


Re: What does ^:internal mean?

2015-05-10 Thread Robert Levy
Some people don't like the native approach to private vars since anyone who
wants to override it can do so anyway, so they go with a purely
conventional and unenforced approach: delineate the boundaries of API vs
internal using :internal or :impl and/or put the internal bits in an impl
namespace.  The origins of this are partly in the Joy of Clojure and partly
in Phil Hagelberg's code I believe.

On Sun, May 10, 2015 at 12:00 PM, piastkra...@gmail.com wrote:

 Sadly, Google seems to think I am search for internal when I search for
 ^:internal so that makes it hard to find the documentation. I am curious
 about this code:

 ;;; Capture the standard def forms' arglists
 (def ^:internal defn-arglists (vec (:arglists (meta #'defn
 (def ^:internal fn-arglists (vec (:arglists (meta #'fn
 (def ^:internal defmulti-arglists (vec (:arglists (meta #'defmulti
 (def ^:internal def-arglists '[[symbol doc-string? init?]])

 From here:


 https://github.com/palletops/api-builder/blob/4d82355bec1ebdf7c501be71e2f3d156ae84ad2c/src/com/palletops/api_builder/impl.clj

 What does ^:internal mean in this context?







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


Re: Clojure needs a web framework with more momentum

2015-05-04 Thread Robert Levy
I tend to agree with this Gregg.  Either it's a solution in search of a
need, or it's a legitimate need but no one has produced something
compelling enough that a critical mass (or even a small contingent) has
picked up on and said yes, this feels like a significant improvement over à
la carte pieces.

Another thing worth mentioning that I don't see already mentioned is the
case for a web framework from a security perspective:
https://www.youtube.com/watch?v=CBL59w7fXw4 Having a lot of different
pieces without standard ways of putting them together can introduce
vulnerabilities that would not exist using an integrated framework.

On Mon, May 4, 2015 at 11:59 AM, Gregg Reynolds d...@mobileink.com wrote:


 On May 4, 2015 7:16 AM, Eric MacAdie emaca...@gmail.com wrote:
 
  I think what Clojure needs is a default. It doesn't matter if it is a
 web framework like Rails, or libraries strung together like Luminus.
 

 What Clojure needs is, well nothing. What the market MAY need is an
 entrepreneur who will produce the framework the OP craves.  No takers so
 far.  Conclusion: not a genuine unmet need.   But in the long run simple
 economics say the Clojure approach will win.  You can't make your product
 stand out by using the same framework everybody else uses.  The inevitable
 trend, driven by basic economics, is toward bespoke stuff, which is where
 Clojure excels.  My guess is that over the next 2-3 years we will see some
 clojure frameworks emerge but they will not be like traditional
 frameworks.  They'll be infinitely and easily customizable because they
 wont force choices-they'll just make the easy stuff not only easy but
 flexible. My 2 cents.

  When a Ruby newbie asks how to make a web app, the default answer is to
 look at Rails. In Python, the default answer is Django. Compared to that,
 the default answer in Clojure to do it yourself can sound like go jump off
 a cliff.
 
  = Eric MacAdie
 
 
  On Mon, May 4, 2015 at 7:09 AM, Sean Johnson belu...@acm.org wrote:
 
 
 
  On Monday, May 4, 2015 at 4:41:02 AM UTC-4, Sven Richter wrote:
 
  All in all this is basically the direction I want to go with closp and
 closp-crud. The intention is not to have a webframework, but to automatize
 steps that need to be done manually otherwise.
 
 
  One potential problem with this web framework as app template
 approach is upgrade-ability.  When 2.0 of your framework comes out, what
 happens to an app generated from 1.0 that wants to benefit from the new
 capabilities?
 
  It's not a showstopper to the approach. It's just something to think
 hard about. I've taken a couple of long lived Rails apps from Rails 1 to
 Rails 4 and while there have been breaking changes with each major version
 change (and some minor versions) in general it's pretty easy to keep up
 with the latest versions and there are copious docs (even whole ebooks in
 some cases) to walk developers through the changes.
 
  Cheers,
  Sean
 
  --
  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.

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

Re: flip in clojure

2015-04-30 Thread Robert Levy
from https://github.com/rplevy/mostly-useful (not updated in a while)

(defn flip
  given a function, create a flipped 2-argument function
  [f]
  (fn [a b] (f b a)))

(defmacro flop
  create a version of a function with a modified arity as specified by a
   vector of zero-indexed positions, e.g. [0 3 1 2]
  [f positions]
  (let [syms (vec (repeatedly (count positions) gensym))]
`(fn [~@syms] (~f ~@(map syms positions)



On Thu, Apr 30, 2015 at 5:49 PM, Jony Hudson jonyepsi...@gmail.com wrote:

 Another option is to use `as-`
 https://clojuredocs.org/clojure.core/as-%3E . It's more verbose ... I
 kind of like that aspect of it, but it may not be to everyone's taste.


 Jony


 On Friday, 1 May 2015 00:31:05 UTC+1, Vagmi Mudumbai wrote:

 Hi,

 I was introducing one of my colleagues to clojure[1] and we were
 trying to parse the reddit json as an exercise.

 (require '(clj-http.client :as client))
 (require '(clojure.data.json :as json))

 (def ^:const REDDIT-URL http://reddit.com/r/clojure.json?limit=100;)
 (def ^:const headers {:headers {User-Agent showoffclojure.core by
 vagmi}})

 (let [entries_ (- REDDIT-URL
(client/get headers)
(:body)
(json/read-str :key-fn keyword)
(:data)
(:children))]
   (map :data entries))

 It would have been nice if we were able to write the map as a part of
 the threading macro. So if there were a flip function like in haskell,
 we could flip the args to the function hand have the map in the
 threading macro. I could not find one so I wrote one.

 (defn flip [fn_]
   (fn [x y  args]
 (apply fn_ (into [y x] args

 Now I can bring in the map as a part of the - threading macro.

 (- REDDIT-URL
 (client/get headers)
 (:body)
 (json/read-str :key-fn keyword)
 (:data)
 (:children)
 ((flip map) :data))

 This seems to be rather easy and useful and gets rid of the let block.
 Are there any implications to performance or impact to laziness by
 using flip? This would be useful even on the transduced version of
 map like ((flip transduce) (map :data)) on the last expression.

 Regards,
 Vagmi


 [1]: (
 http://blog.tarkalabs.com/2015/04/30/experience-report-introducing-an-experienced-ruby-developer-to-clojure/)

 and

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


Re: thread-any macro %

2014-11-23 Thread Robert Levy
Henrik,

The reason for  was that when at Akamai we had the idea to create a macro
of this kind, we were aware of already established strong opinions for and
against the idea of a threading macro with a specifiable position, by some
in the Clojure community.  Stephen Compall had been reading Scheme
specifications and was aware of the cut operator and its semantics. Using
the cut operator addresses one of the more valid concerns, namely that the
semantics of % is not appropriate for an arrow, given the way that would
imply some sort of lexical binding-- it's just confusing. We had to come up
with a name for the macro itself, and I came up with - because of the way
in which it echoes the cut operator  itself. The - macro in
swiss-arrows is a rewrite of the one we used at Akamai, but retains the
name, the use of the cut operator, and the same basic idea modulo some
later tweaks.

Rob

On Sat, Nov 15, 2014 at 6:58 PM, Henrik Eneroth henrik.ener...@gmail.com
wrote:

 You can find this functionality in the Swiss Arrows library here:
 https://github.com/rplevy/swiss-arrows

 My first thought was that using the % symbol seems cleaner than the  of
 Swiss Arrows. Thinking about it though, wouldn't overloading the % create
 trouble when you do want to use the literal form of an anonymous function
 within a % clause?


 On Saturday, November 15, 2014 2:55:51 PM UTC+1, Krzysiek Herod wrote:

 Guys, what do you think about new thread macro (I would call it
 thread-any and represent it as %), that would require you to always
 specify the position of the argument you want to pass to the function?

 This code:

 (defn csv-line-sql-line [table, line]
   (- line
   (str  )
   (str/split separator)
   (#(map csv-field-sql-field %))
   (#(str/join ,  %))
   (str/replace strings-wrapper \)
   (#(str INSERT INTO , table,  VALUES( % );

 would become:

 (defn csv-line-sql-line [table, line]
   (% line
   (str %  )
   (str/split % separator)
   (map csv-field-sql-field %)
   (str/join ,  %)
   (str/replace strings-wrapper % \)
   (str INSERT INTO , table,  VALUES( % );)))

 Reasoning:
 - there are functions that are thread-first fiendly, and other that are
 thread-last friendly, by using thread-in you don't have to redefine
 functions only to change the order of the attributes
 - I find it easier to follow execution chain if the argument is passed
 explicitely

 PS. I'm a clojure newbie, still in the process of learning basics. For
 example I'm not sure how to implement such macro yet, so if you find
 something obviously wrong, or missing in my suggestion, please let me know.
 I'll be super happy to read about alternative solutions to achieve similar
 goal.

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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-19 Thread Robert Levy
I like cyclefn too.  I thought of something like that too, but my reason
for preferring
https://github.com/rplevy/funcycle/blob/master/src/fun/cycle.clj over it
was only that if you aren't careful and you hang onto the produced
function, you might get some unwanted non-determinism.

On Mon, Nov 17, 2014 at 11:14 PM, Andy L core.as...@gmail.com wrote:

 Thanks for all the ideas. I like cyclefn the most, a bit of investment
 resulting in super clean output.

 Andy

 On Sat, Nov 15, 2014 at 9:35 AM, Ben Wolfson wolf...@gmail.com wrote:

 or

 (defn enumerate [xs] (map vector (range) xs))

 (defn altsum [n] (reduce (fn [acc [i f]] (f acc (inc i)))
  0
 (take n (enumerate (cycle [+ -])



 On Fri, Nov 14, 2014 at 3:41 PM, Andrew Oberstar ajobers...@gmail.com
 wrote:

 How about this?

 (defn cyclefn
   [ fs]
   (let [fcycle (cycle fs)
 rem-fs (atom fcycle)]
 (fn [ args]
   (let [f (first @rem-fs)]
 (swap! rem-fs rest)
 (apply f args)

 (reduce (cyclefn + -) (range 1 100))

 cyclefn could be used to cycle through any set of functions you want and
 the result used as if it was a normal function.


 Andy

 On Fri, Nov 14, 2014 at 7:16 AM, Henrik Lundahl 
 henrik.lund...@gmail.com wrote:

 How about this?  :-)

 (defn altsum [n] (/ (if (odd? n) (+ 1 n) (- n)) 2))

 --
 Henrik


 On Fri, Nov 14, 2014 at 1:48 PM, Gary Verhaegen 
 gary.verhae...@gmail.com wrote:

 What about cheating a bit?

 (interleave
   (iterate #(+ % 2) 1)
   (iterate #(- % 2) -2))

 Then take n, reduce +, or whatever else you might want to do with the
 series.

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


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




 --
 Ben Wolfson
 Human kind has used its intelligence to vary the flavour of drinks,
 which may be sweet, aromatic, fermented or spirit-based. ... Family and
 social life also offer numerous other occasions to consume drinks for
 pleasure. [Larousse, Drink entry]

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

Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
(defmacro altsum [n] `(- 0 ~@(map list (cycle [+ -]) (range 1 n

On Thu, Nov 13, 2014 at 9:02 PM, Andy L core.as...@gmail.com wrote:

 (reduce + (map * (mapcat (fn[_] [1 -1]) (repeat nil)) (range 1 n)))

 not the best pattern for this case, but possibly useful to generate
 alternated values ...

 A.

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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
You don't need this for numbers over 900 right?

On Thu, Nov 13, 2014 at 9:19 PM, Robert Levy r.p.l...@gmail.com wrote:

 (defmacro altsum [n] `(- 0 ~@(map list (cycle [+ -]) (range 1 n

 On Thu, Nov 13, 2014 at 9:02 PM, Andy L core.as...@gmail.com wrote:

 (reduce + (map * (mapcat (fn[_] [1 -1]) (repeat nil)) (range 1 n)))

 not the best pattern for this case, but possibly useful to generate
 alternated values ...

 A.

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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
Is that any more elegant than Dave's (reduce + (map * (cycle [1 -1]) (range
1 n))) though?  I would say that's the best actually sensible answer
proposed in this thread.

On Thu, Nov 13, 2014 at 9:54 PM, Andy L core.as...@gmail.com wrote:



 On Thu, Nov 13, 2014 at 7:23 PM, Robert Levy r.p.l...@gmail.com wrote:

 You don't need this for numbers over 900 right?


 I see what you mean. But no, I just practice and try to capture patterns.
 So, going after your example I got following:

 (reduce + (map applyv (cycle [+ -]) (range 1 10)))

 where something like applyv perhaps exists,
 (defn applyv [f a] (f v)) - but I am not sure how to find it.

 A.



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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
But for applyv you could do this:

(*reduce + *(*map *(*comp eval list*) (*cycle *[*+ -*]) (*range 1 10*)))

On Thu, Nov 13, 2014 at 10:06 PM, Robert Levy r.p.l...@gmail.com wrote:

 Is that any more elegant than Dave's (reduce + (map * (cycle [1 -1])
 (range 1 n))) though?  I would say that's the best actually sensible
 answer proposed in this thread.

 On Thu, Nov 13, 2014 at 9:54 PM, Andy L core.as...@gmail.com wrote:



 On Thu, Nov 13, 2014 at 7:23 PM, Robert Levy r.p.l...@gmail.com wrote:

 You don't need this for numbers over 900 right?


 I see what you mean. But no, I just practice and try to capture patterns.
 So, going after your example I got following:

 (reduce + (map applyv (cycle [+ -]) (range 1 10)))

 where something like applyv perhaps exists,
 (defn applyv [f a] (f v)) - but I am not sure how to find it.

 A.



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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
(let [op (atom +)]
  (defn alt-op [a b]
((swap! op #(if (= % +) - +)) a b)))

(map alt-op (range 1 10))

On Thu, Nov 13, 2014 at 10:09 PM, Robert Levy r.p.l...@gmail.com wrote:

 But for applyv you could do this:

 (*reduce + *(*map *(*comp eval list*) (*cycle *[*+ -*]) (*range 1 10*)))

 On Thu, Nov 13, 2014 at 10:06 PM, Robert Levy r.p.l...@gmail.com wrote:

 Is that any more elegant than Dave's (reduce + (map * (cycle [1 -1])
 (range 1 n))) though?  I would say that's the best actually sensible
 answer proposed in this thread.

 On Thu, Nov 13, 2014 at 9:54 PM, Andy L core.as...@gmail.com wrote:



 On Thu, Nov 13, 2014 at 7:23 PM, Robert Levy r.p.l...@gmail.com wrote:

 You don't need this for numbers over 900 right?


 I see what you mean. But no, I just practice and try to capture
 patterns. So, going after your example I got following:

 (reduce + (map applyv (cycle [+ -]) (range 1 10)))

 where something like applyv perhaps exists,
 (defn applyv [f a] (f v)) - but I am not sure how to find it.

 A.



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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
sorry, make that

(*reduce alt-op *(*range 1 10)*)

On Thu, Nov 13, 2014 at 10:28 PM, Robert Levy r.p.l...@gmail.com wrote:

 (let [op (atom +)]
   (defn alt-op [a b]
 ((swap! op #(if (= % +) - +)) a b)))

 (map alt-op (range 1 10))

 On Thu, Nov 13, 2014 at 10:09 PM, Robert Levy r.p.l...@gmail.com wrote:

 But for applyv you could do this:

 (*reduce + *(*map *(*comp eval list*) (*cycle *[*+ -*]) (*range 1 10*)))

 On Thu, Nov 13, 2014 at 10:06 PM, Robert Levy r.p.l...@gmail.com wrote:

 Is that any more elegant than Dave's (reduce + (map * (cycle [1 -1])
 (range 1 n))) though?  I would say that's the best actually sensible
 answer proposed in this thread.

 On Thu, Nov 13, 2014 at 9:54 PM, Andy L core.as...@gmail.com wrote:



 On Thu, Nov 13, 2014 at 7:23 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 You don't need this for numbers over 900 right?


 I see what you mean. But no, I just practice and try to capture
 patterns. So, going after your example I got following:

 (reduce + (map applyv (cycle [+ -]) (range 1 10)))

 where something like applyv perhaps exists,
 (defn applyv [f a] (f v)) - but I am not sure how to find it.

 A.



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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
I was just thinking about this some more. Here's a slightly less terrible
idea:

(defn rotate [coll]
  (rest (take (inc (count coll))
  (cycle coll

(defn reducycle [fns init coll]
  (let [fns-atom (atom fns)
alt-op (fn [ args]
 (swap! fns-atom rotate)
 (apply (first @fns-atom) args))]
(reduce alt-op init coll)))

(reducycle [- +] 0 (range 1 10))

On Thu, Nov 13, 2014 at 10:30 PM, Robert Levy r.p.l...@gmail.com wrote:

 sorry, make that

 (*reduce alt-op *(*range 1 10)*)

 On Thu, Nov 13, 2014 at 10:28 PM, Robert Levy r.p.l...@gmail.com wrote:

 (let [op (atom +)]
   (defn alt-op [a b]
 ((swap! op #(if (= % +) - +)) a b)))

 (map alt-op (range 1 10))

 On Thu, Nov 13, 2014 at 10:09 PM, Robert Levy r.p.l...@gmail.com wrote:

 But for applyv you could do this:

 (*reduce + *(*map *(*comp eval list*) (*cycle *[*+ -*]) (*range 1 10*)))

 On Thu, Nov 13, 2014 at 10:06 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 Is that any more elegant than Dave's (reduce + (map * (cycle [1 -1])
 (range 1 n))) though?  I would say that's the best actually sensible
 answer proposed in this thread.

 On Thu, Nov 13, 2014 at 9:54 PM, Andy L core.as...@gmail.com wrote:



 On Thu, Nov 13, 2014 at 7:23 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 You don't need this for numbers over 900 right?


 I see what you mean. But no, I just practice and try to capture
 patterns. So, going after your example I got following:

 (reduce + (map applyv (cycle [+ -]) (range 1 10)))

 where something like applyv perhaps exists,
 (defn applyv [f a] (f v)) - but I am not sure how to find it.

 A.



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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
This is pretty trivial, but it is maybe sometimes more natural to express
something as a cycling pattern of function applications over some data than
as one constant function.  The typical way of expressing those cases
involves twisting it around so that the data is rotated/alternated instead
of what you want which is a rotating sequence of functions in your map or
reduce.  I'm guessing something this has come up before on this list.

https://github.com/rplevy/reducycle/blob/master/src/red/ucycle.clj

On Thu, Nov 13, 2014 at 11:10 PM, Robert Levy r.p.l...@gmail.com wrote:

 I was just thinking about this some more. Here's a slightly less terrible
 idea:

 (defn rotate [coll]
   (rest (take (inc (count coll))
   (cycle coll

 (defn reducycle [fns init coll]
   (let [fns-atom (atom fns)
 alt-op (fn [ args]
  (swap! fns-atom rotate)
  (apply (first @fns-atom) args))]
 (reduce alt-op init coll)))

 (reducycle [- +] 0 (range 1 10))

 On Thu, Nov 13, 2014 at 10:30 PM, Robert Levy r.p.l...@gmail.com wrote:

 sorry, make that

 (*reduce alt-op *(*range 1 10)*)

 On Thu, Nov 13, 2014 at 10:28 PM, Robert Levy r.p.l...@gmail.com wrote:

 (let [op (atom +)]
   (defn alt-op [a b]
 ((swap! op #(if (= % +) - +)) a b)))

 (map alt-op (range 1 10))

 On Thu, Nov 13, 2014 at 10:09 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 But for applyv you could do this:

 (*reduce + *(*map *(*comp eval list*) (*cycle *[*+ -*]) (*range 1 10*))
 )

 On Thu, Nov 13, 2014 at 10:06 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 Is that any more elegant than Dave's (reduce + (map * (cycle [1 -1])
 (range 1 n))) though?  I would say that's the best actually sensible
 answer proposed in this thread.

 On Thu, Nov 13, 2014 at 9:54 PM, Andy L core.as...@gmail.com wrote:



 On Thu, Nov 13, 2014 at 7:23 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 You don't need this for numbers over 900 right?


 I see what you mean. But no, I just practice and try to capture
 patterns. So, going after your example I got following:

 (reduce + (map applyv (cycle [+ -]) (range 1 10)))

 where something like applyv perhaps exists,
 (defn applyv [f a] (f v)) - but I am not sure how to find it.

 A.



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


Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-13 Thread Robert Levy
Changed name:
https://github.com/rplevy/funcycle/blob/master/src/fun/cycle.clj

On Fri, Nov 14, 2014 at 12:49 AM, Robert Levy r.p.l...@gmail.com wrote:

 This is pretty trivial, but it is maybe sometimes more natural to express
 something as a cycling pattern of function applications over some data than
 as one constant function.  The typical way of expressing those cases
 involves twisting it around so that the data is rotated/alternated instead
 of what you want which is a rotating sequence of functions in your map or
 reduce.  I'm guessing something this has come up before on this list.

 https://github.com/rplevy/reducycle/blob/master/src/red/ucycle.clj

 On Thu, Nov 13, 2014 at 11:10 PM, Robert Levy r.p.l...@gmail.com wrote:

 I was just thinking about this some more. Here's a slightly less terrible
 idea:

 (defn rotate [coll]
   (rest (take (inc (count coll))
   (cycle coll

 (defn reducycle [fns init coll]
   (let [fns-atom (atom fns)
 alt-op (fn [ args]
  (swap! fns-atom rotate)
  (apply (first @fns-atom) args))]
 (reduce alt-op init coll)))

 (reducycle [- +] 0 (range 1 10))

 On Thu, Nov 13, 2014 at 10:30 PM, Robert Levy r.p.l...@gmail.com wrote:

 sorry, make that

 (*reduce alt-op *(*range 1 10)*)

 On Thu, Nov 13, 2014 at 10:28 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 (let [op (atom +)]
   (defn alt-op [a b]
 ((swap! op #(if (= % +) - +)) a b)))

 (map alt-op (range 1 10))

 On Thu, Nov 13, 2014 at 10:09 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 But for applyv you could do this:

 (*reduce + *(*map *(*comp eval list*) (*cycle *[*+ -*]) (*range 1 10*)
 ))

 On Thu, Nov 13, 2014 at 10:06 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 Is that any more elegant than Dave's (reduce + (map * (cycle [1 -1])
 (range 1 n))) though?  I would say that's the best actually sensible
 answer proposed in this thread.

 On Thu, Nov 13, 2014 at 9:54 PM, Andy L core.as...@gmail.com wrote:



 On Thu, Nov 13, 2014 at 7:23 PM, Robert Levy r.p.l...@gmail.com
 wrote:

 You don't need this for numbers over 900 right?


 I see what you mean. But no, I just practice and try to capture
 patterns. So, going after your example I got following:

 (reduce + (map applyv (cycle [+ -]) (range 1 10)))

 where something like applyv perhaps exists,
 (defn applyv [f a] (f v)) - but I am not sure how to find it.

 A.



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


Re: Is Clojure right for me?

2013-12-27 Thread Robert Levy
Mark,

Your comment Clojure's namespaces are quite limited in ways that
frequently cause me pain brings to mind Daniel Spiewak's talk on
modularity in functional languages: http://2013.flatmap.no/spiewak.html. It
might be interesting to Massimiliano as well.

Spiewak is actually criticizing Haskell's approach to modules and not
Clojure's but similar criticisms could apply to both. The gist of what he
says is that there are expressive advantages to Scala's decision to treat
modules as first class things.

He then goes on to cite Clojure's protocols as another example of an OO
abstraction improving modularity in an FP language, but that's not news
here.

Rob


On Thu, Dec 26, 2013 at 7:26 PM, Mark Engelberg mark.engelb...@gmail.comwrote:

 One reason it might not be clear what I'm driving it is that in trying to
 create a minimalist example, I used grid dimensions, and in reality, you'd
 probably know right away to put something like that in a data structure,
 and pass it around to all your functions.

 Try to imagine that at the beginning of your project, you really do
 believe that you're only going to ever be working with 3x4 grids, and then
 later, you realize that's not the case.

 In the early phase, it's very easy to construct a bunch of functions that
 all refer to those shared vars (in my example `rows` and `cols`).  Later,
 when you realize rows and cols can change, making those names parameters is
 a major overhaul to the codebase.  I believe that most Clojurians try to
 delay the refactoring by using `binding` to alter those vars.  But that's a
 fragile strategy, and eventually the code typically needs to be rewritten.



 On Thu, Dec 26, 2013 at 7:04 PM, Mark Engelberg 
 mark.engelb...@gmail.comwrote:

 Does this OO pseudocode help clarify at all?
 https://gist.github.com/Engelberg/8142000

 On Thu, Dec 26, 2013 at 6:27 PM, Stuart Halloway 
 stuart.hallo...@gmail.com wrote:

 Hi Mark,

 I am not following your example.  Can you post (pseudocode fine) what a
 good OO impl would look like, and why Clojure's defrecords can't do
 something similar?

 Stu


  --
 --
 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/groups/opt_out.


-- 
-- 
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/groups/opt_out.


Re: Library can depend on an older version of itself?

2013-12-23 Thread Robert Levy
Since it's just temporary, maybe create a temporary namespace hierarchy
with the old version of the compiler. This would be a terrible sin if you
intended for that code to stick around but if you promise you will throw
away the older version once you don't need it anymore...


On Mon, Dec 23, 2013 at 4:18 PM, Michael Bradley, Jr. 
michaelsbradle...@gmail.com wrote:

 I’m writing a parser that will be easier to write with itself, but I want
 to be able to “freeze” an earlier version that’s passing all the tests (for
 features implemented so far) and which is implemented quite differently.
  The older version can then be used as the basis for the next version, and
 that version in turn as the basis for the version after next, and so on.

 --
 Michael Bradley, Jr.
 @michaelsbradley




 On Dec 23, 2013, at 18:12, James Reeves ja...@booleanknot.com wrote:

 I don't have any suggestions as to how this might be achieved, I'm afraid,
 but I am very curious as to *why* you'd want to do this.

 - James


 On 24 December 2013 00:07, Michael Bradley, Jr. 
 michaelsbradle...@gmail.com wrote:

 Is there a straightforward way to setup a Clojure library so that it can
 depend on an older version of itself?

 I can think of a couple of ways to do this that seem clunky, but was
 wondering what approaches (if any) have worked well for other folks.
 Something involving pomegranate and clojure.tools.namespace?

 --
 Michael Bradley
 @michaelsbradley


 --
 --
 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/groups/opt_out.



 --
 --
 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 a topic in the
 Google Groups Clojure group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/clojure/OFwMQ5apN0Y/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 clojure+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.


  --
 --
 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/groups/opt_out.


-- 
-- 
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/groups/opt_out.


Re: Recruiter claims to be Rick Hickey's sister

2013-12-02 Thread Robert Levy
Yes Alan, Jenn Hillner is Rich Hickey's sister. I've worked with her on
finding a job before, and highly recommend.

-Rob


On Mon, Dec 2, 2013 at 2:18 PM, Alan Shaw noden...@gmail.com wrote:

 Can I get a quick reality check on this?
 Thanks!

 -A

 --
 --
 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/groups/opt_out.


-- 
-- 
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/groups/opt_out.


Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Robert Levy
No, Asim is right, and the majority of LOC is macro code (which expands to
a deftype expression).


On Mon, Aug 26, 2013 at 11:51 AM, Jim - FooBar(); jimpil1...@gmail.comwrote:

 I had a quick look at clj-tuple and I don't remember seeing any macros...

 Jim



 On 26/08/13 19:02, Asim Jalis wrote:

 I believe this is what clj-tuple is doing under the hood with macros.

 On Aug 26, 2013, at 10:38 AM, Kevin Downey redc...@gmail.com wrote:

  A Tuple protocol that defines get0 get1 get3 etc for fast element access
 that doesn't tie you to using field names might be a good idea.

 On 8/25/13 9:35 AM, Zach Tellman wrote:

 I don't think so, even the existence of all the Tuple* types are an
 implementation detail, and you'd need to hint it as the right one to get
 sane performance.  (nth t n) has good performance, you should prefer
 that.

 On Saturday, August 24, 2013 8:15:40 PM UTC-7, Ben wrote:

 Are the element names .e0, .e1 etc. considered part of the public
 interface of tuple objects?


 On Sat, Aug 24, 2013 at 7:38 PM, Zach Tellman ztel...@gmail.com
 javascript:**

 wrote:
 I just pulled some code I wrote while trying to optimize 'memoize'
 into
 its own library: 
 https://github.com/ztellman/**clj-tuplehttps://github.com/ztellman/clj-tuple.
  It only has the
 one function, so I assume no one will need too much explanation.
  However,
 there may still be room for performance improvements, so if anyone
 wants to
 take a stab, pull requests are welcome.

 Zach

 --
 --
 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=enhttp://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/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .



 --
 Ben Wolfson
 Human kind has used its intelligence to vary the flavour of drinks,
 which
 may be sweet, aromatic, fermented or spirit-based. ... Family and
 social
 life also offer numerous other occasions to consume drinks for
 pleasure.
 [Larousse, Drink entry]


 --
 And what is good, Phaedrus,
 And what is not good—
 Need we ask anyone to tell us these things?


 --
 --
 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+unsubscribe@**googlegroups.comclojure%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/clojure?hl=enhttp://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+unsubscribe@**googlegroups.comclojure%2bunsubscr...@googlegroups.com
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .


-- 
-- 
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/groups/opt_out.


Re: Status of Generic Functions (a la lisp)

2013-08-04 Thread Robert Levy
But isn't that the whole point of protocols, polymorphic dispatch that is
fast?


On Sat, Aug 3, 2013 at 11:45 PM, Răzvan Rotaru razvan.rot...@gmail.comwrote:

 The keyword here is speed. Multimethods are not fast. They don't use the
 JVM for dispatch (as far as I know). Protocols are fast. That's the reason
 for their existence. I want to find out whether there's some effort
 invested in making fast multiple dispatch in Clojure (and how else can it
 be but based on Java types?).

  --
 --
 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/groups/opt_out.




-- 
-- 
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/groups/opt_out.




Re: Status of Generic Functions (a la lisp)

2013-08-04 Thread Robert Levy
Multiple vs single dispatch, hmm. You can always use a case statement too.


On Sat, Aug 3, 2013 at 11:56 PM, Mark Engelberg mark.engelb...@gmail.comwrote:

 The word fast is relative, of course.  I've been happily using Clojure's
 multimethods for a long time.  They are certainly fast enough for a wide
 range of uses.

 I've seen a couple instances where people used a couple levels of
 protocols (e.g., one function dispatching on the type of the first argument
 in turn calling something that dispatches on the second argument) in order
 to get some additional speed with multiple dispatch on type, but I haven't
 found the need to do that myself.

  --
 --
 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/groups/opt_out.




-- 
-- 
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/groups/opt_out.




Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Robert Levy
Sounds like he wants predicate dispatch? That was an early motivation for
core.logic and as far as I know it's in the works.


On Sat, Aug 3, 2013 at 4:22 AM, Răzvan Rotaru razvan.rot...@gmail.comwrote:

 Hi,

 I'm looking for fast lisp style generic functions in clojure. In other
 words: multimethods that dispatch on the java type.
 A search on the web revealed little, since protocols and multimethods
 always show up. I have also seen some old discussion in this group on the
 topic, but I couldn't figure out whether there is a usable implementation
 out there. So I'm posting my question on this group.

 1/ Is there generic function implementation out there that I can use?
 2/ Are there plans to include them in future versions of clojure?
 3/ And lastly, could this be implemented as a sequence of single dispatch
 (using the available single dispatch, which is fast)?

 Thanks,
 Răzvan

 --
 --
 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/groups/opt_out.




-- 
-- 
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/groups/opt_out.




Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Robert Levy
Oh wait nm, misread completely. The solution exists and it's called
protocols.


On Sat, Aug 3, 2013 at 11:37 AM, Robert Levy r.p.l...@gmail.com wrote:

 Sounds like he wants predicate dispatch? That was an early motivation for
 core.logic and as far as I know it's in the works.


 On Sat, Aug 3, 2013 at 4:22 AM, Răzvan Rotaru razvan.rot...@gmail.comwrote:

 Hi,

 I'm looking for fast lisp style generic functions in clojure. In other
 words: multimethods that dispatch on the java type.
 A search on the web revealed little, since protocols and multimethods
 always show up. I have also seen some old discussion in this group on the
 topic, but I couldn't figure out whether there is a usable implementation
 out there. So I'm posting my question on this group.

 1/ Is there generic function implementation out there that I can use?
 2/ Are there plans to include them in future versions of clojure?
 3/ And lastly, could this be implemented as a sequence of single dispatch
 (using the available single dispatch, which is fast)?

 Thanks,
 Răzvan

 --
 --
 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/groups/opt_out.






-- 
-- 
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/groups/opt_out.




Re: In what OS do you code?

2013-06-17 Thread Robert Levy
from the Counterclockwise docs: the preferred way to create a new project
is via the New  Leiningen Project Wizard


On Mon, Jun 17, 2013 at 1:33 AM, Chris Ford christophertf...@gmail.comwrote:

 Robert, the Leiningen survey might under-report Windows-based usage of
 Clojure, as I think Eclipse+Counter-clockwise is especially popular there.


 On 17 June 2013 02:03, Robert Levy r.p.l...@gmail.com wrote:

 There's the State of Clojure Survey:
 http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/.
 I think Chas usually asks for ideas on what the questions should be, so
 that might be a good question to suggest next time around.

 The Leiningen survey asks that question and finds 79% Linux vs only 62%
 Mac https://lein-survey-2013.herokuapp.com/results  The Leiningen
 results likely mirror Clojure OS preference more generally, since the vast
 majority of Clojure users use Leiningen.



 On Fri, Jun 14, 2013 at 11:15 AM, Raoul Duke rao...@gmail.com wrote:

  Thanks for all the responses, it looks like Linux is the predominant
 OS in
  the Clojure community.


 er, wow. that's a bit of a leap, isn't it?

 --
 --
 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/groups/opt_out.



  --
 --
 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/groups/opt_out.




  --
 --
 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/groups/opt_out.




-- 
-- 
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/groups/opt_out.




Re: Clojure in production

2013-06-17 Thread Robert Levy
Hi Plinio,

We use Clojure for nearly everything we do at Runa (we also have a little
bit of Ruby and JS in our stack). For more info, see
http://www.workatruna.com/clojure.html.

Rob


On Mon, Jun 17, 2013 at 6:49 AM, Giacomo Cosenza mimmo.cose...@gmail.comwrote:

 Hi Plinio,
 we released today in production a clj/cljs application which implements an
 animated/interactive bubble chart on client side by getting tha data (in
 edn format) from the the server.

 The client has been implemented by using clojurescript and the following
 main libs:
 - domina
 - c2
 - d3

 The server has been implemented by using clojure and the following libs:
 - compojure
 - korma
 - necessary-evil
 - timbre
 - clj-logging-config

 The edn format is exchanged between the server and client by using
 shoreleave-remote-ring and shoreleave-remote.

 We're very happy with both clojure and clojurescript. In a couple of week
 we're going to release the bubble-chart component on github.

 Mimmo



 On Jun 10, 2013, at 11:47 PM, Plínio Balduino wrote:

  Hi there
 
  I'm writing a talk about Clojure in the real world and I would like to
  know, if possible, which companies are using Clojure for production or
  to make internal tools.
 
  Thank you
 
  Plínio Balduino
 
  --
  --
  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/groups/opt_out.
 
 

 --
 --
 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/groups/opt_out.




-- 
-- 
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/groups/opt_out.




Re: Any suggestions for configuration solution in Clojure or Java world?

2013-06-17 Thread Robert Levy
Last year I released milieu which I developed at Draker, Inc. I have a few
improvements (more features, some of them inspired by caricajure) slated
for a release soon.
On Jun 17, 2013 12:17 PM, Dick Davies rasput...@hellooperator.net wrote:

 I glanced at this a while back - does carica support

 java -jar myuberjar.jar config.clj

 type invocation, or is it strictly compile the config in a la bundle
 into the class path?

 I generally ship the same uberjar around for prod/dev/etc. along with
 a per-environment
 config.clj file, and that seems to work great. Would like something to
 parse configs
 (so carica looks really good) but I don't like the idea of a
 preprod.jar , prod.jar etc.

 On 17 June 2013 18:08, josh rotenberg joshrotenb...@gmail.com wrote:
  I like carica for configuration: https://github.com/sonian/carica
 
  I switched a project over from the typesafe config package (with my
  own very thin Clojure wrapper around it) to carica and found it really
  nice to work with.
 
  Josh
 
  --
  --
  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/groups/opt_out.
 
 

 --
 --
 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/groups/opt_out.




-- 
-- 
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/groups/opt_out.




Re: In what OS do you code?

2013-06-16 Thread Robert Levy
There's the State of Clojure Survey:
http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/.
I think Chas usually asks for ideas on what the questions should be, so
that might be a good question to suggest next time around.

The Leiningen survey asks that question and finds 79% Linux vs only 62% Mac
https://lein-survey-2013.herokuapp.com/results  The Leiningen results
likely mirror Clojure OS preference more generally, since the vast majority
of Clojure users use Leiningen.



On Fri, Jun 14, 2013 at 11:15 AM, Raoul Duke rao...@gmail.com wrote:

  Thanks for all the responses, it looks like Linux is the predominant OS
 in
  the Clojure community.


 er, wow. that's a bit of a leap, isn't it?

 --
 --
 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/groups/opt_out.




-- 
-- 
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/groups/opt_out.




[ANN] ojo

2013-01-12 Thread Robert Levy
 of the before handlers is to provide a way of doing some
processing and making information available in the body of the handler.

Extensions are composed and applied in the order they are specified in in
the defwatch macro. At each hook time the relevant extensions are applied
in that order.

*implementing extensions*

Extensions are implemented using the response macro defined in ojo.respond.
The function produced by this macro must be associated as the value for the
key of a hook.

(def my-extension
  {:before-event (response
   ... do some things ...
   {:events (assoc *events* :random-val (rand 10))})
   :after-event  (response ...)})

Remember that the response functions are composable...

(def my-extension
  {:before-event (comp (response ... )
   (response ... ))})

For clarity's sake ojo.respond also provides the defresponse macro:

(defresponse last-event-state
  {:state (reduce
   (fn [new-state {file :file}]
 (update-in new-state [file]
#(assoc % :last-event (now
   *state*
   *events*)})
(def my-extension
  {:before-event last-event-state})

https://github.com/drakerlabs/ojo#a-picture-of-the-event-handling-pipelinea
picture of the event-handling pipeline:

serial mode
   +-at time of handling--+
   init before-event   responseafter-event
 +--+  +--+  +--+  +--+
 | settings |  | settings |  | settings |  | settings |
 | state|-| state|-| state|-| state|
 | events   |  | events   |  | events   |  | events   |
 +-+-  +--+  +--+  +--+

parallel mode

   + time of work-queuing +
   init before-eventafter-event
 +--+  +--++--+
 | settings |  | settings || settings |
 | state|-| state|--| state|
 | events   |  | events   |  queue | events   |
 +-+-  +--+   for  +--+
workers
\/  /\
  at time of handing
++
|   before- after-   |
|   response  response  response |
|  +--+  +--+  +--+  |
|  | settings |  | settings |  | settings |  |
|-| state|-| state|-| state|-|
|  | events   |  | events   |  | events   |  |
|  +--+  +--+  +--+  |
++

https://github.com/drakerlabs/ojo#example-projectExample Project

Executable usage documentation can be found in the cucumber features and step
definitionshttps://github.com/drakerlabs/ojo/tree/master/example/features/step_definitions
for
the example/ project included in this repo. Run lein cucumber to test these
example scenarios.
https://github.com/drakerlabs/ojo#licenseLicense

Author: Robert Levy / @rplevy-draker

Copyright © 2013 Draker

Distributed under the Eclipse Public License, the same as Clojure.

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

Re: ANN: contrib-repl

2012-12-04 Thread Robert Levy

 If a version of some dependency is already on the classpath (either has
 been there from the start, or was previously added via pomegranate),
 results are undefined if a different version of the same dependency is
 later added via pomegranate.  Sometimes you get lucky and nothing bad
 happens; other times, you can really hork the entire process.  It all
 depends on the specific differences between the versions in question, and
 how the code in question is being used.

 (Thus my suggestion to Robert above to not add tools.nrepl in
 contrib-repl.)


Thanks, that is really useful to know... I had only a vague understanding
of what pomegranate would do in that situation, which is why I hesitated to
answer Lauren's question. In the version I just pushed, I have removed
tools.nrepl from the list of contrib libraries that get loaded. I also
removed the unnecessary sleep statement when making API calls.

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

ANN: contrib-repl

2012-12-03 Thread Robert Levy
John Aspden posted an interesting question on Stack Overflow about adding
all of the latest versions of contrib libraries as dependencies in a REPL
session.  The question and my response can be found here:
http://stackoverflow.com/questions/13673094/how-do-i-depend-on-every-clojure-contrib-library/13676638

Since this solution might be generally useful, I have packaged it as a
library that can either be used as nREPL middleware or invoked manually in
an already-running REPL.  The code, usage instructions, and sample project
demonstrating the middleware usage can be found at
https://github.com/rplevy/contrib-repl

contrib-repl

nREPL middleware to look up the latest versions of all Clojure contrib
libraries and add them as dependencies. Can also be used manually in an
already-running REPL.
https://github.com/rplevy/contrib-repl#usageUsagehttps://github.com/rplevy/contrib-repl#option-a-use-as-nrepl-middlewareOption
A. Use as nREPL middleware

Edit project.clj:

  :dependencies [[rplevy/contrib-repl 0.1.0]]
  :repl-options {:nrepl-middleware [contrib-repl.middleware/add-contrib-deps]}

Then run lein repl to enter a repl with all contrib dependencies added.
https://github.com/rplevy/contrib-repl#option-b-invoke-from-an-already-running-replOption
B. Invoke from an already running REPL

In a REPL session:

(require '[cemerick.pomegranate :as pom])(pom/add-dependencies
:coordinates '[[rplevy/contrib-repl 0.1.0]]
  :repositories {clojars
http://clojars.org/repo})(require '[contrib-repl.manually :refer
[add-contrib-deps]])(add-contrib-deps) ; add all of the contrib
libraries
You can also add just a subset of the contrib libraries:
(add-contrib-deps [tools.nrepl core.match]) ; only add these libraries

https://github.com/rplevy/contrib-repl#licenseLicense

Copyright © 2012 Robert P. Levy

Distributed under the Eclipse Public License, the same as Clojure.

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

[ANN] drakerlabs/lein-deploy-app 0.2.0

2012-09-14 Thread Robert Levy
A very simple plugin that I wrote today that we're using in our approach to
continuous integration and deployment at Draker. Enjoy! Comments, feedback,
issues, or pull requests are welcome... --Rob lein-deploy-app

A Leiningen plugin to push application uberjars to an AWS s3 bucket,
organized by application and branch.

This plugin is similar to s3-wagon in that you configure your project to
deploy to s3, but whereas lein deploy is for deploying libs,
lein-deploy-app is for deploying app uberjars and does not store the
uberjars in a Maven repo (as lein-deploy-uberjar does).

A workflow involving lein-deploy-app might involve a ci server or an
engineer calling lein deploy-app. Then an operations automation framework
like Chef can easily pull down the appropriate application, version, and
branch in a staging or production environment.
https://github.com/drakerlabs/lein-deploy-app#usageUsage

   1.

   Put [lein-deploy-app 0.1.0] into the :plugins vector of your
   project.clj.
   2.

   Add a project.clj configuration mapping for deploy-app:

   :deploy-app {:s3-bucket s3p://mybucket/releases/
:creds :env}


:s3-bucket is the bucket/path where you want to deploy your uberjars.

:creds is the credentials type. Presently only :env is supported. If using
:env, specify your s3 credentials using the environment variables
LEIN_USERNAME and LEIN_PASSWORD.

To deploy your application's uberjar to s3 for the current git branch:

  $ lein deploy-app

To specify some other label instead of current git branch as branch:

  $ lein deploy-app --branch NAME

https://github.com/drakerlabs/lein-deploy-app#to-doTo
Dohttps://github.com/drakerlabs/lein-deploy-app#gpg-credentials-option:gpg
credentials option

If using :gpg, create a gpg encrypted ~/.lein/credentials.clj.gpg file out
of a credentials.clj file of the following form:

{s3p://mybucket/releases/ {:username usernamegoeshere
 :passphrase passphrasegoeshere}}

https://github.com/drakerlabs/lein-deploy-app#licenseLicense

Author: Robert Levy / @rplevy-draker

Copyright © 2012 Draker, Inc.

Distributed under the Eclipse Public License, the same as Clojure.

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

Re: Latest Bagwell paper for a new implementation of Clojure vectors ?

2012-07-19 Thread Robert Levy
Just curious, what is the status of this?  Are there plans to implement
this change in Clojure?

Also curious if there's an existing lib that can be used now (I didn't come
across one for Clojure but there is a Scala lib from the authors of the
paper)...

Rob

On Fri, Nov 18, 2011 at 2:35 PM, logan duskli...@gmail.com wrote:

 Are there currently any plans to eventually replace PersistentVector?
 Looking at the code, the upper limit for the number of elements that can be
 stored in PersistentVector is 32^6, which is quite a lot but still might
 become a real limitation in the near future.

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

Re: How I can convert this python line to clojure?

2012-06-25 Thread Robert Levy
I haven't tried VTK, but you might find my clojure-python lib useful.  It's
something I spent a little bit of time on a couple years ago, and have been
meaning to get back to it to improve it and turn it into a robust and
respectable library ;), but I haven't had a need for Jython interop in
anything I have been working on lately, so it's hard to prioritize it.
 That said, you may find this lib useful, or get some ideas from looking at
the source:  https://github.com/rplevy/clojure-python

On Sun, Jun 24, 2012 at 4:07 PM, Antonio Recio amdx6...@gmail.com wrote:

 The python line that I have rote before is not the one that I want to
 convert. The correct python line is this, and the result is 0. How I can
 convert it to clojure?
 print vtkDataSetAttributes.SCALARS
 ;= 0


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

Re: [ANN] milieu - the environmentally friendly configuration tool (version 0.5.0)

2012-06-25 Thread Robert Levy
Yes, I think we can all agree on that. My point about
editability/readability was specifically w/rt YAML vs JSON, but my argument
for YAML vs reader is all about the decoupling of config from language
specifics to make it so that not everyone who edits config needs to know
what a REPL is. ;)


On Mon, Jun 25, 2012 at 12:22 PM, Softaddicts
lprefonta...@softaddicts.cawrote:

 I think of Clojure configuration expressions as being human
 editable/readable, testable in a few seconds (cutpaste in the REPL) and
 concise,
 However, I do agree that anything is better than XML :)

 Bad choice of words maybe ?

 Luc
 It's a holiday here I have some time to tease you a bit :)


  Hi Jay,
   Thanks!  As far as JSON vs YAML, I think of these as generally
 human-edited
  configuration files, and I don't think it is controversial to claim that
  YAML is much better suited to human editing than JSON or XML.  As far as
  using the Clojure/Clojurescript reader instead of YAML, the way I see it
 is
  that it's just a choice between whether everything is in Clojure
 matters
  more, or whether making config files more readily manipulable by
  non-Clojure devs and non-devs is more the goal (say for example for an
  operations team working with a polyglot deployment).
   That said, if there is interest in also supporting config files using
  native reader syntax it would be an easy addition to make, and wouldn't
  affect any other functionality.  You would simply expose the internal
  representation, which is just nested hash-maps e.g. {:dev {:some-config
  {:something foo} :other bar} :test {...}} and have a function to load
  clj files in in that format directly.  When loading in files with the
  reader, it would probably be a good idea to bind the dynamic var that
  disables the #=() reader macro.
   Actually, a better idea might be to enable passing the config data as
  Clojure data as an optional alternative to specifying a YAML file.  The
  motivation would be to make it possible to load from any file format you
  choose in your own code and pass it in the data (so long as it can be
 made
  into a nested hash-map).
   However I do think it makes sense for YAML file to remain the default
 way
  of loading data in any scenario, for reasons stated above.
   On Sun, Jun 24, 2012 at 10:12 AM, Jay Fields j...@jayfields.com
 wrote:
Hi Robert,
  
   Everything looks good, thanks for sharing the library. A philosophical
   question, why YAML and not JSON or raw clj?
  
   Cheers, Jay
  
   On Jun 22, 2012, at 7:30 PM, Robert Levy wrote:
  
   It is my pleasure to announce the 0.5.0 release of milieu, a library
 for
   environment-based application configuration that I have developed and
   actively maintain at Draker http://www.drakerenergy.com/ in
 Burlington,
   Vermont.  Having made use of it in our day-to-day work for several
 months
   now, we have found this library to be very useful for managing
   configuration in our proprietary time-series data acquisition back-end
   systems (also all written in Clojure of course).  I think this library
 will
   add value to applications in any domain.
  
   The source can be found at https://github.com/drakerlabs/milieu and
 the
   leiningen / maven dependency information is at
 http://clojars.org/milieu.
   Issues/feedback and pull requests are of course welcome!
  
   milieu
  
   The environmentally friendly configuration tool.
   --
  
   *Build status:* [image: Build Status]
 http://travis-ci.org/drakerlabs/milieu
https://github.com/drakerlabs/milieu#featuresFeatures:
  
  -
  
  Set up environment-specific configuration for your Clojure
  application, using the popular YAML file format.
  -
  
  Access config values:
  
  Specifying config values:
  
  (config/value :my :config :value)
  
  This will access the value in
  
  dev|test|...:my:
config:
  value:
  
  Specifying config values as optional:
  
  (config/value| :my :config :value) ; same as config/value except
 doesn’t warn if it’s not found(config/value| [:my :config :value]
 alternate value) ; provide alternate value
  
  -
  
  Optionally auto-load config file.
  - using the default filename of configure.yml enables autoload
 - any other config file name can be specified by calling
 load-config
  -
  
  Bind the environment within a calling context using with-env.
  
  (config/with-env env
(when (config/value :some :setting) ... ))
  
  -
  
  Specify the default environment using the MILIEU_ENV system
 variable.
  -
  
  Override environment-specific settings using arguments to your
  command-line application.
  
  (config/commandline-overrides! args)
(config/with-env env
  ... )
  
  -
  
  In cases where the environment can be variable, code evaluation can
 by
  restricted in with-env or only-env, or more generally conditional

Re: [ANN] milieu - the environmentally friendly configuration tool (version 0.5.0)

2012-06-25 Thread Robert Levy
I actually hadn't thought of this use case, but I was asked if this was
possible. In version 0.6.0 which I just pushed (clj-yaml emits seqs when it
gets yaml vectors, which the change corrects for), you can access values in
config like this:

dev:
  fou:
- barre:
- mary: 8-)
  fred: :-|
- mary: *_*
  fred: -__-
- barre:
   ...

using the same idiomatic *-in convention already being used, e.g.:

(config/value :fou 0 :barre 1 :mary)

Here is how it is expressed using the command-line-override feature:

myprogram dev --fou.0.barre.1.mary :D



  choose in your own code and pass it in the data (so long as it can be
 made
  into a nested hash-map).



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

ANN: lambic v. 0.1.0

2012-06-14 Thread Robert Levy
This announcement is more of a call for suggestions (even pull requests if
you are moved to do so) as there's not much to it yet, just enough to to
demonstrate the concept for simpler transformations.  I'm thinking of how
best to go about supporting a wider range of sequence transformations.

https://github.com/rplevy/lambic
https://clojars.org/lambic

The basic idea is that languages like Prolog are very good at manipulating
sequences by example based on pattern matching, and that using core.match
this can become the norm for Clojure too (either using this library or some
other I don't yet know about.)

In Clojure, when you encounter data that matches pattern X and you want to
systematically turn into data of the form Y, depending on how complex the
structures are, you tend to start with some solution, change it around, and
ultimately end up with a very elegant solution that is clearly the best
way.

My present take on how to implement lambic is essentially to catalog these
best ways for a number of different classes of sequence transformations,
so that lambic knows what to do with them.  What do you think of this idea?
 Is there a way to use logical magic (magical logic?) to do something
better? ;)

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

Re: ANN: Swiss Arrows

2012-04-02 Thread Robert Levy
Thank you for finding these anomolies!


 user= (- 0 [1  ])
 [1 0]


This case is undefined behavior because only one  point is allowed.



 user= (- 0 {1  2 })
 IllegalArgumentException No value supplied for key: 2
  clojure.lang.PersistentHashMap.createWithCheck (PersistentHashMap.java:89)


Again, only one  point is allowed.  So undefined behavior is expected
behavior in that case.



 user= (- 0 { 1})
 CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
 in this context, compiling:(NO_SOURCE_PATH:16)


This is an interesting use case I hadn't considered.  I will play around a
bit with that and try to find out why it doesn't just work.

user= (- 0 '())
 ( 0)


user= (- 0 [])
 CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
 in this context, compiling:(NO_SOURCE_PATH:24)


These two are an interesting case that *should* be valid (I know why this
one wouldn't work because of how I wrote it, easily fixable).  I just
hadn't thought of that.

;; I guess this one is expected, although it would be nice if it worked.

user= (- 0 '(1 (1 )))
 (1 (1 ) 0)


This is invalid.  I guess it would be nice but walking the form would
complicate matters. :)

Thanks again for finding the two issues mentioned above!

Rob

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

Re: ANN: Swiss Arrows

2012-04-02 Thread Robert Levy
Just to follow up, I fixed the issues Roman found.  Thanks again for your
help.  I also took the advice from the issue Stephen Compall created, and
removed the special handling of quoted forms.

On Mon, Apr 2, 2012 at 5:25 AM, Roman Perepelitsa 
roman.perepeli...@gmail.com wrote:

 And a couple more:

 user= (- 0 [1  ])
 [1 0]

 user= (- 0 { 1})
 CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
 in this context, compiling:(NO_SOURCE_PATH:16)

 user= (- 0 {1  2 })
 IllegalArgumentException No value supplied for key: 2
  clojure.lang.PersistentHashMap.createWithCheck (PersistentHashMap.java:89)

 Roman Perepelitsa.

 2012/4/2 Roman Perepelitsa roman.perepeli...@gmail.com

 Looks very nice!

 Is the following behavior expected with Clojure 1.3?

 user= (- 0 '())
 ( 0)

 user= (- 0 [])
 CompilerException java.lang.RuntimeException: Unable to resolve symbol:
  in this context, compiling:(NO_SOURCE_PATH:24)

 ;; I guess this one is expected, although it would be nice if it worked.
 user= (- 0 '(1 (1 )))
 (1 (1 ) 0)

 Roman Perepelitsa.

 2012/4/2 Robert Levy r.p.l...@gmail.com

 Swiss arrows is a library I wrote today, providing a number of useful
 arrow macros.

- The Diamond Wand: a generalized arrow macro for threading into any
position.
- The Back Arrow: - with its arguments reversed, convenient in
some cases.
- The Furcula / Parallel Furcula: branch the result of an operation
in multiple directions, sequentially or in parallel.
- The Double Furcula / Parallel Furcula, Double-style: the above,
using - instead of -
- The Diamond Fishing Rod / Parallel Diamond Fishing Rod: the above,
using -

 Swiss Arrows is available to try out right now at
 https://github.com/rplevy/swiss-arrows

 Feedback, ideas, and pull requests are of course very welcome.

 Rob

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

ANN: Swiss Arrows

2012-04-01 Thread Robert Levy
Swiss arrows is a library I wrote today, providing a number of useful arrow
macros.

   - The Diamond Wand: a generalized arrow macro for threading into any
   position.
   - The Back Arrow: - with its arguments reversed, convenient in some
   cases.
   - The Furcula / Parallel Furcula: branch the result of an operation in
   multiple directions, sequentially or in parallel.
   - The Double Furcula / Parallel Furcula, Double-style: the above, using
   - instead of -
   - The Diamond Fishing Rod / Parallel Diamond Fishing Rod: the above,
   using -

Swiss Arrows is available to try out right now at
https://github.com/rplevy/swiss-arrows

Feedback, ideas, and pull requests are of course very welcome.

Rob

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

Re: ANN: Swiss Arrows

2012-04-01 Thread Robert Levy
Errata:  I mistakenly referred to The Trystero Furcula by its former
work-in-progress name (the double furcula).

Just to be clear, the arrows presently included in the swiss arrows
collection are:

- The Diamond Wand
- The Back Arrow
- , -:p The Furcula, Parallel Furcula
- , -:p The Trystero Furcula, Parallel Trystero Furcula
- , -:p The Diamond Fishing Rod, Parallel Diamond Fishing Rod

On Mon, Apr 2, 2012 at 1:33 AM, Robert Levy r.p.l...@gmail.com wrote:

 Swiss arrows is a library I wrote today, providing a number of useful
 arrow macros.

- The Diamond Wand: a generalized arrow macro for threading into any
position.
- The Back Arrow: - with its arguments reversed, convenient in some
cases.
- The Furcula / Parallel Furcula: branch the result of an operation in
multiple directions, sequentially or in parallel.
- The Double Furcula / Parallel Furcula, Double-style: the above,
using - instead of -
- The Diamond Fishing Rod / Parallel Diamond Fishing Rod: the above,
using -

 Swiss Arrows is available to try out right now at
 https://github.com/rplevy/swiss-arrows

 Feedback, ideas, and pull requests are of course very welcome.

 Rob


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

Re: ANN: ClojureScript revision 927 release

2012-01-23 Thread Robert Levy
On Mon, Jan 23, 2012 at 10:09 AM, Marko Kocić marko.ko...@gmail.com wrote:
 Nice.
 All we need now is clojurescriptone release and lein plugin.

Earlier today I updated lein-clojurescript and submitted a pull
request, so that should be available to use soon.

Rob


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


Which Clojure libraries with 1.2 dependencies should we upgrade to 1.3?

2011-12-24 Thread Robert Levy
I have come across a few libraries here and there that are still on
1.2(.1). I have upgraded some of them as needed. Are there any libraries
you use that you would like to see moved? I ask because I have upgraded a
good amount of code from 1.2 to 1.3 (mostly proprietary, but a few free
libraries too), and would like to see all the useful libraries be
1.3-compatible. I would be happy to do this (relatively mindless work for
the most part, but good for the community) and submit the pull request.

There are some libraries that as far as I can tell are better left behind
(because for example they have been superseded by newer libraries that fill
the same purpose).

In addition to 3rd-party libs there are also more fka-contrib libs that
should probably be upgraded (see
http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go) and it
might be good to discuss those too.  By the way, I signed a contributor
agreement recently, and there are a few libraries from contrib I would like
to upgrade.  A couple that come to mind are graph - algo.graph and prxml
- data.prxml.  How would I go about that?  Would I just create the repo
and then someone would fork it into the Clojure github group?

Rob

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

Re: Using Lein with Local Jars on Heroku

2011-12-06 Thread Robert Levy
I was wondering the same thing and I came across your un-answered question
here.  The short answer appears to be
http://devcenter.heroku.com/articles/local-maven-dependencies

I was looking into writing a Clojure web app that I would license to an
acquaintance who is starting a business, and I wanted to see if I could
give him a something that he could deploy to Heroku and manage on his own
without making the source available to him (at first). This is possible to
do by pushing a lein project to heroku that depends on a jar containing the
main application code. (As a side note, I could be wrong but I think lein
has nonconfigurable behavior to include source files in the jar.  So a
minor change to lein might be required for conveniently building jars with
no source.)  Since it would be proprietary at first (I would like to make
it free later) it would make sense for the jar to be local rather than
placing it in the Clojars maven repo.

I thought maybe there would be a command to add a jar to a local
maven repo, but from my brief research into this, it seems that
unmanaged dependencies (linked above) is the way to do this.  I haven't
tried this yet, but think the only difference for Clojure projects is
that it shouldn't be necessary to edit the pom, but just add the
dependency as you normally would in project.clj.

Rob

On Aug 6, 3:52 pm, Asim Jalis asimja...@gmail.com wrote:
 I am trying to push a Clojure app on Heroku. I have a local jar file
 that the app needs. How can I get lein to use the local jar?

 When I have local jar dependencies on my personal machine I just
 install the jar into the local maven repository on the machine. It's
 not obvious to me how to do this on Heroku. Does anyone have any
 experience with this or ideas on how to solve this?

 Thanks.

 Asim

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

Static contract checking for Clojure?

2011-11-20 Thread Robert Levy
I have been thinking about the discussion of queryable programs from
Rich's keynote at Clojure Conj.  This meaning of this idea is probably more
well-defined for other people than it is in my present understanding, but
my sense from the talk is that the analysis phase of compilation will
leverage core.logic to infer facts about the program and find possible
inconsistencies and problems, reporting them as warnings or errors.

Yesterday I had an interesting conversation with a functional programmer
who is more on the statically typed side of the fence, and I brought up
this idea.  He told me about some interesting research by Dana Xu on static
contracts.  Unlike standard (dynamic) contracts, which throw exceptions
when the code is exercised at run-time, static contracts seem to be more
along the lines of what Rich is talking about.

See: http://gallium.inria.fr/~naxu/research/dana-phd.pdf

What do you think about this idea? I have just started reading the above
pdf...  I don't see much of interest when googling for 'static contract
Racket' but that would be a closer jump to Clojure if someone figured out
how to do this in a Lisp. The Racket community seems the likeliest home for
such research.

Also, I'm curious to know what other concepts/techniques might be on the
table in the plan for Clojure to surpass statically typed languages at
their own game (to the extent that their game is all that relevant).

Rob

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

Re: Is Clojure Simple?

2011-10-26 Thread Robert Levy


 This reminds me of the discussions on the C++ Standards Committee
 about compatibility with C wherein Andrew Koenig coined the phrase As
 close as possible to C - but no closer... perhaps Rich feels Clojure
 is as close as possible to simple - but no closer? :)


In that case we've come full circle, because Koenig's phrase was a riff on
Einstein's Make things as simple as possible, but not simpler.

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

Re: Clojure Conj extracurricular activities spreadsheet

2011-10-25 Thread Robert Levy
me too! :)

On Tue, Oct 25, 2011 at 11:38 PM, Sean Corfield seancorfi...@gmail.comwrote:

 On Tue, Oct 25, 2011 at 8:26 PM, Luc Prefontaine
 lprefonta...@softaddicts.ca wrote:
  Please add me to Clojure and the web,

 Me too please. I already added myself to Clojure Tooling before the
 document got locked down :)
 --
 Sean A Corfield -- (904) 302-SEAN
 An Architect's View -- http://corfield.org/
 World Singles, LLC. -- http://worldsingles.com/
 Railo Technologies, Inc. -- http://www.getrailo.com/

 Perfection is the enemy of the good.
 -- Gustave Flaubert, French realist novelist (1821-1880)

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

Re: Stanford AI Class

2011-08-15 Thread Robert Levy
Hmm, I don't know if people will ever see Lisp as an AI Language though
(kidding).  My personal experience was that I learned Common Lisp in the
context of an AI course in college.  I was pretty excited about learning the
language, so I read The Little Lisper the summer before taking the course.
 At least in my experience, it was not a distraction at all, but a big plus,
and definitely life-changing.

On Sun, Aug 14, 2011 at 6:37 PM, Jeff Heon jfh...@gmail.com wrote:

 I think we all agree that Lisp would be ideal for AI, given a medium
 or long-term exposure, but for an introductory class to varied
 branches of AI, we could do worse than Python, an easy to read
 language with various numerical and AI libraries (PyEvolve, for
 example. http://pyevolve.sourceforge.net/0_6rc1/). And it's dead
 simple to start using it with IDLE or the REPL. After all, the class
 is not about teaching Python or Lisp, it's about teaching AI concepts.
 Even Java has been used this gentle introduction to genetic
 programming: http://www.gp-field-guide.org.uk/. In fact, it might be
 even better to start with a no-brainer language like Python.

 Also if I may digress a bit, we have a tendency to forget that what
 works for us best might not be what works best for other. Lisp simply
 is not for everybody, maybe not even for most people, and that's ok.

 On Aug 13, 1:36 pm, Lee Spector lspec...@hampshire.edu wrote:
  On the other hand I prefer to work in Lisp (Common Lisp, Scheme,
 Clojure), but my main project these days involves evolving Push programs
 rather than Lisp programs, for a bunch of reasons related to evolvability --
 seehttp://hampshire.edu/lspector/push.htmlif you really want to know. I
 prefer to work in Lisps because they make it simpler to write code that
 manipulates program-like structures (however they end up being executed)
 and because I like Lisps better than most other languages for a slew of
 other reasons. But my evolved code is executed on a Push interpreter
 implemented in the host language and there are Push-based GP systems in many
 languages (C++, Java, Javascript, Python, several Lisps). The language
 choice really just affects software engineering and workflow issues, not the
 fundamental power of the system to evolve/learn.

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

Re: Stanford AI Class

2011-08-09 Thread Robert Levy
 unfamiliar with my resume (nobody at Google knew what was on it
 even though they had a copy at the interview). The whole idea of
 such approaches shows (a) a lack of respect for the individual and
 (b) an arrogant attitude of you should feel LUCKY that we even
 CONSIDERED talking to you...Google even have me a t-shirt when they
 rejected me :-). It smells like a hazing ritual for a frat club.


Wow, I don't know anything about Google's hiring practices, but it sounds
like they'd rather shape and mold the cheapest most gaga-eyed
fresh-out-of-college youths instead of seeking out experienced people with
relevant backgrounds in the projects they'd be working on.  At least with
the ITA challenges (I never interviewed there but I have seen these) it can
be a way of demonstrating actual skills (albeit on a toy problem), more so
than ridiculous on-the-spot puzzles at an interview, but it does seem
insulting to require that of people who have more established credentials.

So I think that, on the whole, the universities have made a bad choice
 not from a language perspective but from a thinking perspective. I
 have taken the online SICP course from the authors and it had little to
 do with Lisp and a lot to do with thinking. I don't know how to teach





 Some people really do think in Python and find Lisp hard. Language
 wars are based on the misunderstanding that there is a right way to
 think. Programming is thinking. Find your native language.


I agree with the former, but I'm less of a relativist on the latter.  I
mean, some ways of thinking are just more elegant and less muddled than
others.  On one hand, it is true that having a diversity of different
approaches is more likely to yield novel and unexpected solutions to
problems.  But when we can clearly see the same pathologically clumsy
behavior repeated and replicated from generation to generation (the need for
design pattens being a perfect example), the languages that foster clearer
thinking should be favored.

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