Tags » Common Lisp

Thoughts on C++ and Common Lisp

I haven’t used C++ for a while, and haven’t looked closely at the new standard. I’ve remained curious about it though, and this article comparing programming style between C++ (especially templated programming) and Common Lisp is great. 36 more words

C++

Self-seeding Context Added to CL-ISAAC

As recommended by Bob Jenkins, the original author of the ISAAC cryptographic random number generator algorithms, self-seeding ISAAC is a useful technique for increasing the cryptographic strength of the random numbers generated from a given ISAAC context; … 224 more words

Development

How to Receive a Message from an Apache ActiveMQ Topic with Allegro CL

W/o Durability

(in-package :socket)

(let ((stream (make-socket :remote-host "localhost" :remote-port 61613)))
  (format stream "CONNECT~%~%~C" #\null)
 
  (force-output stream)

  ; Skip the CONNECT frame
  (loop for line = (read-line stream) until (string= line #\null))
 
  (format stream "SUBSCRIBE~%destination:/topic/SampleTopic~%ack:auto~%~%~C" #\null)
 
  (force-output stream)

  ; Seek to the body of the MESSAGE frame 
  (loop for line = (read-line stream) until (string= line ""))

  (print (read-line stream))
 
  (format stream "DISCONNECT~%~%~C" #\null)
) 81 more words
Software

How to Receive a Message from an Apache ActiveMQ Queue with Allegro CL

(in-package :socket)

(let ((stream (make-socket :remote-host "localhost" :remote-port 61613)))
  (format stream "CONNECT~%~%~C" #\null)
 
  (force-output stream)

  ; Skip the CONNECT frame
  (loop for line = (read-line stream) until (string= line #\null))
 
  (format stream "SUBSCRIBE~%destination:SampleQueue~%ack:auto~%~%~C" #\null)
 
  (force-output stream)

  ; Seek to the body of the MESSAGE frame 
  (loop for line = (read-line stream) until (string= line ""))

  (print (read-line stream))
 
  (format stream "DISCONNECT~%~%~C" #\null)
)
Software

How to Send a Message to an Apache ActiveMQ Topic with Allegro CL

(in-package :socket)

(let ((stream (make-socket :remote-host "localhost" :remote-port 61613)))
  (format stream "CONNECT~%~%~C" #\null)

  (format stream "SEND~%destination:/topic/SampleTopic~%~%Simples Assim~C" #\null)

  (format stream "DISCONNECT~%~%~C" #\null)

  (close stream)
)
Software

How to Send a Message to an Apache ActiveMQ Queue with Allegro CL

(in-package :socket)

(let ((stream (make-socket :remote-host "localhost" :remote-port 61613)))
  (format stream "CONNECT~%~%~C" #\null)

  (format stream "SEND~%destination:SampleQueue~%~%Simples Assim~C" #\null)

  (format stream "DISCONNECT~%~%~C" #\null)

  (close stream)
)
Software

How to Receive a Message from an Apache ActiveMQ Topic with ABCL

W/o Durability

(in-package :usocket)

(with-client-socket (socket stream "localhost" 61613)
  (format stream "CONNECT~%~%~C" #\Null)

  (force-output stream)

  ; Skip the CONNECTED frame
  (loop for line = (read-line stream) until (string= line #\Null))

  (format stream "SUBSCRIBE~%destination:/topic/SampleTopic~%ack:auto~%~%~C" #\Null)

  (force-output stream)

  ; Seek to the body of the MESSAGE frame
  (loop for line = (read-line stream) until (string= line ""))

  (print (read-line stream))

  (format stream "DISCONNECT~%~%~C" #\Null)
) 79 more words
Software