This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Laffs 4 Scala! Announcing Scala LOLZ library

3 replies
Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
All,

When writing scala have you ever Can has?   have you ever do not want?  Well now you can in viable scala code!  Announcing the creation of the Scala LOLZ library!  The entire purpose of this library is blow of steam, and enjoy yourself for a bit coming up with silly idioms in scala code.  Here's some examples from the current codebase:

import can.haz.lolz._
  • The emphatic operator
someExpr !!!!!!!!!   ///Verifies someExpr is not null
  • The questioning operator
x ?!!?  ///Asserts x is not null
  • Throwing runtime exception
O NOES !!   //Throws a new RuntimeException("DO NOT WANT");
  • Improved Assertions
Can has { somevalue != 0 }    //asserts that somevalue != 0
Can has somevalue ?           //asserts that some value is not null and returns it

  • Improved Equality
sometin IZ sometinElse ?

  • Improved pattern matching
sometin.WTF[A] OMG {
    case Cheezburger(x) => println("nom nom " + x)
  } OMG {
    case x => O NOES !!
  } ?!!?


I'm leaving the project open to anyone who needs a humurous distraction for a few hours (like I did) and wishes to contribute.   It's currently licensed under the "Please don't use my name if you use this library" license.  It is currently located on github.


Enjoy!
-Josh



David Pollak
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
Re: Laffs 4 Scala! Announcing Scala LOLZ library
Very, very funny!

On Thu, Feb 26, 2009 at 7:23 PM, Josh Suereth <joshua.suereth@gmail.com> wrote:
All,

When writing scala have you ever Can has?   have you ever do not want?  Well now you can in viable scala code!  Announcing the creation of the Scala LOLZ library!  The entire purpose of this library is blow of steam, and enjoy yourself for a bit coming up with silly idioms in scala code.  Here's some examples from the current codebase:

import can.haz.lolz._
  • The emphatic operator
someExpr !!!!!!!!!   ///Verifies someExpr is not null
  • The questioning operator
x ?!!?  ///Asserts x is not null
  • Throwing runtime exception
O NOES !!   //Throws a new RuntimeException("DO NOT WANT");
  • Improved Assertions
Can has { somevalue != 0 }    //asserts that somevalue != 0
Can has somevalue ?           //asserts that some value is not null and returns it

  • Improved Equality
sometin IZ sometinElse ?

  • Improved pattern matching
sometin.WTF[A] OMG {
    case Cheezburger(x) => println("nom nom " + x)
  } OMG {
    case x => O NOES !!
  } ?!!?


I'm leaving the project open to anyone who needs a humurous distraction for a few hours (like I did) and wishes to contribute.   It's currently licensed under the "Please don't use my name if you use this library" license.  It is currently located on github.


Enjoy!
-Josh






--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
Colin Bullock
Joined: 2009-01-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Laffs 4 Scala! Announcing Scala LOLZ library
I think what David meant to say was: ROFLOLMAO. ;)

- Colin
David Pollak
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
Re: Laffs 4 Scala! Announcing Scala LOLZ library


On Tue, Mar 3, 2009 at 7:24 AM, Colin Bullock <cmbullock@gmail.com> wrote:
I think what David meant to say was: ROFLOLMAO. ;)

Yep... that's exactly what I meant. :-)
 


- Colin



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland