Short order ruby talk proposal

2 views
Skip to first unread message

Ben G

unread,
Nov 14, 2009, 3:27:12 PM11/14/09
to Ruby Manor
Forget frameworks.

What can you do in 40 lines of ruby?

Proposing to whizz through 5 or 6 useful, short and ad hoc ruby
scripts to show some of the tricks and tricks you might find useful in
using ruby as an everyday scripting/glue language.

Ben

David Salgado

unread,
Nov 14, 2009, 3:56:12 PM11/14/09
to ruby-...@googlegroups.com
Sounds like a great idea.

D

2009/11/14 Ben G <bengri...@gmail.com>:

edavey

unread,
Nov 14, 2009, 4:50:17 PM11/14/09
to Ruby Manor
Yes!

On Nov 14, 8:56 pm, David Salgado <da...@digitalronin.com> wrote:
> Sounds like a great idea.
>
> D
>
> 2009/11/14 Ben G <bengriffi...@gmail.com>:

Peter Ferne

unread,
Nov 16, 2009, 5:31:06 AM11/16/09
to ruby-...@googlegroups.com

+1
--
petef

James Adam

unread,
Nov 16, 2009, 6:55:15 AM11/16/09
to Ruby Manor
On Nov 14, 8:27 pm, Ben G <bengriffi...@gmail.com> wrote:
> Proposing to whizz through 5 or 6 useful, short and ad hoc ruby
> scripts to show some of the tricks and tricks you might find useful in
> using ruby as an everyday scripting/glue language.

I think this definitely sounds interesting.

Do you have some specific examples already in mind? If so, could you
(very briefly) describe the kinds of things that they do?

- James

Martin Sadler

unread,
Nov 16, 2009, 4:22:02 PM11/16/09
to ruby-...@googlegroups.com
Liking this one also. M

Murray Steele

unread,
Nov 16, 2009, 4:26:33 PM11/16/09
to ruby-...@googlegroups.com
Yeah, this chips into my lust for knowledge of what I can do with ruby
that's not my day job. Without knowing the sorts of scripts you want
to show off (although I think I can guess at least one: GO NORTH!)
it's hard to provide any feedback other than "yes please". If it
wouldn't be too much of a give-away for any talk you'd give, could you
give us a list of the scripts you'd want to talk about?

2009/11/16 Martin Sadler <mts...@googlemail.com>:

Ben Griffiths

unread,
Nov 16, 2009, 7:38:45 PM11/16/09
to ruby-...@googlegroups.com
Off the top of my head, and looking at some of the scripts I use, things I might cover (feedback please!) are:

• calling unix commands and IO streams 
      - using backticks, system, exec, Open3.popen3
      - using the PTY library (ships with standard library, good luck with finding any docs...)
      - what are STDIN, STDERR and STDOUT anyway?
• how do you make mysql do this and other magic pager tricks:

# mysql> select * FROM languages;
# Ruby     ▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆ (200/60.06%)
# Java     ▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆ (100/30.03%)
# Fortran  ▆▆▆▆▆▆ (30/9.01%)
# C#       (3/0.90%)
# 4 rows in set (0.00 sec)

• using signals for long-running scripts to get status reports, etc
• maybe a bit on command-line option parsing (not too much, is boring)
• batch renaming of files - everyone needs to know how to do this, right?
• what does STDIO.tty? actually mean, is it useful?
• if anyone's interested in MacOS-specific stuff - using pbcoby, osascript, folder actions
• fork/sleep as a poor man's cron

All a bit unix-y. Clearer?

Ben

Matt Patterson

unread,
Nov 17, 2009, 5:23:06 AM11/17/09
to ruby-...@googlegroups.com
On 17 Nov 2009, at 00:38, Ben Griffiths wrote:

> • if anyone's interested in MacOS-specific stuff - using pbcoby, osascript, folder actions

I did a short rb-appscript-focussed ruby talk at LRUG a couple of years ago. I'd be happy to do a bigger/better or shorter/better version of that talk covering the Apple Event + OSA and Ruby landscape (including general tools), this time with actually working demos...

Matt

--
Matt Patterson | Design & Code
<ma...@reprocessed.org> | http://www.reprocessed.org/


James Adam

unread,
Nov 17, 2009, 5:35:20 AM11/17/09
to ruby-...@googlegroups.com
Could be interesting - can you flesh out a proposal in a new thread, so that it doesn't get mixed up with Ben's?

- James

alan

unread,
Nov 19, 2009, 6:15:59 PM11/19/09
to Ruby Manor
+1 to this
Reply all
Reply to author
Forward
0 new messages