Skip to content

Instantly share code, notes, and snippets.

View retornam's full-sized avatar
🎯
Focusing

retornam retornam

🎯
Focusing
View GitHub Profile
#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
int main()
{
(-> "http://clojure-log.n01se.net/" java.net.URL. html-resource
(select {[:#main [:p (has [:b])]] [:#main [:p (right (has [:b]))]]})
(let-select [[nick] [:b]
says [:p :> (but-node #{whitespace :b [:a first-of-type]})]]
[(text nick) (apply str (texts says))]))
(comment Sample output
(["bradbeveridge: " "is Java's ZipInputStream really slow, or am I using it wrong?\n clojurebot: pastebin?\n"]
["clojurebot: " "excusez-moi\n"]
["bradbeveridge: " "http://clojure.pastebin.com/zR9di5K0"]