hi,
Calvin started the day by giving his talk on "how i work"
it was a bit philosophical with some good takeaways
@Calvin can you provide a link to the actual slides ?
am listing some main and insightful points - according to me.
not an exact summary. it is more like what has stuck in my mind after three days
1. do not be afraid to read the source. he has an alias "be" to "bundle open <gem-name>"
eg. if he is cannot figure out something in active_record he will open up AR in textmate and look at the source
i liked that he created short alias and that looking at the source seems more "noble" than asking noob-ish ill-prepared questions
2. do not be afraid, just deploy. if there is a bug in most software - the world will not come to an end. be more careful if it is something like a payment system
3. bugs are the same as features. *mind-blown* They take up time and effort and must be prioritised same as features. not all bugs are important
feel free to ignore some of them. But some bugs are important. He gave an example where he solved a bug which he deemed important in an hour while
travelling in a train, over a crappy internet connection. And the user was wowed by the fast response.
4. get a good nights sleep. also sleep on a problem
Sorry if i got any points wrong
@Dheeraj had a nice talk on creating DSL's
where he did live coding. the ballsy bastard :-)
he started by pointing out some examples of DSL's in ruby and rails
first example was using yield to create a DSL eg. like the old rails router
PS: am writing the examples from memory.
@Dheeraj correct me if wrong and upload your slides and the demo code
eg.
Talk.new do |t|
t.author 'Dheeraj'
end
here app is an instance of a class which is yielded
resource is a method missing call
he pointed out that many people implement method_missing
but then you should also have a corresponding respond_to_missing?
@Swanad also pointed out that a common pattern would be to create an anonymous module and mix it in
will get respond_to? for free.
Then he moved on to pointing out that passing around the variable `t` is redundant
here he passed around an explicit named block which is instance_evaled
eg. the new rails router api
he also pointed out that instance_eval is used all over the place in rails
eg.
Talk.new do
author 'Dheeraj'
end
@Calvin pointed out an issue that it breaks self if we use instance_eval
@Calvin - can you explain the issue ?
@Dheeraj said that in ruby blocks are not first class citizens
i did not completely agreed. was trying to read-up on it.
which means that blocks are converted to procs - if you have a named block parameter
athough the format for multiple named blocks would become cumbersome
@Swanand pointed out that in older versions of ruby blocks to procs conversion was costly
@Dheeraj can you explain why blocks are not first-class citizens in ruby ?
@Dheeraj some syntax with `Proc.new { }` was unclear. you said you would look it up later. remember what it was ?
c42 ordered the pizza and @Dheeraj (and everyone) got distracted by the pizza :-)
and the talk wound-down here and broke for pizza
me (and others) raided c42 pantry
PS: i think "pantry manager" is a full-time job at c42
enjoyed the talk quite a lot
@swanad and @calvin interacted quiet a bit
@Dheeraj and guys please improve this summary
After having pizza, i wrested with my old nemesis - c42's projector
and then, i had a short talk on DRb - distributed ruby.
sorry could not cover Rinda
DRb is the RPC mechanism in ruby - like Corba or RMI
@Neha pointed out that it is Corba not "Cobra" :-P
and it went downhill from there :-)
in DRb lots of magic is happening under the covers
gave an example of a simple client and a server
to show the network calls happening
pointed out that a ACK is sent back - so it is a sync blocking call
will have to make it async yourself if needed:
- use threads
- push in a queue
- etc
pointed out the usage of `DRbUndumped`
that it is used to marshall across ruby classes which are defined on the server
but not on the client. ie, the DRb server returns an instance of a class defined on the server
Also the serialization is happening by marshalling - which is a ruby core binary format
not sure if it will work across ruby versions or implementations
@Prakash had the last presentation on "growing the ruby community in india"
- have more local meetups in more cities
- multiple simultaneous hackathons, open-hack days in bangalore iself.
- how to introduce ruby to students
- how to bring more women into the ruby community
it was lively debate and was quite interactive.
lots of points were discussed and i am tired of writing this mail and need to go to sleep
@Prakash do you want to write-up a summary ?
cheers,
deepak
On Friday, 17 May 2013 21:18:49 UTC+5:30, Aninda Kundu wrote:
Hey guys - the office is prepped and ready for the meetup. I'll be there by ten in case anyone from Mysore shows up bright and early. See you tomorrow!
Aninda.