Curious about IronRuby and IronPython on DLR

On stringio: I’m finishing some compatibility tests with ruby 1.8.6.
Hope
send the patch soon for revision.

Regards

I believe the consensus from September was to follow JRuby’s lead and
base
the implementation on System.IO.Compression as much as possible, and
code
anything that was needed to get it compatible with the Ruby library.

http://rubyforge.org/pipermail/ironruby-core/2007-September/000024.html

Alright, I started doing this tonight (finally) GZip was pretty
straight forward, but Inflate may be a problem, The
System::IO::Compression.DeflateStream is RFC 1951 compliant /not/
1950… Meaning it only covers Deflate, not ZLib in general. See here:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=97064&wa=wsignin1.0

I’ll research this more tomorrow, I’d hate to have to have an external
dependency like Zlib.NET

Attached is my fetal like script containing the GZip implementation,
feedback is welcome.

I’d like to implement zlib in pure ruby, but in the mean time, I think
this should be good enough. Time will tell. Once we get a good
collection of these libraries together we’ll be able to see what’s
really needed :wink:

Anyway, updated zlib.rb attached, it performs the Gzip and Zlib
decompression… I’m not sure exactly what finish is suppose to do,
the docs are unclear. I suspect it may not be applicable to the way
I’m returning the decompressed output…

Michael L.:

Alright, I started doing this tonight (finally) GZip was pretty
straight forward, but Inflate may be a problem, The
System::IO::Compression.DeflateStream is RFC 1951 compliant /not/
1950… Meaning it only covers Deflate, not ZLib in general. See here:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?
F
eedbackID=97064&wa=wsignin1.0

I’ll research this more tomorrow, I’d hate to have to have an external
dependency like Zlib.NET

Yeah, DeflateStream only implements the basic deflate algorithm, with no
configuration options. Worse, it doesn’t have particularly good
compression ratio. Definitely worth investigating a port of a more fully
featured library…

  • John

Kim is the dev who works on System.IO.Compression. I asked her about
whether Ruby’s zlib library could be built on top of
System.IO.Compression? Here are her comments and questions. Michael, if
you would like to get any guidance/answers from Kim, she is available
for response.

I’m not sure if you saw my blog on this topic, but zlib can be
implemented by wrapping our DeflateStream with the header/checksum
modifications described in the blog.
http://blogs.msdn.com/bclteam/archive/2007/05/16/system-io-compression-capabilities-kim-hamilton.aspx

John (Lam) asked me about that blog in the past. At the time I looked at
the Ruby docs to see what would be missing from a zlib implementation
created that way. These were the issues:

  •          Zlib::Deflate.set_dictionary: we don't support preset 
    

dictionaries. Do you have a feel for how common it is to use present
dictionaries in Ruby?

  •          We don't support compression levels, as in 
    

Zlib::Deflate.delate(level).

Both of these can be worked around, but these are ways in which our
capabilities are inferior if the workaround above is used.

Thanks,
Shri
Want to work on IronPython, IronRuby,
F#?http://blogs.msdn.com/ironpython/archive/2008/02/25/ironpython-ironruby-and-f-openings-in-dev-test-and-pm.aspx
Visit http://blogs.msdn.com/ironpython

Michael L. wrote:

Shri and Kate,

Thank you for the reply and for researching this. I pretty much came
to the same conclusion, the file I posted earlier pretty much takes
the approach outlined below. At this point I’m actually attempting to
implement zlib in pure ruby. I’m curious to see the performance in
both MRI and IronRuby…

This is cool…will you release it as a separate project? I’ dlike to try
it in JRuby too, and the Rubinius guys might be interested as well
(since they have some unholy love for turtles, or something).

  • Charlie

Shri and Kate,

Thank you for the reply and for researching this. I pretty much came
to the same conclusion, the file I posted earlier pretty much takes
the approach outlined below. At this point I’m actually attempting to
implement zlib in pure ruby. I’m curious to see the performance in
both MRI and IronRuby…

On Fri, Mar 7, 2008 at 6:03 PM, Shri B. [email protected]
wrote:

John (Lam) asked me about that blog in the past. At the time I looked at the

Want to work on IronPython, IronRuby, F#? Visit
update

library…

[email protected]

http://rubyforge.org/mailman/listinfo/ironruby-core


Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Michael L.
[Polymath Prokrammer]
http://blog.prokrams.com

That’s the plan, I saw some other people asking for it as well… I’m
not sure it’s a GREAT idea, especially without some optimizations…
but what I got I’ll be posting.

On Mon, Mar 10, 2008 at 5:16 PM, Charles Oliver N.
[email protected] wrote:

it in JRuby too, and the Rubinius guys might be interested as well
(since they have some unholy love for turtles, or something).

  • Charlie

Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Michael L.
[Polymath Prokrammer]
http://blog.prokrams.com

On 3/6/08, Wayne K. [email protected] wrote:

strscan.so:

  • any progress Curt?

I was under the impression that I had finished this, but I’m thousands
of miles away from being able to check. Have you tried to use
StringScanner?


Curt H.
[email protected]

I’ve got the rubyforge project up for the pure ruby zlib
implementation, SVN has what I got so far, which is basically just
Zlib::Inflate, http://rubyforge.org/projects/zliby/ it’s rough, but
I’m adding to it.

On Fri, Mar 7, 2008 at 5:46 PM, Michael L.
[email protected] wrote:

F


Michael L.
[Polymath Programmer]
http://michaeldotnet.blogspot.com


Michael L.
[Polymath Prokrammer]
http://blog.prokrams.com

Just an FYI, I made the first offical release, Zliby
(http://rubyforge.org/projects/zliby/), it does Gzip decompression as
well as Zlib decompression, and implements all the methods that Dr.
Kelly listed. Note though it does rely on a few methods not yet
implemented, notably Time.at and block_given? … I’ll get back to
you on that :wink:

On Tue, Mar 11, 2008 at 2:20 PM, Michael L.
[email protected] wrote:

I’d like to implement zlib in pure ruby, but in the mean time, I think

eedbackID=97064&wa=wsignin1.0


Michael L.


Michael L.
[Polymath Prokrammer]
http://blog.prokrams.com

thousands of miles away from being able to check. Have you
tried to use StringScanner?

OK, sorry, I didn’t realize that this external module was already
implemented as a Builtin.

Cheers, Wayne.

On Mon, Mar 17, 2008 at 11:32 PM, Wayne K. [email protected]
wrote:

I was under the impression that I had finished this, but I’m
thousands of miles away from being able to check. Have you
tried to use StringScanner?

I didn’t realize that this external module was already implemented as a Builtin.

Yeah, there’s no mechanism yet for loading it from an external module.
Or at least, there wasn’t when it was implemented.


Curt H.
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs