Many programming languages (including Perl, Ruby, and PHP) support hashes:
$color['apple'] = 'red';
$color['ruby'] = 'red';
$type['apple'] = 'fruit';
$type['ruby'] = 'gem';
This quickly lets me find the color or type of a given item.
In this sense, color() and type() are like mathematical funct
On Sun, 2008-04-06 at 16:52 -0700, Kelly Jones wrote:
> Many programming languages (including Perl, Ruby, and PHP) support hashes:
>
> $color['apple'] = 'red';
> $color['ruby'] = 'red';
>
> $type['apple'] = 'fruit';
> $type['ruby'] = 'gem';
>
> This quickly lets me find the color or type of a gi
You could use ActiveRecord.
Julian.
Learn Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME) VIDEO #3
OUT NOW
http://sensei.zenunit.com/
On 07/04/2008, at 9:52 AM, Kelly Jones wrote:
Many programming languages (including Perl, Ruby, and PHP) support
hashes:
$color['apple'] = 'red';
From: "Kelly Jones" <[EMAIL PROTECTED]>
> Many programming languages (including Perl, Ruby, and PHP) support hashes:
>
> $color['apple'] = 'red';
> $color['ruby'] = 'red';
>
> $type['apple'] = 'fruit';
> $type['ruby'] = 'gem';
>
> This quickly lets me find the color or type of a given item.
>
>
From: Julian Leviston <[EMAIL PROTECTED]>
> You could use ActiveRecord.
Without a database? I guess not. You'd still need at least SQLite.
But you are right, you could use ActiveRecord to obtain a nice object
oriented wrapper around the database so that it doesn't scare you.
Or, assuming you do
On Sun, Apr 6, 2008 at 4:52 PM, Kelly Jones <[EMAIL PROTECTED]> wrote:
> Many programming languages (including Perl, Ruby, and PHP) support hashes:
>
> $color['apple'] = 'red';
> $color['ruby'] = 'red';
>
> $type['apple'] = 'fruit';
> $type['ruby'] = 'gem';
>
> This quickly lets me find the co
As far as languages with two-way relation go, there are many; perhaps
the most prototypical is Lisp, in that either member of a pair within
an alist can be used to look the pair up, with no extra function or
second map definition required.
But PHP has pretty good support, too, actually. If you ha
(sorry I just hit send on a blank email; I'm absent-minded)
First, in the strictest mathematical sense, a relation from a set $a to a
set $b is a subset of the cross-product $a x $b.
(obviously, the mathematical notation is not a great way to represent this
in a program.)
Hence, a relation is a
On Sun, Apr 6, 2008 at 7:52 PM, Kelly Jones <[EMAIL PROTECTED]>
wrote:
> Many programming languages (including Perl, Ruby, and PHP) support hashes:
>
> $color['apple'] = 'red';
> $color['ruby'] = 'red';
>
> $type['apple'] = 'fruit';
> $type['ruby'] = 'gem';
>
> This quickly lets me find the color
On Sun, Apr 6, 2008 at 4:52 PM, Kelly Jones <[EMAIL PROTECTED]> wrote:
> Many programming languages (including Perl, Ruby, and PHP) support hashes:
>
> $color['apple'] = 'red';
> $color['ruby'] = 'red';
>
> $type['apple'] = 'fruit';
> $type['ruby'] = 'gem';
>
> This quickly lets me find the co
On Sun, Apr 6, 2008 at 11:51 PM, Casey <[EMAIL PROTECTED]> wrote:
> I hit reply-all... now am I suddenly subscribed to Perl and Ruby lists!?!
Huh, didn't notice the cross-posting. But no, you're not subscribed
to any new lists.
Since we're cross-posting, the translation of my sample would be
ap
On Sun, Apr 06, 2008 at 08:51:00PM -0700, Casey wrote:
> I hit reply-all... now am I suddenly subscribed to Perl and Ruby lists!?!
Be careful. Next time you do it you'll be subscribed to Haskell, OCaml
and Smalltalk lists.
Bwahahaha!
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
12 matches
Mail list logo