all repos — min @ 5c59b795fbb3d5b65a7e244e8744a09f3e8465de

A small but practical concatenative programming language.

Moved socket constructors to prelude.
h3rald h3rald@h3rald.com
Sat, 18 Jun 2016 19:20:23 +0200
commit

5c59b795fbb3d5b65a7e244e8744a09f3e8465de

parent

b3b7d795372bfe23288c8a88461591450f6bad68

2 files changed, 6 insertions(+), 12 deletions(-)

jump to
M lib/min_net.nimlib/min_net.nim

@@ -51,18 +51,6 @@ q.scope.symbols["domain"] = proc (i:In) =

i.push vals[0].symVal.newVal i.push @[q] - .symbol("tcp-socket") do (i: In): - i.eval("(ipv4 stream tcp) net %open-socket") - - .symbol("udp-socket") do (i: In): - i.eval("(ipv4 dgram udp) net %open-socket") - - .symbol("tcp6-socket") do (i: In): - i.eval("(ipv6 stream tcp) net %open-socket") - - .symbol("udp6-socket") do (i: In): - i.eval("(ipv6 dgram udp) net %open-socket") - .symbol("close-socket") do (i: In): var q: MinValue i.reqObject "socket", q
M lib/prelude.minlib/prelude.min

@@ -78,3 +78,9 @@ (print pop) :print!

(put pop) :put! (:ms :q :check (check) (ms sleep q) while) :interval +; Socket constructors +((ipv4 stream tcp) socket) :tcp-socket +((ipv6 stream tcp) socket) :tcp6-socket +((ipv4 dgram tcp) socket) :udp-socket +((ipv6 dgram tcp) socket) :udp6-socket +