* Message-ID's secret @ 2019-11-16 14:56 황병희 2019-11-16 15:14 ` Andreas Schwab 2019-11-16 15:16 ` Adam Sjøgren 0 siblings, 2 replies; 16+ messages in thread From: 황병희 @ 2019-11-16 14:56 UTC (permalink / raw) To: The Gnus Hellow!!! Really i'm Gnus' fan so i'm wondering Gnus' message-id have some secret. According my view: gnu/linux start with "87" darwin start with "m2" windows-nt start with "86" or "83" I saw the source code in message.el but still i do not understand. Somebody explain about that? Sincerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-16 14:56 Message-ID's secret 황병희 @ 2019-11-16 15:14 ` Andreas Schwab 2019-11-16 15:46 ` 황병희 2019-11-16 15:16 ` Adam Sjøgren 1 sibling, 1 reply; 16+ messages in thread From: Andreas Schwab @ 2019-11-16 15:14 UTC (permalink / raw) To: 황병희; +Cc: The Gnus On Nov 16 2019, 황병희 wrote: > According my view: > gnu/linux start with "87" > darwin start with "m2" > windows-nt start with "86" or "83" The first number is always (user-uid). "87" is 1000, "m2" is 501, "86" is 1001, "83" is 1004. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-16 15:14 ` Andreas Schwab @ 2019-11-16 15:46 ` 황병희 0 siblings, 0 replies; 16+ messages in thread From: 황병희 @ 2019-11-16 15:46 UTC (permalink / raw) To: The Gnus Andreas Schwab <schwab@linux-m68k.org> writes: > On Nov 16 2019, 황병희 wrote: > >> According my view: >> gnu/linux start with "87" >> darwin start with "m2" >> windows-nt start with "86" or "83" > > The first number is always (user-uid). "87" is 1000, "m2" is 501, "86" > is 1001, "83" is 1004. Wow! It was real secret!!! FANTASTIC!!! Thank You Andreas^^^ > Andreas. Sincerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-16 14:56 Message-ID's secret 황병희 2019-11-16 15:14 ` Andreas Schwab @ 2019-11-16 15:16 ` Adam Sjøgren 2019-11-17 15:28 ` 황병희 1 sibling, 1 reply; 16+ messages in thread From: Adam Sjøgren @ 2019-11-16 15:16 UTC (permalink / raw) To: ding 황병희 writes: > Really i'm Gnus' fan so i'm wondering Gnus' message-id have some secret. Secret? > According my view: > gnu/linux start with "87" > darwin start with "m2" > windows-nt start with "86" or "83" > > I saw the source code in message.el but still i do not > understand. Somebody explain about that? This is the function you want to understand: (defun message-unique-id () ;; Don't use microseconds from (current-time), they may be unsupported. ;; Instead we use this randomly inited counter. (setq message-unique-id-char (% (1+ (or message-unique-id-char (random (ash 1 20)))) ;; (current-time) returns 16-bit ints, ;; and 2^16*25 just fits into 4 digits i base 36. (* 25 25))) (let ((tm (current-time))) (concat (if (or (eq system-type 'ms-dos) ;; message-number-base36 doesn't handle bigints. (floatp (user-uid))) (let ((user (downcase (user-login-name)))) (while (string-match "[^a-z0-9_]" user) (aset user (match-beginning 0) ?_)) user) (message-number-base36 (user-uid) -1)) (message-number-base36 (+ (car tm) (ash (% message-unique-id-char 25) 16)) 4) (message-number-base36 (+ (nth 1 tm) (ash (/ message-unique-id-char 25) 16)) 4) ;; Append a given name, because while the generated ID is unique ;; to this newsreader, other newsreaders might otherwise generate ;; the same ID via another algorithm. ".fsf"))) One way to figure out what happens is to use the M-x edebug-defun command on the function, and then calling it. You will then be able to step through the function, seeing every return value along the way. Here is the manual: · https://www.gnu.org/software/emacs/manual/html_node/eintr/edebug.html It is quite handy! E.g. the "87" you see is due to your uid, from the line: (message-number-base36 (user-uid) -1)) Best regards, Adam -- "I wish *I* was a tiger!" Adam Sjøgren "A common lament." asjo@koldfront.dk ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-16 15:16 ` Adam Sjøgren @ 2019-11-17 15:28 ` 황병희 2019-11-17 16:40 ` Adam Sjøgren 0 siblings, 1 reply; 16+ messages in thread From: 황병희 @ 2019-11-17 15:28 UTC (permalink / raw) To: ding > (message-number-base36 (user-uid) -1)) Sorry still i do not understand what that means. We can set other user-uid by setq? Sincerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-17 15:28 ` 황병희 @ 2019-11-17 16:40 ` Adam Sjøgren 2019-11-18 13:35 ` 황병희 ` (2 more replies) 0 siblings, 3 replies; 16+ messages in thread From: Adam Sjøgren @ 2019-11-17 16:40 UTC (permalink / raw) To: ding 황병희 writes: >> (message-number-base36 (user-uid) -1)) > > Sorry still i do not understand what that means. Let's unpack inside-out: ,----[ C-h f user-uid RET ] | user-uid is a built-in function in ‘C source code’. | | (user-uid) | | Probably introduced at or before Emacs version 18. | This function does not change global state, including the match data. | | Return the effective uid of Emacs. | Value is a fixnum, if it’s small enough, otherwise a bignum. `---- So we get the uid of the user running Emacs. If you're on a one-user Linux-system, that's often 1000. For example, on my Debian GNU/Linux machine: $ grep $USER /etc/passwd asjo:x:1000:1000:Adam Sjøgren,,,:/home/asjo:/bin/bash my uid is 1000. Now, the next function: ,----[ C-h f message-number-base36 RET ] | message-number-base36 is a compiled Lisp function in ‘message.el’. | | (message-number-base36 NUM LEN) | | Not documented. `---- Not documented, but we can guess what it does from the name - it takes a number and a length as input, and converts it to base36. Here is the entire function from message.el: (defun message-number-base36 (num len) (if (if (< len 0) (<= num 0) (= len 0)) "" (concat (message-number-base36 (/ num 36) (1- len)) (char-to-string (aref "zyxwvutsrqponmlkjihgfedcba9876543210" (% num 36)))))) As 1000 is 27*36 + 28*1, you can see it gets translated into "87" by this function. So there is no secret here. > We can set other user-uid by setq? No, but if you run Emacs as another user, with another uid, you get another beginning of your Message-ID. Best regards, Adam -- "I wish *I* was a tiger!" Adam Sjøgren "A common lament." asjo@koldfront.dk ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-17 16:40 ` Adam Sjøgren @ 2019-11-18 13:35 ` 황병희 2019-11-19 4:59 ` 황병희 2020-10-20 15:36 ` Zhiwei Chen 2 siblings, 0 replies; 16+ messages in thread From: 황병희 @ 2019-11-18 13:35 UTC (permalink / raw) To: ding > As 1000 is 27*36 + 28*1, you can see it gets translated into "87" by > this function. > > So there is no secret here. Wow your comment is very clean. Now i did understand, thanks Adam^^^ Sincerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-17 16:40 ` Adam Sjøgren 2019-11-18 13:35 ` 황병희 @ 2019-11-19 4:59 ` 황병희 2019-11-20 4:33 ` 황병희 2020-10-20 15:36 ` Zhiwei Chen 2 siblings, 1 reply; 16+ messages in thread From: 황병희 @ 2019-11-19 4:59 UTC (permalink / raw) To: ding > No, but if you run Emacs as another user, with another uid, you get > another beginning of your Message-ID. So i did make other account (byunghee:51547) in Ubuntu 18.04. Really thanks Adam, indeed...;;; Sincerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-19 4:59 ` 황병희 @ 2019-11-20 4:33 ` 황병희 2019-11-21 12:39 ` 황병희 0 siblings, 1 reply; 16+ messages in thread From: 황병희 @ 2019-11-20 4:33 UTC (permalink / raw) To: ding byunghee.hwang@daum.net (황병희) writes: >> No, but if you run Emacs as another user, with another uid, you get >> another beginning of your Message-ID. > > So i did make other account (byunghee:51547) in Ubuntu 18.04. > Really thanks Adam, indeed...;;; Also i did make some relative simple code [0] with Python. That works only for me. Really i am so happy^^^ [0] https://gitlab.com/soyeomul/Gnus/blob/a233ed2e982f997766d342456f95755f9be9b76c/thanks-mid.py Sincerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-20 4:33 ` 황병희 @ 2019-11-21 12:39 ` 황병희 2019-11-21 22:12 ` 황병희 0 siblings, 1 reply; 16+ messages in thread From: 황병희 @ 2019-11-21 12:39 UTC (permalink / raw) To: The Gnus > Also i did make some relative simple code [0] with Python. That works only > for me. Really i am so happy^^^ > > [0] > https://gitlab.com/soyeomul/Gnus/blob/a233ed2e982f997766d342456f95755f9be9b76c/thanks-mid.py There were many typo. So i did update the code [1] with quiet ;;; [1] https://gitlab.com/soyeomul/Gnus/blob/4d231b7fc34a2fc8c649f7b6dbd0753c9816504d/thanks-mid.py Sicnerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-21 12:39 ` 황병희 @ 2019-11-21 22:12 ` 황병희 2020-08-06 3:18 ` 황병희 0 siblings, 1 reply; 16+ messages in thread From: 황병희 @ 2019-11-21 22:12 UTC (permalink / raw) To: The Gnus soyeomul@doraji.xyz (황병희) writes: >> Also i did make some relative simple code [0] with Python. That works only >> for me. Really i am so happy^^^ >> >> [0] >> https://gitlab.com/soyeomul/Gnus/blob/a233ed2e982f997766d342456f95755f9be9b76c/thanks-mid.py > > There were many typo. So i did update the code [1] with quiet ;;; > > [1] > https://gitlab.com/soyeomul/Gnus/blob/4d231b7fc34a2fc8c649f7b6dbd0753c9816504d/thanks-mid.py It's real final code [2]. [2] https://gitlab.com/soyeomul/Gnus/blob/1eb8e8c6f944a4402bac958ba9875bb2815abdfb/thanks-mid.py Sincerely, Gnus' fan Byung-Hee from South Korea -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-21 22:12 ` 황병희 @ 2020-08-06 3:18 ` 황병희 2020-08-14 4:52 ` 황병희 0 siblings, 1 reply; 16+ messages in thread From: 황병희 @ 2020-08-06 3:18 UTC (permalink / raw) To: The Gnus soyeomul@doraji.xyz (황병희) writes: [... long line snip ...] Hi again, i don't think this is real final code. My mind sometimes runs as Typhoon: https://gitlab.com/soyeomul/Gnus/-/blob/master/mid/tmid.py Sincerely, Gnus fan Byung-Hee -- ^고맙습니다 _和合團結_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2020-08-06 3:18 ` 황병희 @ 2020-08-14 4:52 ` 황병희 2020-09-09 3:06 ` 황병희 0 siblings, 1 reply; 16+ messages in thread From: 황병희 @ 2020-08-14 4:52 UTC (permalink / raw) To: The Gnus soyeomul@doraji.xyz (황병희) writes: > soyeomul@doraji.xyz (황병희) writes: > > [... long line snip ...] > > Hi again, i don't think this is real final code. My mind sometimes runs > as Typhoon: ... As Gnus fan, i did write this python code [***] for 1 year with all respect!!! Eventually, i did portray Message-ID as <<the Universe>>. There are require files such as __yw__.json, __yw__.py, lex__.py and the last file *tmid.py* is exec file. Also __yw__.json file's permisson is r--r--r-- and the path is '/__yw__/__yw__.json'. I still don't know python's class() things so all codes run with def() things. [***] Gnus fan's hobby code: https://gitlab.com/soyeomul/Gnus/-/tree/0722de387630097da854a1a402aea4382520a80c/mid Sincerely, Gnus fan Byung-Hee from South Korea -- ^고맙습니다 _白衣從軍_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2020-08-14 4:52 ` 황병희 @ 2020-09-09 3:06 ` 황병희 2020-12-26 1:43 ` Byung-Hee HWANG 0 siblings, 1 reply; 16+ messages in thread From: 황병희 @ 2020-09-09 3:06 UTC (permalink / raw) To: The Gnus soyeomul@doraji.xyz (황병희) writes: > soyeomul@doraji.xyz (황병희) writes: > >> soyeomul@doraji.xyz (황병희) writes: >> >> [... long line snip ...] >> >> Hi again, i don't think this is real final code. My mind sometimes runs >> as Typhoon: ... > > As Gnus fan, i did write this python code [***] for 1 year with all > respect!!! Eventually, i did portray Message-ID as <<the Universe>>. And then, i did clean up the codes [^^^] by moving to one repository [__yw__] so now i am very happy!!! Also my Gnus is *now* Super Sports Car, what a wonderful world^^^ [^^^]: https://gitlab.com/soyeomul/__yw__ Sincerely, Gnus fan Byung-Hee -- ^고맙습니다 _白衣從軍_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2020-09-09 3:06 ` 황병희 @ 2020-12-26 1:43 ` Byung-Hee HWANG 0 siblings, 0 replies; 16+ messages in thread From: Byung-Hee HWANG @ 2020-12-26 1:43 UTC (permalink / raw) To: The Gnus > [^^^]: https://gitlab.com/soyeomul/__yw__ Last night, i did add BTS/ARMY into my Python codes. In Particular, BTS/ARMY will runs *always* with _uuid(). And _really_ my spam mail will be the last at here, thanks^^^ What a beautiful World!!! Sincerely, Gnus fan Byung-Hee -- ^고맙습니다 _和合團結_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Message-ID's secret 2019-11-17 16:40 ` Adam Sjøgren 2019-11-18 13:35 ` 황병희 2019-11-19 4:59 ` 황병희 @ 2020-10-20 15:36 ` Zhiwei Chen 2 siblings, 0 replies; 16+ messages in thread From: Zhiwei Chen @ 2020-10-20 15:36 UTC (permalink / raw) To: Adam Sjøgren; +Cc: ding Adam Sjøgren <asjo@koldfront.dk> writes: > ,----[ C-h f user-uid RET ] > | user-uid is a built-in function in ‘C source code’. > | > | (user-uid) > | > | Probably introduced at or before Emacs version 18. > | This function does not change global state, including the match data. > | > | Return the effective uid of Emacs. > | Value is a fixnum, if it’s small enough, otherwise a bignum. > `---- Offtopic, how to generate function documentation in this style in Gnus? It looks so fancy. -- Zhiwei Chen ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2020-12-26 1:44 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-11-16 14:56 Message-ID's secret 황병희 2019-11-16 15:14 ` Andreas Schwab 2019-11-16 15:46 ` 황병희 2019-11-16 15:16 ` Adam Sjøgren 2019-11-17 15:28 ` 황병희 2019-11-17 16:40 ` Adam Sjøgren 2019-11-18 13:35 ` 황병희 2019-11-19 4:59 ` 황병희 2019-11-20 4:33 ` 황병희 2019-11-21 12:39 ` 황병희 2019-11-21 22:12 ` 황병희 2020-08-06 3:18 ` 황병희 2020-08-14 4:52 ` 황병희 2020-09-09 3:06 ` 황병희 2020-12-26 1:43 ` Byung-Hee HWANG 2020-10-20 15:36 ` Zhiwei Chen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).