agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
903 stars 47 forks source link

ADD Plantfarm example Issue #84 #287

Closed SignIn-SignUp closed 3 years ago

SignIn-SignUp commented 3 years ago

This commit adds the Plantfarm dir in examples containing:

agentm commented 3 years ago

This is great! Thanks for making this.

If you don't mind, I'll try replacing the python test script with some Haskell or a jq invocation.

SignIn-SignUp commented 3 years ago

That would be great. I didn't know about the existence of jq so thank you for that.

The main reason why I used the python script is because the json that is sent has string values containing '\n' for the "ascii-plants". I wasn't able to make it print the '\n' and make the "ascii-plants" look nice any other way. That's why I used a hacky python script.

I don't mind and actually would appreciate if you found a way to solve that more elegantly.

PS: Also mentioned as a comment. But the plant json that is sent can not be sent back to the application as is. The text and "ascii-plant" have to be removed from the value of stage i.e. {..."stage":"Seed",..}.