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

Fix tethering inet bugs, introduce a few new nodes and five new chapters of tutorial #1998

Merged
merged 10 commits into from
Jul 9, 2020

Conversation

brusherru
Copy link
Contributor

This PR includes a lot of things. Probably better to divide it for a few commits, but then it blocks the main goal: create five new chapters of the tutorial, that really works :)

New library:

  • xod-cloud/basics, that has nodes to get a DateTime and external IP, using our httpbin API.

New nodes:

  • xod/stream/parse-u32 — to parse uint32 integers and returns as 4 bytes. Without this node parsing numbers such as a POSIX time has a big inaccuracy, because of converting to Float.
  • xod/stream/parse-number — actually parses a float from a string. Used in the cloud-number node.
  • xod-cloud/feeds/cloud-string — get a string from a feed
  • xod-cloud/feeds/cloud-number — get a number from a feed
  • xod-cloud/feeds/cloud-boolean — get a boolean from a feed
  • xod/datetime/from-posix — a new constructor
  • xod/datetime/to-posix — a new destructor

New chapters of the tutorial:

  • 013-custom-types — introduce to custom types using a datetime type
  • 014-internet — introduce to tethering-inet a receiving a current DateTime
  • 015-xod-cloud — introduce to XOD Cloud Feeds
  • 111-internet — rotating servo using the data from feeds and tethering internet
  • 112-standalone-internet — replacing tethering-inet with another internet provider node (probably should be renamed to something shorter)

Copy link
Contributor

@gabbapeople gabbapeople left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passed through the Grammarly

workspace/welcome-to-xod/013-custom-types/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/013-custom-types/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/014-internet/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/015-xod-cloud/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/015-xod-cloud/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/111-internet/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/111-internet/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/111-internet/patch.xodp Outdated Show resolved Hide resolved
Copy link
Contributor

@evgenykochetkov evgenykochetkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 015-xod-cloud example works kind of weird.

I attached a count with a watch to cloud-store's DONE output and run the simulations.
After 5 or 6 changes with the interval of about 20 seconds, the counter was incremented only once, and the feed shows only the first 3 values.

@evgenykochetkov
Copy link
Contributor

evgenykochetkov commented Jun 17, 2020

When running 014-internet, it shows
Screen Shot 2020-06-17 at 17 56 16
for about 15 seconds, which is a bit confusing.

I think that more visual feedback is required.
Maybe something like this?
Screen Shot 2020-06-17 at 18 02 13

@evgenykochetkov
Copy link
Contributor

It looks like xod-cloud/cloud-boolean-custom, xod-cloud/cloud-number-custom and xod-cloud/cloud-string-custom all share a large portion of implementation:
Screen Shot 2020-06-17 at 18 59 30
Maybe it should be abstracted into an utility node?

@brusherru brusherru force-pushed the feat-stdlib-and-tutorial-tethering branch 2 times, most recently from 8b34f9c to ed71507 Compare June 19, 2020 17:47
@brusherru brusherru force-pushed the feat-stdlib-and-tutorial-tethering branch from ed71507 to 7554dfd Compare June 26, 2020 13:22
Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyperlink UTM’s are missing

workspace/welcome-to-xod/014-internet/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/014-internet/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/015-xod-cloud/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/015-xod-cloud/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/111-internet/patch.xodp Outdated Show resolved Hide resolved
@brusherru brusherru force-pushed the feat-stdlib-and-tutorial-tethering branch from 7554dfd to b52c85b Compare June 29, 2020 17:14
@brusherru brusherru requested a review from nkrkv June 29, 2020 17:22
@brusherru
Copy link
Contributor Author

@nkrkv please, pay attention to the 111-internet, because I've changed it due to the requirement "The patch should be ready-to-go in its initial form".

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take two

workspace/welcome-to-xod/013-custom-types/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/013-custom-types/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/014-internet/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/014-internet/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/111-internet/patch.xodp Outdated Show resolved Hide resolved
workspace/welcome-to-xod/111-internet/patch.xodp Outdated Show resolved Hide resolved
@brusherru brusherru force-pushed the feat-stdlib-and-tutorial-tethering branch from b52c85b to 0a00a34 Compare July 1, 2020 15:02
@brusherru brusherru requested a review from nkrkv July 1, 2020 16:04
Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

I suggest one more structural change, though. Currently, if you get rid of numbers, here are chapters we get:

  • internet (uses XOD Cloud)
  • xod-cloud (talks about Feeds)
  • internet (duplicate name)
  • standalone-internet

Suggest making the difference apparent:

  • 014-internet-tethering
  • 015-xod-cloud-feeds
  • 111-feed-messaging
  • 112-standalone-internet

The H1 titles inside the chapters are better to match the filename.

Anther issue is with 014 chapter. You’re asking a user to “Place a tweak-pulse node” but it is there already. Suggest reverting the patch itself to the state whet INIT had Boot bound to it.

@brusherru brusherru force-pushed the feat-stdlib-and-tutorial-tethering branch from 0a00a34 to d622a43 Compare July 7, 2020 11:05
@brusherru brusherru requested a review from nkrkv July 7, 2020 11:05
Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo

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

Successfully merging this pull request may close these issues.

4 participants