DevHeads.net

Postings by Nicola Mingotti

An issue piping to "head"

Hi Rubysts !

I found this little issue, I woud like to know what you think about it.

This simple little script
I never saw errors coming out from "head".
As far as i understand "head" is closing the "pipe" and "Ruby" complains
it has not where to write to.

In my opinion an error should not be given, in line with what
happens in other Unix tools as
#> cat foofile | head

Bye
Nicola

Unsubscribe: <m

a bug in BigDecimal ?

Hi,

I was doing some computations JFF when I found
this :

========================
require 'bigdecimal'
BigDecimal.limit(1000)

# ok => 2.718...
n = 1_000_000_000;
((BigDecimal.new(n) + BigDecimal.new(1)) /
BigDecimal.new(n))**BigDecimal.new(n)

# gives infinity, not good, it should converge to value E or rise
# an exception if it can't compute it.
n = 1_000_000_000_0;
((BigDecimal.new(n) + BigDecimal.new(1)) /
BigDecimal.new(n))**BigDecimal.new(n)
========================

I am running Ruby 2.4.2, do you observe the same behaviour
in your release?

Bye
Nicola

Unsubscribe: <mailto:r

Concerns about Ruby and Tk

Dear Rubists,

I am new to Ruby and I like it a lot. In short, i like it because
it has Python simplicity, Lisp consistency and Perl efficacy.

I have a concern I would like to share with you.
I had installed on my system a release of Ruby that in my opinion was
too old: 2.1.
So I decided to install a recent release from source since
in my Debian 8.9 (old stable) it is not possible to install it from apt.

The problem is I want to use 'tk' and installing 'tk' has
been really painful.

Irb Tab completion problem in Emacs

Hi everyone,

I just installed Ruby 2.4.2 from source.
and I am using Emacs 24.4.1 in Debian 8.9.

If I run irb in xterm, then Tab-completion *works*.

If i run irb in an Emacs shell with "M-x shell", then Tab-completion
*does not work*.

If I run irb in an Emacs shell with "M-x ansi-term", then Tab-completion
*works*.

I would like to be able to use irb in Emacs "M-x shell" because
there it is easy to move and copy/paste code.

Do you know how to achieve this ?

I prefer to use an Emacs shell over installing a specialized ".el" just
for Ruby.
Because Emacs + "M-x shell" + "isend-mode" is w