W3C home > Mailing lists > Public > public-rdfjs@w3.org > July 2014

Re: banana-rdf libs for scala-js

From: <henry.story@bblfish.net>
Date: Wed, 2 Jul 2014 15:10:10 +0200
Cc: public-rdfjs@w3.org
Message-Id: <9EA3317B-0C68-40F9-A66F-683E06D5870F@bblfish.net>
To: Ruben Verborgh <ruben.verborgh@ugent.be>

On 30 Jun 2014, at 11:27, Ruben Verborgh <ruben.verborgh@ugent.be> wrote:

> Hi Henry,
>> I want to make a port of banana-rdf's plantain implementation ( pure scala ) [1]  to scala-js [1].
> Great news!
>> What is the best JS URL class that can do relative URL
>> resolution, normalise urls etc for use in the browser?
> I recently saw https://github.com/Acubed/node-iri pass by on this list;
> however, I think that Node's url module does what you need:
> http://nodejs.org/api/url.html.
> Since you are looking for browser solutions,
> you might want to look at the browserified version of these libraries.
> (https://github.com/substack/node-browserify)
> In particular, the code for Node's module is here:
> https://github.com/joyent/node/blob/master/lib/url.js

Thanks. I tried a very initial mapping to scalajs of nodes' Uri class 
and put the code up on github here:


The main file is just this:


As you can see this is really just adding type annotations to JavaScript. Once that done, one can
then use the JS code in Scala without any efficiency loss. In short ScalaJS is just JS with a typesafe 
type system. This helps a lot as soon as you don't have complete overview of the libraries 
you are using ( and so on the whole with library development ).

Ok, I'll see if this helps me build a banana-rdf pure scala-js implementation of an the base 
RDF Classes.


> Best,
> Ruben

Social Web Architect
Received on Wednesday, 2 July 2014 13:18:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:48:21 UTC