[#32009] merging nokogiri to ext/ — Aaron Patterson <aaron@...>

I would like to merge nokogiri to ext for the 1.9.3 release. I spoke to

82 messages 2010/09/02
[#32010] Re: merging nokogiri to ext/ — "U.Nakamura" <usa@...> 2010/09/02

Hello,

[#32012] Re: merging nokogiri to ext/ — Ryan Davis <ryand-ruby@...> 2010/09/02

[#32030] Re: merging nokogiri to ext/ — "NARUSE, Yui" <naruse@...> 2010/09/03

Hi,

[#32033] Re: merging nokogiri to ext/ — "NARUSE, Yui" <naruse@...> 2010/09/03

2010/9/3 NARUSE, Yui <naruse@airemix.jp>:

[#32155] Re: merging nokogiri to ext/ — Yusuke ENDOH <mame@...> 2010/09/08

Currently, we're discussing three different topics:

[#32189] Re: merging nokogiri to ext/ — Aaron Patterson <aaron@...> 2010/09/09

On Thu, Sep 09, 2010 at 01:40:34AM +0900, Yusuke ENDOH wrote:

[#32056] [Ruby 1.8-Bug#3788][Open] URI cannot parse IPv6 addresses propertly — Adam Majer <redmine@...>

Bug #3788: URI cannot parse IPv6 addresses propertly

16 messages 2010/09/04

[#32110] Ruby 2.0 Wiki/Wish-list? — Joshua Ballanco <jballanc@...>

Hi all,

41 messages 2010/09/07
[#32114] Re: Ruby 2.0 Wiki/Wish-list? — "NARUSE, Yui" <naruse@...> 2010/09/08

2010/9/8 Joshua Ballanco <jballanc@gmail.com>:

[#32117] Re: Ruby 2.0 Wiki/Wish-list? — Joshua Ballanco <jballanc@...> 2010/09/08

On Sep 7, 2010, at 5:21 PM, NARUSE, Yui wrote:

[#32143] Re: Ruby 2.0 Wiki/Wish-list? — Roger Pack <rogerdpack2@...> 2010/09/08

> So, for example, a few things I've wanted for a long time:

[#32135] [Ruby-Bug#3802][Open] freeaddrinfo not found in WS2_32.dll — Thomas Volkmar Worm <redmine@...>

Bug #3802: freeaddrinfo not found in WS2_32.dll

16 messages 2010/09/08

[#32154] Making custom_lambda() work — Magnus Holm <judofyr@...>

A tiny suggestion for how we could make it possible to call lambdas

15 messages 2010/09/08
[#32159] Re: Making custom_lambda() work — Nikolai Weibull <now@...> 2010/09/08

On Wed, Sep 8, 2010 at 18:21, Magnus Holm <judofyr@gmail.com> wrote:

[#32156] Can we convert the standard library to gems? — James Edward Gray II <james@...>

Taken from the bundle Nokogiri thread:

98 messages 2010/09/08
[#32161] Re: Can we convert the standard library to gems? — Marcus Rueckert <darix@...> 2010/09/08

On 2010-09-09 01:45:43 +0900, James Edward Gray II wrote:

[#32166] Re: Can we convert the standard library to gems? — James Edward Gray II <james@...> 2010/09/08

On Sep 8, 2010, at 12:03 PM, Marcus Rueckert wrote:

[#32173] Re: Can we convert the standard library to gems? — Marcus Rueckert <darix@...> 2010/09/08

On 2010-09-09 02:54:26 +0900, James Edward Gray II wrote:

[#32249] Re: Can we convert the standard library to gems? — Aaron Patterson <aaron@...> 2010/09/09

On Thu, Sep 09, 2010 at 05:26:54AM +0900, Marcus Rueckert wrote:

[#32278] Re: Can we convert the standard library to gems? — Lucas Nussbaum <lucas@...> 2010/09/10

On 10/09/10 at 02:41 +0900, Aaron Patterson wrote:

[#32162] Re: Can we convert the standard library to gems? — Yusuke ENDOH <mame@...> 2010/09/08

Hi,

[#32216] Re: Can we convert the standard library to gems? — Ryan Davis <ryand-ruby@...> 2010/09/09

[#32229] Re: Can we convert the standard library to gems? — Yusuke ENDOH <mame@...> 2010/09/09

Hi,

[#32260] Re: Can we convert the standard library to gems? — Ryan Davis <ryand-ruby@...> 2010/09/09

[#32275] Re: Can we convert the standard library to gems? — Urabe Shyouhei <shyouhei@...> 2010/09/10

I'm off today so sorry if I missed some mails.

[#32293] Re: Can we convert the standard library to gems? — James Cox <james@...> 2010/09/10

Urabe,

[#32316] Re: Can we convert the standard library to gems? — Urabe Shyouhei <shyouhei@...> 2010/09/11

(2010/09/10 23:48), James Cox wrote:

[#32322] Re: Can we convert the standard library to gems? — James Tucker <jftucker@...> 2010/09/11

[#32335] Re: Can we convert the standard library to gems? — Urabe Shyouhei <shyouhei@...> 2010/09/12

I'm at an airport back to my home so in short,

[#32343] Re: Can we convert the standard library to gems? — James Cox <james@...> 2010/09/12

On Sun, Sep 12, 2010 at 6:51 AM, Urabe Shyouhei <shyouhei@ruby-lang.org> wr=

[#32382] Re: Can we convert the standard library to gems? — Urabe Shyouhei <shyouhei@...> 2010/09/14

(2010/09/13 3:54), James Cox wrote:

[#32383] Re: Can we convert the standard library to gems? — James Cox <james@...> 2010/09/14

On Tue, Sep 14, 2010 at 12:37 PM, Urabe Shyouhei <shyouhei@ruby-lang.org> wrote:

[#32393] Re: Can we convert the standard library to gems? — Urabe Shyouhei <shyouhei@...> 2010/09/15

How difficult to make myself understood in English.

[#32396] Re: Can we convert the standard library to gems? — James Cox <james@...> 2010/09/15

On Wed, Sep 15, 2010 at 1:43 AM, Urabe Shyouhei <shyouhei@ruby-lang.org> wr=

[#32399] Re: Can we convert the standard library to gems? — Yusuke ENDOH <mame@...> 2010/09/15

Hi,

[#32400] Re: Can we convert the standard library to gems? — James Cox <james@...> 2010/09/15

On Wed, Sep 15, 2010 at 12:07 PM, Yusuke ENDOH <mame@tsg.ne.jp> wrote:

[#32401] Re: Can we convert the standard library to gems? — Marcus Rueckert <darix@...> 2010/09/15

On 2010-09-16 01:42:39 +0900, James Cox wrote:

[#32402] Re: Can we convert the standard library to gems? — James Cox <james@...> 2010/09/15

On Wed, Sep 15, 2010 at 1:35 PM, Marcus Rueckert <darix@opensu.se> wrote:

[#32411] Re: Can we convert the standard library to gems? — Marcus Rueckert <darix@...> 2010/09/15

On 2010-09-16 03:36:56 +0900, James Cox wrote:

[#32412] Re: Can we convert the standard library to gems? — James Cox <james@...> 2010/09/16

On Wednesday, September 15, 2010, Marcus Rueckert <darix@opensu.se> wrote:

[#32414] Re: Can we convert the standard library to gems? — Lucas Nussbaum <lucas@...> 2010/09/16

On 16/09/10 at 11:02 +0900, James Cox wrote:

[#32248] Replacing stdlib Date with C version — Jeremy Evans <code@...>

I've recently been working on a replacement for the stdlib Date class,

15 messages 2010/09/09

[#32290] [Ruby 1.9.2-Backport#3818][Open] Seg fault with ruby tmail and ruby 1.9.2 — Karl Baum <redmine@...>

Backport #3818: Seg fault with ruby tmail and ruby 1.9.2

10 messages 2010/09/10

[#32453] Why doesn’t Enumerable define a #last method? — Nikolai Weibull <now@...>

Hi!

9 messages 2010/09/17

[#32454] [Ruby 1.9-Feature#3845][Open] "in" infix operator — Yusuke Endoh <redmine@...>

Feature #3845: "in" infix operator

20 messages 2010/09/17
[#32489] Re: [Ruby 1.9-Feature#3845][Open] "in" infix operator — Benoit Daloze <eregontp@...> 2010/09/21

On 17 September 2010 12:30, Yusuke Endoh <redmine@ruby-lang.org> wrote:

[#32529] [Ruby 1.9-Bug#3869][Open] Logger#log does not handle or escape new-line characters. — Hal Brodigan <redmine@...>

Bug #3869: Logger#log does not handle or escape new-line characters.

9 messages 2010/09/23

[#32585] Proposal for Optional Static Typing for Ruby — Martin Pilkington <pilky@...>

Hi,

47 messages 2010/09/27
[#32588] Re: Proposal for Optional Static Typing for Ruby — Yukihiro Matsumoto <matz@...> 2010/09/27

Hi,

[#32592] Re: Proposal for Optional Static Typing for Ruby — Martin Pilkington <pilky@...> 2010/09/28

Hi Matz

[#32595] Re: Proposal for Optional Static Typing for Ruby — Asher <asher@...> 2010/09/28

Martin,

[#32611] Re: Proposal for Optional Static Typing for Ruby — Loren Segal <lsegal@...> 2010/09/28

Hi,

[#32628] Re: Proposal for Optional Static Typing for Ruby — Eleanor McHugh <eleanor@...> 2010/09/29

It strikes me that much of the premise behind this thread is misguided =

[#32634] [Ruby 1.9-Bug#3889][Open] Incorrectly detected i686-w64-mingw32 as x64-mingw — Luis Lavena <redmine@...>

Bug #3889: Incorrectly detected i686-w64-mingw32 as x64-mingw

21 messages 2010/09/29

[ruby-core:32644] Re: Proposal for Optional Static Typing for Ruby

From: Loren Segal <lsegal@...>
Date: 2010-09-29 22:40:42 UTC
List: ruby-core #32644
  Hi Joshua,

On 9/29/2010 2:26 PM, Joshua Ballanco wrote:
> I think that if you can strive for more duck-typing and less reliance on classes, you'll have better Ruby code at the end of the day. If you would rather do a class-based system, there are probably better languages for you.
>
I'm not a fan of blanket statements like these. Neither am I a fan of 
that kind of a conclusion. The Ruby solution is not always "remove class 
coupling". Again, I should bring around the point that Ruby is 
multi-paradigm, and has class based support for a good reason. If you 
want Ruby minus the classes, maybe LISP is a better language for you. 
For the rest of us, classes will be a mainstay in the way things are 
done. In any case, your opinion on classes or duck-typing doesn't really 
have much effect on the actual proposal, since annotated types could 
support (and would be useful for) either one.

> The reason is that your code becomes very self-documenting when the method names stick to the rule of "say what you do". I think the many forms of slice are an unfortunate Perl-ism, and I wouldn't mind renaming them at all.
>

The problem here is that you can't rename methods like #[], or 
operators. #slice is also known as #[] (as I pointed out), and must 
therefore work as "str"[...]. And commonly overloaded operators like +, 
===, and especially <=> would also benefit from this syntax. In any 
case, I don't believe the Obj-C way of doing things is the right way 
here. I wouldn't want to have "xyz".slice_with_range(). As we discussed 
earlier, the advantage of using Ruby and duck-typing is that you can 
have simple APIs that "Just Work". For instance, if I wanted to slice a 
String sometimes at a Fixnum but other times at Range, I would need to 
think about what I was calling and have an if statement that chose 
between two methods.

     if range_end?
       str.slice_with_range(start...finish)
     else
       str.slice_with_fixnum(start)
     end

Having a single verb #slice simplifies this:

     str.slice(range_end? ? start...finish : start)

Naming things verbosely doesn't really solve the overloading problem, it 
only solves the documentation problem (and only partly).

>> The way I see it, these type annotations *are* a DbC syntax. Why do you see it as otherwise?
> I don't. Sorry, I guess I wasn't being clear. It's not that I don't like the idea of checking arguments for methods. It's that DbC is bigger than just that. My view on this is that we shouldn't just stop at method checks. I'd like to see Ruby gain the full suite of DbC capabilities.

You want full DbC capabilities but don't encourage adding type 
information? A "full" DbC implementation includes static checking, and 
that can *only* happen with type information. Without types the best you 
can do is Runtime Assertion Checking (RAC). Frankly, Ruby will never get 
to static DbC verification, because it will never have static types, 
however you can get a lot closer by annotating when the compiler needs 
more information.

More specifically, I pose you this question: how do you expect to have 
"full" DbC capabilities, or even partial ones, without type information? 
You can merge this answer with the next quote, since I have a feeling 
they're related.

>> Weren't you just all about the duck-typing, and now you're calling them unreliable and difficult? :) In any case, I don't think that's very relevant.
> Au contraire! I think this is the *most relevant part of the issue*. As I've said in a few other messages in this thread: I'm not against having type information or being warned about type conflicts. What I don't want is I don't want to have to type in the information by hand!

You want type information but don't want to add it? Where will the type 
information come from if not "by hand"? The compiler can only go so far 
in terms of type inference. Specifically, inferring types of parameters 
is nearly impossible, and any form of metaprogramming would completely 
throw the compiler into a loop. The only way to fill in these gaps is to 
add these types in as annotations.
> I think I do understand your proposal, but I think it's a lazy short-cut solution to a more fundamental problem. Could we have better tools, better warnings, and maybe some small performance improvements by allowing for optional type annotation? Sure! But its a hack. I would like to see Ruby solve this problem in a more fundamental way...

Where's the hack, or rather, what's the fundamental problem, then? If 
the fundamental problem is "people shouldn't need the tools or warnings 
in the first place", I'm not buying that. It seems to me as though 
you're stance on this matter is far more ideological and far less 
practical than it should be. I certainly appreciate that, but this is 
not an ideological issue-- I mean, the typing would be *optional*. If 
you wouldn't see a benefit from this, you can certainly opt-out. On the 
other hand, I see no problem with getting better tools, better warnings 
and small performance improvements by allowing optional type 
annotations. I'll bet the majority of users solving practical problems 
would agree. In fact, I find it extremely hard to argue against "better" 
anything if the cost only involves adding an optional syntax.

- Loren

In This Thread