Ruby3 Will Have Types

Hello,

   Today's biggest (most upvoted) story on Hacker News:

   Ruby3 Will Have Types [1]

   Any comments or thoughts here on ruby-talk about the breaking news?

  Here are my two cents:

  As a head start you can add the missing Bool type today :-), use the
safebool library / gem [2]

   Sorbet is a great inspiring project. Hopefully, open source soon.
FYI: sruby - that is (secure) ruby [3] - is an alternative ruby
(subset) with an alternative (optional) type annotation syntax e.g.

   Sorbet's `sig {params(x: Integer).returns(String)}`

  becomes

  `sig [Integer] => [String]` or `sig Integer => String`

Note: Since the sig is "yes, it's just (regular) ruby" code you can
create an alias for types e.g. I = Integer, S = String and than use
sig I=>S, for example.

   Cheers. Prost. Happy (type-safe) coding with ruby.

[1] https://news.ycombinator.com/item?id=19697405
[2] https://github.com/s6ruby/safebool
[3] https://github.com/s6ruby

The HN link references a Twitter post. Is there some kind of official
announcement, e.g. on ruby-lang.org, or at least something on the
tracker at bugs.ruby-lang.org? Twitter does not appear as a serious news
source to me.

Marvin

···

Am 19. April 2019 um 10:41 Uhr +0200 schrieb Gerald Bauer:

   Any comments or thoughts here on ruby-talk about the breaking news?

--
Blog: https://mg.guelker.eu

Hello,

    The twitter posting is a follow-up from the Ruby Kaigi with Matz.

    And yes, the headline should be rewritten to "Ruby 3 will have
(optional) type interfaces / annotations" - the key word being
optional (and in a separate "interface" .rbi file if you do not want
annotation in your script itself).

    Here's the referenced video from Matz's talk ->

    If anyone has other sources more news, please tell.

   Cheers.

Looks like Ruby is becoming Human unfriendly and computer friendly.

···

On Fri, Apr 19, 2019 at 2:11 PM Gerald Bauer <gerald.bauer@gmail.com> wrote:

Hello,

   Today's biggest (most upvoted) story on Hacker News:

   Ruby3 Will Have Types [1]

   Any comments or thoughts here on ruby-talk about the breaking news?

  Here are my two cents:

  As a head start you can add the missing Bool type today :-), use the
safebool library / gem [2]

   Sorbet is a great inspiring project. Hopefully, open source soon.
FYI: sruby - that is (secure) ruby [3] - is an alternative ruby
(subset) with an alternative (optional) type annotation syntax e.g.

   Sorbet's `sig {params(x: Integer).returns(String)}`

  becomes

  `sig [Integer] => [String]` or `sig Integer => String`

Note: Since the sig is "yes, it's just (regular) ruby" code you can
create an alias for types e.g. I = Integer, S = String and than use
sig I=>S, for example.

   Cheers. Prost. Happy (type-safe) coding with ruby.

[1] Types will be part of Ruby 3 stdlib source | Hacker News
[2] GitHub - learnpixelart/pixelart.howto: pixel art HOWTOs
[3] Small, Smart, Secure, Safe, Solid & Sound (S6) Ruby · GitHub

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Karthikeyan A K

Author of http://i-love-ruby.gitlab.io/

Hello,

Looks like Ruby is becoming Human unfriendly and computer friendly.

  I'd rather say sometimes (strong static) types help and that's the
philosophy of ruby, that is, there are many ways to do it and, thus,
if you need types you have the option.

   As an example - if you do source-to-source cross-compilation from
ruby [1][2] to secure "onchain" contract blockchain code you need
"strong" types - now if you don't have the option of types you can't
use ruby. If you do, you can. And - surprise, surprise - ruby is
actually the most beautiful contract scripting language.so far.

   Otherwise, yes, strong static types are more in the way than a help
if you start out.

    Cheers.

[1] GitHub - learnpixelart/pixelart.js: pixelart.js
[2] GitHub - orc721/sandbox: Ordgen / ORC-721 Sandbox

Hello,

The HN link references a Twitter post. Is there some kind of official
announcement, e.g. on ruby-lang.org, or at least something on the
tracker at bugs.ruby-lang.org? Twitter does not appear as a serious news
source to me.

   Update: That's the best I found so far - that's the RubyKaigi 2019
Progress Report on Ruby 3 (Planned for December 2020 following Ruby
2.7 planned this year for December 2019).

   See the Talk Slides titled "Static Analysis" [1]

   Ruby 3 static analysis will have four items:

    1. Type signature format
    2. Level-1 type checking tool
    3. Type signature profiling / prototyping tool
    4. Level-2 type checking tools

   ...

   Happy (type-safe) coding with ruby. Cheers. Prost.

[1] RubyKaigi2019 Ruby 3 Progress Report - Google Slides

good news !

I like it, until types are not mandatory and I am not forced to change my existing code :wink:

bye
n.

···

On 4/19/19 1:41 AM, Gerald Bauer wrote:

Hello,

    Today's biggest (most upvoted) story on Hacker News:

    Ruby3 Will Have Types [1]

    Any comments or thoughts here on ruby-talk about the breaking news?

   Here are my two cents:

   As a head start you can add the missing Bool type today :-), use the
safebool library / gem [2]

    Sorbet is a great inspiring project. Hopefully, open source soon.
FYI: sruby - that is (secure) ruby [3] - is an alternative ruby
(subset) with an alternative (optional) type annotation syntax e.g.

    Sorbet's `sig {params(x: Integer).returns(String)}`

   becomes

   `sig [Integer] => [String]` or `sig Integer => String`

Note: Since the sig is "yes, it's just (regular) ruby" code you can
create an alias for types e.g. I = Integer, S = String and than use
sig I=>S, for example.

    Cheers. Prost. Happy (type-safe) coding with ruby.

[1] Types will be part of Ruby 3 stdlib source | Hacker News
[2] GitHub - learnpixelart/pixelart.howto: pixel art HOWTOs
[3] Small, Smart, Secure, Safe, Solid & Sound (S6) Ruby · GitHub

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

here is a talk that Matz gave at the beginning of April about Ruby3 at RubyHACK… there are also a bunch of other talks from the event… come check us out next year!

Max

                 ///
               / ^ \
             ( o-o )
---oOOO--(_)--OOOo------------------------------------------

                   "Difficult things take time,
                    Impossible things take just a little bit more..."
                                -Art Bergs' Mom
   .oooO
   ( ) Oooo.
----\ (----( ) -------------------------------------
     \_) ) / Allen A. Maxwell
           (_/ (801) 790-4500 (w)
                    (801) 502-4745 (c)

···

On Apr 19, 2019, at 11:56 AM, Gerald Bauer <gerald.bauer@gmail.com> wrote:

Hello,

The HN link references a Twitter post. Is there some kind of official
announcement, e.g. on ruby-lang.org, or at least something on the
tracker at bugs.ruby-lang.org? Twitter does not appear as a serious news
source to me.

  Update: That's the best I found so far - that's the RubyKaigi 2019
Progress Report on Ruby 3 (Planned for December 2020 following Ruby
2.7 planned this year for December 2019).

  See the Talk Slides titled "Static Analysis" [1]

  Ruby 3 static analysis will have four items:

   1. Type signature format
   2. Level-1 type checking tool
   3. Type signature profiling / prototyping tool
   4. Level-2 type checking tools

  ...

  Happy (type-safe) coding with ruby. Cheers. Prost.

[1] RubyKaigi2019 Ruby 3 Progress Report - Google Slides

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

While types aren’t mandatory… this looks like what the ruby team will focus on
Improving ruby for machines, not for humans. :frowning:

Typechecking... etc should be developed as a separate product, not by the ruby language team IMO.
This type checking doesn't increase runtime performance right?

···

2019. 4. 20. 오전 4:12, Allen Maxwell <aamaxworks@gmail.com <mailto:aamaxworks@gmail.com>> 작성:

here is a talk that Matz gave at the beginning of April about Ruby3 at RubyHACK… there are also a bunch of other talks from the event… come check us out next year!

https://www.youtube.com/playlist?list=PLE7tQUdRKcyYoLJFe8Y6TMgZgUkqlSQzN <https://www.youtube.com/playlist?list=PLE7tQUdRKcyYoLJFe8Y6TMgZgUkqlSQzN&gt;

Max

                 ///
               / ^ \
             ( o-o )
---oOOO--(_)--OOOo------------------------------------------

                   "Difficult things take time,
                    Impossible things take just a little bit more..."
                                -Art Bergs' Mom
   .oooO
   ( ) Oooo.
----\ (----( ) -------------------------------------
     \_) ) / Allen A. Maxwell
           (_/ (801) 790-4500 (w)
                    (801) 502-4745 (c)

On Apr 19, 2019, at 11:56 AM, Gerald Bauer <gerald.bauer@gmail.com <mailto:gerald.bauer@gmail.com>> wrote:

Hello,

The HN link references a Twitter post. Is there some kind of official
announcement, e.g. on ruby-lang.org <http://ruby-lang.org/&gt;, or at least something on the
tracker at bugs.ruby-lang.org <http://bugs.ruby-lang.org/&gt;? Twitter does not appear as a serious news
source to me.

  Update: That's the best I found so far - that's the RubyKaigi 2019
Progress Report on Ruby 3 (Planned for December 2020 following Ruby
2.7 planned this year for December 2019).

  See the Talk Slides titled "Static Analysis" [1]

  Ruby 3 static analysis will have four items:

   1. Type signature format
   2. Level-1 type checking tool
   3. Type signature profiling / prototyping tool
   4. Level-2 type checking tools

  ...

  Happy (type-safe) coding with ruby. Cheers. Prost.

[1] RubyKaigi2019 Ruby 3 Progress Report - Google Slides

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

There is a link to this page which references video and slides (albeit
something with the animation seems wrong)

And here re the docs - also referenced from the main page

My 0.02€: I am still not convinced that static typing is that big win.
But then again, I never worked with a codebase of millions lines of
code. You would wonder though whether they picked the right language
for their project if they feel static typing is so important to
retrofit it to the language they used. And I find it ugly.

Kind regards

robert

···

On Fri, Apr 19, 2019 at 11:32 AM Marvin Gülker <m-guelker@phoenixmail.de> wrote:

Am 19. April 2019 um 10:41 Uhr +0200 schrieb Gerald Bauer:
> Any comments or thoughts here on ruby-talk about the breaking news?

The HN link references a Twitter post. Is there some kind of official
announcement, e.g. on ruby-lang.org, or at least something on the
tracker at bugs.ruby-lang.org? Twitter does not appear as a serious news
source to me.

--
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
- without end}
http://blog.rubybestpractices.com/

https://sorbet.org/

There is a link to this page which references video and slides (albeit
something with the animation seems wrong)
Gradual typing of Ruby at Scale · Sorbet

Here's the link to the RubyKaigi 2019 slides:
<State of Sorbet: A Type Checker for Ruby;
This does not run for me, though. Video is "coming soon"[1].

sorbet is a RubyGem. The tweet says it is going to be part of Ruby's
stdlib, which is an information I cannot find on sorbet.org. But I
think I have to bear with Twitter being a primary news source
nowadays. I would have appreciated it if someone involved could have
announced it on this mailing list (RubyTalk still is the largest online
Ruby community, isn't it?) or on ruby-lang.org. At least a ticket on the
tracker would have been nice, but there's nothing to be found if you
search it for "sorbet"[2].

My 0.02€: I am still not convinced that static typing is that big win.
But then again, I never worked with a codebase of millions lines of
code. You would wonder though whether they picked the right language
for their project if they feel static typing is so important to
retrofit it to the language they used. And I find it ugly.

Given the example on sorbet.org, I second these thoughts. But I'm only a
hobby programmer anyway.

[1]: State of Sorbet: A type checker for Ruby · Sorbet
[2]: Search - Ruby master - Ruby Issue Tracking System

···

Am 21. April 2019 um 13:42 Uhr +0200 schrieb Robert Klemme:

--
Blog: https://mg.guelker.eu

I tried to dig a little bit deeper into this out of curiosity and found the following pieces supporting Robert's statement.

An Experiment About Static and Dynamic Type Systems[1]:
* ​​»Debugging of type-errors is faster than handling static typed programming languages.«
* »Development time in dynamic languages is shorter.«
* »There is hardly any knowledge about...the impact of static type systems on the development time or resulting quality for a piece of software.«

An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl[2]:
* »No difference in program reliability [between static and dynamic type languages].«
* »Programming effort and length is less in dynamic languages.«

The Unreasonable Effectiveness of Dynamic Typing for Practical Programs[3]:
* »[Only] 2% of reported Github issues for Dynamic languages (Javascript, Clojure, Python and Ruby) are type errors.« [3]@37:38

My 2 cents on this: The internet is built on http which is not type-safe by design and doing exceptionally well. At the end of the day it’s the old question of developer vs. machine performance. Statically typed languages are probably running faster whereas dynamically typed languages make developers faster. What is the problem at hand? Choose your programming language depending on the problem / solution. If Ruby3 will allow me to be chosen for even more problems due to some (optional) type system, great!

Cheers,
Michael

[1]: https://courses.cs.washington.edu/courses/cse590n/10au/hanenberg-oopsla2010.pdf
[2]: https://page.mi.fu-berlin.de/prechelt/Biblio/jccpprt_computer2000.pdf
[3]: Log in to Vimeo

···

Am 21.04.2019 um 13:42 schrieb Robert Klemme <shortcutter@googlemail.com>:

[…] I am still not convinced that static typing is that big win. […]

>
> > Any comments or thoughts here on ruby-talk about the breaking news?
>
> The HN link references a Twitter post. Is there some kind of official
> announcement, e.g. on ruby-lang.org, or at least something on the
> tracker at bugs.ruby-lang.org? Twitter does not appear as a serious news
> source to me.

https://sorbet.org/

There is a link to this page which references video and slides (albeit
something with the animation seems wrong)
Gradual typing of Ruby at Scale · Sorbet

And here re the docs - also referenced from the main page
Overview · Sorbet

My 0.02€: I am still not convinced that static typing is that big win.
But then again, I never worked with a codebase of millions lines of
code. You would wonder though whether they picked the right language
for their project if they feel static typing is so important to
retrofit it to the language they used. And I find it ugly.

Kind regards

robert

--
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
- without end}
http://blog.rubybestpractices.com/

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

···

On Sun, 21 Apr 2019 at 9:43 pm, Robert Klemme <shortcutter@googlemail.com> wrote:

On Fri, Apr 19, 2019 at 11:32 AM Marvin Gülker <m-guelker@phoenixmail.de> > wrote:
> Am 19. April 2019 um 10:41 Uhr +0200 schrieb Gerald Bauer:

--
Regards,
Luke Hamilton
Serverless Solutions Developer