Analysis of Hexstream's modus operandi in the Common Lisp community
So, after about three months of silence, Hexstream decided to strike yet again.
UPDATE: See the second part, Analysis of Hexstream's modus operandi in the Common Lisp community.
This is a copy of the post from the locked issue https://github.com/cl-library-docs/common-lisp-libraries/issues/3#issuecomment-732563750 made available as a separate gist for clarity and posterity.
|;; Do not use - a proper fix was committed into my fork at phoe-trash/ccl.|
|(- 2 ccl::ieee-single-float-bias ccl::ieee-single-float-digits))|
|(- 2 ccl::ieee-double-float-bias ccl::ieee-double-float-digits))|
|;; TODO: maybe-inline %flonum-to-digits, we don't need the indirection|
|(declaim (inline %flonum-to-digits))|
|(defun %flonum-to-digits (char-fun|
So recently a
religious debate intense discussion happened on
#lisp about whether the following form:
;; Form 1 (loop for i from 1 to 5 finally (return i))
6 (or, in other words,
(1+ 5) - this notation is important as it will be used later).
I argue that it is invalid for it to return
5 must be returned instead.
|;; modified from pzmq examples|
|(defun hwclient (&optional (server-address "tcp://localhost:5555"))|
|"Translation of http://zguide.zeromq.org/c:hwclient updated for ZMQ 3.|
|Includes some parameters in with-* macros to demonstrate syntax."|
|(pzmq:with-context (ctx :max-sockets 10)|
|(pzmq:with-socket (requester ctx) (:dealer :affinity 3 :linger 100)|
|;; linger is important in case of (keyboard) interrupt;|
|;; see http://api.zeromq.org/3-3:zmq-ctx-destroy|
|(pzmq:connect requester server-address)|
|(defun ssl-connect () ;; this is a god damn hack|
|(let* ((socket (usocket:socket-connect "lightbringer.furcadia.com" 80))|
|(stream (usocket:socket-stream socket)))|
|(loop while (listen stream)|
|for line = (read-line stream nil stream)|
|until (eq line stream)|
|do (format t "S> ~A~%" line))|
|(format t "C> ~A~%" "starttls")|
|(format stream "starttls~C~C" #\Return #\Linefeed)|