location_city Bengaluru schedule Oct 9th 03:15 PM - Jan 1st 12:00 AM place Grand Ball Room 1

Although Ruby is not known as a functional language, it does support higher order functions in the form of lambdas and procs. Ruby's support for both object oriented and functional approaches, along with its conciseness, clarity, and expressiveness, make it an excellent choice as a general purpose programming language.

This session, geared toward the functional novice, shows how to implement functional approaches in Ruby, and shows why you would want to.

Topics covered will include:

  • in testing, using lambdas to verify that certain behaviors do or do not not raise errors
  • lambdas as predicates
  • deferred execution
  • composite functions
  • nested functions
  • using lambdas to hide variables
  • functions that return functions (partial application, currying)
  • lightweight event handling
  • chaining behavior with lambda arrays
  • how lambdas differ from conventional Ruby methods

Outline/Structure of the Talk

There will be a combination of slides, code examples, and running code.

Learning Outcome

Participants will have the tools they need to enrich their Ruby applications and gems with functional code.

Target Audience

FP beginners and/or those interested in learning how FP is done in Ruby, especially those coming from more conventional languages such as Java, C#, C++, and C.


schedule Submitted 7 years ago

  • Mushtaq Ahmed
    Mushtaq Ahmed
    Mr Scala
    schedule 7 years ago
    Sold Out!
    60 Mins

    Sync, Async, Blocking, Non-Blocking, Streaming are the buzzwords in the reactive programming world. This talk will attempt to attach some meaning to them. It will also demo the performance and resource consumption patterns for blocking-io, Scala Futures and RxJava Observables for comparable programs. Finally, a command line application that consumes twitter streams API will demo what is possible using the new reactive abstractions.

  • Mohit Thatte

    Mohit Thatte - Purely functional data structures demystified

    Mohit Thatte
    Mohit Thatte
    Helpshift Inc.
    schedule 7 years ago
    Sold Out!
    45 Mins

    Immutable, persistent data structures form a big part of the value proposition of most functional programming languages.

    It is important to understand why these data structures are useful and how they make it easier to reason about your program. 

    It is also instructive to see how these data structures are implemented to get a greater appreciation for the inherent tradeoffs between performance and immutability.

    In this talk I will do a walkthrough of some of these data structures drawing from the work of Chris Okasaki[1], and attempt to explain the essential ideas in a simple way. 

    [1] Purely Functional Data Structures, Chris Okasaki, School of Computer Science, Carnegie Mellon University 

  • Bhasker Kode

    Bhasker Kode - Writing and improving tail recursive functions

    Bhasker Kode
    Bhasker Kode
    Building stuff
    schedule 7 years ago
    Sold Out!
    45 Mins

    Brief history of recursion 

    Snippets from a few languages

    What is tail recursion?

    Design choices around recursion

    The importance of tail recursion in erlang

    How do you profile such improvements?




  • 45 Mins

    As Object Oriented programmers, we follow SOLID Design Principles for improving OO design of our applications.

    If you take the SOLID principles to their extremes, you arrive at something that makes Functional Programming look quite attractive.

    Objects are merely a poor man's closures. And ultimately Closures are a poor man's objects.

    This talk explains about how applying SOLID Design principles like Single Responsibility Principle (SRP) leads to many small classes. Furthermore, if you rigorously apply the Interface Segregation Principle (ISP), you'll eventually arrive at the ultimate Role Interface: an interface with a single method.

    If you apply the SRP and ISP like that, you're likely to evolve a code base with many fine-grained classes that each have a single method.

    Objects are data with behaviour. Closures are too are data with behaviour.

    This talk will enlighten how applying Object Oriented Design Principles to their extreme will lead you to Functional Programming.

    It's necessary for Object Oriented programmer to understand why Functional programming makes sense.

    At the end, this talk will also cover essential basics of Functional programming needed to be known for every Object Oriented Programmer.