Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated library to use Link Grammar v5 #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updated library to use Link Grammar v5 #10

wants to merge 1 commit into from

Conversation

dijs
Copy link
Owner

@dijs dijs commented May 31, 2017

No description provided.

@dijs dijs mentioned this pull request May 31, 2017
@linas
Copy link

linas commented Jun 3, 2017

After a quick look -- I think its a mistake to copy the sources, and redistribute the data files. The language files are big, and new ones are coming .. Mandarin and Cantonese and French and revised English are being worked on, these will be distributed in SQL form; SQLite3 if you need them embedded.

My knee-jerk reaction is that its a better idea to take the JS bindings, only, and stick them into main link-grammar sources. That way, everyone who gets LG also gets the JS bindings. In particular, this makes them easier to find, and avoids the version skew.

@linas
Copy link

linas commented Jun 3, 2017

In fact, I'm confused... the ONLY file that has JS in it seems to be build/index.js which is autogenerated via cofeescript. All of the other files are a bulk copy of a subset of the LG distro.

@dijs
Copy link
Owner Author

dijs commented Jun 6, 2017

Yes, that is the case. I would not expect anyone one wants to use the NPM link-grammar library to download the main LG sources, build them and move them to the correct place for Javascript to find them. That is very cumbersome.

The only way I found to make it easy on JS developers was to build LG myself and throw in the compiled libs to interface with. The languages, same argument. I wouldn't expect devs to go find, download and copy over these files...

Can you think of a better way to deal with this problem?

@linas
Copy link

linas commented Jun 7, 2017

Ah. Well, I don't know how javascript developers work, but in other parts of the world, the source distribution, and the binary distribution are normally kept separate. So, perl has CPAN, python has eggs, linux has distros (apt, rpm, yast, etc.) So the typical developer searches for some string name e.g. apt-cache search foobar which lists every package containing the name foobar. Then apt-get describe will tell you what it is, and apt-get install will install it, all of it's dependencies, binary blobs, whatever. Similar for perl, python; even java now has something like this. I was pretty sure that javascript did too, but its been a while.

So, who builds these packages? well, the package maintainers do. They grab the source from somewhere (e.g. from github) build it, package it, create a package file that specifies any pre-reqs or co-reqs, and publish this ball of stuff on whatever server(s) maintain the distribution.

I suggest the same here. The javaascript sources should reside with all of teh other link-grammar sources, and the package maintainer would then build and publish the package, working from the source. That way, the users do not need to go to github to get anything: it all comes from the distro.

This also solves problems with needing to have different distros for different versions of windows, mac, linux: you don't have to worry about whether some guy wants a binary for winNT or OS9 or OSX or whatever: the package maintainer creates these. Meanwhile the user has a nice way of searching for and finding packages. It solves a lot of problems.

@linas
Copy link

linas commented Jun 7, 2017

Here: Yes, javascript does have a comprehensive archive registry (distro) tool, its called "npm". Read about it here:

https://www.npmjs.com/

https://en.wikipedia.org/wiki/Npm_(software)

So again, the right way to do things, it would seem to me, would be to put the javascript into the LG repo, then create an npm-style package, and publish that via npm. This solves a huge number of problems in one go.

@linas
Copy link

linas commented Nov 18, 2019

Please see this: opencog/link-grammar#1053

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants