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

we plan to make a new branch of nools #211

Open
taoqf opened this issue Oct 27, 2016 · 17 comments
Open

we plan to make a new branch of nools #211

taoqf opened this issue Oct 27, 2016 · 17 comments

Comments

@taoqf
Copy link

taoqf commented Oct 27, 2016

We have started a new branch of nools nools-ts which is written in Typescript and most of the code come from here.
But I have got some problem when building the agenda. Anyone could help me out?
Out targe is using nools in modern browsers with less code and less time, maybe we could prebuild the retetree, which i think would save some time in downloading and runtime.
@doug-martin @markbjerke

@taoqf
Copy link
Author

taoqf commented Nov 4, 2016

Could anyone help fix this?

@taoqf
Copy link
Author

taoqf commented Nov 4, 2016

@DevSide Can you help me out?

@DevSide
Copy link
Collaborator

DevSide commented Nov 4, 2016

Hi @taoqf, TypeScript is a good choice for nools. Your repo is not a real branch of nools so every commit we make on master will be hard to apply on your project. What is the commit (sha) where you started it from ? I gonna take a look but i'm a beginner in TypeScript 😄

@DevSide
Copy link
Collaborator

DevSide commented Nov 4, 2016

I compiled your code using gulp, your test.js seems to work, could you write a test which failed for your problem ?

@taoqf
Copy link
Author

taoqf commented Nov 7, 2016

test added. @DevSide

@DevSide
Copy link
Collaborator

DevSide commented Nov 7, 2016

So constraints is always an array because of this line https://github.com/taoqf/nools-ts/blob/d793d40fd6f52a3179aa4e07f26011e429fdcfcd/src/parser/tokens.ts#L46, all tests passes on nools without this block if (!l) { constraints = ["true"]; }. You can remove it from your code

@taoqf
Copy link
Author

taoqf commented Nov 8, 2016

Thanks @DevSide , I tested nools and removed the code

        // if (!l) {
        //     constraints = ["true"];
        // }

,the exception is gone, but I didn't see the output which i put into `then', and this is not like the behaviour of drools.
By the way, I found a InitialFact is asserted into workingmemory, and I guess it is used for this situation, am I right?

@taoqf
Copy link
Author

taoqf commented Nov 14, 2016

I fixed this. nools-ts

@taoqf
Copy link
Author

taoqf commented Nov 24, 2016

I've added some tests in the readme, and publish already. and I think noos-ts, can be running just like nools now.
try this
npm install nools-ts --save

@taoqf
Copy link
Author

taoqf commented Nov 25, 2016

Any one help to write the grammar?
nools-ts
grammar.ts

@taoqf
Copy link
Author

taoqf commented Nov 29, 2016

I have gaven it up. to rewrite the grammar cause I find it is very hard to match then.

@foxever
Copy link

foxever commented Nov 29, 2016

@taoqf, maybe you can try to embed a jison ecma grammar parser in then part parsing

@taoqf
Copy link
Author

taoqf commented Nov 30, 2016

@foxever, right, when I get time, I will try it later.

@taoqf
Copy link
Author

taoqf commented Dec 14, 2016

nools-ts finished, but I can not explain why it's slower test1 test2 test3
But WHY?
I wish it could become faster since i have compiled the rules, any idea? @DevSide @foxever @doug-martin @markbjerke

@taoqf
Copy link
Author

taoqf commented Dec 15, 2016

I think I have the solution. I changed the rules here. thank you all. I will close this issue now.

@taoqf taoqf closed this as completed Dec 15, 2016
@taoqf
Copy link
Author

taoqf commented Dec 15, 2016

I think maybe someone want to see this.

@taoqf taoqf reopened this Dec 15, 2016
@taoqf
Copy link
Author

taoqf commented Jan 11, 2017

Fibonacci

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

No branches or pull requests

3 participants