RE: Unnamed Types - What Am I Doing Wrong?

2017-07-26 Thread Sean Corfield
This is awesome… made me laugh out loud!

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

From: James Gatannah
Sent: Wednesday, July 26, 2017 10:24 PM
To: Clojure
Subject: Re: Unnamed Types - What Am I Doing Wrong?

I feel your pain. I don't have an answer, but the basic point convinced me to 
write this: 
http://gatannahfiles.blogspot.com/2017/07/moving-away-from-guard-rails.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: Unnamed Types - What Am I Doing Wrong?

2017-07-26 Thread James Gatannah
I feel your pain. I don't have an answer, but the basic point convinced me 
to write this: 
http://gatannahfiles.blogspot.com/2017/07/moving-away-from-guard-rails.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.


Re: [ANN] kibit 0.1.6 - featuring namespaced keyword support!

2017-07-26 Thread Raymond Huang
That is awesome! Looking forward to giving it a spin!

Sent from my iPhone

> On Jul 26, 2017, at 4:18 PM, Daniel Compton  
> wrote:
> 
> Hi folks
> 
> I'm excited to announce that kibit 0.1.6-beta1 has been released.
> 
> Kibit is a static analysis tool that looks at your code and suggests ways it 
> could be more idiomatic.
> 
> In the most recent beta release, Kibit supports reading files with namespaced 
> keywords! A massive thanks to Alex Redington for putting this together, and 
> Reid McKenzie for providing feedback on this fix.
> 
> Up until now Kibit couldn't read namespaced keywords and would skip the rest 
> of the file, which meant that large portions of your codebase wouldn't be 
> checked. With the increasing use of namespaced keywords from clojure.spec, 
> this was becoming a larger and larger problem for people.
> 
> You can try it today by adding `[lein-kibit "0.1.6-beta1"]` to your Leiningen 
> :plugins, either in your user.clj, or in your project.clj.
> 
> Please report any wonkiness you find with this version. We're particularly 
> interested in people running this on projects which do funky things with 
> switching namespaces, or manually manipulating namespace aliases (in-ns, 
> alias, e.t.c.). A word of warning, as always don't blindly accept Kibit 
> suggestions. It is possible that it may get confused on files doing tricky 
> namespace stuff, and make suggestions with incorrect namespace aliases (but 
> we'd like to fix that if we can).
> 
> Thanks, Daniel.
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from 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.


[ANN] kibit 0.1.6 - featuring namespaced keyword support!

2017-07-26 Thread Daniel Compton
Hi folks

I'm excited to announce that kibit 0.1.6-beta1 has been released.

Kibit  is a static analysis tool that
looks at your code and suggests ways it could be more idiomatic.

In the most recent beta release, Kibit supports reading files with
namespaced keywords! A massive thanks to Alex Redington for putting this
together, and Reid McKenzie for providing feedback on this fix.

Up until now Kibit couldn't read namespaced keywords and would skip the
rest of the file, which meant that large portions of your codebase wouldn't
be checked. With the increasing use of namespaced keywords from
clojure.spec, this was becoming a larger and larger problem for people.

You can try it today by adding `[lein-kibit "0.1.6-beta1"]` to your
Leiningen :plugins, either in your user.clj, or in your project.clj.

Please report any wonkiness you find with this version. We're particularly
interested in people running this on projects which do funky things with
switching namespaces, or manually manipulating namespace aliases (in-ns,
alias, e.t.c.). A word of warning, as always don't blindly accept Kibit
suggestions. It is possible that it may get confused on files doing tricky
namespace stuff, and make suggestions with incorrect namespace aliases (but
we'd like to fix that if we can).

Thanks, Daniel.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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] tools.deps.alpha

2017-07-26 Thread Rick Moynihan
Regarding the cross platform nature of rlwrap, at the cost of an extra JVM
dependency might it not be better to use jline?

http://jline.sourceforge.net/
https://github.com/jline/jline3

I used to use it with clojure many many years ago and it seemed to work
quite well...

R.


On 26 July 2017 at 17:57, Alex Miller  wrote:

>
>
> On Wed, Jul 26, 2017 at 11:48 AM, Steve Miner 
> wrote:
>
>> I’ve been using my own launch script that does something similar to the
>> new clj script. (I’m caching a Leiningen generated classpath.)  I had some
>> bugs when my project directory was copied to another user or machine
>> because the cached classpath was not validate in the new environment,
>> particularly with a different Maven repository.  The same kind of problem
>> can happen with a remotely mounted project directory.  File time checks did
>> not necessarily protect against these relocations.
>>
>> I fixed my problem with two changes.  First, I put the cache in the
>> PROJECT/target subdirectory so that a “lein clean” would allow the user to
>> recover.
>>
>
> This is a non-starter - we need the cache to survive a rebuild by separate
> build tool (also don't want to create target dir if not needed).
>
>
>> Second, I named my cache file with the inode of the project.clj file.  If
>> the project is copied somewhere else, it is highly unlikely that the inode
>> numbers would match.  The inode of the Maven repository or project deps.edn
>> should work with the new clj script.
>>
>
> Interesting, will think about that (portability issues though).
>
>
>> I use rlwrap, except within an Emacs shell.  I suggest you test for the
>> presence of rlwrap as you do for java.  $(type -p rlwrap)  and ignore it if
>> it’s not found.  I think Emacs is popular enough that it’s worth testing
>> for within your clj script ($EMACS will be defined).  It would be good
>> enough if you provided an option to turn off rlwrap so I could wrap your
>> script with my own.
>>
>
> I've had feedback from others on rlwrap too (since it's currently missing
> from the installation instructions, which is just my oversight). The idea
> was that the installer would ensure it's installed so it can be assumed it
> exists. But there are surely cases where you might not want it so a jira
> for having a way to add more control around it would be fine. I don't want
> to check for $EMACS but wouldn't mind having a new env var that you could
> set to skip it or something like that.
>
>
>> I can file bugs and provide patches if you want.
>>
>> Steve Miner
>> stevemi...@gmail.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.
> 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] expound 0.1.2

2017-07-26 Thread Juan Monetta
That was a great description Ben! So agree with everything there.

One important difference is that inspectable doesn't support clojurescript 
yet, since it's using a swing interface to draw the ui I'm trying to figure 
out the best way to support it.

My idea on inspectable is putting there a bunch of experiments on 
visualizing specs and specs fails using a GUI.I decided to try this path 
after using spec with something like a compiler and 
having a hard time inspecting spec fails when big and nested data 
structures were involved. If you want to inspect big data structures with 
context you need some kind of gui that supports collapsing etc.

I haven't tried expound yet, but for what I've seen I'll be trying it soon. 
I almost always prefer simple text interfaces since it's much easier to 
copy and paste instead of start sharing screenshots etc.

So I think if you don't need data context and exploring capabilities 
expound integrates better your repl experience since it just prints 
information in the repl instead of opening an external window,  
I'll keep doing experiments with GUIs since I think there is some value 
there.  

As Ben said inspectable also includes a spec browser. If you are a CIDER 
user, its latest release includes exactly the same functionality 
(cider-browse-spec), in which I also worked on before inspectable. 

Juan

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Unnamed Types - What Am I Doing Wrong?

2017-07-26 Thread Peter Hull

On Wednesday, 26 July 2017 03:03:45 UTC+1, Daniel Compton wrote:

> For something like an account, a more idiomatic way to model this in 
> Clojure might be with maps:
>
> If I understand Kevin's post correctly, he's already planning to replace 
his vectors with maps, and he is asking if there's a way to make the change 
without too much pain and without missing anything.
 
I wouldn't count myself as 'experienced' so I don't know if there is an 
answer, but I have definitely felt that pain. If you had a good test 
coverage you could just make the first pass change and then keep iterating 
until the tests pass. Once Clojure 1.9 is out then (I believe) specs will 
be a better way to verify that all your data types are consistent and 
correct. 

Hopefully someone else will have a better answer...

Pete

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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] tools.deps.alpha

2017-07-26 Thread Alex Miller
On Wed, Jul 26, 2017 at 11:48 AM, Steve Miner  wrote:

> I’ve been using my own launch script that does something similar to the
> new clj script. (I’m caching a Leiningen generated classpath.)  I had some
> bugs when my project directory was copied to another user or machine
> because the cached classpath was not validate in the new environment,
> particularly with a different Maven repository.  The same kind of problem
> can happen with a remotely mounted project directory.  File time checks did
> not necessarily protect against these relocations.
>
> I fixed my problem with two changes.  First, I put the cache in the
> PROJECT/target subdirectory so that a “lein clean” would allow the user to
> recover.
>

This is a non-starter - we need the cache to survive a rebuild by separate
build tool (also don't want to create target dir if not needed).


> Second, I named my cache file with the inode of the project.clj file.  If
> the project is copied somewhere else, it is highly unlikely that the inode
> numbers would match.  The inode of the Maven repository or project deps.edn
> should work with the new clj script.
>

Interesting, will think about that (portability issues though).


> I use rlwrap, except within an Emacs shell.  I suggest you test for the
> presence of rlwrap as you do for java.  $(type -p rlwrap)  and ignore it if
> it’s not found.  I think Emacs is popular enough that it’s worth testing
> for within your clj script ($EMACS will be defined).  It would be good
> enough if you provided an option to turn off rlwrap so I could wrap your
> script with my own.
>

I've had feedback from others on rlwrap too (since it's currently missing
from the installation instructions, which is just my oversight). The idea
was that the installer would ensure it's installed so it can be assumed it
exists. But there are surely cases where you might not want it so a jira
for having a way to add more control around it would be fine. I don't want
to check for $EMACS but wouldn't mind having a new env var that you could
set to skip it or something like that.


> I can file bugs and provide patches if you want.
>
> Steve Miner
> stevemi...@gmail.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.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] tools.deps.alpha

2017-07-26 Thread Steve Miner
I’ve been using my own launch script that does something similar to the new clj 
script. (I’m caching a Leiningen generated classpath.)  I had some bugs when my 
project directory was copied to another user or machine because the cached 
classpath was not validate in the new environment, particularly with a 
different Maven repository.  The same kind of problem can happen with a 
remotely mounted project directory.  File time checks did not necessarily 
protect against these relocations.

I fixed my problem with two changes.  First, I put the cache in the 
PROJECT/target subdirectory so that a “lein clean” would allow the user to 
recover.  Second, I named my cache file with the inode of the project.clj file. 
 If the project is copied somewhere else, it is highly unlikely that the inode 
numbers would match.  The inode of the Maven repository or project deps.edn 
should work with the new clj script.

I use rlwrap, except within an Emacs shell.  I suggest you test for the 
presence of rlwrap as you do for java.  $(type -p rlwrap)  and ignore it if 
it’s not found.  I think Emacs is popular enough that it’s worth testing for 
within your clj script ($EMACS will be defined).  It would be good enough if 
you provided an option to turn off rlwrap so I could wrap your script with my 
own.

I can file bugs and provide patches if you want.

Steve Miner
stevemi...@gmail.com 




> On Jul 25, 2017, at 10:19 AM, Alex Miller  wrote:
> 
> tools.deps.alpha is a new contrib library API for transitive dependency graph 
> expansion and the creation of classpaths.
> 
> For more information, I would invite you to check out:
> 
> * the README 
>  from 
> tools.deps.alpha
> * the slides 
>  from my 
> EuroClojure talk (video coming in the next week or two)
> 
> There are some additional pieces still to come that will provide installers 
> for various systems as well. This is still a work in progress but is targeted 
> for completion along with Clojure 1.9.
> 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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] tools.deps.alpha

2017-07-26 Thread Rick Moynihan
Just checking this out... Looks really interesting.

Might be worth mentioning the rlwrap dependency in the installation
instructions:

/Users/rick/repos/3rdparty/tools.deps.alpha/src/main/resources/clj: line
106: rlwrap: command not found

resolved on a mac with:

brew install rlwrap

R.

On 26 July 2017 at 03:50, Alex Miller  wrote:

>
>
> On Tuesday, July 25, 2017 at 9:46:55 PM UTC-5, Gregg Reynolds wrote:
>>
>>
>> BTW, minor doc error I think:
>>
>> resolve-deps
>>
>> Usage: (resolve-args deps-map resolve-args)
>> Should that be (resolve-deps ...)?
>>
>
> Yes, fixed. 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.