help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Noob dumb question (extending emacs)


From: Emanuel Berg
Subject: Re: Noob dumb question (extending emacs)
Date: Mon, 25 Oct 2021 21:46:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Jean Louis wrote:

> (defun rcd-read-urandom (&optional length)
>   "I am also free to modify the Emacs Lisp unlimited times."
>   (shell-command-to-string "head -n 1 /dev/urandom"))

So you had one as well ...

Check how head does it then ... that's how to get aHEAD in
software piracy ...

(defun urandom (bits)
  (interactive "nbits: ")
  (let*((bytes     (/ bits 8))
        (bytes-opt (format "--bytes=%s" bytes)) )
    (with-temp-buffer
      (set-buffer-multibyte nil)
      (call-process "head" "/dev/urandom" t nil bytes-opt)
      (string-to-list
       (buffer-substring-no-properties (point-min) (point-max)) ))))
;; (urandom 100)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]