Rodya_ has quit [Remote host closed the connection]
ghr has joined #ruby
Rodya_ has joined #ruby
Macaveli has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
flashpoint9 has joined #ruby
DTZUZU has joined #ruby
ur5us has quit [Remote host closed the connection]
Ropeney has joined #ruby
raeoks has joined #ruby
flashpoint9 has quit [Ping timeout: 258 seconds]
deecross has joined #ruby
lkb_ has quit [Quit: Wychodzi]
lkb has joined #ruby
ReK2GnULinuX has joined #ruby
ReK2GnULinuX has quit [Changing host]
ReK2GnULinuX has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
ReK2 has quit [Ping timeout: 276 seconds]
DTZUZU has quit [Ping timeout: 276 seconds]
hahuang61 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
LoneHerm_ has joined #ruby
isberg has quit [Ping timeout: 272 seconds]
ghr has quit [Ping timeout: 240 seconds]
lessless has joined #ruby
wigust has joined #ruby
jaguarmagenta has joined #ruby
ghr has joined #ruby
Mrgoose has joined #ruby
_mak has joined #ruby
max1 has quit [Ping timeout: 246 seconds]
ghr has quit [Ping timeout: 240 seconds]
abonec has joined #ruby
TeaVirus has joined #ruby
alfiemax has joined #ruby
xue has quit [Ping timeout: 276 seconds]
happyface has quit [Quit: Connection closed for inactivity]
ghr has joined #ruby
astrobunny has joined #ruby
zacstewart has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
atom___ has quit [Quit: WeeChat 1.5]
zacstewart has quit [Ping timeout: 272 seconds]
AndrewIsHere has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Bugboy1028 has joined #ruby
ur5us has joined #ruby
xue has joined #ruby
dminuoso has joined #ruby
The_Phoenix has joined #ruby
jiblet has quit [Ping timeout: 250 seconds]
watersoul_ has quit [Remote host closed the connection]
watersoul has joined #ruby
jiblet has joined #ruby
ghr has joined #ruby
dionysus69 has joined #ruby
AndrewIsHere has quit [Ping timeout: 250 seconds]
Bugboy1028 has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
zacts has quit [Ping timeout: 272 seconds]
hahuang61 has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
z3ndrag0n has quit [Remote host closed the connection]
Bugboy1028 has joined #ruby
hipertracker has joined #ruby
yfeldblum has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
z3ndrag0n has joined #ruby
yfeldblum has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
alfiemax has quit [Ping timeout: 252 seconds]
Bugboy1028 has quit [Remote host closed the connection]
kareeoleez has joined #ruby
deecross has quit [Remote host closed the connection]
ghr has joined #ruby
amclain has quit [Quit: Leaving]
alfiemax has joined #ruby
klaas has quit [Remote host closed the connection]
lessless has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
Bugboy1028 has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
TeaVirus has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 252 seconds]
Rodya_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
zacts has joined #ruby
zacts has quit [Client Quit]
ghr has joined #ruby
flughafen_ has joined #ruby
interki has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Pixi_ has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
colegatron has quit [Ping timeout: 272 seconds]
DTZUZU has joined #ruby
hays_ has quit [Ping timeout: 250 seconds]
Xiti` has quit [Ping timeout: 260 seconds]
digneety has joined #ruby
nankyokusei has joined #ruby
moei has quit [Read error: Connection reset by peer]
Rainbow-Sapphire has quit [Ping timeout: 252 seconds]
dminuoso has quit [Ping timeout: 258 seconds]
moei has joined #ruby
Ponyo has joined #ruby
DTZUZU has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
blackgoat has quit [Quit: WeeChat 1.5]
hays has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
postapocallyptic has quit [Ping timeout: 246 seconds]
burgestrand has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
Rainbow-Sapphire has joined #ruby
dminuoso has joined #ruby
atom_ has quit [Ping timeout: 258 seconds]
firstdayonthejob has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
colegatron has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
aganov has joined #ruby
codecop has joined #ruby
conta has joined #ruby
the_drow has joined #ruby
calmchaos has joined #ruby
calmchaos has quit [Remote host closed the connection]
ghr has joined #ruby
calmchaos has joined #ruby
minimalism has quit [Quit: minimalism]
alfiemax has joined #ruby
atom_ has joined #ruby
vuoto has joined #ruby
firstdayonthejob has quit [Ping timeout: 276 seconds]
calmchaos has quit [Ping timeout: 276 seconds]
flughafen_ has quit [Ping timeout: 264 seconds]
ghr has quit [Ping timeout: 240 seconds]
zacstewart has joined #ruby
mark_66 has joined #ruby
blaxter has joined #ruby
roamingdog has quit [Remote host closed the connection]
ferr has joined #ruby
TomyWork has joined #ruby
burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
the_drow has quit [Quit: This computer has gone to sleep]
vdamewood has quit [Quit: Life beckons.]
neanderslob has quit [Ping timeout: 258 seconds]
zacstewart has quit [Ping timeout: 276 seconds]
Pupeno has joined #ruby
neanderslob has joined #ruby
dminuoso has quit [Remote host closed the connection]
ghr has joined #ruby
agit0 has joined #ruby
ta__ has joined #ruby
ta_ has quit [Ping timeout: 272 seconds]
ghr has quit [Ping timeout: 240 seconds]
skade has joined #ruby
Pupeno has quit [Ping timeout: 272 seconds]
MrBusiness2 has quit [Quit: Leaving]
skade has quit [Client Quit]
Xeago_ has joined #ruby
dminuoso has joined #ruby
anisha has joined #ruby
pawnbox has quit [Remote host closed the connection]
Hyuk has joined #ruby
pawnbox has joined #ruby
blackmesa has joined #ruby
ghr has joined #ruby
Xeago_ has quit [Ping timeout: 246 seconds]
neo_ has quit [Remote host closed the connection]
MrBusiness has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andikr has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
aufi has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
musou has quit [Quit: Connection closed for inactivity]
max1 has joined #ruby
Amnez777 has quit [Ping timeout: 276 seconds]
tvw has joined #ruby
postmodern has quit [Quit: Leaving]
Amnez777 has joined #ruby
samuelkadolph has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
chipotle has joined #ruby
ghr has joined #ruby
deecross has joined #ruby
Pupeno has joined #ruby
LoneHermit has joined #ruby
aryaching has quit [Remote host closed the connection]
daumie has joined #ruby
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
mattwashere has quit [Remote host closed the connection]
samuelkadolph has joined #ruby
pawnbox has quit [Remote host closed the connection]
ur5us has joined #ruby
Gooer has joined #ruby
pawnbox has joined #ruby
daumie has quit [Client Quit]
Rodya_ has quit [Remote host closed the connection]
LoneHermit has quit [Ping timeout: 240 seconds]
daumie has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Xeago_ has joined #ruby
daumie has quit [Client Quit]
hipertracker has quit [Quit: hipertracker]
daumie has joined #ruby
DTZUZU has joined #ruby
rkazak has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
DoubleMalt has joined #ruby
daumie has quit [Client Quit]
daumie has joined #ruby
blaxter has quit [Quit: foo]
Dimik has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
DTZUZU has quit [Ping timeout: 252 seconds]
aryaching has joined #ruby
ghr has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Mrgoose has quit [Ping timeout: 258 seconds]
TheWhip has quit [Remote host closed the connection]
aries_liuxueyang has quit [Ping timeout: 244 seconds]
aries_liuxueyang has joined #ruby
aryaching has quit [Remote host closed the connection]
antgel has joined #ruby
saneax_AFK is now known as saneax
ghr has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
aswen has joined #ruby
aswen has quit [Client Quit]
gwokamollaye has joined #ruby
jaruga___ has joined #ruby
ghr has joined #ruby
ddffg has joined #ruby
TheWhip has joined #ruby
Es0teric has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Es0teric has quit [Client Quit]
karapetyan has joined #ruby
Xeago_ has joined #ruby
akira616 has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
Pixi_ has quit [Ping timeout: 250 seconds]
zacstewart has joined #ruby
elaptics`away is now known as elaptics
multi_io has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
ghr has quit [Excess Flood]
ghr has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Read error: Connection reset by peer]
multi_io has joined #ruby
dionysus69 has joined #ruby
zacstewart has quit [Ping timeout: 240 seconds]
afei has joined #ruby
afei has quit [Client Quit]
Spami has joined #ruby
Oclair has quit [Quit: Bye Bye]
hahuang61 has joined #ruby
ta_ has joined #ruby
daumie has quit [Quit: Am hungry]
daumie has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta__ has quit [Ping timeout: 272 seconds]
blackmesa has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
igam has joined #ruby
Pumukel has joined #ruby
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
burgestrand has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
jaruga____ has joined #ruby
hipertracker has joined #ruby
jaruga___ has quit [Ping timeout: 258 seconds]
max1 has quit [Quit: WeeChat 1.4]
Spami has quit [Quit: This computer has gone to sleep]
max1 has joined #ruby
max1 is now known as pickandmix
RegulationD has joined #ruby
the_drow has joined #ruby
Ropeney has joined #ruby
Xeago_ has quit [Read error: Connection reset by peer]
Ropeney has quit [Client Quit]
RegulationD has quit [Ping timeout: 260 seconds]
LoneHermit has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Remote host closed the connection]
cfillion_ has quit [Ping timeout: 250 seconds]
joonty has joined #ruby
cfillion has joined #ruby
LoneHermit has quit [Ping timeout: 246 seconds]
yeticry has joined #ruby
DTZUZU has joined #ruby
djbkd has quit []
tomphp has joined #ruby
nankyokusei has joined #ruby
jaruga____ has quit [Remote host closed the connection]
jaruga____ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
ta__ has joined #ruby
DTZUZU has quit [Ping timeout: 264 seconds]
schickung has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
ta_ has quit [Ping timeout: 272 seconds]
ngw_ has joined #ruby
marr has joined #ruby
CloCkWeRX1 has joined #ruby
CloCkWeRX has quit [Read error: Connection reset by peer]
igam` has joined #ruby
shinnya has joined #ruby
igam has quit [Read error: No route to host]
pandaant has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
blackmesa has joined #ruby
rkazak has joined #ruby
torandu has quit [Ping timeout: 276 seconds]
senayar has joined #ruby
xue has quit [Quit: Leaving]
Dimik has quit [Ping timeout: 258 seconds]
karapetyan has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
Xeago_ has joined #ruby
ngw_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xue has joined #ruby
zacstewart has joined #ruby
schickung has quit [Read error: Connection reset by peer]
zacstewart has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
phredus has quit [Read error: No route to host]
phredus has joined #ruby
mnghqf has joined #ruby
Pupeno has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 240 seconds]
ta__ has quit [Ping timeout: 244 seconds]
karapetyan has joined #ruby
TheWhip has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Pupeno has joined #ruby
TheWhip has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
schickung has joined #ruby
vdamewood has joined #ruby
troulouliou_div2 has joined #ruby
mistermocha has joined #ruby
Pupeno has quit [Ping timeout: 258 seconds]
kareeoleez has joined #ruby
yardenbar has joined #ruby
sysmonk has joined #ruby
sysmonk has left #ruby [#ruby]
Xeago_ has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
kareeole_ has joined #ruby
kareeoleez has quit [Ping timeout: 246 seconds]
sasha2sasha has joined #ruby
<sasha2sasha>
Hi. Noob question: a = Hash.new; a["one"] = "test"; a["two"] = a["one"]; a["two"].gsub!(/test/, "XXX"); <- somehow this substitutes both a["one"] and a["two"]
<sasha2sasha>
why is that, and how do i only gsub! on a["two"] ?
aufi has quit [Quit: Odcházím]
aufi has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has joined #ruby
vuoto has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 272 seconds]
vuoto has joined #ruby
<tobiasvl>
a["two"] = a["one"].dup
pawnbox has quit [Remote host closed the connection]
<sasha2sasha>
oh, so = a["one"] passes the var as a reference?
ur5us has quit [Remote host closed the connection]
kareeoleez has joined #ruby
pawnbox has joined #ruby
TheWhip has quit [Remote host closed the connection]
ur5us has joined #ruby
<igam`>
alternatively: a["two"]=a["two"].gsub(/test/, "XXX") # no !
c355e3b has joined #ruby
Pumukel has joined #ruby
jrabe has quit [Ping timeout: 276 seconds]
schickung has quit [Read error: Connection reset by peer]
bruce_lee has joined #ruby
flashpoint9 has joined #ruby
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kareeole_ has quit [Ping timeout: 264 seconds]
pawnbox has quit [Remote host closed the connection]
<sasha2sasha>
igam`: yeah, i've got more gsub's later on so just making it nicer with comments for each gsub
<sasha2sasha>
thanks
bob_f has quit [Changing host]
bob_f has joined #ruby
pawnbox has joined #ruby
ur5us has quit [Ping timeout: 276 seconds]
jrabe has joined #ruby
kareeole_ has joined #ruby
kies has quit [Ping timeout: 252 seconds]
flashpoint9 has quit [Ping timeout: 250 seconds]
DTZUZU has joined #ruby
<jhass>
"comments"? sounds like you should use locals instead of a hash
conta has quit [Quit: conta]
<igam`>
Yes, if you have multiple operations, it may be worth using a local variables.
conta has joined #ruby
kareeoleez has quit [Ping timeout: 246 seconds]
Xeago_ has joined #ruby
kareeoleez has joined #ruby
pawnbox has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
ferr1 has joined #ruby
daumie has quit [Quit: WeeChat 1.4]
kareeole_ has quit [Ping timeout: 276 seconds]
DTZUZU has quit [Ping timeout: 258 seconds]
schickung has joined #ruby
pawnbox has joined #ruby
cd-rum_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheWhip has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
kareeole_ has joined #ruby
Xeago_ has joined #ruby
kedare has joined #ruby
postmodern has joined #ruby
kareeol__ has joined #ruby
kareeoleez has quit [Ping timeout: 264 seconds]
kies has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
kareeoleez has joined #ruby
kareeole_ has quit [Ping timeout: 276 seconds]
kareeole_ has joined #ruby
kareeol__ has quit [Ping timeout: 264 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
kareeol__ has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
daumie has joined #ruby
kareeoleez has quit [Ping timeout: 246 seconds]
bigkevmcd has joined #ruby
kareeol__ has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 272 seconds]
kareeole_ has quit [Ping timeout: 272 seconds]
karapetyan has quit [Remote host closed the connection]
schickung has quit [Read error: Connection reset by peer]
stephan_ has quit [Ping timeout: 264 seconds]
sasha2sasha has quit [Quit: Lost terminal]
ta__ has joined #ruby
Dry_Lips has joined #ruby
Dry_Lips has quit [Changing host]
Dry_Lips has joined #ruby
jgrevich has quit [Ping timeout: 252 seconds]
zacstewart has joined #ruby
daniel has joined #ruby
daniel is now known as sicn
duncannz has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
<sicn>
hi, wondering if any of you might know how I can dynamically add routes in Ruby on Rails based on a table in the database? My naive approach was to create a model and in routes.rb I simply did DynamicUrls.find_each do |urlToAdd| #... end, but that seems to make the application not start (and doesn't even make it possible to do a rake db:migrate)
<adaedra>
?rails sicn
<ruby[bot]>
sicn: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
Pupeno has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
<sicn>
oh sorry, didnt that channel was there, too ;)
<dminuoso>
sicn: Don't worry, it is just a friendly reminder. :)
<adaedra>
indeed
zacstewart has quit [Ping timeout: 272 seconds]
AndrewIsHere has quit [Ping timeout: 250 seconds]
hahuang61 has joined #ruby
Xeago_ has joined #ruby
jgrevich has joined #ruby
alfiemax has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
yardenbar has quit [Quit: Leaving]
ta_ has joined #ruby
jrabe has quit [Quit: Disconnected]
jrabe has joined #ruby
schickung has joined #ruby
charliesome has joined #ruby
nettoweb has joined #ruby
ta__ has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
MrBusiness has quit [Read error: Connection reset by peer]
mkosaki has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
dorenkampm has joined #ruby
RegulationD has joined #ruby
Xeago_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
<dorenkampm>
hi guys, a question.. when having a multiline variable with << operator , how can i concatenate or insert variables into that?
bigkevmcd has quit [Quit: Outta here...]
<tobiasvl>
dorenkampm: you can interpolate like usual
binaryplease1 has quit [Ping timeout: 244 seconds]
nettoweb has quit [Ping timeout: 276 seconds]
ta_ has quit [Ping timeout: 244 seconds]
terminalrecluse has joined #ruby
LoneHermit has quit [Ping timeout: 258 seconds]
jaguarmagenta has quit [Ping timeout: 258 seconds]
<tobiasvl>
probably heredox
<tobiasvl>
c
nankyokusei has joined #ruby
DTZUZU has joined #ruby
burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gregf_>
ah - ok
burgestrand has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
terminalrecluse has quit [Ping timeout: 252 seconds]
Hyuk has joined #ruby
workmad3 has joined #ruby
mistermocha has joined #ruby
Hyuk has quit [Max SendQ exceeded]
nankyokusei has quit [Ping timeout: 246 seconds]
DTZUZU has quit [Ping timeout: 246 seconds]
daumie has joined #ruby
arup_r has joined #ruby
burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
basex has joined #ruby
<arup_r>
Hi, I am getting such a big number as a auth_token https://gist.github.com/aruprakshit/c621bee979d075b4cc75b783f8363f48, and then I send them to user with url and and then user use that url and I validate the authtoken in my end. cool. But can I do apply some encode/decode to the authtoken to reduce it? What should I used in Ruby for that?
<workmad3>
arup_r: you could consider using a base64 string instead of a hex string... by increasing your character space by 4, you can reduce the string representation by a similar amount and maintain the same amount of entropy in the underlying information
<arup_r>
jhass: it is not 2 lines, it is so long that splittd into two line in gist
<arup_r>
I just want to reduce the size of that big auth token
burgestrand has quit [Client Quit]
<workmad3>
arup_r: out of curiosity, how are you generating the token currently?
<workmad3>
arup_r: also, with an automatic redirect cycle, does it really matter what size the token is?
giz|work has joined #ruby
<arup_r>
not me the gem sorcery is doing it for me
jenrzzz has quit [Ping timeout: 246 seconds]
<arup_r>
workmad3: yes people use outlook, and sharing such big url is troublesome. I was discussing it in #rails, but they said newer version outlook is fine for such big url. But I got to know it is not possible for clients to upgrade the outlook. We have to take care of it
schickung has quit [Quit: schickung]
jenrzzz has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
<arup_r>
so I am thinking if I can reduce the size of auth token by using ruby with such encoding/decoding mechanism
<workmad3>
arup_r: ah, ok... as long as you don't actually weaken security then fair enough
The_Phoenix has quit [Quit: Leaving.]
<workmad3>
arup_r: you could also consider the standard trick of producing an HTML email that says "Copy this link into your browser <url> or click <a href="...">here</a>"
<arup_r>
workmad3: we have a button and text filed. I click button and then the link comes in the text filed and I copy the url and paste in the email and send it. And outlook is borken sometimes for long url
<workmad3>
that sounds like a horrible way to be sending authentication-related data to users :/
<arup_r>
workmad3: hm. But how would you suggest to implement this? any standard idea?
jenrzzz has quit [Ping timeout: 276 seconds]
<workmad3>
arup_r: for starters, I'd suggest having the email automated so that you never see the url (and also never let it leak into the memory of your local workstation)
<workmad3>
arup_r: that would also give you more options around HTML emails as suggested
CamonZ has joined #ruby
<workmad3>
(as you're not reliant on manually setting up an email template)
freerobby has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
mistermocha has quit [Remote host closed the connection]
zacstewart has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
toretore has joined #ruby
GodFather has joined #ruby
<arup_r>
hm. thanks let me think
johnmilton has joined #ruby
johnmilton has quit [Remote host closed the connection]
deecross has quit [Remote host closed the connection]
johnmilton has joined #ruby
deecross has joined #ruby
conta1 has joined #ruby
conta has quit [Ping timeout: 260 seconds]
conta1 is now known as conta
<arup_r>
workmad3: other things is with that URL in hand, client copy the link and put the emails in the TO list to share. With Rails, I need to know those all TO or user has to put it right there. many things I need to think about now
chip_ has quit [Remote host closed the connection]
sebstrax has quit [Quit: Connection closed for inactivity]
zacstewart has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
Wildfyr has joined #ruby
jrabe has left #ruby [#ruby]
jrabe has joined #ruby
<Wildfyr>
How to get file name of the script running
<Wildfyr>
In python it is sys.argv[0], in ruby it doesn't seem like that help
<arup_r>
try $0
<al2o3-cr>
Wildfyr: $0 or __FILE__ or ENV['_']
Coldblackice has quit [Ping timeout: 276 seconds]
<Wildfyr>
al2o3-cr: thanks
<arup_r>
hmm ^
<Wildfyr>
arup_r: that work as well
<Wildfyr>
thanks
jrabe has quit [Max SendQ exceeded]
deecross has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
deecross has joined #ruby
maloik has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
maloik has joined #ruby
ta__ has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r>
so it is not possible to encde long strings to small size and then decode back to the original one when needed? if that is possible my path is easy. :)
ta_ has joined #ruby
hipertracker has quit [Quit: hipertracker]
<arup_r>
hmm, after some digging I find I am generating this authtoken so big it is SecureRandom.hex(127) .. What is small limit which still produces uniq values?
Vingador has joined #ruby
Gooer has quit [Quit: Gooer]
Xeago_ has joined #ruby
<jhass>
in theory not even this guarantees unqiue values
<workmad3>
arup_r: first, try using `SecureRandom.base64` instead... that should produce a character representation that's about half the size
<jhass>
just in practice
<workmad3>
and yeah, you have nothing more than statistical assurances on uniqueness
<workmad3>
arup_r: you could easily add `.tr("+/", "-_")` the result to perform the same transformation as the urlsafe_base64 method
<arup_r>
oh I see
<arup_r>
thanks
<workmad3>
and you don't even need to undo that transformation if it's stored in the database like that
<arup_r>
got your point
Xeago_ has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
LoneHermit has joined #ruby
<workmad3>
arup_r: you could probably use quite a bit less than 127 for that value though... `SecureRandom.hex(127)` will produce 127 random bytes and then base64 encode them... that would result in nearly 1024 bits of randomness and a pretty low collision rate... in fact, you could probably just do `SecureRandom.uuid` instead and slap that in the URL for a shorter unique string
Xeago_ has joined #ruby
<workmad3>
err... `SecureRandom.base64(127)` even (not SecureRandom.hex(127))
charliesome has joined #ruby
<dminuoso>
postmodern: Are you around?
burgestrand has joined #ruby
LoneHermit has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
DTZUZU has joined #ruby
jrabe has joined #ruby
codecop has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
sicn has quit []
ldnunes has joined #ruby
DTZUZU has quit [Ping timeout: 276 seconds]
hanmac has quit [Ping timeout: 272 seconds]
allcentury has joined #ruby
anisha_ has joined #ruby
schickung has joined #ruby
schickung has quit [Client Quit]
flashpoint9 has joined #ruby
Xeago_ has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eljimmy has quit [Quit: This computer has gone to sleep]
pawnbox has quit [Remote host closed the connection]
`tim` has joined #ruby
Xeago_ has joined #ruby
codecop has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
Xeago_ has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
ta_ has quit [Remote host closed the connection]
nando293921 has quit [Ping timeout: 250 seconds]
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JakFrist has joined #ruby
ta_ has joined #ruby
ev__ has joined #ruby
macsteps has quit [Remote host closed the connection]
harfangk has quit [Quit: harfangk]
pawnbox has joined #ruby
dennisvennink has joined #ruby
chip_ has joined #ruby
swills has joined #ruby
karapetyan has joined #ruby
flashpoint9 has joined #ruby
iamvery has joined #ruby
SilverKey has joined #ruby
<jokke>
heya
gregf has quit [Ping timeout: 264 seconds]
<jokke>
i'm looking for a simple easy to use rubygem mirror that allows pushing private gems
<jokke>
gemirro supports private gems only when manually added into gems directory
quakephil has joined #ruby
<jokke>
at least it looks like it
<quakephil>
Rails/ar question... I have a model called group (can't change the name) with a relationship to user, and I'm trying to do user.group.select.etc but its failling on the .group part with"The method .group() must contain arguments"
<jokke>
quakephil: join #RubyOnRails
blackmesa has joined #ruby
giz|work has quit [Ping timeout: 252 seconds]
Azure|dc has joined #ruby
Azure has quit [Read error: Connection reset by peer]
chip_ has quit [Ping timeout: 240 seconds]
tvw has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 252 seconds]
harfangk has joined #ruby
dopamean_ has quit [Ping timeout: 276 seconds]
craigp has quit [Ping timeout: 258 seconds]
SilverKey has quit [Quit: Halted.]
karapetyan has quit [Remote host closed the connection]
hahuang61 has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
eljimmy has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
Spami has joined #ruby
UnKnOwN| has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
iamvery has quit [Quit: ZNC - 1.6.0 - http://znc.in]
nankyokusei has joined #ruby
snath has quit [Ping timeout: 264 seconds]
<burgestrand>
Bish I don't know if you got a response, but `rspec` is the popular one, http://rspec.info
camilasan has quit [Remote host closed the connection]
dionysus69 has joined #ruby
Xeago_ has quit [Remote host closed the connection]
burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
<dminuoso>
jokke: What you are looking for is called a private git repository.
camilasan has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
jrafanie has joined #ruby
<dminuoso>
bumao: And minitest is arguably just as popular.
Xeago_ has joined #ruby
isberg has joined #ruby
nankyokusei has quit [Remote host closed the connection]
hutch34_ has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
dopamean_ has joined #ruby
sdothum has joined #ruby
rbennacer has joined #ruby
<jokke>
dminuoso: no?
<dminuoso>
jokke: How so?
<jokke>
dminuoso: gemspec doesn't allow git repos as deps
<jokke>
Gemfile does
<dminuoso>
Ah.
<dminuoso>
Fair point.
<jokke>
but then the gem doesn't know its deps
<jokke>
dminuoso: but you're right. it works one level deep :)
<dminuoso>
jokke: what about running your own gem server?
<dminuoso>
:-)
<jokke>
yeah
<jokke>
that's what i was thinking
<jokke>
gem in a box
<jokke>
also has rubygems mirroring functionality
<jokke>
or proxy
<dminuoso>
jokke: Though so far I have managed to set up all my interdependency with Gemfile just fine. :p
anisha_ has quit [Quit: Leaving]
RegulationD has joined #ruby
<jokke>
yeah most of the time it works
<dminuoso>
Using just git simplifies things since I don't also need to worry about some gem server.
<jokke>
sure
djwnoh has joined #ruby
<jokke>
but as soon as you want to write a gem that should be installable with gem install it's annoying
<jokke>
(if it has private deps)
bluOxigen has joined #ruby
<dminuoso>
jokke: Oh yeah, everything here just works with Bundler. :)
<dminuoso>
So I guess I don't have that need.
hck89 has joined #ruby
<jokke>
as a matter of fact i'd much more appreciate rubygems allowing git deps
<dminuoso>
jokke: Im guessing you won't get around running your own gem server.
<dminuoso>
I agree.
<jokke>
yeah
<dminuoso>
jokke: Though actually I remember quite a lot of valid points why that makes no sense.
<dminuoso>
Well, I remember them being made, not the actual points.
<jokke>
dminuoso: well as long as you use tags there's no real downside
* dminuoso
thinks adaedra might have been the person
hck89 has quit [Max SendQ exceeded]
<adaedra>
what is it?
<jokke>
i mean sure, it makes no sense to have a gem with a specific version which has git deps that are pulled from master
codecop has quit [Remote host closed the connection]
<dminuoso>
adaedra: A few weeks ago, didn't you make a strong case why git dependencies in gemspecs don't make much sense?
<adaedra>
No, but I agree
UserInNeed has quit [Ping timeout: 258 seconds]
<dminuoso>
jokke: well, using tags/release branches would give you that control indeed.
<jokke>
adaedra: even with version tags?
<dminuoso>
jokke: THe first issue is that tags are just tags.
RegulationD has quit [Ping timeout: 240 seconds]
<jokke>
yeah sure
<jokke>
crystal for example has git deps only
* dminuoso
pokes jhill
<dminuoso>
jhass!
<jokke>
:)
<dminuoso>
Why does my tab completion no longer works as expected...
bkxd has quit [Ping timeout: 260 seconds]
<adaedra>
git repos are development versions, I'd say.
<jokke>
adaedra: umm
<jokke>
no?
<dminuoso>
adaedra: If you had a release branch, that semantic was different.
<dminuoso>
Or you can tag your releases, and your git dependency would specify a repository and a tag.
jaguarmagenta has joined #ruby
<dminuoso>
jokke: the issue is that git does not allow for proper numeric versioning, so you couldn't sensibly say >= 1.1
<adaedra>
but what would you gain from using git repos as opposed to the released gems?
<dminuoso>
adaedra: Not having to run your own gem server if you want to host some gems.
<dminuoso>
You could simply just use your own git server directly.
<adaedra>
Yeah, so you still need to setup something
<jokke>
imho master should be a bleeding edge but stable branch. Everything that might break stuff should be in a separate dev branch. Master should be protected and only be modified via pull requests. But i don't even follow that practice myself all the time so...
karapetyan has joined #ruby
<dminuoso>
adaedra: Well we have a git server for all our code anyway.
snath has joined #ruby
<adaedra>
Good for you
<dminuoso>
Whats your point?
<jokke>
everybody has
<adaedra>
I don't.
symm- has quit [Ping timeout: 258 seconds]
<dminuoso>
Is that jealousy talking? :-P
UserInNeed has joined #ruby
<adaedra>
Absolutely not; I have no interest in having one.
ta_ has quit [Remote host closed the connection]
<jokke>
adaedra: so you _only_ work on foss?
digneety has quit [Quit: digneety]
<jokke>
good for you :)
jaguarmagenta has quit [Ping timeout: 240 seconds]
stoopidmunkey has joined #ruby
raeoks has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
TheWhip has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm- has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
dminuoso has quit [Ping timeout: 240 seconds]
TomyWork has quit [Ping timeout: 276 seconds]
synthroi_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
Devalo has joined #ruby
daumie has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
daumie has joined #ruby
synthroid has quit [Ping timeout: 260 seconds]
ghr has joined #ruby
ghr has quit [Excess Flood]
blackmesa has joined #ruby
ghr has joined #ruby
ghr has quit [Client Quit]
smathy has joined #ruby
ev__ has quit [Quit: (null)]
ruby[bot] has joined #ruby
mdw has joined #ruby
nadir has joined #ruby
dminuoso has joined #ruby
wigust has quit [Read error: Connection reset by peer]
rippa has joined #ruby
synthroid has joined #ruby
treaki has joined #ruby
alfiemax has joined #ruby
kareeoleez has quit [Remote host closed the connection]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has quit [Ping timeout: 246 seconds]
ekinmur has joined #ruby
synthroi_ has quit [Ping timeout: 272 seconds]
Rodya__ has quit [Remote host closed the connection]
hogetaro has joined #ruby
SilverKey has joined #ruby
d10n-work has joined #ruby
zacts has joined #ruby
SilverKey has quit [Client Quit]
hutch34_ has joined #ruby
<dionysus69>
syntax error, unexpected '='
<dionysus69>
for =begin =end , in rb file
<dionysus69>
why is this??
<adaedra>
because this is not valid
SilverKey has joined #ruby
neo has joined #ruby
<adaedra>
if, according to what you said in #RoR, you want to use multi-line comments with =begin and =end, be advised that they can't be idented
<adaedra>
indented*
<Bish>
dionysus69: have you in..
<Bish>
^
neo is now known as Guest24895
<Bish>
was about to google how indented is spelled
blackmesa has quit [Ping timeout: 260 seconds]
grn has quit [Remote host closed the connection]
<adaedra>
But you could also do just as well with classical # comments (all editors should know how to quickly add/remove them for a block)
* Bish
checks if ed does that
pld has joined #ruby
pld has quit [Changing host]
pld has joined #ruby
pld has quit [Changing host]
pld has joined #ruby
* adaedra
press q while Bish is in ed
aegis3121 has quit [Ping timeout: 260 seconds]
gizmore has joined #ruby
<adaedra>
Bish: something somthing s/^/# /
nankyoku_ has joined #ruby
<dionysus69>
ok thanks I figured they need to start at the beginning of line, thats very not rubylike behavior lol
dopamean_ has quit [Quit: WeeChat 1.3]
elaptics is now known as elaptics`away
dopamean_ has joined #ruby
<adaedra>
tbf, =begin and =end are not really used a lot, iirc.
<Bish>
yeah, because it sucks, for the very reasons he just found out
<smathy>
s/not really used/hated/
<Bish>
but they wouldn't be very pretty either
agit0 has joined #ruby
<Bish>
i use them for temporarely out-comment something, but i have fallen into the same trap already
Guest24895 has quit [Ping timeout: 244 seconds]
ferr1 has quit [Quit: WeeChat 1.5]
aegis3121 has joined #ruby
ferr has quit [Quit: WeeChat 1.5]
conta has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
<smathy>
I just delete into an editor buffer for temporarily commenting something out, or just insert #s. The `=begin|end` stuff serious is like Matz had just deployed v1.0 of Ruby and someone said "What about multiline comments?" and he was like "Oh fuck..." => v1.0.1
<smathy>
*seriously
nisstyre has quit [Read error: Connection reset by peer]
mattwashere has joined #ruby
dminuoso has quit [Remote host closed the connection]
mrodrigues has joined #ruby
<adaedra>
you can also use a if false ... end if you want to comment things :p
the_drow has quit [Quit: This computer has gone to sleep]
cb has quit [Read error: Connection reset by peer]
rkazak has joined #ruby
<baweaver>
or just, you know, not leave in dead code
cb has joined #ruby
aganov has quit [Remote host closed the connection]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
but that wouldn't be dirty!
benlieb has joined #ruby
LoneHerm_ has joined #ruby
isberg has quit [Read error: Connection reset by peer]
aegis3121 has quit [Ping timeout: 250 seconds]
pandaant has quit [Remote host closed the connection]
JakFrist has joined #ruby
Devalo has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
saneax is now known as saneax_AFK
karapetyan has joined #ruby
SilverKey has quit [Quit: Halted.]
daumie has quit [Quit: WeeChat 1.4]
aegis3121 has joined #ruby
daumie has joined #ruby
gregf has joined #ruby
minimalism has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
jaruga____ has quit [Remote host closed the connection]
kareeoleez has joined #ruby
Dimik has joined #ruby
SilverKey has joined #ruby
kareeole_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
rodfersou is now known as rodfersou|lunch
karapetyan has joined #ruby
mattwashere has quit [Remote host closed the connection]
ghr has joined #ruby
AndrewIsHere has joined #ruby
kareeoleez has quit [Ping timeout: 272 seconds]
mattwashere has joined #ruby
kareeole_ has quit [Ping timeout: 264 seconds]
the_drow has joined #ruby
karapetyan has quit [Remote host closed the connection]
xaxisx has joined #ruby
macsteps has joined #ruby
Pumukel has quit [Ping timeout: 272 seconds]
kareeoleez has joined #ruby
flashpoint9 has joined #ruby
stephan_ has joined #ruby
xaxisx_ has joined #ruby
jaruga___ has joined #ruby
deviation has joined #ruby
allcentury has quit [Ping timeout: 244 seconds]
xaxisx has quit [Ping timeout: 250 seconds]
xaxisx_ is now known as xaxisx
mark_66 has quit [Quit: Leaving.]
atom_ has quit [Ping timeout: 252 seconds]
nankyoku_ has quit [Remote host closed the connection]
voker57_ is now known as voker57
voker57 has quit [Changing host]
voker57 has joined #ruby
flashpoint9 has quit [Ping timeout: 244 seconds]
Xeago_ has quit [Remote host closed the connection]
TomyLobo has joined #ruby
allcentury has joined #ruby
karapetyan has joined #ruby
yaewa has joined #ruby
mattwashere has quit [Remote host closed the connection]
Xeago_ has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
moei has quit [Ping timeout: 260 seconds]
mattwashere has joined #ruby
<mrodrigues>
Hey folks! I released recently a new authorization gem (https://github.com/mrodrigues/know_it_all) heavily inspired on Pundit (https://github.com/elabs/pundit), and I'm doing some research to understand how people usually enforce authorization. Do you use any kind of gem for authorization in your applications? If yes, which one? If not, do you follow any defined pattern?
GodFather has quit [Ping timeout: 246 seconds]
kareeoleez has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
giz|work has joined #ruby
Rodya_ has joined #ruby
grn has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdw has quit [Quit: Sleeping Zzzzz]
mistermocha has joined #ruby
deecross_ has quit [Remote host closed the connection]
* smathy
uses (and maintains) acl9
aryaching has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
* apeiros
uses a custom built solution (and more or less stick with it because not important enough to schedule time to switch to something better)
Devalo has joined #ruby
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
nankyokusei has joined #ruby
neo has joined #ruby
blackmesa has joined #ruby
neo is now known as Guest85909
LoneHerm_ has quit [Remote host closed the connection]
grn has quit [Ping timeout: 272 seconds]
andikr has quit [Remote host closed the connection]
aryaching has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 250 seconds]
Silthias has joined #ruby
Guest85909 has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 276 seconds]
isberg has joined #ruby
nankyoku_ has joined #ruby
<apeiros>
our needs were: enable switching users as defined by a hierarchy, i.e. a supervisor can switch to any subordinate. but when switching that way, they'd have read-only in most places. allow users to grant read/write to their own resources to another user. allow supporters to switch to any other user assuming all those users rights.
aryaching has joined #ruby
<apeiros>
all of which while recording the full user-switch chain for any create/update/destroy action
ekinmur has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
hahuang61 has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
<gizmore>
at work we had used cancan
hutch34_ has quit [Ping timeout: 240 seconds]
<gizmore>
in my own project(s) i used a simple group based auth scheme.... a groups gem totally seemed missing at some point
daumie has quit [Ping timeout: 244 seconds]
kareeole_ has joined #ruby
bogusdisk has joined #ruby
mattwashere has quit [Read error: Connection reset by peer]
mattwashere has joined #ruby
Xeago_ has quit [Remote host closed the connection]
kareeol__ has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
Spami has quit [Quit: This computer has gone to sleep]
amclain has joined #ruby
agent_white has joined #ruby
cdg has joined #ruby
kedare has quit [Quit: Leaving]
hutch34_ has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
<agent_white>
Mornin'
kareeoleez has quit [Ping timeout: 276 seconds]
whathappens has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aegis3121 has quit [Ping timeout: 240 seconds]
kareeole_ has quit [Ping timeout: 272 seconds]
AlexRussia has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
xaxisx has quit [Read error: Connection reset by peer]
[Butch] has joined #ruby
xaxisx has joined #ruby
chouhoulis has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jmarinelli has joined #ruby
djwnoh has quit [Remote host closed the connection]
teclator_ has joined #ruby
RegulationD has joined #ruby
wldcordeiro has quit [Ping timeout: 252 seconds]
daumie has joined #ruby
klaas has joined #ruby
rbennacer has quit [Remote host closed the connection]
karapetyan has joined #ruby
xaxisx has quit [Ping timeout: 260 seconds]
xaxisx has joined #ruby
Hobogrammer has quit [Quit: WeeChat 0.4.2]
huyderman_ has quit [Remote host closed the connection]
bogusdisk has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 276 seconds]
<A124>
How do I treat the suberror: #<MemCache::MemCacheError: Net::ReadTimeout>
aufi has quit [Ping timeout: 240 seconds]
<gizmore>
rinse and repeat
<gizmore>
i.e. try again?
<A124>
I mean... I got to rescue MemCache::MemCacheError, but what statement to compare the Net::ReadTimeout ?
jaguarmagenta has joined #ruby
spudowiar has joined #ruby
<agent_white>
What is the purpose of pre/appending/ skids to method/variable names? ie - "_foo"
<agent_white>
":thing_"
Wildfyr has joined #ruby
xaxisx has quit [Read error: Connection reset by peer]
<workmad3>
agent_white: prepending an underscore is sometimes done to indicate a method or variable is 'internal'
<apeiros>
IME _lvar is to indicate "not used"
<apeiros>
many tools which warn on unused variables will also ignore those
Devalo has quit [Remote host closed the connection]
BigRonnieRon has joined #ruby
skade has joined #ruby
<apeiros>
e.g.: some_hash.select { |_key, value| value > 3 }
Devalo has joined #ruby
<workmad3>
apeiros: ah, yeah that too... just `_` will also fit that purpose in a lot of ruby code
<workmad3>
`some_hash.select { |_, value| value > 4 }`
<apeiros>
yeah, I prefer having names for skipped variables, though
<apeiros>
and if I ignore all variables, I use a plain *
kareeol__ has quit [Ping timeout: 264 seconds]
<A124>
e.message I guess.
<apeiros>
e.g. def foo(*); super; additional_stuff_here; end
<agent_white>
workmad3 / apeiros: Ah I see! Thank you.
hutch34 has joined #ruby
hutch34_ has quit [Ping timeout: 240 seconds]
<apeiros>
(and yes, this will still pass on all arguments via super :D)
<workmad3>
depends on context for me :) something like a select block I'll probably just use `_`, but in a template method override I'll be more explicit as it's less self-documenting
haxrbyte has quit [Ping timeout: 264 seconds]
rodfersou|lunch is now known as rodfersou
<apeiros>
A124: sounds like the Net::ReadTimeout was the Exception#message
wldcordeiro has joined #ruby
jaguarmagenta has quit [Ping timeout: 246 seconds]
hipertracker has quit [Quit: hipertracker]
<A124>
Yeah, I just got holes in my memory, trying to mend them, thank you.
<apeiros>
A124: i.e. you rescue MemCache::MemCacheError, and then if you have to test against the message. I'd check the exceptions' included/extended modules and ancestry, though. might be they provide a better way.
xaxisx has joined #ruby
wsmoak has joined #ruby
SilverKey has quit [Quit: Halted.]
pawnbox has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
<A124>
apeiros No idea what is that or how do I find out, care to link or hint?
<apeiros>
and you check by: `exc.singleton_class.ancestors` + `exc.class.ancestors`
<Sashimi>
Hi all
<apeiros>
there you see by what you can directly resuce
<apeiros>
hi Sashimi
<apeiros>
be careful, you might accidentally get eaten!
<Sashimi>
I'm about to begin learning ruby
<Sashimi>
apeiros ▸ yeah i know i often get this :D
<Sashimi>
so i'm getting the tools up and running
<Sashimi>
i understood there are a number of enhanced text editors around to code ruby
<Sashimi>
i happen to already have sublime text (i'm on osx)
<wsmoak>
what does `require_paths` in the gemspec actually _do_? I don't know what "add to the $LOAD_PATH" (from the docs) means.
<A124>
apeiros Thanks, will take a look.
<apeiros>
Sashimi: sublime is pretty decent for ruby
<wsmoak>
I added a directory to `require_paths` and it _seemed_ like code under it was loaded, *without* writing `require 'path/to/file' anywhere. Is that possible?
digneety has joined #ruby
<AndrewIsHere>
Sashimi: Good luck! ST has some great packages for ruby as well.
<apeiros>
especially with the v-align and a git plugin
rbennacer has joined #ruby
senayar has quit []
<apeiros>
oh, and one for a couple of case-changes (snake_case to PascalCase etc.)
<Sashimi>
apeiros ▸ would you mind helping me out for the setup ? (i actually now nothing about sublime, i just happen to have it installed)
karapetyan has joined #ruby
<wsmoak>
apeiros: so if I did not 'require' it then there is no way it got loaded _just_ from adding its parent directory to 'require_paths', correct?
weaksauce has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
Sashimi: not much to do. get https://packagecontrol.io - all interesting plugins can get installed via that.
<wsmoak>
something else must have done it, because the code is working. (I overrode a class from another gem by placing a modified version under 'vendor' in _my_ gem. And the modified code seems to be what's running, even though I did not 'require' it.)
chip_ has joined #ruby
bjmllr has joined #ruby
<A124>
Either I am mad, or ternary operator is other way around. (condition) ? false : true.
Devalo has quit [Remote host closed the connection]
<apeiros>
wsmoak: when you use a gem, you do "require 'some/file/from/gem'"
DoubleMalt has quit [Remote host closed the connection]
<apeiros>
the 'some/file/from/gem' must be relative to one of the paths you added in require_paths
<apeiros>
which in turn is relative to the gem's root path
xaxisx has joined #ruby
<apeiros>
in general you should *not* specify it and follow standards. i.e. have all your requirable files in 'lib'
<apeiros>
that's the default value for require_paths
cschneid_ has joined #ruby
tomphp has quit [Ping timeout: 260 seconds]
<apeiros>
so `YOUR_GEM/lib/foo/bar.rb` is a file in your gem. once installed, you can require it via `require 'foo/bar'`
<apeiros>
no specification of require_paths necessary.
<wsmoak>
I am patching/modifying things from a public gem rather than maintaining a fork. in my gem, lib has my code, 'vendor' has modified versions of their code.
<wsmoak>
so both lib and vendor are in require_paths. still unclear how the modified version is getting loaded.
mistermocha has joined #ruby
<wsmoak>
LOAD_PATH is just where to _look_ for things that are required.
allcentury has quit [Ping timeout: 260 seconds]
<apeiros>
I don't see where you're still fuzzy on it then
grn has quit [Ping timeout: 250 seconds]
benlieb has quit [Quit: benlieb]
<wsmoak>
apeiros: I did not require my modified file, yet that's the code that is running.
<apeiros>
wsmoak: that explanation doesn't do it
<apeiros>
full example with paths, how you required it, and how you determined what got required and what you expected instead.
<wsmoak>
I wonder... since my modified file has the same path and name as the original one, perhaps the require statement in the _original_ gem is doing it, since... *insert handwaving about how ruby files actually get loaded*
<apeiros>
same relative path to load_paths means first one wins
<wsmoak>
(I know the modified code is running, or else the app would break. I tried it before adding the modified code to confirm this.)
<apeiros>
it's a rather bad idea to do it that way.
eljimmy has joined #ruby
<wsmoak>
first `require` statement wins (as I understand it) but LAST definition wins right? (when patching?)
karapetyan has quit [Remote host closed the connection]
<apeiros>
"first require" makes no sense since files are only loaded once
tomchapin has joined #ruby
<apeiros>
when you require, the file which is first found wins
bpatel has joined #ruby
<apeiros>
load_paths is an array. it's searched from first to last.
swills has quit [Ping timeout: 244 seconds]
digneety has quit [Quit: digneety]
<apeiros>
and you can't require a file shadowed by another file with the same relative path.
LoneHerm_ has joined #ruby
<apeiros>
anyway, until you answer my question, I'm done here.
Spami has joined #ruby
JakFrist has joined #ruby
pilne has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
iamvery has joined #ruby
bpatel has quit [Client Quit]
giz|work has quit [Ping timeout: 250 seconds]
burgestrand has joined #ruby
blackmesa has joined #ruby
yfeldblum has joined #ruby
<wsmoak>
ah, so nice to see irc hasn't changed much. :)
mtkd has quit [Ping timeout: 240 seconds]
<havenwood>
Sashimi: Atom is a free option if you're not feeling like learning vim or emacs at the moment: https://atom.io
xaxisx_ has joined #ruby
<wsmoak>
thanks for the links and info apeiros! I've worked through _some_ of my confusion re: how Ruby works, still translating things from Java Classpath.
kareeole_ has joined #ruby
<havenwood>
Sashimi: It's easy to get started with.
hahuang61 has joined #ruby
digneety has joined #ruby
freerobby has quit [Quit: Leaving.]
pwnd_nsfw has joined #ruby
LoneHerm_ has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
Vingador__ has joined #ruby
<apeiros>
wsmoak: well, if you don't like the strings attached to the free help you get, you can always get paid support.
kareeoleez has quit [Ping timeout: 264 seconds]
aegis3121 has joined #ruby
xaxisx_ has quit [Read error: Connection reset by peer]
<apeiros>
and I don't think "provide a proper description of your problem" is an outraging request.
freerobby has joined #ruby
xaxisx_ has joined #ruby
xaxisx has quit [Ping timeout: 276 seconds]
xaxisx_ is now known as xaxisx
karapetyan has joined #ruby
flughafen_ has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 276 seconds]
Pupeno has quit [Read error: Connection reset by peer]
<wsmoak>
when you are the expert it's very easy to say that. been there, done that, and now starting over as a beginner in ruby!
Vingador_ has quit [Ping timeout: 240 seconds]
The_Phoenix has quit [Quit: Leaving.]
<wsmoak>
a coworker solved the mystery of how the code is getting loaded. There's some code in ActiveMerchant that's doing it.
<apeiros>
wsmoak: so? is being a beginner an excuse now for not answering questions?
hahuang61 has quit [Ping timeout: 250 seconds]
<wsmoak>
thanks again for the pointers to the docs, I was 99% sure it should NOT have been working, yet it _was_.
xaxisx has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 272 seconds]
pdoherty has joined #ruby
xaxisx has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Remote host closed the connection]
freerobby has joined #ruby
harfangk has quit [Quit: harfangk]
`tim` has quit [Ping timeout: 246 seconds]
weaksauce has joined #ruby
Wildfyr has quit [Ping timeout: 240 seconds]
xaxisx has quit [Read error: Connection reset by peer]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xaxisx has joined #ruby
tomchapin has joined #ruby
<daumie>
after a hard day at work....who's watching football today?
shinnya has joined #ruby
<al2o3-cr>
me :)
kareeoleez has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Ping timeout: 260 seconds]
<daumie>
al2o3-cr: Niice ....are you betting?
agit0 has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JakFrist has joined #ruby
<daumie>
al2o3-cr: 1st half draw...
<al2o3-cr>
not with those odds
xaxisx has quit [Read error: Connection reset by peer]
<daumie>
al2o3-cr: hahaa....these are tough teams but in the end we mus have a winner
xaxisx has joined #ruby
<al2o3-cr>
germany is going to win anyway
yardenbar has joined #ruby
sneakers has joined #ruby
kareeole_ has quit [Ping timeout: 264 seconds]
iamvery has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<shevy>
daumie I dunno, it got quite boring quickly... I noticed that in the last 3 or 4, after I saw goals, I quickly lost interest to watch further
davedev24 has joined #ruby
A5101 has joined #ruby
<daumie>
shevy: Did you watch Germany vs Italy Penalty shootout?
deadnull_ has joined #ruby
isberg has quit [Read error: Connection reset by peer]
<shevy>
nope
agit0 has quit [Max SendQ exceeded]
<jmarinelli>
how can i create a thread without starting it on creation?
jmarinelli is now known as yuung
Madplatypus has joined #ruby
burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
yuung: pro-tip: don't change nick right after asking a question
kareeoleez has quit [Ping timeout: 264 seconds]
<toretore>
yuung: 1) what apeiros said 2) you can't
<apeiros>
yuung: you can't. you can stop it with a condition variable and signal it to start later
<yuung>
apeiros, toretore, mk. so i could theoretically create it, start it and stop it immediately
<yuung>
if i really needed to
wldcordeiro has joined #ruby
<apeiros>
you have to be careful with the "stop it immediately"
<apeiros>
easy to have a race condition there.
<yuung>
apeiros could you give an example
<daumie>
shevy: You'll never want to miss that at shevy
<apeiros>
nope, sorry, on my way to a shop. when I'm back and I can find my old example, maybe
<daumie>
For those of us watching football...have fun people...bet wisely..
<toretore>
yuung: it would be more productive to get to the reason you want to do this in the first place
Vingador has quit [Remote host closed the connection]
isberg has joined #ruby
<yuung>
toretore exploration
<yuung>
toretore /curiousity :)
daumie has left #ruby ["Germany vs France , see you later good people"]
yuung has left #ruby [#ruby]
mistermocha has quit [Remote host closed the connection]
calmchaos has joined #ruby
symm- has quit [Ping timeout: 252 seconds]
firstdayonthejob has joined #ruby
swills has joined #ruby
swills has quit [Changing host]
swills has joined #ruby
bogusdisk has joined #ruby
kareeoleez has joined #ruby
macsteps has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
macsteps has joined #ruby
calmchaos has quit [Remote host closed the connection]
Didac has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
Silthias1 has joined #ruby
Silthias has quit [Read error: Connection reset by peer]
igam` has quit [Ping timeout: 276 seconds]
skade has quit [Ping timeout: 244 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
ekinmur has joined #ruby
dikons has joined #ruby
pickandmix has quit [Quit: WeeChat 1.4]
dikons_ has joined #ruby
dikons_ has quit [Client Quit]
mistermocha has quit [Remote host closed the connection]
calmchaos has joined #ruby
pwnd_nsfw` has joined #ruby
miqlas-H has joined #ruby
dagelf has quit [Read error: Connection reset by peer]
neo has joined #ruby
RegulationD has quit [Remote host closed the connection]
neo is now known as Guest633
roamingdog has joined #ruby
ascarter has joined #ruby
codecop has joined #ruby
ghr has quit [Ping timeout: 258 seconds]
kirun has joined #ruby
ddffg has quit [Ping timeout: 272 seconds]
mdw_ has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
Sashimi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xaxisx has quit [Ping timeout: 250 seconds]
mdw has quit [Ping timeout: 240 seconds]
roamingdog has quit [Ping timeout: 250 seconds]
<mrodrigues>
smathy, apeiros and gizmore, thank you for the feedback! :) Sorry the wait, a client called me
mdw has joined #ruby
karapetyan has joined #ruby
mistermocha has joined #ruby
<gizmore>
mrodrigues: you have no permission to reply to this chat message.
<gizmore>
:=
mdw_ has quit [Ping timeout: 244 seconds]
Xeago_ has joined #ruby
akira616 has joined #ruby
ruby-lang552 has joined #ruby
Vingador has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
Snowy has quit [Quit: ragequit]
Vingador__ has quit [Ping timeout: 250 seconds]
skade has joined #ruby
allcentury has joined #ruby
rbennacer has quit [Remote host closed the connection]
macsteps has quit [Remote host closed the connection]
macsteps has joined #ruby
tomphp has joined #ruby
mistermocha has joined #ruby
vuoto has joined #ruby
internetbird has joined #ruby
tomeara has joined #ruby
tomeara has quit [Client Quit]
skade has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
macsteps has quit [Ping timeout: 240 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has quit [Ping timeout: 244 seconds]
ruby-lang137 has joined #ruby
JakFrist has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
ruby-lang137 has quit [Ping timeout: 250 seconds]
craigp has joined #ruby
internetbird has quit [Ping timeout: 246 seconds]
eljimmy has quit [Quit: This computer has gone to sleep]
roamingdog has joined #ruby
kavanagh has joined #ruby
blandflakes has joined #ruby
nando293921 has joined #ruby
nettoweb has joined #ruby
karapetyan has joined #ruby
AngryBuzzy has left #ruby ["Leaving"]
Pupeno has quit [Remote host closed the connection]
AngryBuzzy has joined #ruby
solars has quit [Ping timeout: 240 seconds]
miccet has joined #ruby
Pupeno has joined #ruby
dopamean_ has quit [Ping timeout: 246 seconds]
elementaru has joined #ruby
antgel has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
burgestrand has joined #ruby
burgestrand has quit [Client Quit]
nando293921 has quit [Ping timeout: 276 seconds]
GinoManWorks_ has joined #ruby
symm- has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
zacstewart has joined #ruby
GinoManWorks has quit [Ping timeout: 250 seconds]
replay has quit [Ping timeout: 276 seconds]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
minimalism has quit [Quit: minimalism]
futilegames has joined #ruby
Pupeno has quit [Remote host closed the connection]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
yfeldblum has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
minimalism has joined #ruby
solars has joined #ruby
Xeago_ has joined #ruby
nankyoku_ has quit [Remote host closed the connection]
calmchaos has quit [Remote host closed the connection]
whathappens has quit [Ping timeout: 252 seconds]
mello has joined #ruby
Pupeno has quit [Ping timeout: 272 seconds]
TheWhip has quit [Read error: Connection reset by peer]
TheWhip has joined #ruby
calmchaos has joined #ruby
Vingador has quit [Ping timeout: 240 seconds]
John2496 has joined #ruby
pld has quit [Quit: Connection closed for inactivity]
mrodrigues has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
todd_dsm_wk has quit [Quit: Leaving]
calmchao_ has joined #ruby
calmchaos has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
pawnbox has quit [Remote host closed the connection]
antgel has joined #ruby
akira616 has quit [Ping timeout: 258 seconds]
mdw has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snath has quit [Ping timeout: 250 seconds]
neo_ has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
neo_ has joined #ruby
rbennacer has quit []
memorasus has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
cwar has quit [Remote host closed the connection]
<A124>
I have no ide why it works like it works.
neo_ has quit [Remote host closed the connection]
neo_ has joined #ruby
neo_ has quit [Remote host closed the connection]
<A124>
I have ternary... ( (m.get( entryname) || '').size < 500 ) ? nil : n
jenrzzz has joined #ruby
neo_ has joined #ruby
<A124>
In a map() and then I compact the array so only those larger then 500 should remain. In real it is opposite
calmchao_ has quit [Client Quit]
rodfersou is now known as rodfersou|coffee
thoraxe has quit [Ping timeout: 264 seconds]
<smathy>
A124, make a gist of the full section of code.
nankyokusei has quit [Ping timeout: 276 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
thoraxe has joined #ruby
todd_dsm_wk has joined #ruby
snath has joined #ruby
memorasus has joined #ruby
<todd_dsm_wk>
headius: yesterday you said jruby will 1.7 will EOL at end of the year. Is that posted anywhere? I'd like to reference something official in my docs.
mistermocha has joined #ruby
<headius>
todd_dsm_wk: hmmm...let me see
<todd_dsm_wk>
can't find it anywhere myself
jenrzzz has quit [Ping timeout: 244 seconds]
<headius>
I don't think we officially said it anywhere but we have said we'd maintain 1.7 through 2016
machinewar has joined #ruby
<headius>
given how 9k adoption has gone I think that will be EOL
<todd_dsm_wk>
I'll take that if it's posted somewhere.
<not_a_robot>
Mind if I drop a question? I don't know if it would be rude
<A124>
toretore are you talking about me?
<A124>
If so I find it offensive. It is real code, no edits, except record name.
<ramfjord>
not_a_robot: shoot away
cwar has joined #ruby
Silthias has joined #ruby
<smathy>
A124, not sure how redo will act in the map, you probably meant retry.
macsteps has joined #ruby
Silthias1 has quit [Ping timeout: 246 seconds]
<A124>
smathy redo should restart just current iteration, not whole loop. Will try, but even when there are no exceptions raised whatsoever, the results are same.
SilverKey has quit [Quit: Halted.]
<A124>
Just the connection timeouts due to low hardcoded timeout in the ruby driver, pfft.
mistermocha has joined #ruby
<ramfjord>
A124: you've got some kind of weird stuff in that snippet - "#{n}" || '' will never evaluate the '', because it's impossible for "#{n}" to return a falsy value
<headius>
todd_dsm_wk: doesn't seem to be anything, but I just floated the EOL idea on twitter and we'll make it official shortly
<A124>
It is just to handle if it returns nil, so I can use .size on it.
<ramfjord>
doh, missed those completely
<A124>
If I swap the ternary it works, but I have no idea why... it defies logic.
<smathy>
A124, show the final result in your gist, `puts nums.inspect` or something
<not_a_robot>
Thanks. I'm currently struggling to communicate with a W2003 server (keel me, plz) and it seems that making a sort of Web Service with Visual Studio is going to be a pain in the ass
<A124>
smathy I did show that.
<not_a_robot>
So I'm considering implementing a mini HTTP server with Rack (most likely), and have it running there. It would be consumed by a PHP script on another server
<A124>
I mean, I tested that, then I did nums.map { |n| m.get(n).size }
<not_a_robot>
I'm relatively new to this legacy development thing so I was hoping there was a more seasoned coder around here to give me a tip
blackgoat has joined #ruby
SilverKey has joined #ruby
<A124>
And they indeed are inversed. There are some missing records and some bogus, this should have filter them to next step where workers in parallel check again and update accordingly.
ciast has joined #ruby
<smathy>
A124, I mean show it, in your gist.
tomchapin has joined #ruby
rodfersou|coffee is now known as rodfersou
aegis3121 has quit [Ping timeout: 246 seconds]
<A124>
smathy What does it change? I do not get it.
<A124>
You do not have my DB, so I do not understand what I am supposed to show.
<toretore>
A124: the point is that there are many assumptions made in the code you posted that we don't know about
troulouliou_div2 has joined #ruby
<ramfjord>
not_a_robot: you need a web server that runs on windows 2003? What do you need this server to do exactly? What exactly do you mean by "[the web server] would be consumed by a PHP script on another server?"
<A124>
toretore what assumptions?
<smathy>
A124, the output of `puts nums.inspect` after your map has finished.
Madplatypus has joined #ruby
ciast has left #ruby [#ruby]
<A124>
Oh, a list of numbers, should I really post thousands of numbers?
Robody has joined #ruby
<Mon_Ouie>
Why are you using redo?
mistermocha has quit [Remote host closed the connection]
<smathy>
A124, you seem like a smart guy, so I'm assuming you understand that ternary is not faulty in ruby, nor in *your* ruby, so there's some assumptions here that you're making which are causing a behavior that is unexpected. If you want help, some of that is going to be testing your assumptions.
<A124>
Mon_Ouie in case the connection times out, obviously.
futilegames has quit [Quit: futilegames]
<toretore>
1) ruby's ternary and other core functionality doesn't work 2) your code doesn't do what you think it does
<Mon_Ouie>
What do you think redo does?
<A124>
I could have removed that for gist, should change nothing, but toretore flames about fake code, even when I did only chaneg record name
neo_ has quit [Remote host closed the connection]
<not_a_robot>
ramjford: The objective of this Rack server would be to update a local DB. Meaning on another server a PHP script would be executed to send data (from another DB) and the Rack server would receive that data, process it and then insert it to a DB on its localhost
<A124>
Mon_Ouie restarts current iteration.
<toretore>
A124: it's more about your unwillingness to provide more information when asked by the people you're asking for help
neo_ has joined #ruby
CamonZ has quit [Read error: No route to host]
neo_ has quit [Remote host closed the connection]
flughafen_ has quit [Ping timeout: 240 seconds]
neo_ has joined #ruby
<A124>
toretore No, that was before anyone asked for more.
spudowiar has joined #ruby
<havenwood>
not_a_robot: I like Roda with Sequel for such a task, assuming it's a SQL DB.
<A124>
p nums.inspect => [1,3,5,...]
roamingdog has quit [Remote host closed the connection]
<A124>
Nothing special about it.
eljimmy has joined #ruby
roamingdog has joined #ruby
<ramfjord>
not_a_robot: have you considered just exposing the database port on the windows server, and writing directly to that database? If you're using something like postgres you may even be able to insert into it directly from the other DB using foreign data wrappers
<toretore>
A124: which means something is not what you think it is, and it's not visible in the code you pasted
zacts has quit [Ping timeout: 272 seconds]
et09 has joined #ruby
<et09>
a = {b: nil} <--- how do i distinguish a[:b]'s "nil" from a[:foobar]'s nil
<not_a_robot>
ramjford: Yeah hehehe I think it is as simple as that, but the PHP server is using Laravel framework and there seems to be a SQL client incompatibility (eloquent ORM) and syncing the DB externally seemed more robust, for some reason
SilverKey has quit [Quit: Halted.]
<toretore>
et09: a.include?(:foobar)
<et09>
ah, thanks
et09 has quit [Client Quit]
<smathy>
A124, so they're integers? You understand that 501.size => 8 right?
CausaMortis has joined #ruby
<A124>
Nah, the responses are strings. And no idea why 501.size returns 8
chip_ has quit [Ping timeout: 244 seconds]
<smathy>
A124, because it's an integer, but you're saying they're strings, but that's not what your `p nums.inspect` shows.
<al2o3-cr>
A124: it return the number bytes of a fixnum
<A124>
al2o3-cr oh.
<A124>
smathy but I am using .size on what I return from the db.
<A124>
Anyawy.. it seems what I said earlier, either I am mad or ternary are other way around. I am mad.
mrodrigues has quit [Quit: leaving]
blandflakes has quit [Ping timeout: 250 seconds]
<A124>
If I want to fetch missing, I got to output when they are < 500 which means ? n : nil
<smathy>
A124, right, and whatever that is is what you're mapping into `nums`, and hence what's being output in your `nums.inspect` that you showed above.
mtkd has joined #ruby
<A124>
Thank you kindly to anyone, my apparently shortcircuited brain failed my today big time.
synthroid has quit []
mistermocha has joined #ruby
<A124>
smathy Correct, though I could be mapping them into strings that are keys for the records, then use those in subsequent worker thread, but I find numbers only more efficient from tranfer perspective.
<A124>
I hope and wish Ruby
jenrzzz has joined #ruby
<smathy>
Whatever is in `nums` after the map is what's being returned from memcache, and your `p nums.inspect` above showed that those are integers. And an_interger.size == 8.
<smathy>
Oh, sorry, forget that. I misread your code. You're mapping the `n` not the m.get n
<A124>
* Ruby 3 with it's promised speed and memory footprints will be soon. So far the most limiting is that aspect, but the power it gives is .. something I tend to return to. I started doing more, and might mix in go or c/c++ via ffi for best of both.
* A124
It is just... "hobby" (solo, nonprofit, public benefit) work, or private stuff what I am doing. Working by pair programming is what I always wanetd to do.
Robody has left #ruby [#ruby]
deviation has quit [Ping timeout: 250 seconds]
TheWhip has quit [Remote host closed the connection]
<Yxhuvud>
ruby3 will be soon? Heh, that I'll beleive when I see.
<ytti>
i think matz is smart
<A124>
Soon is relative term.
<ytti>
he won't do big breaking changes from 2.x => 3
<A124>
Matz is, but there is not enough manpower.
jenrzzz has quit [Ping timeout: 276 seconds]
<ytti>
he'll do it on 2.x => 2x.+1
LoneHerm_ has quit [Ping timeout: 252 seconds]
<ytti>
to remove psychological barrier in migrating to new release
<havenwood>
Yxhuvud: Coming Christmas 2020
<A124>
Well, he threw the idea that he would like Ruby 3 to be three times as fast.
<ytti>
1.8 => 1.9 was quite the chore, 1.9 => 2.0 was 0 work
ivanskie has joined #ruby
zacts has joined #ruby
pawnbox has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
Pupeno has quit [Ping timeout: 272 seconds]
<havenwood>
A124: Mind that's compared with Ruby 2.0, which 2.3 is already faster than.
j2k has quit [Ping timeout: 246 seconds]
<A124>
An exaple of longest common substring by O(m*n) .. in other words naive approach (Which on short strings is much faster then other aproaches when compiled) is horribly slow.
<Mon_Ouie>
That was before adopting semantic versioning
<A124>
havenwood Well, not sure how 2.0 was fast/slow, but doing lcs on 32kb document meant half a day
bluOxigen has joined #ruby
<A124>
Now I was doing that only on 8k documents to generate zlib dictionary, so I can save records with compression per record (DB has no support for compression).
pawnbox has quit [Ping timeout: 244 seconds]
vuoto has quit [Remote host closed the connection]
<A124>
Else I did calculate and 32kb Page size would be optimal balance in my case. I did also analysis on Linux distributions, and using 128kB page size is relatively huge. CDs might have slow random access but flashdisks are diggerent plus their IOPS differ. so in practice 16-64kb performs better. Just FYI
macsteps has quit [Remote host closed the connection]
j2k has joined #ruby
<A124>
I am using memcache driver on top of berkeley with marshalling. Which is where the timeouts come from, disk not as fast as RAM. But gives key/value, and simple for ruby. I had no luck at usig BDB in ruby with existing drivers.
blackmesa has quit [Ping timeout: 244 seconds]
deecross has quit [Remote host closed the connection]
troulouliou_div2 has quit [Ping timeout: 276 seconds]
memorasus has quit [Ping timeout: 272 seconds]
blackmesa has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
machinewar has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
elementaru has quit [Quit: Leaving]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 252 seconds]
akira616 has joined #ruby
pawnbox has joined #ruby
neo__ has joined #ruby
lkb_ has quit [Quit: Wychodzi]
whathappens has joined #ruby
neo___ has joined #ruby
neo_ has quit [Ping timeout: 250 seconds]
ramortegui has quit [Remote host closed the connection]
DJTrey has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
neo__ has quit [Ping timeout: 252 seconds]
neo_ has joined #ruby
replay has joined #ruby
replay has quit [Max SendQ exceeded]
replay has joined #ruby
replay has quit [Max SendQ exceeded]
vuoto has joined #ruby
bruce_lee has quit [Ping timeout: 250 seconds]
replay has joined #ruby
replay has quit [Max SendQ exceeded]
aupadhye has quit [Ping timeout: 246 seconds]
bruce_lee has joined #ruby
AlexRussia has joined #ruby
neo___ has quit [Ping timeout: 276 seconds]
replay has joined #ruby
shinnya has quit [Ping timeout: 250 seconds]
wldcordeiro has quit [Ping timeout: 272 seconds]
smathy has quit [Ping timeout: 240 seconds]
neo_ has quit [Ping timeout: 272 seconds]
babblebre has joined #ruby
kavanagh has joined #ruby
crdpink has quit [Quit: q term]
SilverKey has joined #ruby
SilverKey has quit [Max SendQ exceeded]
kavanagh has quit [Client Quit]
SilverKey has joined #ruby
crdpink has joined #ruby
smathy has joined #ruby
malconis has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
minimalism has quit [Quit: minimalism]
crdpink has quit [Quit: q term]
bogn has joined #ruby
freerobby has quit [Ping timeout: 276 seconds]
crdpink has joined #ruby
joonty has joined #ruby
<shevy>
A124 I think matz actually said during some presentation that the 3x speed improvement won't apply to everything
John2496 has quit []
vuoto has quit [Remote host closed the connection]
spudowiar has quit [Quit: Leaving.]
Es0teric has joined #ruby
rgb-one has joined #ruby
<rgb-one>
How can I reload only a part of the page, say a <div>?
<shevy>
rgb-one via happy javascript!
roamingdog has quit [Read error: Connection reset by peer]
bogn has quit [Read error: Connection reset by peer]
hipertracker has joined #ruby
roamingdog has joined #ruby
<rgb-one>
shevy: How so?
<shevy>
rgb-one I am sure javascript people know how to reload tags dynamically
zacts has quit [Ping timeout: 260 seconds]
Pupeno has joined #ruby
gusrub has quit [Remote host closed the connection]
cd-rum has joined #ruby
rodfersou has quit [Quit: leaving]
freerobby has joined #ruby
LoneHermit has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 240 seconds]
ivanskie has quit [Quit: Going offline, see ya! (www.adiirc.com)]
JeanCarloMachado has joined #ruby
wldcordeiro has joined #ruby
DJTrey has quit [Quit: Cya]
pawnbox has joined #ruby
burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
cd-rum has quit [Ping timeout: 240 seconds]
cd-rum has joined #ruby
LoneHermit has quit [Ping timeout: 264 seconds]
thomas is now known as fishie
Azure|dc is now known as Azure
tomphp has joined #ruby
hxegon is now known as hxegon_afk
pawnbox has quit [Ping timeout: 272 seconds]
nankyokusei has joined #ruby
tomphp has quit [Client Quit]
swills has quit [Ping timeout: 276 seconds]
ekinmur has joined #ruby
kirun has quit [Quit: Client exiting]
bogn has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
bruce_lee has quit [Read error: Connection reset by peer]
zacts has joined #ruby
mistermocha has quit [Remote host closed the connection]
kareeoleez has quit [Remote host closed the connection]
joonty has quit [Quit: This computer has gone to sleep]
mistermocha has joined #ruby
Parko has joined #ruby
macsteps has joined #ruby
jaguarmagenta has joined #ruby
ledestin has joined #ruby
Silthias has quit [Quit: Leaving.]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<CausaMortis>
havenwood: sweet :D cant believe i missed that thanks
Pupeno has quit [Ping timeout: 258 seconds]
cschneid_ has quit [Remote host closed the connection]
<CausaMortis>
havenwood: im working my way through the first upcase course material on ruby. I would rather implement things without using too many gems for now though I have seen people using nokogiri extensively in the office
<CausaMortis>
Would you recommend it?
daumie has quit [Ping timeout: 272 seconds]
hahuang61 has joined #ruby
LoneHermit has joined #ruby
pawnbox has joined #ruby
p0p0pr37 has quit [Read error: Connection reset by peer]
<elomatreb>
CausaMortis: If you only parse small amounts of XML you can probably get away with not using Nokogiri, since it saves users of your program the work of having to compile Nokogiri
<CausaMortis>
That makes sense thanks. I read that it is dependant on some packages that are not always available on the machine. Since others will be reviewing my code I would rather keep things simple to setup
Parko has quit [Ping timeout: 276 seconds]
<CausaMortis>
Will definitely look at Oga :) ty for your time
SilverKey has quit [Quit: Halted.]
LoneHermit has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
zacts has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Remote host closed the connection]
SCHAAP137 has quit [Quit: Leaving]
yfeldblum has joined #ruby
Parko has joined #ruby
<chrisseaton>
I want to to foo.gsub(bar, baz), but I don't want bar to be interpreted as a regex, just as a normal string. Do I have to escape it somehow, or is there a better method? I need multiple replacements, so #[]= I think doesn't work for me here.
dgynn has joined #ruby
DEac- has quit [Ping timeout: 244 seconds]
DEac- has joined #ruby
<agent_white>
Use a normal string?
<chrisseaton>
I think it's interpreted as a regex though
Dreamer3 has joined #ruby
<chrisseaton>
The parameter is called 'pattern'
zacts has joined #ruby
svkurowski_ has joined #ruby
jenrzzz has joined #ruby
CybrGhost has quit [Read error: Connection reset by peer]
svkurowski has quit [Ping timeout: 258 seconds]
CybrGhost has joined #ruby
svkurowski_ is now known as svkurowski
<havenwood>
"[I]f given as a String, any regular expression metacharacters it contains will be interpreted literally, e.g. '\\d' will match a backlash followed by ‘d’, instead of a digit."
mistermocha has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
<chrisseaton>
Sorry, it's actually the replacement parameter that is giving me problems "If replacement is a String it will be substituted for the matched text. It may contain back-references..."
<chrisseaton>
'foo'.gsub('f', '\\0') -> "foo"
d10n-work has quit [Quit: Connection closed for inactivity]
<havenwood>
you're welcome - I'd never run into that but it's interesting
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phrozen77 has quit [Ping timeout: 246 seconds]
bmurt has quit [Ping timeout: 252 seconds]
nando293921 has joined #ruby
pawnbox has joined #ruby
phrozen77 has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
tw1sted has quit [Remote host closed the connection]
tw1sted has joined #ruby
CausaMortis has quit [Ping timeout: 244 seconds]
PlasmaStar has quit [Ping timeout: 258 seconds]
dreinull has quit [Ping timeout: 246 seconds]
Scient has quit [Ping timeout: 246 seconds]
coffeecupp has joined #ruby
PlasmaStar has joined #ruby
badeball has quit [Ping timeout: 246 seconds]
isene has quit [Ping timeout: 246 seconds]
Scient has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
arescorpio has joined #ruby
koooge has joined #ruby
ur5us has joined #ruby
badeball has joined #ruby
BTRE has quit [Ping timeout: 272 seconds]
<leea>
can anyone tell me if i'm understanding this or not: so when you create an instance of a class, reopen the class and add new methods after instantiation, the instance still has access to these new methods because changes happen to the class?
fishie is now known as thomas
<Arcaire>
ya leea
<leea>
are there any cases in ruby where this doesn't happen? (not including instance_eval)
<Arcaire>
any case where you don't do it? :^)
<Arcaire>
You can open the Class class. It works across the board.
aryaching has quit [Ping timeout: 264 seconds]
nando293921 has quit [Ping timeout: 276 seconds]
yqt has quit [Ping timeout: 246 seconds]
coffeecupp has quit [Quit: Lost terminal]
akira616` has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
BTRE has joined #ruby
TomyLobo has quit [Ping timeout: 264 seconds]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
akira616 has quit [Ping timeout: 272 seconds]
dmak1112 has joined #ruby
bogn has quit [Remote host closed the connection]
<dmak1112>
hi guys! im rather new to ruby. Im using the influxdb ruby gem, which is sending data from my sensu server to influxdb. I'm getting an error and I don't really know what it means: /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.5/lib/influxdb/point_value.rb:7:in `initialize': undefined method `[]' for nil:NilClass (NoMethodError)\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.5/lib/influxdb/query/core.rb:94:i
<dmak1112>
n `new'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.5/lib/influxdb/query/core.rb:94:in `block in generate_payload'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.5/lib/influxdb/query/core.rb:93:in `map'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.5/lib/influxdb/query/core.rb:93:in `generate_payload'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.5/lib/influ
<dmak1112>
xdb/query/core.rb:47:in `write_points'\n\tfrom /etc/sensu/handlers/hpc-influxdb-cpu-pcnt-metrics.rb:97:in `handle'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.3.0/lib/sensu-handler.rb:57:in `block in <class:Handler>'\n
<elomatreb>
Please post your error as a gist, IRC might kick you since it thinks you're spamming
<dmak1112>
the sensu server is taking data from clients and uploading it to influxdb. the thing is that for the first client i set up, it works. but when i add a second client, im getting this error
bogusdisk has quit [Remote host closed the connection]
zeroDi has quit [Quit: WeeChat 1.5]
<toretore>
and then paste the code where this happens
Madplatypus has quit [Quit: Connection closed for inactivity]