Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38647
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!feeder3.eweka.nl!81.171.88.15.MISMATCH!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <chris@rebertia.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'binary': 0.05; 'python)': 0.05; 'executable': 0.07; 'python': 0.09; 'big-endian': 0.09; 'macosx': 0.09; 'url:mac': 0.09; 'cc:addr:python-list': 0.10; 'subject:python': 0.11; 'language': 0.14; 'abi': 0.16; 'awk': 0.16; 'bytecode': 0.16; 'executables': 0.16; 'fields:': 0.16; 'files."': 0.16; 'mach': 0.16; 'powerpc': 0.16; 'url:conceptual': 0.16; 'wrote:': 0.17; 'byte': 0.17; 'integer': 0.17; 'intel': 0.17; 'feb': 0.19; 'java': 0.21; 'struct': 0.22; 'universal': 0.22; 'runs': 0.22; 'cheers,': 0.23; 'cc:2**0': 0.23; 'programming': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'url:wiki': 0.26; 'message-id:@mail.gmail.com': 0.27; 'chris': 0.28; 'url:developer': 0.29; 'url:wikipedia': 0.29; 'class': 0.29; 'file': 0.32; 'generally': 0.32; 'received:google.com': 0.34; 'so,': 0.35; 'pm,': 0.35; 'subject:?': 0.35; 'there': 0.35; 'subject:': 0.36; 'url:org': 0.36; 'apple': 0.36; 'url:library': 0.36; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'url:en': 0.38; 'application': 0.40; 'most': 0.61; 'containing': 0.61; 'identify': 0.61; 'more': 0.63; 'background:': 0.65; 'brown': 0.65; '2013': 0.84; 'easter': 0.84; 'fat': 0.84; 'sender:addr:chris': 0.84; 'url:reference': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=tVhcO4zSQjsKkOvVWRB7kIUQUrbtetxODOeBa05zbMI=; b=XSsLkARw64+1lgAr+xE9LKjBVSZLN8ti8m96dKTTmxtN6CfjG3ocl6yCLWlNVBq0g/ 3xPRw71n1OosLAd7rPoYUbyAYXKHhf98qR8M2+j1pAs4GzxOWhBB60nUwIhJeKoqrUM+ rWGlLhQcpwtDyhlhPD2sQtEGMmu+Eh1SNogVU= |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=tVhcO4zSQjsKkOvVWRB7kIUQUrbtetxODOeBa05zbMI=; b=BVqTqLwVG8kZWnUYCwdzWFYrzVnT/2nGNfwzPww5ikfbhI5ij2Et4AT/z0zleEeONZ SQPM/fVX17EAjY8iYJSGeSJbKCzISRo/4NCgQanPVi2XM2fEMrXcQZh/DuavqJYbeyk9 nQqCyBx7pYs1l78JopqNjisIaw/4qtskrgRE/5RNMtvofZkzkvU3dgMrt9ePpw2D2trb xvQSiX6qBBI0xsh1CL+oHkwrL0QQUHMGRqwjV5WB2g7V0y5Np4924hYlt0TYD0RO125e SccpA5UjrXfGpofYL9I2MwFaCLFTWr/3ADmkTr4MJyMS/fJdKFTLAesdmYSzC/EbvyUJ viNw== |
| MIME-Version | 1.0 |
| X-Received | by 10.42.58.202 with SMTP id j10mr16381832ich.39.1360565391961; Sun, 10 Feb 2013 22:49:51 -0800 (PST) |
| Sender | chris@rebertia.com |
| In-Reply-To | <CABRP1o9H4J7GUJ5QGAGOYbOdhcfr5Q3ZKzknJg2pfJHBsyrU7w@mail.gmail.com> |
| References | <CABRP1o9H4J7GUJ5QGAGOYbOdhcfr5Q3ZKzknJg2pfJHBsyrU7w@mail.gmail.com> |
| Date | Sun, 10 Feb 2013 22:49:51 -0800 |
| X-Google-Sender-Auth | qqAyKVBg0FTh1SbZSDTMNy0pgvs |
| Subject | Re: cafebabe python macosx easter egg? |
| From | Chris Rebert <clp2@rebertia.com> |
| To | Rodrick Brown <rodrick.brown@gmail.com> |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Gm-Message-State | ALoCoQm0sM86bDonh4OK1SvSYYSjaLNdiezwgMxnPFNLDeyYdNeeYwgMHgTIRAe+uM0FFJhJbQv/ |
| Cc | "python-list@python.org" <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1626.1360565395.2939.python-list@python.org> (permalink) |
| Lines | 49 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1360565395 news.xs4all.nl 6981 [2001:888:2000:d::a6]:46060 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:38647 |
Show key headers only | View raw
On Sun, Feb 10, 2013 at 10:10 PM, Rodrick Brown <rodrick.brown@gmail.com> wrote:
> Subject: cafebabe python macosx easter egg?
>
> $ hexdump -n4 -C $(which python) | awk '{print $2 $3 $4 $5 }'
cafebabe
~ $ # Huh. Let's google...
http://en.wikipedia.org/wiki/Hexspeak :
"0xCAFEBABE ("cafe babe") is used by Mach-O to identify Universal
object files, and by the Java programming language to identify Java
bytecode class files."
Some background:
http://en.wikipedia.org/wiki/Mach-O : "Mach-O […] is a file format for
executables […] used by most systems based on the Mach kernel" (OS X's
kernel is based on the Mach kernel.)
http://en.wikipedia.org/wiki/Universal_binary :
"A universal binary is, in Apple parlance, an executable file or
application bundle that runs natively on either PowerPC or […] Intel
64-based Macintosh computers; it is an implementation of the concept
more generally known as a fat binary."
Confirmation:
"OS X ABI Mach-O File Format Reference":
https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html
:
struct fat_header
[...]
Fields:
magic
An integer containing the value 0xCAFEBABE in big-endian byte order format.
So, there you have it. Mach-O and Java bytecode just happen to use the
same magic number. Coincidence.
Cheers,
Chris R.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: cafebabe python macosx easter egg? Chris Rebert <clp2@rebertia.com> - 2013-02-10 22:49 -0800
csiph-web