Re: [lsug] ideas for next dojo

From: Richard G.
Sent on: Wednesday, July 4, 2012 12:46 AM
Hello chaps,

AFAIK, it needs to be 2.10-M3 in order to be compatible with examples from http://scalamacros.org

The difficulties we had the other day with 2.10-M4 were due to refactoring. I haven't spent much time on it: I preferred simply stick with 2.10-M3 for the time being and benefit from the examples which compile as documented.

Do we have a 'official' github account for the dojos (for the macro thing, in particular) we could clone and contribute?

Thanks
Richard Gomes
mobile : [masked]
email  : [address removed]
twitter: frgomes
YM     : rgomes1997
gtalk  : rgomes1997
-------------------------------------------------------------------
Skype: dial skype2ippi           then dial[masked] when prompted.
GTalk: dial [address removed]  then dial[masked] when prompted.
SIP  : dial [address removed]
iNUM : [masked] http://www.inum.net/what-is-inum/voice-reach
On 03/07/12 23:08, Alois Cochard wrote:
Hi Andy, all,

Don't really got what you was trying to achieve, but I've just setup a github repo that use SBT 0.12 and Scala 2.10

It could serve as template for experimenting macro, each idea could be coded in different file, don't hesitate to fork it!


Actually there is just a very simple 'debug' macro that just do a println before returning back the expression.

Cheers,

On 3 July[masked]:05, Andy Hicks <[address removed]> wrote:
The code for the debug macro that we could not get to compile is here:


(yep, know there is a lot of imports, it was more an attempt at trial and error at the end of the evening )

I'm guessing there is a compiler flag for something simple that we are just missing to get things working


Andy



On 3 July[masked]:36, Richard Gomes <[address removed]> wrote:
I think it could be something initially very simple:

// define macro
def xpath ( root: scala.xml.NodeSeq,  s: Seq[Any] ): Iterable[ ... ] = macro { ... }

// apply very symple XPath expression onto root node
val result = xpath ( root,  List("/html", "/body", "/table", 0, "/tbody", "/tr", "/td", 2) )

Thanks
Richard Gomes
mobile : [masked]
twitter: frgomes
-------------------------------------------------------------------
Skype: dial skype2ippi           then dial[masked] when prompted.
GTalk: dial [address removed]  then dial[masked] when prompted.
SIP  : dial [address removed]
iNUM : [masked]

On 02/07/12 23:49, Andy Hicks wrote:
Sounds like a fun macro to try, could consider changing it to

val nodes =  "/html/body/table[1]/tbody/tr/td[3]".xpath

However we still have to get the basics of macros working first and then, I think, there is a lot of possible direction to go from there.
But it looks like we have at  least one task for next month.

Maybe we have a little homework before the next dojo

andy



On 2 July 2012 22:41, Richard Gomes <[address removed]> wrote:
Hello chaps,

I'd like to go ahead with the study of macros.
I have a suggestion:


Write a macro which understands XPath, and produce the corresponding expression using the existing scala.xml._ classes.
For example:

This line of code

    val nodes = XPath(root, "/html/body/table[1]/tbody/tr/td[3]")

would produce this:

   val nodes = ( ( root  \\"html"  \"body"  \"table"  apply(0) )  \"tbody"  \"tr"  \"td"  apply(2) )



Because we have very restricted time, we could start from something easier to 'parse' (or no parsing at all!), like this:

    val nodes = XPath(root, "html", "body", "table", 1 "tbody", "tr", "td", 3)


Thoughts?

Thanks

Richard Gomes
mobile : [masked]
twitter: frgomes
-------------------------------------------------------------------
Skype: dial skype2ippi           then dial[masked] when prompted.
GTalk: dial [address removed]  then dial [masked] when prompted.
SIP  : dial [address removed]
iNUM : [masked]


On 22/06/12 09:25, Richard Gomes wrote:
Hi Pawel,

I vote for the way it was done this time.
Reason: we learn more with different groups working on different things.

Thanks a lot.

Cheers :)

Richard Gomes
twitter: frgomes
-------------------------------------------------------------------
Skype: dial skype2ippi           then dial[masked] when prompted.
GTalk: dial [address removed]  then dial [masked] when prompted.
SIP:   dial [address removed]
inum.org: [masked]
mobile:   [masked]


On 18/05/12 14:01, Pawel Krupinski wrote:
Thanks everyone for attending!
Keep the code coming, post it somewhere, tweet about it etc. :)
How did everyone like the formula for figuring out what to work on
with people being able to choose?
Should we continue this or should everyone work on the same thing
during the dojos?

          Cheers
          Paweł


On Fri, May 18, 2012 at 12:38 PM, Andy Hicks<[address removed]>   wrote:
Hi

Thanks to Paweł for last nights dojo, was good fun.

The code for the mega mud AI Combinator Parser can be found at

https://github.com/andy1138/dojo-may-cparsing


andy






--
Please Note: If you hit "REPLY", your message will be sent to everyone on
this mailing list ([address removed])
This message was sent by Andy Hicks ([address removed]) from London Scala
Users' Group.
To learn more about Andy Hicks, 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]

--
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])
http://www.meetup.com/london-scala/
This message was sent by Richard Gomes ([address removed]) from London Scala Users' Group.
To learn more about Richard Gomes, visit his/her member profile: http://www.meetup.com/london-scala/members/8057610/
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])
http://www.meetup.com/london-scala/
This message was sent by Richard Gomes ([address removed]) from London Scala Users' Group.
To learn more about Richard Gomes, visit his/her member profile: http://www.meetup.com/london-scala/members/8057610/
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 Andy Hicks ([address removed]) from London Scala Users' Group.
To learn more about Andy Hicks, 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]




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Richard Gomes ([address removed]) from London Scala Users' Group.
To learn more about Richard Gomes, 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]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Andy Hicks ([address removed]) from London Scala Users' Group.
To learn more about Andy Hicks, 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]



--
Alois Cochard





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Alois Cochard ([address removed]) from London Scala Users' Group.
To learn more about Alois Cochard, 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

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