T
Tim Sutherland
http://www.rubygarden.org/ruby?RubyNews/2004-12-13
Ruby Weekly News 13th - 19th December 2004
------------------------------------------
A summary of the week's activity on the ruby-talk mailing list / the
comp.lang.ruby newsgroup. This summary is brought to you by Tim Sutherland
(TimSuth).
Threads
-------
Interesting threads this week included:
[Unicode in Ruby and a Ruby Reference]
--------------------------------------
Mike McGavin asked about Ruby's Unicode support. Matz replied
"Handing Unicode (UTF-8) is OK. Ruby's strings can contain any
sequence of bytes. Regex engine is aware of UTF-8 so that you can
use pattern match against Unicode characters. For encoding
conversion, iconv library is your friend.
This is weaker than Python, but does most of the jobs. We are working
on M17N Ruby (M17N stands for multilingualization), in which you can
handle many encodings (e.g. UTF-8, UTF-16, Big5, GBK, and much more)
without conversion."
Giulio Piancastelli:
"How a literal Unicode character can be inserted in a Ruby String? I
recall Java having the \uNNNN escaping, for example, but I wasn't able
to find a similar mechanism for Ruby."
Austin Ziegler:
"\u4321 is a UTF-16BE encoding, so you would need to know the
equivalent UTF-8 encoding, e.g., \xe4\x8c\xa1."
[64-bit integers in Ruby/DL]
----------------------------
Jamis Buck:
"Is there any way, without modifying Ruby/DL itself, to specify
a function that returns a 64-bit integer using Ruby/DL? And to pass
a 64-bit integer to a function?"
Florian Gross:
"As far as I know Ruby/DL does not yet work properly on 64 bit platforms.
The author plans to fix that, but didn't have the time to do it when I
last contacted him.
I think this would involve changes in lots of places because Ruby/DL
seems to be using one-byte type tokens and .pack() internally. However
if you want to use the native bit-width of the system you will need to
use "L_" instead of "L" and so on in the pack arguments. So I think this
would involve changing the semantics in quite a few code locations..."
[ruby/SDL question]
-------------------
Ferenc Engard was thinking of writing a game in Ruby and was having
trouble installing Ruby/SDL.
Florian Gross suggested [Ruby/Gosu] as an alternative, saying it "can do
quite a bit more than SDL, but does not work perfectly on non-Windows
platforms yet."
Logan Capaldo added that "another option is [RUDL] which like Ruby/SDL is
an SDL binding for ruby."
gltewalt:
"Except RUDl factors out more low level tinkering than ruby/sdl.
It has built in methods to help deal with collision detection, etc.
RUDL is essentially pyGame for Ruby, cleaned up abit to do away with
what the author disliked about pyGame"
[[SUMMARY] Learning Tic-Tac-Toe (#11)]
--------------------------------------
James Edward Gray II summarised last week's Ruby Quiz, writing
"The two solutions posted are similar. Basically, they learn to avoid their
mistakes over time. They accomplish this by "scoring" the moves they made at
each position in a game, based on whether they won or lost. Eventually, this
knowledge allows them to select mainly strong moves, simply by remembering how
they've done in the past, in the same position."
[Ruby is like baby Alpaca yarn...]
----------------------------------
Jamis Buck wrote:
"Just wanted to share this. I often talk with my wife about what I'm
learning about Ruby, or about how Ruby makes various tasks simpler.
She, being a knitter, always responds by finding some comparison
between knitting and programming (and, I must say, her comparisons are
strikingly on target).
Tonight, I was telling her how pleasurable it is to read Ruby code,
especially as compared to other programming languages. After
a moment's thought she nodded, replying, "Ruby is like baby Alpaca
yarn..."
What a great simile. I may have to use that as a sig sometime."
[[QUIZ] Scrabble Stems (#12)]
-----------------------------
Martin DeMello came up with this week's Ruby Quiz:
"In Scrabble parlance, a 'bingo stem' is defined as a set of six
letters that combines with a large fraction of the alphabet to anagram
to valid seven letter words (a 'bingo' is a move using all seven tiles
on your rack). For instance, one of the more prolific stems, SATIRE,
combines with twenty letters, A, B, C, D, E, F, G, H, I, K, L, M, N,
O, P, R, S, T, V, W (forming words like ASTERIA, BAITERS, RACIEST
..).
Write a program that, given a word list and a cutoff n, finds all 6
letter stems that combine with n or more letters, sorted in order of
how many distinct letters they combine with."
New Releases
------------
* [rand.rb 0.9: Random access methods for Enumerables]
Ilmari Heikkinen and Christian Neukirchen's rand.rb was updated.
This library adds methods to do with randomness to Array,
Enumerable and Hash, for example Array#shuffle.
* [RubyWebDialogs 0.1.2]
Erik Veenstra released a new version of [RubyWebDialogs], which
allows developers to write GUIs in HTML.
* [Rails 0.9: Fast development, breakpoints, validations...]
David Heinemeier Hansson announced a new major version of the
[Rails] web application framework. Important changes include a
faster development environment - previously Rails applications
were much faster when deployed than when being developed.
Breakpoints have also been added. These allow web developers to
"inspect an application during execution, change the model, and
resume."
* [RubyScript2Exe 0.2.1] [Tar2RubyScript 0.4.1]
Erik Veenstra updated [RubyScript2Exe] to work with RubyGems.
RubyScript2Exe collects a Ruby program along with the Ruby runtime
and libraries into a single executable for Windows or Linux. Erik
also updated [Tar2RubyScript], which collects a Ruby program
consisting of several files into one .rb script. RubyScript2Exe
and Tar2RubyScript can be used in combination or separately.
* [Ruby Flow Tracer] [Ruby Coverage Validator]
Stephen Kellett announced a beta of [Ruby Bug Validator], a
proprietary tool that keeps track of the execution history of
running Ruby programs, providing information on bugs that are
otherwise difficult to reproduce. To test the software you must
apply to join the beta-test program, "not all applicants will be
accepted". Stephen also announced a beta of [Ruby Coverage
Validator], a source-code coverage analysis tool.
Ruby Weekly News 13th - 19th December 2004
------------------------------------------
A summary of the week's activity on the ruby-talk mailing list / the
comp.lang.ruby newsgroup. This summary is brought to you by Tim Sutherland
(TimSuth).
Threads
-------
Interesting threads this week included:
[Unicode in Ruby and a Ruby Reference]
--------------------------------------
Mike McGavin asked about Ruby's Unicode support. Matz replied
"Handing Unicode (UTF-8) is OK. Ruby's strings can contain any
sequence of bytes. Regex engine is aware of UTF-8 so that you can
use pattern match against Unicode characters. For encoding
conversion, iconv library is your friend.
This is weaker than Python, but does most of the jobs. We are working
on M17N Ruby (M17N stands for multilingualization), in which you can
handle many encodings (e.g. UTF-8, UTF-16, Big5, GBK, and much more)
without conversion."
Giulio Piancastelli:
"How a literal Unicode character can be inserted in a Ruby String? I
recall Java having the \uNNNN escaping, for example, but I wasn't able
to find a similar mechanism for Ruby."
Austin Ziegler:
"\u4321 is a UTF-16BE encoding, so you would need to know the
equivalent UTF-8 encoding, e.g., \xe4\x8c\xa1."
[64-bit integers in Ruby/DL]
----------------------------
Jamis Buck:
"Is there any way, without modifying Ruby/DL itself, to specify
a function that returns a 64-bit integer using Ruby/DL? And to pass
a 64-bit integer to a function?"
Florian Gross:
"As far as I know Ruby/DL does not yet work properly on 64 bit platforms.
The author plans to fix that, but didn't have the time to do it when I
last contacted him.
I think this would involve changes in lots of places because Ruby/DL
seems to be using one-byte type tokens and .pack() internally. However
if you want to use the native bit-width of the system you will need to
use "L_" instead of "L" and so on in the pack arguments. So I think this
would involve changing the semantics in quite a few code locations..."
[ruby/SDL question]
-------------------
Ferenc Engard was thinking of writing a game in Ruby and was having
trouble installing Ruby/SDL.
Florian Gross suggested [Ruby/Gosu] as an alternative, saying it "can do
quite a bit more than SDL, but does not work perfectly on non-Windows
platforms yet."
Logan Capaldo added that "another option is [RUDL] which like Ruby/SDL is
an SDL binding for ruby."
gltewalt:
"Except RUDl factors out more low level tinkering than ruby/sdl.
It has built in methods to help deal with collision detection, etc.
RUDL is essentially pyGame for Ruby, cleaned up abit to do away with
what the author disliked about pyGame"
[[SUMMARY] Learning Tic-Tac-Toe (#11)]
--------------------------------------
James Edward Gray II summarised last week's Ruby Quiz, writing
"The two solutions posted are similar. Basically, they learn to avoid their
mistakes over time. They accomplish this by "scoring" the moves they made at
each position in a game, based on whether they won or lost. Eventually, this
knowledge allows them to select mainly strong moves, simply by remembering how
they've done in the past, in the same position."
[Ruby is like baby Alpaca yarn...]
----------------------------------
Jamis Buck wrote:
"Just wanted to share this. I often talk with my wife about what I'm
learning about Ruby, or about how Ruby makes various tasks simpler.
She, being a knitter, always responds by finding some comparison
between knitting and programming (and, I must say, her comparisons are
strikingly on target).
Tonight, I was telling her how pleasurable it is to read Ruby code,
especially as compared to other programming languages. After
a moment's thought she nodded, replying, "Ruby is like baby Alpaca
yarn..."
What a great simile. I may have to use that as a sig sometime."
[[QUIZ] Scrabble Stems (#12)]
-----------------------------
Martin DeMello came up with this week's Ruby Quiz:
"In Scrabble parlance, a 'bingo stem' is defined as a set of six
letters that combines with a large fraction of the alphabet to anagram
to valid seven letter words (a 'bingo' is a move using all seven tiles
on your rack). For instance, one of the more prolific stems, SATIRE,
combines with twenty letters, A, B, C, D, E, F, G, H, I, K, L, M, N,
O, P, R, S, T, V, W (forming words like ASTERIA, BAITERS, RACIEST
..).
Write a program that, given a word list and a cutoff n, finds all 6
letter stems that combine with n or more letters, sorted in order of
how many distinct letters they combine with."
New Releases
------------
* [rand.rb 0.9: Random access methods for Enumerables]
Ilmari Heikkinen and Christian Neukirchen's rand.rb was updated.
This library adds methods to do with randomness to Array,
Enumerable and Hash, for example Array#shuffle.
* [RubyWebDialogs 0.1.2]
Erik Veenstra released a new version of [RubyWebDialogs], which
allows developers to write GUIs in HTML.
* [Rails 0.9: Fast development, breakpoints, validations...]
David Heinemeier Hansson announced a new major version of the
[Rails] web application framework. Important changes include a
faster development environment - previously Rails applications
were much faster when deployed than when being developed.
Breakpoints have also been added. These allow web developers to
"inspect an application during execution, change the model, and
resume."
* [RubyScript2Exe 0.2.1] [Tar2RubyScript 0.4.1]
Erik Veenstra updated [RubyScript2Exe] to work with RubyGems.
RubyScript2Exe collects a Ruby program along with the Ruby runtime
and libraries into a single executable for Windows or Linux. Erik
also updated [Tar2RubyScript], which collects a Ruby program
consisting of several files into one .rb script. RubyScript2Exe
and Tar2RubyScript can be used in combination or separately.
* [Ruby Flow Tracer] [Ruby Coverage Validator]
Stephen Kellett announced a beta of [Ruby Bug Validator], a
proprietary tool that keeps track of the execution history of
running Ruby programs, providing information on bugs that are
otherwise difficult to reproduce. To test the software you must
apply to join the beta-test program, "not all applicants will be
accepted". Stephen also announced a beta of [Ruby Coverage
Validator], a source-code coverage analysis tool.