Aside

Learn Functional Programming using languages like Scala, Scheme, Haskell, F#, Ruby in a friendly and helpful environment

Functional Features of Java 8 Presentation

A screen cast of the presentation on Java 7 language features, and the Java 8 Lambda syntax from our June 2012 meetup.

Audio is very rough, I’ll try to fix it up when I have time.  It’s listenable with headphones on.

Resources:

Functional Features of Java8

First off: A big thanks to Kelsey Sala for taking us through the Scheme language.  Nothing like a little LISP to warp your brain!

Our next meeting will be Wednesday June 13th at 5:30pm.  Please make sure to RSVP if you are coming!  See below for some details about this meeting.

Did you know that Java will soon have it’s syntax expanded to allow you to pass code blocks to functions (lambdas)?  It’s true!  And guess what? Binary Compatible with older versions of Java.  Very cool.

I’ll take you guys on a tour of the new syntax, and how it actually works in behind the scenes.  I’ll also give you a comparison between how Java & Scala does their lambdas.

P.S. I might also dive into some of the non-functional syntax changes brought about by Java7 as well.

Hope to see you there!

 

December 5th – Scala Koans

After much back-and-forth we’ve settled on a date for the Scala Koans session.  We couldn’t get a date in November so the next meeting will be early December, on Monday the 5th at 5:30.  We’ll be meeting at the Investors Group building again, so make sure to meet in the lobby on time so we can all go up to the room together.  I’ll leave my cell phone number with the security desk in case there are any stragglers.

Koans?

What are “Koans” you might ask?  Well, it’s essentially when you posit a question to someone and the answer is not immediately apparent without some deep thought.  That translates over into our programming world as follows: “provide a broken unit test and try to fix it”.  So essentially we’ll provide a bunch of broken Scala unit tests to help with your understanding of Scala’s various constructs, and you’ll interactively “solve” the problems by making the unit tests pass.

What you’ll need before the meeting

  1. A laptop running Windows, MacOSX or Linux
  2. java 1.6.x (a.k.a. version 6)
  3. scala 2.9.1
  4. git (a recent version is preferable)

If you don’t have a laptop, no worries. We’ll pair you up with someone, because if there was ever a chance to really get comfortable with Scala, this would be it!

Remember to R.S.V.P. and tell your friends!  We take any and all developers.

Reminder: Clojure Training Nov 6-8

With the passing of John McCarthy this past week it’s made me realize the importance of the LISP programming language he invented.  50+ years since its invention LISP has endured via it’s various dialects like Scheme and Clojure (the JVM-friendly dialect).  MavenThought is hosting a 3-day Hands-on Clojure training (Nov 6-8) and has two seats left.  I’ll be there and I hope to see some fellow WfPG members as well (not to mention, Jets vs. Panther’s tickets are being given away as a door prize!)

Scala Language Tour

At our last session in September you might remember I did an overview of Scala and went waaaaay over time. This was a great dry-run for the session I did at Java One 2011 last week. I took the slides and examples and trimmed as much fat as I possibly could. I’m proud to report I nearly completed all my slides and examples within the hour time slot I was allowed. The only slides I couldn’t cover were the “Tuple”and some auxiliary slides on Closures, Partially Applied Functions and Curried Functions.

Checkout my final slides and examples: Scala Language Tour

Also, here’s some pictures from JavaOne

Enjoy

Clojure Training Nov 6-8 2011


As mentioned at our last meeting, Amir is arranging Clojure training to be held here in Winnipeg: November 6-8 2011 (Sunday->Tuesday).

I had the pleasure of meeting and hanging around with the instructor (Sebastian Galkin) at Strange Loop 2011 a few days back. We even banged out a podcast with him. Sebastian is a great guy, very intelligent and well spoken. I really would like this training to come to Winnipeg, so I suggest you beg your employer to pony up the measly $900 for the 3-days of training. To put that into perspective, if you’re a Java developer, it’s like the cost for 1 day of Spring Framework training.

Beg, borrow, steal, but make sure you register. The nice thing about Clojure is it enforces functional programming paradigms more strictly than a language like Scala, however by taking Sebastian’s training you’ll learn how to make practical use of its features, including the strong Java Interrop.

Register over at MavenThought, or email clojure@maventhought.com if you have questions. Group discounts available upon request.

Follow up to the July 2011 Event

First of a big thanks (literally, heh) I hope you enjoyed the first meeting of our little group.  Very happy to see so many interested in FP, and glad to see the turnout for the “post-meeting” at the Kings Head.

Video

Links

Some of the links I mentioned in my talk:

Followup for Pure Functions w.r.t. Setters/Getters

I did some further digging, posting a question on Stack Exchange about Setters/Getters in Functional Programming.  Daniel Sobral (very learned in the Scala community) answered with what Amir had brought up, you essentially get a new copy of the object on which you invoked the setter. The new object has the modified property value.  Further to that, he pointed out the “copy” method of Case classes in Scala.  Essentially you can use it like this:

val modEmployee = origEmployee.copy(salary = 50000)

Now modEmployee contains a copy of origEmployee with the modified salary property.  Referential transparency of the getter for the salary property is maintained because the origEmployee’s salary remains the same and anyone with a reference to it doesn’t see the change at all.

IRC

I’ve setup an IRC chan for us to hang out on and chat, it’s up on Freenode at #wfpg.