Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
wyhaines has joined #ruby
hadees has joined #ruby
hooper has joined #ruby
willej has joined #ruby
ctp has joined #ruby
eywu1 has joined #ruby
techhelp has joined #ruby
<techhelp>
I've been struggle with the following error. Google no help.
<techhelp>
[exec] /Library/Ruby/Site/1.8/rubygems/version.rb:187:in `initialize': Malformed version number string ~> 0.4.7 (ArgumentError)
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/lockfile_parser.rb:88:in `new'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/lockfile_parser.rb:88:in `parse_spec'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/lockfile_parser.rb:55:in `parse_source'
willej has joined #ruby
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/lockfile_parser.rb:20:in `send'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/lockfile_parser.rb:20:in `initialize'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/lockfile_parser.rb:14:in `each'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/lockfile_parser.rb:14:in `initialize'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:40:in `new'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:40:in `initialize'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/dsl.rb:131:in `new'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/dsl.rb:131:in `to_definition'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/dsl.rb:8:in `evaluate'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:17:in `build'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler.rb:138:in `definition'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler.rb:126:in `load'
<techhelp>
[exec] from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler.rb:117:in `setup'
a1ph4g33k has quit [#ruby]
<techhelp>
sorry for the long paste
<banister`sleep>
techhelp: STOP
levity_island has joined #ruby
<banister`sleep>
techhelp: now you have to quit the channel and never come back
<ckrailo>
uh oh dont ask seanstickle he'll mean you.
<seanstickle>
:P
<Toerkeium>
he looks like a intelligent guy, who realized I didn't know anything about ruby? huh?
<Toerkeium>
heh
charlenopires has joined #ruby
<Toerkeium>
seriously, a place to read about how it works?
<Toerkeium>
ok, thanks anyway
<ckrailo>
i've never worked with passenger
<ckrailo>
so no idea from me :(
charlenopires_ has joined #ruby
<Toerkeium>
how do you work with ruby ckrailo?
wmoxam has joined #ruby
waxjar has joined #ruby
<ckrailo>
Toerkeium: uhhh on a mac with rvm and gems like rackup in a framework? O.o
<Toerkeium>
heh ok
tomzx has joined #ruby
<Toerkeium>
imagine when I start coding in ruby
<Toerkeium>
don't think I won't come back :P
<ckrailo>
Toerkeium: there's some tuts on the interwebz. rubykoans, ruby-warrior, etc.
cook1es has joined #ruby
<Toerkeium>
ckrailo: does this phusion passenger module changes they way code is executed? I mean, if you upload your apps on a server using this module, will they work? or it's just an easy way to setup ruby on apache?
randym has joined #ruby
mayfield has joined #ruby
<ckrailo>
i have no clue how to use ruby and apache
<ckrailo>
we use nginx for our ruby stuff, and i dont set that up either.
<Toerkeium>
ok, thanks for answering ckrailo
<Toerkeium>
I'll leave for a beer and take care of this stuff tomorrow
<shevy>
when I compile something, I'll copy the results of everything, if "make" finishes successfully
<shevy>
then I can at a later time, just do "make install" but also "make clean"
<shevy>
for every program that is compiled
<epochwolf|vps>
shevy: isn't that how compiling works already?
<epochwolf|vps>
everything I've compiled saves stuff to a build folder.
<shevy>
epochwolf|vps well yeah
<shevy>
I kinda removed everything after compilation was finished, to save space
<epochwolf|vps>
shevy: make a script that does "./configure && make && make install && make clean"
startling has joined #ruby
<shevy>
hmm why the "make clean" part?
<epochwolf|vps>
if you want to clear up disk space after you're done.
<epochwolf|vps>
I assume that's what you want to do.
<epochwolf|vps>
This is why *nix systems have shell scripting. If you want to automate something. Write a script.
<shevy>
ah
Squee-D has joined #ruby
<shevy>
I dont think I need to clear up the disk space really
<startling>
if you don't make clean, though, you'll probably have a faster build next time
<epochwolf|vps>
shevy: then don't run make clean?
<shevy>
yeah! and I could just restore to an earlier working point (when I manage to break something)
<shevy>
imagine even this, I could make snapshots of when the system worked... and when it did not... and revert again when some things (in some days or weeks) suddenly no longer work!
<epochwolf|vps>
startling: I feel like I'm sitting in a logic vacuum.
<epochwolf|vps>
shevy: it's called backups.
ribayr has joined #ruby
<shevy>
I have backups, but no idea how things fit into it all anymore... take this error I am struggling wiht: gdk-pixbuf-2.23.5/gdk-pixbuf/.libs/lt-gdk-pixbuf-query-loaders: symbol lookup error: /usr/lib/libgmodule-2.0.so.0: undefined symbol: g_private_replace
<shevy>
it all makes me angry what I did too
<shevy>
I just need to jump back ONE hour in time!
<startling>
epochwolf|vps: ? sorry if I missed some context, I came here pretty recently
<startling>
shevy: version control?
<epochwolf|vps>
startling: it could just be my job.
<shevy>
startling yeah one day hopefully
<startling>
shevy: why not now?
<epochwolf|vps>
startling: or maybe it's this room :)
<shevy>
because right now I have no idea what is all going on and I feel like reinstalling everything
* epochwolf|vps
hugs his mac and time machine.
<startling>
shevy: and install git while you're at it
tvw has joined #ruby
<startling>
epochwolf|vps: ah, I thought you meant because of what I said.
pdtpatr1ck has joined #ruby
norex has joined #ruby
nari has joined #ruby
looopy has joined #ruby
frishi has joined #ruby
shobhitg has joined #ruby
memalloc has joined #ruby
liluo has joined #ruby
werdnativ has joined #ruby
QaDeS_ has joined #ruby
macmartine has joined #ruby
fermion has joined #ruby
memalloc has quit [#ruby]
CheeToS has joined #ruby
snip_it has joined #ruby
norex has joined #ruby
mxweas_ has joined #ruby
jacortinas has joined #ruby
samsonjs has joined #ruby
otakutomo has joined #ruby
h4mz1d has joined #ruby
shobhitg has joined #ruby
ksysk has joined #ruby
cousine has joined #ruby
gen0cide_ has joined #ruby
kylemcgill has joined #ruby
cook1es has joined #ruby
heftig has joined #ruby
heftig has joined #ruby
andrewhl has joined #ruby
cobragoat has joined #ruby
ksysk has quit [#ruby]
looopy has joined #ruby
lastk has joined #ruby
_|christian|_ has joined #ruby
<lastk>
someone using the gem isolate?
looopy has joined #ruby
gh has joined #ruby
gh has quit [#ruby]
cloke has joined #ruby
marcamilly has joined #ruby
looopy has joined #ruby
pu22l3r_ has joined #ruby
tymat has joined #ruby
Jay_Levitt has joined #ruby
fayimora has joined #ruby
shadoi has joined #ruby
werdnativ has joined #ruby
<lastk>
hi guys, how I can run my tests with ruby test.rb instead of rspec teste.rb
pp01bit has joined #ruby
luckyruby has joined #ruby
austinbv has joined #ruby
mikeycgto has joined #ruby
mikeycgto has joined #ruby
<austinbv>
how is 1.9.3?
saurb has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
bbttxu has joined #ruby
eywu has joined #ruby
milkpost has joined #ruby
<senthil>
damn, does active_support really take 1 entire sec to load?
<shevy>
austinbv complicated as always
<shevy>
senthil sounds pretty fast
<austinbv>
senthil: pretty good for how awesome it is
<shadoi>
senthil: 1.9.3 improves load times drastically
Drewch has joined #ruby
Drewch has quit [#ruby]
Drewch has joined #ruby
<senthil>
shevy: faraday, json, rspec all take 0.5 sec, AS alone takes 1 sec
<senthil>
shadoi: am using 1.9.3 performance patched version
<shadoi>
senthil: nasty
<shadoi>
senthil: I use extlib and/or exctract the parts of AS I need these days.
<shadoi>
extract*
<senthil>
I must be doing something wrong, all I want is active_support/inflector, which loads instantly in pry, but takes a while
al3xnull has joined #ruby
startling has joined #ruby
<senthil>
when used with rspec
jpreyer has joined #ruby
mikeycgto has joined #ruby
mikeycgto has joined #ruby
<senthil>
shadoi: I want #constantize and #camelize, the later depends on .../inflections.rb, i.e. an entire file, so I was a bit hesitant
<shadoi>
extlib has alternatives
<senthil>
shadoi: i'm looking at it, doesn't have String#constantize
<shadoi>
but… it does seem odd it takes longer in rspec
Dreamer3 has joined #ruby
<senthil>
shadoi: exactly! i'm only requiring activesupport/inflector, not sure what's happening
<shadoi>
you could try the profiler to see where it's spending time…
<senthil>
shadoi: yea good idea...think entire sys might need a restart
Squee-D has joined #ruby
mikepack has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
samsonjs has joined #ruby
looopy has joined #ruby
senthil has joined #ruby
<senthil>
shadoi: i'm an idiot, it was vcr, not AS
maletor has joined #ruby
<shadoi>
:)
libertyprime has joined #ruby
austinbv has joined #ruby
libertyprime has joined #ruby
philcrissman has joined #ruby
philcris_ has joined #ruby
bbttxu_ has joined #ruby
v0n has joined #ruby
stephenjudkins has joined #ruby
asteros has joined #ruby
sdwrage has joined #ruby
radic_ has joined #ruby
ribayr has joined #ruby
excel542 has joined #ruby
mxweas_ has joined #ruby
davidcelis has joined #ruby
elake has joined #ruby
libertyprime has joined #ruby
akem has joined #ruby
adrakoa has joined #ruby
<adrakoa>
hi
<senthil>
wow, 'bundle install --path vendor' && 'bundle package' halves the time to run specs
ryanf has joined #ruby
<senthil>
when specs are run w/ 'bundle exec rspec' ofcourse
<senthil>
anyone else doing this?
austinbv has joined #ruby
matti has joined #ruby
looopy has joined #ruby
wenbert has joined #ruby
brondsem has joined #ruby
p0y has joined #ruby
adamkittelson has joined #ruby
munx has joined #ruby
philcrissman has joined #ruby
Sigma00 has joined #ruby
ascarter has joined #ruby
_|christian|_ has joined #ruby
_srp has joined #ruby
divout has joined #ruby
niklasb_ has joined #ruby
markstewie has joined #ruby
niklasb has joined #ruby
niklasb has joined #ruby
Know1edge has joined #ruby
rohit has joined #ruby
M- has joined #ruby
snip_it has joined #ruby
gokul has joined #ruby
kasansweat has joined #ruby
<kasansweat>
How does one successfully retrieve a string containing ampersands (in my case, its filepaths) from an array? Been googling this for a while, can't figure it out. Thanks!
<epochwolf>
ruby doesn't to type coercion when comparing objects (unless javascript and php)
<epochwolf>
unlike* (not unless)
<nirjhor>
so , how to fix it? I modified : number = gets.chomp.to_i
RubyPanther has joined #ruby
nirjhor has quit [#ruby]
o_bs has joined #ruby
liluo has joined #ruby
<lewis1711>
so I have a big raw string dump of... I think it's html, honestly I am ignorant of net stuff so I have no clue. Anyway, what's the best way of getting all the subtrings of that between two particular tags, like <img> </img> for example
adeponte has joined #ruby
Divinite has joined #ruby
stephenjudkins has joined #ruby
_srp has joined #ruby
b33r_g0ggl3z has joined #ruby
x0F__ has joined #ruby
rohit has joined #ruby
akem has joined #ruby
Marco has joined #ruby
banister`sleep has joined #ruby
enherit has joined #ruby
MasterIdler_ has joined #ruby
triptec has joined #ruby
mxweas_ has joined #ruby
badabim has joined #ruby
* Divinite
is recompiling ruby and this time puts in CFLAGS=-O2
<Divinite>
denysonique: That would be extremely useful.... Thanks for pulling my attention to it :)
patrick99e99 has joined #ruby
ben225 has joined #ruby
<Divinite>
denysonique__: I meant you sorry
yxhuvud has joined #ruby
nfluxx has joined #ruby
thone has joined #ruby
Ripp__ has joined #ruby
scalebyte has joined #ruby
tonini has joined #ruby
zakwilson_ has joined #ruby
<scalebyte>
What does it mean if I do Time.now + 1 ??
<scalebyte>
I mean adding 1 to a datetime object ?
<scalebyte>
it is the same bt it still doesnt return an error...so what does it mean ?
<scalebyte>
RubyPanther: ^^^ That one is an interesting doubt... U might like it :)
<RubyPanther>
scalebyte: you could always just ask google
<RubyPanther>
if not the stdlib docs
<scalebyte>
RubyPanther: mate this is not a method... u cannot simply skim through the doc to find an explanation to it... am just adding + 1 to a date object and its returning the same values !! nothing happens no error
<RubyPanther>
scalebyte: Ruby doesn't have non-method operators, everything is a method.
<scalebyte>
RubyPanther: Time.now + 1 which method is this ? unary?
<RubyPanther>
if you have pickaxe ver 2 it is page 644
<scalebyte>
RubyPanther: i have done this b4 :) I just dont think anything has an explanation referenced on this !1
<RubyPanther>
scalebyte: programming is not _only_ doing it is also reading. As in, a whole book on the language. So that you can identify an instance method when you see one
<CheeToS>
nirjhor: I'm picking up ruby and decided to make some other changes: http://dpaste.com/707535/
pi3r has joined #ruby
<nirjhor>
CheeToS: cool :D
<MH35>
Cool!
nirjhor has quit [#ruby]
Nss has joined #ruby
csherin has joined #ruby
d3vic3 has joined #ruby
twqla has joined #ruby
FND has joined #ruby
JohnBat26 has joined #ruby
cachemoney has joined #ruby
flaccid has joined #ruby
flaccid has joined #ruby
lewis1711 has joined #ruby
francisfish has joined #ruby
<lewis1711>
if I have some string "this is in [brackets]", is there anyway I could extract "brackets" by telling it to extract everything inside "[" and "]"? I know about string.split but that uses just one delimiter
<lewis1711>
http://pastebin.com/xtHCGYqV if anyone could offer insight onto why that compile failed, would be much obliged. "make: *** [nokogiri.o] Error 1" isn't much to go off for me
<stephenjudkins>
lewis1711: never use a regexp for parsing XML or HTML
<ni-ka>
hey! is there any way to check that I am currently running jruby on windows? (RbConfig::CONFIG['host_os'] is either mingw or jruby, but jruby for all operating systems)
rippa has joined #ruby
tayy has joined #ruby
ameba has joined #ruby
tk_ has joined #ruby
xiaog1 has quit [#ruby]
iocor has joined #ruby
paissad has joined #ruby
randym has joined #ruby
workmad3 has joined #ruby
sayakb_ has joined #ruby
wenbert has joined #ruby
vitorave` has joined #ruby
_musee has joined #ruby
rohit has joined #ruby
odinswand has joined #ruby
telling has joined #ruby
telling has joined #ruby
fr0gprince_ has joined #ruby
Emmanuel_Chanel has joined #ruby
csherin_ has joined #ruby
csherin_ has joined #ruby
berserkr has joined #ruby
twqla has joined #ruby
<shevy>
ni-ka I think headius on #ruby-lang may know, he maintains jruby
tvo has joined #ruby
tvo has joined #ruby
flaccid_ has joined #ruby
MH35 has quit ["Leaving..."]
dhruvasagar has joined #ruby
mbursi has joined #ruby
<ni-ka>
shevy: thx, somehow the same command returns the correct values now, weird...
_2easy has joined #ruby
hukl has joined #ruby
<shevy>
hehe
<shevy>
mysteries!
<shevy>
it's also why I dont like metamagic programming
<ni-ka>
Now, looks like I have a rather complicated problem... I'm using bundler to install a gem that has native extensions under windows. However, the gem compile process conflicts with git being on the path (as it also provides mingw) and that leads to mingw32-make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x421963)
<ni-ka>
but I need git on the path to execute bundler...
arturaz has joined #ruby
<shevy>
ewww bundler
<shevy>
that shit never worked for me so far
<canton7>
so long as i don't track my lockfile, it seems to work okay... The minute you've got a tracked lockfile and multiple platforms, though, it falls over
aers has joined #ruby
virunga has joined #ruby
dhruvasagar has joined #ruby
Talvino has joined #ruby
bozhidar has joined #ruby
boboxx has joined #ruby
g0bl1n has joined #ruby
<ni-ka>
what command do I need to run to install a gem with native extensions the way bundler would do it, but after manually cloning the gem git to a local directory?
Shrink has joined #ruby
<ni-ka>
so that bundler does not need git
<ni-ka>
seems to be rake install...
fr0gprince_mac has joined #ruby
josemota has joined #ruby
briankbuckley has joined #ruby
iocor has joined #ruby
twelvechairs has joined #ruby
Foxandxss has joined #ruby
fayimora_ has joined #ruby
ni-ka has joined #ruby
Jay_Levitt has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
cek has joined #ruby
<cek>
propose a html -> text simple renderer
Talvino has joined #ruby
<cek>
that is, indented text goes a bit to the right, then bold text is quoted by *, etc... much like lynx or links do
sterNiX has joined #ruby
mengu has joined #ruby
canton7 has joined #ruby
<Tasser>
can textile do tables?
Norrin has joined #ruby
kidoz has joined #ruby
PragCypher has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
nirjhor has joined #ruby
emmanuelux has joined #ruby
<nirjhor>
the following program is showing multiplication of n*n. How can I make it stop at n*10? http://dpaste.com/707570/
<twelvechairs>
nirjhor: if max < 10 then max2=max else max2=10 end
<twelvechairs>
nihr: then replace the max with max2 after |y|
<nirjhor>
twelvechairs: thanks
lorandi has joined #ruby
Helius has joined #ruby
iocor has joined #ruby
rohit has joined #ruby
schlecht has joined #ruby
vraa has joined #ruby
<nirjhor>
what is the abbreviation of this line: sum +=1./i;
<schlecht>
:
<schlecht>
:/
<odinswand>
i'd like to start contributing to a ruby project on github to get my skills up
<odinswand>
can anyone recommend me a reasonably small project i can cut my teeth on?
<canton7>
Afal, you've got integer division in there, rather than floating-point
<nirjhor>
canton7: thanks man :)
<Afal>
yeah I suppose that needs to be changed to an integer ¬_¬
<Afal>
*float
<canton7>
nirjhor, turns out you don't need the .chomp in mine -- the .to_i takes care of that
<nirjhor>
canton7: got it :D
<nirjhor>
canton7: using chomp is a good rule of thumb\
<canton7>
yeah, that's why it went in :P
rohit has joined #ruby
peterhil has joined #ruby
banister`sleep has joined #ruby
frishi has joined #ruby
nirjhor has quit [#ruby]
pu22l3r has joined #ruby
eka has joined #ruby
MrGando has joined #ruby
lewis1711 has quit ["Leaving."]
emmanuelux has joined #ruby
adambeynon has joined #ruby
mklappstuhl has joined #ruby
saimon has joined #ruby
TaTonka has joined #ruby
emocake has joined #ruby
looopy has joined #ruby
Synthead has joined #ruby
pu22l3r has joined #ruby
davidpk has joined #ruby
ecolitan has joined #ruby
virunga has joined #ruby
mklappstuhl has joined #ruby
pencilcheck has joined #ruby
pu22l3r_ has joined #ruby
nemesit has joined #ruby
IAD has joined #ruby
mklappstuhl has joined #ruby
Sailias_ has joined #ruby
kpshek has joined #ruby
BiHi has joined #ruby
randym has joined #ruby
bozhidar has joined #ruby
at5l has joined #ruby
banseljaj has joined #ruby
pu22l3r has joined #ruby
nixmaniack has joined #ruby
crankycoder has joined #ruby
vraa has joined #ruby
visof has joined #ruby
visof has joined #ruby
mklappstuhl has joined #ruby
seanstickle has joined #ruby
<banseljaj>
coi lei melbi prenu
undersc0re has joined #ruby
vraa has joined #ruby
PragCypher has joined #ruby
snearch has joined #ruby
robotmay has joined #ruby
tommyvyo_ has joined #ruby
sacarlson has joined #ruby
Karmaon has joined #ruby
Nss has joined #ruby
<sacarlson>
in ubuntu 11.10 seems ruby-glade2 has been depricated, so if so where might I find the equivilant to the command ruby-glade-create-template used to create a ruby template program from a glade xml file?
<seanstickle>
Ruby::Tk
<seanstickle>
And a lot of magic.
td123 has joined #ruby
<sacarlson>
seanstickle: so ruby::tk has this conversion for glade files? I already have a glade I developed in the older ruby-glade2 I'm trying to port it into the new libs
<seanstickle>
Ah, no.
flippingbits has joined #ruby
<sacarlson>
bummer my new software I just finished 3 days ago was depricated before I even finished it, or will they replace ruby glade support at some point in the future?
jmampost_ has joined #ruby
nari has joined #ruby
<seanstickle>
ruby-glade3 doesn't exist yet?
libertyprime has joined #ruby
<sacarlson>
seanstickle: not in the ubuntu ppa they don't but maybe I should look in other places
workmad3 has joined #ruby
QaDeS has joined #ruby
enroxorz has joined #ruby
bbttxu_ has joined #ruby
rippa has joined #ruby
bluOxigen has joined #ruby
bulll has joined #ruby
bozhidar has joined #ruby
tvo has joined #ruby
<pencilcheck>
anyone here know rake?
<seanstickle>
Prolly.
<pen>
I wonder how to construct a rule that take .o and then search the source .c in another directory with custom prefix?
bozhidar` has joined #ruby
austinbv has joined #ruby
speggey has joined #ruby
QKDLab has joined #ruby
<QKDLab>
s tried to define: def each_row; self.to_a.each end
<QKDLab>
but this doesn work with blocks
<QKDLab>
whats wrong?
emocake has joined #ruby
drknus has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
albemuth has joined #ruby
milkpost has joined #ruby
Jay_Levitt has joined #ruby
init0 has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
<workmad3>
QKDLab: def each_row(&blk); self.to_a.each(&blk); end
ryannielson has joined #ruby
rbanffy has joined #ruby
phantomfakeBNC has joined #ruby
cantbecool has joined #ruby
fayimora_ has joined #ruby
wroathe has joined #ruby
mgraham has joined #ruby
cantbecool has quit [#ruby]
<rippa>
def each_row; self.to_a.each; end
glosoli has joined #ruby
<rippa>
wouldn't this work the same?
<rippa>
or even
<rippa>
def each_row; to_a.each; end
<Tasser>
rippa, don't forget the block
<rippa>
Tasser: but #each usually returns enumerator
<rippa>
which takes block by itself
n3m has joined #ruby
<rippa>
or not
<rippa>
so yeah
<rippa>
still need to pass the block
shruggar has joined #ruby
ni-ka has joined #ruby
<Tasser>
rippa, yep
d-snp has joined #ruby
akem has joined #ruby
akem has joined #ruby
looopy has joined #ruby
theRoUS has joined #ruby
berserkr has joined #ruby
<mklappstuhl>
can anyone point me to some general implementation of a to_json method?
jamie_ has joined #ruby
udante has joined #ruby
mattonrails has joined #ruby
mady has joined #ruby
Sailias_ has joined #ruby
kf8a has joined #ruby
tomzx has joined #ruby
neunzehnprozent has joined #ruby
<pen>
what's the differences between system and sh?
<theRoUS>
you can use #block_given? to find out if a block was passed without '&block') being listed in the method declaration. is there anyway to actually get the block *object* (i.e., Proc instance) ?
iocor has joined #ruby
asobrasil has joined #ruby
aroop has joined #ruby
Indian has joined #ruby
omry_ has joined #ruby
libertyprime has joined #ruby
nricciar has joined #ruby
rcrossan has joined #ruby
Sailias_ has joined #ruby
<Tasser>
theRoUS, &block
rbanffy has joined #ruby
<rcrossan>
anyone aware of online reference that can help me trouble shoot this error "NameError: undefined local variable or method `driver' for"
waxjar has joined #ruby
briankbuckley has joined #ruby
<seanstickle>
Posting the code that throws that error would be a good start.
<jamie_>
rcrossan: lines 25 & 28 should be `el = @driver...`
looopy has joined #ruby
<seanstickle>
^^
undersc0re has joined #ruby
<rcrossan>
oh snap, missing the '@'
<jamie_>
rcrossan, easily done!
<rcrossan>
guess that figures from working all night without sleep
<rcrossan>
thanks
<jamie_>
no problem
o_bs has joined #ruby
ed_hz_ has joined #ruby
robotmay has joined #ruby
briankbuckley has joined #ruby
axl_ has joined #ruby
theRoUS has joined #ruby
Sliker has joined #ruby
mklappstuhl has joined #ruby
_john has joined #ruby
bglusman has joined #ruby
carlyle has joined #ruby
Jay_Levitt has joined #ruby
eeadc has joined #ruby
looopy has joined #ruby
vereteran has joined #ruby
kaichanvong has joined #ruby
MetaCosm has joined #ruby
eeadc has joined #ruby
snip_it has joined #ruby
LBRapid has joined #ruby
fr0gprince_mac has joined #ruby
mkscrg has joined #ruby
jenglish has joined #ruby
ceej has joined #ruby
snip_it has joined #ruby
Dreamer3 has joined #ruby
clockwize has joined #ruby
briankbuckley has joined #ruby
mikepack has joined #ruby
davidpk has joined #ruby
nsaeki has joined #ruby
fayimora has joined #ruby
boboxx has quit [#ruby]
spanner has joined #ruby
tangledhelix has joined #ruby
wyhaines has joined #ruby
frequency9 has joined #ruby
shruggar1 has joined #ruby
iocor has joined #ruby
punkrawkR has joined #ruby
<sacarlson>
can someone point me to the continued development of ruby glade, seems it's depricated in ubuntu 11.10, if it's stoped I may do some work on it myself
<deryldoucette>
i do believe that ruby-glade is no longer being worked on
lkba has joined #ruby
senthil has joined #ruby
<sacarlson>
deryldoucette: well I still need the replacement for ruby-glade-create-template but renamed to the gtk2 equivilant
<deryldoucette>
sacarlson: then you probably will have to do it yourself since dev has stopped
<deryldoucette>
trying to think of the other one taht was stopped for windows too. FX or something like that
<sacarlson>
deryldoucette: yes it's looking that way but what other tool do we have that can create gui separate from the code?
crankyco_ has joined #ruby
ni-ka has quit [#ruby]
TaTonka has joined #ruby
ckrailo has joined #ruby
<sacarlson>
deryldoucette: seems the python glade is still supported so I don't think the gui delelopment has ended just the ruby binding seem missing
<deryldoucette>
qtRuby, shoes, Tk, wxRuby, RubyCocoa ect. (all depends on your pltform but there are quite a few out there)
marcamilly has joined #ruby
v0n has joined #ruby
<deryldoucette>
the other one i have *heard* of (and heard decent things) but never used myself, is bowline
<sacarlson>
deryldoucette: qtruby I might check that, but I already have code developed on glade that I would like to port to ubuntu 11.10 and hopfully beyond
<deryldoucette>
ok gotta walk my rottweiler. later
virunga has joined #ruby
<sacarlson>
deryldoucette: ok will do but I hate to throw away all the work I've already invested in glade just to port to something that is very much different
<deryldoucette>
sacarlson: well if your upstream has stopped development, unless YOU are going to take that part over too, not much choice but TO retool
eywu has joined #ruby
vraa_ has joined #ruby
<shevy>
if it's just glade being used for ...
<shevy>
what do you use it for. the layout of the widgets?
<sacarlson>
deryldoucette: from my view it seems glade has just moved to gtk2 so it seems all that is needed is a small rewrite to ruby-glade-create-template to change the code to the gtk2 libs
ly- has joined #ruby
jenglish has quit [#ruby]
Sliker has joined #ruby
<sacarlson>
my guess is that it's already in development but I just don't know where it has gone to
<sacarlson>
shevy: we have bindings for ruby gtk already it's just the glade xml file bind that I see missing
<shevy>
well rubygnome2-0.19 has them still :D
mikeycgto has joined #ruby
<sacarlson>
shevy: rubygnome2-0.19 is that still in ubuntu 11.10 , i'll check
<shevy>
dunno if that is still in ubuntu
<sacarlson>
shevy: or I need two systems to continue to develope my ruby code?
<shevy>
I compiled the source
<shevy>
well kinda I suppose, as development has moved away from glade already
<shevy>
it is no longer part of the official tarball
macmartine has joined #ruby
<sacarlson>
shevy: just bad luck on my side to decide to pick glade as a deveolpment tool not realizing it's short life
<shevy>
yeah no idea, but I once looked at it, saw it required XML and decided not to use it
eldariof has joined #ruby
<shevy>
sacarlson you could try a slow transition?
<sacarlson>
shevy: what's wrong with xml? it's still used in many other apps?
<shevy>
like, convert the XML file into a yaml file, or direct ruby code, where you give the widgets a name
<shevy>
XML is overly verbose
<shevy>
I dunno if it is used in other apps but I see no inherent advantage in using XML over a less verbose format
MrGando has joined #ruby
<rippa>
xml looks ugly as fuck
<rippa>
especially those closing tags
<shevy>
I think what mistake glade did was to rely on only one format to express something
<shevy>
because drag-and-drop GUI design is not bad in itself
nixmaniack has joined #ruby
<sacarlson>
shevy: I really don't care what format they put the gui design in as long as the graphics is designed in a wysywig format you can see before you write any code
<shevy>
yeah that is understandable
notjohn has joined #ruby
<sacarlson>
shevy: and later change the apperance without any change or little change to the code
nixmaniack has joined #ruby
eugynon has joined #ruby
<sacarlson>
shevy: makes it posible to port to mobile and other devices with no change in ruby code
<shevy>
well
Sliker has joined #ruby
<shevy>
you can do the same by clever layout in your ruby code too without glade
<sacarlson>
shevy: well that sounds like a longer learning curve that I hope to skip
skitrees has joined #ruby
<shevy>
hehe
kaneda_ has joined #ruby
theRoUS has joined #ruby
Nss has joined #ruby
<sacarlson>
my plan it to attempt to manualy convert from libglade to gtk2 and if that works I'll see what's needed to change ruby-glade-create-template to work in gtk2, I just hope I'm not working on something some is already doing
<shevy>
it's one blog post in a sea of 100000000000000000 others
patrick99e99 has joined #ruby
patronus has joined #ruby
<robacarp>
shevy: you don't read all the internet?
alex__c2022 has joined #ruby
<qawsedrf>
shevy: LOL
<shevy>
robacarp nah
<shevy>
I think there is only one blog I read regularly which is kinda a political satire & news feed in one
kenperkins has joined #ruby
<shevy>
too much noise in the other :(
<shevy>
though I do look at reddit if there are cool things
<shevy>
but 95% is boring too
<robacarp>
news.ycombinator?
samsonjs_ has joined #ruby
<robacarp>
I cant stand reddit much anymore
rtl has joined #ruby
cantbecool has joined #ruby
cantbecool has quit [#ruby]
caiges has joined #ruby
<qawsedrf>
reddit sucks. they need to die so that more and more people end up wasiting less and less time
burgestrand has joined #ruby
<shevy>
heheeh
Sliker has joined #ruby
|--| has joined #ruby
_srp has joined #ruby
davidpk has joined #ruby
|--| has joined #ruby
sonkei has joined #ruby
JohnBat26 has joined #ruby
CharlieSu has joined #ruby
adamjleonard has joined #ruby
<CharlieSu>
question. I've created my own class and I'd like to know how to create two instances of the class and test whether or not they're the same.. Do I need to override a function to enable this? Currently I can create to instances w/ all the same attributes and they aren't equivalent.
Drewch has joined #ruby
theRoUS has joined #ruby
<elektronaut>
charliesu: you can override ==
kp666 has joined #ruby
<CharlieSu>
elektronaut: do you have any examples of this?
<CharlieSu>
elektronaut: thanks bud.. turns out the contents of the method are this simple for my purposes.. ' self.instance_values == compare.instance_values '
<elektronaut>
that should do the trick
eldariof has joined #ruby
davidcelis has joined #ruby
<shevy>
guys
<shevy>
would it be better to modify any instance variable only via a method call?
Targen has joined #ruby
<robacarp>
it depends on how critical to the operation of the space shuttle the variable is
<canton7>
presumably you're talking from inside the class containg the instance variable? Depends... I've seen some bad side-effects with people using the variable's accessor to access the variable from inside the class. Unintended consequences etc
<shevy>
robacarp, well I mean in general. I often have a need to check whether an @ivar has proper values, because other parts of the code depend on those variables having sane values
wyhaines has joined #ruby
<robacarp>
shevy: yea, in that case, I'd have a setter
<shevy>
via attr_* ? or do you use your own setter
glosoli has joined #ruby
<robacarp>
for me, if its something like a switch/magic number setting to instruct the class what to do I make a restricted accessor that raises an ArgumentError when it gets a bad value
bashdy has joined #ruby
<robacarp>
if its something that allows the class to interface with an outside object (a login name or password, for example) I just use a standard accessor
glosoli has joined #ruby
<robacarp>
I've also used read-only accessors where possible.
<robacarp>
the thing is, if someone is using your class and they want to screw with things they can just subclass it and override whatever they want....but at that point its their fault when it breaks
<shevy>
well read-only is a lot easier to me
<shevy>
because the dataset of the @ivar in question is most likely already sanitized and proper
glosoli has joined #ruby
<shevy>
I am just wondering in general. I see a lot of ruby code that goes like this:
<shevy>
def initialize
<shevy>
# a bazillion of @foo = bla, here
Sliker has joined #ruby
<shevy>
I find there is this slight tendency in some objects to become more and more complicated
<shevy>
like the one I am trying to rewrite right now!
kjellski has joined #ruby
tridentino has joined #ruby
looopy has joined #ruby
<robacarp>
yea
hosiawak has quit ["ERC Version 5.3 (IRC client for Emacs)"]
adeponte has joined #ruby
jgrevich has joined #ruby
pi3r has joined #ruby
DefV has joined #ruby
briankbuckley has joined #ruby
nixmaniack has joined #ruby
glosoli has joined #ruby
mklappstuhl has joined #ruby
<ckrailo>
anybody know how to get hpricot not to turn accented characters into escaped HTML entities?
<ckrailo>
(or how to reverse the process)
eignerchris has joined #ruby
stephenjudkins has joined #ruby
Marco has joined #ruby
ericmuyser|air has joined #ruby
maletor has joined #ruby
iocor has joined #ruby
themadcanudist has joined #ruby
carlyle has joined #ruby
cbuxton has joined #ruby
jwmann has joined #ruby
<themadcanudist>
hey guys… if i hash.to_s can I read that string representation back in to a hash?
_obiJuan has joined #ruby
banseljaj has joined #ruby
<Muz>
Not reliably, no.
BlissOfBeing has joined #ruby
<themadcanudist>
Muz: really?!
nanderoo has joined #ruby
<themadcanudist>
why can it only reliably map one way?
samsonjs_ has joined #ruby
<Muz>
Have you /looked/ at the output of the function?
bluenemo_ has joined #ruby
<shevy>
themadcanudist .to_s distorts the data in this example
<shevy>
you lost the information key => value
<shevy>
and there is no additional information stored in the string to restore the original dataset. unless you had some simple convention in your hash, or know how it used to be
<themadcanudist>
oh, you know what… i'm not using to_s… this class outputs the object as a hash with key/value pairs
<themadcanudist>
when i call the to_s method in it
<shevy>
jlebrech what do you mean? you store the hash in an array here
<shevy>
if you dont need the array, dont store it in an array
<themadcanudist>
it's different than a straing Hash object using the to_s method.
<themadcanudist>
straight*
Nss has joined #ruby
csprite has joined #ruby
<rcrossan>
errror: Selenium::WebDriver::Error::NoSuchElementError: Unable to find element with link text - my code is here git clone git://gist.github.com/1902204.git gist-1902204. I am thinking there is something wrong with line 25 to execute a jquery to open my menu even though I'm not getting an error for that line, it doesn't appear to be working.
<themadcanudist>
thanks
<jlebrech>
but the json it's returning [{"a":1,b ... json values not objects
<shevy>
hmm
ephemerian has joined #ruby
mxweas_ has joined #ruby
<shevy>
I dont know json very well, no idea how json stores objects
adamkittelson has joined #ruby
cloke_ has joined #ruby
cloke has joined #ruby
<eugynon>
Hi folks, i am learning ruby and im new to programming. I have a problem with a craps simulator. right after first roll, if it hits "point" it continues to roll. http://pastie.org/3448048 Anyone got a good solution? :)
apok has joined #ruby
gakins has joined #ruby
_srp has joined #ruby
glosoli has joined #ruby
MrGando has joined #ruby
<shevy>
eugynon a few things
<gakins>
Looking to understand "self" better... I've found a few blogs, stackoverflow posts.. still a bit unclear so I'm trying some things out in IRB. Anyone have any particularly good articles on using "self"?
<shevy>
when you have a case structure, align the when right below case
<shevy>
example:
<shevy>
case foo
<shevy>
when 'bla'
<shevy>
ok eugynon?
<jlebrech>
i got my arrays and hashes the wrong way round
<eugynon>
shevy, i feel your code is .. abit more OO than mine
<shevy>
d34th4ck3r sorry no idea
<shevy>
eugynon yeah but you can use methods alone too
<shevy>
I like classes because you can use them lateron
<d34th4ck3r>
anyone else, where can I learn about rubysoc ?
<shevy>
if you only have methods you dont have a real structure. you can put them into modules, but I think modules are crippled classes
hadees has joined #ruby
<eugynon>
shevy, my code looks more like a perl script ... or, a very bad one ... heh.
ph^ has joined #ruby
<robacarp>
anyone written C extensions for ruby on OSX Lion? I'm getting architecture compatibility errors...I think its because of rvm and the system ruby being 1.8...
<shevy>
eugynon as long as things work
<eugynon>
shevy, well, i thought so when i wrote it - but i see i have a long way to go
<shevy>
the only real way to get better at ruby is to write code on your own
shaatar has joined #ruby
<shevy>
well make simple transitions
tvo has joined #ruby
tvo has joined #ruby
skitrees has joined #ruby
<shevy>
small methods when possible. align methods together into a module or a class (class is easier)
<eugynon>
aye, this is my second code, so not a pro yet ;)
<shevy>
that code can be simplified too
<eugynon>
i tried to write a class at first, but i felt it was "too much"
<shevy>
eugynon, I am rewriting this class http://pastie.org/3448318 right now. I hate it. it is way too complicated and I already rewrote it twice :(
<eugynon>
aha, so maybe i should stick to C for now, while we are learning it at school .. heh
BrianE has joined #ruby
<canton7>
C is good, in that it makes you realise why, and more importantly when, you need objects
<shevy>
"def sanitize_dataset" goes especially on my nerves
<shevy>
it's a good example how NOT to write a method too ;)
Russell^^ has joined #ruby
<shevy>
100 lines of code!
<canton7>
that's very enterprisy code :P
<shevy>
what the class is trying to do, basically, is to sanitize an incomplete dataset
<shevy>
for instance, @use_autogen whether to use system "autogen" or not
nfluxx has joined #ruby
drizz has joined #ruby
<shevy>
and it should be either true or false
kaktus has joined #ruby
<canton7>
def url5; @remote_urls[4]; end -- ouch
<shevy>
@build_static whether to build static or not
<shevy>
yeah, I think that is dead code
<shadoi>
shevy: that could do with some class composition, a configuration class for example
andrewhl has joined #ruby
msch has joined #ruby
<shadoi>
half that class is setting up it's state
<shevy>
yeah it's kinda the only thing it does
<shevy>
or should do
<shevy>
I have high hopes in my rewrite though :P
shobhitg has joined #ruby
<shadoi>
You may be able to break up the types of configurations into separate classes as well, things that don't need to change aside from behaving a certain way.
Muz has joined #ruby
Muz has joined #ruby
shobhitg has joined #ruby
<canton7>
there seems to be an awful lot of duplication between @dataset and, well, everything else, though I might be missing something
<shevy>
yeah
<shevy>
I think I wanted to have the same information in both every key of @dataset, and also the instance-variables back then
<shevy>
:\
sawjig has joined #ruby
<eugynon>
shevy, this is what i get when i run your code pastie-3448257.rb:19: stack level too deep (SystemStackError) ... im using ruby 1.9.2 if that matters
<eugynon>
robacarp, we are learning programming basics at my school.... deitels book on C is the literature..
clockwize has joined #ruby
<eugynon>
thanks shadoi :)
wallerdev has joined #ruby
<robacarp>
eugynon: oh, well thats another story.
<robacarp>
you'll do fine
<geekbri>
It's certainly always worth reading Ritchie's book on C if you want to learn it :)
<shadoi>
That's definitely not targeted at beginners though.
<robacarp>
yea, no
<Drewch>
Is ruby worth diving into for network programming?
munx has joined #ruby
<deryldoucette>
err? its the definitive book on C and ANSI C book (white bible) walks you through everything clean and clear
<Drewch>
I'm the opposite, a C programmer
<deryldoucette>
*I* taught myself pretty well using it
iocor has joined #ruby
<deryldoucette>
(and I consider myself a pretty hard-to-teach-egghead)
<shevy>
Drewch ruby is cool for pretty much everything
shruggar has joined #ruby
Araxia has joined #ruby
<eugynon>
cheers deryldoucette hehe
<seanstickle>
Deitel's books should be avoided always.
<geekbri>
Drewch: I've written some pretty robust network recievers in ruby. It was enjoyable... would do again :)
<eugynon>
that book is pretty well explained
<Drewch>
How is ruby's libraries?
<deryldoucette>
the deitel books all just seem to way overly complicate things in an effort to make them easier to understand.
<deryldoucette>
big fail to me
<seanstickle>
Condescending crap books.
<Drewch>
I know a bit of python and like using Scapy.. do you guys know what Scapy is? It's basically allows you to create and send out raw packets
<Drewch>
I'm wondering what Ruby has to offer in that area
<shadoi>
Drewch: look into PacketFu on ruby for similar functionality.
kapowaz has joined #ruby
<shadoi>
I use it for a number of UDP and TCP based services.
<shadoi>
As well as ZeroMQ
Divinite has joined #ruby
<geekbri>
Well zeromq isn't ruby specific, you can use that with any language that has a binding
<shadoi>
Drewch: there's some nice bleeding edge stuff by @bascule called Celluloid and DCell also.
Helius has joined #ruby
<shadoi>
geekbri: sort of like TCP and UDP ;)
<Drewch>
Thanks shadoi, gonna look into it now for a bit
shadoi1 has joined #ruby
simao has joined #ruby
<Drewch>
basically I want to get really into either ruby or python, and right now I use scapy a lot for sending malformed packets to mobile devices to crash them
<shadoi>
anyway, nio4r which Celluloid-IO is built on is a non-blocking IO native lib which looks very promising.
<Drewch>
but stuff like SiriProxy is written in Ruby, so I want to move over but I want to make something like scapy
<robacarp>
Drewch: in the last year ruby has really come of age in terms of threading and networking
<eugynon>
shevy, just wanted to share more of my nice code :D
<Drewch>
Divinite through code inspection, I work for a major mobile phone company
<robacarp>
I think you'd probably enjoy ruby networking
Pallium has joined #ruby
gianlucadv has joined #ruby
<Divinite>
Drewch: Nice! Now that you mention it..
<robacarp>
but I consider myself a ruby fan...so...I'm sorta biased
<shadoi>
Drewch: most pythonistas I know think Ruby is too insane.
<shadoi>
I find python too terse and limiting most of the time.
<Drewch>
Divinite: and I check out the path packets take through the firmware, and when I see some code where someone messed up size of something or a check, I try to make a packet to take that path
<Drewch>
Divinite: and you'd be shocked at what you can do :P
<Divinite>
Drewch: I'm only 15! And of course a proud (newbie) rubiest!
minijupe has joined #ruby
senthil has joined #ruby
shruggar has joined #ruby
voodoofish430 has joined #ruby
<Drewch>
Divinite: hehe, a good age to get into network programming, stick with it
cbuxton has joined #ruby
<Divinite>
Drewch: I will :)
sizz_ has joined #ruby
simao has joined #ruby
<Drewch>
shadoi: thanks for the resources, all look pretty cool
ReTFEF has joined #ruby
<Drewch>
shadoi: They seem pretty high level though, would I be able to rewrite the datalink layer info in the packets?
apucacao has joined #ruby
<Drewch>
shadoi: I basically need to send out a completely raw packet, skip my stack completely
xkws49er has joined #ruby
<xkws49er>
If I have a one to many and I have s = School.last and s.children returns a collection... How do I get the last child in the collection... "the right way"
Marco has joined #ruby
nixmaniack has joined #ruby
<Divinite>
xkws49er: Wait your turn!
<Drewch>
Divinite: Good, let me know if you have any questions on it :)
Marco_ has joined #ruby
jduncan has joined #ruby
vraa_ has joined #ruby
PragCypher has joined #ruby
Marco has joined #ruby
simao has joined #ruby
<jduncan>
how can I find the easiest way to tie a changeset to a versioned release? eg. what version of ruby incorporates changeset r28203?
rramsden has joined #ruby
simao has joined #ruby
Marco_ has joined #ruby
ryanf has joined #ruby
mengu_ has joined #ruby
<Divinite>
Ok, I have to go download some stuff, may go offline!
KL-7 has joined #ruby
<jduncan>
anyone?
<jduncan>
how can I find the easiest way to tie a changeset to a versioned release? eg. what version of ruby incorporates changeset r28203?
shruggar has joined #ruby
<robacarp>
Divinite: you say yo uwork for a mobile phone company? I know several people that work at those types of places here in boulder
mrsolo has joined #ruby
quizme has joined #ruby
Sliker has joined #ruby
hasrb has joined #ruby
<quizme>
is there a way to create anonymous functions that don't leak in values from the scope in which it was created?
clockwize has joined #ruby
viuo has joined #ruby
fridim_ has joined #ruby
Divinite has joined #ruby
<quizme>
e.g.: a = 42; ->(){ puts a }[] NameError: undefined local variable or method `a' for main:Object
<Divinite>
Back, can someone point me to "why the lucky stiff"'s soundtrack?
n3m has joined #ruby
<Drewch>
robacarp where is boulder?
<robacarp>
Drewch: eh, Colorado, USA?
<quizme>
module X; ->{ puts a }[]; end <-- i guess you could do something like this
<Drewch>
robacarp oh ok, I work on Ontario
<deryldoucette>
Drewch: anywhere near Port Elgin, ON?
jduncan has quit ["Backing away quietly"]
sizz has joined #ruby
<Drewch>
deryldoucette close enough i guess
<Drewch>
lol
<Divinite>
Drewch: Can you point me to it?
<Drewch>
Divinite point you to what
<Divinite>
Drewch: Why the lucky stiff ruby soundtracks.
<deryldoucette>
Drewch: its where i'm at. seems i'm like the only ruby guy in town hehe
<Drewch>
deryldoucette hehe nice
themadcanudist has joined #ruby
tavist0 has joined #ruby
glosoli has joined #ruby
ryanf has joined #ruby
werdnativ has joined #ruby
shadoi has joined #ruby
stephenjudkins has joined #ruby
idletom has joined #ruby
cgk_ has joined #ruby
<cgk_>
Is there a way to have a variable pre-defined and available to an irb command-line?
<cgk_>
So that it is defined to whatever the scope is that irb is in once you are at the irb prompt?
trivol has joined #ruby
badabim has joined #ruby
<RubyPanther>
cgk_: probably but normally you would provide something like that as a method that returns your value, then you can just mix it in
<RubyPanther>
cgk_: you can add an ~/.irbrc
<cgk_>
That's fine, but then how would you automatically mix-in to irb's scope without having the user run/require/Include?
fayimora has joined #ruby
<cgk_>
I guess just throw a require+Include into the .irbrc?
<cgk_>
(trying it now)
<RubyPanther>
cgk_: yeah the .irbrc is in Ruby
kjellski has joined #ruby
<RubyPanther>
I use it for Wirble.init :init_colors => true
<Redjack1964>
hello everyone. Someone can tell me what is the difference between a public instance method and a public class method?
ascarter has joined #ruby
<burgestrand>
Redjack1964: public class methods are also public instance methods, but a public instance method is not necessarily a public class method *adds to the confusion*
<Redjack1964>
burgestrand: actually i ask that because i've seen on the ruby-doc website in "core" section on the left there is instance methods and class methods (which begin by "#" and instance methods by " :: " )
yoklov has joined #ruby
<burgestrand>
Redjack1964: yeah, my code example is applicable then :)
<tdmackey>
w/din 32
<burgestrand>
Redjack1964: also, you use #instance_method and .class_method in language, sometimes ::class_method but it’s not too common anymore
<Redjack1964>
burgestrand: ah ! I think i understand now :) . It's looks like to "static method" in java or C++ for example, i'm right?
<burgestrand>
the reason for that is probably many people discourage you from using Class::class_method call style as opposed to Class.class_method call style, because :: is often called "constant lookup"
<burgestrand>
Redjack1964: it looks like one yes, but it’s not the same thing
<burgestrand>
Redjack1964: it often helps to think of it as one when starting out though, so you’re not wrong :)
linopolus has joined #ruby
axl_ has joined #ruby
dexcs has joined #ruby
<Redjack1964>
burgestrand: thank you for your answer :)
Seisatsu has joined #ruby
bwlang has joined #ruby
hsimon has joined #ruby
TaTonka has joined #ruby
Marco has joined #ruby
_|christian|_ has joined #ruby
TaTonka has joined #ruby
bwlang_ has joined #ruby
ddv has joined #ruby
dexcs has joined #ruby
<Mon_Ouie>
burgestrand: For the record, he was referring to instance methods when he mentioned static methods
<burgestrand>
Mon_Ouie: ._.
tavist0 has quit [#ruby]
<Mon_Ouie>
(he was answered on #ruby.fr afterwards)
<gate>
Hm, i've never used that one. Looks like it would be pretty useful, though
rtl has joined #ruby
<gate>
for my purposes Dir.glob has always been sufficient
twqla has joined #ruby
doomviking has joined #ruby
sterNiX has joined #ruby
workmad3 has joined #ruby
sterNiX has joined #ruby
<shevy>
same here
CannedCorn has joined #ruby
pu22l3r has joined #ruby
bwlang_ has joined #ruby
sand- has joined #ruby
stephenjudkins has joined #ruby
Silker has joined #ruby
axl_ has joined #ruby
imami has joined #ruby
Nisstyre has joined #ruby
havenn has joined #ruby
sand1 has joined #ruby
milkpost has joined #ruby
Indian_ has joined #ruby
moshee has joined #ruby
sandpy has joined #ruby
techhelp has joined #ruby
banister`sleep has joined #ruby
chimkan has joined #ruby
<techhelp>
what's the difference between "def abc" vs "def self.abc" inside a class file?
<gate>
techhelp: one defines an "instance method" the other defines a "class method"
<gate>
so the first would be MyClass.new.abc
<shevy>
techhelp in the second case, you can do Foo.abc
<gate>
the second would be MyClass.abc
<shevy>
it reads shorter
<techhelp>
thanks guys, you're the best
<shevy>
so people tend to like it
conor_ireland has joined #ruby
<shevy>
rails is full of that
<gate>
But also means that you can't use instance state
<techhelp>
"def self.abc" is like static method in java?
<gate>
-_^ I have done my best to lose all my Java skills, but I think so, yes
lastk has joined #ruby
tweeKula has joined #ruby
eywu has joined #ruby
techhelp has quit [#ruby]
<shevy>
hehehe
<shevy>
need to keep such quotes in mind
<shevy>
"I have done my best to lose all my Java skills"
ph^ has joined #ruby
techhelp has joined #ruby
visof has joined #ruby
<gate>
Every time I have used Java outside of college its been torture
xkws49er has joined #ruby
<gate>
Oh, i'll just use a regexp.. nope... I'll just use a reduce... damnit....
hadees has joined #ruby
markstewie has joined #ruby
gomix has joined #ruby
banister`sleep has joined #ruby
bwlang has joined #ruby
zxiest has joined #ruby
banister`sleep has joined #ruby
Seisatsu has joined #ruby
havenn has joined #ruby
<csprite>
anyone got ruby-opengl working with ruby 1.9.3 on linux
<shevy>
hmm
<shevy>
I may have to learn java for work eventually. I'll try to use the smallest minimum subset of java that is possible
startling has joined #ruby
<gomix>
jenkins or cruisecontrol.rb (or cruisesontrol) ?
<gomix>
for ci job for rails devel?
liluo has joined #ruby
<deryldoucette>
travis-ci.org
<deryldoucette>
hooks right into github too
<deryldoucette>
or jenkins if you want standalone at home on your own network type setup
glosoli has joined #ruby
fayimora_ has joined #ruby
ph^ has joined #ruby
narshlob has joined #ruby
<gomix>
deryldoucette: thanks
<deryldoucette>
np
<narshlob>
can anyone explain what putting an instance of Matrix next to a [0,0] array does? ex: (Matrix[ [1,1], [1,0] ]**(8)) [0,0]
<gate>
shevy: I'll adjust my statment for you. Java is not a bad language. Its libraries, community, lack of conventions, molasas-slow editors, glacial server environments and the fact that it eats memory like a 400 Lb. man who just gave up weight watchers make it effing horrendous to work with.
hukl has joined #ruby
<deryldoucette>
in fact i have to set up a few jenkins nodes myself
<deryldoucette>
once i finish updating the autoinstaller for this project
<shevy>
hehe
<heftig>
narshlob: x[3,4] calls x.[](3,4)
<heftig>
it's a method named []
<narshlob>
ohhhhhhh
<narshlob>
ok.
pedahzur has joined #ruby
<pedahzur>
Ruby newbie here...I'm trying to build a gem with rake, and getting this: rake aborted! no such file to load -- hoe What package/gem am I missing?
<deryldoucette>
hoe
<hooper>
language..
bwlang has joined #ruby
iMe has joined #ruby
friskd has joined #ruby
<workmad3>
hooper: a hoe is a farming implement...
<deryldoucette>
as well as a gem
<workmad3>
yeah... not to be mistaken with a ho ;)
shobhitg has joined #ruby
<deryldoucette>
lol
avoit has joined #ruby
<aces1up>
i am running YAML:load on this yaml_dump_string: --- |\nmytest\r\n\n when it loads it into my string its stripping
<avoit>
Guys, I don't find the method to extract only last 10 items from an array
<aces1up>
\r\n , how can i stop this behavior?
<aces1up>
i am running YAML:load on this yaml_dump_string: --- |\nmytest\r\n\n when it loads it into my string its stripping \r\n from string, how can i stop this behavior... posted again as last was wrong.
<pedahzur>
deryldoucette: OK, that's what I thought, but I don't see a hoe package. (This is Debian/Ubuntu)
cespare has joined #ruby
<deryldoucette>
idk, i don't use system packages, and *especially* debian or ubuntu's packages for ruby, any gems, ect ect
<pedahzur>
deryldoucette: oh
<pedahzur>
I'll go ask them. :)
<deryldoucette>
A) they repackage to hell, breaking things up far far far too much (which eventually causes problems) B) gems get updated too much and C) i don't like the OS changing packages underneath me on updates
<deryldoucette>
cool
<deryldoucette>
apt-cache search hoe
<deryldoucette>
see what comes up
<pedahzur>
deryldoucette: Nothing to do with ruby hoe. :)
<deryldoucette>
he called me a hoe! quick get 'im!
axl__ has joined #ruby
hasrb has joined #ruby
<pedahzur>
*ruby's hoe
<voodoofish430>
Are there any good articles on how to use modules?
<pedahzur>
better? :)
<deryldoucette>
hehe
<avoit>
Is there any good practices about storage an API's ID/Token. I'm coding an api client and don't wanna store it in my script file. I need a more secure way
<RubyPanther>
avoit: there is no secure way, usually people put it in a yaml config file
seivan has joined #ruby
<workmad3>
avoit: make sure your server is secure... if it's not, you shouldn't be doing your requests from it anyway
<RubyPanther>
it is a scary world, we cower behind electric fences and firewalls
<gate>
pedahzur: hoe is a rubygem
<workmad3>
RubyPanther: and we kid ourselves that they'll protect us
<RubyPanther>
workmad3: might as well keep our chins up unless we're going to turn off the power. :)
<deryldoucette>
zzt
eywu has joined #ruby
jacktrik has joined #ruby
stkowski has joined #ruby
<avoit>
RubyPanther / workmad3 : But if I create a github api client which is used in a terminal, with authentification. So, I store the password in a config file ? It's weird
<pedahzur>
gate: I figured as much. Just trying to figure out where to find it on Debian.:)
virunga has joined #ruby
<workmad3>
avoit: not really
<workmad3>
avoit: or, if it's immediately user-facing, you request the password when the user starts the client
<RubyPanther>
avoit: normally github is using public/private key auth, and that already relies on the shell account being secured.
<avoit>
workmad3: And I don't store it ? So each time he uses the client, he need to type the password :/
jamw has joined #ruby
<workmad3>
avoit: basically, yes
<RubyPanther>
read access to the private key is no different than read access to a password file
rramsden has joined #ruby
<burgestrand>
unless you password protect the private key
<RubyPanther>
plaintext passwords are bad where they are in a database that might be discovered separately from the individual user accounts
stephenjudkins has joined #ruby
<burgestrand>
plaintext passwords are always bad :x
<RubyPanther>
You're still highly vulnerable if somebody gets control of your shell account.
* burgestrand
nods
eywu has joined #ruby
<medik>
Hm, I trying to write a simple http daemon in ruby. It seems like ruby are ignoring different statements, and I dont know why.
<RubyPanther>
proto, path = "http://example.com".match(/\A(?:(\w+):\/\/)?(.*)/).to_a[1..-1] # <3 lol
<burgestrand>
oh :)
<burgestrand>
URI.parse :x
nedbat has joined #ruby
<medik>
burgestrand: Thank you for your help ! :)
a215 has joined #ruby
fridim_ has joined #ruby
<burgestrand>
medik: \o/
Schmidt has joined #ruby
<medik>
burgestrand: \o/
Natch| has joined #ruby
axl_ has joined #ruby
Asher has joined #ruby
linduxed has joined #ruby
wroathe has joined #ruby
stringoO has joined #ruby
manhunter has joined #ruby
QKO has joined #ruby
<manhunter>
hi, is ruby writen/created using C language?
<manhunter>
downloaded 1.9.3
<manhunter>
extracted and saw many .c and .h files
<gate>
manhunter: ruby's interpreter is written in C, yes
savage- has joined #ruby
incomprehensib-1 has joined #ruby
<shevy>
hmm
<shevy>
we should interconnect with one another more!
<gate>
... I feel like I'm missing some context there.
flagg0204 has joined #ruby
<workmad3>
manhunter: the 1.9.3 standard interpreter is written in C
<shevy>
gate I mean the ruby community taken as a whole
<manhunter>
gate: But i saw many .c file not only one for interpreter.
chimkan___ has joined #ruby
<workmad3>
manhunter: there are other interpreters written in other languages though
<gate>
manhunter: you are looking at the interpreter
<gate>
All those .c and .h files create the interpreter and std libs
<manhunter>
extracting ruby-1.9.3 i see many .c files, are all those for ruby interpreter?
<gate>
manhunter: it is quite complex
ascarter has joined #ruby
fr0gprince_mac has joined #ruby
bbttxu_ has joined #ruby
ccapndave has joined #ruby
ccapndave has quit [#ruby]
<gate>
manhunter: are you looking for a walkthrough of what the code does? That's a little over my head since I haven't tried to alter MRI (matz ruby interpreter)
chrxn has joined #ruby
bhunt has joined #ruby
manhunter has quit ["WeeChat 0.3.6"]
<shevy>
I think he has 5 questions and he randomly shuffles these
charlenopires has joined #ruby
<shevy>
oh
<shevy>
he left #ruby but stays on #ruby-lang :(
PaciFisT has joined #ruby
MrGando has joined #ruby
<nedbat>
what's the diff between #ruby and #ruby-lang?
<shevy>
#ruby-lang is the official channel
albemuth has joined #ruby
wroathe has joined #ruby
clockwize has joined #ruby
wmoxam has joined #ruby
ascarter has joined #ruby
tinhead has joined #ruby
Liothen_ has joined #ruby
briankbuckley has joined #ruby
Liothen has joined #ruby
ryanf has joined #ruby
<apeiros_>
#ruby is the bigger channel
<workmad3>
#ruby is where the cool kids hang out :)
<gate>
#ruby is what I typed it just to see if the channel existed. I'm guessing that is a common story.