Re: using contrib functions

2014-04-03 Thread Alex Wang
It seems no replacement for 'clojure.contrib.server-socket',  any
suggestions or libs for socket programming?


On Sat, Mar 29, 2014 at 11:05 AM, Sean Corfield s...@corfield.org wrote:

 On Mar 28, 2014, at 7:40 PM, Christopher Howard cmhowa...@alaska.edu
 wrote:
  I wanted to try out this Contrib function describe on this
  page
  
 http://richhickey.github.io/clojure-contrib/types-api.html#clojure.contrib.types/defadt.
 How
  do I get that in my project? Trying to follow documentation, I did

 That's very out of date documentation. The current documentation is here:

 http://clojure.github.io/

 The old monolithic clojure-contrib library hasn't been maintained for a
 very long time.

 Some parts of that library were migrated to the new modular contrib
 libraries. You can read more about that here:


 http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go

 The old clojure.contrib.types library was not one of those so it's
 essentially gone now. That usually means there are better ways to do what
 the old library did - or that the old library was never really a good way
 to do things in the first place. I've no idea what defadt was meant to do,
 I'm afraid.

 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: using contrib functions

2014-04-03 Thread PlĂ­nio Balduino
You can copy the source to your project or write your own. 

That function basically wraps Socket and SocketServer Java classes inside a 
loop/recur infinite loop. 

Exactly as you already did with Java. 

Regards 

Plinio Balduino
11 982 611 487

 On 03/04/2014, at 22:27, Alex Wang idea.wan...@gmail.com wrote:
 
 It seems no replacement for 'clojure.contrib.server-socket',  any suggestions 
 or libs for socket programming?
 
 
 On Sat, Mar 29, 2014 at 11:05 AM, Sean Corfield s...@corfield.org wrote:
 On Mar 28, 2014, at 7:40 PM, Christopher Howard cmhowa...@alaska.edu wrote:
  I wanted to try out this Contrib function describe on this
  page
  http://richhickey.github.io/clojure-contrib/types-api.html#clojure.contrib.types/defadt.
   How
  do I get that in my project? Trying to follow documentation, I did
 
 That's very out of date documentation. The current documentation is here:
 
 http://clojure.github.io/
 
 The old monolithic clojure-contrib library hasn't been maintained for a very 
 long time.
 
 Some parts of that library were migrated to the new modular contrib 
 libraries. You can read more about that here:
 
 http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go
 
 The old clojure.contrib.types library was not one of those so it's 
 essentially gone now. That usually means there are better ways to do what 
 the old library did - or that the old library was never really a good way to 
 do things in the first place. I've no idea what defadt was meant to do, I'm 
 afraid.
 
 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.


Re: using contrib functions

2014-04-01 Thread Herwig Hochleitner
2014-03-29 3:40 GMT+01:00 Christopher Howard cmhowa...@alaska.edu:

 Is that webnf package the thing I am supposed to put in my
 dependencies list? Version 0.0.1 doesn't sound right. Or am I
 supposed to download something myself and throw it in my lib
 directory?


For clarification: webnf.deps packages are my effort to provide up to date
dependency sets for quickly starting a new project. webnf.deps/contrib
has nothing to do with the old contrib package. It's  is named so,
because it includes all of new clojure contrib plus some commonly used
dependencies.

kind regards

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: using contrib functions

2014-03-31 Thread Christopher Howard
On Fri, 28 Mar 2014 20:06:59 -0700
Sean Corfield s...@corfield.org wrote:

 BTW, where did you find the references to defadt and
 clojure.contrib.types? Perhaps we can get the original references
 updated so people aren't misled in future...
 
 Sean
 

I think it was this old StackOverflow post:

http://stackoverflow.com/questions/5430673/clojure-algebraic-data-types

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: using contrib functions

2014-03-31 Thread Sean Corfield
Thank you. I just submitted an edit to remove the link to the
richhickey.github.com repo since that's so outdated, and add a note
about clojure.contrib no longer being maintained. It's a slow process
to update the web to remove all the outdated stuff :)

Sean

On Mon, Mar 31, 2014 at 5:06 PM, Christopher Howard
cmhowa...@alaska.edu wrote:
 On Fri, 28 Mar 2014 20:06:59 -0700
 Sean Corfield s...@corfield.org wrote:

 BTW, where did you find the references to defadt and
 clojure.contrib.types? Perhaps we can get the original references
 updated so people aren't misled in future...

 Sean


 I think it was this old StackOverflow post:

 http://stackoverflow.com/questions/5430673/clojure-algebraic-data-types

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

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

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To 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: using contrib functions

2014-03-29 Thread Sam Ritchie
defadt defines an algebraic data type - so, imagine a record with a 
finite number of implementations (Boolean is an algebraic data type 
since it only has true and false, for example. Chess pieces would be 
another one.)


Once you define an ADT you can use that contrib library's match macro 
to do exhaustive case matches. Without the defadt thing, you just have 
to trust that the user knows how to handle all of your cases.



Sean Corfield mailto:s...@corfield.org
March 28, 2014 9:05 PM

That's very out of date documentation. The current documentation is here:

http://clojure.github.io/

The old monolithic clojure-contrib library hasn't been maintained for 
a very long time.


Some parts of that library were migrated to the new modular contrib 
libraries. You can read more about that here:


http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go

The old clojure.contrib.types library was not one of those so it's 
essentially gone now. That usually means there are better ways to do 
what the old library did - or that the old library was never really a 
good way to do things in the first place. I've no idea what defadt was 
meant to do, I'm afraid.


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)



Christopher Howard mailto:cmhowa...@alaska.edu
March 28, 2014 8:40 PM
Hi. --Insert here the usual caveats about being new to Clojure and
Java.--

I wanted to try out this Contrib function describe on this
page
http://richhickey.github.io/clojure-contrib/types-api.html#clojure.contrib.types/defadt. 
How

do I get that in my project? Trying to follow documentation, I did
lein search:

code:

my-host:~/my-project$ lein search contrib
Warning: couldn't download index for http://repo1.maven.org/maven2
== Results from clojars - Showing page 1 / 1 total
[webnf.deps/contrib 0.0.1] The uber dependency to get a full set of 
popular

dependencies. For development or when you have room in your .m2 repo.

my-host:~/my-project$ lein search clojure.contrib.types
Warning: couldn't download index for http://repo1.maven.org/maven2
my-host:~/my-project$ lein search defadt
Warning: couldn't download index for http://repo1.maven.org/maven2


Is that webnf package the thing I am supposed to put in my
dependencies list? Version 0.0.1 doesn't sound right. Or am I
supposed to download something myself and throw it in my lib
directory?



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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.
inline: postbox-contact.jpginline: compose-unknown-contact.jpg

Re: using contrib functions

2014-03-29 Thread Sean Corfield
On Mar 29, 2014, at 9:39 AM, Sam Ritchie sritchi...@gmail.com wrote:
 defadt defines an algebraic data type - so, imagine a record with a finite 
 number of implementations (Boolean is an algebraic data type since it only 
 has true and false, for example. Chess pieces would be another one.)
 
 Once you define an ADT you can use that contrib library's match macro to do 
 exhaustive case matches. Without the defadt thing, you just have to trust 
 that the user knows how to handle all of your cases.

Cool. That makes sense. I think that part of my 30+ years ago Comp Sci degree 
must be very rusty :)

So what would be the modern Clojure way to implement ADTs...

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)





signature.asc
Description: Message signed with OpenPGP using GPGMail


using contrib functions

2014-03-28 Thread Christopher Howard
Hi. --Insert here the usual caveats about being new to Clojure and
Java.--

I wanted to try out this Contrib function describe on this
page
http://richhickey.github.io/clojure-contrib/types-api.html#clojure.contrib.types/defadt.
 How
do I get that in my project? Trying to follow documentation, I did
lein search:
  
code:

my-host:~/my-project$ lein search contrib
Warning: couldn't download index for http://repo1.maven.org/maven2
 == Results from clojars - Showing page 1 / 1 total
[webnf.deps/contrib 0.0.1] The uber dependency to get a full set of popular
  dependencies. For development or when you have room in your .m2 repo.

my-host:~/my-project$ lein search clojure.contrib.types
Warning: couldn't download index for http://repo1.maven.org/maven2
my-host:~/my-project$ lein search defadt
Warning: couldn't download index for http://repo1.maven.org/maven2


Is that webnf package the thing I am supposed to put in my
dependencies list? Version 0.0.1 doesn't sound right. Or am I
supposed to download something myself and throw it in my lib
directory?

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

2014-03-28 Thread Sean Corfield
On Mar 28, 2014, at 7:40 PM, Christopher Howard cmhowa...@alaska.edu wrote:
 I wanted to try out this Contrib function describe on this
 page
 http://richhickey.github.io/clojure-contrib/types-api.html#clojure.contrib.types/defadt.
  How
 do I get that in my project? Trying to follow documentation, I did

That's very out of date documentation. The current documentation is here:

http://clojure.github.io/

The old monolithic clojure-contrib library hasn't been maintained for a very 
long time.

Some parts of that library were migrated to the new modular contrib libraries. 
You can read more about that here:

http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go

The old clojure.contrib.types library was not one of those so it's essentially 
gone now. That usually means there are better ways to do what the old library 
did - or that the old library was never really a good way to do things in the 
first place. I've no idea what defadt was meant to do, I'm afraid.

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)





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: using contrib functions

2014-03-28 Thread Sean Corfield
BTW, where did you find the references to defadt and clojure.contrib.types? 
Perhaps we can get the original references updated so people aren't misled in 
future...

Sean

On Mar 28, 2014, at 8:05 PM, Sean Corfield s...@corfield.org wrote:
 On Mar 28, 2014, at 7:40 PM, Christopher Howard cmhowa...@alaska.edu wrote:
 I wanted to try out this Contrib function describe on this
 page
 http://richhickey.github.io/clojure-contrib/types-api.html#clojure.contrib.types/defadt.
  How
 do I get that in my project? Trying to follow documentation, I did
 
 That's very out of date documentation. The current documentation is here:
 
   http://clojure.github.io/
 
 The old monolithic clojure-contrib library hasn't been maintained for a very 
 long time.
 
 Some parts of that library were migrated to the new modular contrib 
 libraries. You can read more about that here:
 
   http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go
 
 The old clojure.contrib.types library was not one of those so it's 
 essentially gone now. That usually means there are better ways to do what 
 the old library did - or that the old library was never really a good way to 
 do things in the first place. I've no idea what defadt was meant to do, I'm 
 afraid.




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: using contrib functions

2014-03-28 Thread John Gabriele
On Friday, March 28, 2014 10:40:55 PM UTC-4, Christopher Howard wrote:

 Hi. --Insert here the usual caveats about being new to Clojure and 
 Java.-- 

 I wanted to try out this Contrib function describe on this 
 page 
 
 http://richhickey.github.io/clojure-contrib/types-api.html#clojure.contrib.types/defadt.
  
 How 
 do I get that in my project?


Hi Chris,

I'm not sure, but that link you have may be referring to the old defunct 
monolithic contrib library.

You can find a listing of all current modular contrib libraries at 
http://dev.clojure.org/display/doc/Clojure+Contrib+Libraries. The links 
there point to their respective homes on github. API docs for the contrib 
libs are available at http://clojure.github.io/.

As described on the individual github pages, to use a contrib lib, you need 
to put something like the following into your project.clj's :dependencies 
vector:

[org.clojure/foo.bar 1.2.3]  ; That's group-id/artifact-id.

and then, in your source code file's `ns` macro, something like:

(:require [clojure.foo.bar :as foob])  ; clojure.foo.bar is a namespace 
provided by the org.clojure/foo.bar lib.

Note: don't let the dots in the contrib lib's group-id and artifact-id 
throw you. The group-id and artifact-id are not *necessarily* related to 
the namespace(s) provided by the lib, though they usually have pieces in 
common.

-- John


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