Re: wally: a alternative way to discover functions

2013-09-09 Thread Islon Scherer
Florian: I filter out all functions that end with ! but I can't know for 
sure which functions have side effects.

On Sunday, September 8, 2013 7:24:48 AM UTC+2, Florian Over wrote:

 Hi,
 you could check for io! to find forms with side-effect, but i think it is 
 seldom used.
 Florian

 http://clojuredocs.org/clojure_core/clojure.core/io!


 2013/9/8 Maximilien Rzepka maximili...@gmail.com javascript:

 Found many times apropos useful...
 user (apropos partition)
 (partition-by partition-all partition)

 But wally approach is really cool.
 Thanks for sharing 
 @maxrzepka

 Le jeudi 5 septembre 2013 23:23:28 UTC+2, Islon Scherer a écrit :

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it 
 still happens every now and then) I had a hard time finding functions using 
 `doc` or `find-doc`,
 normally because I didn't remember the name of the function or because 
 my only clue was a generic name so find-doc would return too much results. 
 But one
 thing I knew: what to expect of the function, I knew the inputs and the 
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for 
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  
 https://github.com/**stackoverflow/wallyhttps://github.com/stackoverflow/wally

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




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


Re: wally: a alternative way to discover functions

2013-09-09 Thread Marco Shimomoto
That is exactly what http://www.haskell.org/hoogle/ does, you did a 
fantastic job.

Thanks,

On Monday, September 9, 2013 5:09:27 AM UTC-3, Islon Scherer wrote:

 Florian: I filter out all functions that end with ! but I can't know for 
 sure which functions have side effects.

 On Sunday, September 8, 2013 7:24:48 AM UTC+2, Florian Over wrote:

 Hi,
 you could check for io! to find forms with side-effect, but i think it is 
 seldom used.
 Florian

 http://clojuredocs.org/clojure_core/clojure.core/io!


 2013/9/8 Maximilien Rzepka maximili...@gmail.com

 Found many times apropos useful...
 user (apropos partition)
 (partition-by partition-all partition)

 But wally approach is really cool.
 Thanks for sharing 
 @maxrzepka

 Le jeudi 5 septembre 2013 23:23:28 UTC+2, Islon Scherer a écrit :

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it 
 still happens every now and then) I had a hard time finding functions 
 using 
 `doc` or `find-doc`,
 normally because I didn't remember the name of the function or because 
 my only clue was a generic name so find-doc would return too much results. 
 But one
 thing I knew: what to expect of the function, I knew the inputs and the 
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should 
 behave.

 With wally you can tell the inputs and the output and it'll search for 
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  
 https://github.com/**stackoverflow/wallyhttps://github.com/stackoverflow/wally

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




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


Re: wally: a alternative way to discover functions

2013-09-07 Thread Islon Scherer


 I wonder if it would be possible to improve it using the core.typed 
 library and doing some kind of static analysis similar to Haskell's Hoogle 
 to filter out candidates.

The problem is most Clojure functions don't use core.type nor are type 
annotated.
It would be nice if pure functions had some metadata like :pure true. =) 

On Saturday, September 7, 2013 1:53:08 AM UTC+2, Chris-tina Whyte wrote:

 Interesting!

 Though it executes every function in order to find the matches, which is a 
 little bit dangerous as Clojure doesn't enforce purity :( 

 I wonder if it would be possible to improve it using the core.typed 
 library and doing some kind of static analysis similar to Haskell's Hoogle 
 to filter out candidates.

 On Thursday, September 5, 2013 6:23:28 PM UTC-3, Islon Scherer wrote:

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still 
 happens every now and then) I had a hard time finding functions using `doc` 
 or `find-doc`,
 normally because I didn't remember the name of the function or because my 
 only clue was a generic name so find-doc would return too much results. But 
 one
 thing I knew: what to expect of the function, I knew the inputs and the 
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for 
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  https://github.com/stackoverflow/wally



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


Re: wally: a alternative way to discover functions

2013-09-07 Thread Jamie Brandon
I wonder if you can do something clever with class-loaders to prevent
side-effects when testing functions...

On 7 September 2013 20:16, Islon Scherer islonsche...@gmail.com wrote:
 I wonder if it would be possible to improve it using the core.typed
 library and doing some kind of static analysis similar to Haskell's Hoogle
 to filter out candidates.

 The problem is most Clojure functions don't use core.type nor are type
 annotated.
 It would be nice if pure functions had some metadata like :pure true. =)

 On Saturday, September 7, 2013 1:53:08 AM UTC+2, Chris-tina Whyte wrote:

 Interesting!

 Though it executes every function in order to find the matches, which is a
 little bit dangerous as Clojure doesn't enforce purity :(

 I wonder if it would be possible to improve it using the core.typed
 library and doing some kind of static analysis similar to Haskell's Hoogle
 to filter out candidates.

 On Thursday, September 5, 2013 6:23:28 PM UTC-3, Islon Scherer wrote:

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still
 happens every now and then) I had a hard time finding functions using `doc`
 or `find-doc`,
 normally because I didn't remember the name of the function or because my
 only clue was a generic name so find-doc would return too much results. But
 one
 thing I knew: what to expect of the function, I knew the inputs and the
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 2])
 -
 clojure.core/frequencies
 ([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  https://github.com/stackoverflow/wally

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

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


Re: wally: a alternative way to discover functions

2013-09-07 Thread Maximilien Rzepka
Found many times apropos useful...
user (apropos partition)
(partition-by partition-all partition)

But wally approach is really cool.
Thanks for sharing 
@maxrzepka

Le jeudi 5 septembre 2013 23:23:28 UTC+2, Islon Scherer a écrit :

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still 
 happens every now and then) I had a hard time finding functions using `doc` 
 or `find-doc`,
 normally because I didn't remember the name of the function or because my 
 only clue was a generic name so find-doc would return too much results. But 
 one
 thing I knew: what to expect of the function, I knew the inputs and the 
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for 
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  https://github.com/stackoverflow/wally


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


Re: wally: a alternative way to discover functions

2013-09-07 Thread Florian Over
Hi,
you could check for io! to find forms with side-effect, but i think it is
seldom used.
Florian

http://clojuredocs.org/clojure_core/clojure.core/io!


2013/9/8 Maximilien Rzepka maximilien.rze...@gmail.com

 Found many times apropos useful...
 user (apropos partition)
 (partition-by partition-all partition)

 But wally approach is really cool.
 Thanks for sharing
 @maxrzepka

 Le jeudi 5 septembre 2013 23:23:28 UTC+2, Islon Scherer a écrit :

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still
 happens every now and then) I had a hard time finding functions using `doc`
 or `find-doc`,
 normally because I didn't remember the name of the function or because my
 only clue was a generic name so find-doc would return too much results. But
 one
 thing I knew: what to expect of the function, I knew the inputs and the
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  
 https://github.com/**stackoverflow/wallyhttps://github.com/stackoverflow/wally

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


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


Re: wally: a alternative way to discover functions

2013-09-06 Thread Islon Scherer
Mayank: thanks!

Shaun: I thought about approximations too but that's enough complexity to 
be another library by itself.
If there's such a library that I can feed two values and it returns how 
similar they are with some percentage I would gladly integrate it with 
wally.

Of course wally only works for referential transparent/pure functions but 
that's the majority of Clojure functions anyway =)

On Friday, September 6, 2013 6:44:43 AM UTC+2, Shaun Gilchrist wrote:

 Very cool! I wonder how hard it would be to have it suggest compositions 
 if it can not find a direct match? 


 On Thu, Sep 5, 2013 at 10:34 PM, Mayank Jain fires...@gmail.comjavascript:
  wrote:

 Looks pretty interesting. Thanks for sharing


 On Fri, Sep 6, 2013 at 2:53 AM, Islon Scherer 
 islons...@gmail.comjavascript:
  wrote:

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it 
 still happens every now and then) I had a hard time finding functions using 
 `doc` or `find-doc`,
 normally because I didn't remember the name of the function or because 
 my only clue was a generic name so find-doc would return too much results. 
 But one
 thing I knew: what to expect of the function, I knew the inputs and the 
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for 
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


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




 -- 
 Regards,
 Mayank. 

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




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


Re: wally: a alternative way to discover functions

2013-09-06 Thread Frantisek Sodomka
Hello,
this gist does the similar thing:
https://gist.github.com/jaked/6084411

Maybe you can find some inspiration in it.

Frantisek


On Thursday, September 5, 2013 11:23:28 PM UTC+2, Islon Scherer wrote:

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still 
 happens every now and then) I had a hard time finding functions using `doc` 
 or `find-doc`,
 normally because I didn't remember the name of the function or because my 
 only clue was a generic name so find-doc would return too much results. But 
 one
 thing I knew: what to expect of the function, I knew the inputs and the 
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for 
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  https://github.com/stackoverflow/wally


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


Re: wally: a alternative way to discover functions

2013-09-06 Thread Islon Scherer
Thanks for the gist, nice solution but it's not viable for real world code 
without some heavy filtering. If I execute it on my current project it 
starts a server, sends a bunch of emails and hangs forever =)

On Friday, September 6, 2013 2:12:29 PM UTC+2, Frantisek Sodomka wrote:

 Hello,
 this gist does the similar thing:
 https://gist.github.com/jaked/6084411

 Maybe you can find some inspiration in it.

 Frantisek


 On Thursday, September 5, 2013 11:23:28 PM UTC+2, Islon Scherer wrote:

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still 
 happens every now and then) I had a hard time finding functions using `doc` 
 or `find-doc`,
 normally because I didn't remember the name of the function or because my 
 only clue was a generic name so find-doc would return too much results. But 
 one
 thing I knew: what to expect of the function, I knew the inputs and the 
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for 
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  https://github.com/stackoverflow/wally



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


Re: wally: a alternative way to discover functions

2013-09-06 Thread Chris-tina Whyte
Interesting!

Though it executes every function in order to find the matches, which is a 
little bit dangerous as Clojure doesn't enforce purity :( 

I wonder if it would be possible to improve it using the core.typed library 
and doing some kind of static analysis similar to Haskell's Hoogle to 
filter out candidates.

On Thursday, September 5, 2013 6:23:28 PM UTC-3, Islon Scherer wrote:

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still 
 happens every now and then) I had a hard time finding functions using `doc` 
 or `find-doc`,
 normally because I didn't remember the name of the function or because my 
 only clue was a generic name so find-doc would return too much results. But 
 one
 thing I knew: what to expect of the function, I knew the inputs and the 
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for 
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  https://github.com/stackoverflow/wally


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


wally: a alternative way to discover functions

2013-09-05 Thread Islon Scherer
Hey guys,

I don't know about you but when I was a beginner in Clojure (and it still 
happens every now and then) I had a hard time finding functions using `doc` 
or `find-doc`,
normally because I didn't remember the name of the function or because my 
only clue was a generic name so find-doc would return too much results. But 
one
thing I knew: what to expect of the function, I knew the inputs and the 
outputs. That's why I decided to create wally, because sometimes you don't
know the name of the function you want but you know how it should behave.

With wally you can tell the inputs and the output and it'll search for 
functions that match those inputs/outputs.

Ex:

user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


 https://github.com/stackoverflow/wally

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


Re: wally: a alternative way to discover functions

2013-09-05 Thread Mayank Jain
Looks pretty interesting. Thanks for sharing


On Fri, Sep 6, 2013 at 2:53 AM, Islon Scherer islonsche...@gmail.comwrote:

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still
 happens every now and then) I had a hard time finding functions using `doc`
 or `find-doc`,
 normally because I didn't remember the name of the function or because my
 only clue was a generic name so find-doc would return too much results. But
 one
 thing I knew: what to expect of the function, I knew the inputs and the
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  https://github.com/stackoverflow/wally

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




-- 
Regards,
Mayank.

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


Re: wally: a alternative way to discover functions

2013-09-05 Thread Shaun Gilchrist
Very cool! I wonder how hard it would be to have it suggest compositions if
it can not find a direct match?


On Thu, Sep 5, 2013 at 10:34 PM, Mayank Jain firesof...@gmail.com wrote:

 Looks pretty interesting. Thanks for sharing


 On Fri, Sep 6, 2013 at 2:53 AM, Islon Scherer islonsche...@gmail.comwrote:

 Hey guys,

 I don't know about you but when I was a beginner in Clojure (and it still
 happens every now and then) I had a hard time finding functions using `doc`
 or `find-doc`,
 normally because I didn't remember the name of the function or because my
 only clue was a generic name so find-doc would return too much results. But
 one
 thing I knew: what to expect of the function, I knew the inputs and the
 outputs. That's why I decided to create wally, because sometimes you don't
 know the name of the function you want but you know how it should behave.

 With wally you can tell the inputs and the output and it'll search for
 functions that match those inputs/outputs.

 Ex:

 user= (find-by-sample {1 1, 2 3, 3 1, 4 2} [1 2 3 4 4 2 
 2])-clojure.core/frequencies([coll])
   Returns a map from distinct items in coll to the number of times
   they appear.


 user= (find-by-sample '((1 2 3) (4 5)) (partial  3) [1 2 3 4 5])
 -
 clojure.core/partition-by
 ([f coll])
   Applies f to each value in coll, splitting it each time f returns
a new value.  Returns a lazy seq of partitions.


  https://github.com/stackoverflow/wally

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




 --
 Regards,
 Mayank.

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


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