# Port of Perl's Parse::AFP?

**URL:** <https://www.ruby-forum.com/t/port-of-perls-parse-afp/53869>\
**Category:** Ruby\
**Created:** [February 15, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/port-of-perls-parse-afp/53869 "2006-02-15T18:10:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [February 15, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/port-of-perls-parse-afp/53869/1 "2006-02-15T18:10:51Z")

</div>

Has anyone had the need to port the Perl library Parse::AFP to Ruby?  
I’m trying to use the Perl version right now and I’m having some nasty  
memory usage issues (iterating through a 21MB AFP file consumes over  
1GB of RAM). Since I dont know Perl very well, a Ruby version would  
really help me out if it didnt have the same issues.

Thanks,  
Scott

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [February 16, 2006, 11:17am UTC](https://www.ruby-forum.com/t/port-of-perls-parse-afp/53869/2 "2006-02-16T11:17:07Z")

</div>

On Feb 15, 2006, at 18:08, Scott wrote:

> Has anyone had the need to port the Perl library Parse::AFP to Ruby?  
> I’m trying to use the Perl version right now and I’m having some nasty  
> memory usage issues (iterating through a 21MB AFP file consumes over  
> 1GB of RAM). Since I dont know Perl very well, a Ruby version would  
> really help me out if it didnt have the same issues.

Just as a quick note Parse::AFP was written by Audrey Tang, of Pugs  
fame. She said in this interview:

```
 http://perl.com/lpt/a/2005/03/03/pugs_interview.html

```

that the problem in the Perl module was that Perl 5 did not have copy-  
on-write by then. She rewrote it in Haskell and the difference in  
performance and LOCs was really remarkable.

I don’t know whether this, in her opinion, intrisic limitation is  
found in Ruby as of today.

– fxn

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [February 16, 2006, 5:19pm UTC](https://www.ruby-forum.com/t/port-of-perls-parse-afp/53869/3 "2006-02-16T17:19:57Z")

</div>

On 2/16/06, Xavier N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> that the problem in the Perl module was that Perl 5 did not have copy-  
> on-write by then. She rewrote it in Haskell and the difference in  
> performance and LOCs was really remarkable.
> 
> I don’t know whether this, in her opinion, intrisic limitation is  
> found in Ruby as of today.

Ruby’s strings are COW.

-austin

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [February 20, 2006, 3:20pm UTC](https://www.ruby-forum.com/t/port-of-perls-parse-afp/53869/4 "2006-02-20T15:20:32Z")

</div>

Not quite sure what you mean?
