Is writing two wordpress plugins the best approach to achieve what we need?, or can you think of a better way of doing these two tasks?
1. One that would take NetLogo code as text and would format it exactly as it looks in NetLogo, including colours (like in the "NetLogo Code" tab of NetLogoWeb)
2. Another one that allows running NetLogo models within Wordpress. (Presumably this could be done with an iframe, but we're looking for something more efficient and better integrated within wordpress).
--
You received this message because you are subscribed to the Google Groups "netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-deve...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The main issue is that -ideally- we would like the e-book to be as self-contained as possible
1. Regarding the colouring of code: The javascript library, or to have a method that, in the end, produces "a string of raw HTML" (potentially with a CSS, if that is easier for you), so the colouring of code does not depend on external websites.
2. Regarding running NetLogo models: To have a NetLogo engine inside the book, so everything works even if NetLogo changes too much for our code. (And potentially be able to change the css of NetLogoWeb slightly, to make running models fit better with the rest of the e-book, e.g. fig.1 at http://ccl.northwestern.edu/2016/WeintropEtAlConstructionism2016-1.pdf)
ISSUE: patterns of the kind *keyword are unduly (partially) colored EXAMPLES: let mate let colored let myword let my-neighbors to update-color ISSUE: "Less than" (<) is converted into < (and everything after ; is colored like a comment) EXAMPLE: if (random-float 1 < prob-revision) [update-strategy] ISSUE: Same as above, but with "More than, >" (>), "More than or equal to, >=" (>=), and "Less than or equal to, <=" (<=) EXAMPLE: if ([payoff] of target) > payoff [ ISSUE: ifelse-value not colored properly ISSUE: patch-set not colored properly ISSUE: turtle-set not colored properly
2. Regarding running NetLogo models: To have a NetLogo engine inside the book, so everything works even if NetLogo changes too much for our code. (And potentially be able to change the css of NetLogoWeb slightly, to make running models fit better with the rest of the e-book, e.g. fig.1 at http://ccl.northwestern.edu/2016/WeintropEtAlConstructionism2016-1.pdf)Okay, got it. Do you already know all of the models you want to use? I primarily ask because I want to know if NetLogo Web can already do everything you want to be able to do in your book, or if it makes sense to hold off on this plugin until some feature or another is implemented.
Given this, I guess the best way to proceed is:
1. To post these issues in https://github.com/NetLogo/Galapagos/issues
2. To wait a little bit for these to be solved.
Is that what we should do?
With #1 (`read-from-string` support), it's not hugely far off from being implemented, but it's also not hugely close. It's definitely something that's on my radar and that I have made a lot of progress on, but I would guess that it's at least one month away, probably a bit more than that.
Regarding #2 (`no-display`), yeah, that one's a long ways off. `display` and its ilk are a huge pain to implement correctly in the browser. We want to implement them, but it's going to be a bit. With primitives like `display`, I find that the they can usually be worked around with the stuff in NLW that currently functions, but I'd need to see the model in order to say for sure, one way or another.
With #3 (the stacked bar charts), I don't plan to make your current code for that compatible with the plotting functionality in NetLogo Web. While having stacked bar charts is an undeniably useful thing, your version of them in NetLogo is achieved by doing some very non-standard stuff in desktop NetLogo, which the plotting library we're using in NLW doesn't understand. However, that library does know how to handle proper stacked bar charts, so we could talk at some point about how we modify your web-based models to tap into the proper functionality instead.
Regarding the bug reported in #5, that was because `extract-rgb`, `extract-hsb`, `scale-color`, and `shade-of?` weren't wrapping their color arguments to keep them within [0, 140), so it broke when it got color number that was `145`.
Thank you for bringing both of those issues to my attention.
if there's a simple way to switch off the view in NLW from the code, we'd love to know.
Also, if you can think of a more standard way of doing stacked bar charts in NetLogo Desktop (ideally compatible with NLW), we'd love to hear about it. I cannot think of a simpler way to implement them.
We keep on seeing silly-looking inputs in the current netlogoweb.org, though (for instance, in the same model that was causing the issues with the wrapping color arguments).