dedbox
2017-12-14 18:27:52

@notjack axon/net2 updated with host supertype and string<->foo API


dedbox
2017-12-14 18:28:08

the code keeps getting cleaner and tighter


dedbox
2017-12-14 18:28:39

No fuss on the axon side


dedbox
2017-12-14 18:29:22

racket@data.rkt> (string->authority "localhost:345") (authority (dns "localhost") 345) racket@data.rkt> (string->authority "192.168.1.234:345") (authority (ip4 #"\300\250\1\352") 345) racket@data.rkt> (string->authority "[::1]:345") (authority (ip6 #"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1") 345) racket@data.rkt> (string->authority "[::]:345") (authority (ip6 #"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") 345) racket@data.rkt> (string->authority "[::]") (authority (ip6 #"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") #f) racket@data.rkt> (string->authority "::") uncaught exception: 'AUTHORITY-SYNTAX


dedbox
2017-12-14 18:31:46

The dns host type remains a stub (boxed string)


dedbox
2017-12-14 18:32:56

On the axon side, I’m using string->authority, host->string, authority-host and `authority-port.


dedbox
2017-12-14 18:35:47

I get the feeling it could be using URIs, instead. Is there a scheme type for basic TCP connections? Is a TCP connection endpoint considered an identifiable resource?


dedbox
2017-12-14 18:40:31

<tcp://localhost:3600>


dedbox
2017-12-14 18:40:42

tcp://[::]:3600


dedbox
2017-12-14 19:45:07

Well, IANA scheme registry has no entry for tcp. Google returns some vendor-specific stuff, not so useful.


notjack
2017-12-14 20:58:42

@dedbox re: axon cleanliness - fantastic, that means the choice of data structures for net2 is headed in the right direction re: scheme types for TCP - there isn’t a scheme for it because there is no notion of “resources” in TCP, there are only bytes sent and received with no inherent meaning given to them by TCP itself


notjack
2017-12-14 20:59:58

so there’s no way to determine what to do differently for URLs like <tcp://example.com/foo>, <tcp://example.com/bar>, and <tcp://example.com/baz?blah#whizbang>


notjack
2017-12-14 21:00:36

according to the spec those should all be different resources, but how do you send the resource path over TCP? TCP doesn’t define any way to do that because it doesn’t operate at the level of resources at all


dedbox
2017-12-14 23:13:34

Ok. URIs are so much more deliberately designed than I realized.


notjack
2017-12-14 23:19:24

I had the same experience when I started digging into this stuff too :) it’s amazing how much consideration and useful design work went into them


notjack
2017-12-15 07:12:05

@dedbox status: I’m working on some concurrency utilities (including the ones mentioned in #general the other day) in hopes of adapting the disposable interface to use synchronizable events. This has the upshot of making sure I understand concurrent ML well enough to pick the right APIs for connectors and listeners. The utilities include a bunch of documentation that should (hopefully) help you, me, and future net2 users / contributors understand how the async IO part of it works.