At 07:29 AM 9/19/00 -0700, Dave Storrs wrote:
> I guess, if I had to write an explanation of pack/unpack based on
>my limited understanding, it would be something like:
>
> "Unpack takes binary data in some particular format and
>disassembles it, assigning various pieces of it to v
On Tue, 19 Sep 2000, Dave Storrs wrote:
> "Unpack takes binary data in some particular format and
> disassembles it, assigning various pieces of it to variables according to
> formatting that you supply. Pack does the opposite, using your supplied
> formatting to crunch Perl scalar variabl
On Mon, 18 Sep 2000, Michael G Schwern wrote:
> I'm sure there are many times when pack should have been used but it
> got hacked together with something else. The prime example is [...]
I must admit I'm with Michael on this one. I've been writing Perl
on and off for two or three ye
> "ST" == Sam Tregar <[EMAIL PROTECTED]> writes:
ST> I think you're talking about unpack() here, which I've only used once. I
ST> think unpack() is usually replaceable by substr() or regexes. Contrast
ST> that with pack() for which no equivalent replacement is possible, as far
ST> as I know
On Mon, 18 Sep 2000, Michael G Schwern wrote:
> On Mon, Sep 18, 2000 at 12:32:08PM -0400, Sam Tregar wrote:
>
> If I grok'd the bastards, I'd write the explaination myself.
If you grok'd the bastards I bet you'd realize how useless such an
explanation would be. The chief reason for using pack/
Michael G Schwern writes:
> You can do it! While it seems "food" and "supermarket" are critical
> to the understanding of a shopping-cart, they're really just
> incedental. I'm saying the same thing about un/pack!
>
> If I grok'd the bastards, I'd write the explaination myself.
Please take thi
On Mon, Sep 18, 2000 at 12:32:08PM -0400, Sam Tregar wrote:
> "Describe to me how you use a supermarket shopping-cart in terms of a
> hardware store. Don't mention any words for food. Just talk about nuts
> and bolts."
"When shopping for tools, a shopping-cart is the thing you carry your
tools
On Mon, Sep 18, 2000 at 12:31:34PM -0400, Casey R. Tweten wrote:
> I think pack/unpack are perlish enough. Especially if we believe that
> printf/sprintf are perlish.
Interpolation is perlish. printf and sprintf are not. And for
similar reasons as pack/unpack. "%e a floating-point number, in
Today around 12:32pm, Sam Tregar hammered out this masterpiece:
: On Mon, 18 Sep 2000, Michael G Schwern wrote:
:
: > Perhaps someone could attempt to write an explaination of pack and
: > unpack in completely Perl terms. No bits, no ints, no nybbles, no
: > IEEE floating point arithmetic, no p
On Mon, 18 Sep 2000, Michael G Schwern wrote:
> Perhaps someone could attempt to write an explaination of pack and
> unpack in completely Perl terms. No bits, no ints, no nybbles, no
> IEEE floating point arithmetic, no prior knowledge of C necessary.
> Those are not Perl. Scalars, arrays, hash
Michael G Schwern wrote:
>
> Perhaps someone could attempt to write an explaination of pack and
> unpack in completely Perl terms. No bits, no ints, no nybbles,
Uh huh... Are you prepared to write an explanation of Perl arrays
without making any mention of Perl scalars?
--
John Porter
My first language was Perl and its pretty much my native computing
tongue. My lack of a firm grounding in C or other lower level
language probably hamstrings my understanding of manipulating binary
structures (I do, at least, understand what "single-precision float in
the native format" means, bu
12 matches
Mail list logo