by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Martynas Jusevicius
@namedgraph_twitter
and the object now shows up fine :)
namedgraph_twitter @namedgraph_twitter hopes
Martynas Jusevicius
@namedgraph_twitter
@elf-pavlik it works with XSLT ;)
elf Pavlik
@elf-pavlik
:+1:
Austin Wright
@awwright
@retog I have not, I don't think that existed last time I surveyed the landscape
Pieter Colpaert
@pietercolpaert
Hi all, is there any reason why a RDFJS’s Literal value always is a JS string? E.g., why don’t we automatically cast xsd:double values to their equivalent in JavaScript?
Ruben Taelman
@rubensworks
Consistency I think. Making literal values have different datatypes would make it more difficult for using literals in an abstract way, and this would also introduce (sometimes unneeded) overhead in things like parsers.
A library that can convert literal values to raw JS values may be useful though :)
elf Pavlik
@elf-pavlik
I think https://w3c.github.io/json-ld-api/#data-round-tripping gives a decent starting point
Pieter Colpaert
@pietercolpaert
Makes sense! And indeed, a rdfjs literal caster as a separate library would make sense. Thanks @elf-pavlik for the pointer to how json-ld does it!
elf Pavlik
@elf-pavlik
Please keep us updated if you get started with a module doing that!
I recall long time ago doing something related to it for levelgraph-jsonld https://github.com/levelgraph/levelgraph-jsonld/blob/6f13bad27137b5364a466650ead8523b1c1afce0/index.js#L129
elf Pavlik
@elf-pavlik
Pieter Colpaert
@pietercolpaert
Thanks!
Thomas Bergwinkl
@bergos
@/all last chance to give feedback to the dataset spec: rdfjs/dataset-spec#48
elf Pavlik
@elf-pavlik
I can't think of a clear way of using transform streams, I see an example in https://github.com/rdf-ext/rdf-transform-triple-to-quad/blob/develop/index.js but it assumes node streams and not just subset required by RDFJS stream-spec
But lib that would take a Stream<Quad> , cast literals and return Stream<NativeQuad> (improvising here) could make sense
Thomas Bergwinkl
@bergos
about converting rdf data to js objects (not only literals). we are currently working on generic pipeline code where the pipeline, which is just node stream processing, is defined in rdf. we developed these packages as part of the project: https://github.com/zazuko/rdf-native-loader https://github.com/zazuko/rdf-native-loader-code
the native loader is just a generic registry. the code loader loads js code via file:// and node:// url or literals with a ecmascript datatype. using it for numbers would just require a different loader.
@elf-pavlik you are thinking of using a transform to convert quads to quads which have native types in the terms?
elf Pavlik
@elf-pavlik
thought just sparked by conversation above
Thomas Bergwinkl
@bergos
yes, i promise we add some docs, but we are right in the middle of the project.
and clownface will get a 1.0 version when the dataset spec is released on wednesday.
elf Pavlik
@elf-pavlik
nice, it looks like you keep the ball rolling!
elf-pavlik @elf-pavlik jumps back to https://valueflo.ws/
elf Pavlik
@elf-pavlik
@bergos will you have async version of clownface? i rolled up something similar in https://github.com/valueflows/vf-track-trace.ts/blob/master/index.ts#L34-L43 which eventually should work with TPF client and query store over the network
that code uses ES async iteration and for - await - of loop to traverse data
Thomas Bergwinkl
@bergos
@elf-pavlik i plan to add again support for the store interface in version 1.1, but i don't have a schedule for releases after 1.0 yet.
elf Pavlik
@elf-pavlik
thanks! I let myself to create issue to track it: rdf-ext/clownface#4
Blake Regalia
@blake-regalia
@pietercolpaert graphy does this by default for XSD datatype-specific values like you mentioned, for example, parsing "42"^^xsd:integer from a Turtle document yields a Literal_Integer, and the numeric value is available as term.number while the string remains at term.value
elf Pavlik
@elf-pavlik
@blake-regalia could you please paste a link to the code in graphy which handles that casting?
Blake Regalia
@blake-regalia
@elf-pavlik actually I recall now it only applies to syntactic numerals e.g., 42 or 3.14159 so that it doesn't have to handle parsing errors; numeric_literal()
elf Pavlik
@elf-pavlik
thanks!
Pieter Colpaert
@pietercolpaert
@blake-regalia I never checked out graphy before (now I did). Cool stuff! Plays well together with ldfetch too :)
elf Pavlik
@elf-pavlik
@rubensworks @RubenVerborgh @bergos @jacoscaz have any of you tried to implement RDFJS Source interface on top of TPF client ? I would find it useful to have possibility in applications to use instance of RDFJS Source exposing dataset on remote TPF server.
Ruben Taelman
@rubensworks
No, but it should be trivial to implement that using Comunica though, as that already returns RDFJS-compliant streams for any SPARQL query. So you could just feed it a simple triple pattern query.
dwhitney
@dwhitney
anybody know of a set of generic SPARQL queries I can use to validate SHACL shapes?
I'm using the topbraid shacl-js library. It's a bit buggy and quite slow.
dwhitney
@dwhitney
I take it back - after some bench marking shacl-js is pretty fast. It does silently fail when I send it invalid RDF, but I can handle that for now
Martynas Jusevicius
@namedgraph_twitter
Pieter Colpaert
@pietercolpaert
https://github.com/rdfjs/fetch-lite @bergos Any why this is not published on NPM?
Thomas Bergwinkl
@bergos
@pietercolpaert was waiting for the dataset spec
so it should be soon released
Pieter Colpaert
@pietercolpaert
Ok! Thanks!
Thomas Bergwinkl
@bergos
@/all i've upgraded the rdf-body-parser package, which was actually already more then a body-parser, as it also handles sending responses. the new name is now express-handler and i put it already into the rdfjs org. it still has a rdf-ext dependency, as it relies on the .import() and .toStream() methods of the dataset. in all other packages of the rdfjs i have only rdfjs dependencies, if a rdf related package is required. anyway i would like to release it already in the rdfjs org as it will use the rdfjs dataset once we finished the rest of the dataset spec and it don't want to create packages, which are maintained only temporary and requires people to change the dependency. any concerns? and here is the package: https://github.com/rdfjs/express-handler
elf Pavlik
@elf-pavlik
:+1:
Sarven Capadisli
@csarven
@bergos npm rdf-body-parser stays as is however right?
Thomas Bergwinkl
@bergos
yes, it will stay. i think there is not even an option to unpublish it. maybe i can update the readme, pointing to the new package.