mcsoto / logicjs Goto Github PK
View Code? Open in Web Editor NEWLogic programming for JavaScript.
License: MIT License
Logic programming for JavaScript.
License: MIT License
Hi—I'm interested in using this project in a different, MIT-licensed library.
I don't see a license specified anywhere in this repo or in the source code. Have you guys settled on a license? If so, can you please specify it in a LICENSE file or in source code headers? I'd really like to be able to use this project but am unable to without an explicit license.
If MIT is a good fit for you, here's a LICENSE.md that you could create:
Copyright (c) 2015 @mcsoto \<https://github.com/mcsoto\>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
I really dig this package -- what if we could use this library for pattern matching in JS via a babel plugin?! Have you put any thought into this? That could be really really cool.
Hi,
I'd like to use this lib as a basis for a logic database. The logic.or
function calls itself repeatedly when I use the lib as shown in the doc. As it is today, I'm not able to use a goal with more than 200 OR'ed subgoals.
Is there a workaround to avoid recursion, maybe streams or async or anything else?
Hi, just as a follow up question - I was wondering how javascript arrays might be transformed into the list structure required for the queries.
The library supports primitive goals such as and
, or
& eq
. But does it support the not
primitive goal?
It would be a lot easier if I could install this using NPM.
If you are not familiar with how to publish to NPM read this
Hello mcsoto, I made a project using your library. You can see it here:
https://github.com/Goom11/SidewaysMath/
it runs here: https://goom11.github.io/SidewaysMath/
it solves math puzzles like this:
EGG
+EGG
----
PAGE
where each character represents a digit and the digits must be unique (the solver does not actually check uniqueness)
I'd love it if you have the bandwidth if you could look at my code and see if I utilized your project correctly or if I could have done anything differently. If not, no worries.
Had a lot of fun with this project.
If this project is published on NPM it reduces the friction of using it in other projects :)
Hey there,
first of all, thank you for your wonderful library!
I wanted to use it in my Svelte/Rollup based application and faced some problems with JavaScript strict mode
and module import
/export
. As a result, I created a fork of this repo that supports ES6 modules at LogicJS-ES6. I would not recommend a merge though because that would break CommonJS compatibility. Just wanted to leave this here for everybody facing the same problem.
Keep up the good work.
@stromhalm
Hi, I just happened to have stumbled on this repo, and this seems very nice. I was just wondering if there might be support for recursion here, and if so, if there may be any caveats, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.