[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should Emacs provide a uuid function?
From: |
Stefan Monnier |
Subject: |
Re: Should Emacs provide a uuid function? |
Date: |
Mon, 09 May 2011 11:38:08 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> (defun secure-random-bytes (n)
>> (let ((file (cond
>> ((file-exists-p "/dev/random") "/dev/random")
>> ((file-exists-p "/dev/urandom") "/dev/urandom")
>> (t (error "Secure random device not available")))))
> Feh. Using platform-dependent interfaces in Lisp is not the Emacs
> way, in my book. How about a primitive which would read from
> /dev/random or /dev/urandom if they are available, or use other
> methods if they are not?
FWIW, I don't think there's anything wrong with writing the
platform-dependent code in Elisp rather than in C. I generally prefer
code to be written in Elisp when possible and when it's not introducing
a performance problem.
Stefan
- Re: Should Emacs provide a uuid function?, Stephen J. Turnbull, 2011/05/01
- Re: Should Emacs provide a uuid function?, Leo, 2011/05/09
- Re: Should Emacs provide a uuid function?, Eli Zaretskii, 2011/05/09
- Re: Should Emacs provide a uuid function?,
Stefan Monnier <=
- Re: Should Emacs provide a uuid function?, Eli Zaretskii, 2011/05/09
- Re: Should Emacs provide a uuid function?, Stefan Monnier, 2011/05/09
- Re: Should Emacs provide a uuid function?, Eli Zaretskii, 2011/05/09
- Re: Should Emacs provide a uuid function?, Stefan Monnier, 2011/05/09
- Re: Should Emacs provide a uuid function?, Eli Zaretskii, 2011/05/09
- Re: Should Emacs provide a uuid function?, Chong Yidong, 2011/05/09
- Re: Should Emacs provide a uuid function?, Eli Zaretskii, 2011/05/09
- Re: Should Emacs provide a uuid function?, Ted Zlatanov, 2011/05/09
- Re: Should Emacs provide a uuid function?, Eli Zaretskii, 2011/05/09
- Re: Should Emacs provide a uuid function?, Ted Zlatanov, 2011/05/09