Meeting on Saturday, May 16 at 1PM (Re: [csdc] Meeting?)

0 views
Skip to first unread message

Michael Harrison

unread,
May 7, 2009, 8:23:44 AM5/7/09
to clojure-...@googlegroups.com
Let's meet on Saturday, May 16 at 1PM, at the HacDC workspace.

This meeting should be focused on hacking. To make that work, we need
to talk here, on the mailing list, and talk code. Luke and I have both
offered up some code, but for all of us to be learning together as we
develop, we need wider participation: we need your code. Here are some
possible avenues:

We know, thanks to Luke, how to convert an RSS feed into a seq of data
maps, each data map describing the contents of an RSS item. The next
step in many APIs, e.g. twitter's, is to extract certain contents from
parsed RSS. Someone ought to grind out a function or set of functions
for this sort of extraction.

Who wants to take a first stab at date handling--for sorting or screening?

We've talked a lot about JSON. There are Clojure libraries out there
that parse and serialize JSON. Does someone want to write code for
deploying these in builders and outputters?

I'm working on the mechanics of taking RSS news feeds and outputting
data to feed a word cloud. I have some more code to post today or
tomorrow.

Let's not worry right now about building a consistent or extensible
framework. Let's explore the problem space, put forward some code that
addresses the tasks we want our project to handle, and we can identify
common structures and opportunities for abstraction together.

See you on the 16th.

Michael




On Wed, May 6, 2009 at 7:33 AM, Serge Wroclawski <ema...@gmail.com> wrote:
>
> Are we going to have another meeting any time soon?
>
> - Serge
>
> >
>

Keith Bennett

unread,
May 7, 2009, 8:30:49 AM5/7/09
to clojure-...@googlegroups.com
Guys -

I won't be available that weekend, but I'll be with you in spirit. ;)

- Keith

Matt Revelle

unread,
May 7, 2009, 8:36:55 AM5/7/09
to clojure-...@googlegroups.com

On May 7, 2009, at 8:23 AM, Michael Harrison wrote:

>
> Let's meet on Saturday, May 16 at 1PM, at the HacDC workspace.
>
> This meeting should be focused on hacking. To make that work, we need
> to talk here, on the mailing list, and talk code. Luke and I have both
> offered up some code, but for all of us to be learning together as we
> develop, we need wider participation: we need your code. Here are some
> possible avenues:
>
> We know, thanks to Luke, how to convert an RSS feed into a seq of data
> maps, each data map describing the contents of an RSS item. The next
> step in many APIs, e.g. twitter's, is to extract certain contents from
> parsed RSS. Someone ought to grind out a function or set of functions
> for this sort of extraction.

I haven't written the code, but I'm planning on implementing a simple
twitter lib soon, clj-twitter on github.

Michael Harrison (goodmike)

unread,
May 8, 2009, 1:59:19 PM5/8/09
to Clojure Study Group Washington DC


On May 7, 8:36 am, Matt Revelle <mreve...@gmail.com> wrote:

> I haven't written the code, but I'm planning on implementing a simple  
> twitter lib soon, clj-twitter on github.

That's fantastic, Matt. Let us know when you start posting it to
github and we'll happily fork it.

mh

Matt Revelle

unread,
May 11, 2009, 7:48:36 AM5/11/09
to clojure-...@googlegroups.com

Posted the beginnings of it last night. I'll be adding better search
query support soon, but will probably not be adding other functions
until I run into a need for them. The API is written to extract
specific bits of information and frequently does not return every bit
of data included with the response. I haven't bothered with
authenticated functions, since I didn't need them. Adding functions
should be relatively easy, authentication could probably be done with
clojure.http.resourcefully. The clojure.http.client is what I'm using
for all the requests and I've included it in the src (yes, I know,
slightly uncool, but clojure.http doesn't appear to build to a
distributable jar and I didn't feel like fixing other people's build
scripts last night).

Some examples:

user> (require 'twitter)
nil
user> (twitter/id "technomancy")
6264792
user> (twitter/name 6264792)
"technomancy"
user> (twitter/friends 6264792)
[5674672 796136 637533 627213 10718 5444392 780561 5502392 3468841
1438261 1140261 6826152 38353 12661 790205 713263 717233 22 616673
6128392 13607 7018192 2563881 7826762 7696262 9070452 3573501 1879351
670283 654653 18713 819302 1315011 309073 12290982 6087892 3560241
13856062 753783 7643652 9462972 11340982 752673 10453902 14106454
2049071 12973272 784519 14761655 14902503 14337307 3496901 9922972
14760739 4206131 13334762 8294212 14047163 15436765 15486900 937561
16160124 9267272 16474468 16380561 14740219 14466926 11182552 14860626
764124 127583 823615 14425248 2064111 18198861 9579412 18894748 643223
18956647 14071188 14184390 14640766 14676602 21439272 14766418 5156041
6149572 11999872 21373047 6108572 29779797 14162415 5378402 16142649
9891642 23094348]
user> (map twitter/name *1)
("indirect" "eventualbuddha" "coda" "amyhoy" "topfunky" "evanphx"
"technoweenie" "mojombo" "hasmanyjosh" "atmos" "court3nay"
"kevinclark" "wbruce" "therealadam" "chadfowler" "defunkt" "pjhyett"
"rabble" "takeo" "aniero" "hober" "dougalcorn" "malabooboo" "dgoodlad"
"watsonian" "jimweirich" "_why" "chneukirchen" "drbrain" "ntalbott"
"al3x" "rubyist" "objo" "bs" "jdhuntington" "kEND" "ezmobius"
"alexvollmer" "jicksta" "sfalcon" "bitsweat" "zefrank" "jeresig"
"jbarnette" "srbaker" "brynary" "nex3" "KirinDave" "tenderlove"
"travishume" "korbodo" "jackdanger" "vinbarnes" "evri" "peepcode"
"github" "diveintomark" "giessen" "gmoothart" "augiomentus" "jm"
"cohitre" "jmhodges" "technomommy" "JMNR" "amazonmp3" "mandanjim"
"abscondment" "Jeff_Overstreet" "rschroed" "chacon" "bleything"
"rickbradley" "20seven" "ShorelineBlog" "bil_kleb" "hudsonitetech"
"cooldude127" "jwhays" "ehanchrow" "stuarthalloway" "shoover"
"danlarkin" "chrishouser" "malki" "cgrand" "dysinger" "pauldwatson"
"jeskybera" "amitrathore" "raftas" "ryanqnorth" "mattrepl" "ctennis"
"mmcgrana" "clojurebot")

Note that calling twitter/name for each of those 96 user IDs takes
awhile and Twitter does have rate limits.

Example source:

(defn name
"Name of a user given user id."
[id]
(-> (twitter-request (str "/users/show.json?user_id=" id))
(get "screen_name")))

(defn friends
"IDs of a user's friends."
[id]
(twitter-request (str "/friends/ids.json?user_id=" id)))

-Matt

Reply all
Reply to author
Forward
0 new messages