sapphire-lang 0.7.0

Gradually typed scripting language where every value is an object and types are optional, checked at runtime
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Socket provides TCP client connections.
# Use Socket.connect(host, port) to open a connection, then call
# write, read_line, read_bytes, or read_all to exchange data, and
# close when done.
#
#   sock = Socket.connect("example.com", 80)
#   sock.write("GET / HTTP/1.0\r\nHost: example.com\r\n\r\n")
#   sock.read_line   # "HTTP/1.0 200 OK"
#   sock.read_all    # response body
#   sock.close
#
class Socket {
  attr fd
}