bzalasky has quit [Remote host closed the connection]
dvorak has joined #ruby-lang
anulman has quit [Ping timeout: 260 seconds]
fijimunkii has quit [Ping timeout: 245 seconds]
makoto_ has quit [Ping timeout: 260 seconds]
mistym has quit [Remote host closed the connection]
fijimunkii has joined #ruby-lang
g-nee has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
anulman has joined #ruby-lang
vsorlov has joined #ruby-lang
michaeldeol has joined #ruby-lang
DeProdigy has quit [Ping timeout: 245 seconds]
soba has joined #ruby-lang
nisstyre has quit [Remote host closed the connection]
michaeldeol has quit [Remote host closed the connection]
soba has quit [Ping timeout: 252 seconds]
Barrin6 has joined #ruby-lang
unrealhoang has quit [Remote host closed the connection]
vsorlov has quit [Read error: Operation timed out]
batchitcray has joined #ruby-lang
nevill has quit [Quit: nevill]
gianlucadv has joined #ruby-lang
Oak has joined #ruby-lang
coca_rails has joined #ruby-lang
DeProdigy has joined #ruby-lang
knu has joined #ruby-lang
wongon has quit [Quit: wongon]
DeProdigy has quit [Ping timeout: 250 seconds]
iliketur_ has quit [Ping timeout: 245 seconds]
bfleischer has quit [Read error: Operation timed out]
iliketur_ has joined #ruby-lang
jxpx777 has joined #ruby-lang
unrealhoang has joined #ruby-lang
iliketur_ has quit [Ping timeout: 260 seconds]
iliketur_ has joined #ruby-lang
arooni-mobile__ has quit [Ping timeout: 260 seconds]
Tectonic has quit []
michaeldeol has joined #ruby-lang
rushed has quit [Quit: rushed]
jxie has quit [Quit: leaving]
makoto_ has joined #ruby-lang
jxie has joined #ruby-lang
michaeldeol has quit [Remote host closed the connection]
Cakey has quit [Ping timeout: 250 seconds]
g-nee has joined #ruby-lang
bzalasky has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
makoto_ has quit [Ping timeout: 260 seconds]
knu has quit [Ping timeout: 260 seconds]
rushed has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
bzalasky has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
DeProdigy has joined #ruby-lang
g-nee has quit [Read error: Connection reset by peer]
g-nee has joined #ruby-lang
g-nee has quit [Read error: Connection reset by peer]
jsullivandigs has joined #ruby-lang
g-nee has joined #ruby-lang
dhruvasagar has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
DeProdigy has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby-lang
nevill has joined #ruby-lang
michaeldeol has joined #ruby-lang
gianlucadv has quit [Ping timeout: 260 seconds]
lun_ has quit [Read error: Connection reset by peer]
soba has joined #ruby-lang
g-nee has quit [Remote host closed the connection]
g-nee has joined #ruby-lang
lun_ has joined #ruby-lang
g-nee_ has joined #ruby-lang
g-nee has quit [Read error: Connection reset by peer]
michaeldeol has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 245 seconds]
Elico has quit [Quit: Elico]
g-nee_ has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
michaeldeol has joined #ruby-lang
ylluminate` has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ylluminate has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
hahuang65 has joined #ruby-lang
michaeldeol has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
dhruvasagar has quit [Quit: leaving]
<rue>
micalexander: Just do it. What’s the problem you have?
hogeo has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
hogeo has joined #ruby-lang
ylluminate` has quit [Read error: Connection reset by peer]
ylluminate has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
mistym has joined #ruby-lang
anulman has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
g-nee has joined #ruby-lang
dhruvasagar has quit [Remote host closed the connection]
makoto_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Cakey has quit [Ping timeout: 246 seconds]
makoto_ has quit [Ping timeout: 245 seconds]
michaeldeol has joined #ruby-lang
michaeldeol has quit [Read error: Connection reset by peer]
deol has joined #ruby-lang
g-nee has quit [Quit: Leaving...]
michaeldeol has joined #ruby-lang
deol has quit [Read error: Connection reset by peer]
dik_dak has joined #ruby-lang
DeProdigy has joined #ruby-lang
ylluminate has quit [Read error: Connection reset by peer]
ylluminate has joined #ruby-lang
mistym_ has joined #ruby-lang
DeProdigy has quit [Ping timeout: 250 seconds]
dhruvasa1ar has joined #ruby-lang
mistym has quit [Ping timeout: 260 seconds]
dingus_khan has joined #ruby-lang
ylluminate has quit [Ping timeout: 245 seconds]
houhoulis has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby-lang
Tearan has quit [Quit: Sleepy Badger....]
Tearan has joined #ruby-lang
Tearan has quit [Client Quit]
mucker has joined #ruby-lang
Tearan has joined #ruby-lang
Tearan has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
anulman has joined #ruby-lang
brianpWins has joined #ruby-lang
iliketu__ has joined #ruby-lang
DEac- has joined #ruby-lang
iliketur_ has quit [Ping timeout: 250 seconds]
coca_rails has quit [Remote host closed the connection]
anulman has quit [Ping timeout: 265 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
shiva_inu has quit [Quit: Leaving]
vlad_starkov has joined #ruby-lang
bfleischer has joined #ruby-lang
bfleischer has quit [Ping timeout: 264 seconds]
fijimunkii has quit [Quit: leaving]
fijimunkii has joined #ruby-lang
fijimunkii has quit [Client Quit]
fijimunkii has joined #ruby-lang
tylersmith has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
fijimunkii has quit [Client Quit]
fijimunkii has joined #ruby-lang
tylersmith has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
greenboxal has joined #ruby-lang
<greenboxal>
hi everyone
bjh13 has quit [Quit: leaving]
qjb__ has joined #ruby-lang
makoto_ has joined #ruby-lang
<greenboxal>
there is some way to load or require a file without creating a new scope?
qjb__ has left #ruby-lang [#ruby-lang]
tylersmith has joined #ruby-lang
knu has joined #ruby-lang
ddd has quit [Ping timeout: 246 seconds]
arBmind has joined #ruby-lang
makoto_ has quit [Ping timeout: 252 seconds]
ddd has joined #ruby-lang
coca_rails has joined #ruby-lang
dagobah has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
tylersmith has quit [Ping timeout: 250 seconds]
DeProdigy has joined #ruby-lang
nisstyre has joined #ruby-lang
DeProdigy has quit [Ping timeout: 245 seconds]
rue|w has joined #ruby-lang
AKASkip has joined #ruby-lang
knu has quit [Ping timeout: 260 seconds]
anulman has joined #ruby-lang
mdedetrich has joined #ruby-lang
anulman1 has joined #ruby-lang
anulman has quit [Read error: Connection reset by peer]
relix has joined #ruby-lang
vlad_starkov has joined #ruby-lang
anulman1 has quit [Ping timeout: 245 seconds]
coca_rails has quit [Ping timeout: 245 seconds]
michaeldeol has quit [Remote host closed the connection]
mdedetrich has quit [Quit: Computer has gone to sleep.]
michaeldeol has joined #ruby-lang
Cakey has quit [Ping timeout: 265 seconds]
Barrin6 has quit [Quit: Leaving]
michaeldeol has quit [Ping timeout: 245 seconds]
<manveru>
greenboxal: eval(File.read("foo.rb"))
rriemann_ has joined #ruby-lang
batchitcray has quit [Ping timeout: 250 seconds]
h_kon has joined #ruby-lang
fijimunkii has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jsaak has quit [Ping timeout: 272 seconds]
marr has joined #ruby-lang
makoto_ has joined #ruby-lang
<Lewix>
manveru: greenboxal : what do you mean by creating a new scope
heftig has quit [Ping timeout: 245 seconds]
<matti>
Ohai manveru
lun_ has quit [Remote host closed the connection]
mistym_ has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
makoto_ has quit [Ping timeout: 266 seconds]
Eising has joined #ruby-lang
<manveru>
matti: moin
<Eising>
hi there. I'm stuck on an ancient server with an ancient ruby version. Any idea where I can find documentation for modules of old ruby versions? We're talking 1.8.4.
<manveru>
Lewix: if you require or load it will be evaluated in a new scope, that's why local variables don't conflict between requires
<richardburton>
It's got a large, nested if-else statement and I can't think of the best way to simplify it.
cannie has joined #ruby-lang
cannie has quit [Remote host closed the connection]
<richardburton>
Any help would be very much appreciated!
Jaclyn has quit [Client Quit]
Jaclyn has joined #ruby-lang
<yorickpeterse>
break that shit into different methods
<yorickpeterse>
right now this one big blob is doing multiple things
<richardburton>
yep
<ljarvis>
dat cobol
Jaclyn has quit [Client Quit]
joast has quit [Quit: Leaving.]
<yorickpeterse>
ljarvis: Ruby isn't that cool
tharindu has joined #ruby-lang
<richardburton>
the if-else statement
<richardburton>
where i have two dates
<richardburton>
and want to pick the most recent
<ljarvis>
richardburton: the if-else can be refactored entirely
<richardburton>
i cant think of a nicer way to do that
hogeo has quit [Remote host closed the connection]
<ljarvis>
also using empty strings for the last_ variables makes little sense if they're meant to represent dates
<ljarvis>
maybe you want nil instead
<richardburton>
thanks
cored has quit [Ping timeout: 245 seconds]
<richardburton>
ljarvis: how would you recommend refactoring the big if-else?
vpretzel has joined #ruby-lang
<ljarvis>
richardburton: I'm not sure I see the need to have 4 branches
tylersmith has joined #ruby-lang
<ljarvis>
why not just check if chats.any? or mail.any? ... else ...
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
bzalasky has joined #ruby-lang
<ljarvis>
you set the same stuff in the other branches anyway
<richardburton>
.any is much clearer—thanks. if there's a chat and a mail
joast has joined #ruby-lang
<richardburton>
i want the most recent
<richardburton>
which is why it ended up getting messy
<ljarvis>
sure, which you do on line 22
<ljarvis>
and then you do it again in separate branches for them both
krasnus_ has joined #ruby-lang
krasnus_ has quit [Client Quit]
ayumin has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
DouweM has quit [Ping timeout: 252 seconds]
davidw has left #ruby-lang ["Ex-Chat"]
nathanstitt has joined #ruby-lang
michaeldeol has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<wnd>
would I be trying to make it more complicated than is healthy if I'd make mails and chats comparable (by date), introduce NilMail and NilChat, and finally do latest = [chats.first || NilChat.new, mails.first || NilMail.new].sort.last?
elia has quit [Read error: Operation timed out]
krasnus has quit [Ping timeout: 245 seconds]
<yorickpeterse>
bah, Null objects
<ljarvis>
heh
bf4 has joined #ruby-lang
<yorickpeterse>
I fully blame their existence on people chaining 25 method calls
<yorickpeterse>
herp.derp.foo.just.like.jquery()
havenwood has quit [Ping timeout: 265 seconds]
<ljarvis>
that's nicer than having lots of conditions..
makoto_ has quit [Remote host closed the connection]
zerokarmaleft has left #ruby-lang [#ruby-lang]
imperator has joined #ruby-lang
jonahR has joined #ruby-lang
jonahR has quit [Client Quit]
mistym has quit [Remote host closed the connection]
<ljarvis>
zzak: no u
<yorickpeterse>
herp derp Faraday doesn't even get its own shit
<yorickpeterse>
you can configure proxies via a Hash, then it for w/e reason blows up
<yorickpeterse>
pass in a string, works fine
rippa has joined #ruby-lang
<yorickpeterse>
LOGIC!
unrealhoang has quit [Remote host closed the connection]
jorge has quit [Quit: leaving]
yfeldblum has quit [Remote host closed the connection]
unrealhoang has joined #ruby-lang
yfeldblum has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ayumin has quit [Remote host closed the connection]
arooni-mobile__ has quit [Ping timeout: 250 seconds]
ngw has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
mistym has joined #ruby-lang
coca_rails has joined #ruby-lang
sonne has joined #ruby-lang
sonne has left #ruby-lang [#ruby-lang]
dhruvasagar has joined #ruby-lang
robbyoconnor has joined #ruby-lang
loincloth has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
wongon has joined #ruby-lang
bfleischer has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
mikecmpbll has joined #ruby-lang
elia has joined #ruby-lang
havenwood has joined #ruby-lang
michaeldeol has joined #ruby-lang
nigerianceo has joined #ruby-lang
bfleischer has quit [Ping timeout: 265 seconds]
<apeiros>
yorickpeterse: you're in the intertubes. logic does not apply.
makoto_ has joined #ruby-lang
barttenb_ has quit [Ping timeout: 265 seconds]
havenwood has quit [Ping timeout: 250 seconds]
rob_ has left #ruby-lang [#ruby-lang]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
retro|cz has joined #ruby-lang
yfeldblum has joined #ruby-lang
hogeo has joined #ruby-lang
shinnya has joined #ruby-lang
TvL2386 has joined #ruby-lang
michaeldeol has quit [Ping timeout: 272 seconds]
DouweM has joined #ruby-lang
makoto_ has quit [Ping timeout: 264 seconds]
seanlinsley has joined #ruby-lang
serroft has joined #ruby-lang
hogeo has quit [Ping timeout: 245 seconds]
richardburton1 has joined #ruby-lang
richardburton has quit [Read error: Connection reset by peer]
<TvL2386>
hi guys, I'm working on a project where I want to configure managed switch ports using the cli (ssh). First thing I want, is a parser that actually parses the current switch port configuration. The ports must adhere to standards I design. Would I use something like parslet for this, or should I build it myself with simple line/string parsing?
Oak has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
anulman has joined #ruby-lang
arooni-mobile__ has joined #ruby-lang
<TvL2386>
been thinking and doing stuff on this a few times already, but I keep banging my head against the wall on how to approach this
MrZYX is now known as MrZYX|off
relix has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
anulman has quit [Ping timeout: 264 seconds]
robbyoconnor has joined #ruby-lang
makoto_ has joined #ruby-lang
bin7me has joined #ruby-lang
heftig has joined #ruby-lang
DeProdig1 has joined #ruby-lang
<ljarvis>
TvL2386: why dont you use an existing standard for configuration
<TvL2386>
ljarvis, like what?
<ljarvis>
TvL2386: well how are you storing config?
makoto_ has quit [Ping timeout: 264 seconds]
<TvL2386>
well, the running config is retrieved through some service bus which is saved to disk. The config is of the switch and has all ports in there
<TvL2386>
that's the backup mechanism
DeProdigy has quit [Ping timeout: 264 seconds]
<ljarvis>
that tells me absolutely nothing
coca_rails has quit [Ping timeout: 245 seconds]
<TvL2386>
I already have some parser that retrieves port names and some interesting things like: description and the vlan id. That's saved in a mysql database (rails backend)
iliketur_ has joined #ruby-lang
<TvL2386>
Also every port has the config snippet for that port in the database
<ljarvis>
im confused what your question is now
<TvL2386>
me too :)
bzalasky has joined #ruby-lang
<TvL2386>
*thinking*
sferik has joined #ruby-lang
<TvL2386>
thanks ljarvis... it seems I should really think about what I want first, because I have no clue... then design and then start to program...
<TvL2386>
doing it the wrong way around again
<cout>
I prefer to just start coding and see what comes out
<apeiros>
cowboy coder :D
<cout>
more like lewis and clark
<cout>
cowboys came later
<cout>
it's an exploration
<ljarvis>
TvL2386: :)
vlad_starkov has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
<TvL2386>
cout, for tiny things that works for me, but for something greater, it's hard to keep it elegant and maintanable if I approach it like that
vlad_starkov has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Quit: Konversation terminated!]
<TvL2386>
probably my limitation :-P
mbj_ is now known as mbj
wallerdev has joined #ruby-lang
<cout>
TvL2386: I think of it this way. To get from A to Z I know I must to A and B. I have no idea what C is, but sometimes it becomes more obvious once I've done A and B. but if I sit and think about it and plan the whole thing out then I never get anything done.
<cout>
TvL2386: but I was the student in english class that the teacher said I don't have to write an outline because I write better papers when I don't
kurko_ has joined #ruby-lang
iliketur_ has quit [Ping timeout: 265 seconds]
ayumin has joined #ruby-lang
<TvL2386>
cout :)
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
MaddinX__ has joined #ruby-lang
imperator has quit [Ping timeout: 260 seconds]
itsraining has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
__butch__ has joined #ruby-lang
MaddinXx_ has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 260 seconds]
makoto_ has joined #ruby-lang
dagobah has quit [Remote host closed the connection]
kek has quit [Remote host closed the connection]
makoto_ has quit [Ping timeout: 245 seconds]
ecnalyr has quit [Remote host closed the connection]
MaddinXx_ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
MaddinX__ has quit [Ping timeout: 246 seconds]
arooni-mobile__ has quit [Ping timeout: 246 seconds]
<ljarvis>
I call that the herp derp approach to software development
solars has quit [Ping timeout: 260 seconds]
dhruvasagar has joined #ruby-lang
serroft has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
tbuehlmann has quit [Quit: Konversation terminated!]
hahuang65 has quit [Ping timeout: 240 seconds]
unrealhoang has quit []
vlad_starkov has quit [Read error: Connection reset by peer]
nigerianceo has quit []
sepp2k has quit [Quit: Konversation terminated!]
mistym has quit [Remote host closed the connection]
mnngfltg has quit [Remote host closed the connection]
pkrnj has joined #ruby-lang
unrealhoang has quit [Read error: No route to host]
coca_rails has joined #ruby-lang
shinnya has quit [Ping timeout: 260 seconds]
mistym has joined #ruby-lang
batchitcray has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby-lang
DeProdig1 has quit [Ping timeout: 250 seconds]
coca_rails has quit [Ping timeout: 245 seconds]
jerrytgarcia has quit [Quit: WeeChat 0.4.2]
rriemann_ has joined #ruby-lang
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 264 seconds]
benlovell has quit [Ping timeout: 264 seconds]
DeProdigy has joined #ruby-lang
vpretzel has quit [Quit: Adios!]
brianpWins has quit [Quit: brianpWins]
vpretzel has joined #ruby-lang
sferik has joined #ruby-lang
tylersmith has joined #ruby-lang
pglombardo has joined #ruby-lang
iliketur_ has quit [Quit: zzzzz…..]
<cschneid>
is $! actually a global, or is it scoped down further? ie, if I use it in a rescue block, can another thread stomp on it before I have a chance?
lun_ has quit []
schaerli has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
<apeiros>
cschneid: I think it's one of those "magical" globals
<apeiros>
like $1-$9 etc.
<cschneid>
apeiros: yeah, I vaguely remember that it might be thread scoped or something similar
<cschneid>
it's surprisingly hard to google for :)
wallerdev has quit [Quit: wallerdev]
marr has quit [Ping timeout: 250 seconds]
hahuang65 has joined #ruby-lang
pglombar_ has joined #ruby-lang
richardburton has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
pglombardo has quit [Ping timeout: 240 seconds]
<workmad3>
cschneid: it's thread safe
<cschneid>
workmad3: do you have a reference handy for how it's really scoped?
<cschneid>
this is a corner of ruby magic I've not dug into
<workmad3>
cschneid: I don't
<yxhuvud>
cschneid: it is a thread local variable.
bastilian has joined #ruby-lang
<cschneid>
cool. Do you have a list of which of the perlvars are true globals vs thread local
<cschneid>
$/ for instance is probably really global
<cschneid>
$: similarly
richardburton1 has quit [Ping timeout: 265 seconds]
<yxhuvud>
afraid not. they are probably listed in pickaxe, but I havn't seen a handy table over them
<cschneid>
time to go experiment & write a blog post :)
<apeiros>
igitur: I assume you talk about an ActiveRecord model
<igitur>
yes
<apeiros>
note that it's not self-understood when you come to #ruby-lang and not #rubyonrails
<apeiros>
map will just return an array. it does not modify your AR instances, and even less so your DB.
<igitur>
ok, sorry, though it's a generic ruby question
<apeiros>
use .each, and .update_attributes!
<igitur>
thought*
<apeiros>
not really, no :)
<apeiros>
note that you maybe also don't want to use .all - depends on how many records Region has
<igitur>
i don't want to modify the underlying DB. the DB is populated externally with all upper case text, so i just want to humanize it on the front-end
<apeiros>
ok
<apeiros>
that'll be troublesome
<apeiros>
everytime it reloades a record, it'll be "dehumanized" again
<apeiros>
better you just create what rails calls a facade
vsorlov has joined #ruby-lang
<igitur>
it's just ~20 records, so for this case I'm not really worried about performance
fijimunk1i has joined #ruby-lang
Thanatermesis has joined #ruby-lang
<igitur>
is there anything wrong with my current .map approach? the exception thrown is "undefined method `name' for [:name, "A3"]:Array"
priodev has quit [Ping timeout: 240 seconds]
diegoviola has quit [Quit: WeeChat 0.4.2]
makoto_ has joined #ruby-lang
priodev has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fijimunkii has quit [Ping timeout: 264 seconds]
jinesh has joined #ruby-lang
<apeiros>
the error is odd, I mean that you have an array without a hash in it
<apeiros>
as said, .map will just return an array with the return value of the block as its values.
<apeiros>
so you should get an array of hashes.
gianlucadv has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
makoto_ has quit [Ping timeout: 246 seconds]
jinesh has quit [Client Quit]
MichD is now known as michd
schaerli has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
pkrnj has quit [Quit: Computer has gone to sleep.]
deryl has joined #ruby-lang
bfleischer has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
mistym is now known as mistym_lunch
snsei has joined #ruby-lang
alekst has quit [Quit: Computer has gone to sleep.]
iliketur_ has quit [Quit: zzzzz…..]
pr0ton has quit [Quit: pr0ton]
wongon has quit [Quit: wongon]
schaerli has joined #ruby-lang
bfleischer has quit [Ping timeout: 240 seconds]
anjen has joined #ruby-lang
havenwood has joined #ruby-lang
sferik has joined #ruby-lang
momomomomo has joined #ruby-lang
deol has quit [Remote host closed the connection]
pr0ton has joined #ruby-lang
anjen has quit [Client Quit]
arooni-mobile__ has joined #ruby-lang
sferik has quit [Client Quit]
pr0ton has quit [Client Quit]
marr has joined #ruby-lang
pr0ton has joined #ruby-lang
mistym has joined #ruby-lang
sferik has joined #ruby-lang
igitur has left #ruby-lang ["ISON jaalto"]
sferik has quit [Client Quit]
retro|cz has quit [Ping timeout: 246 seconds]
bf4 has quit [Read error: Operation timed out]
Czupa has quit [Remote host closed the connection]
GaelanAintAround is now known as Gaelan
havenwood has quit [Remote host closed the connection]
<apeiros>
can you be a liiiittle bit more descriptive?
<drbrain>
Lewis: oh dear, mixed tabs and spaces
<apeiros>
and that
<Lewis>
thats train programming
nofxx has joined #ruby-lang
benkhicks1 has joined #ruby-lang
<Lewis>
apeiros: I m trying to figure out why an instance of my class return nil on irb
<apeiros>
can you gist the pry/irb lines too?
mistym_ has quit [Remote host closed the connection]
benkhicks has quit [Ping timeout: 246 seconds]
serroft has joined #ruby-lang
benkhicks1 has quit [Read error: Connection reset by peer]
benkhicks has joined #ruby-lang
<Lewis>
apeiros: done. same link
benkhicks has quit [Client Quit]
<apeiros>
Lewis: that's not nil it returns
<apeiros>
it's an empty string
alekst has quit [Quit: Leaving...]
RickHull has joined #ruby-lang
<apeiros>
you inherit from String
<Lewis>
apeiros: shouldn't it run the last statement
<apeiros>
it does
<apeiros>
you basically do String.new("")
<Lewis>
and return it*
<apeiros>
PersistentString.new('filgitgtihgtihgtgte_1.out').class will return PersistentString
gianlucadv has quit [Ping timeout: 260 seconds]
<Lewis>
apeiros: How to i get it to return the instance object
<apeiros>
it *does*
<apeiros>
your instance's .inspect is `""`
<apeiros>
I don't see why you're inheriting from String if you don't use it
<Lewis>
apeiros: I see. I wanted to compare the instances
<Lewis>
anyways. thanks I think i get it now
<apeiros>
you can set the value of the current instance using String#replace
<Lewis>
String.new("dede") => "dede"
<Lewis>
not => "" though
<apeiros>
yes
<apeiros>
because you do String.new("")
<apeiros>
you never call super
<apeiros>
you never set the value of self
kek has joined #ruby-lang
<apeiros>
*you never call super in initialize
<apeiros>
I don't think you should inherit from String, though.
solars has quit [Ping timeout: 272 seconds]
<ljarvis>
holy mother of indentation
elia has joined #ruby-lang
<apeiros>
I'd figure out how to do it correctly with inheriting - just to understand ruby better - and then move to has-a instead of is-a (i.e. not inherit from String)
<ljarvis>
also, no need to split and then join your strings when checking for palindromes
AKASkip has quit [Ping timeout: 240 seconds]
mistym_lunch is now known as mistym
benkhicks has joined #ruby-lang
ddd_ has joined #ruby-lang
ddd_ is now known as deryl
<Lewis>
apeiros: thanks. what do you mean by has-a and is-a
<apeiros>
inheritance means "is-a"
<Lewis>
ljarvis: I know that indentation is scary
<apeiros>
`class Foo < String` this says Foo's are Strings
<apeiros>
has-a is: def initialize; @data = somestring; end
<RickHull>
anyone use ActiveResource a fair bit? I'm having trouble seeing how to map its default URL construction to our URL scheme
<apeiros>
your class "has a" String, it isn't one
<ljarvis>
Lewis: srsly
<ljarvis>
rickhull: didn't that get rhrown in the trash?
<RickHull>
oh, I dunno
Forgetful_Lion has quit [Remote host closed the connection]
<RickHull>
whereas we serve according to content-type
<Lewis>
apeiros: I see. I want to compare my instance object and I thought that inheriting from String will make it easier without me having to include the module Comparable
chabill has quit [Quit: Zzz]
<RickHull>
also, i need to somehow tell it where our collections live
mbj has quit [Ping timeout: 248 seconds]
ldnunes has joined #ruby-lang
<RickHull>
ah, #include_format_in_path looks like #1
<Lewis>
ljarvis: and as for the split.join it's in case the string as \n
<Lewis>
has*
nisstyre has quit [Quit: Leaving]
batchitcray has quit [Ping timeout: 240 seconds]
DeProdigy has quit [Ping timeout: 248 seconds]
pr0ton has quit [Quit: pr0ton]
thmzlt has joined #ruby-lang
<Lewis>
is it possible to overwrite '=' with def =? or something
<apeiros>
no
<apeiros>
= is syntax. only with obj.foo= it's a method (foo=)
closer has quit [Ping timeout: 252 seconds]
schaerli has quit [Remote host closed the connection]
chabill has joined #ruby-lang
closer has joined #ruby-lang
<Lewis>
apeiros: do you know if there's a language that makes it possible. Out of curiosity
mdedetrich has joined #ruby-lang
pr0ton has joined #ruby-lang
ylluminate has joined #ruby-lang
Oak has quit [Ping timeout: 241 seconds]
DeProdigy has joined #ruby-lang
ayumin has joined #ruby-lang
ayumin has quit [Ping timeout: 248 seconds]
<Mon_Ouie>
I know C++ allows it — but the semantics of '=' are very different there
pr0ton has quit [Quit: pr0ton]
<Mon_Ouie>
(In Ruby, it changes the object that the variable refers to; in C++ it will cause a copy)
DeProdigy has quit [Ping timeout: 248 seconds]
dingus_khan has quit [Remote host closed the connection]
ayumin has joined #ruby-lang
<ljarvis>
Lewis: how does having a \n make any difference?
lfox has joined #ruby-lang
machuga is now known as machuga|away
pr0ton has joined #ruby-lang
ayumin has quit [Ping timeout: 260 seconds]
momomomomo has quit [Quit: momomomomo]
makoto_ has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
io_syl has quit []
nisstyre has joined #ruby-lang
serroft has quit [Quit: Leaving.]
makoto_ has quit [Ping timeout: 246 seconds]
lcdhoffman has joined #ruby-lang
momomomomo has joined #ruby-lang
zoo-zed has joined #ruby-lang
thmzlt has quit [Remote host closed the connection]
sepp2k1 has joined #ruby-lang
serroft has joined #ruby-lang
sepp2k has quit [Ping timeout: 260 seconds]
clamstar has joined #ruby-lang
wongon has joined #ruby-lang
iliketur_ has joined #ruby-lang
rriemann_ has quit [Read error: Operation timed out]
GaelanAintAround is now known as Gaelan
amoli has quit [Ping timeout: 248 seconds]
io_syl has joined #ruby-lang
iliketur_ has quit [Client Quit]
Gaelan is now known as GaelanAintAround
fijimunkii has joined #ruby-lang
fijimunk1i has quit [Ping timeout: 240 seconds]
bf4 has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
arBmind has quit [Quit: Leaving.]
smashwilson has quit [Quit: Leaving]
serroft has quit [Quit: Leaving.]
serroft has joined #ruby-lang
dingus_khan has joined #ruby-lang
iliketur_ has joined #ruby-lang
deryl has quit [Disconnected by services]
deryl1 has joined #ruby-lang
DeProdigy has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 248 seconds]
tenderlove has joined #ruby-lang
cored has quit [Ping timeout: 248 seconds]
RickHull has quit [Quit: Leaving.]
deryl1 has quit [Client Quit]
Lewis has quit [Remote host closed the connection]
deryl has joined #ruby-lang
cored has joined #ruby-lang
kurko_ has quit [Ping timeout: 245 seconds]
kurko_ has joined #ruby-lang
deryl is now known as ddd
ddd has quit [Client Quit]
batchitcray has joined #ruby-lang
ddd has joined #ruby-lang
riffraff has quit [Quit: This computer has gone to sleep]
thmzlt has joined #ruby-lang
arooni-mobile__ has quit [Ping timeout: 248 seconds]
retro|cz has joined #ruby-lang
riffraff has joined #ruby-lang
bfleischer has joined #ruby-lang
thmzlt has quit [Ping timeout: 240 seconds]
dingus_khan has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
riffraff has quit [Client Quit]
fijimunkii has quit [Ping timeout: 248 seconds]
|jemc| has joined #ruby-lang
TvL2386 has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
skade has joined #ruby-lang
batchitcray has quit [Ping timeout: 246 seconds]
batchitcray has joined #ruby-lang
serroft has quit [Quit: Leaving.]
makoto_ has joined #ruby-lang
mistym_ has joined #ruby-lang
mistym__ has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
makoto_ has quit [Ping timeout: 272 seconds]
mistym_ has quit [Ping timeout: 240 seconds]
mistym_ has joined #ruby-lang
kuja has joined #ruby-lang
mistym__ has quit [Ping timeout: 240 seconds]
mistym_ has quit [Disconnected by services]
tbuehlmann has quit [Remote host closed the connection]
mistym_ has joined #ruby-lang
mistym_ has quit [Disconnected by services]
chabill has quit [Ping timeout: 246 seconds]
chabill has joined #ruby-lang
RickHull has joined #ruby-lang
RickHull has quit [Client Quit]
RickHull has joined #ruby-lang
comboy has joined #ruby-lang
havenwood has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
zoo-zed has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby-lang
havenwood has joined #ruby-lang
benkhicks has quit [Quit: Leaving.]
bin7me has quit [Quit: Leaving]
mbj has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
nathanstitt has quit [Quit: I growing sleepy]
styped has joined #ruby-lang
styped__ has joined #ruby-lang
hellome has joined #ruby-lang
lcdhoffman has joined #ruby-lang
DeProdigy has quit [Ping timeout: 248 seconds]
apeiros has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
bf4 has quit [Ping timeout: 272 seconds]
elia has joined #ruby-lang
thmzlt has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
seanlinsley has quit [Quit: seanlinsley]
lfox has quit [Quit: ZZZzzz…]
apeiros has joined #ruby-lang
breakingthings has quit []
thmzlt has quit [Ping timeout: 248 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vlad_starkov has quit [Remote host closed the connection]