Here is a basic example which asks wikidata for some information about Britney Spears' Blackout album:
var wq = query.connect('ldf:http://data.wikidataldf.com/wikidata', ns);
var result = wq.query("wikidata:Q192755", {
id: "@id",
### Keybase proof | |
I hereby claim: | |
* I am warpr on github. | |
* I am kuno (https://keybase.io/kuno) on keybase. | |
* I have a public key whose fingerprint is CD8B DEB7 DB1D F510 E63F E870 E5DF CA41 E61D 71C9 | |
To claim this, I am signing this object: |
_ = require('underscore'); | |
var commonPrefix = function(l) { | |
return _(l).reduce(function (memo, item) { | |
if (!memo) { | |
return item; | |
} | |
var prefix = []; |
12:24 warp@bullet-bill:~$ cabal update && cabal install digestive-functors-aeson | |
Downloading the latest package list from hackage.haskell.org | |
Resolving dependencies... | |
Downloading aeson-lens-0.4.0.1... | |
Configuring aeson-lens-0.4.0.1... | |
Building aeson-lens-0.4.0.1... | |
Preprocessing library aeson-lens-0.4.0.1... | |
[1 of 1] Compiling Data.Aeson.Lens ( Data/Aeson/Lens.hs, dist/build/Data/Aeson/Lens.o ) | |
[1 of 1] Compiling Data.Aeson.Lens ( Data/Aeson/Lens.hs, dist/build/Data/Aeson/Lens.p_o ) | |
Registering aeson-lens-0.4.0.1... |
21:09 warp@bullet-bill:~/code/t$ node --version | |
v0.8.14 | |
21:09 warp@bullet-bill:~/code/t$ npm install follow-redirects | |
npm http GET https://registry.npmjs.org/follow-redirects | |
npm http 200 https://registry.npmjs.org/follow-redirects | |
npm http GET https://registry.npmjs.org/follow-redirects/-/follow-redirects-0.0.2.tgz | |
npm http 200 https://registry.npmjs.org/follow-redirects/-/follow-redirects-0.0.2.tgz | |
npm http GET https://registry.npmjs.org/underscore | |
npm http 304 https://registry.npmjs.org/underscore | |
follow-redirects@0.0.2 node_modules/follow-redirects |
14:34 warp@bullet-bill:~/code/musicbrainz-data-service/musicbrainz-data ((e41f827...))$ cabal configure | |
Resolving dependencies... | |
Configuring musicbrainz-data-0.0.1... | |
14:36 warp@bullet-bill:~/code/musicbrainz-data-service/musicbrainz-data ((e41f827...))$ cabal install | |
Resolving dependencies... | |
In order, the following will be installed: | |
musicbrainz-data-0.0.1 (reinstall) | |
Warning: Note that reinstalls are always dangerous. Continuing anyway... | |
Configuring musicbrainz-data-0.0.1... | |
Building musicbrainz-data-0.0.1... |
14:29 warp@bullet-bill:~/code/musicbrainz-data-service (master)$ cabal build | |
Building musicbrainz-data-service-0.1.0.0... | |
Preprocessing executable 'musicbrainz-data-service' for | |
musicbrainz-data-service-0.1.0.0... | |
[1 of 7] Compiling MusicBrainz.API.JSON ( src/MusicBrainz/API/JSON.hs, dist/build/musicbrainz-data-service/musicbrainz-data-service-tmp/MusicBrainz/API/JSON.o ) | |
src/MusicBrainz/API/JSON.hs:73:21: Not in scope: `dereference' | |
src/MusicBrainz/API/JSON.hs:78:21: Not in scope: `dereference' |
14:33 warp@bullet-bill:~/code/musicbrainz-data-service/musicbrainz-data ((e41f827...))$ cabal configure --enable-tests | |
Resolving dependencies... | |
Configuring musicbrainz-data-0.0.1... | |
Warning: This package indirectly depends on multiple versions of the same | |
package. This is highly likely to cause a compile failure. | |
package regex-base-0.93.2 requires mtl-2.0.1.0 | |
package parsec-3.1.3 requires mtl-2.1.2 | |
package musicbrainz-data-0.0.1 requires mtl-2.1.2 | |
package lens-3.3 requires mtl-2.1.2 | |
package comonads-fd-3.0 requires mtl-2.1.2 |
14:58 warp@bullet-bill:~/code/musicbrainz-data-service (master)$ cabal configure --enable-tests | |
Resolving dependencies... | |
Configuring musicbrainz-data-service-0.1.0.0... | |
Warning: This package indirectly depends on multiple versions of the same | |
package. This is highly likely to cause a compile failure. | |
package regex-base-0.93.2 requires mtl-2.0.1.0 | |
package snap-server-0.9.2.4 requires mtl-2.1.2 | |
package snap-core-0.9.2.2 requires mtl-2.1.2 | |
package snap-0.9.2.2 requires mtl-2.1.2 | |
package parsec-3.1.3 requires mtl-2.1.2 |
17:38 warp@bullet-bill:~/code/musicbrainz-data (master)$ psql -U root musicbrainz_nes --command='DROP SCHEMA musicbrainz CASCADE;' > /dev/null | |
NOTICE: drop cascades to 144 other objects | |
DETAIL: drop cascades to type musicbrainz.comment | |
drop cascades to type musicbrainz.cover_art_presence | |
drop cascades to type musicbrainz.ipi | |
drop cascades to type musicbrainz.isrc_t | |
drop cascades to type musicbrainz.iswc_t | |
drop cascades to type musicbrainz.label_code | |
drop cascades to type musicbrainz.locale | |
drop cascades to type musicbrainz.natural_integer |