Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
bblfish
@bblfish:matrix.org
[m]
Is there an advantage to that?
bblfish
@bblfish:matrix.org
[m]
It seems like a disadvantage is that it may allow a statemetn to be placed in any of the slots.
peeja
@peeja:matrix.org
[m]
I think that's legal, in RDF-Star
bblfish
@bblfish:matrix.org
[m]
Mhh. I need to read up on that.
bblfish
@bblfish:matrix.org
[m]
I have an implementation in Scala of the data-model-spec https://github.com/bblfish/rdf.scala.js
bblfish
@bblfish:matrix.org
[m]
just wondering: would it not have been better to use Symbols instead of Strings for the types "NamedNode", "Quad", etc...?
1 reply
bblfish
@bblfish:matrix.org
[m]
Ah perhaps they are only out with ECMAScript 6...
bblfish
@bblfish:matrix.org
[m]
Ah thank peeja . I was thinking perhaps they would use less memory and lookup would be faster. Here I was thinking symbols might be interpreted into an Integer in the background so that it could be a simple switch to choose one.
But I don't really know how JS compilers function
peeja
@peeja:matrix.org
[m]
Ah, no, I don't think you get that kind of effect like "symbols" in some languages
But also: strings in JS are immutable (one of the few things like that JS got right from the beginning 😛) so strings work pretty well for APIs
Symbols are mainly useful when you have a library that wants to annotate an object it doesn't "own" by attaching extra stuff on a key that can't clash with anything else
bblfish
@bblfish:matrix.org
[m]
yes. that is good that they are immutable. It's just one would like a type comparison to be a 1 operation, not require checking all the chars in the string.
peeja
@peeja:matrix.org
[m]
I don't think it does; they're immutable, so I assume they're hashed at instantiation. I don't actually know, but given they could be, I'd hope they are
bblfish
@bblfish:matrix.org
[m]
mhh. Hashes help to show two strings are different, not that they are the same. So it's good to find a position in a HashMap. Then one usually has to check the strings in the bucket as there can be hash collisions.
peeja
@peeja:matrix.org
[m]
That's true, but we're talking about trivially short strings. Don't name your types using the Bee Movie script, and you shouldn't notice a performance difference.
bblfish
@bblfish:matrix.org
[m]
:-) ok . But lot of little things can add up. Not a big deal....
peeja
@peeja:matrix.org
[m]
They can, but there are other little things too, so it's really a matter of scale. As I understand it, this kind of string comparison is so well optimized in JS that, in processing lots of data, other stuff will be way more significant than these operations.
Tomasz Pluskiewicz
@tpluscode
@blake-regalia is v5 of graphy published anywhere for installation?
Blake Regalia
@blake-regalia
not yet :/ still working on getting alpha release out - adding typings to the whole project has incurred lots of refactoring lol
i'm currently thinking about focussing on just getting out some of the modules that have less inter-dependencies as pre-alpha rather than holding up the release
so for example, the turle and trig readers/loaders, writers, and core
Tomasz Pluskiewicz
@tpluscode
that would be nice. I wanted to try the whatwg stream support :pray:
Tomasz Pluskiewicz
@tpluscode
here's an idea. instead of relying on parsers for dereferencing static RDF in browsers, I just thought that maybe we could have a RDF/JS CDN?
2 replies
Jesse Wright
@jeswr
Is there a utility package out there that contains a function that checks if a BaseQuad is a Quad? It feels like it is a somewhat common check.
Tomasz Pluskiewicz
@tpluscode
I shouldn't think so. I don't think I have ever used BaseQuad directly and most types are generic so that you typically have smth like interface Foo<Q extends BaseQuad = Quad>
and potentially make it more specialized like rdf-ext has DatasetCore<QuadExt>
Eric Prud'hommeaux
@ericprud
what's thre recommendation for an in-memory graph store which supports SPARQL Update?
(in {java,type}script)
Thomas Tanon
@Tpt
[Self promotion]. It you are ok with unstable stuff, Oxigraph can be compiled to WASM and supports both SPARQL query and update: https://www.npmjs.com/package/oxigraph
conversions between JS and Rust compiled in WASM are a bit slow but SPARQL parsing and evaluation are very fast.
To stay in the JS/TS world, communica now implements SPARQL update: https://comunica.dev/docs/query/advanced/rdfjs_updating/
Tomasz Pluskiewicz
@tpluscode
Hello everyone. Are you using webpack for you apps? You might like webpack-loader-rdf which will let you statically import and bundle RDF in you apps without the need for runtime parsers
Tomasz Pluskiewicz
@tpluscode
@jeswr you around?
I reconsidered my suggestions of the @rdfjs/data-model types and I think we can meet in the middle
Jesse Wright
@jeswr
@tpluscode - thanks for the reviews, I applied updates based on the reconsidered suggestions and it should be ready to aapprove
Tomasz Pluskiewicz
@tpluscode
I think we're good and now need to wait for DT maintainer
Jesse Wright
@jeswr
As part of a project I'm working on - I'm trying to transpile some reasoning engines written in Java on top of the owlapi into rdfjs compliant typescript projects. Has anyone here tried to do this kind of thing before - or know of any stable tooling to convert projects from java to typescript (I've tried quite a few different tools but all seem to be unmaintained these days).
Tomasz Pluskiewicz
@tpluscode
sounds fun :D
Martynas Jusevicius
@namedgraph_twitter
1 reply
Adrian Gschwend
@ktk
I notice we don't link to the gitter from rdf.js.org, could we add a button somewhere?
it's the goto link I give to people so would be nice if they could find it from there
Jacopo Scazzosi
@jacoscaz
@ktk ya, I think that would be a good idea
Tomasz Pluskiewicz
@tpluscode
hi @rubensworks. I noticed that jsonld streaming parser defaults to processing mode 1.0. why not 1.1? is there some potential incompatibility if we choose to use 1.1 as default?
Ruben Taelman
@rubensworks
Tomasz Pluskiewicz
@tpluscode
or did I? 🤔
Ruben Taelman
@rubensworks
Oops, looks like the README is wrong
Default is 1.1 :)
Tomasz Pluskiewicz
@tpluscode
👍