<sarmiena_>
but is there a way to implement this without AR?
moritzs has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 258 seconds]
rahult has quit [Client Quit]
mattmcclure has quit [Quit: Connection closed for inactivity]
Rollabunna has joined #ruby
rahult has joined #ruby
Azure has joined #ruby
<zenspider>
sarmiena_: given that the implemented it in AR, wouldn't that imply that it was possible to do it elsewhere? it's SOFTware after all.
cashnguns has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cmckee has quit [Ping timeout: 246 seconds]
davidhq has joined #ruby
<sarmiena_>
zenspider: yeah i guess you’re right. just thought there might be a less over-architected way of achieving similar without having to reverse engineer the monster that is AR
medo has left #ruby [#ruby]
<sarmiena_>
the script i want to write only needs to do listen, not the million other things AR does
MatthewsFace has joined #ruby
D9 has joined #ruby
troyready has quit [Ping timeout: 245 seconds]
ajk1 has joined #ruby
d0ugb has joined #ruby
d0ugb has quit [Remote host closed the connection]
weemsledeux has joined #ruby
Rollabunna has quit [Ping timeout: 246 seconds]
maletor_ has joined #ruby
<ajk1>
anyone familiar with nokogiri
arescorpio has joined #ruby
<ajk1>
im having some issues parsing an html page
mistermocha has joined #ruby
cmckee has joined #ruby
msmith has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
msmith has joined #ruby
digifiv5e has joined #ruby
digifiv5e is now known as Guest57421
sarmiena_ has quit [Quit: sarmiena_]
cmckee has quit [Ping timeout: 258 seconds]
nobitanobi has quit [Remote host closed the connection]
ejnahc has joined #ruby
helpa has quit [Remote host closed the connection]
DrCode has quit [Ping timeout: 246 seconds]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jshultz has quit [Quit: Connection closed for inactivity]
davidhq has joined #ruby
reinaldob has joined #ruby
end_guy has quit [Ping timeout: 246 seconds]
nobitanobi has joined #ruby
testcore has quit [Ping timeout: 246 seconds]
DrCode has joined #ruby
fuhgeddaboudit has joined #ruby
aspires has quit []
rahult is now known as rahult_
cmckee has joined #ruby
mistermocha has quit [Remote host closed the connection]
jottr_ has quit [Ping timeout: 255 seconds]
davidhq has quit [Ping timeout: 244 seconds]
reinaldob has quit [Ping timeout: 246 seconds]
atmosx has quit [Ping timeout: 246 seconds]
Zesty has joined #ruby
mary5030 has joined #ruby
niklasb_ has quit [Ping timeout: 260 seconds]
testcore has joined #ruby
cmckee has quit [Client Quit]
eikood has joined #ruby
end_guy has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d0ugb has joined #ruby
atmosx has joined #ruby
d0ugb has quit [Remote host closed the connection]
<tmoore>
ajk1: answered you in #nokogiri
maestrojed has quit [Quit: Computer has gone to sleep.]
sailias has quit [Quit: Leaving.]
mistermocha has joined #ruby
coderhs has joined #ruby
Fire-Dragon-DoL has joined #ruby
djbkd has quit [Quit: My people need me...]
kireevco1 has quit [Read error: Connection reset by peer]
eikood has quit [Quit: Leaving]
kireevco has joined #ruby
d0ugb has joined #ruby
d0ugb has quit [Remote host closed the connection]
TPBallbag has joined #ruby
mary5030 has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 246 seconds]
hamakn has quit [Remote host closed the connection]
<zenspider>
sarmiena_: huh? Why would you have to reverse engineer active record?
timonv_ has quit [Ping timeout: 265 seconds]
mary5030 has joined #ruby
<zenspider>
Fire-Dragon-DoL: "expected it to work" is not descriptive
<Fire-Dragon-DoL>
zenspider: I expected the spaceship operator to run value <=> other.value, but it looks it can't run other.value (because it's protected)
kireevco has quit [Quit: Leaving.]
i8igmac has joined #ruby
davidhq has joined #ruby
nobitanobi has quit [Remote host closed the connection]
mistermocha has joined #ruby
hamakn has joined #ruby
cmxu has joined #ruby
nobitanobi has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
nobitanobi has quit [Remote host closed the connection]
radic has joined #ruby
skolman has joined #ruby
skolman has quit [Remote host closed the connection]
AmBienCeD has quit [Ping timeout: 244 seconds]
NoNMaDDeN has joined #ruby
msmith has quit [Remote host closed the connection]
AmBienCeD has joined #ruby
skolman has joined #ruby
coderhs has quit [Read error: No route to host]
coderhs has joined #ruby
radic_ has quit [Ping timeout: 245 seconds]
NoNMaDDeN has quit [Remote host closed the connection]
coderhs has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
msmith has joined #ruby
d0ugb has joined #ruby
skolman has quit [Ping timeout: 265 seconds]
aspires has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
d0ugb has quit [Remote host closed the connection]
patrick99e99 has quit [Ping timeout: 265 seconds]
helpa has joined #ruby
RichardLitt has joined #ruby
skolman_ has joined #ruby
benzrf is now known as benzrf|offline
i8igmac has quit [Read error: No route to host]
mistermocha has quit [Remote host closed the connection]
willywos has joined #ruby
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
d0ugb has joined #ruby
Asher has quit [Quit: Leaving.]
skolman_ has quit [Ping timeout: 272 seconds]
diegoviola has quit [Ping timeout: 258 seconds]
diegovio1 has joined #ruby
magic__ has joined #ruby
reinaldob has joined #ruby
d0ugb has quit [Remote host closed the connection]
<waxjar>
Fire-Dragon-DoL: i tried out your example but i can't reproduce the error
msmith has quit [Remote host closed the connection]
cmxu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eka has joined #ruby
wallerdev has quit [Quit: wallerdev]
<waxjar>
ah i see, that makes sense
casual has quit [Ping timeout: 265 seconds]
<waxjar>
they're two different classes after all
ikanobori_ has quit [Ping timeout: 265 seconds]
casual has joined #ruby
Takle has quit [Ping timeout: 245 seconds]
skolman has joined #ruby
cmxu has joined #ruby
ikanobori_ has joined #ruby
benzrf|offline is now known as benzrf
<ajk1>
@tmoore thank you!
<Fire-Dragon-DoL>
waxjar: well, those are subclasses, I expected it to work, sigh
cashnguns has quit [Read error: Connection reset by peer]
diegovio1 is now known as diegoviola
rahult_ is now known as rahult
<waxjar>
if you didn't redefine them it wouldn't be a problem
<waxjar>
you can have #value call a private method that you implement separately for each subclass
davedev24_ has quit []
Avahey has joined #ruby
tonybird has joined #ruby
nonks has quit [Quit: WeeChat 1.0]
benzrf is now known as benzrf|offline
<Fire-Dragon-DoL>
waxjar: you mean that if I remove #value from the "root" class, it works fine?
<Fire-Dragon-DoL>
mh, no looks it doesn't
skolman has quit [Ping timeout: 272 seconds]
<Fire-Dragon-DoL>
waxjar: sorry, must go to bed, really tired, I'll keep checking it tomorrow
Fire-Dragon-DoL has quit [Quit: Leaving.]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
tonini has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
jimbach has quit [Remote host closed the connection]
rahult is now known as rahult_
fuhgeddaboudit has quit [Ping timeout: 245 seconds]
chipotle has quit [Quit: cya]
robbyoconnor has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
VanillaGoat__ has joined #ruby
aspires has quit []
stunder has quit [Ping timeout: 244 seconds]
tonini has quit [Ping timeout: 250 seconds]
braincrash has quit [Quit: bye bye]
Joufflu has joined #ruby
VanillaGoat_ has quit [Ping timeout: 265 seconds]
c0rn has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
axisys has joined #ruby
axisys has quit [Changing host]
axisys has joined #ruby
havenwood has joined #ruby
jimmyhoughjr has joined #ruby
tkuchiki has joined #ruby
braincrash has joined #ruby
ramfjord has joined #ruby
j_mcnally has joined #ruby
kireevco has quit [Quit: Leaving.]
ramfjord has quit [Client Quit]
rahult_ is now known as rahult
rahult is now known as rahult_
rahult_ is now known as rahult
rahult is now known as rahult_
rahult_ is now known as rahult
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Rollabunna has joined #ruby
Axy has quit [Ping timeout: 244 seconds]
arup_r has joined #ruby
cmckee has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
c0rn has quit []
nobitanobi has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
Axy has joined #ruby
Mia has quit [Ping timeout: 244 seconds]
D9 has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
kireevco has joined #ruby
<SirFunk>
Hi there. I have a question about class inheritance. How do i handle the case where I have a class "class Foo < Bar; def whatever end end" and in another file I want to make a class namespaced inside of that like: "class Foo; class Baz; end; end"
<SirFunk>
ruby seems to take issue since the class is defined with inheritance one place and not the ohter
nobitanobi has quit [Remote host closed the connection]
mxrguspxrt has joined #ruby
<tmoore>
SirFunk make sure you load the first one first
<SirFunk>
tmoore: that does seem to work. Is there another solution? These files get autoloaded (padrino app)
nobitanobi has joined #ruby
<tmoore>
Sorry it *does* work but you want another solution? You can make sure the first file is loaded first by requiring it at the top of the second file.
<SirFunk>
I meant that it seems to work when loaded in that order.
yfeldblum has joined #ruby
mxrguspxrt has quit [Ping timeout: 244 seconds]
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Photism has joined #ruby
rahult is now known as rahult_
maletor_ has joined #ruby
<tmoore>
so load them in that order :-)
<tmoore>
the other solution would be to put the superclass everywhere I suppose
<tmoore>
not sure if that would work really
<SirFunk>
yeah I was wondering about that
<SirFunk>
we'll probably just end up requiring the inherited one at the top of all the others
<tmoore>
really, you always want to load the definition of a thing before you use it
krz has joined #ruby
<SirFunk>
yeah, the 'sub classes' arent really using it
<SirFunk>
we're just trying to use it for name spacing to keep things easy to follow
Azure has quit [Read error: Connection reset by peer]
NoNMaDDeN has joined #ruby
Azure has joined #ruby
peterhu has quit [Quit: leaving]
peterhu has joined #ruby
BTRE has quit [Quit: Leaving]
ramfjord has joined #ruby
rahult_ is now known as rahult
freezey_ has joined #ruby
timonv_ has joined #ruby
arup_r has quit [Quit: Leaving.]
renlo has joined #ruby
<renlo>
How long would you say it would take someone who is capable in python to get up in running in ruby enough to take on something like rails?
<MatthewsFace>
I hated rails
<renlo>
ie, if you have a general understanding of how a web application should be made, and how web frameworks generally work, would it be a big undertaking going from python to ruby?
<MatthewsFace>
sorry that doesn't help answer you question
<MatthewsFace>
lol
<renlo>
ll
<renlo>
sinatra?
<renlo>
*lol
timonv_ has quit [Ping timeout: 244 seconds]
<MatthewsFace>
if you understand web frameworks and web applications it might not be so ba
<MatthewsFace>
bad*
<havenwood>
renlo: ruby is nice, come try the water
<MatthewsFace>
I was a command line guy, so ruby was awesome, but once I get to rails I didn't know what the hell I was doing.
Spami has quit [Quit: This computer has gone to sleep]
<havenwood>
renlo: you might look at Padrino with Sinatra as well
hmsimha has joined #ruby
<renlo>
would you recommend going from sinatra to rails or straight to rails
<renlo>
i've worked with django, flask, sql alchemy, etc
<renlo>
tornado, twisted
nobitanobi has quit [Remote host closed the connection]
maletor_ has quit [Quit: Computer has gone to sleep.]
chuck_ has joined #ruby
<chuck_>
can someone tell me how I can assign values from an array to different variables?
tonini has joined #ruby
kyb3r_ has joined #ruby
rahult is now known as rahult_
mikeg has joined #ruby
<chuck_>
Lets say I have an array [10, 20, 30] How can I assign first = 10 second = 20 third = 30
freezey_ has quit []
<renlo>
first = arr[0]
<renlo>
second = arr[1]
<renlo>
though i dont know the rb syntax
<peterhu>
first, second, third = array
cmxu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<renlo>
damn thats cool
mikecmpbll has joined #ruby
<chuck_>
peterhu, what if you don't know how many items you have in the array? is it possible to use .each do to assign value to different variables?
sarmiena_ has joined #ruby
nobitanobi has joined #ruby
<chuck_>
anyone?
krz has quit [Ping timeout: 265 seconds]
tonini has quit [Ping timeout: 250 seconds]
<sevenseacat>
and just create x number of random variables?
<sevenseacat>
why?
<tmoore>
I'm having deja vu
<tmoore>
I swear there was a long conversation in here this morning about why that doesn't make any sense
<chuck_>
sevenseacat so I get this array from a search I do. I do not know how many items in the array I want to take those values and assign it to different variables
<sevenseacat>
why?
<tmoore>
how would you refer to those variables if you don't know how many there are?
<jellosea>
hey, i’m having some difficulties understanding rack fcgi and my webserver lighttpd. can someone tell me what an example of the ‘bin-path’ handler should be?
djbkd has joined #ruby
maletor_ has joined #ruby
<renlo>
best ruby on rails getting started guide?
<existensil>
guides.rubyonrails.org
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
cmckee has quit [Quit: cmckee]
renderful has joined #ruby
webgen has joined #ruby
Morkel has joined #ruby
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
renderful has quit [Ping timeout: 258 seconds]
NoNMaDDeN has quit [Remote host closed the connection]
omosoj has joined #ruby
godd2 has joined #ruby
<omosoj>
hey guys, i want something that will help me do analytics on natural language texts.
<omosoj>
how would you guys solve that problem, besides just gathering up all the possibilities you can think of?
<jellosea>
or point me to a place where someone can help me with fastcgi
chipotle has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
<godd2>
omosoj solve what problem? The problem of whether or not a sentence has ended?
larissa has quit [Quit: Leaving]
<omosoj>
yeah
chipotle has joined #ruby
mary5030 has joined #ruby
Takle has quit [Ping timeout: 240 seconds]
Rollabunna has joined #ruby
SouL has quit [Remote host closed the connection]
<godd2>
Machine learning is the go-to solution. It's when you feed a computer a ton of examples with the answer already given, and then let it build rules about when a new example is the end of a sentence or not
<godd2>
Don't forget that even "hire a human" isn't a solution. Sometimes we make language parsing mistakes.
<godd2>
A fun example of that are what are known as "garden path sentences".
<godd2>
The horse raced past the barn fell.
<omosoj>
wow, so it creates the rules itself. hm, how does it do that? interesting...
timonv_ has joined #ruby
NoNMaDDeN has joined #ruby
jack_rabbit has quit [Ping timeout: 258 seconds]
cmckee has joined #ruby
<godd2>
omosoj well thats the thing about giving it a lot of examples with the solution already there for each one
emmesswhy has quit [Quit: This computer has gone to sleep]
<godd2>
it starts to create rules like "whenver I see a dot by a number followed by a number, it's not the end of a sentence"
<omosoj>
oh awesome. lol
Rollabunna has quit [Ping timeout: 244 seconds]
<godd2>
watch that talk I linked. He gives a very good overview even for someone new to the space
<omosoj>
not sure whether i want to jump in to treat or watch the video
<godd2>
my suggestion is video first
davedev2_ has joined #ruby
timonv_ has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
rahult_ is now known as rahult
sigurding has joined #ruby
ARCADIVS has joined #ruby
davedev24_ has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
ajk1 has quit [Remote host closed the connection]
armyriad has joined #ruby
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cmxu has joined #ruby
Macaveli has joined #ruby
i_s has joined #ruby
Glyphnote has joined #ruby
Glyphnote has quit [Remote host closed the connection]
carraroj has joined #ruby
tagrudev has joined #ruby
gr33n7007h has quit [Ping timeout: 265 seconds]
mistermocha has quit [Remote host closed the connection]
neoxquick has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
ramfjord has quit [Ping timeout: 245 seconds]
Morkel_ has joined #ruby
Morkel has quit [Ping timeout: 256 seconds]
Morkel_ is now known as Morkel
tonini has joined #ruby
gr33n7007h has joined #ruby
diegoviola has quit [Remote host closed the connection]
maestrojed has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
tonini has quit [Ping timeout: 250 seconds]
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
hellangel7 has joined #ruby
oo_ has joined #ruby
i_s has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
ht__th has quit [Remote host closed the connection]
Takle_ has quit [Remote host closed the connection]
eikood has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
tokik has quit [Ping timeout: 265 seconds]
Takle has joined #ruby
thsig has quit [Remote host closed the connection]
Macaveli has quit [Ping timeout: 245 seconds]
jacobat has quit [Ping timeout: 240 seconds]
vyorkin has joined #ruby
unshadow has joined #ruby
jottr_ has joined #ruby
vyorkin has quit [Client Quit]
vyorkin has joined #ruby
Hytosys has quit [Ping timeout: 240 seconds]
rodfersou has joined #ruby
shortCircuit__ has quit [Remote host closed the connection]
ixti has joined #ruby
<unshadow>
I have an Array of hashes, it looks like that [{:cookie=>"ba7", :auth=>"true"}, {:cookie=>"bfhfh", :auth=>"true"}], how can I find if :cookie "ba7" is true or false ? (print the :auth value)
jacobat has joined #ruby
timonv_ has joined #ruby
TPBallbag has joined #ruby
Guest24516 has quit [Read error: Connection reset by peer]
Guest24516 has joined #ruby
ayaz has joined #ruby
echooo1 has joined #ruby
tonini has joined #ruby
<apeiros>
unshadow: you use Array#find to find the matching hash and then look up its :auth key
<apeiros>
unshadow: alternatively you rethink how you structure your data. it might not be structured the right way for your use-case.
<yxhuvud>
or make it a structure better suited for a task
<yxhuvud>
¤#"¤#!
echooo has quit [Ping timeout: 255 seconds]
cherwin has joined #ruby
cschneid has quit [Ping timeout: 246 seconds]
<unshadow>
what do you guys suggest ? I want to keep a cokkie in an array, every cookie will be true or false depeding on client login, the I want to check later in the array if the cookie is true or false
sepp2k has joined #ruby
cschneid has joined #ruby
cherwin_ has joined #ruby
<apeiros>
{"ba7" => true, "bfhfh" => false}
<apeiros>
instant lookup
<yxhuvud>
uh, if the cookie comes from a web context, doesn't it have a life time?
<apeiros>
I go from what he shows us
<apeiros>
s/he/they/
awarner_ has joined #ruby
<yxhuvud>
yes, I took that step as well, and then asked myself 'cookie? is he trying to reinvent web login?'
<unshadow>
the time life ... i'll think about it later, for now only this, aspeiros idea is nice
cherwin has quit [*.net *.split]
Dude007 has quit [*.net *.split]
sivoais_ has quit [*.net *.split]
aganov has quit [*.net *.split]
ht__th has quit [*.net *.split]
hellangel7 has quit [*.net *.split]
hanmac1 has quit [*.net *.split]
Photism has quit [*.net *.split]
nateberkopec has quit [*.net *.split]
yeticry has quit [*.net *.split]
pandaant has quit [*.net *.split]
theother1tupidgu has quit [*.net *.split]
Hobogrammer has quit [*.net *.split]
kedare has quit [*.net *.split]
bjornar has quit [*.net *.split]
lsmola has quit [*.net *.split]
bascht has quit [*.net *.split]
Roa has quit [*.net *.split]
machete has quit [*.net *.split]
riton has quit [*.net *.split]
akkad has quit [*.net *.split]
SirFunk has quit [*.net *.split]
Maxdamantus has quit [*.net *.split]
Rylee has quit [*.net *.split]
crazed has quit [*.net *.split]
genta has quit [*.net *.split]
sindork has quit [*.net *.split]
MuffinPimp has quit [*.net *.split]
<unshadow>
(he*) ;)
cherwin has joined #ruby
Dude007 has joined #ruby
sivoais_ has joined #ruby
aganov has joined #ruby
hanmac1 has joined #ruby
ht__th has joined #ruby
Photism has joined #ruby
nateberkopec has joined #ruby
yeticry has joined #ruby
pandaant has joined #ruby
theother1tupidgu has joined #ruby
Hobogrammer has joined #ruby
kedare has joined #ruby
bjornar has joined #ruby
lsmola has joined #ruby
bascht has joined #ruby
Roa has joined #ruby
machete has joined #ruby
riton has joined #ruby
akkad has joined #ruby
Maxdamantus has joined #ruby
SirFunk has joined #ruby
genta has joined #ruby
sindork has joined #ruby
crazed has joined #ruby
MuffinPimp has joined #ruby
cherwin has quit [Ping timeout: 246 seconds]
awarner has quit [Ping timeout: 250 seconds]
hellangel7 has joined #ruby
Rylee has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
hellangel7 has quit [*.net *.split]
sepp2k has quit [*.net *.split]
schaerli has quit [*.net *.split]
Aaaal has quit [*.net *.split]
siwica has quit [*.net *.split]
tkuchiki has quit [*.net *.split]
sigurding has quit [*.net *.split]
codecop has quit [*.net *.split]
toretore has quit [*.net *.split]
theotherstupidgu has quit [*.net *.split]
asmodlol has quit [*.net *.split]
DefV_ has quit [*.net *.split]
teejar has quit [*.net *.split]
Numdox has quit [*.net *.split]
rotor has quit [*.net *.split]
Nilium has quit [*.net *.split]
Hanmac has quit [*.net *.split]
a13x212 has quit [*.net *.split]
hfp_work has quit [*.net *.split]
az7ar_away has quit [*.net *.split]
scruple has quit [*.net *.split]
certainty has quit [*.net *.split]
peeja has quit [*.net *.split]
bmn has quit [*.net *.split]
jamo_ has quit [*.net *.split]
swilr has quit [*.net *.split]
mackintosh has quit [*.net *.split]
raddazong has quit [*.net *.split]
jamooo_ has quit [*.net *.split]
hendricius has quit [*.net *.split]
kke has quit [*.net *.split]
hellangel7 has joined #ruby
sepp2k has joined #ruby
schaerli has joined #ruby
Aaaal has joined #ruby
siwica has joined #ruby
tkuchiki has joined #ruby
sigurding has joined #ruby
codecop has joined #ruby
toretore has joined #ruby
theotherstupidgu has joined #ruby
asmodlol has joined #ruby
DefV_ has joined #ruby
teejar has joined #ruby
Numdox has joined #ruby
rotor has joined #ruby
Nilium has joined #ruby
Hanmac has joined #ruby
a13x212 has joined #ruby
hfp_work has joined #ruby
az7ar_away has joined #ruby
scruple has joined #ruby
certainty has joined #ruby
peeja has joined #ruby
swilr has joined #ruby
bmn has joined #ruby
kke has joined #ruby
mackintosh has joined #ruby
jamo_ has joined #ruby
raddazong has joined #ruby
hendricius has joined #ruby
jamooo_ has joined #ruby
tonini has quit [Ping timeout: 250 seconds]
thsig has joined #ruby
_2easy has quit [Quit: Lost terminal]
hellangel7 has quit [Max SendQ exceeded]
vyorkin has quit [*.net *.split]
Xeago has quit [*.net *.split]
michael_mbp has quit [*.net *.split]
Alina-malina has quit [*.net *.split]
changx has quit [*.net *.split]
rdark has quit [*.net *.split]
altes has quit [*.net *.split]
Nahra has quit [*.net *.split]
nfk has quit [*.net *.split]
rockdon_ has quit [*.net *.split]
ejnahc has quit [*.net *.split]
marcel has quit [*.net *.split]
Haiiro has quit [*.net *.split]
kotk has quit [*.net *.split]
deepy has quit [*.net *.split]
alexherbo2 has quit [*.net *.split]
linduxed has quit [*.net *.split]
ruisantos has quit [*.net *.split]
jxport has quit [*.net *.split]
aboudreault has quit [*.net *.split]
aep has quit [*.net *.split]
apeiros has quit [*.net *.split]
queequeg1 has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
joast has quit [*.net *.split]
vieq has quit [*.net *.split]
crome has quit [*.net *.split]
M-Technic has quit [*.net *.split]
Fado has quit [*.net *.split]
Kruppe has quit [*.net *.split]
icedp has quit [*.net *.split]
sarlalian has quit [*.net *.split]
jbw has quit [*.net *.split]
drjfreeze has quit [*.net *.split]
seanmarcia has quit [*.net *.split]
nopc0de has quit [*.net *.split]
gigetoo has quit [*.net *.split]
ctrlrsf has quit [*.net *.split]
dfedde has quit [*.net *.split]
napcae has quit [*.net *.split]
drago777 has quit [*.net *.split]
roqo has quit [*.net *.split]
bahar_ has quit [*.net *.split]
dyreshark has quit [*.net *.split]
IotaSpencer has quit [*.net *.split]
snzmn has quit [*.net *.split]
canton7 has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
cnj has quit [*.net *.split]
Xuerian has quit [*.net *.split]
three18ti has quit [*.net *.split]
tchebb has quit [*.net *.split]
devyn has quit [*.net *.split]
AlyssaDaemon has quit [*.net *.split]
avelldiroll has quit [*.net *.split]
mgorbach has quit [*.net *.split]
Urocyon has quit [*.net *.split]
jblancett has quit [*.net *.split]
headius has quit [*.net *.split]
erichmenge has quit [*.net *.split]
psyprus has quit [*.net *.split]
chihhsin has quit [*.net *.split]
edwardly has quit [*.net *.split]
patronus has quit [*.net *.split]
flori_ has quit [*.net *.split]
audy has quit [*.net *.split]
linagee has quit [*.net *.split]
Miron has quit [*.net *.split]
Afforess has quit [*.net *.split]
Fraeon has quit [*.net *.split]
olekenneth has quit [*.net *.split]
nerdman has quit [*.net *.split]
adamholt has quit [*.net *.split]
siwica has quit [Ping timeout: 257 seconds]
hellangel7 has joined #ruby
niKeITA has joined #ruby
tadayoshi has joined #ruby
Nahra has joined #ruby
vyorkin has joined #ruby
Xeago has joined #ruby
michael_mbp has joined #ruby
changx has joined #ruby
rdark has joined #ruby
altes has joined #ruby
nfk has joined #ruby
rockdon_ has joined #ruby
ejnahc has joined #ruby
marcel has joined #ruby
Haiiro has joined #ruby
kotk has joined #ruby
M-Technic has joined #ruby
crome has joined #ruby
joast has joined #ruby
aboudreault has joined #ruby
nopc0de has joined #ruby
devyn has joined #ruby
dyreshark has joined #ruby
Fado has joined #ruby
alexherbo2 has joined #ruby
napcae has joined #ruby
edwardly has joined #ruby
bahar_ has joined #ruby
ruisantos has joined #ruby
flori_ has joined #ruby
dfedde has joined #ruby
chihhsin has joined #ruby
sarlalian has joined #ruby
ctrlrsf has joined #ruby
jblancett has joined #ruby
canton7 has joined #ruby
Miron has joined #ruby
erichmenge has joined #ruby
nerdman has joined #ruby
cnj has joined #ruby
deepy has joined #ruby
icedp has joined #ruby
AlyssaDaemon has joined #ruby
patronus has joined #ruby
apeiros has joined #ruby
jbw has joined #ruby
headius has joined #ruby
avelldiroll has joined #ruby
MissionCritical has joined #ruby
Kruppe has joined #ruby
queequeg1 has joined #ruby
Fraeon has joined #ruby
Urocyon has joined #ruby
adamholt has joined #ruby
drjfreeze has joined #ruby
olekenneth has joined #ruby
mgorbach has joined #ruby
roqo has joined #ruby
tchebb has joined #ruby
IotaSpencer has joined #ruby
audy has joined #ruby
jxport has joined #ruby
Xuerian has joined #ruby
linduxed has joined #ruby
psyprus has joined #ruby
linagee has joined #ruby
Sp4rKy has joined #ruby
Afforess has joined #ruby
aep has joined #ruby
vieq has joined #ruby
snzmn has joined #ruby
drago777 has joined #ruby
seanmarcia has joined #ruby
three18ti has joined #ruby
gigetoo has joined #ruby
MissionCritical has quit [Max SendQ exceeded]
altes has quit [Max SendQ exceeded]
aboudreault has quit [Max SendQ exceeded]
sarlalian has quit [Max SendQ exceeded]
edwardly has quit [Max SendQ exceeded]
cnj has quit [Max SendQ exceeded]
kotk has quit [Max SendQ exceeded]
cnj has joined #ruby
edwardly has joined #ruby
<unshadow>
yxhuvud: lol :) yeha I guess i'm kind of trying to re-invent weblogin hahah , its for a proxy i'm creating.
kotk has joined #ruby
ij has joined #ruby
sarlalian has joined #ruby
Alina-malina has joined #ruby
aboudreault has joined #ruby
tadayoshi has quit [Client Quit]
niKeITA is now known as niKeITA_away
peta_ has quit [Quit: peta_]
niKeITA_away is now known as niKeITA
tadayoshi has joined #ruby
mengu has quit [Remote host closed the connection]
tadayoshi has quit [Client Quit]
tadayoshi has joined #ruby
harax has joined #ruby
ndrst_ is now known as ndrst
mengu has joined #ruby
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
Timgauthier has joined #ruby
Timgauthier is now known as timgauthier_away
changx has quit [Quit: This computer has gone to sleep]
poulet_a has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
niKeITA is now known as niKeITA_away
tkuchiki has joined #ruby
siwica has joined #ruby
oo_ has joined #ruby
MissionCritical has joined #ruby
fabrice31 has quit [Remote host closed the connection]
chipotle has joined #ruby
LexRussia has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
oo_ has quit [Read error: Connection reset by peer]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
niKeITA_away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bauruine- has quit [Ping timeout: 260 seconds]
jacobat has quit [Ping timeout: 244 seconds]
DrCode has joined #ruby
niKeITA has joined #ruby
thsig_ has joined #ruby
end_guy has joined #ruby
<txdv>
is there something like xpath for ruby arrays?
<txdv>
i jsut thought it would be handy because i'm pissed of by manually sanitizing objects with hashes and arrays
carraroj has joined #ruby
User458764 has joined #ruby
davidhq has joined #ruby
jheg_ has quit [Quit: jheg_]
<shevy>
hehe
<txdv>
and im currently implementing it
sinkensabe has joined #ruby
<txdv>
so i thought maybe someone might have seen something like that
cina has quit [Ping timeout: 265 seconds]
MrSamuel has joined #ruby
cina has joined #ruby
bluOxigen has joined #ruby
Hobogrammer has quit [Ping timeout: 246 seconds]
<hanmac1>
shevy do you already know, my travis builds for rwx are now working ... so if i does change something i can see if it still builds ;P
timonv_ has joined #ruby
ldnunes has joined #ruby
alex88 has quit []
carraroj has quit [Quit: Konversation terminated!]
sigurding has joined #ruby
niklasb has joined #ruby
FooMunki has joined #ruby
ping-pong has quit [Ping timeout: 265 seconds]
decoponio has joined #ruby
apeiros has quit [Remote host closed the connection]
cina has quit [Quit: leaving]
carraroj has joined #ruby
<shevy>
now if only the wxwidget guys would add a --disable-gstreamer switch
apeiros has joined #ruby
Vile` has quit [Ping timeout: 255 seconds]
<hanmac1>
shevy what was your linux again? an arch linux?
Vile` has joined #ruby
carraroj has quit [Client Quit]
tonini has joined #ruby
apeiros has quit [Ping timeout: 246 seconds]
timonv_ has quit [Remote host closed the connection]
fsapo has joined #ruby
NoNMaDDe_ has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 240 seconds]
ping-pong has joined #ruby
theotherstupidgu has quit [Ping timeout: 255 seconds]
timonv^ has joined #ruby
Brando753 has quit [Ping timeout: 265 seconds]
tonini has quit [Ping timeout: 250 seconds]
theotherstupidgu has joined #ruby
sk87 has joined #ruby
<shevy>
hanmac1 all source
<hanmac1>
i think thats the problem with your system ... a decent package management would have solved that
<Morrolan>
Wha...
<Morrolan>
shevy: Are you insane? oO
<shevy>
Morrolan nope
timonv^ has quit [Remote host closed the connection]
<shevy>
hanmac1 my system is fine, gstreamer works perfectly well in my gnome3 setup - it's wxwidget that is at fault
agjacome has joined #ruby
oo_ has joined #ruby
cocotton has joined #ruby
<hanmac1>
shevy have you tried to build wx with a special gtk=3 flag ? i think it was "--with-gtk=3" ... maybe that does help ... if not ask again in #wxwidgets
armyriad has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
<shevy>
I have not yet tried --with-gtk=3
armyriad has joined #ruby
jheg_ has joined #ruby
timonv_ has joined #ruby
<shevy>
./src/unix/mediactrl.cpp:24:40: fatal error: gst/interfaces/xoverlay.h: No such file or directory
govg has quit [Quit: leaving]
<shevy>
I think that is old gstreamer 0.8x era
niKeITA has joined #ruby
<shevy>
aha, it is 0.10 era -> /usr/include/gstreamer-0.10/gst/interfaces/xoverlay.h
<shevy>
as I no longer have that, and there is no way to avoid the gstreamer dependency, I am stuck
FooMunki has quit [Quit: FooMunki]
<shevy>
I just tried the --with-gtk=3 switch so as I suspected it does not make a difference in regards to gstreamer
hmsimha has quit [Ping timeout: 245 seconds]
User458764 has quit [Ping timeout: 258 seconds]
CaptainRant has joined #ruby
dumdedum has quit [Quit: foo]
niKeITA has quit [Client Quit]
<hanmac1>
shevy make a gist for me with the whole output of configure with its parameters
<jhass>
shevy: I thought you do the AppDir approach? why don't you just install gstreamer0.10 on the side?
<CaptainRant>
Is it idiomatic to test for typos and types when doing TDD ?
MrSamuel has quit [Quit: MrSamuel]
carraroj has quit [Ping timeout: 245 seconds]
Rollabunna has joined #ruby
<shevy>
jhass I don't always go the AppDir approach, some libs use hardcoded paths and I am currently not a gobolinux setup - thing is that I no longer have the old gstreamer and I am perfectly fine with that; there is no point to just use it specifically because wxwidget isn't able to deal with other gst versions
<apeiros>
fine and dandy. in ruby they have precisely two elements and the exclusivity information.
<apeiros>
and the two elements are the boundaries
yfeldblum has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
cek has left #ruby [#ruby]
ij has left #ruby ["WeeChat 0.4.3"]
<apeiros>
anyway, you can use whatever thought model you want. just don't blame ruby if your thought model gives you predictions which turn out to be incorrect.
webgen1 has joined #ruby
agjacome_ has quit [Ping timeout: 260 seconds]
Deejay_ has joined #ruby
Deejay_ has quit [Client Quit]
<txdv>
[0,5] has one more element compared to [0,5)
<shevy>
hanmac1 --enable-mediactrl=no works
danijoo has quit [Quit: Leaving...]
<hanmac1>
shevy okay so you might be able to build wx and rwx if you didnt do it already
harax has joined #ruby
danijoo has joined #ruby
webgen has quit [Ping timeout: 244 seconds]
carraroj has quit [Ping timeout: 250 seconds]
Timgauthier is now known as timgauthier_away
Takle has joined #ruby
<shevy>
what was the gem install command again?
<shevy>
gem install rwx fails
<shevy>
ERROR: Could not find a valid gem 'rwx' (>= 0) in any repository
tagrudev has quit [Read error: Connection reset by peer]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
ERROR: Possible alternatives: rwx
<shevy>
oh wait
<shevy>
I have to use some dev-thingy right?
<shevy>
if only I could remember
abuzze has quit [Remote host closed the connection]
carraroj has joined #ruby
carraroj has quit [Client Quit]
<last_staff>
how does system() work? Can I just call system('iexplore'), or do I need to include the whole effing path?
<last_staff>
"whole effing" = absolute
<tobiasvl>
it uses $PATH
<shevy>
you won't need the path
<shevy>
btw you can try the above right in irb
<tobiasvl>
or whatever the equivalent is in windows or whatever OS it is that has a program called "iexplore" (sounds creepily like internet explorer)
<shevy>
system('iexplore')
<shevy>
it scares me that he uses windows
AlexRussia has quit [Ping timeout: 245 seconds]
<last_staff>
i don't have ruby actively - it's embedded in the vagrant software
<shevy>
on linux + firefox I do: system 'firefox -new-tab URL_HERE'
<last_staff>
I'm pretty much fumbling about in the dark still
patrick99e99 has joined #ruby
<last_staff>
tobiasvl: that's because it IS internet explorer. It was the first 'universally known' application I could think of besides cmd
benzrf|offline is now known as benzrf
<txdv>
when should someone use strings in hashes?
sysx1000i has joined #ruby
abuzze has joined #ruby
<txdv>
i'm a bit confused right now, I always use Symbols as keys in Hashes
<txdv>
but is there a reasonable situation when someone would use strings instead?
tkuchiki has quit [Read error: Connection reset by peer]
<tobiasvl>
txdv: speculation, but symbols are never garbage collected, unlike strings
abuzze has quit [Remote host closed the connection]
<tobiasvl>
of course symbols are faster in every other way…
tkuchiki has joined #ruby
oleo has joined #ruby
<apeiros>
txdv: you can use any object which supports #hash and #eql? as hash key
<apeiros>
and Symbol vs. String: if your key is already available as a string, or when it's user input
<tobiasvl>
txdv: that thing about symbols not being GC-ed is old btw
<tobiasvl>
so depends on ruby version
<last_staff>
txdv: what about readability? would that count as a 'reasonable' situation?
<apeiros>
tobiasvl: it will be old once 2.2 is released and that change is not reverted
<tobiasvl>
was sure they'd fixed that
<banister>
apeiros mario kart.
<apeiros>
banister: at work and coming home late. tomorrow evening?
nfk has quit [Quit: yawn]
<banister>
apeiros sure
<apeiros>
I ping you when I'm ready :)
* apeiros
tries location based reminders for this
yottanami1 has joined #ruby
jheg_ has joined #ruby
<txdv>
last_staff: I usually use an extended hash which converts every missing method into an index
<hanmac1>
banister: did you know that rwx does pass travis builds now and does rspec tests ;P
tkuchiki has quit [Read error: Connection reset by peer]
<txdv>
so i can write hash.bla = "ASD" isntead of hash[:bla] = "ASD"
<banister>
hanmac1 congrats man, you're an open source super-star! ;*
tkuchiki has joined #ruby
yottanami has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
<txdv>
while hash[:bla] is probably nicer to write, I think its still tedious
patrick99e99 has quit [Ping timeout: 272 seconds]
<sysx1000i>
Hasb.bla looks suspicious
<olivier_bK>
some has already testing to upload file with mechanize ?
<last_staff>
sysx1000i: hash.whee looks even more suspicious
<sysx1000i>
Hash.whee looks weird
<txdv>
there is nothing more suspicious looking than hash.pipe
<last_staff>
what about hash.whee = "joint 'operation'"?
User458764 has joined #ruby
ferr has quit [Ping timeout: 272 seconds]
<banister>
txdv lol
<last_staff>
txdv: lol
shazaum has quit [Changing host]
shazaum has joined #ruby
ixti has quit [Ping timeout: 244 seconds]
<last_staff>
hash | grep -.-
<last_staff>
no longer ruby, but still
carraroj has joined #ruby
sysx1000i has left #ruby [#ruby]
sivoais_ has quit [Quit: leaving]
sivoais has joined #ruby
pushpak has joined #ruby
hamakn has quit [Remote host closed the connection]
zarubin has quit [Quit: Leaving.]
mxrguspxrt has joined #ruby
<hanmac1>
shevy does rwx build with your system?
FooMunki has quit [Quit: FooMunki]
Guest56627 has quit [Changing host]
Guest56627 has joined #ruby
jimbach has joined #ruby
Guest56627 is now known as guyz
nfk has joined #ruby
nfk has quit [Remote host closed the connection]
AFKGeek has quit [Quit: Leaving]
alem0lars has joined #ruby
nfk has joined #ruby
ferr has joined #ruby
Takle has quit [Remote host closed the connection]
<shevy>
it is still building
<shevy>
and I have to leave here soon
nfk has quit [Remote host closed the connection]
baordog has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
<txdv>
so again, does anyone know of something like xpath in ruby (as a small ruby dsl) for ruby? something like this? http://paste.ubuntu.com/8655406/
CaptainRant has left #ruby ["WeeChat 0.4.3"]
jhamm has joined #ruby
nfk has joined #ruby
yottanami1 has left #ruby [#ruby]
<jhamm>
Is this room just for ruby or rails too?
livingstn has joined #ruby
<jhamm>
I am trying to find a method that is being used in a large codebase, but when I grep it just isnt there current_user_has_ownership?
<jhamm>
I assume ruby/rails is creating the method for me
<toretore>
jhamm: #rubyonrails is for rails
<jhamm>
How do I find this ?
Lewix has joined #ruby
<toretore>
that method probably comes from a plugin/gem
<jhamm>
When I go into the console with pry, it just gives me a memory location like this
<jhamm>
#<Module:0x007f9f84550200>#methods:
<jhamm>
and has the method listed underneath
<jhamm>
what is the next step to find where that method is at?
tkuchiki has quit [Read error: Connection reset by peer]
<toretore>
look at the source for the gem providing the functionality
tkuchiki has joined #ruby
<jhamm>
that is my question, I can't find the source. There are 100 or so gems used in this project
<toretore>
lol
<toretore>
it's in a authentication or authorization gem
mxrguspxrt has quit [Remote host closed the connection]
tier has joined #ruby
harax_ has joined #ruby
Takle has joined #ruby
pu22l3r has joined #ruby
<jhamm>
that makes sense
<jhamm>
look through all the gems and find the ones that relate around that
<jhamm>
and dive into that code
<jhamm>
thanks
Lewix has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
harax has quit [Ping timeout: 265 seconds]
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
renderful has joined #ruby
pu22l3r_ has quit [Ping timeout: 256 seconds]
willywos has joined #ruby
pu22l3r has quit [Ping timeout: 260 seconds]
willywos has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jimbach has quit [Remote host closed the connection]
siwica1 has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 256 seconds]
siwica has joined #ruby
FooMunki has joined #ruby
agjacome_ has joined #ruby
yfeldblum has joined #ruby
Kricir has joined #ruby
agjacome has quit [Ping timeout: 265 seconds]
tagrudev has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
abuzze has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
Alina-malina has joined #ruby
Takle has quit [Remote host closed the connection]
jacobat has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
Deejay_ has joined #ruby
tkuchiki has joined #ruby
reisl is now known as larissa
c0rn has joined #ruby
Deejay_ has quit [Client Quit]
tkuchiki has quit [Read error: Connection reset by peer]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hamakn has joined #ruby
tkuchiki has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
Takle has joined #ruby
tkuchiki has joined #ruby
<hanmac1>
shevy still building or finish?
oo_ has quit [Read error: Connection reset by peer]
Timgauthier has joined #ruby
doodlehaus has joined #ruby
Kricir has quit [Remote host closed the connection]
tkuchiki has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
allcentu1 has joined #ruby
tkuchiki has joined #ruby
beef-wellington has joined #ruby
sailias has joined #ruby
fmcgeough has joined #ruby
abuzze has quit [Remote host closed the connection]
banister has joined #ruby
wpp has quit [Ping timeout: 244 seconds]
abuzze has joined #ruby
mengu has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 258 seconds]
Rollabunna has joined #ruby
thsig has joined #ruby
benzrf is now known as benzrf|offline
jimbach has joined #ruby
benzrf|offline is now known as benzrf
<ddv>
jhamm: maybe it's a database column, or a helper which can be dynamically generated
tagrudev has quit [Remote host closed the connection]
<jhamm>
is there any easy way to track them down?
rbennacer has joined #ruby
abuzze_ has joined #ruby
abuzze has quit [Ping timeout: 255 seconds]
tagrudev has joined #ruby
<rbennacer>
hey guys, is there a way to catch any exception thrown in a class
<rbennacer>
do i have to do it for each method?
tagrudev has quit [Remote host closed the connection]
tesaf has joined #ruby
jottr_ is now known as jottr
Rollabunna has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
workmad3 has joined #ruby
c0rn has quit []
<TomyWork>
i'm trying to dig into a project that is largely unknown to me (puppet). i'm operating mostly with puts-debugging. can i somehow uniquely identify an object?
<hanmac1>
rbennacer: make a gist for what you try to achive, then we might help you
abuzze_ has quit [Remote host closed the connection]
Darryl has quit [Quit: Connection closed for inactivity]
agjacome has joined #ruby
<TomyWork>
oh so it's "foo#object_id", without the dot?
<rbennacer>
no
<rbennacer>
foo.object_id?
kp666 has quit [Quit: Konversation terminated!]
<ddv>
TomyWork: I think you should learn some ruby basics first
<rbennacer>
the # is just there to tell you that it is a method
<TomyWork>
ah
<ddv>
# is a convetion to denote instance methods
agjacome_ has quit [Ping timeout: 246 seconds]
<TomyWork>
so it's not ruby, but a documentation convention?
<rbennacer>
yes sir! :)
tkuchiki has quit [Read error: Connection reset by peer]
<ddv>
TomyWork: # is ruby, for commenting
tkuchiki has joined #ruby
jimbach has quit [Remote host closed the connection]
mxrguspxrt has joined #ruby
wedgeV has quit [Ping timeout: 256 seconds]
<TomyWork>
yeah, but my point is "learning basic ruby" has nothing to do with knowing that "#" stands for "this is a method" in documentation, since it's a documentation convention that isnt part of the language. correct?
TPBallbag has quit [Remote host closed the connection]
<rbennacer>
not really, because using the doc is part of ruby basics
<rbennacer>
but it is ok, i learn a new thing every day
<ddv>
TomyWork: no
<txdv>
documentation is for faggots
<rbennacer>
LOL
<ddv>
apeiros ^
<txdv>
that was sarcasm
<sevenseacat>
its still offensive
<ddv>
it's a derogatory term, txdv
<ddv>
nothing to do with sarcasm
<TomyWork>
right, you said "ruby basics", not "basic ruby"
sk87 has joined #ruby
<TomyWork>
nevertheless, i plan to pick up as much ruby as i need and not more
hanmac1 has quit [Quit: Leaving.]
<rbennacer>
mmm that's the wrong attitude to learn a skill
<workmad3>
'as much ruby as I need' <-- how do you know you don't need some bit until you know it? :/
<TomyWork>
rbennacer i dont plan to learn ruby
<rbennacer>
ok
<rbennacer>
good luck then
<txdv>
ddv: ok, how is this: documentation is for pythonists
Mon_Ouie has joined #ruby
moritzs has joined #ruby
<workmad3>
txdv: I think it was more polite the first time... :P
txdv was kicked from #ruby by apeiros [this language is not tolerated]
* workmad3
hides from super-apeiros
txdv has joined #ruby
unshadow has quit [Quit: leaving]
<txdv>
yes, ddv pointed that already out
lkba has joined #ruby
GPH|work has joined #ruby
<txdv>
thank you for keeping the language clean in this channel
<apeiros>
yw :)
<workmad3>
txdv: I think it was because of the p-word personally :P
<TomyWork>
rbennacer it really is ok. i know several object-oriented and functional languages, i know the concepts behidn the languge. i dont have to know every aspect of ruby to make custom types for puppet in what appears to be a DSL anyway
oo_ has joined #ruby
<ddv>
TomyWork: and yet you never heard of the dot operator
<rbennacer>
LOL
oetjenj has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Read error: Connection reset by peer]
<TomyWork>
the dot operator? you mean method invocation?
tkuchiki has joined #ruby
ixti has joined #ruby
oetjenj has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
<TomyWork>
ddv you did see my first guess "foo.#object_id"
devdazed has joined #ruby
tyll_ has quit [Ping timeout: 256 seconds]
nfk has quit [Remote host closed the connection]
doev has quit [Ping timeout: 265 seconds]
PierreRambaud has quit [Remote host closed the connection]
tyll has joined #ruby
iamjarvo has joined #ruby
sinkensabe has quit [Remote host closed the connection]
workmad3 has quit [Quit: Reconnecting]
workmad3 has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
sinkensabe has joined #ruby
ferr has quit [Quit: Lost terminal]
amarraja has joined #ruby
nfk has joined #ruby
amarraja has quit [Max SendQ exceeded]
amarraja has joined #ruby
amarraja has quit [Max SendQ exceeded]
spyderman4g63 has joined #ruby
maasha has joined #ruby
abuzze has quit [Remote host closed the connection]
fsapo has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 245 seconds]
maasha has quit [Quit: Page closed]
alem0lars is now known as alem0lars_mortal
sambao21 has quit [Ping timeout: 258 seconds]
alem0lars_mortal is now known as alem0lars
TPBallbag has joined #ruby
rockdon_ has joined #ruby
last_staff has quit [Quit: l8r peeps]
abuzze has joined #ruby
sinkensabe has quit [Ping timeout: 256 seconds]
nfk has quit [Client Quit]
tier has quit [Remote host closed the connection]
tier has joined #ruby
TPBallbag has quit [Remote host closed the connection]
SirFunk has quit [Remote host closed the connection]
tonini has joined #ruby
msmith has joined #ruby
SirFunk has joined #ruby
kaspergrubbe has joined #ruby
kaspergrubbe_ has quit [Read error: Connection reset by peer]
tallgirltaadaa has joined #ruby
<tallgirltaadaa>
anyone awake
<tallgirltaadaa>
?
davidsong has quit [Quit: Page closed]
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fire-Dragon-DoL has joined #ruby
<tallgirltaadaa>
hi Fire-Dragon-DoL
<benzrf>
tallgirltaadaa: h
<Fire-Dragon-DoL>
hi tallgirltaadaa
livathinos has quit [Remote host closed the connection]
<tallgirltaadaa>
i have a question if someone wouldnt mind trying to take a stab
i_s has joined #ruby
<crome>
is it a stab from behind?
Takle has quit [Remote host closed the connection]
<Fire-Dragon-DoL>
tallgirltaadaa: sounds scary
<Fire-Dragon-DoL>
lol
<tallgirltaadaa>
i hope not :(
<Toba>
crass
<Fire-Dragon-DoL>
but yes I'm here, tell us what would you like to know tallgirltaadaa
wasamasa has quit [*.net *.split]
juni0r has quit [*.net *.split]
jhass has quit [*.net *.split]
jimeh has quit [*.net *.split]
nanashiRei has quit [*.net *.split]
tsunamie has quit [*.net *.split]
mateu has quit [*.net *.split]
mateu has joined #ruby
jimeh has joined #ruby
<tallgirltaadaa>
well i have an admin where I prefill alot of information in for the client.rb.... so when they come to the site all they need to do in put in their code to access their prefilled info
jhass|off has joined #ruby
<tallgirltaadaa>
BUT
nanashiRei has joined #ruby
<tallgirltaadaa>
when i make the form for them to fill in the code
<tallgirltaadaa>
bc the code is already is the db the input is already prefilled
<tallgirltaadaa>
but really i wana query
<crome>
there is a better channel for rails questions where people dont go yelling "this is a rails question" all the time someone asks a rails question
<tallgirltaadaa>
i KNOW.. its a rails question.. but i have been trying to access #rubyonrails for days with no luck
anicet has joined #ruby
<tallgirltaadaa>
even though i have registered my nick and everything
<crome>
are you also identified?
obscured has joined #ruby
shredding has quit [Quit: shredding]
<tallgirltaadaa>
yes
JohnBat26 has joined #ruby
<crome>
what happens when you try to join?
<tallgirltaadaa>
i was in here already yesterday and took every suggestion from those in the room and still no luck
<tallgirltaadaa>
nothing... goes to the auth page.. but never lets me enter...
<tallgirltaadaa>
but mostly if someone wants to try to answer the question i would like to spend time on that.. rather than. trying to worry about the other irc problem ive been having
crazydiamond has quit [Ping timeout: 244 seconds]
ylluminarious has joined #ruby
<rbennacer>
can you create a stackoverflow question with the code and then share it here
jvv has joined #ruby
<rbennacer>
?
<TomyWork>
i can join #rubyonrails fine. type "/ns identify <password>" and then "/join #rubyonrails"
tsunamie has joined #ruby
<TomyWork>
if that's not your primary nick, type "/ns identify <primary nick> <password>" and then "/join #rubyonrails"
vyorkin has quit [Quit: WeeChat 1.0.1]
<TomyWork>
(primary nick being the nick you registered as)
segmond has quit [Ping timeout: 265 seconds]
i_s has quit [Ping timeout: 255 seconds]
sigurding has quit [Quit: sigurding]
aspiers has quit [Ping timeout: 265 seconds]
mxrguspxrt has quit [Remote host closed the connection]
Takle has joined #ruby
tonini has quit [Ping timeout: 250 seconds]
ylluminarious has quit [Ping timeout: 255 seconds]
thsig has quit [Remote host closed the connection]
<benzrf>
TomyWork: so you can define methods unique to a particular object by defining them on that object's singleton class
<benzrf>
singleton class is the official term
kobain has quit [Max SendQ exceeded]
<benzrf>
eigenclass is an older term that is still ocasionally used
djstorm has joined #ruby
mary5030 has joined #ruby
<workmad3>
as is metaclass
kobain has joined #ruby
<benzrf>
*occasionally
<TomyWork>
it's easier to google though :)
AndChat- has joined #ruby
<benzrf>
workmad3: well metaclass is bs
<benzrf>
it is most certainly not a metaclass
<workmad3>
benzrf: as is eigenclass and singleton_class, IMO ;)
<benzrf>
well, it's the singleton class in that the class is a singleton for that particlar object
<benzrf>
and eigenclass makes sense given the meaning of 'eigen'
<benzrf>
but metaclass has an established meaning that is totally separate
<workmad3>
benzrf: right... but all classes in ruby are already singletons :P
<benzrf>
workmad3: yeah, singleton class is not too great
<TomyWork>
singleton makes the most sense if i get the concept right. there's just one instance of it, so the object deriving from it technically is a singleton
<benzrf>
but at least it is not as flat wrong as metaclass
lkba has quit [Ping timeout: 265 seconds]
<benzrf>
TomyWork: hmm, never thought of it that way
<benzrf>
colo
jasooon has quit [Ping timeout: 240 seconds]
<benzrf>
*cool.
<benzrf>
TomyWork: anyway,
<TomyWork>
err the object instantiating it*
mengu has quit [Remote host closed the connection]
<benzrf>
>> foo = "A STRING!!!"; class << foo; def lmao; 3; end; end; foo.lmao
<maasha>
TomyWork: in fact I just want a line, but that is the same as a vector with nohead
<maasha>
TomyWork: conceptually, it is a vector. A line can be so many other things.
<waxjar>
cina: if doesn't take a boolean but any value and determines if it's "truthy" or "falsey". the only falsey values are false and nil, the rest is truthy :)
<cina>
maasha: hmm... I wanted to write "do_something if obj", so I guess I could maybe override #nil? and set it true to stop do_something from running.
mary5030 has quit [Remote host closed the connection]
rbennacer has left #ruby ["Leaving"]
<maasha>
cina: overriding nil? sounds like a terrible idea.
bal has quit [Quit: bal]
<Mon_Ouie>
And woudn't work, it explicitly checks if the object is the same as nil or false
<cina>
so, how do I make an obj return false or nil when use like "do_something if obj" ?
<Mon_Ouie>
You cannot change the semantics of conditionals and loops in Ruby
enebo has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
<TomyWork>
"it explicitly checks if the object is the same as nil or false" - oooh, sounds like lua :)
<Fire-Dragon-DoL>
lol
abuzze_ has quit [Remote host closed the connection]
tonini has quit [Ping timeout: 250 seconds]
<Fire-Dragon-DoL>
where can I discuss this behavior for protected? https://gist.github.com/Fire-Dragon-DoL/675a69a698105088c3e3 I would like to know if it's a bug (I don't think so), if are there any chance it will be changed in future, if it's considered ok as is
<cina>
so, all objects are always 'true', hmm
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
<cina>
because they are neither exactly false or nil
dangerousdave has joined #ruby
jottr has quit [Ping timeout: 265 seconds]
Takle has quit [Remote host closed the connection]
<TomyWork>
cina obj.truthiness
<cina>
oh, objects of FalseClass are false too
<TomyWork>
in your class, do "def truthiness"
<Mon_Ouie>
False and nil are objects too
gsd has joined #ruby
linojon has joined #ruby
<Mon_Ouie>
FalseClass, TrueClass, and NilClass each have exactly one instance (false, true and nil respectively)
<cina>
I see
<TomyWork>
or switch to c++ and define an operator void* :)
<Fire-Dragon-DoL>
what happens if I type NilClass.new ? °°
<Fire-Dragon-DoL>
waxjar: oh I was looking for you, let me read
renderfu_ has quit [Remote host closed the connection]
thsig has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
VanillaGoat_ has joined #ruby
<Fire-Dragon-DoL>
waxjar: ah ok so basically I just need to add
<Fire-Dragon-DoL>
another level
<Fire-Dragon-DoL>
it's not fantastic but it's ok
charliesome has quit [Quit: zzz]
wedgeV has joined #ruby
Baluse has quit []
oo_ has joined #ruby
tonini has joined #ruby
<waxjar>
value is now bound to A, which the two have in common, but when you redefined them, they were bound to B and C, so they can't call each other anymore
Juanchito has quit [Quit: Connection closed for inactivity]
rockdon_ has quit [Read error: Connection reset by peer]
roolo has joined #ruby
treehug88 has joined #ruby
thsig has quit [Read error: Connection reset by peer]
thsig has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rollabunna has joined #ruby
akkad has quit [Ping timeout: 246 seconds]
benzrf is now known as benzrf|offline
jasooon has quit [Ping timeout: 265 seconds]
AlexRussia has joined #ruby
Kricir has quit [Remote host closed the connection]
Timgauthier is now known as timgauthier_away
Wolland has quit [Ping timeout: 240 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
burritocat has quit [Ping timeout: 265 seconds]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kricir has joined #ruby
tonini has quit [Ping timeout: 250 seconds]
nateberkopec has quit [Ping timeout: 246 seconds]
lsmola has quit [Ping timeout: 246 seconds]
Hobogrammer has joined #ruby
pandaant has quit [Ping timeout: 246 seconds]
akkad has joined #ruby
lsmola has joined #ruby
pandaant has joined #ruby
rkalfane has joined #ruby
Snowstormer has joined #ruby
roolo has quit [Quit: AAAAaaaaAAAAAAA]
obscured has quit [Read error: Connection reset by peer]
Snowstormer is now known as burritocat
iamjarvo has joined #ruby
agjacome_ has quit [Quit: leaving]
Darryl has joined #ruby
dkphenom has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
jhwhite has joined #ruby
tonini has joined #ruby
maletor_ has joined #ruby
<TomyWork>
ok the mysterious disappearance of things is because the things are instantiated in a different order now... odd things those things
obscured has joined #ruby
oo_ has joined #ruby
spastorino has joined #ruby
aganov has quit [Quit: Leaving]
<shevy>
benzrf|offline I write a lot of ruby all the time! lately though I could barely write a lot ... too much non-computer related things to do in general
NoNMaDDeN has quit [Remote host closed the connection]
burritocat has quit [Ping timeout: 244 seconds]
<Hanmac>
shevy i am home again ... that means more rspec stuff and more documentation ... have rwx been build finish for you?
<shevy>
I just arrived at home as well
<shevy>
I didn't yet check
ghostmoth has joined #ruby
<olivier_bK>
olivier_bK, freeze shevy at home Ahh....
<Hanmac>
"gem install" says "build will take a while ;P
cmckee has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kamilc__ has joined #ruby
terlar has quit [Ping timeout: 244 seconds]
tonini has quit [Ping timeout: 250 seconds]
tonini has joined #ruby
cina has quit [Ping timeout: 265 seconds]
alem0lars has quit [Quit: Quit !]
cina has joined #ruby
jottr has joined #ruby
NoNMaDDeN has joined #ruby
cndiv has joined #ruby
<mg^>
speaking of gems, I created my first gem last week. While it installs OK, in code that makes use of it I have to specify in the Gemfile dependencies where I shouldn't need to. I am sure I am missing something obvious.
terlar has joined #ruby
<jhass>
mg^: link to repo?
<havenwood>
mg^: codE?
<mg^>
can't, internal to my workplace at the moment
pothibo has joined #ruby
<jhass>
gemspec at least?
kireevco has quit [Quit: Leaving.]
it0a has joined #ruby
<mg^>
might could do that
<havenwood>
mg^: change some names in the gemspec?
<jhass>
+ list of things you have to add to the Gemfile
<VanillaGoat_>
In plain Ruby, is there a way to specify a timezone with the Time.at(epochtime) method?
<VanillaGoat_>
I want to get Time.at(1414127408).timezone(GMT+10)
jottr has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
<havenwood>
Hanmac: builds for me
<jhass>
VanillaGoat_: epoch is always utc. Time.at will always return it as localtime
<mg^>
basically my company makes a communications tool and we have customer demand for an API for our chat system
kireevco has quit [Max SendQ exceeded]
<VanillaGoat_>
Right, epoch is always UTC. But when I turn it into a Time object, is there a way to specify what timezone it will use, and override localtime?
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<epochwolf>
VanillaGoat_: I'm in EDT.
tkuchiki has joined #ruby
<mg^>
anyway, since chat bots such as hubot are the thing, we decided to create adapters for Lita and Hubot
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<jhass>
mg^: and you still have to list the runtime deps?
bauruine_ has joined #ruby
kireevco has joined #ruby
<mg^>
Of course, being the only Rubyist (if I qualify as that) at my company, I get tasked with the Lita one
GPH|work has quit [Read error: Connection reset by peer]
maletor_ has quit [Read error: Connection reset by peer]
mg^ has quit [Read error: Connection reset by peer]
shanlar has quit [Read error: Connection reset by peer]
renderful has quit [Read error: Connection reset by peer]
lemur has quit [Read error: Connection reset by peer]
tkuchiki has quit [Read error: Connection reset by peer]
corehook has joined #ruby
shanlar has joined #ruby
IrishGringo has quit [Read error: Connection reset by peer]
<jhass>
VanillaGoat_: nothing pretty. You could temporarily override ENV['TZ']
mary5030 has joined #ruby
mg^ has joined #ruby
lemur has joined #ruby
<jhass>
epochwolf: nope, while it works with glibc strptime, with ruby it doesn't
<mg^>
That was weird
zenspider has quit [Ping timeout: 245 seconds]
<jhass>
there's a rather lengthy bug report about it
<jhass>
but changing that behavior was rejected in the end
<epochwolf>
jhass: well, that sucks.
<shevy>
I once assigned to the TZ variable
axl_ has quit [Read error: Connection reset by peer]
psmolen has quit [Ping timeout: 240 seconds]
<epochwolf>
Well, parse into time, then run through strptime in a different format?
<shevy>
not knowing that it was related to time
maletor_ has joined #ruby
<havenwood>
mg^: what's unexpected? needing a json dep? something with how you require them?
<mg^>
anyway, I specify my dependencies in my Gemfile, and then build/install it, I still have to specify those same dependencies in the Lita gemfile or I get errors when my adapter loads... I don't believe that should be the case
maletor has quit [Ping timeout: 272 seconds]
<shevy>
I got all kind of crazy behaviour as a result
flagg0204 has quit [Ping timeout: 265 seconds]
<shevy>
since that day I know that behaviour based on setting environment variables is fundamentally flawed
dblessing has joined #ruby
chrishough has quit [Ping timeout: 272 seconds]
wookiehangover has quit [Ping timeout: 240 seconds]
<jhass>
mg^: so the ones you need to specify are or are not in the gemspec?
enebo has quit [Read error: Connection reset by peer]
j_mcnally has quit [Ping timeout: 250 seconds]
<mg^>
they are in my Gemspec
cherwin_ has quit [Ping timeout: 256 seconds]
xwq17 has quit [Ping timeout: 256 seconds]
__main__ has quit [Ping timeout: 250 seconds]
<mg^>
for instance, I have spec.add_runtime_dependency "faye", ">= 1.0.3"
Anarch has quit [Ping timeout: 245 seconds]
speakingcode has quit [Ping timeout: 261 seconds]
IrishGringo has joined #ruby
nuck has quit [Ping timeout: 272 seconds]
kies has quit [Ping timeout: 272 seconds]
thoraxe has quit [Ping timeout: 272 seconds]
<mg^>
but I have to also put Faye in the Lita gemspec or it fails when loading my adapter gem
martinzajac has joined #ruby
tuelz has quit [Ping timeout: 250 seconds]
<havenwood>
mg^: add gem deps in gemspec, in your Gemfile just a: source 'https://rubygems.org'; gemspec
<mg^>
I guess I put it in the lita Gemfile, not Gemspec
thoraxe has joined #ruby
<mg^>
thanks, I'll try that
Kricir has joined #ruby
Takle has quit [Remote host closed the connection]
speakingcode has joined #ruby
zenspider has joined #ruby
xwq17 has joined #ruby
<jhass>
can you create a Gemfile with just your lita-foo and post the resulting .lock?
wookiehangover has joined #ruby
nuck has joined #ruby
enebo has joined #ruby
Anarch has joined #ruby
chrishough has joined #ruby
<mg^>
My Gemfile already looks like that, havenwood
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheRinger has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 265 seconds]
axl_ has joined #ruby
__main__ has joined #ruby
flagg0204 has joined #ruby
<havenwood>
mg^: so by "I specify my dependencies in my Gemfile" you just meant you have the line?: gemspec
kies has joined #ruby
iamjarvo has joined #ruby
tuelz has joined #ruby
<jhass>
havenwood: as I understood he pulls his gem into another projects Gemfile and still has to add its runtime deps for it to work
<mg^>
havenwood: in my gem have Gemfile with source 'https://rubygems.org'; gemspec and I have a Gemspec that lists several dependencies
<mg^>
jhass: exactly
terlar has quit [Ping timeout: 272 seconds]
<havenwood>
jhass: ahhha
livathinos has joined #ruby
<mg^>
I have looked at other adapters and they do not apparently need to do that, so I am making some newb mistake somewhere
mikecmpbll has quit [Ping timeout: 260 seconds]
benzrf|offline is now known as benzrf
psmolen has joined #ruby
<jhass>
from what we can see nothing obvious
tonini has quit [Ping timeout: 250 seconds]
Snowstormer has joined #ruby
Takle has joined #ruby
jottr has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
i_s has joined #ruby
<jhass>
I don't expect anything special there but still the other projects resulting .lock would be interesting
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NoNMaDDeN has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
Wolland has quit [Ping timeout: 244 seconds]
Lingo has joined #ruby
chipotle has quit [Quit: cya]
bricker`work has joined #ruby
Lingo has quit [Client Quit]
Jiye has joined #ruby
corehook has quit []
dANO_ has quit []
koderok has joined #ruby
koderok has quit [Client Quit]
thsig has quit [Remote host closed the connection]
JBreit has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
doev has joined #ruby
allcentu1 has quit [Ping timeout: 256 seconds]
gauke has quit [Quit: gauke]
kireevco has quit [Quit: Leaving.]
jasooon has joined #ruby
aclearma_ has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
<paulfm>
Anyone ever use the pg gem with Sinatra instead of using an ORM
Takle has joined #ruby
aclearman037 has quit [Ping timeout: 244 seconds]
<paulfm>
I am running into odd issues at high load. I really think I am missing something.
Wolland has joined #ruby
<jhass>
do you use a connection pool?
Eiam has joined #ruby
patrick99e99 has joined #ruby
moritzs has quit [Ping timeout: 244 seconds]
<paulfm>
jhass: nope, that is probably what I am missing.
poulet_a has quit [Ping timeout: 256 seconds]
Kricir has quit [Remote host closed the connection]
<jhass>
it can increase performance and avoid threading issues at least
mercwithamouth has joined #ruby
<jhass>
the connection_pool gem provides a nice general one
<paulfm>
jhass: I will look into it. Thanks. First time jumping out of activerecord or datamapper usage. Any other tips?
Kricir has joined #ruby
<jhass>
not really, I use Sequel myself if it's not AR
rylev has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 245 seconds]
IceDragon has joined #ruby
rylev has joined #ruby
_ixti_ has joined #ruby
<rw->
hi rubyists, quick q: have a main thread and one subthread which can both modify a shared resource. i am not using a mutex, and have not seen any problems so far. have i just been lucky so far?
thsig has joined #ruby
timonv_ has quit [Remote host closed the connection]
doev has quit [Ping timeout: 260 seconds]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JBreit has left #ruby ["Leaving"]
<jhass>
rw-: basically yes
<paulfm>
jhass: Looking at Sequel doc. It looks like I can execute arbitrary sql without needing models? Is that the case or am I mistaken?
starkhalo has joined #ruby
<jhass>
ruby's GVL likely increased your luck
thagomizer has joined #ruby
Guest54952 has quit [Ping timeout: 255 seconds]
patrick99e99 has quit [Ping timeout: 245 seconds]
ixti has quit [Ping timeout: 255 seconds]
jasooon has quit [Ping timeout: 244 seconds]
<jhass>
paulfm: iirc yes, I don't remember if it ships a connection pool though
soahccc_ is now known as soahccc
Kricir has quit [Ping timeout: 246 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<jhass>
rw-: it depends a bit on the ruby implementation, the shared data structure and the operations done to it (also which operations from both threads)
<paulfm>
jhass: Awesome. The doc says it does have a connection pool. Might be easier to just use Sequel instead of hacking together my own. Thanks again.
<rw->
k neat. i figured there must be something helping to avoid it.
<rw->
basically the "socket" loop reads/writes to the shared array, and the input (readline) loop sometimes adds stuff to the array... that's the extent of its sharedness
<rw->
so not a whole lot of dangerous transactions i guess?
rylev has quit [Ping timeout: 255 seconds]
gccostabr has joined #ruby
<jhass>
dangerous enough, sounds a bit like you want a Queue here, which is already thread safe
<jhass>
so you can safely switch ruby implementations
<jhass>
or maybe MRI eventually gets rid of the GVL at some point
gccostabr has quit [Client Quit]
<rw->
sounds like Queue is what i want then
tylersmith has joined #ruby
<rw->
er, well... it's not technically a queue though. i'd liken it most to a vector since fifo/lifo doesn't really apply
bayed has quit [Quit: Connection closed for inactivity]
crome has quit [Remote host closed the connection]
crome has joined #ruby
amundj has quit [Ping timeout: 245 seconds]
preller has quit [Quit: leaving]
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
bauruine_ has quit [Ping timeout: 260 seconds]
harax_ has quit [Ping timeout: 265 seconds]
bklane has joined #ruby
abuzze has quit [Ping timeout: 265 seconds]
siwica has quit [Ping timeout: 245 seconds]
benzrf is now known as benzrf|offline
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qba73 has quit []
wallerdev has quit [Quit: wallerdev]
siwica has joined #ruby
aspires has quit []
chthon has quit [Ping timeout: 265 seconds]
aspires has joined #ruby
iamjarvo has joined #ruby
moritzs has joined #ruby
fsapo has quit [Remote host closed the connection]
crome has quit [Remote host closed the connection]
crome has joined #ruby
aclearman037 has joined #ruby
djbkd has joined #ruby
wallerdev has joined #ruby
endash has quit [Ping timeout: 265 seconds]
chrishough has joined #ruby
claw__ has joined #ruby
geggam has joined #ruby
<jxf>
out of curiosity, can one metaprogrammatically create a method that accepts a list of keyword arguments?
jasooon has joined #ruby
<jxf>
e.g., let's say you have the array [:foo, :bar, :baz] and you want to wind up with `define_method(:some_method) { |foo:, bar:, baz:| ... }`. Is that possible?
<pipework>
Try?
cina has quit [Quit: leaving]
<Hanmac>
shevy my rwx developing now gets utopic ;P
<jxf>
pipework: I can't see how to convert the array into the block arguments list
claw_ has quit [Ping timeout: 244 seconds]
TPBallbag has quit [Remote host closed the connection]
<jxf>
it seems like there would need to be a "define_method_with_keyword_arguments" or something to that effect
benzrf|offline is now known as benzrf
<jhass>
jxf: question is, how do you imagine to access those defined local variables if they're unknown to you?
rdark has quit [Remote host closed the connection]
<jxf>
jhass: what do you mean? they'll be specified by the method's caller
<maasha>
is there way to test if a method is the last in a chain from within that method?
<jxf>
jhass: Oh, I was just eliding that for readability. The part I'm interested in is how to wind up with, e.g. "define_method(:add) { |left:, right:| ... }" from the array [:left, :right].
<jxf>
jhass: That is, the implementation of the method and the name of the method are all predetermined. The arguments to it aren't.
sambao21 has joined #ruby
<jhass>
jxf: I know, but that defines the local variables left and right. If those are unknown to you, how do you imagine the implementation to know about them?
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
x1337807x has joined #ruby
<benzrf>
Fun Lines For Your Enemies' .bashrc's
<jxf>
jhass: The caller will pass them in -- e.g., o.add(4, 6).
<eam>
what ruby really needs is a way to dereference a variable containing a symbol in || params
jasooon has quit [Ping timeout: 245 seconds]
<eam>
jxf: certainly one stupid way to do it is via eval
<jhass>
jxf: I'm talking about the implementation of the method, not how to call it
<eam>
the problem is that || is missing a way to dereference a name to its symbol contents
aspires has quit []
<jhass>
jxf: I made it up
taptapdan has joined #ruby
<jhass>
it doesn't exist
<jhass>
because it makes no sense
<jxf>
jhass: I guess we disagree that it "makes no sense".
pu22l3r_ has joined #ruby
<eam>
jhass: doesn't my example do what you're asking for?
fuhgeddaboudit has joined #ruby
<jhass>
eam: not really
pu22l3r has quit [Read error: Connection reset by peer]
<eam>
howso?
stunder has joined #ruby
dangerousdave has joined #ruby
<jxf>
jhass: Here's maybe a more specific use case. Let's say you want a variant of "Struct", one that requires keyword arguments instead of positional arguments.
<jhass>
there's no point in making the keyword args dynamic if you require them to be the same in the implementation anyway
<eam>
jhass: sure there is
<jxf>
jhass: How would you do that?
<eam>
(and that's a different argument)
<jhass>
jxf: then you use **kwargs to collect them
kireevco has quit [Ping timeout: 265 seconds]
<jhass>
which gives you a hash back
<jhass>
like *args gives you an array for positional args
<jxf>
jhass: How do you define a method that takes keyword arguments?
<jhass>
def foo(foo:, bar:)
<jxf>
That's not dynamic.
<eam>
how do you do it dymaically without stringy eval :)
<beef-wellington>
Is there a way to force rails console to be 100% read-only so that devs can dig into issues to gather data without any fear of modifying production data accidentally?
<eam>
dynamically, even
Xeago has joined #ruby
<jxf>
Remember, you only know them at runtime: You want to be able to do "KeywordStruct.new(:foo, :bar)".
<havenwood>
jxf: the horror: a = [:left, :right]; eval "define_method(:some_method) { |#{a.map { |sym| "#{sym}:" }.join(', ')}| }"
gauke has joined #ruby
jerius has joined #ruby
t_mmyv has joined #ruby
<eam>
havenwood: stringy eval is hackish though
<eam>
ruby ought to have a way to deref
t_mmyv has quit [Client Quit]
t_mmyv has joined #ruby
icbm has joined #ruby
Takle has joined #ruby
<jxf>
Yeah, the best I can come up with is stringy eval like havenwood's example. I can't see any way to get the keyword args into the block.
TPBallbag has joined #ruby
<eam>
there isn't one
<jxf>
That settles that, then. :)
<jhass>
jxf: this involves a ton of guesswork of what you actually want to do since you're unable to explain clearly: use define_method(:something) {|**kwargs| raise ArgumentError unless kwargs.keys == accepted_args; whatever; }
benzrf|offline is now known as benzrf
TPBallbag has quit [Remote host closed the connection]
aspires has joined #ruby
stunder has quit [Client Quit]
stunder has joined #ruby
kireevco has joined #ruby
<eam>
jhass: seems pretty clear to me
<eam>
what's desired is a way to use a variable to represent argument parameters in a method definition
<jhass>
eam: he described his wanted solution clearly, not what he actually wants to do
yfeldblum has joined #ruby
<eam>
we don't need to know particulars to discuss the abstract
Spami has quit [Quit: This computer has gone to sleep]
rkalfane has joined #ruby
djbkd has quit [Remote host closed the connection]
<jhass>
if the solution you think you need is bullshit you do
<havenwood>
fair to be suspicious that this path isn't one of sanity
mary5030 has joined #ruby
<eam>
I'm not so judgemental, insane software is just as interesting as sane software imo
godd2 has joined #ruby
testcore has joined #ruby
<havenwood>
eam: or more interesting. Ruby, you'll shoot your eye out!
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jxf>
jhass: One of the goals was to wind up with something that looks like a Struct, but lets me use keyword arguments instead.
* Hanmac
is going to reboot ... think at me if i am not coming back ;P
<jhass>
jxf: well, then just use **kwargs
mary5030 has quit [Remote host closed the connection]
yetanotherdave has joined #ruby
mary5030 has joined #ruby
econerd4ever has joined #ruby
aspires has quit []
beneggett has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
jaequery has joined #ruby
djbkd has joined #ruby
aspires has joined #ruby
pu22l3r_ has quit [Ping timeout: 250 seconds]
Hanmac has quit [Remote host closed the connection]
claymore has quit [Ping timeout: 240 seconds]
aspires has quit [Client Quit]
klaut_ has quit [Remote host closed the connection]
hellangel7 has quit [Remote host closed the connection]
aspires has joined #ruby
claymore has joined #ruby
insaneinside has joined #ruby
Guest68415 has quit [Ping timeout: 272 seconds]
somaking has quit [Quit: Page closed]
<insaneinside>
Any recommendations on a channel for general web-dev-related questions?
wasamasa has quit [Ping timeout: 250 seconds]
<havenwood>
>> a = [:left, :right]; b = ['hand', 'foot']; define_method(:some_method) { |**args| puts "#{args[:left]}y #{args[:right]}y" }; some_method a.zip(b).to_h
<jxf>
havenwood: I'm working on a **kwargs version now, but having trouble making the "accepted_args" part work. Looks like I need to check a number of things manually if I want the same semantics (right number of arguments, present in any order, etc.).
<havenwood>
jxf: ahh
<insaneinside>
waiiiit a minute, are we talking about Python or Ruby here?
graydot has joined #ruby
<jhass>
insaneinside: look at the channel name...
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<insaneinside>
jhass: well, sure, but I wasn't aware that Ruby supported the `**kwargs`-style arguments...
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gauke has joined #ruby
TinkerTyper has joined #ruby
Brando753 has joined #ruby
timonv^ has joined #ruby
Squarepy has joined #ruby
paulfm_ has joined #ruby
Scotteh has quit [Read error: Connection reset by peer]
fabrice31 has quit [Ping timeout: 250 seconds]
Scotteh has joined #ruby
Hytosys has joined #ruby
Wolland has quit [Remote host closed the connection]
paulfm has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby
timonv_ has quit [Ping timeout: 245 seconds]
m8 has joined #ruby
hamsterslayer has joined #ruby
<hamsterslayer>
out
<jhass>
in
aclearman037 has joined #ruby
Rollabun_ has quit [Remote host closed the connection]
hamsterslayer has quit [Client Quit]
kyb3r_ has joined #ruby
<insaneinside>
you say helloooo...
ptrrr has quit [Quit: ptrrr]
ptrrr has joined #ruby
larissa has quit [Quit: Leaving]
mikeg has joined #ruby
boombadaroomba has joined #ruby
aspires has quit []
heftig has joined #ruby
sambao21 has joined #ruby
gauke has quit [Quit: gauke]
neoxquick has joined #ruby
benzrf is now known as benzrf|offline
stunder has quit [Ping timeout: 255 seconds]
NightMonkey has joined #ruby
Scotteh has quit [Ping timeout: 246 seconds]
Scotteh has joined #ruby
agjacome has joined #ruby
altamic has quit [Quit: altamic]
soxet has quit [Quit: Leaving]
TPBallbag has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
lxsameer has joined #ruby
shai has joined #ruby
michael_mbp has quit [Excess Flood]
ezra has joined #ruby
nobitanobi has quit [Remote host closed the connection]
ezra is now known as Guest87065
michael_mbp has joined #ruby
<shai>
Hi :) I need to read a file and put in a variable a subset of a regex text I will search for. The file contains text like: thiskey=thisvalue and I need to find this text and put in a variable in my script myvariable=thisvalue
<shai>
jhass, thanks. I don't really know how to implement that in my script .. i'm very new to ruby...
dandrade has joined #ruby
wallerdev has quit [Quit: wallerdev]
<jhass>
You said you read the file into a variable, I assume that's a string. String#sub is a method to replace text in a string, it returns a new string with the replacement done
<shai>
I didn't say that .. let me rephrase maybe?
renderful has quit [Remote host closed the connection]
<jhass>
oh, gotcha, I thought you want to replace
<jhass>
I guess all lines in your file are in that form?
<shai>
I want to read a file, line by line, and search for a text that is like "thiskee=thisvalue" .. then, I need to put "thisvalue" in a variable in my script ..
<shai>
Notte, they are not .. just a small text file that will have this specific string .. but it'll have a different value each time, which I need to find...
icarus has joined #ruby
stunder has joined #ruby
aspires has joined #ruby
<shai>
jhass, i hope i was able to better explain what i'm looking for ... :)
<jhass>
I assume delimited by whitespace, then thiskey = my_file_contents[/thiskey=(.+)\s/, 1]
<jhass>
can be slightly improved if the value has a specific format
aspires has quit [Client Quit]
renderfu_ has joined #ruby
agjacome has quit [Ping timeout: 250 seconds]
agjacome has joined #ruby
<shai>
jhass, i'm trying your code ...
<shai>
jhass, no error .. but no output either .. let me try some more
<jhass>
it might help to see actual example inputs ;)
<jhass>
razieliyo: we use symbols for that in ruby
<razieliyo>
okay okay, symbols, it was :this?
econerd4ever has quit [Remote host closed the connection]
<insaneinside>
Yes, :that. :P
<razieliyo>
okay, :thanks!
<razieliyo>
that'll do the job
<razieliyo>
too much time since last time I used ruby :/
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<txdv>
Hey, guys, since there is more acitivty right now, I would like to ask whether there is something like xpath just in pure ruby (as a DSL) for ruby objects, something like this: http://paste.ubuntu.com/8660387/
Jiye has quit [Quit: Be back later ...]
<txdv>
i have search through all the gems containing path, but so far have found nothing
mercwithamouth has quit [Ping timeout: 272 seconds]
<shai>
ok ... so now that I use nokogiri to find the value from the xml, how can i alter the value in the xml? doc = Nokogiri::XML(File.read(bzinfo)) ; backup = doc.at('do_backup') ; puts backup['backup_schedule_type']
Xeago has quit [Remote host closed the connection]
nfk has joined #ruby
graydot has quit [Quit: graydot]
nateberkopec has quit [Quit: Leaving...]
chrishough has joined #ruby
<jhass>
you can simply set it and call to_xml on the doc: backup['backup_schedule_type'] = whatever; File.write(bzinfo, doc.to_xml)
AlexRussia has quit [Quit: WeeChat 1.1-dev]
AlexRussia has joined #ruby
yetanotherdave has quit [Ping timeout: 246 seconds]
<shai>
jhass, You rock :)
kyb3r_ has quit [Read error: Connection reset by peer]
neoxquick has quit [Ping timeout: 246 seconds]
smokycat has joined #ruby
DLSteve has joined #ruby
rodfersou has quit [Quit: leaving]
niftylettuce has joined #ruby
allcentu1 has quit [Quit: WeeChat 1.0]
rastro has joined #ruby
revoohc has joined #ruby
<banisterfiend>
jhass lol the diaspora commit graph almost corresponds exactly to yoru commit graph
chrishough has quit [Ping timeout: 260 seconds]
<banisterfiend>
jhass you're basically the only committer
mikeg has quit [Remote host closed the connection]
<jhass>
banisterfiend: I'm basically the only one merging PRs ;)
<jhass>
also I commit the locale updates, so that accounts a lot
jaequery has joined #ruby
graydot has joined #ruby
<banisterfiend>
jhass it's pretty bad code there btw, some ot the diaspora controllers are text book bad rails code
<shai>
jhass, i completed my script and it works like a charm, thank you!!! :)
Mon_Ouie has quit [Quit: WeeChat 1.0.1]
<jhass>
banisterfiend: yeah, cleanup is slow
<jhass>
we're left with that mess
<jhass>
PRs welcome ;)
diegovio1 has joined #ruby
<banisterfiend>
jhass no thx, diaspora doesnt excite my fragile little heart.
bMalum has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
razieliyo has quit [Quit: Saliendo]
treehug88 has quit []
shai has quit [Quit: Leaving]
Martxel has joined #ruby
Hamburglr has joined #ruby
ldnunes has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: Leaving]
ctp has joined #ruby
ldnunes has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
timonv^ has quit [Remote host closed the connection]
<hobodave>
hey guys
beef-wellington has quit [Ping timeout: 255 seconds]
<jhass>
hi
mxrguspxrt has joined #ruby
aspires_ has joined #ruby
renderfu_ has quit [Remote host closed the connection]
boombadaroomba has quit [Remote host closed the connection]
rbrs has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegovio1 has quit [Ping timeout: 244 seconds]
JohnBat26 has joined #ruby
nobitanobi has joined #ruby
weemsledeux has joined #ruby
weemsledeux has joined #ruby
aspires has quit [Ping timeout: 255 seconds]
NoNMaDDe_ has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
<insaneinside>
straw men?
claymore has quit [Read error: Connection reset by peer]
<hobodave>
I knew htere was a way to do what I wanted to do
<tercenya>
zoink: does "gem list" include moped ?
<hobodave>
still somewhat new to Ruby
<hobodave>
now to come up with a clear custom failure message for RSpec
bigkevmcd has quit [Quit: Outta here...]
<zoink>
jhass: "doesn't work" meaning I get "LoadError: cannot load such file -- moped"
<zoink>
no
<tredstone>
check your gem list and make sure you have it installed
<jhass>
zoink: and you did run gem install moped ?
<zoink>
tercenya: ^
<zoink>
jhass: I installed it using "bundle install --path vendor/bundle"
<zoink>
in a rails app
<zoink>
I'd like to use the version in the app
<jhass>
zoink: did you start your irb with bundle exec irb then?
carraroj has quit [Quit: Konversation terminated!]
<zoink>
no, I'll try that
fabrice31 has quit [Ping timeout: 272 seconds]
agjacome_ has joined #ruby
endash has joined #ruby
<zoink>
"require 'moped'" works, thanks! :)
jasooon has quit [Ping timeout: 244 seconds]
perrier has joined #ruby
<benzrf>
moped
<benzrf>
the past tense of mope
DLSteve has quit [Read error: Connection reset by peer]
skolman has quit [Remote host closed the connection]
skolman_ has joined #ruby
<zoink>
heh
agjacome has quit [Ping timeout: 255 seconds]
<hobodave>
hmm is there a one-liner way to join an array of arbitrary Strings and Symbols into a string representation that includes the colon for the symbols and single quotes for the strings? e.g. ['foo', :bar].join('][') => ['foo'][:bar]
<hobodave>
that actually returns [foo][bar]
<hobodave>
which makes sense
<jhass>
hobodave: .map(&:inspect).join('][')
<zenspider>
this is going to be a bad idea, I can tell
<hobodave>
why zenspider ?
<zenspider>
eval
renderful has joined #ruby
<hobodave>
I'm not evalling anything
<hobodave>
I'm generating an RSpec error message
aspires_ is now known as aspires
mityaz_ has quit [Quit: See ya!]
rylev has joined #ruby
paulfm_ has quit []
<zenspider>
you might want to look at .... what's it called... minitest-powerassert on the minitest side
<zenspider>
dunno if it is rspec-powerassert or just powerassert or what
tcrypt has joined #ruby
aclearman037 has quit [Quit: I'm out!]
<zenspider>
sorry... power_assert
rylev has quit [Client Quit]
<zenspider>
there's power_assert and rspec-power_assert (and pry-power_assert?!?!!!)
renderful has quit [Remote host closed the connection]
oleo has quit [Ping timeout: 244 seconds]
beef-wellington has quit [Ping timeout: 246 seconds]
davedev24_ has joined #ruby
oleo__ has joined #ruby
<zenspider>
arcapella: not making it a method
Joufflu has joined #ruby
<zenspider>
proper indentation (2 per)
oleo__ is now known as oleo
<arcapella>
zenspider: what shoul di do instead?
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_ixti_ has joined #ruby
nighthwk1 has joined #ruby
<zenspider>
having fixed numbers. there's no reason to calculate it over and over
<zenspider>
there aren't 365 days in a year btw
<zenspider>
there's 365.246 or so
emptyflask has quit [Ping timeout: 246 seconds]
agjacome has joined #ruby
mary5030 has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
<apeiros>
365.2425 in a gregorian year
<apeiros>
not accounting for leap seconds
<apeiros>
(as they're not predetermined anyway)
<zenspider>
I always forget the thousandths
<apeiros>
having written my own datetime lib with (almost) all calculations elaborated myself helps ;-)
<arcapella>
oh fancy you
thsig has quit [Ping timeout: 260 seconds]
<zenspider>
or you could use emacs :P
<zenspider>
they wrote a book about that library: calendrical calculations
<zenspider>
(good book btw)
<apeiros>
:)
<apeiros>
with date, most calculations are relatively easy
<arcapella>
i just started programming
<zenspider>
it is scarily thorough
bklane has quit [Remote host closed the connection]
<apeiros>
time is more annoying with all its rule-less parts :-/
jenrzzz_ has quit [Ping timeout: 245 seconds]
nighthwk1 has quit [Remote host closed the connection]
<zenspider>
arcapella: so, unless you're gonna have the user specify WHAT decade, I'd make it a fixed calculation and just throw it in a constant
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agjacome_ has quit [Ping timeout: 255 seconds]
djstorm has quit [Ping timeout: 255 seconds]
boombadaroomba has joined #ruby
davedev24_ has quit [Ping timeout: 260 seconds]
bklane has joined #ruby
<arcapella>
what's a fixed calculation?
emptyflask has joined #ruby
<zenspider>
1 + 1
<arcapella>
oh
<arcapella>
thank you
<zenspider>
better: TWO = 1 + 1
<arcapella>
sorry for asking these stupid questions, but i don't know why programming is really hard for me
<apeiros>
ruby still doesn't optimize those, right? (somewhat rightfully because + might have been redefined)
<zenspider>
arcapella: no prob. that's why we're here
<arcapella>
i want to challenge myself and do an ambitious project
<zenspider>
apeiros: afaik, no. it'll execute at the time of definition so it'll be whatever + is at that time
renderful has joined #ruby
<zenspider>
arcapella: baby steps
<apeiros>
I usually do: TWO = 2 # 1 + 1
nobitanobi has quit []
<zenspider>
have a goal on the horizon, but take it slow
djbkd has quit [Remote host closed the connection]
<zenspider>
otherwise you'll overwhelm yourself
nobitanobi has joined #ruby
<apeiros>
or in a more practical example: SECONDS_PER_DAY = 86400 # 60 * 60 * 24 (secs * mins * hours)
phutchins has quit [Ping timeout: 272 seconds]
<apeiros>
wait… since when do I use SCREAM_CASE?
<arcapella>
well, it's going to be a program where you input the date you start your project on and then it'll tell you the projected date of completion based on the number of hours required to work and hours worked
djbkd has joined #ruby
<arcapella>
do you think that's a bit too hard for a beginner?
Martxel has quit [Quit: .]
<zenspider>
apeiros: we're talking about constants...
boombadaroomba has quit [Ping timeout: 256 seconds]
<csmrfx>
# Orbit eccentricity: # sine wave period of 365 d, modulating day length by 0..-7,66m..0..+7,66 minutes # Orbit obliquity: # sine wave period of 182.5 d, modulates day length by 0..-9,87..0..+9,87 minutes
<zenspider>
arcapella: no, that seems fine
last_staff has quit [Quit: last_staff]
<zenspider>
csmrfx: you're fired
<apeiros>
zenspider: I never use SCREAM_CASE for constants. I write SecondsPerDay = …
<arcapella>
i'm going to get started, but i feel like the challenge is trying to account for leap years
vyrus001 has quit [Ping timeout: 244 seconds]
<zenspider>
unless you're launching shit into space or something
<csmrfx>
thats from my planetary sim orbit sim class
<zenspider>
arcapella: if your project is that long, you're going to be wrong about the amount of effort anyhow
<csmrfx>
so insolance can be calculated
<zenspider>
how rude?
wallerdev has quit [Quit: wallerdev]
<csmrfx>
ehhh, insolation
wallerdev has joined #ruby
dermothaughey has joined #ruby
volty has joined #ruby
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<csmrfx>
B]
Fire-Dragon-DoL has quit [Quit: Leaving.]
djbkd has quit [Remote host closed the connection]
dermothaughey has quit [Remote host closed the connection]
<rubie>
hi all: im trying to build a rock paper scissors game, i'm having trouble trying to figure out how to implement a while loop to keep the game going, can someone take a look? https://gist.github.com/gabrie30/b9bda82ee0bb10ed056b
<skullz>
I'm trying to figure out a way to use uniq on an array of hashes that would return that with the lower price, say: [ { meta_id: 1, price: 5}, { meta_id: 1, price 2}, { meta_id: 2, price: 10}] would return [{ meta_id: 1, price: 2}, { meta_id: 2, price: 10}]
stantona has joined #ruby
<skullz>
Is that possible?
tadayoshi has quit []
linojon has quit [Quit: linojon]
mary5030 has quit [Remote host closed the connection]
toretore has quit [Quit: This computer has gone to sleep]
paulfm has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
ghormoon has quit [Ping timeout: 255 seconds]
<havenwood>
or flat_map(&:min)
<iago-x86>
Hey, quick question.. if I have a string like "/:a/:b" and I want to replace the named placeholders based on a hash, like {:a => 'a', :b => b, ...} - is there a built-in way to make that easier, or do I need to write my own?
jottr_ has quit [Read error: Connection reset by peer]
<havenwood>
i always overlook flat map then see it when i look again. it's one of those things that's in hindsight.