Roger's woze

November 26, 2008

rpm build woe

Filed under: Uncategorized — rogerdpack @ 7:17 pm

Re: %prep in comments or changelogs: msg#00041

meant

echo “%_unpackaged_files_terminate_build 0″ >> ~/.rpmmacros

[from somewhere]

google chrome–I’m in love

Filed under: Uncategorized — rogerdpack @ 5:37 pm

This browser is slick! Despite its massive privacy and security problems [all have had some]…it just feels faster and less in your way than firefox does–hard to believe, but true. I love it :)

good description of gathering requirements

Filed under: Uncategorized — rogerdpack @ 5:36 pm

Requirements are always the hardest thing for me, as a programmer, to understand, so that I can adequately program something–especially if the end user doesn’t know either.

Here is a good page documenting it:

http://www.ibm.com/developerworks/rational/library/4166.html

For my own experience, I’d say use cases and pictures are the biggest helps.

Thoughts?

-=R

ruby named parameters

Filed under: Uncategorized — rogerdpack @ 1:00 am

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.

how to share memory across forks on OS X

Filed under: Uncategorized — rogerdpack @ 1:00 am

looks like instead of using “dev/zero” you use MAP_ANON.
Combine these two:

http://209.85.141.104/search?q=cache:qYkWXzCOanEJ:www.cs.brown.edu/courses/cs036/labs/overload.pdf+os+x+fork+shared+memory+mmap&hl=en&ct=clnk&cd=4&gl=us&client=firefox-a

ezra fork off project

Filed under: Uncategorized — rogerdpack @ 12:59 am

so…want an easy way to fork [and return data from a forked child to the parent?]
look no further than the forkoff project

ruby build woe

Filed under: Uncategorized — rogerdpack @ 12:59 am

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”

November 8, 2008

how to use github with mingw git

Filed under: Uncategorized — rogerdpack @ 7:25 am

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]

November 6, 2008

windows xp woe

Filed under: Uncategorized — rogerdpack @ 3:55 am

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]

Filed under: Uncategorized — rogerdpack @ 1:07 am

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

Older Posts »

Powered by WordPress