Re: Library like "infix"...

2021-05-17 Thread Blake Watson
On Mon, May 17, 2021 at 10:18 AM Justin Smith  wrote:

> unless this is an exercise in learning clojure, why not use an existing
> calculator parser? eg.
> https://inst.eecs.berkeley.edu/~cs164/sp05/ta/calculator/Parser.java for
> a random example found with a quick google
>
>
That is the question, yes. There are at least a dozen in Clojure and dozens
more in Java, which I hadn't actually thought of using. But most of them
are at about the level of what you linked, which doesn't, e.g., include
functions. I think I'd prefer to avoid using a Java based one, because I
may well have to extend it and I'd rather not have Java code in my Clojure
projects. (I don't even want Java in my Java projects!)

However, Mr. Hull has been quite responsive. I think when he marked it as
"not maintained" he really just meant "I'm not actively developing new
features." So I think it's the most promising route for now.

===Blake===

-- 
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/CAJAnwPmdrck%2BdgUsc4j8myrb86Q0Ks%3Dg7Qup05kndfqVbd6%2B2Q%40mail.gmail.com.


Library like "infix"...

2021-05-15 Thread Blake Watson
Hello,

I've got a situation where I want to allow users some modest calculation
ability, and I've gone through various evolutions of possibilities, like
letting them put in raw Clojure code (that I will restrict at some point),
to (heh) using POI to let them use Excel to specify possibilities (which is
WAY overkill), to using infix.

https://github.com/rm-hull/infix

This is basically what I want, only expandable. I have some reservations,
however:

1. It's no longer maintained.
2. It uses the author's own homegrown parser.
3. The comparator operators don't seem to work.
4. There's no function for "I can't calculate this because I don't know the
value of X."

All of this is surmountable, of course. The question is, should I surmount
it? Or should I just start with Instaparse and a calculator grammar. Or is
there a third way?

===Blake===

-- 
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/CAJAnwPmhNNKYY1yHvND5Z8pKwMnNBXqtox7DZrP%2BVwc5LJndmg%40mail.gmail.com.


Re: How get function name in body?

2021-04-28 Thread Blake Watson
Well, it seems like it should be possible. At the end of the defn macro,
metadata is attached to a function, so you can see the name with:

```
(meta #'my.ns/add)
```

And you could do this inside the function:

```
(defn add [a b]
  (let [name (:name (meta #'add))]
(str a b name)))
```

But that can't be what you want. The thing is, the actual function body
doesn't know that it's being bound to the symbol "add" and making it aware
would seem to contravene a number of league bylaws.

That is to say, the macro "defn" attaches the meta-information to the
symbol #add, not to the code that follows.

You could certainly make your own macro to make the bound variable name
visible to the body of the code, but I'm not sure you can do that with the
built-in defn.

-- 
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/CAJAnwPmWK82nS1udL7MvVeDpa1rQHQ3c34G37WWasm%3D7DieroA%40mail.gmail.com.


Re: Routing for a non-web-app

2021-04-22 Thread Blake Watson
I tried Reitit a couple of months ago so maybe I'll look at it again.

|| > (bidi.bidi/match-route ["/foo" :bar] "/foo")
|| {:handler :bar}

Yeah, the simplicity of bidi is nice. I couldn't figure out if it would
also parse out query params. Like:

"/foo?a=123"
{:handler :bar :query-params {:a "123"}}

-- 
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/CAJAnwP%3DdzzGPxvEJpJgUDULzNQWLcmkW3O8btXg7e7VOq1HTgg%40mail.gmail.com.


Re: Routing for a non-web-app

2021-04-20 Thread Blake Watson
Cool. I thought about bidi but this:

...is intended for use with Ring middleware, HTTP servers...

 sorta made me think it wouldn't work in a non-web app.

-- 
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/CAJAnwPn1u9MRG2mWCVVCy%2BWXgDLAqA9JDXt5Shh2ReGHk0Eb6A%40mail.gmail.com.


Re: Routing for a non-web-app

2021-04-19 Thread Blake Watson
>
> For 'routing' specifically, if you want a more formal system we used state
> machines in the past and recently Clojure has a really nice additional
> possibility there - https://github.com/lucywang000/clj-statecharts.


I really like the idea of the app being as stateless as possible, to where
you could have a history stack which was basically an address like
"\user\update\123" so people could move back and forth between spots
that aren''t otherwise easy to jump around in.


> For general UI programming if you are using javafx then I really like
> cljfx - https://github.com/cljfx/cljfx.
>

I keep looking at cljfx thinking, "Well, this is probably the way to go"
but I could not get the examples to work, despite trying different
Java/JavaFX combos.

But it's a horse pill. Besides JavaFX, you've got component
lifecycles (which I've never grasped), renderers (which I haven't touched
in years, since I used reagent), and after about 3.5K of words and code you
get, "Now that every piece is laid out, it's time to combine them into
application." That kind of approach has not been successful for me, so I've
been interacting with JavaFX directly to get going. This, at least, means
that when I start thinking, "Well, it would make a whole lot of sense to be
able to describe this interface as a data structure," I can go back to
cljfx and go, "Ah, that's why he did that."

-- 
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/CAJAnwPkOM%3Da_hU0wfnEDn-ge8yTXKfamqntGA%2B9oKWt7Oc0Ljg%40mail.gmail.com.


Routing for a non-web-app

2021-04-18 Thread Blake Watson
Howdy,

Writing a desktop app and thinking describing routes is the way to go, as
far as setting up the flow through the program. There are quite a few
Clojure routing libraries but most seem to assume it's a web backend
(naturally), and the ones that don't seem to be ClojureScript (which I
can't use here).

I could just use a multi-method and roll my own, of course, but I thought
it might be useful to try out an existing library.

===Blake===

-- 
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/CAJAnwPnBTuHsbDA_OgGSAt1j_B_tL%2B%3DnCVsigwZrAzD_g9%3D%2BsA%40mail.gmail.com.


Re: logic programming - find synonyms of a given word

2021-04-10 Thread Blake Watson
||. But I don't think we can derive that big is a synonym of huge from such
an index.

Well, you can if you invert it:

0. Have an arbitrary "meaning" counter set to 0.
1. The first pair are new, so you increment your meaning counter and create
set #1 containing the first pair.
2. When subsequent pairs come up, you check your sets for existence of
either word.
3. If either exists, put them in the set, else do what you did in #1.
4. If both exist, merge the sets they're in.

[big large]
[large huge]
[small little]

You end up with: #{big large huge} and #{small little} Now, if you have:

[big large]
[large huge]
[humongous enormous]
[humongous huge]

You get #{big large huge} and #{humongous enormous}, and this becomes
#{big large huge humongous enormous}. (And now I can't stop thinking "Big
McLargeHuge!")

You have to check each set for the presence of a word, of course, and at
some point you might want to optimize for that, but it gets you all the
words that are synonyms. Including:

[with alongside]
[against versus]
[with against]

Where you have a set that contains #{with alongside against verus}.
Because, as often happens in English, a word has two meanings that are not
only different but antonyms.  ("The whisky is agreeable but the meat has
gone bad!")

I have actually used schemes like this in contexts where the synonyms are
exclusive, but it does assume that "big = large = huge", i.e. that there's
no distinction between a direct connection and an inferred one.

On Fri, Apr 9, 2021 at 11:12 PM Nesvarbu Nereikia 
wrote:

> Thanks Blake, the map of sets was my first intuition too. But I don't
> think we can derive that big is a synonym of huge from such an index. If
> you look at the example input.
>
> On Saturday, April 10, 2021, Blake Watson  wrote:
>
>> In practice I would probably just build a map, word : #setofsynonyms and
>> whenever a synonym was added [a b], I would add b to a's set and a to b's
>> set.
>>
>> Or, even more likely, a vector, because "a" is probably a homonym (if
>> we're talking English) and if "a" is "bank", I need one set of synonyms for
>> "places to put your money" and another set for "the side of a river" and
>> another set for "to hit [an object] off a wall or other barrier". Unless
>> you have some other annotation besides the word so that you can distinguish
>> "bank[1]" from "bank[2]" and "bank[3]".
>>
>> On Fri, Apr 9, 2021 at 7:32 AM SideStep  wrote:
>>
>>>
>>> Task is to write a program that can decide whether two words are
>>> synonyms or not.
>>>
>>> I have pairs of synonymous words, E.g.:
>>>
>>>  [big large]
>>>  [large huge]
>>>  [small little]
>>>
>>> We can derive the synonymous relationship indirectly: if big is a
>>> synonym for large and large is a synonym for huge then big is a synonym for
>>> huge.
>>> Being synonyms doesn’t depend on order, e.g. if big is a synonym for
>>> large then large is a synonym for big.
>>>
>>> The program has to answer whether given two words are synonyms or not.
>>>
>>> This seems to me as a good candidate for logic programming, e.g. with
>>> clojure.core.logic.
>>>
>>> a. How to state the input pairs of synonyms as logical
>>> statements/constraints?
>>> b. How to perform a query to find all synonyms of a given word?
>>>
>>> Or perhaps I am yack shaving? What would be a simpler way to solve this?
>>>
>>> This question is also on stackowerflow, if you want to get some points:
>>>
>>>
>>> https://stackoverflow.com/questions/67002758/logic-programming-find-synonyms-of-a-given-word
>>>
>>> --
>>> 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:

Re: logic programming - find synonyms of a given word

2021-04-09 Thread Blake Watson
In practice I would probably just build a map, word : #setofsynonyms and
whenever a synonym was added [a b], I would add b to a's set and a to b's
set.

Or, even more likely, a vector, because "a" is probably a homonym (if we're
talking English) and if "a" is "bank", I need one set of synonyms for
"places to put your money" and another set for "the side of a river" and
another set for "to hit [an object] off a wall or other barrier". Unless
you have some other annotation besides the word so that you can distinguish
"bank[1]" from "bank[2]" and "bank[3]".

On Fri, Apr 9, 2021 at 7:32 AM SideStep  wrote:

>
> Task is to write a program that can decide whether two words are synonyms
> or not.
>
> I have pairs of synonymous words, E.g.:
>
>  [big large]
>  [large huge]
>  [small little]
>
> We can derive the synonymous relationship indirectly: if big is a synonym
> for large and large is a synonym for huge then big is a synonym for huge.
> Being synonyms doesn’t depend on order, e.g. if big is a synonym for large
> then large is a synonym for big.
>
> The program has to answer whether given two words are synonyms or not.
>
> This seems to me as a good candidate for logic programming, e.g. with
> clojure.core.logic.
>
> a. How to state the input pairs of synonyms as logical
> statements/constraints?
> b. How to perform a query to find all synonyms of a given word?
>
> Or perhaps I am yack shaving? What would be a simpler way to solve this?
>
> This question is also on stackowerflow, if you want to get some points:
>
>
> https://stackoverflow.com/questions/67002758/logic-programming-find-synonyms-of-a-given-word
>
> --
> 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/0cd164b2-56eb-4e99-866d-b1f63522ac52n%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/CAJAnwP%3DBZJ%2BeEoEeNv1Yg2eRbsHyVcY7OJm2YmvRLsZ2h8oioA%40mail.gmail.com.


Re: Complete Web Development Setup Using Clojure CLI Tools

2020-04-29 Thread Blake Miller
Jag,

I think what you described is worth sharing. I like the simplicity of that 
approach and the efficiency of the final artifact.

-Blake

-- 
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/8a201cc5-8bf1-4a1f-9103-39af8d5452b2%40googlegroups.com.


Re: New idea & POC for a Kubernetes/Clojure interface

2018-05-22 Thread Blake Miller
Yes, kops has a tutorial that walks you through it:

https://github.com/kubernetes/kops/blob/master/docs/aws.md

You just need an AWS account to start.

HTH

On Tue, May 22, 2018 at 1:20 PM, Punit Naik  wrote:

> Is there any documentation around spinning up K8s cluster on Amazon EC2
> instances?
>
>
> On Tuesday, November 7, 2017 at 8:34:35 AM UTC+5:30, Blake Miller wrote:
>>
>> Here's a little something I cooked up this weekend, to interact with a
>> Kubernetes cluster from Clojure:
>>
>> https://github.com/blak3mill3r/keenest-rube
>>
>> It abstracts away the K8s API calls completely. Instead, you get the
>> state of the cluster as a value in an atom. Changes to the state of the
>> cluster are streamed to the Clojure client, which keeps the value in the
>> atom current, and attempts to mutate the atom will cause one cluster
>> resource (one at a time) to be modified/created/destroyed appropriately. So
>> far I'm finding it to be a real pleasure to use compared to `kubectl`
>> (giving it hand-edited json or yaml files) or worse: the Dashboard (poking
>> around at a web app with a mouse).
>>
>> I guess I could've just tried the Python library, but where's the fun in
>> that?
>>
>> I feel like this could turn into a pretty powerful tool for ops work, or
>> even adding abstractions to manage resources automatically. I've been
>> wanting to use Clojure (more) for infrastructure-automation/dev-ops ...
>> but this is one area where the tooling available is a bit lacking, IMO.
>>
>> I've been successfully toying around with this project and a real
>> Kubernetes cluster in an AWS VPC.
>>
>> I'd be glad to get hear any thoughts on this idea. If you're into k8s,
>> please give it a whirl.
>>
>> This is total toy-status right now, by the way, it's just a
>> proof-of-concept. Oh, and it mixes nicely with `cider-enlighten-mode`, if
>> you're into that sort of thing. I went ahead and published it to Clojars.
>>
> --
> 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/GqZ04diilkM/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.


[ANN] Pyro 0.1.0 - a library for more helpful stacktraces

2018-02-18 Thread Blake Miller
Very nice! Congrats on the release. I'm going to play with it today.

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


New idea & POC for a Kubernetes/Clojure interface

2017-11-06 Thread Blake Miller
Here's a little something I cooked up this weekend, to interact with a 
Kubernetes cluster from Clojure:

https://github.com/blak3mill3r/keenest-rube

It abstracts away the K8s API calls completely. Instead, you get the state 
of the cluster as a value in an atom. Changes to the state of the cluster 
are streamed to the Clojure client, which keeps the value in the atom 
current, and attempts to mutate the atom will cause one cluster resource 
(one at a time) to be modified/created/destroyed appropriately. So far I'm 
finding it to be a real pleasure to use compared to `kubectl` (giving it 
hand-edited json or yaml files) or worse: the Dashboard (poking around at a 
web app with a mouse).

I guess I could've just tried the Python library, but where's the fun in 
that?

I feel like this could turn into a pretty powerful tool for ops work, or 
even adding abstractions to manage resources automatically. I've been 
wanting to use Clojure (more) for infrastructure-automation/dev-ops ... but 
this is one area where the tooling available is a bit lacking, IMO.

I've been successfully toying around with this project and a real 
Kubernetes cluster in an AWS VPC.

I'd be glad to get hear any thoughts on this idea. If you're into k8s, 
please give it a whirl.

This is total toy-status right now, by the way, it's just a 
proof-of-concept. Oh, and it mixes nicely with `cider-enlighten-mode`, if 
you're into that sort of thing. I went ahead and published it to Clojars.

-- 
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 this behavior of clojure.core/pr a bug?

2016-08-05 Thread Blake Miller
I agree with Herwig in principal ... even though EDN is not meant to cover
the whole set of possible pure Clojure data, if it can be made to cover
more (all other things being equal) that would be a Good Thing.

I think it would be possible to fix these edge cases with reader macro
dispatches without breaking compatibility. The major snag though is
that performance would suffer ... every single keyword or symbol being
`pr`d would have to be tested, even those in the vast majority that don't
need to be emitted in any special way. So my conclusion is it's not worth
trying ...

It sucks that the docstring for pr
https://github.com/clojure/clojure/blob/clojure-1.7.0/src/clj/clojure/core.clj#L3552-L3555
fails to mention that the function may succeed and produce a string that
the reader will barf on, but I think we're pretty much stuck with it.

For posterity: I switched to using Transit for the Clojure(Script) app that
had me run across this issue.

On Thu, Aug 4, 2016 at 2:23 PM, Herwig Hochleitner 
wrote:

> 2016-08-04 13:56 GMT+02:00 Timothy Baldridge :
>
>> The problem is that many do not understand that Clojure data is a
>> superset of EDN. The two were never meant to be completely compatible.
>> There are many things, especially when dealing with keywords and symbols,
>> where its possible to have data that doesn't properly round-trip.
>>
>
> Then fressian and transit are supersets of edn as well. Are those, at
> least, meant to be the same set as clojure data?
> Also, reader tags are a fantastic opportunity to make arbitrary data
> round-trippable.
>
> An added problem when dealing with EDN is that there is only really one or
>> two languages that properly parse it: Clojure and Clojurescript. So it's
>> also a poor choice to use in cases where you desire any sort of interop.
>>
>
> There many edn libraries for various languages: https://github.com/
> edn-format/edn/wiki/Implementations
> It is true, that there is a lack of compatibility, especially in the
> handling of symbols and keywords and the community is hurting for it (I
> remember a couple of tedious discussions on the matter)
>
> see http://dev.clojure.org/jira/browse/CLJ-1527 https://
> github.com/edn-format/edn/issues/67 ...
>
> Add on top of all that that EDN parsing is really slow compared to other
>> approaches, and you have a lot of compelling reasons to, as Herwig put it,
>> "abandon edn, except for hand-written data".
>>
>
> My view is, that those reasons should be eliminated, starting with
> interoperability concerns. I still think edn is a fantastic idea and to me
> it still holds the promise of being a replacement for json and xml, but
> only if we can get our act together and develop it towards that goal.
>
> Please note, that my "except for hand-written data" was meant to be
> hyperbole. Every data is eventually machine-written.
>
> Abandoning edn would send a fatal signal not just to people in the
> community. Especially if we let it slowly die instead of declaring it a
> failed experiment in data exchange.
>
> Imagine if pr wouldn't handle embedded " quotes in strings and the
> inofficial recommendation would be to just avoid that use case or use a
> different encoding.
>
> And yes, the original problem that caused the creation of Transit was "how
>> do we get data from language A to language B while still staying fast, not
>> implementing a ton of code, and keeping rich data (dates should be dates,
>> not strings)."
>>
>
> I like the idea of having various encodings for different uses, but we
> should strife towards compatibility.
>
> --
> 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/Rc_b4_Da-KU/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 cl

Re: Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
Er, I mean "built-in reader macro dispatch".

On Thursday, August 4, 2016 at 1:14:16 AM UTC, Blake Miller wrote:
>
> You're right, Dan. Having mulled it over a little more, it's not clear to 
> me why there ought to be any pure Clojure data (no Java objects) that 
> cannot be serialized as EDN. Emitting a #keyword reader literal for this 
> edge case would make sense to me.
>

-- 
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 this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
You're right, Dan. Having mulled it over a little more, it's not clear to 
me why there ought to be any pure Clojure data (no Java objects) that 
cannot be serialized as EDN. Emitting a #keyword reader literal for this 
edge case would make sense to me.

-- 
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 this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
Thanks for that concise explanation, Sean. It makes sense to me that not 
all valid Clojure data is serializable.

There's still something about this that doesn't quite make sense to me, 
though:

clojure.core/pr, rather than throwing an exception when asked to serialize 
an instance of clojure.core.Keyword that cannot be serialized, it simply 
produces bad output. Bad = will cause the reader to throw.

Wouldn't it be preferable for pr to throw in this case?

The way I found out about this was the not-very-informative exception "Map 
literal must contain an even number of forms", because pr was fine with 
making a string that the reader wouldn't accept.

Can anyone think of a good reason why pr should *not* throw an exception on

(pr (keyword "foo bar"))

since there's no way of expressing that keyword as valid EDN?



On Thursday, August 4, 2016 at 12:16:47 AM UTC, Sean Corfield wrote:
>
> You can programmatically create keywords that are illegal as literals, 
> i.e., will not be accepted by the reader.
>
>  
>
> This is not a fault of clojure.core/pr – if it is given a value that uses 
> legal (readable) keywords, its result will indeed be readable by 
> clojure.core/read-string.
>
>  
>
> You can also programmatically create symbols that are illegal as far as 
> the reader is concerned.
>
>  
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
>
> On 8/3/16, 4:37 PM, "Blake Miller"  
> on behalf of blak3...@gmail.com > wrote:
>
>  
>
> I have tried this with Clojure 1.7.0, 1.8.0 and 1.9.0-alpha10
>
> (clojure.core/read-string (clojure.core/with-out-str (clojure.core/pr 
> (clojure.core/keyword "A valid keyword" ;; => :A
>
>
> This just seems wrong. It's valid to have an instance of 
> clojure.lang.Keyword with a space in its name.
>
> (clojure.core/with-out-str (clojure.core/pr (clojure.core/keyword "A valid 
> keyword"))) => ":A valid keyword"
>
>  
>
> So, it seems like clojure.core/pr and clojure.core/read-string disagree 
> about EDN.
>
>  
>
> Is EDN formally specified? https://github.com/edn-format/edn/issues/56 
> seems to suggest it is not.
>
> I ran into this problem using ptaoussanis/sente to pass EDN over a 
> websocket. The EDN contained a keyword with a space in it, and the 
> clojure(jvm) part of sente had no problem serializing it, but the 
> ClojureScript part of sente barfed on it. I thought it was a bug in sente, 
> however sente simply calls clojure.core/pr to do the serialization... so I 
> played with pr vs read-string and found that they disagree.
>
>  
>
> The serialization that clojure.core/pr does on a keyword with a space in 
> it seems broken to me:
>
>  
>
> user> (clojure.core/with-out-str (clojure.core/pr {:onekey 1
>
>(clojure.core/keyword 
> "two key") 2}))
>
> "{:onekey 1, :two key 2}"
>
> There doesn't seem to be any way to parse that unambiguously.
>
> I think this is a bug. What do you think?
>
>
> https://github.com/ptaoussanis/sente/issues/251
>
>  
>
>  
>
>

-- 
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 this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
Thanks, Timothy. I'll give transit a try.

-- 
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 this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
The docstring of clojure.core/pr

https://github.com/clojure/clojure/blob/clojure-1.7.0/src/clj/clojure/core.clj#L3552-L3555

actually says (in lieu of a formal EDN specification?)

"pr and prn print in a way that objects can be read by the reader"

...and the example I showed appears to violate that. Here's a minimal 
failing case:

user> (read-string (with-out-str (pr {(clojure.core/keyword "key word") 
1})) )
RuntimeException Map literal must contain an even number of forms 
 clojure.lang.Util.runtimeException (Util.java:221)

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


Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
I have tried this with Clojure 1.7.0, 1.8.0 and 1.9.0-alpha10

(clojure.core/read-string (clojure.core/with-out-str (clojure.core/pr 
(clojure.core/keyword "A valid keyword" ;; => :A

This just seems wrong. It's valid to have an instance of 
clojure.lang.Keyword with a space in its name.

(clojure.core/with-out-str (clojure.core/pr (clojure.core/keyword "A valid 
keyword"))) => ":A valid keyword"

So, it seems like clojure.core/pr and clojure.core/read-string disagree 
about EDN.

Is EDN formally specified? https://github.com/edn-format/edn/issues/56 
seems to suggest it is not.

I ran into this problem using ptaoussanis/sente to pass EDN over a 
websocket. The EDN contained a keyword with a space in it, and the 
clojure(jvm) part of sente had no problem serializing it, but the 
ClojureScript part of sente barfed on it. I thought it was a bug in sente, 
however sente simply calls clojure.core/pr to do the serialization... so I 
played with pr vs read-string and found that they disagree.

The serialization that clojure.core/pr does on a keyword with a space in it 
seems broken to me:

user> (clojure.core/with-out-str (clojure.core/pr {:onekey 1
   (clojure.core/keyword 
"two key") 2}))
"{:onekey 1, :two key 2}"

There doesn't seem to be any way to parse that unambiguously.

I think this is a bug. What do you think?

https://github.com/ptaoussanis/sente/issues/251

-- 
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: Secondar Sorting in spark using clojure/flambo

2016-07-11 Thread Blake Miller
Hi Punit

The behavior you are referring to is a feature of the Scala compiler, which 
is why it does not happen automatically when you try to use it from Clojure.

Please see the note here:

https://github.com/t6/from-scala/blob/4e1752aaa2ef835dd67a8404273bee067510a431/test/t6/from_scala/guide.clj#L161-L166

You may find that library a useful resource, either as a dependency or 
simply as reference material.

What you want to do is find the full method signature, including the 
implicits, and invoke _that_ from clojure, passing values for all implicit 
parameters (in this case, your custom ordering function.

HTH

On Saturday, July 9, 2016 at 6:13:17 AM UTC, Punit Naik wrote:
>
> Hi Ashish
>
> The "package" is indeed the full package name.
> On 09-Jul-2016 11:02 AM, "Ashish Negi"  > wrote:
>
>> Should not be `package` in `:import` be the actual package name of  `
>> RFMCPartitioner` ?
>>
>> see examples at https://clojuredocs.org/clojure.core/import
>>
>> like :
>>
>> (ns foo.bar
>>   (:import (java.util Date
>>   Calendar)
>>(java.util.logging Logger
>>   Level)))
>>
>>
>>
>> (ns xyz
>>   (:import
>> [**  RFMCPartitioner]
>> [** RFMCKey]
>> )
>>   )
>>
>>
>> where ** is package full name.
>>
>>
>>
>> On Friday, 8 July 2016 21:31:27 UTC+5:30, Punit Naik wrote:
>>>
>>>
>>>  
>>>
>>> I have a scala program in which I have implemented a secondary sort 
>>> which works perfectly. The way I have written that program is:
>>>
>>> object rfmc {
>>>   // Custom Key and partitioner
>>>
>>>   case class RFMCKey(cId: String, R: Double, F: Double, M: Double, C: 
>>> Double)
>>>   class RFMCPartitioner(partitions: Int) extends Partitioner {
>>> require(partitions >= 0, "Number of partitions ($partitions) cannot be 
>>> negative.")
>>> override def numPartitions: Int = partitions
>>> override def getPartition(key: Any): Int = {
>>>   val k = key.asInstanceOf[RFMCKey]
>>>   k.cId.hashCode() % numPartitions
>>> }
>>>   }
>>>   object RFMCKey {
>>> implicit def orderingBycId[A <: RFMCKey] : Ordering[A] = {
>>>   Ordering.by(k => (k.R, k.F * -1, k.M * -1, k.C * -1))
>>> }
>>>   }
>>>   // The body of the code
>>>   //
>>>   //
>>>   val x = rdd.map(RFMCKey(cust,r,f,m,c), r+","+f+","+m+","+c)
>>>   val y = x.repartitionAndSortWithinPartitions(new RFMCPartitioner(1))}
>>>
>>> I wanted to implement the same thing using clojure's DSL for spark 
>>> called flambo. Since I can't write partitioner using clojure, I re-used the 
>>> code defind above, compiled it and used it as a dependency in my Clojure 
>>> code.
>>>
>>> Now I am importing the partitioner and the key in my clojure code the 
>>> following way:
>>>
>>> (ns xyz
>>>   (:import
>>> [package RFMCPartitioner]
>>> [package RFMCKey]
>>> )
>>>   )
>>>
>>> But when I try to create RFMCKey by doing (RFMCKey. cust_id r f m c), 
>>> it throws the following error:
>>>
>>> java.lang.ClassCastException: org.formcept.wisdom.RFMCKey cannot be cast to 
>>> java.lang.Comparable
>>> at 
>>> org.spark-project.guava.collect.NaturalOrdering.compare(NaturalOrdering.java:28)
>>> at 
>>> scala.math.LowPriorityOrderingImplicits$$anon$7.compare(Ordering.scala:153)
>>> at 
>>> org.apache.spark.util.collection.ExternalSorter$$anon$8.compare(ExternalSorter.scala:170)
>>> at 
>>> org.apache.spark.util.collection.ExternalSorter$$anon$8.compare(ExternalSorter.scala:164)
>>> at 
>>> org.apache.spark.util.collection.TimSort.countRunAndMakeAscending(TimSort.java:252)
>>> at org.apache.spark.util.collection.TimSort.sort(TimSort.java:110)
>>> at org.apache.spark.util.collection.Sorter.sort(Sorter.scala:37)
>>> at 
>>> org.apache.spark.util.collection.SizeTrackingPairBuffer.destructiveSortedIterator(SizeTrackingPairBuffer.scala:83)
>>> at 
>>> org.apache.spark.util.collection.ExternalSorter.partitionedIterator(ExternalSorter.scala:687)
>>> at 
>>> org.apache.spark.util.collection.ExternalSorter.iterator(ExternalSorter.scala:705)
>>> at 
>>> org.apache.spark.shuffle.hash.HashShuffleReader.read(HashShuffleReader.scala:64)
>>> at org.apache.spark.rdd.ShuffledRDD.compute(ShuffledRDD.scala:92)
>>> at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:277)
>>> at org.apache.spark.CacheManager.getOrCompute(CacheManager.scala:70)
>>> at org.apache.spark.rdd.RDD.iterator(RDD.scala:242)
>>> at 
>>> org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:35)
>>> at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:277)
>>> at org.apache.spark.rdd.RDD.iterator(RDD.scala:244)
>>> at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:61)
>>> at org.apache.spark.scheduler.Task.run(Task.scala:64)
>>> at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:203)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>  

Re: Render Rails templates in Clojure?

2016-03-26 Thread Blake Miller
Pure ruby haml rendering ought to work in jruby, and you could call it from 
clojure... you would just need to inject values into the jruby scope, taking 
the place of a rails controller.

That seems a bit kludgey, but perhaps if you have tons of templates it might be 
worth it to avoid rewriting then from scratch.

I'd suggest trying to do some static transformation of the templates ... 
parsing the haml and emitting hiccup, turning references to ruby instance 
variables into clojure fn arguments. I think that'd be as easy as trying to 
marry jruby + clojure, and after that one time transformation you're left with 
something simpler.

If there's too much logic in the templates, it could get tricky...

-- 
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 as first language

2016-03-19 Thread blake watson
On Sat, Mar 12, 2016 at 2:42 PM, Lee Spector  wrote:

> Is "lein new app foo" that complicated?

If I understand Paul correctly—and am not just imposing my own similar
feelings on him—the problem is not that "lein new app foo" is complicated,
it's that it creates a directory structure that is complicated for the
beginner. Clojure is by far not the worst in this regard, but a new app
creates seven folders (root, doc, resources, src, test, src/root and
test/root) and nine files (.gitignore, .hgignore, CHANGELOG.md, LICENSE,
project.clj, README.md, intro.md, core.clj and core_test.clj). This is a
lot for someone just trying to grasp "Hello, world."

The less you have to say to the student ("you can ignore all that for now")
the better. The less you have to tell the user to toggle mysterious
switches (as with the JVM stack options) the better.

What would be good would be a "lein new beginner foo" that had a truly
minimal setup. It looks like this has been tried over the years, though I
don't see any currently working templates that fit the bill. If I can't
find one, perhaps I'll build that.

-- 
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 as first language

2016-03-01 Thread blake watson
sing
computers to grasp math, physics, biology, etc. It has the same sort of
fallout as other great tools, in that while you =can= adapt easily to new
languages, you also end up missing the amazing place you came from.

>> And how might this compare to Clojure?

Smalltalk, in some ways, is the anti-Clojure. If Clojure despises state,
Smalltalk is =all= state. The image is, in essence, a big ball of state. It
suffers, then, from Rich Hickey's complected-ness (and how!). But state +
debugger makes for a powerful teaching tool. Smalltalk has some functional
stuff (select, collect, reject, inject, detect—which map roughly to keep,
map, filter, reduce and (some #{...}) and it is genuinely used (not just
lip service) but the philosophy is definitely "objects are responsible for
their own state, and you must trust that", with the footnote that, well, if
you don't trust it, you can change it. The whole system is right there in
your image.

Tougher concepts to grasp, like laziness, transducers, asynchronous
programming are less "up front" in ST than in Clojure. (Actually, ST
doesn't even have built-in laziness or transducers.)

(Side note: I'd love to make a Clojure for the ST VM.)

>>Any links/references?

In addition to the footnotes, you've there's:

Dolphin Smalltalk on Github: https://github.com/dolphinsmalltalk/Dolphin
Lots of free Smalltalk books: http://stephane.ducasse.free.fr/FreeBooks/
Amber is to Smalltalk what ClojureScript is to Clojure:
http://amber-lang.net/
Javascript done Smalltalk style: https://www.lively-kernel.org/
Mini-Squeak in the Browser:
http://bertfreudenberg.github.io/SqueakJS/demo/simple.html

That last is Squeak 2.2 but if you've got a powerful enough machine running
a decent browser, you can run up to Squeak 4.5 in the browser.

Hope this helps!

===Blake===


[1]
http://devblog.avdi.org/2015/05/11/in-which-i-make-you-hate-ruby-in-7-minutes/
[2] http://www.squeakland.org/
[3] http://www.phratch.com/
[4] http://agilevisualization.com/
[5] http://pharo.org/
[6] http://squeak.org/


On Fri, Feb 26, 2016 at 1:09 AM, Terje Dahl  wrote:

> Blake.
>
> Would you elaborate on this last comment about Smalltalk?
> What did you do?
> What was the outcome relative to expectations?
> What were some good and bad aspects of Smalltalk?
> And how might this compare to Clojure?
> Any links/references?
>
> Terje
>
>
> On Thursday, February 25, 2016 at 9:29:10 PM UTC+1, blake watson wrote:
>
>
>> I've had good luck with Smalltalk.
>>
> --
> 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 as first language

2016-02-25 Thread blake watson
In a lot of ways, Clojure is a good first language: Except for project.clj
files (which you don't absolutely need right off the bat), it's not too
hard for a novice to look at a simple Clojure program and not see 40 things
he doesn't understand. (I don't know if it's still like this, but the
initial C# programs I wrote came with pages of boilerplate, though hidden.)

In other ways, it's less good: any language discouraging state is going to
face the "what just happened?" challenge.

Clojure, in particular, has a weakness in its multi-page stack dumps, and
its "Null Pointer Exception". The former is an awful thing to force a
beginner to confront. The latter can be just plain mysterious.

I've had good luck with Smalltalk.


On Tue, Feb 23, 2016 at 2:53 AM, Matching Socks 
wrote:

>
> The post-Python effect came up briefly in another Conj talk -- in 2015 --
> given by Elena Machkasova and two students, one of whom had had Clojure
> first and the other Python.  Their school offered it either way.
>
> https://www.youtube.com/watch?v=n0yN1GauxCA
>
> --
> 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: Examples of core.async usage in production?

2015-11-09 Thread blake watson
I just got through putting async into production. It allowed me to decouple
my Clojure code from underlying Java objects which allowed me to
intelligently manage the Java objects.

On Mon, Oct 26, 2015 at 12:40 PM, Moe Aboulkheir  wrote:

> I've used core.async in production a bunch with AWS.
>
> On Mon, Oct 26, 2015 at 7:24 PM, Robin Heggelund Hansen
>  wrote: There are
> > postgres.async for async db, and fink-nottle for sending sms/push
> > notifications/email etc. using core.async.
>
> In addition to those services (i.e. RDS, SNS, SQS), there are
> core.async-friendly libraries you can use with Redis/ElastiCache
> (redis-async), Lambda & Dynamo.  So you shouldn't have to rewrite too
> much bytecode if you're interested running on EC2.  I'm sure there are
> plenty of alternatives for other environments.
>
> Take care,
> Moe
>
> --
> 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: I am looking for xml parsing lib

2015-08-24 Thread blake watson
I believe that's it, though.

On Mon, Aug 24, 2015 at 10:48 AM, Josh Kamau  wrote:

> Hello;
>
> Which is the recommended xml parsing lib for clojure?
>
> clojure.data.xml was last updated 10months ago and is still on version
> 0.0.8
>
> Thanks
> 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/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: Reviewers needed for new Clojure book!

2015-08-24 Thread blake watson
I'm in.

On Mon, Aug 24, 2015 at 11:02 AM, Rick Moynihan 
wrote:

> I'd be happy to read it and potentially offer feedback. What is expected
> of reviewers?
>
> R.
>
> On Mon, 24 Aug 2015 07:46 Akhil Wali  wrote:
>
>> If anyone is interested in being a reviewer for a new book "*Mastering
>> Clojure*" by Packt Publishing, please let me know.
>> Reviewers will be entitled to a 6 montn subscription of PacktLib
>> .
>>
>> Here's the list of topics covered in this title.
>>
>>-
>>- Working with Sequences and Types
>>- Orchestrating Concurrency and Parallelism
>>- Parallelization using Reducers
>>- Writing Macros
>>- Composing Transducers
>>- Using Functors and Monads
>>- Programming with Logic
>>- Asynchronous Programming
>>- Reactive Programming
>>- Working with Tests
>>- Troubleshooting and Best Practices
>>
>>
>> --
>> 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.
>>
> --
> R.
>
> --
> 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: clj-soap (was: Beginner question

2015-08-06 Thread blake watson
We did some soap as well, and found the same thing, except in our case,
SOAP was merely a formality. In other words, it seems some people are using
only the barest of SOAP features, and wrapping up the meat up in a SOAP
envelope.

In other words, we were able to just generate a skeleton in Soap-UI and
then parse out the contents with clojure.xml/parse.

On Thu, Jul 30, 2015 at 3:36 PM, Sean Corfield  wrote:

> On Jul 29, 2015, at 7:47 PM, Mike  wrote:
>
> I have done some searching, and there is an old clj-soap library which
> Sean Corfield has mostly abandoned.
>
>
> Just to clarify: I too had started down the path of trying to find a way
> to do SOAP via Clojure and came across the old and *already abandoned*
> clj-soap library so I forked it and got it "working" with Clojure 1.3.0
> (since it was built for 1.2.0) and whilst I could get a few basic SOAP
> services working with it, nothing complex actually worked at all.
>
> At that point I tried a different approach using wsdl2java, compiling the
> generated Java, and then calling that directly and using the Axis libraries
> via Java interop from Clojure. That worked for the complex SOAP service I
> needed and took a lot less time than figuring our how to make clj-soap work
> generically.
>
> As it says on the repo:
>
> I forked it purely to get it running on Clojure 1.3 and then found it
> didn't do what I needed anyway.
>
> If you think it might be useful to you, please fork it and maintain it
> yourself. If you decide to take over as lead maintainer, let me know and
> I'll update this readme to point to your new fork.
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "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 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.


Recommendations for a schema-based data language for use in Hadoop?

2015-08-05 Thread Blake Miller
I suggest using prismatic`s schema library, and generating kryo serializers for 
your schematized records at compile time. These serializations can be very 
compact by leveraging the schemas, and kryo is very fast. I've been having 
success with this approach on Apache Spark. If you aren't married to using 
hadoop, and you want performance, l suggest you investigate spark as well.

I'm planning to extract this automatic schema-based kryo serializer macro junk 
and release a lib ... when I get around to it. I'd be glad to share the code if 
you want.

-- 
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] Clojure 1.7.0 is now available

2015-06-30 Thread blake watson
Yep. Got the same error, found the same fix. Was impressed at how easy it
was to fix. (Seriously, compared to most upgrades I've had to do in my
life...)

On Tue, Jun 30, 2015 at 10:13 AM, Robert Beaupre 
wrote:

> Thanks.  Looks like it was in Compojure - linked to at the bottom of the
> page you sent over:  https://github.com/bhauman/lein-figwheel/issues/161
>
> On Tuesday, 30 June 2015 10:01:01 UTC-7, Gary Trakhman wrote:
>>
>> You'll have to bump instaparse versions:
>> https://github.com/clojure-emacs/refactor-nrepl/issues/53
>>
>> On Tue, Jun 30, 2015 at 12:57 PM Robert Beaupre 
>> wrote:
>>
>>> Is anyone else getting the following error with 1.7.0 when running lein
>>> repl?  All I did was change from 1.6.0 to 1.7.0.
>>>
>>> #error {
>>>
>>>  :cause Wrong number of args (2) passed to: StringReader
>>>  :via
>>>  [{:type clojure.lang.Compiler$CompilerException
>>>:message clojure.lang.ArityException: Wrong number of args (2) passed
>>> to: StringReader, compiling:(abnf.clj:189:28)
>>>:at [clojure.lang.Compiler$InvokeExpr eval Compiler.java 3628]}
>>>   {:type clojure.lang.ArityException
>>>:message Wrong number of args (2) passed to: StringReader
>>>:at [clojure.lang.AFn throwArity AFn.java 429]}]
>>>
>>> Thanks,
>>> Robert
>>>
>>> On Tuesday, 30 June 2015 07:35:34 UTC-7, Alex Miller wrote:

 We are pleased to announce the release of Clojure 1.7.

 - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.7.0/
 - Leiningen: [org.clojure/clojure "1.7.0"]

 The two headline features for 1.7 are transducers and reader
 conditionals. Also see the complete list (
 https://github.com/clojure/clojure/blob/master/changes.md) of all
 changes since Clojure 1.6 for more details.

 ## Transducers

 Transducers (http://clojure.org/transducers) are composable
 algorithmic transformations. They are independent from the context of their
 input and output sources and specify only the essence of the transformation
 in terms of an individual element. Because transducers are decoupled from
 input or output sources, they can be used in many different processes -
 collections, streams, channels, observables, etc. Transducers compose
 directly, without awareness of input or creation of intermediate 
 aggregates.

 Many existing sequence functions now have a new arity (one fewer
 argument than before). This arity will return a transducer that represents
 the same logic but is independent of lazy sequence processing. Functions
 included are: map, mapcat, filter, remove, take, take-while, drop,
 drop-while, take-nth, replace, partition-by, partition-all, keep,
 keep-indexed, map-indexed, distinct, and interpose. Additionally some new
 transducer functions have been added: cat, dedupe, and random-sample.

 Transducers can be used in several new or existing contexts:

 * into - to collect the results of applying a transducer
 * sequence - to incrementally compute the result of a transducer
 * transduce - to immediately compute the result of a transducer
 * eduction - to delay computation and recompute each time
 * core.async - to apply a transducer while values traverse a channel

 ## Portable Clojure and Reader Conditionals

 It is now common to see a library or application targeting multiple
 Clojure platforms with a single codebase. Clojure 1.7 introduces a new
 extension (.cljc) for files that can be loaded by Clojure and ClojureScript
 (and other Clojure platforms).

 There will often be some parts of the code that vary between platforms.
 The primary mechanism for dealing with platform-specific code is to isolate
 that code into a minimal set of namespaces and then provide
 platform-specific versions (.clj/.class or .cljs) of those namespaces.

 To support cases where is not feasible to isolate the varying parts of
 the code, or where the code is mostly portable with only small
 platform-specific parts, 1.7 provides Reader Conditionals (
 http://clojure.org/reader#The%20Reader--Reader%20Conditionals).

 Reader conditionals are a new reader form that is only allowed in
 portable cljc files. A reader conditional expression is similar to a cond
 in that it specifies alternating platform identifiers and expressions. Each
 platform is checked in turn until a match is found and the expression is
 read. All expressions not selected are read but skipped. A final :default
 fallthrough can be provided. If no expressions are matched, the reader
 conditional will read nothing. The reader conditional splicing form takes a
 sequential expression and splices the result into the surrounding code.

 ## Contributors

 Thanks to all of those who contributed patches to Clojure 1.7:

 Timothy Baldridge
 Bozhidar Batsov
 Brandon Bloom
 Mi

Re: ANN: remote - DSL for clj-http/cljs-http

2015-06-29 Thread blake watson
Wait, how can there have been popular demand before it went public? =P

Looks good, though, hoping to try it out soon...

On Fri, Jun 26, 2015 at 10:09 AM, Joel Holdbrooks 
wrote:

> Are you tired of writing the same clj-http/cljs-https boilerplate? Looking
> for an easy way to express an endpoint or a service API? Then "remote" is
> the library for you!
>
> Github: https://github.com/outpace/remote
> Leiningen: [com.outpace/remote "0.3.1"]
>
> This library has been closed source up until now and by popular demand has
> been made available to the public. On behalf of the Outpace staff and
> myself we hope you or your team find this library useful.
>
> 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.
>

-- 
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] Demo of the Holy Grail workflow

2015-05-21 Thread blake
Anyway, good demo, and I like how you got Werner Herzog to narrate.

On Thu, May 21, 2015 at 8:03 AM, Daniel Szmulewicz <
daniel.szmulew...@gmail.com> wrote:

> Haha. That does sound long-ish, doesn't it? Even for an unfamiliar
> civilization. Here you go: the eternal peril of cinéma vérité.
>
>
> On Thursday, May 21, 2015 at 5:53:55 PM UTC+3, blake wrote:
>>
>> Interesting.
>>
>> I'm somewhat concerned that the "genius.com" annotation says the kingdom
>> of Assyria was around for 25,000 years, though.
>>
>> On Wed, May 20, 2015 at 6:03 PM, Daniel Szmulewicz > > wrote:
>>
>>> Hi everybody,
>>>
>>> A video showcasing the Holy Grail workflow has been posted on youtube.
>>>
>>> https://www.youtube.com/watch?v=eoxsSrFK_Is
>>>
>>> The workflow is built on top of Boot <http://boot-clj.com/>, a build
>>> tool, and system
>>> <https://github.com/danielsz/system/tree/master/examples/boot>, a
>>> component library. It tries to turn the experience of developing for the
>>> web into a liberating and seamless experience.
>>>
>>> Here are some of the properties of said workflow:
>>>
>>>- Manual and automatic mode, ie. either you manipulate the system in
>>>the REPL, or yo configure it to react to editing changes.
>>>- Restartable system. What warrants a system restart is
>>>user-configurable. File-based granularity.
>>>- Changes that do not require a restart are available in the running
>>>system instantly (via namespace reloading).
>>>- Full *Lisp-style* interactive programming via the REPL and
>>>hot-reloading in the browser.
>>>
>>> The video shows us a real-life, unmoderated development session. Some
>>> critics hailed it as an uncompromising, gut-wrenching piece of cinéma
>>> vérité. Viewer Discretion Is Advised. Thank you.
>>>
>>>  --
>>> 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: [ANN] Demo of the Holy Grail workflow

2015-05-21 Thread blake
Interesting.

I'm somewhat concerned that the "genius.com" annotation says the kingdom of
Assyria was around for 25,000 years, though.

On Wed, May 20, 2015 at 6:03 PM, Daniel Szmulewicz <
daniel.szmulew...@gmail.com> wrote:

> Hi everybody,
>
> A video showcasing the Holy Grail workflow has been posted on youtube.
>
> https://www.youtube.com/watch?v=eoxsSrFK_Is
>
> The workflow is built on top of Boot , a build
> tool, and system
> , a
> component library. It tries to turn the experience of developing for the
> web into a liberating and seamless experience.
>
> Here are some of the properties of said workflow:
>
>- Manual and automatic mode, ie. either you manipulate the system in
>the REPL, or yo configure it to react to editing changes.
>- Restartable system. What warrants a system restart is
>user-configurable. File-based granularity.
>- Changes that do not require a restart are available in the running
>system instantly (via namespace reloading).
>- Full *Lisp-style* interactive programming via the REPL and
>hot-reloading in the browser.
>
> The video shows us a real-life, unmoderated development session. Some
> critics hailed it as an uncompromising, gut-wrenching piece of cinéma
> vérité. Viewer Discretion Is Advised. Thank you.
>
>  --
> 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 blake
>>Do the advantages you've pointed out apply to teamwork, though? That's
supposed to be where frameworks make life easier.

Frameworks make life easier for teamwork, sure—as long as everyone knows
the framework and has the same (presumably correct =P) understanding of it.
In practice here, everyone's understanding of rails was slightly different,
and we had to establish a whole lot of in-house convention, and the churn
on that was really painful.

Like, we switched to using mountable engines. Cool idea, but it was ugly,
and we ended up with pieces that were mountable and pieces that were not,
and it was fragile and hard to deploy. We've had that problem across many
iterations of Rails. (And, some teams having adopted Angular, it looks like
there's going to be some issue there since the next version of Angular is
supposed to be backward incompatible.)

I just don't see that happening with the Clojure apps. I've let a complete
neophyte add stuff to my main web app, and he's gotten useful work done.
(He made some goofs because he didn't get the "stateless" thing, but that's
about it.) I had a graphic designer come in and fix the Hiccup to make it
more professional looking. She didn't have a hitch.

Separation of concerns, simplicity, clarity...I guess they do have some
value.


On Mon, May 4, 2015 at 3:47 PM, gvim  wrote:

> On 04/05/2015 23:17, blake wrote:
>
>> I went from Ruby to Clojure in short-order and while I struggled
>> mightily with the functional aspect (after assiduously avoiding those
>> concepts for years), I much prefer every aspect of Clojure web
>> programming to Rails.
>>
>> The bible of rails programming is the Hartl book. In the edition I read,
>> before you got to any actual programming, you were introduced to
>> 14—fourteen! I counted!—different domains, including things like RSpec
>> and Cucumber. And it was all treated with this, "Well, you can figure
>> out what this all does because, hey, it looks just like English"
>> attitude, with a patina of "you don't need to know what's going on under
>> the covers".
>>
>> The advantage of having an opinionated framework is that it saves one
>> the effort of having to make up one's own mind. This means you're
>> trusting someone with literally no understanding of your problem domain
>> to make up your mind for you. It's sort of amazing that this works at
>> all, and that there aren't =more= vulnerabilities turning up like the
>> Rails XML hack.
>> ​
>> This made me really uncomfortable with Rails.
>>
>> My current Clojure web app is more sophisticated than anything I did
>> with Rails, though my Rails apps doubtless carried far more untapped
>> potential. But I know just about exactly what it does. I know because I
>> added each piece of middleware as I needed it, and this allowed me to
>> understand what going on. I needed access to Mongo and MS-SQL, so I
>> added those. I needed a front-end so I started with Hiccup, which is
>> "obvious" (and remarkably similar to Smalltalk's Seaside, which I've
>> used), and then added in some Javascript.
>>
>> I'll turn the Javascript into Clojurescript, but I felt that was too
>> much to absorb at once. And unlike Rails, I didn't need to absorb every
>> hot library du jour to get going. (And damned if in Rails, each tutorial
>> has a different idea of which libraries are essential.)
>>
>> Then I added authentication, and threading (which was ridiculously
>> easy), and so on. Each piece as needed, with an understanding of what
>> was going on. Now, I don't get ALL of it. But I know where my weaknesses
>> are. I have, now, an opinionated framework, but it's made of =my=
>> opinions. And I made those opinions by looking at what the libraries I'm
>> using did, which is way simpler in a shallow functional world than in an
>> object-drill-down world.
>>
>> In Rails, you don't know what you don't know.
>>
>>
> Do the advantages you've pointed out apply to teamwork, though? That's
> supposed to be where frameworks make life easier.
>
> gvim
>
>
>
>
>
>
> --
> 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?

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread blake
I went from Ruby to Clojure in short-order and while I struggled mightily
with the functional aspect (after assiduously avoiding those concepts for
years), I much prefer every aspect of Clojure web programming to Rails.

The bible of rails programming is the Hartl book. In the edition I read,
before you got to any actual programming, you were introduced to
14—fourteen! I counted!—different domains, including things like RSpec and
Cucumber. And it was all treated with this, "Well, you can figure out what
this all does because, hey, it looks just like English" attitude, with a
patina of "you don't need to know what's going on under the covers".

The advantage of having an opinionated framework is that it saves one the
effort of having to make up one's own mind. This means you're trusting
someone with literally no understanding of your problem domain to make up
your mind for you. It's sort of amazing that this works at all, and that
there aren't =more= vulnerabilities turning up like the Rails XML hack.
​
This made me really uncomfortable with Rails.

My current Clojure web app is more sophisticated than anything I did with
Rails, though my Rails apps doubtless carried far more untapped potential.
But I know just about exactly what it does. I know because I added each
piece of middleware as I needed it, and this allowed me to understand what
going on. I needed access to Mongo and MS-SQL, so I added those. I needed a
front-end so I started with Hiccup, which is "obvious" (and remarkably
similar to Smalltalk's Seaside, which I've used), and then added in some
Javascript.

I'll turn the Javascript into Clojurescript, but I felt that was too much
to absorb at once. And unlike Rails, I didn't need to absorb every hot
library du jour to get going. (And damned if in Rails, each tutorial has a
different idea of which libraries are essential.)

Then I added authentication, and threading (which was ridiculously easy),
and so on. Each piece as needed, with an understanding of what was going
on. Now, I don't get ALL of it. But I know where my weaknesses are. I have,
now, an opinionated framework, but it's made of =my= opinions. And I made
those opinions by looking at what the libraries I'm using did, which is way
simpler in a shallow functional world than in an object-drill-down world.

In Rails, you don't know what you don't know.

-- 
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] edn.el

2015-04-15 Thread Blake Miller
Lars, Bozhidar,

Thank you so much for the explanation, and for the excellent libs, I
appreciate it! I am using clj-refactor ... and it's rad. I will have to
read about the socketed REPL.

On Wed, Apr 15, 2015 at 10:37 AM, Lars Andersen  wrote:

> In addition to what Bozhidar mentioned:
>
> I also work on https://github.com/clojure-emacs/clj-refactor.el which
> communicates with a backend,
> https://github.com/clojure-emacs/refactor-nrepl, which is written in
> clojure.  For now we've been limiting ourselves to data structures which
> are eaily readable in emacs lisp (strings, lists, association lists etc)
> but for more complex values I'd like to use edn and edn.el.
>
> I've also realized that when I need a 'client' for something, hacking
> together something in emacs is incredibly easy.  I often feel like I get
> more than the proverbial 80% when I invest 20% of my efforts on top of
> emacs :)  Take a look at this incredibly cool demo of a REST client written
> in emacs: http://emacsrocks.com/e15.html
>
>
> On Monday, April 13, 2015 at 11:25:20 PM UTC+2, Blake Miller wrote:
>>
>> Cool! May I ask what your motivation was for this?
>>
>> On Saturday, April 11, 2015 at 3:09:28 AM UTC-7, Lars Andersen wrote:
>>>
>>>  https://github.com/expez/edn.el
>>>
>>> is a library for reading an writing edn from emacs lisp.
>>>
>>>  --
> 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/Zob2v1pRQAA/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.


Re: [ANN] edn.el

2015-04-13 Thread Blake Miller
Cool! May I ask what your motivation was for this?

On Saturday, April 11, 2015 at 3:09:28 AM UTC-7, Lars Andersen wrote:
>
>  https://github.com/expez/edn.el 
>
> is a library for reading an writing edn from emacs lisp.
>
>

-- 
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: csv output

2015-03-23 Thread blake
I just did this but for a more complex data structure so it doesn't quite
map to your example. I did it this way:


1. Stringify-keys
2. Merge the data, then pull the keys to get the unique fields
3. Join all the keys got in part 2 with "," to create a header record
4. Now, for each record, pull the value for each of the keys you discovered
5. Surround with quotes, if you might have commas in the data, or use tab
separators to avoid that mess
6. Join each field in the record with a comma.
7. Join all the records with a newline.

I also filtered out restricted records and my map was not flat, so I
flattened it. I'm also pulled the data out of a database based on a
filtered search, so the whole thing took about 16 lines. Without all that
nonsense, it'd probably be 7-8 lines.

-- 
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: Current best-of-breed JDBC libraries?

2015-02-24 Thread blake
I ran through all of the above and found it easier just to build my queries
straight and call with clojure.java.jdbc. But my needs were light.

On Tue, Feb 24, 2015 at 10:40 AM, Colin Yates  wrote:

> I haven't used it but I remember building up pages of SQL in Clojure
> wasn't fun. The idea of putting that SQL into a .sql file, accessible
> by non-Clojure DB developer is very appealing.
>
> On 24 February 2015 at 18:24, Niels van Klaveren
>  wrote:
> > Perhaps I'm missing something, but I don't really see the advantages of
> yesql over standard parametrized clojure.java.jdbc queries ?
> >
> > --
> > 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 for Desktop UI Design Application

2015-01-13 Thread blake
Yeah, Adobe Flex can do that, too, with all the same caveats.

On Tue, Jan 13, 2015 at 12:09 PM, Timothy Baldridge 
wrote:

> Before coming to Clojure I did 2 years of work on WPF/Silverlight apps,
> and let me say what those platforms offer blows the web stuff out of the
> water. Yes it's not cross-platform, but the ability to describe a layout
> with data is unparalleled in the web world. I could sit down, and have a UI
> to a CRUD app in half a day. No CSS, no DOM elements to force into a layout
> I wanted, etc. Ask anyone who's worked with WPF and they'll tell you "yep
> it's based on mutability, but writing a UI is really easy".
>
> JavaFX comes close to this, but I'd like to use pure data to interact with
> it. I did some work on that in the past, and came up with something that
> was pretty usable, but I think a React approach could take it even further.
> Anyways, the results of my work allowed you to create JavaFX interfaces
> like this:
>
>
> {:type   :border-pane :center {:type :group   
>:children [{:type:circle   
>:radius  (planet-sizes size)   
>:centerY (/ (planet-sizes size) 2) 
>  :centerX 0}]} :bottom {:type   :stack-pane   
>:maxHeight  110  :prefHeight 
> 110  :children   [{:type :pie-chart   
>  :data (map   
>  (fn [{percent :planet.biome/percentage   
>type:planet.biome/type}]   
>(slide/build-item {:type  :pie-chart-data  
>:name  
> (str type)
>  :value percent}))
> (:planet/biomes planet))}]}}
>
> Notice how you don't have to muck with all the junk found in the browser, you 
> just describe an panel, say what you want to put where (center, bottom, etc). 
> and the layout engine takes care of the rest. And this entire thing is GPU 
> accelerated so drawing of the GUI is pretty fast. The web side of things has 
> a place, but it's also mired in decades of legacy, that's stuff you don't 
> find in modern UI toolkits like JavaFX, QT and WPF.
>
>
> Timothy
>
>
> On Tue, Jan 13, 2015 at 12:46 PM, Gary Trakhman 
> wrote:
>
>> On Tue Jan 13 2015 at 2:05:03 PM Christopher Small 
>> wrote:
>>>
>>> On the other hand, while the web app route may feel a bit overwhelming,
>>> it really is worth learning. Once you program web, you can deliver to any
>>> platform. It's ubiquitous. And once you get the hang of it, the paradigm
>>> isn't really all that challenging. But up to you obviously.
>>>
>>>
>> This rationale is the basis for my last 1.5 years of extra-work effort.
>> Good luck :-).
>>
>> Coming from clojure, React really made investing in the web seem sane and
>> worthwhile by offering composable abstraction.  I still think it's a good
>> idea to learn web tech, but it was kind of a frustrating slog.
>>
>> Another really helpful piece of 'tech' that fits with clojure
>> philosophies is http://suitcss.github.io/
>> https://github.com/suitcss/suit/blob/master/doc/design-principles.md
>>
>> I think that plus React are great starting points.
>>
>> --
>> 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.
>>
>
>
>
> --
> “One of the main causes of the fall of the Roman Empire was that–lacking
> zero–they had no way to indicate successful termination of their C
> programs.”
> (Robert Firth)
>
> --
> 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 sub

Re: Author a Book on Clojure - Packt Publishing

2014-12-23 Thread blake
I've worked with a number of publishers over the years and it's not unusual
for the process to be mired in typical corporate tech thought. Publishing
is not a tech business: You can usually expect things tied to Microsoft
products.

On Mon, Dec 22, 2014 at 2:39 AM, Jan-Paul Bultmann <
janpaulbultm...@googlemail.com> wrote:

> Just my 50 cent.
>
> I was asked to do a technical review on a Clojure podcasts by packtpub
> once.
>
> The "storyboard" they send me consisted of a word file containing a huge
> table with text and source code.
>
> Why would anybody send a technical reviewer source code in a word
> document, yet alone in a table column that has a width of 50 characters
> which causes it to line-wrap everywhere?!
>
> It feels to me that this publisher is just a book mill that goes for
> quantity and not quality.
> I couldn't make it thought a single book I bought from them because
> reading them felt like a waste of time.
>
> Of course things might have changed by now and your mileage may vary.
> I'm just thinking that if somebody takes the time of writing a book on
> Clojure,
> it should at least be worthwhile.
>
> All the best, Jan
>
> On 20 Dec 2014, at 09:07, Tushar Gupta  wrote:
>
> I am Tushar Gupta, an Acquisition Editor at Packt Publishing.
> We specialise in publishing books, eBooks, video tutorials and articles for
> IT developers, administrators and users.
>
> We are currently planning to develop a book on *Clojure Data structures
> and Algorithms*.
>
> We are looking for an expert to author this book and share their knowledge
> and skills with our readers.
>
> For more information you can mail me on tush...@packtpub.com.
>
> Looking forward to have some legit responses. :)
> --
> Regards,
>
>
> * Tushar Gupta *
>
>
> * Acquisition Editor Packt Publishing www.packtpub.com
>  * *Skype*: packt.tusharg
>
>
>
>
>
>
>
>
> --
> 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.


Mutable local variables

2014-11-08 Thread Blake McBride
Greetings,

I have a sense that there is value in immutable variables and data but that 
value is unneeded in my application and more than a nuisance.  How can I 
create a "let" that creates mutable locals that I can easily get the value 
from and set a new value?  Presumably, I can hide the mess in a few macros.

Thanks.

Blake McBride

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


Clojure <-> Java

2014-11-07 Thread Blake McBride
Greetings,

I am an old lisp guy that is new to Clojure.  At one time I wanted to use 
ABCL as a scripting language for a large, web-based Java app.  (ABCL is 
Common Lisp written in for the JVM.)  The integration and operation of it 
was easy and nice.  I did, however, run into an insurmountable problem.  

I created some clue code that, through reflection of a class, discovered 
Java methods and created a CLOS mirror.  Worked well.  The problem I ran 
into is that Java allows more than one method to have the same name 
provided it has a different argument signature.  Lisp can't do that without 
a real lot of work (make generic functions evaluate the arguments and then 
execute the applicable method).  It appeared as a big job to me to have 
Lisp automatically generate all that code for each Java method.  I 
eventually kind of gave up.

It recently occurred to me that the author of Closure probably took that 
problem into account when creating Closure.  So, Closure would be able to 
call Java methods as if they were Closure functions taking into account the 
argument signature.  Does Closure do that?

Also, I presume that a Closure program has immediate access to all Java 
classes and methods without any work.  Is that true?

Thanks.

Blake McBride

-- 
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: better way to group consecutive numbers in a vector?

2014-11-06 Thread blake
I wanted to put the delimiters in one step and then split in a different
one, so I did this:

(defn delimit[v]
  (reduce #(if (= (last %) (dec %2))
(conj % %2)
(conj % :split %2))
[(first v)] (rest v)))

(delimit [1 3 4 5 7 9 10 11 12])
=> [1 :split 3 4 5 :split 7 :split 9 10 11 12]

But that was before I realized there was no equivalent to
clojure.string/split that works on lists.
​

-- 
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: Deterministic Randomness in Functional Clojure

2014-11-05 Thread blake
On Tue, Nov 4, 2014 at 7:22 PM, Fluid Dynamics  wrote:

> On Tuesday, November 4, 2014 9:54:39 PM UTC-5, Atamert Ölçgen wrote:
>>
>> clojure-lanterna is pretty cool.
>>
>> https://github.com/sjl/clojure-lanterna
>>
>> I'm interested in hearing about alternatives as well.
>>
>
> Terminal emulation? In this day and age?
>

To quote Steve Losh's blog "Being able to output to either a console or a
GUI means that I can develop through Swank really easily with the Swing
terminal, but [actually] play the finished product in a terminal
like God intended."

Modern roguelikes (like "Diablo", heh) can use the mouse, but traditionally
they are played fullscreen, in darkness, with hands never leaving the home
row.



>
> And a quick look around reveals no sign of mouse support. Even old MS-DOS
> applications often had some kind of mouse support (QBASIC for one). With so
> many people increasingly using tablets that lack keyboards, I'd think any
> game should try to be playable with little or no keyboard input required.
>
> --
> 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: Deterministic Randomness in Functional Clojure

2014-11-05 Thread blake
OK, I was using Lanterna as well, based on Steve Losh's "Caves of Clojure"
series.

On Tue, Nov 4, 2014 at 6:53 PM, Atamert Ölçgen  wrote:

> clojure-lanterna is pretty cool.
>
> https://github.com/sjl/clojure-lanterna
>
> I'm interested in hearing about alternatives as well.
>
>
> On Wed, Nov 5, 2014 at 4:09 AM, blake  wrote:
>
>> Pardon my interruption: What are you using for screen output for your
>> roguelike?
>>
>> On Tue, Oct 28, 2014 at 12:08 PM, Isaac Karth 
>> wrote:
>>
>>> I've been working on some projects (roguelikes, story-generators) that
>>> often have a reason to have a random outcome for things like procedurally
>>> generating a map. Ideally, they would be deterministically psuduorandom, so
>>> that I can generate the same results from the same seed. The part I'm
>>> having trouble with is figuring out what method to use to implement this in
>>> a functional way.
>>>
>>> The naive approach that first occurred to me was to pass a PRNG and seed
>>> value into each function. That would certainly keep the functions
>>> referentially transparent. But it would also require either rewriting a
>>> bunch of functions that don't directly use the randomness themselves or
>>> adding the RNG as part of the map that's already being passed.
>>>
>>> Plus, the seed should probably vary (deterministically) between calls to
>>> the subfunctions. It's not too useful if all the rooms on a map have the
>>> same type because they all pulled their die roll from the same-nth result
>>> of the exact same seed. Maybe the seed could be created from the contents
>>> of the vector or a UUID of a map object or something?
>>>
>>> The other suggestion I've run across is to rebind something like
>>> clojure.data.generators/*rnd* for each high-level procedural generation
>>> call. I think this requires the generation to be single threaded and
>>> otherwise deterministic. At the moment I don't feel like I know enough
>>> about how things work under the hood to say if this a good idea or not.
>>>
>>> I've poked around at the bigml.sampling and clojure.data.generators
>>> libraries, which look useful for dealing with some of this, but I haven't
>>> come across anything that directly addresses what kind of architecture to
>>> use for deterministic randomness. This may be my inexperience. I feel like
>>> I may be a bit too close to the problem, and I can't quite see what the
>>> idiomatic answer is. Re-read SICP? Implement some kind of monad? Just bite
>>> the bullet and pass the RNG+seed? Find the secret pure functional library
>>> everyone is using for repeatable stochastic simulations?
>>>
>>> Does anyone have any advice on this? Or prior experience with approaches
>>> that work? What are some best practices for approaching deterministic
>>> simulations in an idiomatic, functional way?
>>>
>>> --
>>> 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...

Re: Deterministic Randomness in Functional Clojure

2014-11-04 Thread blake
Pardon my interruption: What are you using for screen output for your
roguelike?

On Tue, Oct 28, 2014 at 12:08 PM, Isaac Karth  wrote:

> I've been working on some projects (roguelikes, story-generators) that
> often have a reason to have a random outcome for things like procedurally
> generating a map. Ideally, they would be deterministically psuduorandom, so
> that I can generate the same results from the same seed. The part I'm
> having trouble with is figuring out what method to use to implement this in
> a functional way.
>
> The naive approach that first occurred to me was to pass a PRNG and seed
> value into each function. That would certainly keep the functions
> referentially transparent. But it would also require either rewriting a
> bunch of functions that don't directly use the randomness themselves or
> adding the RNG as part of the map that's already being passed.
>
> Plus, the seed should probably vary (deterministically) between calls to
> the subfunctions. It's not too useful if all the rooms on a map have the
> same type because they all pulled their die roll from the same-nth result
> of the exact same seed. Maybe the seed could be created from the contents
> of the vector or a UUID of a map object or something?
>
> The other suggestion I've run across is to rebind something like
> clojure.data.generators/*rnd* for each high-level procedural generation
> call. I think this requires the generation to be single threaded and
> otherwise deterministic. At the moment I don't feel like I know enough
> about how things work under the hood to say if this a good idea or not.
>
> I've poked around at the bigml.sampling and clojure.data.generators
> libraries, which look useful for dealing with some of this, but I haven't
> come across anything that directly addresses what kind of architecture to
> use for deterministic randomness. This may be my inexperience. I feel like
> I may be a bit too close to the problem, and I can't quite see what the
> idiomatic answer is. Re-read SICP? Implement some kind of monad? Just bite
> the bullet and pass the RNG+seed? Find the secret pure functional library
> everyone is using for repeatable stochastic simulations?
>
> Does anyone have any advice on this? Or prior experience with approaches
> that work? What are some best practices for approaching deterministic
> simulations in an idiomatic, functional way?
>
> --
> 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: Demoralising experience trying to install on Win 7

2014-10-27 Thread blake
I think it's a recent thing, FWIW:​ I've installed Clojure with lein.bat on
several Windows (and Linux) machines with no difficulty. It's been truly
wonderful, especially after wrestling with Ruby (and other Open Source)
installations for years.

I'm sure there's room for improvement; I'm just adding my "Wow, this was
great!" voice for perspective.

-- 
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] Arcadia, the integration of Clojure and Unity3D

2014-10-21 Thread blake
Very cool!

On Fri, Oct 17, 2014 at 1:41 PM, David Nolen  wrote:

> Rockin!
>
> On Fri, Oct 17, 2014 at 3:09 PM, Tims Gardner 
> wrote:
> > Ramsey Nasser and I are excited to announce the alpha release of Arcadia,
> > the integration of Clojure 1.7 into the Unity3D game engine and
> development
> > platform.
> >
> > Based on Clojure's CLR branch, Arcadia compiles to optimized bytecode,
> with
> > performance suitable for general game development. It includes a
> networked
> > REPL that can be targeted by arbitrary editors, and provides
> functionality
> > for fast, bidirectional conversion between Unity objects and persistent
> > Clojure data. It has confirmed export for Windows, Linux, and OSX, and
> > aspires to export for iOS, Android, PlayStation, Xbox, and the web.
> >
> > Arcadia lives at https://github.com/arcadia-unity/Arcadia. For now, the
> best
> > way to get started is by cloning the repo. A brief screencast on getting
> set
> > up is here.
> >
> > Arcadia's blog is here. The mailing list is here.
> >
> > Unity3D can be obtained (for free!) at http://unity3d.com/.
> >
> > Our StrangeLoop presentation on Arcadia (then known as Clojure-Unity) is
> > here.
> >
> > Acknowledgements ---
> >
> > We're very grateful to the many people who helped with this project. We
> owe
> > special thanks to our studiomates Kovas Boguta and David Nolen, and
> honorary
> > studiomates Brandon Bloom and David Lansdowne, for their invaluable
> advice
> > and support. We're especially fortunate to have attracted the attention
> of
> > Joseph Parker, who has been building amazing things with Arcadia since it
> > was a sloppy hack hidden on Github. We owe the name to the generous and
> > urbane Zach Tellman, without whom this project would probably be called
> > Clunity.
> >
> > Super special thanks to David Miller and the Clojure-CLR community. David
> > has maintained a fully-loaded port of Clojure to the CLR runtime for five
> > years. His amazing work and ongoing support made Arcadia possible. We're
> > humbled by the astounding quality of a Clojure implementation with
> > relatively few users, and would be honored if integration with Unity
> brings
> > it more attention.
> >
> > - Tims Gardner
> >
> > --
> > 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] Amazonica: Clojure client for the entire AWS api

2014-10-17 Thread Blake Miller
I know this is an old thread ... but FWIW I think this is awesome. Great 
work, Michael! I am going to play around with it.

On Thursday, March 28, 2013 10:31:00 PM UTC-7, Michael Cohen wrote:
>
> I ran a quick and dirty benchmark comparing Amazonica with James' rotary 
> library, which uses no explicit reflection. This was run from an EC2 
> instance in East, hitting a Dynamo table in the East region. tl;dr 
>  Amazonica averaged 9ms for gets, rotary averaged 6ms, both averaged 13ms 
> for puts. Summary is at https://github.com/mcohen01/amazonica#performance. 
> Benchmark code is at 
> https://github.com/mcohen01/amazonica-benchmark/blob/master/test/benchmark/runner.clj
> . 
>
> It's pretty simplistic, but I just wanted to see if reflection just 
> completely turned the library into a dog. Seems the contrary, that any 
> reflection performance penalty is basically not even worth mentioning. 
> Maybe some folks who have better understanding of jvm internals can explain 
> if the test is invalid because of some sort of caching of the method 
> lookups or something. 
>
>
> On Wednesday, March 27, 2013 7:29:00 AM UTC-7, Herwig Hochleitner wrote:
>>
>> 2013/3/26 Hugo Duncan 
>>
>>>
>>> Or can the cost be confined to compile time...
>>>
>>
>> That would be nice to have!
>> Generating type-hinted clojure code from the reflection result and 
>> emitting that with macros would be an option.
>>
>> I think the dynamic use of reflection would be enough to put me off
>>> using this in something like pallet, for example.
>>>
>>
>> I agree with Michael on this: Any reflection overhead should pale next to 
>> the context switch and network communication, that AWS commands do.
>> OTOH, I also agree that driving a generated java api via reflection, to 
>> generate xml seems a bit heavy handed.
>> Still, first priority should be to get the interface right.
>>
>> Regarding that: I think the first context argument should be mandatory.
>> We are just saw clojure.java.jdbc painstakenly deprecate a lot of API, to 
>> get rid of the dynamic *db* var.
>> The reasons against passing context in a dynamic var go double against a 
>> global atom: A function parameter can be set at from any data model in 
>> every callsite. Everything that's less flexible constrains your users for 
>> little gain (in the case of passing context).
>>
>> Also, my experience with ClojureQL showed me, that with multiple sources 
>> of a context arg, it's hard to get the ordering right.
>> E.g. the new implementation seems to prefer dynamically bound credentials 
>> over credentials passed as argument.
>>
>>

-- 
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 is the best setup to program Clojurescript IF...

2014-10-02 Thread blake
I've had the best luck with Cursive.

On Thu, Oct 2, 2014 at 12:22 PM, Sean Grove  wrote:

> Presumably LightTable is a good way to get started?
>
> On Thu, Oct 2, 2014 at 12:13 PM, Peter Mancini  wrote:
>
>> What is the best setup to program Clojurescript IF:
>>
>>- you hate EMACS
>>- use linux or windows
>>
>> Any suggestions?
>>
>> --
>> 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 terminology

2014-09-11 Thread blake
I'm having some trouble fleshing out the surrounding context, but I'll take
a stab at this:

>>I don't think "word" is the correct term to use. Do I mean "symbol"?

"Token", perhaps?

>>Do I mean "symbol" instead of "var"?

Yes. It may not be a "var", after all.

>> Is "list" better called a "form" or an "s-expression"?

This one I'm having trouble with. "(whatever)" designates a function
invocation. "'(whatever)" designates a list and is a shorthand for "(list
whatever)". That's an important distinction, as "'(a-fun some-fun
more-fun)" describes a list of functions while "(a-fun some-fun more-fun)"
calls "a-fun" with "some-fun" and "more-fun" as parameters. It seems to me
the fact that they look similar is practically coincidental.

>> What exactly is a "scalar"? Is it anything that's not a container?
​
In Pascal, a "scalar" referred specifically to enumerable integer types. In
Clojure, I think it refers to all vars. But I haven't run into it.

===Blake===

-- 
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] leaven and bakery - lightweight components for clojure and clojurescript

2014-09-03 Thread blake
Yeah, I worked back to the original to find the web-app. I note that the
repo seems to default to develop, which results in a lot of errors when I
try to "lein repl" in "example-web-app". (Missing clojars which are, in
fact, missing.)

When I switch branch to the master, I don't get those errors, but the
process hangs on "Compiling 'target/cljs-test/testable.js", then times out.
I tried doing a "lein cljsbuild once" prior, then found that "lein repl"
would work.

Thanks!


On Wed, Sep 3, 2014 at 2:29 PM, Hugo Duncan  wrote:

>
> dsblakewat...@gmail.com writes:
>
> > I'm not sure your [3] URL works.
>
> Try https://github.com/palletops/bakery/tree/develop/example-web-app
>

-- 
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] leaven and bakery - lightweight components for clojure and clojurescript

2014-09-03 Thread blake
I'm not sure your [3] URL works.

-- 
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: clojurescript introduction

2014-07-31 Thread blake
>>is there something similar to http://clojurescriptone.com/ that actually
works? unfortunately one is failing on 3rd command from tutorial which is
'lein bootstrap'.<<

What's kind of funny about that is that on the first page of the Wiki, it
says;

lein bootstrap'bootstrap' is not a task. See 'lein help'.

So I don't know if there's some sort of auto-generation going on but it
seems it requires Lein 1.7.

I ran into a similar thing with the "Web Development With Clojure" book.
(Not the lein requirement but the early examples not working.)

===Blake===


On Thu, Jul 31, 2014 at 3:27 AM, Paweł Rozynek  wrote:

> hi
>
> is there something similar to http://clojurescriptone.com/ that actually
> works? unfortunately one is failing on 3rd command from tutorial which is
> 'lein bootstrap'.
> id appreciate some good learning materials suggestions for clojurescript.
>
> regards
> PR
>
> --
> 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: An Averaging function

2014-07-10 Thread blake
I have yet to find a Clojure book I consider suitable for a novice to FP
programming. The problem (it seems to me) is that the people who can write
books on Clojure have long ago made the paradigm shift, and don't
necessarily recall how that shift happened. This is similar to what I've
found in Smalltalk (And the similarities between Smalltalk and Lisp are
almost as profound as their differences.)

The books tend to be as dense as Clojure code itself. Which means, though,
that you can get a lot out of them the more grounding in actual code you
have. Like, I've gotten a lot out of Clojure Programming, but reading it
cover-to-cover (as I originally tried) is not the way to learn the
language.

The I Love Ponies workshop, while incomplete, is an excellent mix of theory
and practice. http://iloveponies.github.io/

What has worked for me is to try to write some code, succeed or not, dig
into some text for a while, go back to writing code, ask things on
#clojure, peek at the Clojure source (though better than that is to find
"naive" examples of how things are done in Clojure, since the reality is a
lot uglier), do some exercises on 4clojure, go back to writing code, bug
#clojure more, try to get further in some of the texts (or try to find
clarifications of things in the texts), go back to write some code, etc.

"Write some code" = I wouldn't worry much about screen I/O for starters,
just print to the REPL. Try to do code of increasing difficulty but to do
it as pure as possible. E.g., stay away from "def", except for defining
functions. Ultimately, ugly real world stuff is ugly and real, and isn't
necessarily helpful starting out.

Like, for myself, I wrote a program to solve "Mastermind" puzzles, create
and solve a maze, and stuff like that at first. This stuff is great because
it can all be done pure. Then I moved into rewriting some production Ruby
code, and noting where I had (lazily) used state, and what I got out of
taking it out when I rewrote in Clojure. I've inherited a big (10K-20K
line) Clojure project that I've been studying and trying to extend without
making a mess out of it, so there's a real-world goal for motivation.

Humility is good: Experienced Clojurers will be able to rewrite your 20
lines of ugly code into 3 lines of elegance that you probably won't even
understand at first.

Tackle it in pieces, just like you would a software project: Get the
functional part down, then branch out into things like macros, async, etc.
Don't try to take it all on at once.

My 2 cents in month 5 of my journey.




On Thu, Jul 10, 2014 at 1:37 AM, Stephen Feyrer 
wrote:

> Hi Sam, Lee.
>
> Thank you both.
>
> It would appear that I am faced with the old adage, "A little knowledge is
> a dangerous thing".
>
> Again thank you, you ' ve been a great help.  If I may impose upon you a
> little further?  Would either of you be able to recommend an introductory
> book either for Clojure or FP that might fit well with Clojure, for the
> mildly bewildered?  I have a book Programming Clojure but it is written
> with an assumption of prior knowledge/experience which I don't have.  By
> the way, Programming Clojure is a good book, I just don't think I fit
> within the target audience.
>
>
> On 10 July 2014 02:41, Lee Spector  wrote:
>
>>
>> On Jul 9, 2014, at 9:31 PM, Lee Spector  wrote:
>> > You could patch (not recommended!) this by adding "do" to the beginning
>> of that list:
>>
>> Or -- I now see, instead of adding the "do" you could just remove the
>> outermost parentheses after the parameter list. But as Sam and I said this
>> is a bad way to go anyway -- you want to avoid the nested defs.
>>
>>  -Lee
>>
>> --
>> 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 fro

Re: Local variable

2014-07-08 Thread blake
>
> Also, just a matter of style, but it's customary to leave closing parens
>> at the end of a line, rather than by themselves on their own line.
>>
>
> ​I do that also, but when I am editing I put them on there own line,
> because in this way changes are faster. When I am satisfied, I merge them.
> ;-)
>
>
I also tend to not stack them like that till I'm done futzing. Pretty sure
it's a sign of noobiness. =P

When I see others code, they're perfectly capable of using the editor to
slide the expressions around so that it doesn't matter if the parens are at
the end of the line. (Learning to do that is next on my to-do list.)

-- 
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: OT: Github Alternatives

2014-06-30 Thread blake
FWIW, TurnKey has a gitlab appliance that has worked pretty well for me.


On Mon, Jun 30, 2014 at 1:26 PM, Jonathan Abbey 
wrote:

> We've been using GitLab in our laboratory for some time now, and I
> recommend it very highly indeed.  Getting it set up was a bit of a pain
> because they did not have RedHat packages when we first installed it, and
> we were setting it up on a server that did not have Internet access.
> installation depends on having access to a RubyGems mirror, but once we got
> that worked out it's been smooth sailing.  GitLab's architecture is very
> very nicely put together.  They've got a directory that contains all of the
> Git repos, a 'gitlab-shell' facility for manipulating and browsing the
> repos, and scripts for performing backups and restores of both the Git
> repositories and the PostgreSQL database tables.  They've got hooks for
> connecting to external build servers and bug tracking systems, and a full
> web API for accessing the system.  And, of course, they've got ssh key
> support for high performance Git operations over ssh in addition to over
> https. They're also very good with their development and release cycle,
> with a new release coming out like clockwork on the 22nd of the month.
>
> So.. yeah.  Very highly recommended.
>
>>   --
> 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: Game logic with Clojure

2014-06-24 Thread blake
I started with "Caves of Clojure"; I'm not sure I'd recommend it as a first
thing.

Also, as great as it is, it's unfinished, and it stops right where the
design gets hard. Or at least the part that I'd consider hard. (Traditional
roguelikes have 2D maps but Mr. Losh opts for a 3D map, a la Dwarf
Fortress, and his last post is where the Z-levels are added.)

Lanterna's a little twitchy, too, and there's not a lot of support for it.

I'm hoping to do something with rot.js—maybe convert it to Clojure?—but
then I'd like to come back and see if I can pick up where Losh left off.




On Mon, Jun 23, 2014 at 6:57 PM, George Oliver 
wrote:

>
>
> On Monday, June 23, 2014 12:54:56 PM UTC-7, Majen Ful wrote:
>>
>>
>> Could you give me some tips and lead me to the right things to do.
>>
>>
> There's also this often referenced series of posts that might help,
>
> http://prog21.dadgum.com/23.html
>
> --
> 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: online courses for clojure?

2014-06-17 Thread blake
This one is not complete:

http://mooc.cs.helsinki.fi/clojure

But as far as it goes it is very good.


On Tue, Jun 17, 2014 at 11:17 AM, Łukasz Kożuchowski <
lukasz.kozuchow...@gmail.com> wrote:

> Here you are:
> http://mooc.cs.helsinki.fi/clojure
>
> Łukasz Kożuchowski
> On Jun 17, 2014 8:12 PM, "Charlie Griefer" 
> wrote:
>
>> On Jun 17, 2014, at 11:05 AM, Chris Sells 
>> wrote:
>>
>> I’m familiar with the PluralSight and Safari Books Online series of video
>> presentations on Clojure, but haven’t yet seen anything on Coursera or
>> Udacity with an actual set of homework, deadlines, etc. Does anyone know of
>> such an online course for Clojure? Thanks.
>>
>>
>> Not Clojure specifically, but Coursera has a wonderful course on
>> Programming Languages. https://www.coursera.org/course/proglang
>>
>> Covers ML and Racket. Then some Ruby at the end. If you just need to get
>> up to speed with FP concepts, the first 2/3 of this course is amazing.
>>
>>  --
>> Charlie Griefer
>> http://charlie.griefer.com
>>
>> "Give light, and the darkness will disappear of itself."
>> -- Desiderius Erasmus
>>
>>  --
>> 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: Gin card game with Datomic

2014-06-13 Thread blake
Cool!


On Fri, Jun 13, 2014 at 12:49 AM, Gijs S.  wrote:

> Hi all,
>
> I wrote a web app where you can play a card game with Clojure,
> ClojureScript and Datomic.
>
> Background on the design is here:
> http://thegeez.net/2014/06/12/gin_datomic.html
>
> The game is playable here: http://gin.thegeez.net/
>
> The code is on github: https://github.com/thegeez/gin
>
> -Gijs
>
> --
> 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: Count vowels in a string

2014-05-20 Thread blake
To say nothing of "y":

yes -> one vowel
any -> two vowels

but the filter thing is good otherwise.

-- 
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: Datascript and React.js for a Clojure web app

2014-05-01 Thread blake
Looks good. Is the "admin" login supposed to work?


On Wed, Apr 30, 2014 at 6:32 AM, Gijs S.  wrote:

> Hi all,
>
> I've released a Clojure web application. It includes a front-end using
> DataScript and React.js in ClojureScript.
>
> More details here:
> http://thegeez.net/2014/04/30/datascript_clojure_web_app.html
>
> The code is on github: https://github.com/thegeez/clj-crud
>
> Demo on heroku: http://clj-crud.herokuapp.com/
>
> Best regards,
> Gijs
>
> --
> 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 way I can learn clojure with a lot of exercises

2014-04-16 Thread blake
As one who has been immersed in Clojure since the beginning of the year,
I'd say use 4Clojure judiciously.

For one thing, the format of the exercises adds an extra layer of
complexity: Most of the time, you can't just solve the problem, you must
solve the problem and then try to figure out how to phrase your solution
into the surrounding assertion.

For another, a lot of the "easy" questions are of the category "easy, if
you already know the answer". The first section of the clojure cheat-sheet (
http://clojure.org/cheatsheet) gives you your basic tools. (A lot of my
first weeks were "Oh, there's a function for that?")

And finally, personally, I find that there's only so many times I can do
Fibonaccis and factorials (and all those other Comp Sci exercises that I've
never used in a productive program) before I get antsy. After a few weeks
of focusing on 4clojure, I realized I couldn't actually write a running
program.

Then, after a few weeks of playing around with a few dumb programs (but
actual programs) I could go back and knock out a lot of 4clojure exercises.
​
But! now I go back and if there's an exercise I can't do, I know it's
because there's a hole in my Clojure knowledge, so it's been very good for
filling those in. When you start, though, it's all holes.

My 2 cents.

===Blake===

-- 
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: How did you learn Clojure?

2014-03-20 Thread blake . watson
Some Lisp books have been "translated" to Clojure. 

http://juliangamble.com/blog/2012/07/13/amazing-lisp-books-living-again-in-clojure/

On Thursday, March 20, 2014 11:23:10 PM UTC-7, Marcus Blankenship wrote:

> Cool, thanks to all who've replied thus far. 
>
> Question: is there any value in traditional lisp / scheme texts, like 
> SICP, or Little Schemer (etc) or other books like that?  I've spent quite a 
> bit of time with them, imagining they would pay off, but I'm not sure 
> that's a "normal" route to Clojure proficiency. 
>
> Sent from my iPhone 
>
> > On Mar 20, 2014, at 11:12 PM, Sean Corfield 
> > > 
> wrote: 
> > 
> >> On Mar 20, 2014, at 6:08 PM, Marcus Blankenship 
> >> > 
> wrote: 
> >> So I'm curious: how did you learn Clojure well enough to be proficient 
> with it, or how are you working on learning it? 
> > 
> > Initial dabbling: The Joy of Clojure and a REPL. Caveat: it's not really 
> an introductory Clojure book but I had past FP experience so I felt I could 
> "jump in". 
> > 
> > Initial serious learning: Attended Amit Rathore's Clojure Bootcamp - one 
> day course for about $300 (if I remember correctly?). 
> > 
> > Follow-on: 4clojure.com, worked through Clojure in Action as well. 
> > 
> > Then I picked a handful of small-ish problems we'd already solved at 
> work in other languages and re-coded them in Clojure. 
> > 
> > Since then it's been a steady stream of tackling increasingly larger 
> problems at work, over a period of about three years. 
> > 
> >> Anyone else facing the focus + fear dilemma? 
> > 
> > There's a lot less fear if you're used to learning new languages. I try 
> to pick up a new language every year or two: Groovy in 2008/2009, Scala in 
> 2009/2010, Clojure in 2010/2011 (and onward). Dabbled in Ruby, Python, 
> Haskell since then but nothing serious. Very interested in Elm right now. 
> > 
> > As for focus, yes, you really do need a "project". Either pick things 
> you've done before in other languages, or figure out something that would 
> scratch an itch (a small web app, perhaps?) and tackle that. 
> > 
> > Sean Corfield -- (904) 302-SEAN 
> > An Architect's View -- http://corfield.org/ 
> > 
> > "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 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: How did you learn Clojure?

2014-03-20 Thread blake . watson
I'm learning it now. In my case, we had a single Clojure programmer who's 
leaving and I was volunteered to take his place. =)

So, in this case, fear is very focusing. Heh.

Fun, though. He's been giving lessons and I've been reading books, using 
4Clojure, looking at a variety of different programs (Twitter, asteroids, 
Caves of 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
--- 
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: Gwt-Clojure - lightweight browser implementation

2012-08-23 Thread Blake Miller
I realize this is an old thread ... and the blog link about the gwt-clojure 
project is dead.

I just wanted to mention that I'm working on something similar, with a 
somewhat different approach:

This one is a java metaprogramming toolkit written in clojure. It turns 
clojure forms into java source code which can be compiled with the GWT 
compiler.

It's not production-ready by any means, it is very experimental, but I'd be 
glad to have any feedback on the general concepts or the clojure code (this 
is my first clojure project, I'm probably missing a lot of good uses of the 
sequence libraries and such)

https://github.com/blak3mill3r/percolator/blob/master/play/src/com/whatsys/test.clj

On Thursday, June 17, 2010 7:08:20 AM UTC-7, lpetit wrote:
>
> Hi,
>
> Seems real interesting  !
>
> What I was not able to understand by reading your blog post, is which
> subset of clojure you ported to the client side ?
>
> Is it just a declarative API for the widgets part, or will it be
> possible, as with GWT java client side code, to embed logic,etc ?
>
> will it be possible to use atoms for managing state mutation, wiring
> fns as asynchronous callback functions , etc. ?
>
>
> 2010/6/17 pfisk >:
> > I will release an open source version of Gwt-Clojure next week.
> >
> > My approach to building web applications is based on "frame
> > technology" which has been used commercially in mainframe code
> > generation for nearly 30 years. You build a library of data structures
> > (frames) that describe an application and then send it to a code
> > generator to write the application. I have used Clojure to build my
> > frame engine. Gwt-Clojure was developed to make scripting easier on
> > the client side. In summary, my approach is to build web apps 100% in
> > Lisp.
> >
> >
> > On Jun 16, 6:50 pm, Rick Moynihan  wrote:
> >> Neat!
> >>
> >> I'm currently writting a webapp with GWT for the browser client, and
> >> clojure on the server... What is your approach to doing this, and is
> >> the code available anywhere yet?
> >>
> >> R.
> >>
> >> On 15 June 2010 19:48, pfisk  wrote:
> >>
> >>
> >>
> >> > Gwt-Clojure is a subset of the Clojure language which was developed
> >> > for scripting GWT (Google Windows Toolkit) widgets in the browser
> >> > environment. It is designed to be able to share code with Clojure
> >> > running on the server.
> >>
> >> > The current deployment size is about 145kb of Javascript - including
> >> > the interpreter and several GWT widget classes.
> >>
> >> > Test environment:http://wisperweb.appspot.com/
> >>
> >> > Gwt-Clojure blog post:
> http://framegen.wordpress.com/2010/06/15/gwt-clojure/
> >>
> >> > --
> >> > 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 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 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

Clojurescript, is it ready yet?

2012-08-23 Thread Blake Miller
This is somewhat related, though it's not exactly what the OP asked about.

This compiles with GWT:
https://github.com/blak3mill3r/percolator/blob/master/play/src/com/whatsys/test.clj

Also I wanted to point out that you could export a public interface
with the GWT compiler and call it with clojurescript. I'm not sure if
I understand your needs exactly ... not sure if that would help.

I'm picturing writing a bunch of UI components in GWT, describing the
UiBinder xml file as clojure forms, generating the actual xml with
clojure at compile time, and if you wanted to you could also have that
data structure available to your clojurescript client.

Cheers!

-- 
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: creating a finite sequence of uncertain length

2011-10-26 Thread Blake C Hurt
Perfect! Thanks!

On Oct 25, 7:10 pm, Alan Malloy  wrote:
> (take-while (complement nil?) (repeatedly myfunc))
>
> On Oct 25, 4:07 pm, rugby_road  wrote:
>
>
>
>
>
>
>
> > I have a function without arguments which returns a big,complex object
> > repeatedly until it returns nil.  That is to say that the function
> > will produce a sequence of objects, but I don't know how many.  I want
> > to call the generator as a lazy sequence but how do I make such a
> > thing?
>
> > Currently I am doing something like this:
>
> > (loop [i (myfunc)]
> > (if (nil? i) nil ;; we are done here
> > (let
> >   ...do a bunch of stuff to i
> > (recur (myfunc)))
>
> > This works okay, but leaves that  recur statement dangling at the end
> > of the routine. What I would like to do is  the cleaner:
>
> > (doseq [ i (myseq)]
> >  ...do a bunch of stuff to i)
>
> > I have tried using (def myseq (repeatedly (myfunc))), but the
> > repeatedly  doesn't seem to ever end.  I have tried having myfunc
> > return a nil, or a [] but  it just keeps repeating the final end value
> > of nil or [].
>
> > How would you make such a terminating sequence?
> > Is there a special final value myfunc must return so that the sequence
> > ends gracefully?
> >  Or is this just an abuse of the concept of a sequence and I should
> > just stick to the loop?
>
> > thanks
> > Blake

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