align-toparrow-leftarrow-rightbackbellblockcalendarcamerachatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-crosscrosseditemptyheartfacebookfullheartglobegoogleimagesinstagramlocation-pinmagnifying-glassmailmoremuplabelShape 3 + Rectangle 1outlookpersonplusImported LayersImported LayersImported Layersshieldstartwitteryahoo

Re: [lsug] Ideas for tomorrow's Dojo

From: Andy H.
Sent on: Tuesday, April 24, 2012 3:18 PM
Hi,

I've just purchased the ' Scala for the Impatient' book. This has some exercises at the end of each chapter that we may be able to use. A couple of random exercises are

Write a function that turns an array of Double values into a two- dimensional array. Pass the number of columns as a parameter. For example, with Array(1, 2, 3, 4, 5, 6) and three columns, return Array(Array(1, 2, 3), Array(4, 5, 6)). Use the grouped method.

Write an object Conversions with methods inchesToCentimeters, gallonsToLiters, and milesToKilometers.


but there is about 10 tasks per chapter. 


Jim - I've had a look at the Parsing chapter. It looks like it does through how to write a calculator and the exercise is to add / and % to the code, so maybe able to modify and could be interesting.

I'll bring the book tomorrow
andy

  

On 24 April[masked]:10, Jim Collins <[address removed]> wrote:
Hi,

I spoke to someone about a problem I am having with combinator parsing here is the main part of what I said:

I want to build a desktop calculator in Scala, similar to the example given in Bjarne Stroustrop's C++ book. Here is a link to the C++ code.

I have had a look at the Combinator Parsing chapter in "Programming in Scala" and the Arithmetic expressions example. I copied the code and can parse arithmetic expressions such as 7 + 3 * 6. The parser tells me if the expression is valid or not but what I would like to do is calculate the value of the expression.

I have something that can calculate the values of arithmetic expressions using case classes based on the Expr classes in the pattern matching chapter.

Would something like this be a suitable problem?

Thanks

Jim


On 24 April[masked]:57, Pawel Krupinski <[address removed]> wrote:
Hey everyone.
Any ideas for tomorrow's Dojo or are we doing the code katas again?

      Cheers
      Paweł



--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
http://www.meetup.com/london-scala/
This message was sent by Pawel Krupinski ([address removed]) from London Scala Users' Group.
To learn more about Pawel Krupinski, visit his/her member profile: http://www.meetup.com/london-scala/members/6361532/
Set my mailing list to email me

As they are sent
http://www.meetup.com/london-scala/list_prefs/?pref=1

In one daily email
http://www.meetup.com/london-scala/list_prefs/?pref=2

Don't send me mailing list messages
http://www.meetup.com/london-scala/list_prefs/?pref=0
Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]






--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jim Collins ([address removed]) from London Scala Users' Group.
To learn more about Jim Collins, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

  • Scala Dojo

    Web site for monthly Scala Dojo

  • Scala Jobs

    Google Group of Scala Jobs in the London Area

  • Scalar Conf

    16 April 2016 in Warsaw, Poland

  • _.underscore

    Scala consultants, trainers, and developers, based in London, UK

  • Springer

    Help and supporters of the monthly dojo

  • Skills Matter

    Provide the venue for many of our meetings.

  • Mind Candy

    Help with the Adv Scala Meet-up

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy