apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
Telg has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
dangsos has quit [Quit: Lost terminal]
havenn has quit [Ping timeout: 252 seconds]
x0F has quit [Ping timeout: 244 seconds]
locriani has joined #ruby
nfk has quit [Quit: yawn]
jchauncey has quit [Quit: jchauncey]
nyrb has joined #ruby
peterhil` has joined #ruby
dkissell has quit [Ping timeout: 260 seconds]
Xtek- has joined #ruby
Xtek has quit [Read error: Connection reset by peer]
robotmay has quit [Remote host closed the connection]
robotmay has joined #ruby
fbernier has quit [Ping timeout: 272 seconds]
chson has joined #ruby
robotmay has quit [Remote host closed the connection]
adamkittelson has quit [Remote host closed the connection]
Watcher7 has joined #ruby
williamcotton_ has joined #ruby
williamcotton has quit [Ping timeout: 265 seconds]
williamcotton_ is now known as williamcotton
audy has joined #ruby
sbanwart has quit [Ping timeout: 252 seconds]
<audy>
how to get current byte in a File instance? For example, if I call handle.gets and I want to know the current byte I'm at (for a progress bar)
albemuth has quit [Quit: Computer has gone to sleep.]
Telg is now known as Telgalizer
Asher1 has joined #ruby
ctwiz has quit [Quit: ctwiz]
Telgalizer is now known as Telg
albemuth has joined #ruby
cryptfu has quit [Quit: Leaving]
scott[8] has quit [Quit: HydraIRC -> http://www.hydrairc.com <- In tests, 0x09 out of 0x0A l33t h4x0rz prefer it :)]
testing has quit [Remote host closed the connection]
mikeg has quit [Remote host closed the connection]
x0F has joined #ruby
<showy>
audy: pos method
<audy>
showy ah thanks. I didn't see that in the docs because it's an IO method
albemuth has quit [Client Quit]
<showy>
audy: methods method is your friend
Asher has quit [Ping timeout: 272 seconds]
<audy>
showy ??
strife25 has quit [Quit: Computer has gone to sleep.]
<showy>
handle.methods.sort
<audy>
ah oh that
<audy>
I like handle.methods - Object.new.methods
ctwiz has joined #ruby
<showy>
Object.instance_methods
<audy>
that's shorter
nari has quit [Ping timeout: 260 seconds]
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
dkissell has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
ctwiz has quit [Ping timeout: 256 seconds]
ctwiz has joined #ruby
cryptfu has joined #ruby
christianrojas has quit [Quit: Leaving...]
<Na_Klar>
Any chance to increase the speed of file reading/writing? .. It would be help a lot to increase the buffer, but I cannot figure out how this could work ..
JustinCampbell has quit [Remote host closed the connection]
jonathanwallace has quit [Read error: Connection reset by peer]
akem has quit [Ping timeout: 272 seconds]
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
akem has joined #ruby
ctwiz has quit [Quit: ctwiz]
chomp has joined #ruby
chimkan_ has quit [Quit: chimkan_]
Ontolog has joined #ruby
cloke has quit [Quit: cloke]
igotnolegs has joined #ruby
ipsifendus has quit [Quit: ipsifendus]
<Na_Klar>
Making a fast file rw buffer in ruby is not that easy. Is there a faster way to cut bytes out of a string than "mystring[x,y]" ?
sirdeiu has quit [Remote host closed the connection]
liluo has joined #ruby
daed is now known as da3d
<delinquentme>
so if something referred to as 'module_namespacing' is breaking
Hanmac1 has joined #ruby
<delinquentme>
i've got a subtle grasp on modules ( basically they'll allow you to include particular code )
<delinquentme>
and the namespace happens to be the way that that module is called in
<delinquentme>
im getting this error: (erb):1:in `template': undefined method `module_namespacing' for #<MongoMapper::Generators::ModelGenerator:0x00000002c871c8> (NoMethodError)
SegFaultAX|work has quit [Ping timeout: 240 seconds]
khakimov has joined #ruby
adamkittelson has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
<Na_Klar>
^^ wut? how do you say cut string from 3 to end. mystring[3,] does not work. neither does [3,0] or [3,-1]
da3d is now known as daedablo
<horseman>
Na_Klar: in a mutating way u mean?
<horseman>
Na_Klar: or do u want a new string that only includes those chracters?
<heftig>
Na_Klar: 3..-1
<Na_Klar>
horseman: mutating? "abcdef" should become "def"
<horseman>
Na_Klar: if u want it to mutate the string then use slice!
<Na_Klar>
ah
<horseman>
if u want a new string, then do what heftig said
<horseman>
hmm
<Na_Klar>
yea, .. is the trick
xyzodiac has quit [Quit: Lost terminal]
luxurymode has quit [Quit: Computer has gone to sleep.]
strife25 has joined #ruby
tomzx has quit [Ping timeout: 272 seconds]
eka has quit [Remote host closed the connection]
lindenle_ has joined #ruby
mdhopkins has joined #ruby
<lindenle_>
Hi guys, what is the best practice for gems? i.e. are there core gems that are part of ruby proper? I had someone tell me that diffy is third party and he would prefer if the code I edited did not depen on so caled third-party gems.
daedablo is now known as da3d
stkowski has quit [Quit: stkowski]
behr has quit [Remote host closed the connection]
sirdeiu has joined #ruby
elake is now known as etank
ipsifendus has joined #ruby
<horseman>
lindenle_: all gems are third party
<horseman>
lindenle_: he means you should stick to the stdlib/core (which dont need to be installed separately)
andresjeje has joined #ruby
<andresjeje>
sucre
chomp has quit [Quit: Leaving]
pdtpatrick has quit [Quit: pdtpatrick]
zodiak has quit [Quit: Leaving]
jhunter has quit [Ping timeout: 245 seconds]
andresjeje has quit []
savage- has quit [Remote host closed the connection]
strife25 has quit [Quit: Computer has gone to sleep.]
jhunter has joined #ruby
lorandi has joined #ruby
nfluxx_ has joined #ruby
tewecske has quit [Quit: Leaving.]
nfluxx has quit [Ping timeout: 245 seconds]
nfluxx_ is now known as nfluxx
DRCALKIN has joined #ruby
kpshek has joined #ruby
sirdeiu has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: Leaving]
Solnse has joined #ruby
iamjarvo1 has joined #ruby
uris has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
jrist-afk is now known as jrist
kpshek has quit [Ping timeout: 240 seconds]
tmchaves has joined #ruby
mpereira has quit [Ping timeout: 248 seconds]
Targen has quit [Ping timeout: 245 seconds]
Asher1 has quit [Quit: Leaving.]
<lindenle_>
horseman: is there anything like diffy in the core?
Asher has joined #ruby
<horseman>
lindenle_not that i know of
<horseman>
lindenle_: so u might have to tell the guy to stfu
behr has joined #ruby
sirdeiu has joined #ruby
philcrissman has joined #ruby
niku4i has joined #ruby
araujo has quit [Quit: Leaving]
adamkittelson has quit [Remote host closed the connection]
shadoi has quit [Remote host closed the connection]
ctwiz has joined #ruby
yugui_zzz is now known as yugui
theRoUS has quit [Ping timeout: 240 seconds]
kevinbond has quit [Quit: kevinbond]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
adamkittelson has joined #ruby
Araxia_ has quit [Quit: Araxia_]
nfluxx has quit [Quit: nfluxx]
ipoval has joined #ruby
minijupe has joined #ruby
manizzle has quit [Ping timeout: 272 seconds]
vitoravelino is now known as vitoravelino`afk
Na_Klar has quit [Quit: ChatZilla 0.9.86 [Firefox 3.6.10/20100914125854]]
behr has quit [Remote host closed the connection]
behr has joined #ruby
gate has quit [Quit: leaving]
Spaceghostc2c has joined #ruby
friskd has joined #ruby
davidpk has joined #ruby
headius has joined #ruby
LostAcapulco has joined #ruby
<LostAcapulco>
hi guys!
robdodson has joined #ruby
niku4i has quit [Remote host closed the connection]
voodoofish430 has quit [Quit: Leaving.]
noodletraveler has joined #ruby
<LostAcapulco>
I just Install ruby via rvm but when I try ruby setup.rb this wild message appers: -bash: ruby: command not fou
c0rn has quit [Quit: Computer has gone to sleep.]
<LostAcapulco>
can someone help me?
m0nki3 has joined #ruby
albemuth has joined #ruby
Constant_ has quit [Remote host closed the connection]
<LostAcapulco>
dudes!
<LostAcapulco>
I need some help!
gate has joined #ruby
<LostAcapulco>
@marvin can you help?
<Spaceghostc2c>
LostAcapulco: rvm use <ruby>
<LostAcapulco>
Spaceghostc2c: root@apolo:~# <ruby> --version -bash: ruby: No such file or directory
<Spaceghostc2c>
...
<LostAcapulco>
ok
<LostAcapulco>
I got it
<LostAcapulco>
I didnt finished to install rvm
<LostAcapulco>
Spaceghostc2c: I just installed rvm
<LostAcapulco>
but when I try $ source ~/.rvm/scripts/rvm
<LostAcapulco>
this messages appears
seitensei has quit [Remote host closed the connection]
<LostAcapulco>
root@apolo:~# source ~/.rvm/scripts/rvm -bash: /root/.rvm/scripts/rvm: No such file or directory
<LostAcapulco>
Spaceghostc2c:
manizzle has joined #ruby
Solnse has quit []
vaks has quit [Ping timeout: 248 seconds]
robdodson has quit [Quit: robdodson]
cryptfu has quit [Ping timeout: 272 seconds]
Fezzler has joined #ruby
LostAcapulco has quit [Quit: Page closed]
werdnativ_ has joined #ruby
werdnativ_ has quit [Client Quit]
cads has joined #ruby
m0nki3 has quit [Quit: Leaving]
seanstickle has joined #ruby
stefanp_ has joined #ruby
vaks has joined #ruby
werdnativ has quit [Read error: Operation timed out]
fbernier has joined #ruby
dbgster has joined #ruby
Soul_Est has joined #ruby
vaks is now known as vaksie
stefanp has quit [Ping timeout: 265 seconds]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
thecreators has joined #ruby
nfluxx has joined #ruby
vaksie has quit []
vaksie has joined #ruby
vaksie is now known as vaks
shadoi has joined #ruby
cryptfu has joined #ruby
stefanp_ has quit [Ping timeout: 265 seconds]
Targen has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
lorandi has quit [Quit: Leaving]
tmchaves has quit [Remote host closed the connection]
Fezzler has quit [Quit: Leaving]
delinquentme has quit [Quit: Leaving]
rexbutler has joined #ruby
DRCALKIN has quit [Quit: Leaving]
dhaskew has quit [Ping timeout: 256 seconds]
araujo has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
vertroa has joined #ruby
testing has joined #ruby
lord_daemon has quit [Ping timeout: 245 seconds]
lord_daemon has joined #ruby
dhaskew has joined #ruby
Dreamer3 has quit [Ping timeout: 245 seconds]
dbgster has quit [Quit: dbgster]
Dreamer3 has joined #ruby
ndch has joined #ruby
headius has quit [Quit: headius]
iamjarvo1 has quit [Ping timeout: 244 seconds]
subbyyy has quit [Ping timeout: 244 seconds]
trend has quit [Disconnected by services]
ananthakumaran has joined #ruby
jonathanwallace has joined #ruby
nfluxx has quit [Quit: nfluxx]
Jamoka has joined #ruby
Kabaka has quit [Quit: BRB]
mnaser has quit [Quit: Computer has gone to sleep.]
Kabaka has joined #ruby
nfluxx has joined #ruby
nfluxx has quit [Client Quit]
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
subbyyy has joined #ruby
BrokenCog has quit [Ping timeout: 248 seconds]
rexbutler has quit [Read error: Connection reset by peer]
cha1tanya has joined #ruby
cha1tanya has joined #ruby
nfluxx has joined #ruby
Progster has joined #ruby
nfluxx has quit [Client Quit]
mxweas has quit [Quit: Leaving...]
asteve has joined #ruby
nfluxx has joined #ruby
nfluxx has quit [Client Quit]
cantonic has quit [Quit: cantonic]
cha1tanya has quit [Ping timeout: 245 seconds]
fbernier has quit [Ping timeout: 272 seconds]
kenichi has quit [Remote host closed the connection]
Progster has quit []
simao_ has joined #ruby
simao has quit [Ping timeout: 265 seconds]
rushed has quit [Quit: rushed]
ping-pong has quit [Ping timeout: 245 seconds]
<bnagy>
pf, well, if you'd stuck around...
cephalopod has quit [Read error: Connection reset by peer]
<bnagy>
you need a ruby of some kind to bootstrap, also don't install as root unless you love pain
niklasb has quit [Ping timeout: 240 seconds]
quest88 has joined #ruby
stanigator has joined #ruby
kevinbond has joined #ruby
<stanigator>
is it even possible to use a constructor in ruby that contains default parameter values?
<otters>
certainly
Vert has quit [Read error: Connection reset by peer]
<TTilus>
stanigator: why not? have you tried?
<TTilus>
constructor is just another method
<stanigator>
TTilus: thanks, just tried and verified what you and otters said; had a hard time figuring it out from the examples that I've come across so far
<bnagy>
what's a contructor in ruby? you mean 'initialize'?
nyrb has quit [Remote host closed the connection]
seanstickle has quit [Quit: Nihil sub sole novum]
<stanigator>
bnagy: ya, initialize
vertroa has quit [Read error: Connection reset by peer]
<bnagy>
ok :) ctor dtor are not really ruby jargon
vertroa has joined #ruby
mike3 has quit [Quit: WeeChat 0.3.7]
luckyruby has joined #ruby
<stanigator>
TTilus: that brings me to another question. If my class is defined as https://gist.github.com/f91e5794a654eee69ad6 , is it even legal if I only want to create a new object with only artist and duration properties specified, leaving name to be assigned to the default parameter value?
<bnagy>
no
<bnagy>
you need to use hash args for that
<stanigator>
bnagy: i can only use hashes to use that trick properly?
cantonic has joined #ruby
<bnagy>
as far as I know... 1.9 has all kind of funky method invocations that are new, but I don't think you can 'skip' args
<bnagy>
in any case, it's the correct code pattern
<bnagy>
def foo(required=default, opt_hsh)
<bnagy>
uh... I mean no
<bnagy>
let me just finish this coffee so I stop talking crap :(
<stanigator>
bnagy: fair enough, i'm still very new to ruby
<stanigator>
bnagy: finish your coffee
nyrb has joined #ruby
<bnagy>
def foo ( required, opt_hsh)
<stanigator>
bnagy: i'm all good with specifying parameters now
ctwiz has quit [Quit: ctwiz]
<stanigator>
just have another question: where can i find documentation about attr_reader and other attributes to read about? I'm having a hard time with ruby-docs.org
<bnagy>
'the internet' I guess. All they are are shortcuts to method definitions though
<bnagy>
in some ways I don't like them that much
<bnagy>
not only because they confuse people but also because people tend to put them waaay up the top of classes and then define the relevant ivars down the bottom somewhere :P
<bnagy>
attr_reader sym is the same as writing def sym; @sym ;end
macmartine has quit [Quit: macmartine]
<bnagy>
stanigator: you could literaly have a class class Song; attr_accessor :name, :artist, :duration;end
windy88 has joined #ruby
<bnagy>
try it out in irb :)
<windy88>
haaaaaaiiiii
<stanigator>
bnagy: I tried something similar already; i tried googling the internet already, but couldn't get to any useful search results
<bnagy>
ok, well apart from what I just said, what else do you want to know?
<windy88>
hiiiii
<windy88>
h r u guys...
<bnagy>
windy88: hi. This is #ruby, #drunkelevenyearolds is down the hall
<stanigator>
bnagy: i want to know all the different possible access rights there are with ruby
rippa has joined #ruby
<bnagy>
predefined? reader, writer, accessor
vertroa has quit [Read error: Connection reset by peer]
<stanigator>
bnagy: according to the article, that means if i set the attributes to attr_accessor, that means i can use built-in Ruby accessors to access and modify those attributes?
<stanigator>
bnagy: realized that there are only reader, writer, and accessor from the article
vertroa has joined #ruby
<bnagy>
that article is a tiny peek into instance / class scope and metaprogramming
<stanigator>
bnagy: right; is attr_accessor equivalent to R/W access to member variables?
iamlacroix has quit [Remote host closed the connection]
<bnagy>
stanigator: if you're just getting started, then I would urge you not to think of 'access rights' in ruby code. Although you can kind of try to protect / hide stuff you pretty much never can
thecreators has quit [Quit: thecreators]
iamlacroix has joined #ruby
<bnagy>
attr_accessor merely sets up direct getter setter methods for that ivar
<stanigator>
bnagy: ic; just trying to connect the dots between ruby and similar functions with my native programming language
<bnagy>
class Bank;attr_reader :money;def initialize;@money=5000;end;end
pdtpatrick has joined #ruby
<bnagy>
if you do b=Bank.new, try out instance_variable_set :@money, 0 or b.instance_eval '@money=0' in irb :P
quest88 has quit [Quit: quest88]
iamlacroix has quit [Ping timeout: 272 seconds]
tonini has joined #ruby
dhaskew has quit [Quit: dhaskew]
pigoz has quit [Ping timeout: 245 seconds]
Jamoka has quit [Quit: Leaving]
Gavilan has quit [Read error: Connection reset by peer]
Gavilan has joined #ruby
Soul_Est has quit [Quit: WeeChat 0.3.7]
yoklov has joined #ruby
thecreators has joined #ruby
<stanigator>
bnagy: instance_variable_set :@money, 0 didn't work, but b.instance_eval '@money=0' worked to modify the money variable
<shevy>
ewwwwww eval
lkba has quit [Ping timeout: 244 seconds]
araujo has quit [Ping timeout: 256 seconds]
<bnagy>
stanigator: b.instance_varriable_set ;)
nfluxx has joined #ruby
<bnagy>
*variable
tomzx has joined #ruby
td123 has quit [Quit: WeeChat 0.3.7]
iamlacroix has joined #ruby
<stanigator>
now i think i know what you're doing; when you're doing that, you're already inside b's class scope, therefore @money can be modified?
<stanigator>
at least that's what it looks like from what i'm reading
<bnagy>
which is why I urged you not to think there were access rights :)
nipra has joined #ruby
ndch has quit [Quit: Leaving...]
vitor-br has quit [Quit: Saindo]
Shahor has joined #ruby
savage- has joined #ruby
<stanigator>
those two functions are scary
<bnagy>
:D
minijupe has quit [Quit: minijupe]
<stanigator>
consider what they can do without permissions
mikeycgto has quit [Remote host closed the connection]
kevinbond has quit [Quit: kevinbond]
krz has quit [Quit: krz]
<bnagy>
well given that you can replace methods in Kernel or Object, they're not _that_ scary
<stanigator>
aren't Object and Kernel two key classes in Ruby?
davidcelis has quit [Quit: K-Lined]
<bnagy>
the moral of the story is that things like reader vs accessor and private, protected etc are more like polite notes to people using your code, or to stop them making innocent mistakes
<stanigator>
bnagy: but not really foolproof enough from doing anything stupid using those methods you brought up
nipra has quit [Quit: Leaving]
<bnagy>
no, although I'd argue it's just more obvious than in other languages
MasterIdler has joined #ruby
<bnagy>
every language that has a process read/write primitive has this issue
<stanigator>
right
<stanigator>
i didn't dig deep enough to learn about them until now
cha1tanya has quit [Ping timeout: 272 seconds]
Ziphre is now known as ZifreCL
nipra has joined #ruby
n3m has quit [Read error: Connection reset by peer]
n3m has joined #ruby
<stanigator>
what's the advantage of using a class method rather than an instance method?
<shevy>
stanigator well, what I do is write a tutorial (which is more a specification) how things should be used. if people dont follow that then they are on their own
robert_ has quit [Read error: Connection reset by peer]
SeySayux has quit [Ping timeout: 244 seconds]
andynu has quit [Ping timeout: 244 seconds]
MissionCritical has quit [Ping timeout: 244 seconds]
<rippa>
World.new.nuke
<bnagy>
stanigator: the classic example, say you add packing logic to the Set class, s=Set.new (1..100); packed=s.pack # that was an instance method
<bnagy>
how do you unpack it now?
robert_ has joined #ruby
wataken44 has quit [Ping timeout: 244 seconds]
kylemcgill has quit [Remote host closed the connection]
wataken44 has joined #ruby
jacobw has quit [Ping timeout: 240 seconds]
n3m has quit [Ping timeout: 244 seconds]
uris has quit [Quit: leaving]
r126l has quit [Ping timeout: 240 seconds]
ckrough has quit [Ping timeout: 240 seconds]
n3m has joined #ruby
strnx has quit [Excess Flood]
ckrough has joined #ruby
<stanigator>
bnagy: s.pack is packed by copying the parameters? I don't really know
r126l has joined #ruby
ckrough is now known as Guest39841
ekaleido has quit [Ping timeout: 244 seconds]
kmwhite has quit [Ping timeout: 244 seconds]
<bnagy>
how it works isn't important :) What's important is that the only thing that makes sense is to have s2=Set.unpack( packed )
jacobw has joined #ruby
strnx has joined #ruby
kmwhite has joined #ruby
<bnagy>
so class methods are ideally for stuff that is relevant to the class, but makes no sense for an _instance_ of that class
<stanigator>
bnagy: wait, are pack and unpack predefined Ruby methods?
ekaleido has joined #ruby
<bnagy>
not on Set
<stanigator>
ic
<bnagy>
Array#pack and String#unpack, but this is just an illustrative example :)
ABK has joined #ruby
<stanigator>
how would you determine whether the stuff is only relevant to the class or not? like pack and unpack only makes sense to Set class?
<bnagy>
well pack makes sense for an instance, right?
<bnagy>
but unpack doesn't, cause the packed Set will be a String now
ryanf has joined #ruby
SeySayux has joined #ruby
<stanigator>
right
testing has left #ruby [#ruby]
<bnagy>
same for stuff like Marshal.load or even Dir.chdir
<bnagy>
File.expand_path...
andantino has joined #ruby
andantino has quit [Changing host]
andantino has joined #ruby
<rippa>
or Math::sqrt
<rippa>
oh wait...
<bnagy>
:>
<Mon_Ouie>
Set#pack doesn't make sense anyway because sets aren't ordered
macmartine has quit [Quit: macmartine]
<bnagy>
Mon_Ouie: what does that have to do with packing?
<Mon_Ouie>
pack asks for a format, which depends on the order of the data structure
<bnagy>
as long as you have a working unpack, pack makes perfect sense
<bnagy>
no, Array#pack does that
Eldariof-ru has quit []
shevy2 has joined #ruby
LBRapid has quit [Read error: Connection reset by peer]
sparrovv has joined #ruby
yxhuvud has joined #ruby
looopy has quit [Remote host closed the connection]
andantino has quit [Quit: Leaving]
MissionCritical has joined #ruby
shevy has quit [Ping timeout: 245 seconds]
LBRapid has joined #ruby
kylemcgill has joined #ruby
SmoothSage has joined #ruby
Watcher7 has quit [Remote host closed the connection]
kevinbond has joined #ruby
_md has joined #ruby
shadoi has quit [Remote host closed the connection]
yoklov has quit [Quit: computer sleeping]
davidcelis has joined #ruby
sparrovv has quit [Ping timeout: 252 seconds]
quest88 has joined #ruby
quest88 has quit [Client Quit]
h4mz1d has quit [Ping timeout: 260 seconds]
<stanigator>
last question: i'm having trouble finding a function that copies strings. is there a function with Ruby similar to strcpy?
albemuth has quit [Quit: Leaving...]
gtuckerkellogg has joined #ruby
A124 has joined #ruby
andantino has joined #ruby
andantino has quit [Changing host]
andantino has joined #ruby
<davidcelis>
what
<andantino>
i am trying to learn ruby. i am doing exercises from a book and i just installed the sqlite3 gem. when i use the gem in a script it works but i get warning
<andantino>
statement not reached
<davidcelis>
stanigator: .dup works on any object
<andantino>
/usr/lib/ruby/1.9.1/rubygems/defaults.rb:24: warning: statement not reached
<andantino>
/usr/lib/ruby/1.9.1/rubygems/defaults.rb:76: warning: statement not reached
<stanigator>
davidcelis: thanks, i believe that's what i'm looking for
A124 has left #ruby [#ruby]
<andantino>
just wondering if anyone could enlighten me about what's going on
benatwork has quit [Remote host closed the connection]
nyrb has quit [Read error: Connection reset by peer]
adamkittelson has quit [Remote host closed the connection]
nyrb has joined #ruby
idoru has quit [Ping timeout: 600 seconds]
sparrovv has joined #ruby
mucker has joined #ruby
CheeToS has joined #ruby
tvw has joined #ruby
thecreators has quit [Quit: thecreators]
SPYGAME has joined #ruby
burgestrand has quit [Quit: Leaving.]
ananthakumaran has quit [Quit: Leaving.]
andantino has quit [Quit: Leaving]
stanigator has quit [Quit: Page closed]
sparrovv has quit [Ping timeout: 256 seconds]
eph3meral has quit [Quit: Leaving]
djdb has joined #ruby
arturaz_ has joined #ruby
raul782 has quit [Remote host closed the connection]
Abhinav1 has joined #ruby
kawa_xxx has joined #ruby
timonv has joined #ruby
luckyruby has quit [Remote host closed the connection]
luckyruby has joined #ruby
mucker has quit [Ping timeout: 240 seconds]
savage- has quit [Read error: Connection reset by peer]
savage- has joined #ruby
mucker has joined #ruby
kevinbond has quit [Quit: kevinbond]
manizzle has quit [Ping timeout: 240 seconds]
Pray has joined #ruby
Ontolog has quit [Remote host closed the connection]
kil0byte has quit [Ping timeout: 248 seconds]
Gavilan has left #ruby [#ruby]
idoru has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
iamlacroix has quit [Read error: Connection reset by peer]
Targen has quit [Ping timeout: 265 seconds]
kil0byte has joined #ruby
iamlacroix has joined #ruby
dnyy has quit [Read error: Connection reset by peer]
ipsifendus has quit [Read error: Connection reset by peer]
philcrissman has quit [Read error: Connection reset by peer]
ipsifendus has joined #ruby
dnyy has joined #ruby
senny has joined #ruby
CheeToS has quit [Read error: Connection reset by peer]
Rizzle has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
CheeToS has joined #ruby
Ontolog has joined #ruby
moshee has quit [Remote host closed the connection]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
kstephens has quit [Ping timeout: 276 seconds]
ananthakumaran has joined #ruby
wookiehangover has quit [Ping timeout: 252 seconds]
Synthead has quit [Ping timeout: 244 seconds]
Rizzle has joined #ruby
alienvenom has quit [Ping timeout: 244 seconds]
alienvenom has joined #ruby
kstephens has joined #ruby
Synthead has joined #ruby
wookiehangover has joined #ruby
maesbn has joined #ruby
schovi has quit [Remote host closed the connection]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
piotr_ has joined #ruby
robotmay has joined #ruby
kawa_xxx has quit [Remote host closed the connection]
igotnolegs has quit [Quit: Computer has gone to sleep.]
twinturbo has joined #ruby
sparrovv has joined #ruby
solars has joined #ruby
tewecske has joined #ruby
ph^ has joined #ruby
chimkan_ has joined #ruby
foofoobar has joined #ruby
ananthakumaran1 has joined #ruby
cads has quit [Ping timeout: 272 seconds]
Pray has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 244 seconds]
jackiechan0 has quit [Remote host closed the connection]
QaDeS has joined #ruby
jackiechan0 has joined #ruby
kil0byte_ has quit [Ping timeout: 250 seconds]
<vectorshelve>
bnagy: u like calling yourself stupid ? lol
moshee has quit [Remote host closed the connection]
<vectorshelve>
bnagy: that's me... and wait until the time I put up our chat history to public whr they will laugh out the incident where you try flirting with a swedish beauty :D
<vectorshelve>
bnagy: sorry that was for banisterfiend ^^ :)
<bnagy>
anyone happen to have tested openjdk8 with jruby on osx?
<workmad3>
bnagy: I'm sure *someone* has :P
<bnagy>
:>
<bnagy>
s/ne/ne present/
<bnagy>
damn forgot extra space :(
mxweas_ has quit [Quit: Computer has gone to sleep.]
<bnagy>
or, another question, any good threadpooling gems for jruby that emulate the parallel gem Parallel.map / Parallel.each
thecreators has joined #ruby
L-----D has quit [Quit: Leaving]
twinturbo has quit [Ping timeout: 244 seconds]
berserkr has quit [Quit: Leaving.]
twinturbo has joined #ruby
twinturbo has quit [Client Quit]
ABK has quit [Ping timeout: 244 seconds]
shevy has joined #ruby
sandGorgon has quit [Ping timeout: 248 seconds]
freeayu1 has quit [Ping timeout: 255 seconds]
<bnagy>
ahh crap... just tested with a trivial example and it works.. must be another bug in my complex code :(
<bnagy>
I need some kind of tricky repl that you could use for debugging and stuff
<Tasser>
I've got this table http://sprunge.us/NZUH and I'd like to remove all columns where all elements are empty?
dankest has quit [Read error: Connection reset by peer]
Dan- has joined #ruby
<shevy>
hmm
<shevy>
all elements?
<shevy>
["", "", "", "", "Fr."],
<shevy>
all columns contain at least one non empty entry, or?
ken_barber has joined #ruby
<shevy>
so the input data you have kinda seems to be the output data you seek, if I understood your question correctly Tasser :-)
wargasm has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
wargasm has joined #ruby
freeayu1 has joined #ruby
<Tasser>
shevy, I'm talking about columns not rows
Guedes_out is now known as Guedes
robbyoconnor has quit [Ping timeout: 244 seconds]
<Tasser>
shevy, ich will dass die ersten Elemente in jeder Zeile gelöscht werden
<shevy>
yo habs verstanden, glaub nit das es eine fix fertige loesung gibt. eine die mir einfällt wäre die elemente zu zählen, und wenn das endergebnis "" ist dann muss diese column gelöscht werden hmm
<banisterfiend>
shevy: HAHAHAHAHAHAHA
<banisterfiend>
shevy: i never thoguht i'd see you type in german
<shevy>
banisterfiend he used german, I was just polite to reply in german too!
<banisterfiend>
shevy: i can now finally see your dark german heart hiding under all that innocent sounding english
perlsyntax has joined #ruby
<shevy>
how many times do I have to keep telling you that english is the future banisterfiend :(
<bnagy>
*dark austrian heart
<shevy>
and if not english, then it should be russian simply because it sounds dangerous
xbayrockx has quit []
<bnagy>
ah HA, bug in parallel, NOT my code
<bnagy>
booyah
<banisterfiend>
shevy: do you agree with Tasser's views on the german language
<banisterfiend>
uh
<banisterfiend>
other way round
<banisterfiend>
Tasser*
xbayrockx has joined #ruby
<Tasser>
banisterfiend, learn some german to recieve balls, because german grammar is FUCK YOU
<bnagy>
gerne
<bnagy>
(that's all I know ;)
<shevy>
that's a better word than "und"
seivan has quit [Remote host closed the connection]
<Tasser>
I've got this little perl script around that converts between german and english using leo
<shevy>
hehe
<shevy>
time to write a ruby script!
Morkel has quit [Quit: Morkel]
<Tasser>
hell nah
<Tasser>
it works, so why care
strife25 has joined #ruby
<shevy>
I would!
<shevy>
I am a fanatical purist
Guedes has quit [Ping timeout: 265 seconds]
<bnagy>
shevy: you already said you were austrian
<bnagy>
*zing*
<shevy>
Tasser is it one .pl script? or several, if it is only one, could you upload that .pl script somewhere?
arturaz has quit [Remote host closed the connection]
davidcelis has quit [Read error: Connection reset by peer]
kil0byte_ has joined #ruby
triptec has joined #ruby
liluo has quit [Remote host closed the connection]
arturaz has joined #ruby
davidcelis has joined #ruby
broadcast has joined #ruby
kil0byte has quit [Ping timeout: 265 seconds]
broadcast has quit [Client Quit]
<shevy>
ah well, too confusing to stare at all that line noise to figure out what is really going on :(
kil0byte_ has quit [Ping timeout: 255 seconds]
fermion has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
kil0byte has joined #ruby
Vainoharhainen has joined #ruby
Constant_ has joined #ruby
<Tasser>
hmm, first time I don't know how to do this functional-style with ruby iterators
<Tasser>
because I can't transpose
CannedCorn has joined #ruby
nari has joined #ruby
Vainoharhainen has quit [Client Quit]
Constant_ has quit [Remote host closed the connection]
kylemcgill has quit [Remote host closed the connection]
shruggar has quit [Read error: Connection reset by peer]
shruggar1 has joined #ruby
berserkr has joined #ruby
whowantstolivefo has joined #ruby
vaks3 has joined #ruby
cordoval has joined #ruby
vaks has quit [Ping timeout: 240 seconds]
mengu_ has joined #ruby
mengu has quit [Read error: Connection reset by peer]
noodletraveler has quit [Quit: leaving]
freeayu1 has quit [Ping timeout: 272 seconds]
S2kx has joined #ruby
<whowantstolivefo>
i have ruby 1.8.7 windows installer and i installed. when i type "gem update --system" this command give me that error (i use win7+64 bit) ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - README
S1kx has quit [Ping timeout: 256 seconds]
mengu__ has joined #ruby
<shevy>
whowantstolivefo, does upgrading individual gem work
mengu_ has quit [Read error: Connection reset by peer]
<shevy>
whatever this is doing on your system, it seems as if it tries to find a README in a gem project file, which is quite odd
<shevy>
also what does 'gem --version' say
iocor has quit [Quit: Computer has gone to sleep.]
CannedCorn has quit [Quit: Computer has gone to sleep.]
jackiechan0 has quit [Ping timeout: 240 seconds]
freeayu1 has joined #ruby
Jamoka has joined #ruby
Vainoharhainen has joined #ruby
ken_barber has quit [Remote host closed the connection]
jjxtsys has quit [Ping timeout: 245 seconds]
denysonique has joined #ruby
vaks3 is now known as vaks
<whowantstolivefo>
shevy : when i type " gem --version " it says me 1.3.7 version
medik has joined #ruby
<bnagy>
yikes
<workmad3>
good old 1.3.7
<bnagy>
I guess it is 1.8.7
googya has joined #ruby
<bnagy>
whowantstolivefo: watch out for velociraptors
andrewh has quit [Ping timeout: 248 seconds]
<googya>
hi guys, I is confused by this code — ruby -ne "print" 1.txt , 1.txt includes 4 lines, 111, 222, 333, 444
ABK has joined #ruby
<bnagy>
so am I
rippa has joined #ruby
<workmad3>
googya: start by saying what you expected to happen
<googya>
sorry, I mean why "-e 'print' " will have output
banisterfiend has quit [Remote host closed the connection]
cordoval has left #ruby [#ruby]
<googya>
is there a default para for print?
jbpros has quit [Quit: May the Cuke be with you!]
jbpros has joined #ruby
<bnagy>
googya: man ruby
jjxtsys has joined #ruby
mrmist_ has joined #ruby
mrmist has quit [Quit: Reconnecting]
<bnagy>
also, I learned something today. Woo!
<googya>
bnagy: ha, good! I know how to use ruby command, but some times I do not know why it happen!
Guest31431 is now known as zii
zii has quit [Changing host]
zii has joined #ruby
<bnagy>
because -n does weirdness
<googya>
-n causes Ruby to assume the following loop around your script, which makes it iterate over filename arguments somewhat like sed -n or awk.
<workmad3>
?? '-n assume 'while gets(); ... end' loop around your script'
<bnagy>
vectorshelve: you could also _not_ be a selfish asshole with no manners, that's a valid life choice
<shevy>
vectorshelve rails stuff goes into #rubyonrails
<bnagy>
oh, he knows
<vectorshelve>
shevy: nobody is helping me there shevy I am sad depressed oppressed and suppressed :(:'(
<bnagy>
he just doesn't care because he thinks he's above common courtesy
<bnagy>
who ops this channel anyway?
<apeiros_>
I
<shevy>
vectorshelve well then don't use rails
iamjarvo has joined #ruby
<apeiros_>
vectorshelve: you've been told a couple of times how to properly seek help. follow that. I'll kick or kick-ban otherwise.
<vectorshelve>
apeiros_: sorry mate but I am frustrated... since I have been lost with this problem over the past 2 days// with no solution
`brendan has joined #ruby
<apeiros_>
vectorshelve: you know very well that that's not the point. And I'm not gonna discuss that in the channel. if you've got a problem with what I said, you can pm me (not about your ruby problem, about the behavior in this channel)
<vectorshelve>
apeiros_: okay got it
KensoDev has joined #ruby
banisterfiend has joined #ruby
indian has joined #ruby
bluenemo has joined #ruby
iamlacroix has joined #ruby
h4mz1d has joined #ruby
Sgeo has quit [Ping timeout: 272 seconds]
locriani has quit [Remote host closed the connection]
<bnagy>
ha! so the parallel gem and jruby DO play together - I am positive something must have been fixed since last time I tried this
<banisterfiend>
bnagy: can u send me a copy of your program
<Hanmac>
~€:>
<banisterfiend>
Hanmac: hey bro, what's up
<bnagy>
banisterfiend: uh... which one?
<banisterfiend>
bnagy: it looks interesting
<bnagy>
I didn't do anything, in the end, apart from that one line above
<bnagy>
and updating to jruby-head
afallows has joined #ruby
<banisterfiend>
bnagy: oh, hey do u know much about jruby?
<bnagy>
nope
<banisterfiend>
bnagy: any idea how to get the instances for a given class
<banisterfiend>
oh ok
<bnagy>
oh that I think I do know
<bnagy>
ObjectSpace is turned off by default
<bnagy>
for performance
<banisterfiend>
jruby doesnt like ObjectSpace though
<banisterfiend>
ya
<shevy>
I really want a RubyOS :(
<banisterfiend>
is there a way to get it using some specific JRuby API though?
<banisterfiend>
without using objectspace
<banisterfiend>
i dont mind if it's expensive
<bnagy>
yeah no idea, probably have to write java I guess
<banisterfiend>
just so long as it's possible
heftig has joined #ruby
andyjeffries has quit [Client Quit]
<banisterfiend>
shevy: u here?
<shevy>
banisterfiend yeah, my internet connection is a bit wobbly wonky though
shruggar1 has quit [Read error: Operation timed out]
vaks has quit [Remote host closed the connection]
afallows_ has quit [Ping timeout: 250 seconds]
Zyclops has quit [Quit: Leaving.]
otters has joined #ruby
<whowantstolivefo>
i have ruby 1.8.7 windows installer and i installed. when i type "gem update --system" this command give me that error (i use win7+64 bit) ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - README
<whowantstolivefo>
when i type " gem --version " it says me 1.3.7 version
<shevy>
whowantstolivefo deja vu. did you update rubygems
<bnagy>
shevy: well I guess it's tricky when gem update --system barfs ;)
<whowantstolivefo>
shevy : how do i update rubygems ?
<bnagy>
maybe the latest rubyinstaller from the site has a less suk rubygems?
fbernier has joined #ruby
chrismcg is now known as zz_chrismcg
yoklov has joined #ruby
<bnagy>
I don't have a win7 x64 system handy to test, sry
andrewh has quit [Quit: Lost terminal]
<bnagy>
(nor am I that keen on installing ruby 1.8 o_0
<whowantstolivefo>
so ? i cant learn ruby in win7 ? :(
<bnagy>
whowantstolivefo: is there a reason you're using Ruby From The Dawn Of Time?
<bnagy>
if you're learning I'd recommend 1.9
<whowantstolivefo>
bnagy : i am web designer, i try to learn about ruby by myself, and i cant use other os by the way...
tomzx has quit [Ping timeout: 272 seconds]
<bnagy>
ok you probably should learn on 1.9 then
<bnagy>
all the fast moving stuff is 1.9 compat and some are 1.9 only
jankly_ has joined #ruby
<whowantstolivefo>
bnagy : u suggest me to install 1.9 versions of ruby ?
<bnagy>
and you should also learn to use non-windows, that's what vmware etc are for
vaks has joined #ruby
shruggar has joined #ruby
<bnagy>
whowantstolivefo: yes. I do.
<shevy>
whowantstolivefo download it extract it use setup.rb
<whowantstolivefo>
bnagy : okay i will use vmware, which OS or distro i must install ?
<shevy>
I think you can even update gem from gem
<bnagy>
whowantstolivefo: to start to learn about *nix? Man I can't answer that without opening a huge can of worms :)
<whowantstolivefo>
people i am downloading vmware now and i have gentoo.iso - ubuntu latest distros, opensuse and other ones. which one i can install better for ruby learning ?
<bnagy>
whowantstolivefo: you don't need linux to learn ruby, I just think you should learn a little *nix anyway
<bnagy>
rubyinstaller for windows should work fine
<bnagy>
and like I said, imho ubuntu server probably 12.04
<shevy>
whowantstolivefo the distributions won't really *help* you learn ruby, the only thing you can look for is to try to minimize the problems they give you
iocor has quit [Quit: Computer has gone to sleep.]
<bnagy>
otherwise you learn bad habits from gnome / kde bullshit sysadmin apps
<whowantstolivefo>
bnagy shevy thanks for advices. i am listening u both! i will learn this!!
<shevy>
whowantstolivefo did you try PHP btw?
<shevy>
I started with PHP when I was on windows. and apache stack (WAMP)
<bnagy>
why would you DO that??
<shevy>
bnagy he'll clear the base problems
wangr has joined #ruby
emmanuelux has joined #ruby
<shevy>
and he'll be surprised how much better ruby is too :>
<whowantstolivefo>
shevy i didnt learn anything, i only know some sql querios for reports about job. and html, css, little javascript and jquery things.
cha1tanya has quit [Ping timeout: 240 seconds]
<shevy>
good, good
<shevy>
extend your base
<shevy>
the thing with windows is that many things that are simple on linux, are not so simple on windows
<Muz>
That's entirely subjective.
<Muz>
Depending on what you're used to.
kil0byte has joined #ruby
iocor has joined #ruby
jrbing has joined #ruby
<shevy>
Muz what OS are you using?
<Muz>
shevy: this very moment? OS X.
<shevy>
:)
<Muz>
What do I normally use? Windows 7.
<Muz>
What have I used for years now in a professional capacity? Linux. :p
<shevy>
whowantstolivefo see there is your man, a fearless win 7 user is here
<whowantstolivefo>
shevy : haha i am not alone
kil0byte_ has quit [Ping timeout: 248 seconds]
<shevy>
whowantstolivefo don't be too sure, you could always be abandoned ... ;)
shruggar1 has joined #ruby
<Muz>
Plenty of Windows & Ruby users here. Sure it takes getting used to, but then again, so does learning the quirks fo rvm and OS X. ;)
<whowantstolivefo>
Muz : your same with me win7 user ?
jgarvey has joined #ruby
afallows_ has joined #ruby
<shevy>
whowantstolivefo not only that, it's also very simple for him :)
<Muz>
I wouldn't phrase it quite like that. I haven't got a reference machine to hand here, so probably wouldn't be too much use right now - along with the fact I should be working...
<shevy>
though I could really swear there is a gem way to update to latest rubygems version
gtuckerkellogg has joined #ruby
tommyvyo has joined #ruby
<shevy>
whowantstolivefo I think all those checkboxes are useful
<Muz>
gem update --system
<shevy>
the 3rd one makes your life easier when you double click on a .rb file
<shevy>
the 1st one, in case you want a "hello world" GUI button
<shevy>
and the 2nd one I suppose so you can invoke ruby from cmd.exe too
Zyclops has joined #ruby
nipra has quit [Ping timeout: 260 seconds]
<shevy>
so yeah, click em!
<whowantstolivefo>
shevy: i installed. now what should i do for look if everything ok ?
<shevy>
man... 51 MB ... why is this so big :\
<shevy>
whowantstolivefo try to run "irb" or "irb.exe" or "irb.bat"
<shevy>
it should be in the ruby*/bin folder
zz_chrismcg is now known as chrismcg
<shevy>
or look at the installed menu path in that thing that windows uses... I forgot the name
<Muz>
There'll be a Start Menu shortcut to a Command Line wth Ruby support or similar
<whowantstolivefo>
ok now i am on irb
<shevy>
yay!
afallows has quit [Ping timeout: 260 seconds]
<shevy>
now you can type ruby Code whowantstolivefo
<whowantstolivefo>
yes i read that command from learn ruby thingy
<apeiros_>
whowantstolivefo: you mean >=, right?
<shevy>
rubygems is integrated into this ruby version
<apeiros_>
=> is the hash-rocket, not the comparison operator
<shevy>
so it should make your life easier too... although, I dont know how to update gem version on ruby 1.9.x
<bnagy>
apeiros_: I think it's just a paste of the output
<whowantstolivefo>
there is hash-rocket and says " 1.9.3. "
<apeiros_>
oh dear, then use # =>
<apeiros_>
2+5 # => 7
<shevy>
hehe
<lolmaus>
Is it true that instead of doing `def assign(block_var); @inst_var = block_var; end` i can simply do `def assign; @inst_var; end` with the same result? Like `my_object.assign "whatever"`
<shevy>
nobody likes the hash rocket anyway
asobrasil has joined #ruby
<shevy>
except peter cooper
* apeiros_
actually changed his irbrc to do exactly that
chson has quit [Remote host closed the connection]
<apeiros_>
so I can just copy & paste irb
<shevy>
lolmaus I am trying to parse the question
<whowantstolivefo>
shevy : now what should i do ?
<bnagy>
lolmaus: no
<whowantstolivefo>
i must change hash rocket via #?
lolmaus was kicked from #ruby by apeiros_ [if you ask in multiple channels, disclose that fact up-front. inform channels about answers you git. just cross-posting is rude.]
<shevy>
whowantstolivefo nah
<apeiros_>
urgs @ git
<shevy>
whowantstolivefo next thing, I dont know, it depends on what you wanna do actually
<shevy>
whowantstolivefo no real idea how to resolve this, sorry. The Encoding is the reason I am still on 1.8.7
<whowantstolivefo>
is there anyone knows about encoding problem ?
<whowantstolivefo>
im going to install gentoo on vmware , maybe i wouldnt see that problem ?
<bnagy>
gentoo? ye gods and little fishes
<whowantstolivefo>
else distro ? which better works ruby ?
<shevy>
no real idea, if you have LANG variable on gentoo set to en_US.utf8 and all your files are in utf8 then probably you dont have this problem, but Encoding tends to come back and bite people into the ass
<whowantstolivefo>
or debian 6 ?
chimkan_ has quit [Ping timeout: 260 seconds]
xea has joined #ruby
carloslopes has joined #ruby
cha1tanya has joined #ruby
cha1tanya has joined #ruby
<shevy>
whowantstolivefo no idea, let's wait for someone who loves 1.9.x here and will stick up to this, by resolving this Encoding problem you have
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
locriani has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
eykosioux has joined #ruby
<CannedCorn>
hey guys is there a way to convert a time from seconds to a time object?
perryh is now known as perryh_away
<shevy>
how does your time thing look like?
foofoobar has quit [Ping timeout: 265 seconds]
vitor-br has joined #ruby
<shevy>
whowantstolivefo well, you could still work through the Chris Pine tutorial :)
akhkharu has quit [Ping timeout: 252 seconds]
mpereira has joined #ruby
<CannedCorn>
shevy its time in seconds since the epoch
<shevy>
hmm how about something like this then Time.at(1_000_000_000)
sie has quit [Read error: Connection reset by peer]
devdazed has joined #ruby
ph^ has quit [Ping timeout: 255 seconds]
jackiechan0 has joined #ruby
afallows has joined #ruby
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
dv310p3r has joined #ruby
sie has joined #ruby
sie is now known as Guest87122
elux has joined #ruby
afallows_ has quit [Ping timeout: 244 seconds]
<elux>
hey guys
Guest87122 is now known as zii
zii has quit [Changing host]
zii has joined #ruby
<elux>
is it possible to have Logger output to STDOUT and to a file? .. via pipes?
ABK has quit [Ping timeout: 272 seconds]
gokul has joined #ruby
nari has quit [Ping timeout: 265 seconds]
heftig has quit [Quit: leaving]
<workmad3>
elux: is this a daemonised process?
ConstantineXVI has quit [Remote host closed the connection]
<workmad3>
elux: if so, could you not just tail -f the log file? ;)
<elux>
yea i hear you.. might not make sense to write to both.. would be a waste of IO when daemonized
berserkr has quit [Quit: Leaving.]
rippa has quit [Quit: derp herp]
dustybrains has joined #ruby
<workmad3>
elux: well, you could also consider something like runit, which means you'd write to stdout and then runit manage the process and handle logging stdout to a log file
<workmad3>
elux: whichever way you do it, I'd personally only do one and let other tools handle the other ;)
vectorshelve has quit [Quit: Page closed]
krusty_ar has quit [Read error: Connection reset by peer]
<workmad3>
elux: and with Logger, I guess you can pick stdout or a file
tijmencc has joined #ruby
krusty_ar has joined #ruby
<workmad3>
elux: if you want it as practice though, it's pretty easy to create your own Logger that can create (and then echo output to) multiple loggers... I believe you only need to handle one method, or you could do a method_missing
solars has left #ruby ["WeeChat 0.3.5"]
akem has quit [Quit: Forget progress by proxy. Land on your own moon.]
DefV has quit [Ping timeout: 272 seconds]
DefV has joined #ruby
tijmencc has quit [Client Quit]
LBRapid has joined #ruby
benatwork has joined #ruby
kil0byte_ has joined #ruby
seitensei has joined #ruby
uris has joined #ruby
googya has left #ruby [#ruby]
tatsuya_o has quit [Remote host closed the connection]
chrismcg is now known as zz_chrismcg
kil0byte has quit [Ping timeout: 252 seconds]
yoklov has quit [Quit: computer sleeping]
axl_ has quit [Quit: axl_]
oktapodi has joined #ruby
jackiechan0 has quit [Ping timeout: 245 seconds]
lolmaus has joined #ruby
zii has quit [Read error: Connection reset by peer]
drake has quit [Remote host closed the connection]
zii has joined #ruby
zii is now known as Guest95515
pabloh has joined #ruby
indian has quit [Ping timeout: 255 seconds]
Guest95515 has quit [Client Quit]
ElitestFX has joined #ruby
zz_chrismcg is now known as chrismcg
ConstantineXVI has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
ubercore has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
alanp has quit [Remote host closed the connection]
<CannedCorn>
is there an easy way to convert from an into to a byte array
KensoDev has quit [Read error: Connection reset by peer]
KensoDev has joined #ruby
chson has joined #ruby
yeggeps_ has quit [Quit: yeggeps_]
<workmad3>
CannedCorn: that sentence seems like it's either missing words or is in the wrong order :/
internet_user has joined #ruby
minijupe has joined #ruby
alanp has joined #ruby
<cache_za>
wow, just had a look through the poignant guide to ruby - i'm new to ruby and this has been the most odd introduction to a language i've ever seen
<cache_za>
probably also the first one i've read properly :p
mrwalker has joined #ruby
<shevy>
cache_za interesting
<shevy>
I never liked it when I started with ruby. I stuck to chris pine learn to program, and then the pickaxe
bglusman has joined #ruby
cha1tanya has quit [Ping timeout: 244 seconds]
christianrojas has joined #ruby
whowantstolivefo has quit []
<workmad3>
cache_za: _why was... eccentric :)
jackiechan0 has joined #ruby
<workmad3>
poignant is practically a work of art... of course, it's now old and it was always controversial, but brilliant anyway :)
looksirdroids has quit [Ping timeout: 245 seconds]
strife25 has joined #ruby
nyrb has joined #ruby
bbttxu has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
catfired has joined #ruby
berserkr has joined #ruby
<catfired>
is ruby interpreted or compiled
<workmad3>
catfired: complicated and depends on interpreter/vm
<lolmaus>
I don't quite understand how this code works. https://gist.github.com/2701912 The concatination is performed upon a returned object which is actually an instance variable and keeps its modified state inside the instance?
fbernier has joined #ruby
Zyclops has joined #ruby
vaks has quit [Ping timeout: 250 seconds]
<catfired>
what?
<workmad3>
lolmaus: strings are mutable
<workmad3>
lolmaus: and << modifies the string directly
<workmad3>
catfired: well, all the modern interpreters will compile your script to bytecode and run that internally on a vm, similar to java bytecode on the jvm
<lolmaus>
workmad3, but this lets me modify the internal state of the object??
<workmad3>
lolmaus: correct
<workmad3>
lolmaus: because you're returning a reference to that internal state
<lolmaus>
workmad3, isn't that kinda... wrong?
<workmad3>
lolmaus: if you don't want it modified, don't return a reference to your internal satet
<workmad3>
*state
schovi has quit [Remote host closed the connection]
<workmad3>
lolmaus: that's true in pretty much any language
pu22l3r has joined #ruby
<lolmaus>
workmad3, how can i have a method return a value and not give access to its internal state?
<workmad3>
lolmaus: there's such a thing as the .dup method ;)
carloslopes has quit [Ping timeout: 245 seconds]
<lolmaus>
workmad3, so is using .dup preferred?
<workmad3>
lolmaus: I don't normally worry massively
<workmad3>
lolmaus: this isn't java... there tends to be a higher degree of trust that people won't do stupid stuff in ruby
h4mz1d has quit [Ping timeout: 252 seconds]
looksirdroids has joined #ruby
<lolmaus>
workmad3 After reading how much The Good Thing incapsulation is, i'm kinda surprised to encounter such a hole.
<workmad3>
lolmaus: but if you're being paranoid, you can make sure you always return deep-cloned, frozen duplicates of objects and let people who want to modify your internal state do it via instance_variable_set instead ;)
<workmad3>
lolmaus: again, no matter what language you're in, such holes exist
<workmad3>
lolmaus: it's exactly the same 'hole' as java has, or C++
<workmad3>
lolmaus: just that in java, you won't encounter it with strings, because strings are immutable in that
<lolmaus>
workmad3, so one can actually modify an attribute exposed via attr_reader?
Darkfang has joined #ruby
<banisterfiend>
lolmaus: every single programming language works like ths, it's not a 'hole' in ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
<lolmaus>
banisterfiend, i didn't say it's a hole in Ruby. I meant a hole in the concept.
<workmad3>
lolmaus: if the object allows modifiable operations, then they can be called, but you can't alter the referenced object
<Darkfang>
Hi
<Tasser>
I still wonder why nil.dup fails
<workmad3>
lolmaus: so you can't modify the attribute, in the sense that you can't alter what the attribute references
<Darkfang>
Is anyone experiencing serious perf trouble with Rdoc? I recently switched to 1.8.something to 1.9.3 and what used to take ~30s has been runnign for over 5 minutes...
<Tasser>
there is theoretic reason to let it fail, but it kinda sux for duck typing
<workmad3>
lolmaus: but the object that is referenced may permit modification via its own interface
luxurymode has joined #ruby
thone has joined #ruby
<workmad3>
lolmaus: it's not so much a hole in the concept of encapsulation, as it is a common flaw in how people implement things
<workmad3>
lolmaus: if you make heavy use of non-modifiable value objects, then you're 'safe' from that form of thing
axl_ has joined #ruby
<workmad3>
Tasser: if you want duck typing, don't let nil escape into your program :P
<Tasser>
workmad3, special handling of null pointers? ah well
walbert has joined #ruby
kil0byte has quit [Ping timeout: 244 seconds]
kil0byte has joined #ruby
<Tasser>
apparently the guy who came up with the idea of null pointers kinda regrets it
<workmad3>
Tasser: I was thinking more making use of the null object pattern
<workmad3>
Tasser: rather than returning nil
<Tasser>
huh?
thone_ has quit [Ping timeout: 272 seconds]
<Tasser>
lemme wikipedia that
jonathanwallace has quit [Remote host closed the connection]
<Tasser>
ah
<lolmaus>
workmad3, banisterfiend, is there some conventional Ruby practice to prevent class users from doing this? https://gist.github.com/2702153
<Tasser>
lolmaus, why would you want to prohibit that?
<workmad3>
lolmaus: none that wouldn't prevent the user from doing something like 'vasya.instance_variable_set(:@some_var, vasya.instance_variable_get(:@some_var).reverse)'
walbert has quit [Client Quit]
<workmad3>
lolmaus: or just reopening the class and altering things
<lolmaus>
Tasser, if i wanted not to prohibit that, i'd use attr_accessor instead.
<banisterfiend>
lolmaus: i think you're overthinking things, dont view programmers using your APIs as hackers trying to break your system
<banisterfiend>
if they misuse your APIs then they're shooting themselves in the foot, not harming u
<workmad3>
lolmaus: I refer you back to the previous statement of trusting coders to not be dumb :)
<lolmaus>
workmad3, banisterfiend, i thought that the whole concept of incapsulation (other than resolving namespace issues) is to prevent people from shooting their limbs off
gokul has quit [Quit: Leaving]
oktapodi has quit [Ping timeout: 252 seconds]
<workmad3>
lolmaus: it's to stop people from easily shooting their limbs off
<Tasser>
lolmaus, it's some linux philosphy here, not maccy ;-)
<workmad3>
lolmaus: you can never stop a determined person from shooting their limbs off, you can just make the path of least resistance one that will actually work
<Tasser>
workmad3, why would you? Splatter films sell well ;-)
kevinbond has joined #ruby
liluo has quit [Remote host closed the connection]
<lolmaus>
workmad3, well, unlike your instance_variable_set, "user.name.reverse!" IS easy, ain't it?
cmarques has joined #ruby
<banisterfiend>
lolmaus: encapsulation is more to mentally compartmentalize things as a way of blackboxing certain information so u dont have to hold too much info in your head
<banisterfiend>
lolmaus: it's not so much about 'security'
<banisterfiend>
in my opinion anyway
ghanima has joined #ruby
<workmad3>
lolmaus: it's not something I'd consider ever doing on a string returned from an object though...
<workmad3>
lolmaus: wrapping it up in accessors is basically announcing that this thing is yours to manage
djmitche has joined #ruby
<workmad3>
lolmaus: so unless an example showed that it was ok to do things like reverse it in place, or add to it, the thought of doing so wouldn't cross my mind... I certainly wouldn't be looking to do that in real code
<Darkfang>
/leave/quit
<Darkfang>
quit
Darkfang has quit [Quit: leaving]
<banisterfiend>
lol
<banisterfiend>
fail
<Hanmac>
lolmaus. you could freeze your string ... an object wich is frozen can never be thrawn
<banisterfiend>
Hanmac: "thrawn" :P
ViperMaul has joined #ruby
<workmad3>
Hanmac: thawed? :)
macmartine has joined #ruby
<workmad3>
lolmaus: end of the day, it is what it is... encapsulation can never be perfect, in the same way that abstractions can never be perfect
<shevy>
.freeze sucks
jchauncey has joined #ruby
<lolmaus>
workmad3, banisterfiend, thank you. ^_^
DuoSRX has quit [Remote host closed the connection]
oktapodi has joined #ruby
DuoSRX has joined #ruby
showy has joined #ruby
lolmaus has quit []
iocor has quit [Quit: Computer has gone to sleep.]
jeebster has joined #ruby
jgarvey has quit [Remote host closed the connection]
headius has joined #ruby
afallows has quit [Ping timeout: 245 seconds]
nlc has joined #ruby
afallows has joined #ruby
eguzman_ has joined #ruby
CheeToS has joined #ruby
looopy has joined #ruby
iocor has joined #ruby
Jelco_ has quit [Ping timeout: 245 seconds]
tsou has joined #ruby
ABK has joined #ruby
yonggu has quit [Remote host closed the connection]
yonggu has joined #ruby
jgarvey has joined #ruby
Morkel has quit [Quit: Morkel]
axl_ has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
n3m has joined #ruby
g0bl1n has joined #ruby
digitalcakestudi has joined #ruby
yonggu has quit [Quit: yonggu]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
jcromartie has joined #ruby
wvms has quit [Quit: wvms]
oktapodi_ has joined #ruby
tatsuya_o has joined #ruby
ABK has quit [Read error: Connection reset by peer]
Soul_Est has quit [Ping timeout: 244 seconds]
cache_za has quit [Remote host closed the connection]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
oktapodi has quit [Ping timeout: 250 seconds]
triptec has quit [Quit: triptec]
Jelco has joined #ruby
luckyruby has joined #ruby
crankycoder has quit [Remote host closed the connection]
crankycoder has joined #ruby
baroquebobcat has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
crankycoder has quit [Remote host closed the connection]
baroquebobcat has quit [Read error: Connection reset by peer]
crankycoder has joined #ruby
baroquebobcat has joined #ruby
alex__c2022 has joined #ruby
indian has joined #ruby
jprovazn is now known as jprovazn_away
freeayu1 has quit [Quit: 离开]
bluOxigen has quit [Ping timeout: 256 seconds]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
n3m has quit [Quit: Leaving...]
n3m has joined #ruby
ABK has quit [Read error: Connection reset by peer]
dknight_ has joined #ruby
<dknight_>
what is the difference between using RestClient.put and Net::HTTP.Put?
<dknight_>
I want to understand the purpose of using the rest-client gem. please explain. pointers are also welcome
ckrailo has joined #ruby
ABK has joined #ruby
sam113101 has quit [Read error: Connection reset by peer]
chiel has joined #ruby
<chiel>
Is there any way I can do a `raise`, but somehow attach an error code, as well?
<chiel>
I am writing a User class which will throw UserErrors, but for different reasons. It would be awesome if I could pass a code back to differentiate them
jroes has left #ruby [#ruby]
sam113101 has joined #ruby
looopy has quit [Remote host closed the connection]
afallows_ has joined #ruby
n3m has quit [Client Quit]
oooPaul has joined #ruby
mengu__ has quit [Quit: Konversation terminated!]
Zyclops has quit [Quit: Leaving.]
afallows has quit [Ping timeout: 252 seconds]
davidcelis has quit [Quit: K-Lined]
trivol has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
CannedCorn has quit [Read error: Operation timed out]
Alantas has joined #ruby
<deryl>
i believe the rest-client (from looking at it) is to help enforce ReST-ful requests and names for those requests. This differs from Net::HTTP in that ReST is an architectural way of looking at requests, but isn't limited to HTTP calls alone. seems that gem is designed to enforce ReST by using its calls. Net::HTTP conformsw to the HTTP standard.
<deryl>
oh he left hehe. everyone else can ignore that
heftig has joined #ruby
radic has quit [Read error: Connection reset by peer]
<deryl>
actually he's here. dknight_ that was for you
visof has joined #ruby
hynkle has joined #ruby
mikepack has joined #ruby
fr0gprince_mac has joined #ruby
looopy has joined #ruby
fr0gprince_mac has quit [Client Quit]
lkba has joined #ruby
ABK has quit [Ping timeout: 252 seconds]
radic has joined #ruby
<dknight_>
deryl: yeah, I am reading that
<Alantas>
HTTP is a protocol, REST is a principle. (To my understanding.)
<dknight_>
deryl: the issue I was facing was trying to put a hash using the two methods
<FlyingFoX>
is there an easy way to run just one test out of a bunch of unit tests in irb?
<dknight_>
rest-client worked fine for a PUT but Net::HTTP failed
<deryl>
Alantas, correct
ABK has joined #ruby
kenperkins has joined #ruby
<deryl>
dknight_, can't help you. haven't used Net::HTTP in anything i've written so far (where I have had to code it directly) nor that gem
saltnvinegar has joined #ruby
<deryl>
but that had nothing to do with your actual qestion. next time oyu might be better served askling your *actual* question :)
maesbn has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
fr0gprince_mac has joined #ruby
<deryl>
not bitching just saying, because what *I* told you had nothing to do with your real issue
heisenmink has joined #ruby
maesbn has joined #ruby
ABK has joined #ruby
ipoval has quit [Quit: ipoval]
<heisenmink>
"puts 'åäö'" prints åäö
<heisenmink>
in the terminal. How do I deal with this? I have "#encoding: utf-8" as the first row in the .rb file, and the .rb file is encoded in utf8
d3c has quit [Quit: Sleep]
Dan- has quit [Quit: Leaving...]
<Mon_Ouie>
Funny thing with that copy and paste is I can't see the characters in your code, but I can see those in your output
<Mon_Ouie>
So the ones that look normal are the latter
<heisenmink>
I HATE encodings
<deryl>
wonder if your terminal isn't configured for UTF-8
<showy>
heisenmink: ruby version ?
<FlyingFoX>
i have a file with unit tests and I can't get one of them to pass (it runs indefinitely). now I think this is because have some errors in code that i didn't test yet. i want to write more unit tests for this untested code in question. how do i keep the faulty test from being run? do i have to just uncomment it or is there a better solution?
ABK has quit [Read error: Connection reset by peer]
visof has quit [Ping timeout: 272 seconds]
Eldariof-ru has quit [Ping timeout: 272 seconds]
ABK has joined #ruby
Clordio has joined #ruby
<heisenmink>
deryl, that could be the case, since the characters don't show up correctly when I CAT the file either
radic has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
radic has joined #ruby
mucker has joined #ruby
akem has joined #ruby
ABK has quit [Read error: Connection reset by peer]
savage- has quit [Remote host closed the connection]
ABK has joined #ruby
<heisenmink>
Oh, how stupid of me. Of course I have to add "echo -ne '\e%G\e[?47h\e%G\e[?47l'" to my .bashrc for utf8 to work
<heisenmink>
thanks for helping anyway
MasterIdler has quit [Quit: MasterIdler]
maesbn has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
cesario__ has joined #ruby
dkannan_ has joined #ruby
pu22l3r_ has joined #ruby
jrgifford_ has joined #ruby
kil0byte_ has joined #ruby
msch has quit [Read error: Operation timed out]
dkannan has quit [Read error: Operation timed out]
cesario has quit [Read error: Operation timed out]
jrgifford has quit [Read error: Operation timed out]
pu22l3r has quit [Read error: Connection reset by peer]
SeySayux has quit [Read error: Operation timed out]
jrgifford_ is now known as jrgifford
maletor has joined #ruby
SeySayux_ has joined #ruby
t0mmyvyo has joined #ruby
ViperMaul has quit [Ping timeout: 255 seconds]
kil0byte has quit [Ping timeout: 250 seconds]
CannedCorn has joined #ruby
maletor has quit [Client Quit]
<CannedCorn>
hey guys is there a way to clear out the cache of c-extensions
rippa has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
schovi has joined #ruby
<Mon_Ouie>
heisenmink: That echo thing looks kind of weird to me. Why not setting LC_* and LANG env variables?
nu7hatch has joined #ruby
<heisenmink>
Mon_Ouie, I have that already. but with that echo thing, utf8 works again. I have no idea what it does
ABK has quit [Read error: Connection reset by peer]
<Mon_Ouie>
What terminal is that? XTerm?
ABK has joined #ruby
Ontolog has joined #ruby
davidcelis has joined #ruby
blacktulip has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
<heisenmink>
Mon_Ouie, I am logged in using PuTTy, it's a headless server
<Alantas>
Never had a problem with UTF-8 in any of my terminals (xterm, or xfce's terminal). Though it came with a premade .bashrc that probably enacts it. <checks>
internet_user has quit [Remote host closed the connection]
ABK has joined #ruby
<Mon_Ouie>
From a quick google research, PuTTY has settings to configure encoding
<Alantas>
Nah, just aliases and prompt-fu. Though it's all running locally, so there's no complication of translating from another machine. <shrug>
ABK has quit [Read error: Connection reset by peer]
neersighted|AFK is now known as neersighted
ABK has joined #ruby
internet_user has joined #ruby
ananthakumaran has joined #ruby
cha1tanya has quit [Ping timeout: 260 seconds]
luckyruby has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
ramblex has quit [Ping timeout: 272 seconds]
uris_ has joined #ruby
uris has quit [Read error: Connection reset by peer]
KensoDev has quit [Remote host closed the connection]
mucker has quit [Ping timeout: 265 seconds]
ABK has quit [Ping timeout: 245 seconds]
schovi has quit [Remote host closed the connection]
ABK has joined #ruby
Ontolog has joined #ruby
iocor has joined #ruby
<Synthead>
makkura: so what if I have, for example, ssh.forward.local(80, 'localhost' 80) and want to use a variable instead of "local"? could I do ssh.forward.send('local')(80, 'localhost', 80)?
tvw has quit [Read error: Connection reset by peer]
tobor_one has joined #ruby
araujo has quit [Read error: Operation timed out]
stkowski has joined #ruby
christianrojas has quit [Quit: Leaving...]
rakm has joined #ruby
saltnvinegar has quit [Quit: saltnvinegar]
buhhhh has joined #ruby
Solnse has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
maletor has quit [Quit: Computer has gone to sleep.]
tatsuya_o has quit [Remote host closed the connection]
<minijupe>
Cn a class I've overwritten a method provided in by a mixin module. Inside from that new method, I want to conditionally call the method that was overwritten. Is this possible?
<minijupe>
*In a class*
ephemerian has quit [Quit: Leaving.]
Vainoharhainen has quit [Quit: Leaving...]
pydave6367 has quit [Quit: leaving]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
sparrovv has quit [Ping timeout: 245 seconds]
<Alantas>
minijupe: Maybe. Try "super(args...)".
<minijupe>
Alantas: i wasn't sure if super works with modules or just parent classes
bluenemo has quit [Remote host closed the connection]
mrsolo has joined #ruby
shruggar1 has quit [Quit: Leaving.]
dkissell has quit [Ping timeout: 244 seconds]
khakimov has joined #ruby
<Alantas>
I think Ruby implements mixins by secretly inserting it as a class between the derived class and its (nominal) base. Like: class Parent; class ParentWithEnumerable < Parent; class Base < ParentWithEnumerable
<Alantas>
Or something like that.
Rickmasta has quit [Ping timeout: 272 seconds]
<Alantas>
(from "class Base < Parent; include Enumerable; ...")
<carloslopes>
minijupe: i think super works only with parent classes.. but an alternative is create an alias for the old method and override it and call the aliased name inside the new method
strnx has quit [Ping timeout: 244 seconds]
<carloslopes>
minijupe: but, if super works.. is the best way :)
akem has quit [Ping timeout: 244 seconds]
<minijupe>
carloslopes: lemme get this straight so method A is in the module, I alias A as B, then override A, and call B from within A?
Rickmasta has joined #ruby
<carloslopes>
minijupe: yes
bricker88 has quit [Quit: Leaving.]
<minijupe>
carloslopes: ok, I'll try super first, but I bet it won't work
ABK has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 272 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<carloslopes>
minijupe: yeah.. me too.. i think it only work in parent classes
ABK has joined #ruby
nilg` has quit [Remote host closed the connection]
cj3kim has quit [Quit: Leaving]
patrick99e99 has joined #ruby
<minijupe>
carloslopes: interesting, super seems to be working, but I will inspect further
<minijupe>
anyone else want to chime in? does super work for mixin methods?
<minijupe>
because it is 'apparently' working, but if feel it might bite me in the ass
dkissell has joined #ruby
<Alantas>
A quick test case in irb suggests that it does work.
<patrick99e99>
can anyone tell me how I can add a constant to the parent class from an included module? in other words, class Foo; include Bar; end ... and I want module Bar to be able to assign a constant for Foo (or whatever class includes it)
ABK has quit [Read error: Connection reset by peer]
<Alantas>
But, if I have a "class Standalone; include Mixin" without Standalone having a parent class, I get a "no superclass method `foo'" error. Which is what one would expect if Ruby uses the secret-parent-class thing I mentioned.
<carloslopes>
suppp: no, #days is a rails' method
ABK has joined #ruby
<suppp>
carloslopes : is it possible to require this to my ruby file ?
strnx has joined #ruby
<shevy>
suppp you can add a .days method to class Fixnum
ABK has quit [Read error: Connection reset by peer]
Abhinav1 has quit [Quit: Leaving.]
<shevy>
yeah, if you manage to find out where it was defined in rails ;)
ABK has joined #ruby
<suppp>
i see :)
<shevy>
I think it is part of some active* thing
altious has joined #ruby
c0rn has joined #ruby
<carloslopes>
suppp: yes.. you can make one and it will behave like in rails
<carloslopes>
shevy: don't worry, this won't happen.. i only agree in many aspects with you :)
jonathanwallace has quit [Read error: Connection reset by peer]
<shevy>
it does remind me a little bit of php, btw, insofar as features creep into rails
nfluxx has joined #ruby
jonathanwallace has joined #ruby
fmcgeough has joined #ruby
<shevy>
rails 4.0 will do something terrible to the world
<shevy>
good carloslopes :)
TorpedoSkyline has joined #ruby
<shevy>
but the good thing with rails is
kpshek has quit []
axl_ has quit [Read error: Connection reset by peer]
<shevy>
when I have a rails question
<shevy>
I can ask apeiros_ !!!
axl_ has joined #ruby
<carloslopes>
shevy: but it's true.. rails core have some strange methods :S
<shevy>
they built quite a large ecosystem
<carloslopes>
shevy: and strange codes too.. some times it really scares
Solnse has quit [Read error: No route to host]
nilg` has joined #ruby
<shevy>
the new "foo: bar" syntax in 1.9.x came because of rails or?
altious has quit [Quit: Leaving]
tobor_one has quit [Quit: tobor_one]
cmarques has joined #ruby
ukd1 has joined #ruby
altious has joined #ruby
<carloslopes>
shevy: but i use and like it :)
<carloslopes>
shevy: hmm i don't know.. but i don't like this syntax
<carloslopes>
shevy: :foo => 'bar' is better for me
<Alantas>
I think 1.9 broke my irb. It won't let me tab-complete filenames, and trying to left-cursor over a line instead inserts garbage characters~! So I undid the rbenv thing to return to the system ruby, and all is well again. Terminals start faster too once I evicted rbenv stuff from .bash_profile.
<shevy>
yeah carloslopes same here for me
<Alantas>
I can live without the "foo: bar" syntax. And definitely without having to #encoding everything.
<jlogsdon>
Alantas: use pry instead :3
<shevy>
problem is, it seems to be the number one reason why I cant use new gems
<shevy>
as I am still on 1.8.7
mrsolo has quit [Quit: Leaving]
<shevy>
yeah Alantas
jonatha__ has joined #ruby
<shevy>
I kinda miss that there are not that many really new killer features that I find useful
<shevy>
there is a speed increase, so that is nice
<Alantas>
First thing I did when I got 1.9.3 up with rbenv is to get pry. Still didn't work (it'd spew a bunch of redeclaring-constants nonsense, then bail on missing some library or other).
<shevy>
#method_source or however was the name, is also fine
<jlogsdon>
weird...
<jlogsdon>
i coulnd't work without pry anymore
<shevy>
I still did not understand fibers much, so I cant say whether they are useful or not
<jlogsdon>
fibers are un-managed light-weight threads
<shevy>
jlogsdon, help me convince banisterfiend to have pry included into default ruby :)
<jlogsdon>
(basically)
Ontolog has quit [Remote host closed the connection]
<jlogsdon>
that would be so fantastic
<Alantas>
1.9 ought to default to the old behavior (regarding encodings, etc), and only be stricter when you request it (with #encoding). It'd be like if it started checking taint by default all of a sudden.
<shevy>
yeah Alantas
<carloslopes>
shevy, jlogsdon: pry make my life better each day :)
<jlogsdon>
then everyone could know of the awesomeness of cd People.new && show-method why-is-thois-weird
<shevy>
I think the ruby core team is smoking weed
<jlogsdon>
(err bad method name but yeah!)
mrsolo has joined #ruby
<jlogsdon>
what of it?
jonathanwallace has quit [Ping timeout: 255 seconds]
<shevy>
I love the idea behind cd-ing into stuff
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<jlogsdon>
it makes working out the process a call goes through much easier
<jlogsdon>
follow it down the chain, wherever it may go
abionic has quit [Read error: Connection reset by peer]
iocor has joined #ruby
williamcotton has joined #ruby
headius has quit [Quit: headius]
saltnvinegar has joined #ruby
thorncp has left #ruby [#ruby]
apeiros has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
iamlacroix has joined #ruby
<deryl>
and you DO NOT install AS root as is *clearly* spelled out.
krz has joined #ruby
<deryl>
check and make sure oyu don't have an existing $HOME/.rvmrc nor one under /root/ nor the /etc/profile.d/rvm.sh and delete your $HOME/.rvm tree and the /usr/local/rvm tree if one exists
<patrick99e99>
can anyone tell me how I can add a constant to the parent class from an included module? in other words, class Foo; include Bar; end ... and I want module Bar to be able to assign a constant for Foo (or whatever class includes it)
AgileKyle has joined #ruby
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
jjxtsys has joined #ruby
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
subbyyy has joined #ruby
<shevy>
patrick99e99 hmm my brain has difficulties parsing this
<carloslopes>
patrick99e99: reopen the module and add the constant inside it
<carloslopes>
patrick99e99: i think this should work
ken_barber has quit [Remote host closed the connection]
<patrick99e99>
carloslopes: ? I want to be able to do class Baz; include Bar; end .. and class Foo; include Bar; end... and have Baz::MY_CONSTANT and Foo::MY_CONSTANT
<patrick99e99>
defined from the module..
Dreamer3 has quit [Ping timeout: 252 seconds]
adambeynon has quit [Quit: adambeynon]
mcwise has joined #ruby
vaks has joined #ruby
<patrick99e99>
also I should note, I want to make dynamically define that constant based off of the class including the module
thecreators has quit [Remote host closed the connection]
hkhalid has joined #ruby
vaks has quit [Ping timeout: 244 seconds]
<hkhalid>
hi
Dreamer3 has joined #ruby
wmoxam has joined #ruby
manizzle has quit [Ping timeout: 265 seconds]
dv310p3r has quit [Ping timeout: 272 seconds]
headius has joined #ruby
keithcelt has joined #ruby
abionic has quit [Read error: Connection reset by peer]
rubyruy has quit [Quit: Linkinus is updating...]
RoUS has quit [Ping timeout: 260 seconds]
rubyruy has joined #ruby
Dreamer3__ has joined #ruby
Dreamer3__ has quit [Max SendQ exceeded]
ukd1 has quit [Quit: ukd1]
Squarepy has quit [Quit: Leaving]
CharlieS1 is now known as CharlieSu
hkhalid has quit []
Dreamer3 has quit [Ping timeout: 248 seconds]
Boohbah has joined #ruby
td123 has quit [Quit: WeeChat 0.3.7]
oktapodi_ has quit [Remote host closed the connection]
jonatha__ has quit [Read error: Connection reset by peer]
mbusigin has joined #ruby
showy has quit [Ping timeout: 250 seconds]
iamlacroix has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
niku4i_ has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
Morkel has joined #ruby
shruggar has quit [Quit: Leaving.]
strife25 has quit [Quit: Computer has gone to sleep.]
strife25 has joined #ruby
Boohbah has quit [Remote host closed the connection]
amalvagomes has joined #ruby
<amalvagomes>
Hi, I'm a bit of a ruby newbie and I'm experiencing an interesting problem with compatibility. Can you point me in the right directions?
<carloslopes>
amalvagomes: ask and we try to help :)
Boohbah has joined #ruby
Dreamer3 has quit [Ping timeout: 256 seconds]
jonathanwallace has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
<amalvagomes>
Ok, so I'm writing an application on Grape and using bundler to install all of my gems. I'm trying to make use of Paperclip to manage a bucket on Amazon S3. I think I have everything working and when I try a rackup, it tells me:
<shevy>
no wait... this is ruby, but that is even better
<Boohbah>
A wild Rails appears!
Targen has joined #ruby
abionic has quit [Read error: Connection reset by peer]
<shevy>
shoot it down!
<shevy>
grape on rails
<deryl>
where is the rails in that? I use AR, AS, and AM in a completely non-rails app
abionic has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
suppp_ has joined #ruby
<deryl>
or is grape some sort of rails hybrid thing?
<amalvagomes>
Uh, no. There are no rails. I didn't use any rails commands.
<amalvagomes>
Grape lives alone.
<amalvagomes>
But I need AR, AM, and AS for interacting with my database.
suppp has quit [Read error: Connection reset by peer]
suppp_ is now known as suppp
jonathanwallace has joined #ruby
<deryl>
amalvagomes, same as i do on several of my own apps. no rails, but i do use AR/AS/AM as well.
<deryl>
never heard of grape though
<amalvagomes>
Grape is a simple little guy that lets me expose an API from my server that I can query from my client application without all of the Rails overhead.
<amalvagomes>
It's like Rails' routing system without all of the other junk that Rails gives you.
<deryl>
ahh yeah just did gem search grap -dr and found it.
<deryl>
thanks, something else for me to look into
Faris has joined #ruby
<deryl>
s/grap /grape /
<amalvagomes>
Regardless, does anyone know what's going on here?
ghanima has quit [Quit: Leaving.]
schovi has joined #ruby
cantonic has quit [Quit: cantonic]
jonathanwallace has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
abionic has quit [Read error: Connection reset by peer]
abionic has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
iamlacroix has quit [Remote host closed the connection]
abionic has quit [Read error: Connection reset by peer]
khakimov has quit [Quit: Computer has gone to sleep.]
<keithcelt>
So, paperclip 2.3.1 needs a method that doesn't exist in AR 3.2.2?
BeLucid_ has joined #ruby
BeLucid has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 272 seconds]
iamlacro_ has joined #ruby
<keithcelt>
@amalvagomes have you tried upgrading paperclip to 3.0.3? I think that is the newest.
<amalvagomes>
keithcelt: That was my first thought, but then I get another interesting error saying that a class, Paperclip::Upfile, doesn't exist… even though the docs say it does.
manizzle has joined #ruby
nlc has quit [Remote host closed the connection]
sebastorama has joined #ruby
<keithcelt>
So paperclip 3 bundles and then you get a stack trace? What does the new trace look like. There is an informal convention to use 2.x gems with Rails 2.x and 3.x gems with AR/AS/AM/Rails 3.x...
h4mz1d has quit [Ping timeout: 252 seconds]
<amalvagomes>
Oh, I didn't know that. I'm upgrading now. I'll send you the stack trace.
<amalvagomes>
This one is referencing the fact that Paperclip 3.0.3 has clearly deprecated Upfile.
suppp has quit [Read error: Operation timed out]
manizzle has quit [Ping timeout: 252 seconds]
<keithcelt>
Does your app.rb call something on Paperclip at line 22?
mdhopkins has joined #ruby
<AgileKyle>
sorry, rather new to the whole Ruby thing (at least in semi-advanced ways). Is there an easy way to execute a ruby script from within a ruby script and gather the returned values? I'd like to create a basic "unit test" type framework for a company project. it needs to be used on users systems so we can't use anything not installed by default in OS X
moshef has joined #ruby
zommi has quit [Remote host closed the connection]
<moshef>
how do I protect myself from MissingAttributeError ?
<wmoxam>
AgileKyle: why not just use Test::Unit?
<moshef>
trying to ask for attribute.present? fails...
suppp has joined #ruby
<wmoxam>
AgileKyle: it's parto f stdlib
Eiam has quit [Read error: Connection reset by peer]
fr0gprince_ma has joined #ruby
fr0gprince_ma has quit [Client Quit]
abionic has joined #ruby
<AgileKyle>
wmoxam: would that work for, say, testing the version of the software (using a Module I've written) and allow for certain return values? Basically I want to do things like test whether the software is up to date. If not, then tell the user they need to update. (Basic stuff here for simplicity, it gets more complex)
Eiam has joined #ruby
<amalvagomes>
keithcelt: Yes. It makes reference to that deprecated class Paperclip::Upfile...
Eiam has quit [Changing host]
Eiam has joined #ruby
araujo has joined #ruby
abionic has quit [Read error: Connection reset by peer]
<amalvagomes>
keithcelt: This is why we never outsource anything. I am angry. Thanks for the insights though.
abionic has joined #ruby
kenichi has joined #ruby
niklasb has joined #ruby
fr0gprince_ma has joined #ruby
g0bl1n has joined #ruby
fr0gprince_mac has quit [Ping timeout: 272 seconds]
<moshef>
how do I protect myself from MissingAttributeError ? asking for .present? before doesn't help
jbw has quit [Remote host closed the connection]
spligak has joined #ruby
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
abionic has quit [Read error: Connection reset by peer]
kevinbond has quit [Quit: kevinbond]
abionic has joined #ruby
jbw has joined #ruby
_md has quit [Ping timeout: 272 seconds]
visof has quit [Ping timeout: 272 seconds]
<Hanmac>
moshef i think its a rails question
<moshef>
right sorry
<moshef>
thanks :)
tatsuya_o has joined #ruby
abionic has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
ben225 has joined #ruby
<wmoxam>
AgileKyle: oh, IC
abionic has joined #ruby
<wmoxam>
AgileKyle: no, you're meaning something different by 'testing' ;)
abionic has quit [Read error: Connection reset by peer]
abionic has joined #ruby
<AgileKyle>
wmoxam: yea, i'm looking for something a tad more expansive than just simple unit testing
blacktulip has joined #ruby
d3c has joined #ruby
<AgileKyle>
i don't mind writing my own class to perform this stuff. I just need to find a way to execute the script and get the values back into the main script
bitrot has joined #ruby
<AgileKyle>
i suppose the "test" scripts could write their output as JSON or something and then the main script could read them in
<AgileKyle>
i'm assuming that would basically be a matter of gathering a directory listing of each script, executing them one at a time and each script would write their data to a predefined location
Asher has quit [Quit: Leaving.]
<apeiros>
why the need for separated script?
dv310p3r has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
TheFuzzb_ has quit [Quit: Leaving...]
TheFuzzball has joined #ruby
Asher has joined #ruby
d3c has quit [Read error: Connection reset by peer]
axl__ has joined #ruby
Ontolog has quit [Remote host closed the connection]
S2kx has quit [Read error: Connection reset by peer]
etehtsea has joined #ruby
abionic has quit [Read error: Connection reset by peer]
msch has joined #ruby
abionic has joined #ruby
Deesl has quit [Read error: Connection reset by peer]
<AgileKyle>
apeiros: think of it as an app testing common user issues. there aren't many that are related
minijupe has quit [Quit: minijupe]
axl_ has quit [Ping timeout: 250 seconds]
axl__ is now known as axl_
virunga has quit [Quit: Sto andando via]
<apeiros>
AgileKyle: that doesn't explain why it has to run in multiple processes
maesbn has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
<AgileKyle>
apeiros: it wouldn't be multiple-processes.. it would be just executing each script to perform the test.
<workmad3>
AgileKyle: sort of like, say, automated full-stack regression tests?
abionic has quit [Read error: Connection reset by peer]
<apeiros>
AgileKyle: that is multiple processes
<AgileKyle>
one extra process that is simply executing one script at a time
abionic has joined #ruby
<AgileKyle>
if possible i could certainly load the script into the existing process
<apeiros>
"execute each script" - I don't see how that is not multiple processes. and I don't get the rationale (well, you never gave one…)
<apeiros>
ok
<apeiros>
there's load & require
<AgileKyle>
i just assumed that running each script separately would be easier
pabloh has quit [Quit: Ex-Chat]
<apeiros>
all you have to do is push the results into a constant or a global
<apeiros>
AgileKyle: not if you want to share data
<AgileKyle>
ultimately what i'd like is to just have each test as a file. so adding new tests would be a matter of making a new file from a template
<apeiros>
Dir.glob to find all tests
<apeiros>
require/load to load them
abionic has quit [Read error: Connection reset by peer]
<apeiros>
some constant/global to store the results in
d3c has joined #ruby
saltnvinegar has quit [Quit: saltnvinegar]
jcromartie has joined #ruby
azm has quit [Ping timeout: 250 seconds]
<AgileKyle>
how does load work? my understanding is that it sort of combines the files
<apeiros>
ri Kernel#load
<apeiros>
it runs the code
internet_user has quit [Remote host closed the connection]
<AgileKyle>
gotcha makes sense
<apeiros>
I don't know what you understand by "combining files"
<AgileKyle>
i just read a page on the differences between require/load
<apeiros>
if it defines classes, then those will be defined after the file was evaluated
<AgileKyle>
how would i gather each of the class names?
<apeiros>
what for?
<AgileKyle>
or would i just create the class at the top of the file, then the code to execute it below?
dv310p3r has quit [Ping timeout: 272 seconds]
<AgileKyle>
thus, loading would execute the code at the bottom that uses the class
<apeiros>
I'd either let the class invoke some callback to register itself
<apeiros>
or let the code directly run itself
Faris1 has joined #ruby
<apeiros>
personally I prefer the former model, as that gives control to the loading party
<AgileKyle>
right, sounds clean
<AgileKyle>
so the base class is going to have to implement a callback routine that registers the name of the class with the loading script
<AgileKyle>
i could then iterate through the list of class names (since they should all have the same method to invoke the test)
<AgileKyle>
enumerate rather than iterate i suppose
Targen has quit [Ping timeout: 252 seconds]
zebe42 has quit [Ping timeout: 256 seconds]
strife25 has joined #ruby
christianrojas has joined #ruby
Targen has joined #ruby
Faris has quit [Ping timeout: 272 seconds]
R3dy has joined #ruby
<AgileKyle>
the lack of require_relative in 1.8.7 sure does suck though :(
patrick99e99 has quit [Quit: leaving]
<R3dy>
I'm trying to grab all objects of a specifc class type
<R3dy>
I'm using this
<R3dy>
ObjectSpace.each_object.select{|object| object.class == Finding}.each do |finding|
<R3dy>
it seems to get a differnt number each time and the number is no where near the number of objects created
jimeh has joined #ruby
patrick99e99 has joined #ruby
<R3dy>
is there a better wya to do this?
<apeiros>
require_relative is totally unnecessary
allan_hills has joined #ruby
<apeiros>
properly manage $LOAD_PATH and you're done. no need to pack knowledge into places where it's wrong.
headius has quit [Quit: headius]
<patrick99e99>
I am trying to split by the last underscore in a string.. so "a_b_c_d".split(/_[^_]+$/) ... I am expecting to get ["a_b_c", "d"] . but I just get ["a_b_c"]
zeromodulus has quit [Remote host closed the connection]
<AgileKyle>
apeiros: any suggestions on where to see some info on that?
<Hanmac>
apeiros chaning the load_path only to make require work is more wrong
chimkan_ has joined #ruby
<apeiros>
AgileKyle: $LOAD_PATH is an array. add whatever paths you need from within your executable.
<apeiros>
Hanmac: if you put it that generally, then your statement is wrong.
nlc has joined #ruby
<apeiros>
Hanmac: I was quite specific and certainly correct. your executable is the party that should know where to find its required things, or be able to delegate it (e.g. to ruby or rubygems)
<apeiros>
of course, libraries editing $LOAD_PATH is another story.
<R3dy>
apeiros: that still doesn't seem to work right, would you take a look at my code, it's only about 50 lines?
<shevy>
I dont like that require_relative takes so long to type :(
nanderoo has quit [Remote host closed the connection]
abionic has quit [Read error: Connection reset by peer]
<apeiros>
R3dy: make a class ScanParser, put your parse_scan method into it, create an @findings = [] ivar in its initialize
<apeiros>
push to @findings in your parse_scan method
zeromodulus has joined #ruby
<apeiros>
add an attr_reader for findings. read it.
<R3dy>
oh just store each object in an array
<Hanmac>
R3dy you can do: GC.disable
<Hanmac>
but dont come back if your ruby program use to much memory
<Veejay>
apeiros: I have a question for you. Do you think Rubinius will be a weighty contender in the Ruby space in say 1 to 2 years?
abionic has joined #ruby
<R3dy>
so if I create @@findings = Array.new
<R3dy>
how do I access that ouside the class
<R3dy>
Finding.findings? or Finding.@@findings?
<R3dy>
or neither?
abionic has quit [Read error: Connection reset by peer]
abionic has joined #ruby
<apeiros>
Veejay: I think it already is. but define 'weighty'…
<apeiros>
with rubymotion and jruby, it might be a good nr. 4
abra has quit [Quit: Leaving]
<apeiros>
R3dy: @findings, not @@findings. you almost never want @@vars
<Hanmac>
why do you think that @@ is the right way?
<Hanmac>
class << Finding; def findings; @findings ||= [];end;end
<headius>
weighty!
<R3dy>
apeiros: so that would be an instance variable then?
<apeiros>
and I wouldn't make it a class method either. I said I'd make a separate class. but that's up to you.
<R3dy>
no I want to learn the "proper" way to code
<apeiros>
there's no proper way
<R3dy>
that is why I am asking questions, sorry if I am bothering but you are giving me greate info here
timonv has quit [Remote host closed the connection]
<apeiros>
there's just some better and some worse
<R3dy>
apeiros: well there are better ways then others yes?
Progster has joined #ruby
<R3dy>
So you would make a seperate class to keep track of Objects of the Finding class then?
<Veejay>
apeiros: Rubinius is absolutely awesome, I'm extremey excited about it, I can't stress that enough. But it doesn't yet do encodings right, it doesn't support all the gems, etc.
<apeiros>
errr… class YourClass; …
yoklov has joined #ruby
snearch has quit [Quit: Verlassend]
<Veejay>
It's not (yet) a drop-in replacement
<Veejay>
And I wanted people's opinions on whether or not they think that will be the case 1 or 2 years from now
td123 has joined #ruby
abionic has quit [Read error: Connection reset by peer]
zeromodulus has quit [Remote host closed the connection]
abionic has joined #ruby
zeromodulus has joined #ruby
abionic has quit [Read error: Connection reset by peer]
timonv has joined #ruby
Dreamer3 has joined #ruby
<headius>
I'm sure rbx will be able to catch up in that amount of time
abionic has joined #ruby
<Veejay>
I hope so too
<apeiros>
as said, I think it's a strong contender already. but jruby is a clear 2nd runner up after the canonical ruby
<headius>
will that make it weighty?
fmcgeough has quit [Quit: fmcgeough]
<apeiros>
and macruby/rubymotion is/will most likely be the clear 3rd runner up
<Veejay>
headius: MRI still is the go-to implementation for now
<digitalcakestudi>
were can I learn about block as in def somemeth(&someblock)
<apeiros>
and I don't think that will change the next 2 years
<headius>
I dunno about that...jruby and MRI run everywhere, while macruby/rubymotion run only on OS X and iOS
<Veejay>
Same for JRuby, it probably does better than MRI right now in lots of regards, but there's the how do call it
maxok has joined #ruby
<Veejay>
Inertia
zeromodulus has quit [Remote host closed the connection]
heisenmink has quit [Ping timeout: 245 seconds]
zeromodulus has joined #ruby
<headius>
fwiw, I don't think any impl will be able to compete with jruby if the C extension problems aren't fix
<headius>
fixed
<Veejay>
I want a future with a cleaner slate, that looks so glorious in my head
<headius>
C exts are the biggest dead end in Ruby
<apeiros>
headius: rubymotion has a clear reason, a cleanly defined audience
g0bl1n has quit [Quit: Ex-Chat]
abionic has quit [Read error: Connection reset by peer]
abionic has joined #ruby
abionic has quit [Read error: Connection reset by peer]
<Veejay>
Anything that is not backed by a proper VM right now in the Ruby department seems doomed to plateau
<apeiros>
if rbx has a defined audience, then it's tinkerers. and that's not a big userbase.
bedevil has joined #ruby
<headius>
even with a proper VM, C exts are crippling
<headius>
seriously crippling
<Veejay>
:()
bedevil has left #ruby [#ruby]
ichilton has quit [Read error: Operation timed out]
ichilton has joined #ruby
<headius>
can't run them concurrently, don't participate in GC well, porting problems, VM internals exposed to the world...
<headius>
dreadful
<Veejay>
headius: Are they common?
<Veejay>
Probably are, eh?
<headius>
for MRI yes
S2kx has joined #ruby
<headius>
for JRuby, more and more of them have JVM equivalents
<Veejay>
What I absolutely love about all those projects is the willingness to tackle debt and take a new direction. I was excited about people working on asynchronous stuff in Ruby and Rails especially, it looked promising. But every single presentation ended up in despair because of concurrency problems
S1kx has quit [Ping timeout: 252 seconds]
<headius>
where was this?
<Veejay>
All had the same gloomy feel about them "as long as MRI doesn't get its shit together, we're kind of doomed"
<Veejay>
headius: Mike Perham's stuff, Ilya Grigorik as well
<Veejay>
Mainly those two
<headius>
ahh, sure
<Veejay>
And that was really depressing
d3c has quit [Read error: Connection reset by peer]
<Veejay>
Cause you could see all this potential right, the ideas are not new
<Veejay>
And they have ideas and solutions
davidpk has quit [Quit: Computer has gone to sleep.]
<Veejay>
But it comes down to speed sometimes and concurrency limitations, drivers not being able to leverage cores and whatnot
Targen has quit [Ping timeout: 245 seconds]
Poapfel has joined #ruby
<Veejay>
That's why JRuby and rbx are so nice, just the idea that people have not given up
ElitestFX has quit [Ping timeout: 245 seconds]
<Veejay>
headius: Are the MRI people conscious of the issue?
<headius>
sure
<Veejay>
As in, have they jumped ship or do they keep on working on MRI?
<headius>
I think most of them still feel like process-level concurrency is good enough
ping-pong has joined #ruby
SphericalCow has quit [Quit: Leaving]
<Hanmac>
headius: what do you mean with "C exts are crippling"? ... i have some things that i cant do with jruby
<Veejay>
And I guess they're also some sentimental attachment to the project for some
<Veejay>
It's like 20 years of work
<Veejay>
Imagine that
<headius>
Hanmac: name a VM feature you'd like MRI to add, and the reason they can't is C exts
iamlacro_ has quit [Remote host closed the connection]
havenn has joined #ruby
<pawdro>
hi, is there any simple way to divide string like: "aaa (bbb ccc) ddd" onto 3 strings -> "aaa" "(bbb ccc)" "ddd" ?
<headius>
Hanmac: what is it you can't do?
rippa has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
rippa has joined #ruby
<Mon_Ouie>
pawdro: Can bbb ccc actually contain escaped or quoted parens of some sort?
<Veejay>
It's also nice that there are now two implementations running on two popular VMs backed by two giants
<Hanmac>
headius: maybe opengl GUIs? i have a nice lib in c++
Ontolog has joined #ruby
<Veejay>
Mon_Ouie: Salut
<Mon_Ouie>
'alut
skogis has joined #ruby
snip_it has quit [Quit: snip_it]
<pawdro>
Mon_Ouie, yes
Vainoharhainen has joined #ruby
<pawdro>
Mon_Ouie, or no actually just letters
<headius>
Hanmac: I'm not against native extensions in general...just MRI's API for it
<headius>
because it exposes way too much about the internals of the runtime, does not protect object references, does not hide pointers, and so on
blacktulip has quit [Ping timeout: 252 seconds]
<Mon_Ouie>
If they're just letters, then you can use a regular exrpession
<headius>
and for OpenGL there are at least four JVM bindings I know of
havenn has quit [Remote host closed the connection]
<Hanmac>
but i think not for cegui?
davidcelis has joined #ruby
yxhuvud has quit [Ping timeout: 240 seconds]
mbusigin has quit [Quit: Page closed]
CannedCorn has joined #ruby
<CannedCorn>
is there a way to check the ruby version in a c extension?
digitalcakestudi has quit [Ping timeout: 244 seconds]
krusty_ar has quit [Read error: Connection reset by peer]
<Veejay>
headius: So basically, re: C extensions, for each of them you need to build a bridge for a Java equivalent to conform to the interface of the extension?
<shevy>
ruby_show_version();
<Veejay>
Looks like quite the endeavour
ken_barber has quit [Remote host closed the connection]
<headius>
Veejay: not really...in most cases people just find a JVM library and use it
<headius>
without writing a line of JAva
<shevy>
ruby_show_version(void) {
<shevy>
PRINT(description);
<headius>
any JVM library can just be called from Ruby directly
<Veejay>
headius: But you'd still need some glue no?
<headius>
no
Faris has quit [Ping timeout: 244 seconds]
yoklov has quit [Quit: computer sleeping]
<headius>
if you really want to match an API, there's that work, but using the libraries is trivial
<headius>
require 'blah.jar'
<headius>
java_import com.foo.SomeClass
<headius>
and use it
<Veejay>
And you get all the methods in the library for free?
<Veejay>
That is pretty nice
ddv has quit [Quit: *poof*]
<CannedCorn>
shevy do i get that in ruby.h
<CannedCorn>
or do i have to require something else
vaks has joined #ruby
<CannedCorn>
this is acutally in ruby/version.h
Jackneill has quit [Quit: .]
noganex has joined #ruby
yoklov has joined #ruby
maesbn has quit [Remote host closed the connection]
<Veejay>
Cause if there's one thing Java has been good at, it's amassing libraries
<Veejay>
And good documentation
<headius>
Veejay: indeed...and they're all usable from JRuby
amalvagomes_ has joined #ruby
ymasory has joined #ruby
bitrot has quit [Quit: leaving]
<shevy>
CannedCorn I am not sure
Ontolog has quit [Remote host closed the connection]
<Veejay>
headius: And there's always those secret sauce flags you can pass, a friend of mine who's into Java kept telling me that once tweaked to perfection, his programs were like italian ristrettos as opposed to defaults being your average Tim Horton's drip coffee
amalvagomes has quit [Ping timeout: 255 seconds]
amalvagomes_ is now known as amalvagomes
minijupe has joined #ruby
davidpk has joined #ruby
<Boohbah>
Veejay: nobody but Canadians know what Tim Horton's is :)
<deryl>
americans do too. plenty of them around the borders on the american side. Buffalo has quite a few
baroquebobcat has joined #ruby
<headius>
luckily I get the metaphors there :)
<shevy>
ack
<shevy>
require 'foo.rb' does no longer work when in the current dir? only require './foo.rb' ?
<headius>
JVM does require some tuning, but even without tuning JRuby's generally already quite good
<headius>
shevy: 1.9 doesn't put . in load path
araujo has joined #ruby
jackiechan0 has quit [Ping timeout: 245 seconds]
shadoi has joined #ruby
<deryl>
headius, did you get the cc on that rvm filed issue about jruby? i did the installs for 1.6.7 and 1.6.7.2 on linux with zero issues, but (after the fact) i was alerted that it was taking place on osx. the functions we call are the same regardless of platform for the install portion, so both mpapis and i are stymied at this point
nu7hatch has left #ruby [#ruby]
<Veejay>
Boohbah: I'm not Canadian myelf, I just happen to live here, I thought it was a North American thing
<headius>
deryl: you'll have to be more specific :)
jackiechan0 has joined #ruby
<Boohbah>
Veejay: the American equivalent would be Dunkin Donuts
d3c has joined #ruby
<deryl>
headius, yeah workin on it. sec :)
<Veejay>
Boohbah: Ugh :(
<Veejay>
I went there once at Mineapolis-St Paul, it was gross. And I'm talking Arby's grosss.
<headius>
the 1.6.7 version didn't build right, that's what that error means
schaerli has left #ruby [#ruby]
<headius>
epochwolf: not Java...Ruby :)
foofoobar has quit [Quit: Computer has gone to sleep]
<deryl>
headius, so its neither jruby nor rvm? is it ant (thats what is being used for the building, correct? java and jruby are a bit out of my personal skillsets)
<headius>
well, rvm should just be unpacking jruby
<headius>
in this case
<headius>
so it wouldn't be build...
<headius>
can you get a verbose output that shows what it's actually running in JRuby?
<headius>
the ArrayIndex error is a JRuby bug, for sure
<headius>
but I don't know if it's still around
<deryl>
sec. i have a text output of set -x ; rvm install jruby-1.6.7.2 if that will help. its what was given to me
<deryl>
he didn't gist it so let me get the url of his
<deryl>
run under zsh, executing set -x then rvm --trace reinstall jruby
mensvaga has left #ruby [#ruby]
ConstantineXVI has quit [Remote host closed the connection]
Eldariof-ru has quit []
suppp has quit [Ping timeout: 248 seconds]
moshef_ has joined #ruby
moshef_ has quit [Client Quit]
zodiak has quit [Quit: Leaving]
moshef has quit [Ping timeout: 244 seconds]
suppp has joined #ruby
kaspernj has quit [Remote host closed the connection]
fbernier has quit [Ping timeout: 272 seconds]
Ontolog has joined #ruby
geekbri has quit [Remote host closed the connection]
<sam113101>
I'd like to make a big list of key/value pairs, I'd like it to have its own file… because it's big
snip_it has quit [Quit: snip_it]
<sam113101>
what is the best way to accomplish that
pawdro has quit [Quit: Wychodzi]
Sgeo has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
<carloslopes>
sam113101: if i understood your question correctly.. you should create a 'mybighash.rb' file, and inside it put all the code for the hash.. and in the other file that you want use the hash, you put require 'mybighash'
<carloslopes>
sam113101: and mybighash was an example, you can choose the name the you want :)
nlc has quit [Quit: Leaving]
<shevy>
mybighash
<shevy>
mybiggerhash
<shevy>
omgthisisareallybighashhere
<Veejay>
fathash
<shevy>
I dont like your fathash
<shevy>
get slim man
<Veejay>
I am
hynkle has quit [Quit: hynkle]
<suppp>
can you sort hashes in 1.9.3 if the key is an int or float ?
<Veejay>
Why not
<Veejay>
If you can devise an order between two elements, you can sort, right?
jackiechan0 has quit [Quit: Sto andando via]
mstratman has quit [Quit: mstratman]
digitalcakestudi has joined #ruby
sbanwart has joined #ruby
<shevy>
yeah
hynkle has joined #ruby
<shevy>
you can sort elephants, moebiues strips, monads, cars, and bacterias all at the same time
<carloslopes>
suppp: i don't know.. maybe the #sort or #sort_by method
<carloslopes>
suppp: try them
tommyvyo has quit [Quit: Computer has gone to sleep.]
<suppp>
tx seems to work
seivan has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Remote host closed the connection]
indian has quit [Read error: Connection reset by peer]
<carloslopes>
suppp: yw
<Veejay>
\:D/
altiouz has joined #ruby
eywu has quit [Remote host closed the connection]
eywu has joined #ruby
LBRapid has quit [Quit: Farewell...]
tomzx has joined #ruby
<Synthead>
is there a reason why I would want to use symbols instead of strings as hash index values?
<Hanmac>
Synthead because symbols can not be changed and needs less memory
<stewart_>
@Synthead yes they are faster
cesario__ has quit []
dnyy has joined #ruby
<Synthead>
Hanmac, stewart_: ahhh, okay
<canton7>
although, if you've got a massive auto-generated hash, for example, symbols might not be the best bet
<stewart_>
why not?
cesario has joined #ruby
<Synthead>
.to_sym seems to fill any caveat I've encountered so far
<canton7>
the symbol table never gets cleared iirc, so the symbol creation time takes a hit, as does memory
<Alantas>
One tool I like to keep on hand is the ability to use Symbol keys for "out-of-band" data in an arbitrary-String-key Hash. Like, a Hash of lines read from a file, which won't collide with [:sym] keys.
jrbing has quit [Quit: jrbing]
nfluxx has quit [Quit: nfluxx]
schaerli_ has quit [Ping timeout: 248 seconds]
sepp2k1 has joined #ruby
<stewart_>
Synthead: as a rule of thumb I would always use symbols where I can If you must use strings then ok but for memory use stick with symbols. I also find it more symantic ruby code to use symbols
djmitche has left #ruby [#ruby]
<Alantas>
The rule of thumb, basically: if you're bringing in Hash keys from an external source as Strings, use them as Hash keys. For ones you type yourself in the source code, use symbols.
<Alantas>
(Well, *a* rule of thumb.)
mcwise has quit [Quit: I quit]
eguzman_ has quit [Quit: Leaving]
* Hanmac
names it the "hash-key-rule"
<stewart_>
Alantas: could you not use symbols in that situation?
nfluxx has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<Alantas>
stewart_: You *could*, but what do they symbolize?
Progster has quit [Ping timeout: 256 seconds]
sepp2k has quit [Ping timeout: 272 seconds]
<stewart_>
depends on your external source
LyonJT has quit [Quit: Leaving...]
joaoh82 has joined #ruby
seivan has quit [Read error: Connection reset by peer]
seivan has joined #ruby
<Alantas>
Suppose an IRC client/bot has a Hash of nicks→User objects. If you symbolize them, the Symbol objects won't get cleared as people leave or change nicks, while discarded String keys can be reaped.
carloslopes has quit [Quit: Leaving]
<Alantas>
To me, a Symbol key represents "this particular value, and no other", and a String key represents, "some arbitrary value".
<Alantas>
So that example Hash might have users["Alantas"], users["stewart_"] and so on, and perhaps a users[:self] that maps to the same object as the client's own nick's String key does.
dustybrains has quit [Quit: leaving]
<Alantas>
If your nick changes, the String key gets rotated out and replaced by a new one, but [:self] is always at [:self].
<stewart_>
Alantas: yep Strings make more sense in that situation
UNIXgod has joined #ruby
neil__ has joined #ruby
malkomalko has joined #ruby
davidw has joined #ruby
palmfrond has quit [Quit: Sleep]
davidw is now known as Guest70427
sebastorama has joined #ruby
jchauncey has quit [Quit: jchauncey]
palmfrond has joined #ruby
cs[tc] has joined #ruby
havenn has joined #ruby
webusnix has joined #ruby
d3c has quit [Quit: Sleep]
mvangala has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
ilyam has joined #ruby
mmokrysz has joined #ruby
wvms has joined #ruby
mneorr has joined #ruby
wmoxam has quit [Quit: leaving]
mneorr has quit [Remote host closed the connection]
shruggar has joined #ruby
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
shruggar has left #ruby [#ruby]
Morkel has quit [Quit: Morkel]
ph^_ has quit [Remote host closed the connection]
<apeiros_>
Alantas: um, no, string keys don't get "rotated"
mmokrysz has left #ruby [#ruby]
<Alantas>
Yeah, you can't mutate String keys; what I meant was, the old one would be removed, and the new one added. The removed String key could then be subject to garbage collection. Symbols would not.
<apeiros_>
unless I completely misunderstand what you mean… rotated = garbage collected?
<apeiros_>
aha
dangerousdave has quit [Quit: Leaving...]
mischief has joined #ruby
<mischief>
hello
havenn has quit [Remote host closed the connection]
<mischief>
i have a array of hashes. what is the best method to check if any of the hashes contains a particular value?
<keithcelt>
is each hash a k,v pair or do the hashes have many entries?
asobrasil has left #ruby [#ruby]
<mischief>
the hashes are flat key values
<mischief>
i am only interested in one key, :pid
<mischief>
i just need to check if any hash in the array has a pid equal to the pid i want
BeLucid_ has quit [Read error: Connection reset by peer]
<keithcelt>
ary.any? { |hsh| hsh.values.first == my_pid } # Something like that
BeLucid has joined #ruby
ThatDudeGuy_ has left #ruby [#ruby]
<mischief>
where is this any? method documented? i do not see it on ruby-doc.org under Array
strife25 has quit [Quit: Computer has gone to sleep.]
<Alantas>
hash.values probably gives them in effectively-random order. I wouldn't depend on the ordering, anyway.
ikaros has quit [Quit: Ex-Chat]
<any-key>
hashes aren't ordered
<canton7>
in 1.9, they're ordered. not so in 1.8
<any-key>
oh
<any-key>
waaaaaaaat
<Alantas>
Wouldn't that make them slower (but lighter)? O(log n) operations rather than amortized O(1).
<any-key>
I dunno, I feel like it's a good idea to always assume hashes are going to enumerate in random order
* Hanmac
sings "everything is better in 1.9"
<canton7>
they used some rather clever implementation, although I can't remember the details
zebe42 has joined #ruby
<Alantas>
It'd have to be O(log n) overall, same performance as a binary tree.
<Hanmac>
any-key the 1.9 hashs are orderd my insertion, not by key or value
<Alantas>
Otherwise, you could sort in O(n) time by stuffing all the values in as Hash keys, then getting its #keys, tada.
<Alantas>
Oh.
cyb3r3li0g has quit [Read error: Connection timed out]
<any-key>
I think it's silly to assume order in hashes though
<any-key>
considering the fact that they're hashes
<Alantas>
So they're like PHP "arrays" now?
<any-key>
ugh leave the P word out of this :(
amalvagomes has joined #ruby
SPYGAME has quit [Quit: Leaving]
<Alantas>
In any case, if you have an array of hashes and want to see if one of them has a [:pid] key equal to some value, use the any? example I gave. Doesn't depend on hash internal ordering either. :P
<any-key>
if you go about things correctly, the order of a hash should never matter
<any-key>
<-- opinionated
<Alantas>
Indeed. (On both counts.)
<any-key>
Anarchy. No order.
looopy has quit [Remote host closed the connection]
cyb3r3li0g has joined #ruby
<Alantas>
More generally, don't make any assumptions about the order of Hash elements. If you have a task that depends on ordering, use an Array.
<canton7>
no, nothing like php's arrays
<canton7>
(thank goodness)
crekev has joined #ruby
<Hanmac>
in ruby you can use hashs as keys for hashs too
<any-key>
the P word! you're saying it again!!
neil__ has quit [Remote host closed the connection]
<any-key>
Hanmac: we don't talk about that ;)
savage-_ has joined #ruby
Guest70427 has quit [Ping timeout: 260 seconds]
cyb3r3li0g has quit [Max SendQ exceeded]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<Alantas>
a=[]; a.push(a); puts a
savage- has quit [Ping timeout: 245 seconds]
davidpk has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
<Alantas>
» "[...]"
<Hanmac>
Alantas: [[...]] yeah that is very funny :P
pu22l3r_ has quit [Ping timeout: 244 seconds]
banjara has joined #ruby
krzkrzkrz has joined #ruby
<Synthead>
I have a stream of XML with repetitious tags, like <this><that>stuff</that></this><this>...</this>, etc., and I'm parsing it with Nokogiri::XML. If I do .xpath('//this').each { |xml| puts xml.xpath('//this').to_s }, I get the entire stream of XML to #{xml} every loop. Why?
<Alantas>
b=[a]; a.push(b); » [[...], [[...]]]
<Hanmac>
Alantas: a = 0.0; a/a == a/a
<Alantas>
Hehe, NaN ≠ NaN.
<mischief>
i hate ruby. god damnit.
<mischief>
y u use ruby company???
<Alantas>
a=1.0/0; b=-1.0/0; a+b » NaN
krz has quit [Ping timeout: 244 seconds]
krzkrzkrz is now known as krz
looopy has joined #ruby
jeebster has quit [Quit: Leaving.]
jimeh has quit [Ping timeout: 255 seconds]
sohocoke has quit [Quit: sohocoke]
iamjarvo has quit [Ping timeout: 244 seconds]
kirun has quit [Quit: Client exiting]
uokesita has joined #ruby
wangr has quit [Ping timeout: 245 seconds]
sohocoke has joined #ruby
vaks has quit []
alexim has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
strife25 has joined #ruby
bluenemo has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
prometheus has quit [Ping timeout: 272 seconds]
Plas has joined #ruby
yoklov has quit [Quit: computer sleeping]
sent-hil has joined #ruby
apeiros has quit [Remote host closed the connection]
zastaph has quit []
Plas has quit [Client Quit]
platzhirsch has quit [Read error: Connection reset by peer]
etehtsea has quit []
Ontolog has joined #ruby
kpshek has quit []
bbttxu has joined #ruby
alexim has joined #ruby
DrShoggoth has quit [Quit: Leaving]
chson has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
banseljaj is now known as imami|afk
liluo has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
Targen has joined #ruby
cs[tc] has quit [Ping timeout: 244 seconds]
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
luckyruby has quit [Remote host closed the connection]
skogis has quit [Read error: Operation timed out]
crekev has quit [Quit: crekev]
knoopx has joined #ruby
yosinof_ has joined #ruby
RudyValencia has quit [Ping timeout: 265 seconds]
<minijupe>
how can I make this scope work, it's using the wrong id, not the attr id of the model instance: scope :by_user, lambda {|u| where(:user_id => u.id) }
sent-hil has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
<minijupe>
ug nevermind
mengu has quit [Remote host closed the connection]
knoopx has quit [Remote host closed the connection]
dbgster has joined #ruby
jgarvey has quit [Quit: Leaving]
saispo has quit [Ping timeout: 260 seconds]
niklasb has joined #ruby
hynkle_ has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
Nisstyre is now known as trollstyre
hynkle has quit [Ping timeout: 245 seconds]
hynkle_ is now known as hynkle
iocor has quit [Quit: Computer has gone to sleep.]
indian has joined #ruby
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
mikepack has quit [Ping timeout: 244 seconds]
MasterIdler has quit [Read error: Operation timed out]
Watcher7 has joined #ruby
knoopx has joined #ruby
Zoxc has left #ruby [#ruby]
bglusman has quit [Remote host closed the connection]
albemuth has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
kevinbond has joined #ruby
pattersonc has left #ruby [#ruby]
vitor-br has quit [Quit: Saindo]
seivan has quit [Remote host closed the connection]
sohocoke has joined #ruby
looopy has joined #ruby
kylemcgill has joined #ruby
krusty_ar has joined #ruby
iamjarvo has joined #ruby
peterhil` has joined #ruby
tripitakit has joined #ruby
uokesita has quit [Quit: Leaving]
dagnachewa has joined #ruby
sohocoke has quit [Quit: sohocoke]
sohocoke has joined #ruby
dv310p3r has quit [Ping timeout: 248 seconds]
<dagnachewa>
to practice with the many gems out there; the way I installed all my gems is like this; First I do rvm use 1.9.3-p#(194) for know andf then I install all the gems globally,
<dagnachewa>
I know that I will have to install the specific gems in my projects afterwards
iamjarvo has quit [Quit: Leaving.]
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
<dagnachewa>
I want to be able to export my gems between machines in order to have the same gems in my pc and laptop
ipsifendus has quit [Quit: ipsifendus]
dbgster has quit [Quit: dbgster]
IPGlider has quit []
christianrojas has quit [Remote host closed the connection]
krzkrzkrz has joined #ruby
slartibartfast_ has joined #ruby
slartibartfast_ has left #ruby ["Leaving"]
bbttxu has quit [Quit: bbttxu]
tris has joined #ruby
<tris>
dumb question: how can I make "for i in 0..$foo" work?
krz has quit [Ping timeout: 272 seconds]
krzkrzkrz is now known as krz
<Alantas>
Should be fine as written, assuming there is in fact a global var named $foo.
<Alantas>
And that it's a numeric type that Range accepts as the endpoint of starting at zero.
aef has quit [Remote host closed the connection]
aef has joined #ruby
<tris>
hmm, okay. I'm getting "bad value for range" and they're all plain numbers. I'm doing it in erb, though, maybe it doesn't work there for some reason
<Alantas>
Try 0.upto($foo) do |i|
yosinof_ has quit [Quit: Leaving]
ckrailo has quit [Quit: Computer has gone to sleep.]
yosinof has joined #ruby
cj3kim has joined #ruby
StoSun has quit []
nyrb has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
snip_it has joined #ruby
<tris>
ack, now I've got "comparison of Fixnum with nil failed"
<tris>
wish it'd give me a line number
kenperkins has quit [Quit: Computer has gone to sleep.]