Exploring network capabilities of Unix-like systems, I found it very convenient to use Emacs Lisp to quickly test my C code. There is useful command in projectile-mode
projectile-run-ielm that runs new interactive elisp shell session for current project.
Here is some elisp snippets that I use nowadays.
Process filter function
A process filter function is a function that processes the standard output from the associated process. Here is an example function, which convert
\0 characters widely used to separate messages, to newlines to make output more human-readable:
(defun listen-filter (proc str) (when (buffer-live-p (process-buffer proc)) (with-current-buffer (process-buffer proc) (let ((moving (= (point) (process-mark proc)))) (save-excursion (goto-char (process-mark proc)) (insert (replace-regexp-in-string"