GNU Smalltalk MD5 usage:

$ echo -n "foo" | md5
acbd18db4cc2f85cedef654fccc4a4d8

$ gst
st> PackageLoader fileInPackage: 'MD5'!
Loading package MD5
PackageLoader
st> MD5 hexDigestOf: 'foo'!
'acbd18db4cc2f85cedef654fccc4a4d8'

Generate a random salt?

st> Random between: 0 and: 35!

Intervals:

d := ((48 to: 57),(97 to:122))

st> ((48 to: 57),(97 to: 122)) do: [:x | (Character value: x) print]!
$0$1$2$3$4$5$6$7$8$9$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$y$zArray new: 36 "<-0x4c59a328>"

st> Smalltalk at: #i put: ((48 to: 57),(97 to: 122))!
Array new: 36 "<-0x4c597200>"
st> i size!
36

| d i a l s |
  i := 20.
  d := '0123456789abcdefghijklmnopqrstuvwxyz'.
  l := d size.
  a := Array new: i.
  1 to: i do: [ :x |
    a at: x put: (d at: (Random between: 1 and: l))
  ].
  s := String fromString: a.
  s printNl!

| d i l s |
  i := 20.
  d := '0123456789abcdefghijklmnopqrstuvwxyz'.
  l := d size.
  s := String new: i.
  1 to: i do: [ :x |
    s at: x put: (d at: (Random between: 1 and: l))
  ].
  s printNl!

sam@sol:~/tmp/smalltalk/flaw$ gst test.st
'w3ts9z4z25ce4iagvdd1'
sam@sol:~/tmp/smalltalk/flaw$ gst test.st
'37gct8mj6a06xzplre4s'

someone asked me:

what piques your interest in this world & in CS at large? i would like to hear some of your background.

hmm...

i'll start with the easy part of background:

  1. grew up on a small 150-years-old family farm in family of 4 kids, son of a chemistry teacher turned farmer and a math teather turned farmer's wife and mom
  2. went to purdue and studied cs
  3. work in software
  4. 29, married, one son

the next easiest is interests in CS:

  1. programming languages
  2. testing methodologies
  3. virtual machines (particularly userland concurrency models)

interests in this world is a quite difficult and deep question, i will take a shot at it:

  1. environment issues, right now focusing mainly on alternative energy (solar, wind, tide), water conservation, and biofuels (biodiesel particularly)
  2. astronomy, if i had a "pie in the sky" selfish wish in life it would be to walk on the moon or at least make it to space
  3. philosophy, mainly "what is truth and what does it mean to know it" and wondering if there is any meaning or purpose to the universe or any other experience at all
  4. political methods, election methods like condorcet, government structures like representative democracy vs. proportional representation, etc.

a lot of the time i wish i could opt out of the working world of technology and cars and just have a small garden and some chickens and be with my family under the blue sky. and be outside the range of light pollution! ;]

thanks for saying hello.

changed October 10, 2007