Skip to content

Instantly share code, notes, and snippets.

@wfarr
Created March 9, 2009 09:19
Show Gist options
  • Select an option

  • Save wfarr/76186 to your computer and use it in GitHub Desktop.

Select an option

Save wfarr/76186 to your computer and use it in GitHub Desktop.
;; works
(yql filter sampleQuery (yql desc flickr.places))
;; "select * from flickr.places where query=\"north beach\""
;; fails
(yql
filter item
(yql select title,pubDate rss (format "url='http://twitter.com/statuses/user_timeline/%s.rss'" "wfarr"))
)
;; error:
;; Debugger entered--Lisp error: (invalid-function ((pubDate . "Mon, 09 Mar 2009 07:48:12 +0000") (title . "wfarr: ROOF")))
;; (((pubDate . "Mon, 09 Mar 2009 07:48:12 +0000") (title . "wfarr: ROOF")) ((pubDate . "Mon, 09 Mar 2009 06:56:09 +0000") (title . "wfarr: Watching \"Super High Me\" with @petersantoro. It's interesting so far.")) ((pubDate . "Mon, 09 Mar 2009 05:32:53 +0000") (title . "wfarr: @disavian Fuckin' awesome!")) ((pubDate . "Mon, 09 Mar 2009 04:54:43 +0000") (title . "wfarr: Blog post on Hack Week: http://tinyurl.com/crdbsn")) ((pubDate . "Mon, 09 Mar 2009 02:29:53 +0000") (title . "wfarr: A cool Emacs color-theme based on my color-theme-tango-2: http://tinyurl.com/crey2q =)")) ((pubDate . "Mon, 09 Mar 2009 02:09:04 +0000") (title . "wfarr: @icwolf Steam is. The graphics card in my Macbook is not.")) ((pubDate . "Mon, 09 Mar 2009 02:05:52 +0000") (title . "wfarr: @icwolf I have it on the 360 like a person with a laptop as their primary computer ought to.")) ((pubDate . "Sun, 08 Mar 2009 21:24:31 +0000") (title . "wfarr: re:previous tweet, link: http://gist.github.com/75891")) ((pubDate . "Sun, 08 Mar 2009 21:24:23 +0000") (title . "wfarr: Making some good progress to make the yql macro in yql.el take in ascii rather than relying on the user to make strings.")) ((pubDate . "Sun, 08 Mar 2009 19:32:54 +0000") (title . "wfarr: @JoshJGT It's the Casio-ness of it that matters.")) ((pubDate . "Sun, 08 Mar 2009 19:30:17 +0000") (title . "wfarr: @JoshJGT Apparently my computer and cell phone auto-updated without effort. As did my watch (fuck yeah Casio).")) ((pubDate . "Sun, 08 Mar 2009 19:27:02 +0000") (title . "wfarr: @JoshJGT Er fuck, I don't think I've even set anything to DST yet.")) ((pubDate . "Sun, 08 Mar 2009 19:22:49 +0000") (title . "wfarr: Go to bed at 9, wake up at 3. Wow I was tired.")) ((pubDate . "Sun, 08 Mar 2009 01:42:07 +0000") (title . "wfarr: @skalnik Try it again. It's shaky, but I got it to work.")) ((pubDate . "Sun, 08 Mar 2009 01:18:41 +0000") (title . "wfarr: @skalnik These guys: http://mx2323.dyndns.org/2009hackdaygt3/2009hackdaygt/index.php")) ((pubDate . "Sun, 08 Mar 2009 00:27:16 +0000") (title . "wfarr: @JoshJGT In a toy script that I ran once. You proposed putting it in our production code for HackU. ;)")) ((pubDate . "Sun, 08 Mar 2009 00:25:52 +0000") (title . "wfarr: \"Perfectly fine == fault\". I'm glad someone else agrees!")) ((pubDate . "Sat, 07 Mar 2009 23:55:42 +0000") (title . "wfarr: @JoshJGT We kept the date stuff, but it no longer uses eval I think.")) ((pubDate . "Sat, 07 Mar 2009 23:49:59 +0000") (title . "wfarr: @disavian I shave every couple of months. I try to time it so I can make the person cutting my hair do it with the haircut.")) ((pubDate . "Sat, 07 Mar 2009 23:49:37 +0000") (title . "wfarr: @JoshJGT We pseudo-abandoned it anyway =p")))
;; (cond ((eq ... ...) (yql-desc "item" ...)) ((eq ... ...) (yql-select "item" ...)) ((eq ... ...) (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
;; (yql filter item (yql select title\,pubDate rss (format "url='http://twitter.com/statuses/user_timeline/%s.rss'" "wfarr")))
;; eval((yql filter item (yql select title\,pubDate rss (format "url='http://twitter.com/statuses/user_timeline/%s.rss'" "wfarr"))))
;; eval-last-sexp-1(t)
;; eval-last-sexp(t)
;; eval-print-last-sexp()
;; call-interactively(eval-print-last-sexp nil nil)
;; works
(yql-filter 'item
(yql select title,pubDate rss (format "url='http://twitter.com/statuses/user_timeline/%s.rss'" "wfarr"))
)
;; (((pubDate . "Mon, 09 Mar 2009 07:48:12 +0000") (title . "wfarr: ROOF")) ((pubDate . "Mon, 09 Mar 2009 06:56:09 +0000") (title . "wfarr: Watching \"Super High Me\" with @petersantoro. It's interesting so far.")) ((pubDate . "Mon, 09 Mar 2009 05:32:53 +0000") (title . "wfarr: @disavian Fuckin' awesome!")) ((pubDate . "Mon, 09 Mar 2009 04:54:43 +0000") (title . "wfarr: Blog post on Hack Week: http://tinyurl.com/crdbsn")) ((pubDate . "Mon, 09 Mar 2009 02:29:53 +0000") (title . "wfarr: A cool Emacs color-theme based on my color-theme-tango-2: http://tinyurl.com/crey2q =)")) ((pubDate . "Mon, 09 Mar 2009 02:09:04 +0000") (title . "wfarr: @icwolf Steam is. The graphics card in my Macbook is not.")) ((pubDate . "Mon, 09 Mar 2009 02:05:52 +0000") (title . "wfarr: @icwolf I have it on the 360 like a person with a laptop as their primary computer ought to.")) ((pubDate . "Sun, 08 Mar 2009 21:24:31 +0000") (title . "wfarr: re:previous tweet, link: http://gist.github.com/75891")) ((pubDate . "Sun, 08 Mar 2009 21:24:23 +0000") (title . "wfarr: Making some good progress to make the yql macro in yql.el take in ascii rather than relying on the user to make strings.")) ((pubDate . "Sun, 08 Mar 2009 19:32:54 +0000") (title . "wfarr: @JoshJGT It's the Casio-ness of it that matters.")) ((pubDate . "Sun, 08 Mar 2009 19:30:17 +0000") (title . "wfarr: @JoshJGT Apparently my computer and cell phone auto-updated without effort. As did my watch (fuck yeah Casio).")) ((pubDate . "Sun, 08 Mar 2009 19:27:02 +0000") (title . "wfarr: @JoshJGT Er fuck, I don't think I've even set anything to DST yet.")) ...)
;;works
(yql-filter "item"
(yql select title,pubDate rss (format "url='http://twitter.com/statuses/user_timeline/%s.rss'" "wfarr"))
)
;; (((pubDate . "Mon, 09 Mar 2009 07:48:12 +0000") (title . "wfarr: ROOF")) ((pubDate . "Mon, 09 Mar 2009 06:56:09 +0000") (title . "wfarr: Watching \"Super High Me\" with @petersantoro. It's interesting so far.")) ((pubDate . "Mon, 09 Mar 2009 05:32:53 +0000") (title . "wfarr: @disavian Fuckin' awesome!")) ((pubDate . "Mon, 09 Mar 2009 04:54:43 +0000") (title . "wfarr: Blog post on Hack Week: http://tinyurl.com/crdbsn")) ((pubDate . "Mon, 09 Mar 2009 02:29:53 +0000") (title . "wfarr: A cool Emacs color-theme based on my color-theme-tango-2: http://tinyurl.com/crey2q =)")) ((pubDate . "Mon, 09 Mar 2009 02:09:04 +0000") (title . "wfarr: @icwolf Steam is. The graphics card in my Macbook is not.")) ((pubDate . "Mon, 09 Mar 2009 02:05:52 +0000") (title . "wfarr: @icwolf I have it on the 360 like a person with a laptop as their primary computer ought to.")) ((pubDate . "Sun, 08 Mar 2009 21:24:31 +0000") (title . "wfarr: re:previous tweet, link: http://gist.github.com/75891")) ((pubDate . "Sun, 08 Mar 2009 21:24:23 +0000") (title . "wfarr: Making some good progress to make the yql macro in yql.el take in ascii rather than relying on the user to make strings.")) ((pubDate . "Sun, 08 Mar 2009 19:32:54 +0000") (title . "wfarr: @JoshJGT It's the Casio-ness of it that matters.")) ((pubDate . "Sun, 08 Mar 2009 19:30:17 +0000") (title . "wfarr: @JoshJGT Apparently my computer and cell phone auto-updated without effort. As did my watch (fuck yeah Casio).")) ((pubDate . "Sun, 08 Mar 2009 19:27:02 +0000") (title . "wfarr: @JoshJGT Er fuck, I don't think I've even set anything to DST yet.")) ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment