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

Add net module, tests, and docs #686

Merged
merged 10 commits into from
Oct 31, 2023

Conversation

briandowns
Copy link
Contributor

@briandowns briandowns commented Oct 30, 2023

Add net module, tests, and docs

What's Changed:

Adds a new module called "Net" with a couple constants, and functions.

I was imagining the next iteration of this to be to move the Socket module into this module, in some capacity.

Type of Change:

  • Bug fix
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Housekeeping:

  • Tests have been updated to reflect the changes done within this PR (if applicable).
  • Documentation has been updated to reflect the changes done within this PR (if applicable).

Screenshots (If Applicable):

Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
@briandowns briandowns marked this pull request as ready for review October 30, 2023 17:02
@Jason2605
Copy link
Member

Yeah moving Socket into a more generic Net module probably makes more sense. Either that or you make separate ones for each (like Python does: https://docs.python.org/3/library/ipaddress.html / https://docs.python.org/3/library/socket.html)

@briandowns
Copy link
Contributor Author

I'll defer to your judgement on how you want to move forward. Adding Socket to Net had me start thinking about sub modules within a module and how that'd work from an implementation perspective and how it'd look from a language perspective. For the latter, I like any of the following but possibly the "/" most.

import Net:Socket
import Net/Socket

@Jason2605
Copy link
Member

Yeah submodules will be an interesting one, we can kind of do it at the moment with from (although only 1 layer deep).

The only other alternative we could potentially have is:

import Net.Socket;

Def worth a think on the best syntax for them

Copy link
Member

@Jason2605 Jason2605 left a comment

Choose a reason for hiding this comment

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

Couple of little ones

docs/docs/standard-lib/net.md Outdated Show resolved Hide resolved
docs/docs/standard-lib/net.md Outdated Show resolved Hide resolved
Signed-off-by: Brian Downs <[email protected]>
@briandowns briandowns requested a review from Jason2605 October 31, 2023 23:13
@Jason2605
Copy link
Member

Thanks for this!

I was thinking as well, I probably should have done it a while ago but I can send you an invite to the org if you'd like? You've done more than enough on the repo now to warrant it! Thank you very much!

@Jason2605 Jason2605 merged commit d6f7457 into dictu-lang:develop Oct 31, 2023
8 checks passed
@briandowns
Copy link
Contributor Author

Thanks for this!

I was thinking as well, I probably should have done it a while ago but I can send you an invite to the org if you'd like? You've done more than enough on the repo now to warrant it! Thank you very much!

Whatever works for you, works for me. :) Thanks!

@briandowns briandowns deleted the add_net_module branch October 31, 2023 23:19
This was referenced Oct 31, 2023
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

Successfully merging this pull request may close these issues.

2 participants