ruby named parameters

It appears possible:
Here is a type of syntax

class A
def go(a, b, c = 3)
[a, b, c]
end
allow_named_parameters :go
end

a = A.new
a.go(1, 2)
=> [1,2,3]
a.go(1, 2, :c => 4)
=> [1,2,4]
a.go(:a => 5, :b => 6)
=> [5,6,3]

And you didn’t have to add any code for it! Whoa!

Currently code can be found at

http://code.google.com/p/ruby-roger-useful-functions/wiki/NamedParameters

Rock on.

ruby build woe

gc.c:1465: error: ‘struct RArray’ has no member named ‘as’

meant “update your version to something newer”

gcc -O2 -g -Wall -Wno-parentheses -L. -rdynamic -Wl,-export-dynamic main.o dln.o dmyencoding.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o version.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o strlcpy.o strlcat.o dmyext.o -lpthread -lrt -ldl -lcrypt -lm -o miniruby
dmyext.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

meant “do make clean first”

how to use github with mingw git

So…you’ll need to create a private/public key, upload appropriately to github, then…

copy your private key to %HOME%/.ssh # for me it’s c:\documents and settings\random user

so it’ll be something like the file called ‘identity’ within that directory

and you’re good to go

[note that it'll be in unix format, not putty style private keys--you can convert between the two]

windows xp woe

Yes–I’m back on XP :)

with only 256MB RAM–yipes!

So…this happens.  I got [sporadically, but consistently]

blue screen of death with XP [any service pack] after re-installing XP

driver irql not less or equal with ndis.sys

Only difference with my previous config was that I had used microsoft's default drivers 
for the network card.
So...to discover the root problem, had to [1] [2] debug it [occurred even in safe mode].
using windbg stated that the error was an irq number "too high, or a bad memory access" 
(it was trying to access memory at 0x00000 -- obviously that was the problem, not
the misleading title).
Current fix: not use the admtek ADM8211 wireless 802.11b pci card I had installed.

Note--said the problem was in ndis.sys I believe--ndis somewhere.  The computer would also 
spontaneously reboot after each bsod.
Seems stable now. phew!

[1] http://www.techspot.com/vb/topic51365.html
[2] http://forums.majorgeeks.com/showthread.php?t=35246

how to compile ruby 1.9 with mingw [windows]

Here’s how I did it.

download ruby(one click installer will do)

download luis lavena’s ruby installer [1]

run it [it downloads mingw for you and build 1.8.6] by running rake

now run sandbox/mingw/…/rxvt.exe

edit the path

export PATH=/bin:$PATH

export PATH=/c/dev/downloads/rubyinstaller_clone/sandbox/mingw/bin:$PATH # in my case

now download the daily snapshot.tar.gz from ruby-lang.org

now untar it [somehow]

now [at least currently] run rxvt, navigate to it [/c/wherever], delete parse.c, run ./configure –enable-shared && make && make install

[1] http://github.com/luislavena/rubyinstaller/tree/master