News for hackers. Stuff that matters.
Re:The Idea of Lisp by lispm on Saturday December 17, 2016 @04:29AM (#13199993)
> yet there is no standard way to open a TCP socket.

The 'standard way' to create a TCP client socket in Clojure:

    (java.net.Socket. ^String host (int port))
For the .net version:

    (System.Net.Sockets.TcpClient. ^String host (int port))
It directly calls the functionality from the platform it is hosted on.
Re:The Idea of Lisp by pjlegato on Friday December 30, 2016 @02:10PM (#13286488)
Yes. That's the point. The one standard way to open a TCP socket is with java.net.Socket.

Common Lisp, on the other hand, has no such standard way, as TCP was not common when it was designed. It relies on a hodgepodge of poorly documented third party libraries, or vendor-specific extensions to do this.

Clojure is, by definition, a JVM hosted language. The .net version is non-canonical.

Re:The Idea of Lisp by lispm on Friday December 30, 2016 @05:56PM (#13288247)
^> The one standard way to open a TCP socket is with java.net.Socket.

So Clojure the language has no documented standard way to open a socket. One has to use the host environment (JVM, .net, ...) interface to do so. It means also that Clojure/JVM source code trying to open a socket will not run on Clojure/CLR without changes.

That's not a 'standard'. It's the definition of 'implementation specific'.

That's different from SBCL, which has a documented and maintained way to create sockets, which works similar over all the platforms it runs on - natively.

http://www.sbcl.org/manual/#Networking

For a portable way to create sockets over many Common Lisp implementations use usocket:

https://common-lisp.net/project/usocket/