[#377805] rubygems-update 1.5.0 Released — Eric Hodel <drbrain@...7.net>
rubygems-update version 1.5.0 has been released!
[#377816] Decreasing range? — Stefano Grioni <stefano.grioni@...>
Hello everybody.
Thank you both, I feel ashamed that I didn't think about "downto" ..
[#377833] mkmf-bug under mingw without msys — "Marcel O." <raoultranchirer@...>
Hi,
[#377854] Where to start — "Tolga C." <tescatlipoca@...>
Hi all I am new to Ruby been trying to learn for a while but didn't get
The easiest (and most pleasant to work with!) Ruby GUI toolkit is definitely=
+1 for Shoes. I am a bit biased, being on Team Shoes, though. ;)
Steve: thanks for helping maintaining such an awesome toolkit.
On Tuesday, February 01, 2011 02:40:17 pm Fabio Cevasco wrote:
[#377882] remove array bracket — Kamarulnizam Rahim <niezam54@...>
Hi when i run my script, the output is as followed:
class Environmental
[#377895] What is the reason behind Array#zip's name? — Kevin <darkintent@...>
I'm just curious I know that Array#zip generates a new array from arguments
[#377897] What is the difference between a Ruby array and a list in Haskell or Lisps? — Kevin <darkintent@...>
As the title asks what is the difference between a Ruby array and a list in
On Wednesday, February 02, 2011 12:05:14 am Kevin wrote:
[#377911] rjb - java vm error — Ruben Herman <nedumeritulcj@...>
hello
Make sure Java is in your PATH and your JAVA_HOME environment variable is
Dhruva Sagar wrote in post #979092:
[#377922] cp_r is not working — Eliran Bz <eliranbz@...>
Hi,
[#377925] Is there a Date.now equivalent of Time.now/new? — Mike Flint <mfcoder-ap@...>
Hi,
[#377934] Soliciting some help with inject method — Edmond Kachale <edmond.kachale@...>
Rubysters,
Here's one simple way to do it:
2011/2/2 Andrew Wagner <wagner.andrew@gmail.com>
[#377945] Editing a text file and then replacing existing file — Bob Hatch <roberth@...>
I have a script that I use to find text in a file and then delete the
[#377952] Amazing behavior of include module — Pavel Strnad <pavel.strnad@...>
Hi,
This is really quite odd to me. Especially since AAA::BBB.constants returns
[#377956] Gem win32-eventlog v0.5.2 on Ruby 1.9.1 — "Luis M." <lmayorga1980@...>
1.Requirement: Read the latest lines of the Windows Application Event
[#377965] Need "=" to look like a strint — Bob Hatch <roberth@...>
I have the following variable. Ruby looks at the = sign as a regex
[#377996] Converting date format (CSV to yaml) — Kamarulnizam Rahim <niezam54@...>
Hi,
[#378023] For Loop with Steps? — Thescholar Thescholar <thescholar@...>
Hello I'm new here :)
[#378045] Class Instanciation in loop — Alizée Penel <alizee.penel@...>
Hi everyone !
[#378046] Setter method for Hash value — Rolf Pedersen <rolfhsp@...>
Hi
Rolf Pedersen wrote in post #979431:
Hi Brian (and others who have contributed with suggestions along the same
Rolf Pedersen wrote in post #979464:
Hei Brian
What about this:
Hi Jesus
On Fri, Feb 4, 2011 at 5:03 PM, Rolf Pedersen <rolfhsp@gmail.com> wrote:
[#378061] Parsing Log records with regular expressions — "Kris K." <iamkrisko@...>
I have a log file which is text based which has records in two formats
[#378087] Arrays and defs — Jens Finnäs <jens.finnas@...>
Hi, I've just started learning Ruby for screen scraping purposes and
[#378106] Does RSTRING_PTR() return a '\0' terminated C? — Iñaki Baz Castillo <ibc@...>
Hi, in a Ruby C extension I need to get a '\0' terminated string given
[#378140] C extension: R_X86_64_32 problem when inlcuding a xxxxx.a library (64 bits SO) — Iñaki Baz Castillo <ibc@...>
Hi, I must include a header (udns.h) and library (libudns.a) in a Ruby
2011/2/5 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
On Sun, 6 Feb 2011 06:38:26 +0900
2011/2/7 Ralf Mueller <ralf.mueller@zmaw.de>:
2011/2/7 Peter Zotov <whitequark@whitequark.org>:
[#378143] hoe 2.9.1.b.2 Released — Ryan Davis <ryand-ruby@...>
hoe version 2.9.1.b.2 has been released!
[#378144] C extension: How to check if a VALUE is still alive (not being GC'ed)? — Iñaki Baz Castillo <ibc@...>
Hi, I'm coding an async DNS resolver for EventMachine based on udns (a
On Sat, Feb 5, 2011 at 4:02 PM, I=F1aki Baz Castillo <ibc@aliax.net> wrote:
2011/2/6 Tony Arcieri <tony.arcieri@medioh.com>:
2011/2/6 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
On Sun, Feb 6, 2011 at 3:53 PM, I=F1aki Baz Castillo <ibc@aliax.net> wrote:
2011/2/8 Tony Arcieri <tony.arcieri@medioh.com>:
On Feb 8, 2011, at 12:53 AM, I=F1aki Baz Castillo wrote:
2011/2/8 Eric Hodel <drbrain@segment7.net>:
On Feb 8, 2011, at 3:18 PM, I=F1aki Baz Castillo wrote:
[#378147] windows XP best ruby installer ? — Une B騅ue <une_bevue@...>
I'm totally newbie onto windows xp, not to ruby.
[#378156] mall 1.0.0 - malloc tuning/reporting + glibc extras! — Eric Wong <normalperson@...>
This library provides access to the SysV mallinfo(3) and mallopt(3)
[#378157] require does not work — Tony Montana <sanekmacros@...>
Hi fellas!
[#378185] Benchmark in MiniTest — Oren <orengolan@...>
https://gist.github.com/813736
[#378188] rb_raise() causes segmentfault on xxxxx_alloc() function — Iñaki Baz Castillo <ibc@...>
Hi, my C extension uses rb_define_alloc_func(cResolver,
[#378192] Fwd: You have been unsubscribed from the Test mailing list — Edmond Kachale <edmond.kachale@...>
Rubysts,
[#378199] Choosing an office suite — Hilary Bailey <my77elephants@...>
I am trying to decide which office suite to choose from. The only
On Mon, Feb 7, 2011 at 11:15 AM, Hilary Bailey <my77elephants@gmail.com> wrote:
Phillip Gawlowski wrote in post #980112:
On Tue, Feb 8, 2011 at 2:55 AM, Hilary Bailey <my77elephants@gmail.com> wro=
What I want to create is a product that is computer accessible, that is
Thanks Martin,
[#378202] making hash key from arrays — Arihan Sinha <arihan_sinha@...>
Hi All,
Thanks for this but I am getting like
On Mon, Feb 7, 2011 at 1:12 PM, Arihan Sinha <arihan_sinha@yahoo.com> wrote:
[#378214] Find in Array — "Benjamin S." <benjamin.stauffacher@...>
Hey everbody
[#378254] "permission denied" happening too often — Peter Bailey <pbailey@...>
Hello,
> I've got Ruby scripts that have been working fine for years now. But,
You can also try to strace your script. In the logs you'll find the system
Markus Schirp wrote in post #980289:
On 02/08/2011 07:40 AM, Peter Bailey wrote:
Jeremy Bopp wrote in post #980293:
On Tue, Feb 8, 2011 at 6:48 AM, Peter Bailey <pbailey@bna.com> wrote:
On 2/8/2011 8:45 AM, Kirk Haines wrote:
[#378276] Gem suggestions — Perry Smith <pedzsan@...>
There is a gem called icu4r that is built for Ruby 1.8.
Have you contacted the original author yet?
pat eyler wrote in post #980385:
[#378279] Hash sanitization from query - newbie — Sem Ptiri <rubyforum@...>
I need to clean up a hash
[#378307] undefined class/module YAML::PrivateType - Error — "Priya D." <dharsininitt@...>
Hi,
I also observed this behavior recently. It seems that it is an
Have you got any response or do you found any solution to the same?
[#378323] Best practice to create a JSON string of one object containing an array of other objects using Ruby? — "Matthias S." <mstumpp@...>
What is a good practice to create a JSON string of one object (object of
[#378337] meme_generator 1.1 Released — Eric Hodel <drbrain@...7.net>
meme_generator version 1.1 has been released!
[#378341] System calls with ` in parameters — "Gerad S." <geradstemke@...>
Hi All,
[#378349] attr_reader vs Objects and Attributes — Mike Onofrietto <mikeonoff@...>
Hello World.
Mike Onofrietto wrote in post #980715:
[#378359] How to split string by x bytes? — Yan Bernacki <releu@...>
I have big string.
[#378367] What should TCPSocket#close do to a blocked #readline? — Alex Young <alex@...>
Take the following code:
On Thu, Feb 10, 2011 at 12:59 PM, Alex Young <alex@blackkettle.org> wrote:
Robert Klemme wrote in post #980828:
Alex Young wrote in post #980861:
On Fri, Feb 11, 2011 at 1:01 PM, Alex Young <alex@blackkettle.org> wrote:
[#378376] Ruby ternary operator — "Sam T." <samtreweek@...>
If I do the following:
[#378379] print comparison — Mario Ruiz <tcblues@...>
is it possible to print the comparison given as parameter in a method?
On Thu, Feb 10, 2011 at 8:35 AM, Mario Ruiz <tcblues@gmail.com> wrote:
[#378395] RCR feedback: Numeric#grouped — Roger Pack <rogerpack2005@...>
Hello all.
[#378398] ruby 1.9.2 unicode with hex codepoint problem — Gilles Gilles <gilles.devaux@...>
Hi,
[#378400] Small Hangup in Corewars Evolver — "Brad G." <brad.hotmail.sucks@...>
Corewars is a neat little programming game where players develop
[#378449] Exception that doesn't stop program flow — Terry Michaels <cmhoward@...>
Okay... this might sound weird (contradictory even) but is there a way
[#378467] Reading/writing to spawned process — "Joel F." <jfreeman88@...>
Hi,
[#378474] System with multiple arguments fails on Windows when there are umlauts in the PATH — Sebastian Hungerecker <sepp2k@...>
We have recently discovered a nasty bug in our software, in which it
[#378478] DCI and ruby — Michel Demazure <michel@...>
The following post is interesting
[#378492] Ruby is not accessible from the my terminal — wolf volpi <wolf_volpi@...>
My Ubuntu Software Center shows Ruby 1.8 =E2=80=9CInstalled=E2=80=9D but =
On Mon, Feb 14, 2011 at 12:26 AM, wolf volpi
Martin DeMello wrote in post #981436:
On Mon, Feb 14, 2011 at 12:48 AM, wolf volpi <wolf_volpi@yahoo.com> wrote:
Martin DeMello wrote in post #981441:
[#378502] Newbie having serious problems — Micah Wolfe <52w7te9ara@...>
Greetings all,
[#378512] What does %q do? — Gaba Luschi <friedoysterlover@...>
What does %q do in ruby?
[#378558] Assign Ruby string value to Javascrip variable? — cz <raymanojin@...>
Hi:
[#378563] Ruby(and programming) beginners question regarding 'NoMethodError' while using Hpricot — Sandeep Guria <sndpgr@...>
Hi!
[#378566] How does slice work? — Gaba Luschi <friedoysterlover@...>
How does the slice method work? If I want to write:
[#378594] What is the purpose of "initialize" — Gaba Luschi <friedoysterlover@...>
Why do you need initialize and what do you put in the parameter after
[#378595] Why use a symbol in place of a variable? — Gaba Luschi <friedoysterlover@...>
Hi,
A symbol and a variable are two different things. A symbol is
[#378602] How to read CSV in Ruby 1.9.2 — Tom Llobrera <phantom.hitman.7@...>
I am totally new to rails. I have a school project that requires me to
[#378618] Defining class methods — Tony Arcieri <tony.arcieri@...>
It seems there are 3 ways of defining class methods (at least in common
I don't mean it as a put-down; I suspect the only person I'm putting down is myself. But I don't find that class methods actually come up much in my Ruby coding; when I find myself coding one I tend to stop and think hard about whether I actually need it.
[#378673] Ruby reflection - get method definition as a string — Laup-Dawg <adamlauper@...>
Hi Folks - I am running some ruby tests and would like to print out
> Hi Folks - I am running some ruby tests and would like to print out
[#378685] LiveAST: a pure Ruby 1.9.2 library obtaining live abstract syntax trees — "James M. Lawrence" <quixoticsycophant@...>
= LiveAST
good news!
The weird thing about this project is it requires Ruby 1.9.2 and above,
On Tue, Feb 22, 2011 at 7:07 AM, John Mair <jrmair@gmail.com> wrote:
[#378686] Undefined method `+' — "Danny L." <danny.lupinelli@...>
hey guys the following line of code is producing a "undefined method
[#378692] rvm install 1.9.2-head -- errors while running make. — Jared Miller <jtmiller@...>
I'm attemping to install Ruby on Ubuntu 10.04.
[#378700] Html + Javascript + Ruby — "Bla ..." <bianca.stephani@...>
Hi,
[#378745] Work with MySQL database — Manny 777 <raddek.d@...>
Hi there,
[#378753] posix_mq : Problem installing on HPUX — Tadeusz Bochan <tad.bochan@...>
Hello,
[#378756] Possible combination trick — Adam Abc <racula@...>
Let's say I have this:
[#378762] About the "def method=(param)",why compiled error? — Zengqh Mansion <zengqh.mansion@...>
very simple program:
[#378776] Regular Expression help - Replacing Regexp that worked with Oniguruma in 1.8.6 — Zeno Davatz <zdavatz@...>
Hi
[#378817] Console output formatting — ra don <radon7@...>
Hello all, I got two quick questions. First can anyone tell me how to
[#378820] Planned maintenance of redmine.ruby-lang.org — "Yuki Sonoda (Yugui)" <yugui@...>
-----BEGIN PGP SIGNED MESSAGE-----
-----BEGIN PGP SIGNED MESSAGE-----
[#378841] Q: How to call parent method explistly? — makoto kuwata <kwatch@...>
Is it possible to call parent method specifying method name explicitly
[#378854] Ruby Hash Keys and Related Questions — Terry Michaels <cmhoward@...>
I'm still a bit new to Ruby, so humor me a bit. But I discovered today
[#378863] My OpenSSL server crashes — Tom van Leeuwen <drabber2000@...>
I have an openssl server in my company which we use to upload data to in
[#378869] How to automate download pdf from web in ruby — Priyank Shah <shahpriyank01@...>
Hi,
> e.g : http://www.example.com/abc.pdf
[#378889] finding a tag in a binary file — "rob s." <rsnotnats@...>
Hi I'm a complete non programmer but willing to give it a try.
[#378890] a, b = Array.new(2).map!{|x| data.dup} — Stefan Salewski <mail@...>
I think I can replace this code
Are you sure you can't rework your code to *not* copy data 5x? I assume
On Thu, 2011-02-24 at 07:00 +0900, niklas | brueckenschlaeger wrote:
On Thu, Feb 24, 2011 at 6:24 AM, Stefan Salewski <mail@ssalewski.de> wrote:
> ok, try also something like,
On Thu, Feb 24, 2011 at 1:40 PM, Anurag Priyam <anurag08priyam@gmail.com> w=
[#378904] Using CGI params with a MYSQL query — Doug Al <douga@...>
I am feeding CGI params to my program for testing purposes from the
[#378911] Fast alternatives to "File" and "IO" for large numbers of files ? — "Philip Rhoades" <phil@...>
People,
[#378941] Automatic question generator libs in Ruby Language — Sniper Abandon <sathish.salem.1984@...>
is there any Automatic question generator libraries in Ruby Language ?
suppose if i have a paragraph (arround 250 words)
> i want to get all the possible question from that paragraph
On Tue, 1 Mar 2011 19:31:36 +0900, Shadowfirebird wrote:
On Tue, Mar 1, 2011 at 10:55 AM, Peter Zotov <whitequark@whitequark.org>wrote:
On Tue, 1 Mar 2011 20:02:13 +0900, Adam Prescott wrote:
On Tue, Mar 1, 2011 at 12:28 PM, Peter Zotov <whitequark@whitequark.org>wrote:
> opine = "You think ' is an excellent grapheme?" # arguably this is a valid
On Tue, Mar 1, 2011 at 8:59 AM, Shadowfirebird <shadowfirebird@gmail.com>wrote:
> But that's not a question! It's an exuberant and wrong statement about a
On Tue, Mar 1, 2011 at 5:03 PM, Shadowfirebird <shadowfirebird@gmail.com> w=
[#378949] why is $1 in a grep() equal to nil? — 7stud -- <bbxx789_05ss@...>
class DataSource
On Thu, Feb 24, 2011 at 2:59 PM, 7stud -- <bbxx789_05ss@yahoo.com> wrote:
Eric Christopherson wrote in post #983739:
On Thu, Feb 24, 2011 at 8:04 PM, 7stud -- <bbxx789_05ss@yahoo.com> wrote:
Josh Cheek wrote in post #983791:
[#378958] parsing rule for this code? — 7stud -- <bbxx789_05ss@...>
1)
Ok, the following code exhibits the problem I was trying to demonstrate:
[#378976] Style question — Bill Felton <subscriptions@...>
Hi all,
[#378984] Are Hash speeds documented? — Nick Brown <nick@...>
Are the lookup, insertion, deletion, and sort costs of Hash objects
[#378990] how to override the new/initialize method for a struct? — jtprince <jtprince@...>
How do I make a custom initializer for a struct object? This is how I would expect it to be accomplished (but this does not work):
[#379000] Symbol#to_proc helping out with #select to beat Scala-s solution — Jarmo Pertman <jarmo.p@...>
Hey!
[#379009] MacRuby 0.9 — Laurent Sansonetti <laurent.sansonetti@...>
Hi,
[#379025] How to call a class from another script? — Anthony Ob <vidgametester@...>
How to call a class from another script?
On Fri, Feb 25, 2011 at 6:16 PM, Anthony Ob <vidgametester@gmail.com> wrote:
[#379031] tk canvas drag items — Ignatz Hafflegab <mcpeople@...>
Could somebody kindly direct me to a Ruby Tk example of dragging a
[#379045] Ensuring uniqueness of an object at creation time — "Abinoam Jr." <abinoam@...>
Hi all,
Abinoam Jr. wrote in post #984123:
Hi Brian,
Abinoam Jr. wrote in post #984287:
[#379052] Newbie question — Marc Chanliau <marc.chanliau@...>
In Ruby it seems you can instantiate a class inside the class itself or
[#379059] Windows 7 64-bit install — "Bob P." <rgplantz@...>
Is there any advantage to a "manual" installation versus RubyInstaller
[#379074] finding a tag in a binary file — rob stanton <tnotnats@...>
I have a binary file in which I'd like to find multiple strings of 10
hmm does not work for me, could I send the file I'm working with, well a
[#379086] "gem NAME, VERSION" && "require NAME" fails due to version conflict — Iñaki Baz Castillo <ibc@...>
Hi, I must be missing something very obvious but I don't get it. I
[#379087] trouble to install rsruby on windows XP — "pas d." <quantparis@...>
Hello
[#379131] Trying to install pg on 32bit Snow Leopard 10.6 — theLemcke <sixtimesnine@...>
I'm trying to install the "pg" gem on 32-bit snow leopard and I'm
[#379138] erb example from comp.lang.ruby fails — RichardOnRails <RichardDummyMailbox58407@...>
I copied code from http://www.ruby-doc.org/stdlib-1.8.6/ (erb package
[#379140] Display Dir contents — paul h <paul@...>
Hi,
[#379147] Comining Arrays — Paul Sholtz <paul.sholtz@...>
I have the following code:
Re: Zlib::GzipReader and multiple compressed blobs in a single stream
Hi Jeremy,
Thanks for your reply.
On Mon, Jan 31, 2011 at 02:28:30AM +0900, Jeremy Bopp wrote:
> On 01/28/2011 05:09 PM, Jos Backus wrote:
[snip]
> > Hi,
> >
> > I'm trying to inflate a set of concatenated gzipped blobs stored in a single
> > file. As it stands, Zlib::GzipReader only inflates the first blob. It
> > appears that the unused instance method would return the remaining data,
> > ready to be passed into Zlib::GzipReader, but it yields an error:
> >
> > method `method_missing' called on hidden T_STRING object
> >
> > What could be going on here?
>
> I'm not sure what's going on, but I was hoping you could solve your
> problem by running something like this:
>
> File.open('gzipped.blobs') do |f|
> begin
> loop do
> Zlib::GzipReader.open(f) do |gz|
> puts gz.read
> end
> end
> rescue Zlib::GzipFile::Error
> # End of file reached.
> end
> end
I tried something like this but as you point out, it doesn't work.
> Unfortunately, Ruby 1.8 doesn't appear to support passing anything other
> than a file name to Zlib::GzipReader.open, and Ruby 1.9 seems to always
> reset the file position to the beginning of the file prior to starting
> extraction when you really need it to just start working from the
> current position. So it doesn't appear that you can do this with the
> standard library.
That's what it looks like, yes. Bummer.
> As part of a ZIP library I wrote, there is a more general implementation
> of a Zlib stream filter. Install the archive-zip gem and then try the
> following:
>
> gem 'archive-zip'
> require 'archive/support/zlib'
>
> File.open('gzipped.blobs') do |f|
> until f.eof? do
> Zlib::ZReader.open(f, 15 + 16) do |gz|
> gz.delegate_read_size = 1
> puts gz.read
> end
> end
> end
>
>
> This isn't super efficient because we have to hack the
> delegate_read_size to be 1 byte in order to ensure that the trailing
> gzip data isn't sucked into the read buffer of the current ZReader
> instance and hence lost between iterations. It shouldn't be too bad
> though since the File object should be handling its own buffering.
This works, but sadly it is very slow. Whereas zcat takes under a second on my
test file, this code takes about 17 seconds.
> BTW, I wrote some pretty detailed documentation for Zlib::ZReader. It
> should explain what the 15 + 16 is all about in the open method in case
> you need to tweak things for your own streams.
Great. But I didn't have to tweak anything, it just worked :)
> > On a related note, Zlib::GzipReader#{pos,tell} returns the position in the
> > output stream (zstream.total_out) whereas I am looking for the position in
> > the input stream. I tried making zstream.total_in available but the value
> > appears to be 18 bytes short in my test file, that is, the next header is
> > found 18 bytes beyond what zstream.total_in reports.
>
> I think total_in is counting only the compressed data; however,
> following the compressed data is a trailer as required for gzip blobs.
> You could probably always add 18 to whatever you get, but as I noted
> earlier, the implementation of GzipReader seems to always reset any file
> object back to the beginning of the stream rather than start processing
> it from an existing position. I can't find any documentation listing a
> way to force GzipReader to jump to any other file position after
> initialization either.
Yeah, you'd have to feed GZipReader the right part of the input stream
yourself and figure out how much it processed. Something tells me it's not
always 18 but depends on internal buffering, which would invalidate the
assumption of a fixed offset.
> > Does anybody know how to make the library return the correct offset into the
> > input stream so multiple compressed blobs can be handled?
>
> Hopefully, my solution will work for you because I don't think the
> current implementation in the standard library will do what you need.
It does, but it's very slow. Sigh.
Thanks again, Jeremy.
Cheers,
Jos
--
Jos Backus
jos at catnook.com