frankle has quit [Quit: Connection closed for inactivity]
siwica has quit [Remote host closed the connection]
b00stfr3ak has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
benzrf|offline is now known as benzrf
linojon has quit [Ping timeout: 250 seconds]
moritzs has quit [Ping timeout: 250 seconds]
Zebroid has joined #ruby
<dorei>
I've just realized that japanese speakers get different ruby documentation
C4rlosCardona has quit [Quit: C4rlosCardona]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
dorei, With secret codes?
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dorei>
not idea, just different
<dorei>
wish my japanese where that advanced to be able to read it
Zebroid has quit [Ping timeout: 246 seconds]
sepp2k has quit [Read error: Connection reset by peer]
terrellt has quit [Ping timeout: 250 seconds]
memph1s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
goodenough has joined #ruby
fabrice31 has joined #ruby
C4rlosCardona has joined #ruby
gregf has joined #ruby
Grantlyk has quit [Remote host closed the connection]
icarus has quit [Remote host closed the connection]
mary5030 has joined #ruby
Grantlyk has joined #ruby
dawkirst has quit [Remote host closed the connection]
<C4rlosCardona>
hi - I’ve just started using rbenv and I notice that once I set my ruby version and then start installing gems it’s installing them at the following location: /Users/username/.rbenv/versions/1.9.3-p100/lib/ruby/gems/1.9.1/gems —— What I’m wondering is why I’m seeing /ruby/gems/1.9.1? Is that saying i’m using version 1.9.1 of ruby gems? Or is that using 1.9.1 of ruby? Any help would be great. Thanks!
mattmcclure has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
Neomex has quit [Quit: Leaving]
<centrx>
C4rlosCardona, 1.9.1 of Ruby, but it is the ABI version/soname
<centrx>
C4rlosCardona, Basically the interface between libraries is fixed on versions. Minor versions don't change the ABI (AB Interface), but major versions absolutely require the new major version
britneywright has joined #ruby
<C4rlosCardona>
ah i see. ok. I’ve never heard of this til now. Good to know. thx
Matadoer has quit [Remote host closed the connection]
ffranz has quit [Quit: Leaving]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marr has quit []
Takle has quit [Ping timeout: 240 seconds]
beef-wellington has joined #ruby
Soda has quit [Remote host closed the connection]
centrx has quit [Quit: Mead error: Connection reset by beer]
zz_karupa is now known as karupa
duggiefresh has joined #ruby
hamakn has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
oo_ has joined #ruby
maestrojed has joined #ruby
jgrevich has joined #ruby
dc_ has quit [Remote host closed the connection]
MatthewsFace has quit [Ping timeout: 240 seconds]
dc_ has joined #ruby
jerikl has joined #ruby
ghr has joined #ruby
hamakn has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
Zebroid has joined #ruby
oo__ has joined #ruby
robfrawley has quit [Quit: robfrawley]
oo_ has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 245 seconds]
maletor has joined #ruby
Trynemjoel has joined #ruby
_808chris has joined #ruby
<_808chris>
Hey guys/gals. I'm having issues with Resque. I'm using it in a Sinatra app but I cant figure out how to debug errors. should i just spin up an instance of resque-server on another port or something?
aspires has quit []
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has quit [Quit: Computer has gone to sleep.]
Zebroid has quit [Ping timeout: 272 seconds]
x1337807x has joined #ruby
<pontiki>
hi, all
<_808chris>
hi
tkuchiki has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
jerikl has quit [Quit: jerikl]
klmlfl has joined #ruby
Mozee has joined #ruby
claudiop has joined #ruby
maestrojed has joined #ruby
<C4rlosCardona>
_808chris: are you `tail`ing to log/resque.log ?
maletor has quit [Quit: Computer has gone to sleep.]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
starless has quit [Quit: Leaving]
codebrah has joined #ruby
codebrah has quit [Client Quit]
threesixes has quit [Ping timeout: 240 seconds]
TorpedoSkyline has joined #ruby
gilest has quit [Remote host closed the connection]
axsuul has quit [Read error: No route to host]
axsuul has joined #ruby
<_808chris>
sevenseacat, have you worked with Resque
<sevenseacat>
a little in the past
SouL has quit [Ping timeout: 260 seconds]
<_808chris>
sevenseacat, i have a simple class Sleeper that just sleeps 5 seconds. I have it required. when i use it with Resque like such: Resque.enqueue(Sleeper, 5)
threesixes has joined #ruby
<_808chris>
I get undefined method `[]' for nil:NilClass
bradleyprice has joined #ruby
<sevenseacat>
full error plz
<_808chris>
on the line with the resque.enqueue call
<sevenseacat>
*full error with backtrace plz
<_808chris>
whats the best way to paste that
<_808chris>
?
<jhass>
_808chris: see /topic
Hobogrammer_ has quit [Read error: Connection reset by peer]
<jhass>
list = LinkedList.new; list << "foo"; list.each do |item|; implementing each you can include Enumerable and get lots of stuff for free
tylerkern has joined #ruby
fold has joined #ruby
<jhass>
implementing <=> and including Comparable gets you even more
<nobitanobi>
jhass: this is really helpful. How would you write the constructor for LinkedList
<nobitanobi>
you would iterate over the array and keep creating Nodes, and linking them?
Wolland has joined #ruby
joelwallis has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_808chris has quit [Ping timeout: 250 seconds]
<joelwallis>
Hi. I'm having an issue with a Linux installation and I have some doubts about Ruby versions
<jhass>
def initialize(*items); head, tail = items; @head = Node.new(head); tail.inject(@head) {|last, data| last.next = Node.new(data) }; end I guess
<jhass>
nobitanobi: ^
<sevenseacat>
joelwallis: whats up?
gilest has joined #ruby
<nobitanobi>
jhass: Thanks.
dpatel has quit [Quit: dpatel]
<joelwallis>
I'm using Ubuntu 12.04.x, and I installed the `ruby` package. But it's Ruby 1.8.x. So with apt-cache search "^ruby" I found `ruby1.9.3` and I installed it.
<jhass>
nobitanobi: probably = [*items] to normalize passing an array etc.
tylerkern has quit [Client Quit]
bmurt has quit []
<sevenseacat>
there's likely also a ruby2
<joelwallis>
Now I'm trying to install Rails but I don't know how can I run the `gem` program by saying it to use the Ruby 1.9.3 version
krz has joined #ruby
<jhass>
joelwallis: update-alternatives ruby and update-alternatives gem iirc
<joelwallis>
there's not a ruby2, apt-cache search ruby2 doesn't return me no packages :(
<gilest>
jhass: i don't know if people here use them but http://apt.hellobits.com/ has up to date ruby binaries
<sevenseacat>
its been a long time since i tried using system packages for ruby
<joelwallis>
sevenseacat, what do you use to manage ruby installs?
<jhass>
gilest: great. good that I neither use debian nor ubuntu
<sevenseacat>
i use chruby to switch and ruby-build to install them
<gilest>
jhass: i'm not sure. if you have apt it ought to work..
djbkd has joined #ruby
<jhass>
gilest: I have pacman
beneggett has joined #ruby
<joelwallis>
Well, I'm not sure which option should I use since I'm not an experienced Rubyist
nat2610 has joined #ruby
<joelwallis>
I couldnt find any Ruby 2.x version in APT repos.. and I tried to install the 1.9.3, which is the minimal version for Rails framework
gwillickers has left #ruby [#ruby]
<nobitanobi>
jhass: when you do this: https://gist.github.com/novito/5ba6e2ab17a19da9b6d1 -- Why would you want to do head, tail = items; - Wouldn't tail be always nil? Head would get the passed array, right?
bigkevmcd has quit [Read error: Connection timed out]
lonbaker has joined #ruby
<gilest>
jhass: woops replied to the wrong person :/
BeemoLin has joined #ruby
<sevenseacat>
well you are on a almost-three year old version of ubuntu - ruby 2 didnt exist then :P
<gilest>
joelwallis: i don't know if people here use them but http://apt.hellobits.com/ has up to date ruby binaries
<jhass>
nobitanobi: that's why I added the = [*items] note. So you can do LinkedList.new 1, 2, 3 or LinkedList.new [1, 2, 3] or LinkedList.new some_set etc.
gondalier has joined #ruby
<sevenseacat>
pick the most up-to-date version of ruby you can
<jhass>
nobitanobi: I wouldn't expose head btw. so no accessors for that
gondalier has quit [Client Quit]
patrick99e99 has joined #ruby
<nobitanobi>
jhass: ok. I will try to understand your method
weemsledeux has joined #ruby
braincra- has quit [Quit: bye bye]
zeroNones has joined #ruby
britneyw_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duggiefresh has quit []
<nobitanobi>
jhass: the note saying "nobitanobi: probably = [*items] to normalize passing an array etc." - Where would I add that?
zeroNones has quit [Max SendQ exceeded]
<jhass>
nobitanobi: meh, forget it, I forgot how that normalization trick worked
<nobitanobi>
jhass: ok! THanks man this was inspirational
<nobitanobi>
I am going to continue kicking it
<nobitanobi>
appreciate
<jhass>
just remove the * in the method definition
<nobitanobi>
yep
GinoMan has quit [Remote host closed the connection]
patrick99e99 has quit [Ping timeout: 245 seconds]
braincrash has joined #ruby
iteratorP has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tylerkern has joined #ruby
michaeldeol has joined #ruby
tylerkern has quit [Client Quit]
philcris_ has joined #ruby
reset has quit [Quit: Leaving...]
reset has joined #ruby
jhass is now known as jhass|off
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Lewix has quit [Remote host closed the connection]
weemsledeux has joined #ruby
melik has joined #ruby
Lewix has joined #ruby
narcan has joined #ruby
Zebroid has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
phoo1234567 has quit [Quit: Leaving]
Zebroid has quit [Read error: Connection reset by peer]
Zebroid has joined #ruby
Lewix has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
joelwallis has quit [Quit: Saindo]
oo_ has joined #ruby
Zebroid has quit [Ping timeout: 240 seconds]
brianherman_ has quit [Read error: Connection reset by peer]
Takle has joined #ruby
mary5030 has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 246 seconds]
fabrice31 has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
jrhe_ has quit [Quit: Connection closed for inactivity]
Ilyas_ has quit [Ping timeout: 255 seconds]
fabrice31 has quit [Ping timeout: 272 seconds]
dseitz has joined #ruby
lonbaker has quit [Remote host closed the connection]
mahtennek has quit []
chrishough has quit [Quit: chrishough]
Cache_Money has joined #ruby
chrishough has joined #ruby
ARCADIVS has joined #ruby
w09x_ has quit []
cap has joined #ruby
jerius has joined #ruby
saarinen has joined #ruby
EasyCo has joined #ruby
Dusty_ has quit [Ping timeout: 246 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
barhum2013 has joined #ruby
gilest has joined #ruby
sylvanica has quit [Quit: Leaving]
bluOxigen has joined #ruby
DadoCe has quit [Remote host closed the connection]
JoshGlzBrk has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
bl4ckdu5t has quit [Ping timeout: 256 seconds]
oo_ has quit [Ping timeout: 272 seconds]
nuck has joined #ruby
nat2610 has quit [Quit: Leaving.]
nat2610 has joined #ruby
oo_ has joined #ruby
cap has quit [Remote host closed the connection]
cap has joined #ruby
seanchas_t has joined #ruby
anaeem1_ has joined #ruby
paolooo has joined #ruby
dc_ has joined #ruby
seanchas_t has quit []
cap_ has joined #ruby
cap has quit [Ping timeout: 240 seconds]
cap_ has quit [Remote host closed the connection]
cap has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
craigp has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
mr-foobar has quit [Read error: Connection reset by peer]
mr-foobar has joined #ruby
iteratorP has joined #ruby
djbkd has joined #ruby
earthquake has quit [Quit: earthquake]
Grantlyk has quit [Remote host closed the connection]
cap has quit [Ping timeout: 240 seconds]
starless has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
techsethi has joined #ruby
MatthewsFace has quit [Quit: Leaving]
cap has joined #ruby
<pontiki>
\z is end of string
<pontiki>
$ is end of line
cap has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cap has joined #ruby
BeemoLin has quit [Remote host closed the connection]
davividal has joined #ruby
kireevco has joined #ruby
<sevenseacat>
ah hah
<davividal>
hi. I have a 2-dimensional array ("map") and I have an array as coord = [x, y]. How can I access my map as map[coord]? I'm doing map[coord[0]][coord[1]] but it feels *very* wrong.
Cache_Money has quit [Quit: Cache_Money]
coreycondardo has quit [Quit: coreycondardo]
maestrojed has joined #ruby
<pontiki>
that is how you access a n-D array
<pontiki>
might i suggest not using the variable name "map" ? it could easily confuse someone with the method
<davividal>
pontiki, yeah, I know. But I'm wondering if there isn't any magic thing like map.[](*coord) :)
Zebroid has joined #ruby
<davividal>
pontiki, I'm not using 'map', just a (close) sample ;)
nemesit|znc has quit [Ping timeout: 260 seconds]
cap has quit [Ping timeout: 240 seconds]
saarinen has quit [Quit: saarinen]
<pontiki>
i suggest you make a class that accepts things the way you want to express them, underlaying that class with the 2-D array
<pontiki>
(or n-D array if you want to make it generic)
<davividal>
hmm... good point
maletor has joined #ruby
<davividal>
thanks
<pontiki>
nw
beef-wellington has joined #ruby
ta has quit [Remote host closed the connection]
nemesit|znc has joined #ruby
Zebroid has quit [Ping timeout: 255 seconds]
toastyne_ has joined #ruby
toastynerd has quit [Read error: No route to host]
barhum2013 has quit [Quit: barhum2013]
Xeago has joined #ruby
timgauthier has joined #ruby
zettam_ has joined #ruby
zettam has quit [Ping timeout: 255 seconds]
barhum2013 has joined #ruby
duncannz has quit [Quit: Leaving]
JoshGlzBrk has joined #ruby
duncannz has joined #ruby
bl4ckdu5t has joined #ruby
bl4ckdu5t is now known as Guest67986
whyy has joined #ruby
mateu_ has quit [Ping timeout: 255 seconds]
Sou|cutter has quit [Ping timeout: 245 seconds]
mateu has joined #ruby
beef-wellington has quit [Ping timeout: 272 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
techsethi has quit [Quit: techsethi]
starless has quit [Quit: Leaving]
mary5030 has joined #ruby
craigp has joined #ruby
EvanR_ has quit [Read error: Connection reset by peer]
zettam has joined #ruby
EvanR_ has joined #ruby
zettam_ has quit [Ping timeout: 246 seconds]
philcrissman has joined #ruby
bearish has joined #ruby
mary5030 has quit [Ping timeout: 245 seconds]
craigp has quit [Ping timeout: 240 seconds]
koderok has joined #ruby
onso has quit [Ping timeout: 264 seconds]
philcrissman has quit [Ping timeout: 260 seconds]
tylerkern has joined #ruby
nat26101 has joined #ruby
nat2610 has quit [Ping timeout: 250 seconds]
GriffinHeart has joined #ruby
benzrf is now known as benzrf|offline
mercwithamouth has joined #ruby
havenwood has joined #ruby
gilest has quit [Remote host closed the connection]
tom_zhu has quit [Remote host closed the connection]
toastynerd has quit [Ping timeout: 255 seconds]
Spami_ has quit [Quit: This computer has gone to sleep]
InhalingPixels has joined #ruby
havenwood has quit [Remote host closed the connection]
szuletett has joined #ruby
clauswit_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
philcrissman has quit [Ping timeout: 244 seconds]
<Fractional>
Ok, I am trying to setup a UDP server system for my networking application. I do however find the documentation lacking.
<Fractional>
TCP is quite documentated.
pydave6367 has joined #ruby
<Fractional>
Bought jstorimer's networking book for it as well.
szuletett has left #ruby [#ruby]
<toertore>
what specifically are you looking for?
davispuh has joined #ruby
Zebroid has joined #ruby
toastynerd has joined #ruby
InhalingPixels has quit [Ping timeout: 245 seconds]
<Fractional>
Well, just a UDP server/client really. That can handle multiple clients. Just to see how its done.
sk87 has joined #ruby
clauswitt has joined #ruby
JBreit has joined #ruby
mercwithamouth has quit [Ping timeout: 250 seconds]
ClarusCogitatio has quit [Ping timeout: 240 seconds]
Beoran_ has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
krisquigley has joined #ruby
ClarusCogitatio has joined #ruby
Xeago_ has quit [Remote host closed the connection]
beef-wellington has joined #ruby
rdark has joined #ruby
Zebroid has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
toastynerd has quit [Ping timeout: 260 seconds]
<tlarevo_>
I believe most of what is for TCP can be applied for UDP so I guess TCP examples in jstorimer's book should help did you try out those examples ?
joonty has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
oo_ has quit [Remote host closed the connection]
relix_ has joined #ruby
oo_ has joined #ruby
sparrovv has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
beef-wellington has quit [Ping timeout: 240 seconds]
DEA7TH has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
relix has quit [Ping timeout: 240 seconds]
mengu has quit [Remote host closed the connection]
Lewix has quit [Ping timeout: 244 seconds]
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
mikecmpbll has joined #ruby
ClarusCogitatio has quit [Ping timeout: 246 seconds]
benlieb has quit [Read error: Connection reset by peer]
marr has joined #ruby
iteratorP has quit [Remote host closed the connection]
<wasamasa>
isn't zeromq the answer to people who want to have something less bothersome than raw sockets?
iteratorP has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
noroot_ has joined #ruby
workmad3 has joined #ruby
poulet_a has quit [Quit: Quitte]
W0rmDr1nk has joined #ruby
<Fractional>
tlarevo_: Or perhaps my networking knowledge is whats lacking.
workmad3 has quit [Client Quit]
patrick99e99 has joined #ruby
workmad3 has joined #ruby
olivier_bK has joined #ruby
<apeiros>
as far as I've seen, many people using udp reimplement tcp on top of it, but worse
mkaesz has quit [Ping timeout: 250 seconds]
lw has quit [Quit: s]
drawingthesun has quit [Read error: Connection reset by peer]
patrick99e99 has quit [Ping timeout: 245 seconds]
koderok has joined #ruby
andikr has joined #ruby
<workmad3>
apeiros: it's fun to cargo-cult that 'UDP is fast' and then re-implement your own crappy reliability and ACK mechanisms on top of it!
yumanki was kicked from #ruby by apeiros [yumanki]
yumanki has joined #ruby
yumanki was banned on #ruby by apeiros [*!*@237.Red-79-148-176.dynamicIP.rima-tde.net]
yumanki was kicked from #ruby by apeiros [no spam]
<apeiros>
workmad3: indeed
<apeiros>
workmad3: making it in turn slower than tcp equivalent too
charliesome has joined #ruby
<apeiros>
the notion that udp is generally faster than tcp is wrong too anyway
tlarevo_ has quit [Ping timeout: 245 seconds]
ctp has joined #ruby
<workmad3>
apeiros: it's faster as long as you have a perfectly reliable network that always delivers packets in-sequence
lrocknrolmarc has joined #ruby
<workmad3>
apeiros: in that circumstance, the extra overhead of the TCP packet assigning sequence numbers will slow you down a little ;)
agjacome has joined #ruby
<lrocknrolmarc>
hey guys sorry for the stupid question but i realy having trouble using rspec outside of rails :) I have my spec_helper in /spec and I want to include a file called bin/Train how do I load it into spec_helper and is there a way to include all files in /lib and /bin
theharshest has quit [Ping timeout: 250 seconds]
korpz has joined #ruby
Macaveli has joined #ruby
drawingthesun has joined #ruby
<lrocknrolmarc>
anyone
quarcu_ is now known as quarcu
AlSquire has joined #ruby
ClarusCogitatio has quit [Ping timeout: 246 seconds]
lrocknrolmarc has quit [Quit: lrocknrolmarc has no reason]
hellangel7 has joined #ruby
Fractional has quit [Remote host closed the connection]
iteratorP has quit [Remote host closed the connection]
Soda has joined #ruby
tlarevo_ has joined #ruby
ClarusCogitatio has joined #ruby
mkaesz has joined #ruby
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndRx has joined #ruby
<Macaveli>
Test
paolooo has quit [Ping timeout: 246 seconds]
beemo has quit [Remote host closed the connection]
ClarusCogitatio has quit [Ping timeout: 245 seconds]
korpz has quit [Remote host closed the connection]
dumdedum has joined #ruby
timonv_ has quit [Remote host closed the connection]
cap has quit [Ping timeout: 240 seconds]
timonv_ has joined #ruby
DivineEn1ity has quit [Ping timeout: 240 seconds]
<tlarevo_>
Fractional: Socket programing can be bit tricky I too have done it only few times I used JRuby for one which is now in production its a Listener server
klaut has quit [Remote host closed the connection]
ClarusCogitatio has joined #ruby
charliesome has quit [Quit: zzz]
timonv_ has quit [Ping timeout: 245 seconds]
ctp has joined #ruby
weemsledeux has joined #ruby
weemsledeux has quit [Changing host]
weemsledeux has joined #ruby
DivineEntity has joined #ruby
skaflem has joined #ruby
InhalingPixels has joined #ruby
toastynerd has joined #ruby
Zebroid has joined #ruby
mr_foobar_baz has joined #ruby
InhalingPixels has quit [Ping timeout: 244 seconds]
druznek has joined #ruby
kyb3r_ has joined #ruby
koderok has quit [Quit: koderok]
kyb3r_ has quit [Max SendQ exceeded]
kyb3r_ has joined #ruby
bearish has quit [Remote host closed the connection]
Zebroid has quit [Ping timeout: 240 seconds]
toastynerd has quit [Ping timeout: 255 seconds]
gruz0[russia] has joined #ruby
craigp has quit [Remote host closed the connection]
gauravagarwalr has quit [Remote host closed the connection]
bearish has joined #ruby
craigp has joined #ruby
pandaant has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
Wolland has joined #ruby
iteratorP has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Wolland has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
sparrovv has quit [Remote host closed the connection]
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has quit [Ping timeout: 245 seconds]
kaspertidemann has quit []
PanPan has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]]
blackmesa has joined #ruby
<shevy>
anyone knows how to make a square root character with my keyboard???
hellangel7 has quit [Remote host closed the connection]
<shevy>
ah it won't work anyway
<shevy>
guess I have to change encoding
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
rocknrollmarc has joined #ruby
anaeem1_ has quit [Ping timeout: 240 seconds]
<rocknrollmarc>
hey guys can anyone tell me how to require or load my bin/ folder so I can sue it with rspec for tdd a command line app
<Wetai>
try require_relative '../bin/Train'
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rocknrollmarc>
ok thanks Wetai, is that require_relative new Ive never seen it before
ctp has joined #ruby
<rocknrollmarc>
another question is it enough to load it in my spec_helper or do I need to load it in my spec to
<Hanmac>
shevy you mean this? "√" as far as i see there is no shortcut for that in my setted keyboardlayouts
<shevy>
we need better keyboards
Czupa has quit [Client Quit]
wald0 has joined #ruby
Shidash has quit [Ping timeout: 240 seconds]
<Wetai>
I don't know when it was introduced, It's just not a very common thing from what I've seen. I think as long as you add it to spec_helper and then require spec_helper it should be fine, but I'm having issues with rspec to so I'm not much of a knowledge base!
sandelius has joined #ruby
Xeago has quit [Remote host closed the connection]
day is now known as Suzuka_
<rocknrollmarc>
;) yes I know what you mean I spend more time fixing my setup then actualy coding
zequix has joined #ruby
<workmad3>
rocknrollmarc: it's also not very common to have a large amount of stuff in a script in bin/
<shevy>
welcome to test driven development!
iamjarvo has joined #ruby
spider-mario has joined #ruby
<workmad3>
rocknrollmarc: a common pattern that works with TDD is for there to be a tiny amount of untested code in the bin script that simply creates an instance of a command-line app class and passes in the ARGV array
<workmad3>
rocknrollmarc: you can then write tests around the class you've written, passing in your own array instead of ARGV
<aep>
is there any framework that supports synchronous long running tasks?
<aep>
and... alot of them
Suzuka_ is now known as day
<workmad3>
aep: do you mean synchronous or asynchronous?
<workmad3>
aep: because normally with synchronous tasks, you just well... run them :P
<aep>
no, synchrnous.
<workmad3>
aep: or do you mean running a lot of them concurrently
<aep>
threads basically, but a lot of them
<aep>
yes
<aep>
with an http api to query their state and stuff
spider-mario has quit [Remote host closed the connection]
timonv_ has joined #ruby
qba73 has quit []
<workmad3>
aep: so you want a framework that can take synchronous tasks and make them asynchronous and queryable...
<aep>
yeah!
Muz_ is now known as Muz
<workmad3>
gl with that :P
<aep>
i know right :D
mengu has joined #ruby
Soda has quit [Remote host closed the connection]
<tlarevo_>
aep: May be what you are looking for is Celluloid
Xeago has joined #ruby
<workmad3>
things like event-machine deferred tasks can handle the making them synchronous... but to make them queryable you need to modify the task to make them fundamentally asynchronous and updating status
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
techsethi has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
goodenough has quit [Remote host closed the connection]
qba73 has joined #ruby
<workmad3>
(deferred tasks simply take a block of code and run them in a background thread, with something like a promise wrapper that simply waits for the thread to complete or error... no fine-grained status)
oo_ has joined #ruby
<aep>
nah that's cool.
<aep>
if the task needs to report something in the middle, there should probably be some inter-thread comunication thing
<aep>
this celluloid thing looks cool
<workmad3>
actors are fun :)
spider-mario has joined #ruby
kyb3r_ has quit [Quit: Leaving]
<rocknrollmarc>
dir = "/Users/marc/workspace/cucumber/thoughtworks/train"
<shevy>
I just replaced it with a ruby script and removed the .pl file
<workmad3>
shevy: you lie, that's no perl script
<workmad3>
shevy: you can read it :P
echooo has quit [Ping timeout: 245 seconds]
shredding has quit [Client Quit]
cap has quit [Ping timeout: 240 seconds]
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
shevy: if it was truly a perl script, it would be a 3 line perl haiku of unintelligable symbols that looks like a cat rolled over the keyboard
<workmad3>
kephra: for autoconf, I suspect you'd want to look for a ruby.h header btw
<kephra>
workmad3, but the ruby.h could be everywhere ;-(
<shevy>
and it may not even be there!
<workmad3>
kephra: that's true for pretty much any include header :P
<shevy>
welcome to the beauty of *nix
<kephra>
as Ruby/Rails in Debian is broken, and therefor ruby must be installed by hand. e.g. in /usr/local, in /opt/ or somewhere else
sparrovv has joined #ruby
gauravagarwalr has quit [Read error: Connection reset by peer]
gauravag_ has joined #ruby
rdark has quit [Ping timeout: 240 seconds]
mkaesz has quit [Ping timeout: 245 seconds]
maximski has quit []
zettam_ has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
timonv_ has quit [Remote host closed the connection]
<workmad3>
kephra: the joy is that, even if you detect via something like 'ruby -r extconf' that the headers and libs exist, you'd still need to then figure out where they are for something like autoconf to be able to build against it
<kephra>
I'll delegate this to extconf.rb
rdark has joined #ruby
<workmad3>
kephra: and if you're relying on ruby installed either by hand or by rvm/ruby-build/ruby-install, how are you planning on handling user installed versions? or version upgrades?
zettam_ has quit [Read error: Connection reset by peer]
* workmad3
is now wondering why things like ruby-build and ruby-install don't provide a ruby.pc file for pkg-config
chth0n has quit [Ping timeout: 272 seconds]
zettam has quit [Ping timeout: 255 seconds]
<shevy>
good question
<shevy>
where is the ruby.pc
<shevy>
python-2.7.pc python-3.4.pc
craigp has joined #ruby
<shevy>
ruby-1.9.pc ruby-2.1.pc
<shevy>
ohhh
<shevy>
they could just copy paste that!
chth0n has joined #ruby
narcan has joined #ruby
<kephra>
workmad3, either the right ruby is in path, or not
<workmad3>
kephra: what about when the right ruby is in the path, you build and then they change the path?
<Hanmac>
kephra: ruby in debian is not broken ... it does make sense that the dev parts are not shipped with main ruby ...
druznek has joined #ruby
<workmad3>
kephra: or when they remove the old version?
<Hanmac>
because debian does ship some gems as debian packages and for them you do not need the dev stuff
<kephra>
currently not my problem, workmad3 - I'll later plan to provide a `make gem` step to produce a gem - but not now
Takle has quit [Remote host closed the connection]
Guest83388 is now known as bl4ckdu5t
bl4ckdu5t has quit [Changing host]
bl4ckdu5t has joined #ruby
<workmad3>
kephra: you're making it your problem by not passing the buck onto the dev to make sure their include and lib paths are set up ;)
<workmad3>
kephra: or delegating to the system package manager
<workmad3>
kephra: also, any reason you're not packaging as a gem already? which already includes mechanisms to build native extensions out the box
sk87 has joined #ruby
<kephra>
because ruby is only one of many supported languages/frameworks for my lib
<kephra>
and you do not want php, lua or python code in your gem
havenwood has joined #ruby
* Hanmac
has manymany C++ code in his gems ;P
Takle has joined #ruby
<kephra>
btw, Hanmac - I'm still searching for someone to delegate the `make gem` part
<kephra>
i'm not using ruby myself - and do not plan to use ruby
<kephra>
so I have no clue about ruby infrastructure
<Hanmac>
kphra why not "rake" ? that can put out a gem for you
<apeiros>
workmad3: afaik those are not the only conditions
iamjarvo has joined #ruby
TorpedoSkyline has joined #ruby
<apeiros>
workmad3: iirc it was something about large data packages being slower over udp too, even under optimal circumstances
Grantlyk has joined #ruby
<kephra>
Hanmac, limited time to read the docs, and to work into ruby - i'm already at next language
<apeiros>
workmad3: above was re udp vs tcp
<workmad3>
apeiros: ah yeah, with UDP and large packets, you'd have to implement some sequencing and reconstruction in your application protocol rather than it happening in the UDP protocol
banister has joined #ruby
sepp2k has joined #ruby
<apeiros>
workmad3: I thought it was also slower on the protocol level. something about udp having more overhead then because it needs more "packages" or somesuch
<apeiros>
don't really remember :)
<workmad3>
apeiros: hmm, I thought UDP had less overhead than TCP
<apeiros>
workmad3: that was the point of the article I'm now searching - it's iirc only true if you have small packages
<Hanmac>
it does as far as i remember
<Hanmac>
UDP is some how like twitter ... you talk and talk without caring if the otherone does listen or understand you ;P
<workmad3>
apeiros: and do you mean packets rather than packages? :)
<apeiros>
yes. but it might be the wrong term still :)
<apeiros>
let me see whether I can find the article again
<workmad3>
apeiros: there are many cases where UDP is preferable though... such as games
Takle has quit [Remote host closed the connection]
<workmad3>
apeiros: where it doesn't matter if a packet is received if it arrives too late... it's better for games to use UDP and throw away packets that are in the 'past'
<apeiros>
sure, there's a reason to have udp after all
<workmad3>
or at least, some games :)
<apeiros>
real time games, yes
<apeiros>
in a turn-by-turn game you'd still want tcp :)
<workmad3>
sure :)
<kephra>
in intranet you could use jumbo frames for large UDP packets
cap has joined #ruby
jhass|off is now known as jhass
<kephra>
e.g. secondlife intranet has 20kb jumbo frames
inbox has joined #ruby
<apeiros>
workmad3: ah, I think the case was with lots of small packets. one answer below.
<kephra>
so once can pass a script image within one UDP frame
marr has quit [Ping timeout: 245 seconds]
<workmad3>
apeiros: ah yeah, I see it now... makes sense
<apeiros>
it's not the article I had in mind, but iirc it talks about the same issue
<workmad3>
apeiros: I like that guy's point of 'Use TCP unless you have reasons not to'
<apeiros>
hm, now I'm really curious why DNS uses UDP
<workmad3>
basically a 'Use the reliable, in-sequence mechanism unless you know it's unsuitable'
<jhass>
apeiros: I guess it was just faster / less traffic back then
<apeiros>
probably
<workmad3>
apeiros: hmm... can you do broadcast with TCP?
<apeiros>
smaller pipes so it mattered more
<workmad3>
not sure you can...
anaeem1_ has joined #ruby
shredding has joined #ruby
<apeiros>
I'd have to google that :)
<apeiros>
but where does DNS broadcast?
<workmad3>
my quick google indicates that TCP is unicast
nuck has quit [Ping timeout: 244 seconds]
txdv has joined #ruby
<workmad3>
ah... for some reason I thought DNS queries and updates were multicast
<jhass>
eh, isn't that a layer down?
txdv has quit [Client Quit]
<jhass>
broadcast and unicast are IP concepts, aren't they?
nuck has joined #ruby
<jhass>
specifically IPv6 doesn't have broadcast anymore, just unicast
cap has quit [Ping timeout: 240 seconds]
<workmad3>
jhass: TCP is a leaky abstraction though... TCP requires acks and handshakes, which seem rather difficult to achieve with a multicast
Cheezebox has quit [Remote host closed the connection]
<CodePulsar>
Watch until the end for a good laugh
failshel_ has joined #ruby
djcp has left #ruby ["WeeChat 0.4.3"]
nathankleyn has quit [Client Quit]
yekta has quit [Ping timeout: 264 seconds]
emmesswhy has joined #ruby
arya_ has joined #ruby
yekta has joined #ruby
larissa has joined #ruby
failshell has quit [Ping timeout: 244 seconds]
cap has joined #ruby
xhoy_ has joined #ruby
coreycondardo has joined #ruby
blackmesa has quit [Remote host closed the connection]
SouL has joined #ruby
<pontiki>
i haven't got time to watch it all
<pontiki>
what's the laugh?
blackmesa has joined #ruby
<shevy>
awww
<shevy>
is there someone naked
snath has quit [Ping timeout: 244 seconds]
<mikecmpbll>
yeah, me.
gtrak has joined #ruby
Rollabunna has joined #ruby
<xhoy_>
hi! i have this code, and it works, but it feels like this i not the best patern, but i have no clue where to look/search for beter paterns: https://gist.github.com/xhoy/249e0638f4b16bc52a05
alexju has joined #ruby
<shevy>
mikecmpbll hehe
<mikecmpbll>
iamjarvo has joined #ruby
<shevy>
I am not sure what this code
<shevy>
it seems to modify the array?
<shevy>
in this case you might want to prefer .map perhaps
<xhoy_>
yeah
<mikecmpbll>
xhoy_: there is no e[3], too.
<xhoy_>
no it does something different but i extracted the peace (with the IF)
<mikecmpbll>
in any of them
<xhoy_>
ow sorry changed that :P
ta has quit [Remote host closed the connection]
<shevy>
:P
<xhoy_>
its more like is there a beter way to define "comment" then this?
beef-wellington has joined #ruby
<mikecmpbll>
why would you check for e[2], then check on the next line?
jespada has quit [Remote host closed the connection]
ta has joined #ruby
<mikecmpbll>
if e[2]; comment = e[2] || "xyzyasdf"
diegovio1 is now known as diegoviola
<mikecmpbll>
is the same as comment = e[2] || "dajfeac"
<mikecmpbll>
kind of.
<xhoy_>
yeah e[2] should be e[1]
<mikecmpbll>
what.
<xhoy_>
so IF e[1] true i like to set a default when not already filled
<xhoy_>
refresh:0
<mikecmpbll>
how many iterations before we get to the accurate fake code?
<pontiki>
there's really nothing much that can be said, pattern-wise, about this tiny fragment out of it's context
<mikecmpbll>
heh
<xhoy_>
mikecmpbll: yeah i did but then i removed a field in the array :0
<jhass>
xhoy_: please rewrite that with proper variable names, real values and more context
Xeago has quit [Remote host closed the connection]
<xhoy_>
so when e[1] == true and e[2] isn't set then get default
jespada has joined #ruby
banister has joined #ruby
<xhoy_>
if e[3] is set, use that
cap has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
<mikecmpbll>
what if e[1] is false and there's no e[2]?
<mikecmpbll>
bork
toastynerd has joined #ruby
<jhass>
comment = e[2]; comment ||= "default" if e[1] ?
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
a "pattern" is not just a fragment of code
toastynerd has quit [Ping timeout: 240 seconds]
poulet_a has quit [Quit: Quitte]
<jhass>
idiom might be the better term here
proflonghair has quit [Quit: Connection closed for inactivity]
poulet_a has joined #ruby
<xhoy_>
oke ;)
<pontiki>
yes
<xhoy_>
but how do you search for these kind of idiom's?
<pontiki>
in this case, searching for an idiom
<jhass>
xhoy_: eval-in is for demo purposes, use irb or pry locally to test stuff
<pontiki>
read code
<xhoy_>
jhass: yeah, but i had an only parters but couldn't get an url :)
Xeago has quit [Ping timeout: 245 seconds]
Apocalypse has quit [Quit: Input/Output Error]
<pontiki>
wth does that even mean?
<xhoy_>
parser :)
<shevy>
partners!
<xhoy_>
dunno i have a typing problem today :)
<shevy>
as long as you don't have a drinking problem
<pontiki>
how about the last part
<pontiki>
"but couldn't get a url"
<xhoy_>
let me see if i can create a beter idiom in eval
nerium has quit [Quit: nerium]
diegoviola has quit [Read error: Connection reset by peer]
<xhoy_>
pontiki: yeah it didn't create a shareable url :)
bradleyprice has quit [Remote host closed the connection]
Zebroid has quit [Ping timeout: 240 seconds]
hellangel7 has quit [Remote host closed the connection]
<pontiki>
you made a gist once, can't do it again?
Zenigor has joined #ruby
whyy has quit [Ping timeout: 255 seconds]
bradleyprice has joined #ruby
spastorino has joined #ruby
<xhoy_>
yeah ofcz :)
<xhoy_>
but i use eval.in now :)
krz has joined #ruby
<jhass>
xhoy_: eval-in is for demo purposes, use irb or pry locally to test stuff
oo_ has quit [Ping timeout: 255 seconds]
nerium has joined #ruby
diegoviola has joined #ruby
nerium has quit [Client Quit]
tylerkern has joined #ruby
jmbrown412 has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
jmbrown412 has joined #ruby
frankle has joined #ruby
brothmars has joined #ruby
theharshest has quit [Ping timeout: 245 seconds]
shackleford has joined #ruby
<axilla>
what does everyone here use for ticketing system? Any recs? We're doing an audit of our services we're paying for and I'd like to replace lighthouse with something better. What do you guys suggest?
<axilla>
used it about 5 years ago, changed a lot?
<axilla>
worth looking at again"
<axilla>
?
<xhoy_>
for a service desk i would use OTRS, for programming/bug tracking JIRA
<xhoy_>
axilla: yes
<axilla>
cool
SilkFox has quit [Ping timeout: 260 seconds]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xhoy_>
Atlassian is only 8 years old, so 5 years ago it was kinda new :)
bradleyprice has quit [Ping timeout: 260 seconds]
<xhoy_>
jhass: thanks for the help !
shackleford has quit [Read error: Connection reset by peer]
Boohbah has quit [Ping timeout: 264 seconds]
<xhoy_>
ow they are a bit older, but have come a long way in the last few years
<axilla>
wow yea it has changed
arya_ has quit [Ping timeout: 255 seconds]
<xhoy_>
and the integration with all other dev tools is realy awsome
arya_ has joined #ruby
jmbrown412 has quit [Ping timeout: 240 seconds]
Boohbah has joined #ruby
Hobogrammer has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
tylerkern has joined #ruby
tylerkern has quit [Read error: Connection reset by peer]
tylerkern has joined #ruby
philcris_ has joined #ruby
<axilla>
we;re thinking about switching to hipchat too
<axilla>
so =-/
<axilla>
atlassian gonna get some business :)
<axilla>
we currently use campfire.
hellangel7 has joined #ruby
TieSoul has joined #ruby
MartinCleaver has joined #ruby
<axilla>
we're an all remote team that lives in the same state.. We have a co-work office we visit if we like. So we're really trying to improve our collaboration abilities.
jrhe_ has joined #ruby
<xhoy_>
didn't know they had a service desk thing
tkuchiki has quit [Remote host closed the connection]
<xhoy_>
but i dont see why i should pay that mutch for 2 extra features :P
<axilla>
we use desk..
<axilla>
and by state i mean microdot on the map everyone thinks is part of canada lol.
philcris_ has quit [Ping timeout: 246 seconds]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
InhalingPixels has joined #ruby
weemsledeux has joined #ruby
Takle has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
zz_jrhorn424 is now known as jrhorn424
badhatter has joined #ruby
davedev24_ has joined #ruby
nerium has joined #ruby
Grantlyk has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
aspiers has joined #ruby
Grantlyk has joined #ruby
Soda has quit [Remote host closed the connection]
<qmfnp>
axilla: have you tried slack yet?
TorpedoSkyline has joined #ruby
Ilyas_ has joined #ruby
diegoviola has quit [Ping timeout: 246 seconds]
johnmolina has joined #ruby
easier has quit [Quit: easier]
<xhoy_>
axilla: there is a problem with jira service desk :P
<xhoy_>
it turns out you need to pay for every customer
Ilyas has quit [Ping timeout: 246 seconds]
<Nowaker>
axilla: yes, jira changed a lot. a whole lot.
<Nowaker>
you probably remember jira 3.x
jxf has quit [Ping timeout: 240 seconds]
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspiers has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
<Nowaker>
axilla: regarding hipchat... it works, but slack is way better.
tobago has quit [Read error: Connection reset by peer]
sk87 has joined #ruby
<Nowaker>
the feature i like in hipchat is video chats. works on linux.
<Nowaker>
but for text chats slack is just better.
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klaut has joined #ruby
yfeldblum has joined #ruby
centrx has joined #ruby
Grantlyk has quit [Read error: Connection reset by peer]
Grantlyk has joined #ruby
asteve has joined #ruby
bwilson has joined #ruby
arturaz has joined #ruby
fabrice31 has quit [Remote host closed the connection]
starkhalo has joined #ruby
iamjarvo has joined #ruby
banister has quit [Read error: Connection reset by peer]
banister_ has joined #ruby
banister_ has quit [Max SendQ exceeded]
gerep has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
banister has joined #ruby
TorpedoSkyline has joined #ruby
banister has quit [Max SendQ exceeded]
gaussblurinc1 has joined #ruby
gerep has quit [Read error: Connection reset by peer]
gerep has joined #ruby
alex88 has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<gerep>
I have this code https://gist.github.com/gerep/1372466556fb6cb45fa9 where I split the file into smaller files and then I put them all together generating the file again. This is running well on a Mac computer but not on my Linux, both computer are using the same Ruby version 2.0.0
banister has joined #ruby
<gaussblurinc1>
could I change item property's value inside .select or .reject? like this: a.reject{|i| i.special_value = self.value(i)}
ffranz has joined #ruby
<gerep>
The file 22.jpg is created but when I open it I get this message: Error interpreting JPEG image file (Application transferred too few scanlines)
TorpedoSkyline has quit [Client Quit]
cocotton has joined #ruby
endless_walrus has joined #ruby
TorpedoSkyline has joined #ruby
Lewix has joined #ruby
gerep has quit [Read error: Connection reset by peer]
divi_ has joined #ruby
gerep has joined #ruby
TorpedoSkyline has quit [Client Quit]
Grantlyk has quit [Remote host closed the connection]
noroot__ has quit [Quit: noroot__]
speaking1ode has quit [Quit: leaving]
abuzze has quit [Remote host closed the connection]
georgelappies has joined #ruby
abuzze has joined #ruby
jprovazn has quit [Quit: Leaving]
shredding has quit [Quit: shredding]
abuzze_ has joined #ruby
Grantlyk has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
ibot has quit [Quit: Page closed]
agjacome has quit [Quit: leaving]
yekta has quit [Quit: yekta]
charliesome has joined #ruby
Zelpha has quit [Ping timeout: 255 seconds]
cap has joined #ruby
tylerkern has quit [Read error: Connection reset by peer]
tylerkern has joined #ruby
Zelpha has joined #ruby
Grantlyk has quit [Remote host closed the connection]
diegoviola has joined #ruby
jherbst has joined #ruby
abuzze has quit [Ping timeout: 260 seconds]
gerep has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
gerep has joined #ruby
craigp has quit [Remote host closed the connection]
bradleyprice has joined #ruby
arya_ has quit [Ping timeout: 255 seconds]
<jhass>
gaussblurinc1: you could but you shouldn't
clov3r has joined #ruby
toastynerd has joined #ruby
<jhass>
gerep: try each_byte instead of each_char
gerep has quit [Read error: Connection reset by peer]
gerep has joined #ruby
<jhass>
germanstudent: also you leak @i file handles, use File.read or the block form of File.open
Xeago_ has quit [Ping timeout: 240 seconds]
<jhass>
gerep: ^ sorry germanstudent
sambao21 has quit [Quit: Computer has gone to sleep.]
<gerep>
jhass, nah....I'll try that =)
<jhass>
gerep: you leak even more file handles if anything goes wrong while trying to write, use File.write or the block form of File.open there too
<gerep>
jhass, ok
craigp has joined #ruby
bl4ckdu5t has quit [Ping timeout: 256 seconds]
enebo has joined #ruby
treehug88 has joined #ruby
<gaussblurinc1>
jhass: yeah, I know but .. uh
Zebroid has joined #ruby
<jhass>
gaussblurinc1: just don't
cap has quit [Ping timeout: 240 seconds]
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
<gaussblurinc1>
jhass: :(
<jhass>
why would you need it anyway?
tagrudev has quit [Remote host closed the connection]
fabrice31 has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
Guest8257 has joined #ruby
<gaussblurinc1>
jhass: i want to split array into three and all 3 predicates are 'nil or not nil' :( I could not on the fly change property of item, first I need to .select array items that match each of three predicates
<gerep>
jhass, using each_byte I get a Couldn't recognize image format
knightwrestle has joined #ruby
<jhass>
gaussblurinc1: gist with example input and desired output please
Zebroid has quit [Ping timeout: 240 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zeroNones has joined #ruby
onso has joined #ruby
<jhass>
gerep: get a tool to do a binary diff to check where it goes wrong
alpha123_ has quit [Remote host closed the connection]
Takle has joined #ruby
<dserodio>
hoelzro that's exactly what I'm doing, but I don't want the method to accept this path ("/tmp") when running from a production server
<gerep>
jhass, the problem was with my loop =)
<hoelzro>
dserodio: what sort of validation are you doing on this parameter?
Wolland_ has joined #ruby
sambao21 has joined #ruby
dexkiki has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
dmst has joined #ruby
apeiros has joined #ruby
sk87 has joined #ruby
aspires has joined #ruby
<dserodio>
hoelzro: if not path.starts_with("/srv/my_service") { abort "Invalid path" }
Takle has quit [Remote host closed the connection]
<jhass>
dserodio: how do you validate? File.exist? or something like that?
dmst has quit [Client Quit]
<jhass>
er, sorry
<hoelzro>
dserodio: what's the purpose of that validation?
Takle has joined #ruby
dmst has joined #ruby
<jhass>
dserodio: is that all? If so that will just pass if you pass that value in the test
<jhass>
no matter if it exists or not
michaeldeol has joined #ruby
<dserodio>
jhass: I'll write a file to this path later
<Hanmac>
gerep: i think i would use this: f.each_char.each_slice(10000).with_index { |s,i| IO.write("recibo#{i}", s.join) } and this : text = Dir["recibo*"].map { |s| IO.binread(s) }.join but imo there might be better ways to do that than this
sk87 has quit [Client Quit]
mozzarella has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
<jhass>
gerep: File < IO; I'd stick to File to make clear you're working with files
<gerep>
jhass, got that
Wetai has quit [Quit: Leaving]
<gerep>
Hanmac, thanks a lot =)
<gerep>
jhass, I like IO because the code is cleaner =)
<gerep>
jhass, but your point is great
ghr has quit [Ping timeout: 250 seconds]
<dserodio>
hoelzro basically, validating user input
<jhass>
gerep: I think you confuse shorter and cleaner
<hoelzro>
dserodio: but why does it matter whether or not the file is under '/srv/my_service'?
axsuul has joined #ruby
<gerep>
jhass, good point lol
Takle has quit [Read error: No route to host]
<jhass>
gerep: while shorter code is often cleaner, it's not an inherent property of clean code to be short
Takle_ has joined #ruby
<jhass>
I prefer clear over short
<gerep>
jhass, yes, you are correct...I'll rewrite it
<gerep>
jhass, now I know what happens hahaha
<gerep>
jhass, thanks a lot
TieSoul has joined #ruby
deric_skibotn has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
<dserodio>
hoelzro it's a script to install an RPM file to a yum repo. only /srv/my_service will be indexed and serverd by the yum repo
charliesome has joined #ruby
<jhass>
dserodio: hope you catch /srv/my_service/../../tmp/
Zebroid_ has quit [Remote host closed the connection]
<IotaSpencer>
(as I didn't get anything else and it went up beyond the window height)
Kricir has quit [Ping timeout: 260 seconds]
<dserodio>
jhass good point, I'll make sure to test for path traversal :)
<pontiki>
File.realpath
<jhass>
IotaSpencer: yes, that's how such methods work. Though I prefer to use them only for simple operations
gerep has quit [Read error: Connection reset by peer]
CodePulsar has quit [Remote host closed the connection]
<jhass>
IotaSpencer: also use the block form of File.open or convenience methods like File.write
gerep has joined #ruby
<dserodio>
thanks pontiki
W0rmDr1nk has quit [Ping timeout: 240 seconds]
<hoelzro>
dserodio: I would do something like pass in the root of the tree you're managing, and pass in some sort of temporary directory during testing
bearish has quit [Remote host closed the connection]
qba73 has quit []
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
divi_ has joined #ruby
<jhass>
dserodio: or make that directory a configuration option you can override in the test environment
hellangel7 has quit [Ping timeout: 240 seconds]
bricker`work has joined #ruby
<dserodio>
jhass ok, I'll try that. rspec doesn't define anything that I could test for, does it?
<IotaSpencer>
hmm, gonna try to have the code to set and read in the block where i need it
gerep has joined #ruby
tallas has joined #ruby
Takle_ has quit [Read error: Connection reset by peer]
Takle has joined #ruby
ghr has joined #ruby
davedev24_ has quit []
gerep has quit [Read error: Connection reset by peer]
<tallas>
im using gsub on a text with a öong regex and a match block. the replacement string is build according to the match. is it possible to skip replacement of an already matched string?
<tallas>
*long regex
<centrx>
code?
cocotton has quit [Remote host closed the connection]
gerep has joined #ruby
ptrrr has quit [Remote host closed the connection]
<workmad3>
nobitanobi: aww, why did you create two classes for your linked list?
djbkd has joined #ruby
dawkirst has quit [Ping timeout: 260 seconds]
<nobitanobi>
workmad3: one for the node itself, and another one as a wrapper of nodes.
<workmad3>
nobitanobi: you don't need the wrapper :P
<workmad3>
nobitanobi: and it's not a wrapper for nodes... it's a wrapper for a single node ;)
<nobitanobi>
workmad3: that's true
emmesswhy has quit [Quit: This computer has gone to sleep]
djbkd has quit [Remote host closed the connection]
<nobitanobi>
workmad3: I will try to do it just with the Node class.
djbkd has joined #ruby
<nobitanobi>
I am practicing common data structures with Ruby, preparing for interviews.
<gizmore>
Object is pretty common! (*joke*)
jottr has joined #ruby
nerium has quit [Quit: nerium]
falj has joined #ruby
CaptainJet has joined #ruby
<nobitanobi>
workmad3: if you just do with Node class, and you are asked to remove duplicate elements, if you that in an instance method of Node, you surely need to make sure that the node itself is the head, correct?
sambao21 has quit [Quit: Computer has gone to sleep.]
hellangel7 has quit [Max SendQ exceeded]
<pontiki>
the class or instance doesn't need to keep track of a head
emmesswhy has joined #ruby
<pontiki>
the consumer of the object does
poikon_ has quit [Remote host closed the connection]
<nobitanobi>
uh
tallas has left #ruby [#ruby]
wallerdev has joined #ruby
dmst has quit []
<jhass>
I disagree, that the list has a head is an implementation detail of it
<nobitanobi>
so that instance method to remove duplicates, would just iterate from the Node until it hits nil. Even if that Node is in the middle of "a list"
andrewstewart_ is now known as andrewstewart
gerep has quit [Read error: Connection reset by peer]
emmesswhy has quit [Read error: Connection reset by peer]
gerep has joined #ruby
<pontiki>
that's how i'd do it
emmesswhy has joined #ruby
<nobitanobi>
thanks for all your suggestions guys.
shackleford has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
shinobi_one has joined #ruby
<jhass>
nobitanobi: as you might guess I disagree with pontiki and workmad3 ;)
krisquigley has quit [Remote host closed the connection]
<nobitanobi>
jhass: yes :) But is so good to get different points of views
<nobitanobi>
I am really grateful
<pontiki>
yep; what jhass is also possible
<pontiki>
there are probably other legit views on implementing a linked list class as well
emmesswhy has quit [Read error: Connection reset by peer]
saarinen has joined #ruby
<nobitanobi>
yep
<eam>
look to Array, a List class should be nearly identical
sambao21 has joined #ruby
emmesswhy has joined #ruby
<eam>
(agreeing with jhass, if I'm reading this conversation right)
<jhass>
^ or LinkedList in Java, that it's linked is just an implementation details so the methods in the common List interface perform differently
Cheezebox has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<eam>
right
<nobitanobi>
Do you guys think is a good idea to try to solve the 'kind of interview problems of data structures' in Ruby?
<eam>
nobitanobi: absolutely
<nobitanobi>
the classic linked list, trees question
robbyoconnor has quit [Read error: Connection reset by peer]
<pontiki>
oh, yes, nobitanobi
<nobitanobi>
Usually people go with C or Java
<eam>
though it might be even better to -- yeah, do it in C
yfeldblum has joined #ruby
<nobitanobi>
eam: mmm
<eam>
as it forces you to be explicit about operations
<nobitanobi>
right
<nobitanobi>
my concern is my lack of C knowledge
<eam>
some manipulations are hard to express as an academic exercise in Ruby simply because everything is too easy
<nobitanobi>
yeah
<nobitanobi>
too high level
<nobitanobi>
anyway, thanks guys
<pontiki>
i was interviewing for a RoR job (short term), the tech interview was "insert and delete from singly-linked list" and the C++ just flew off my fingers
<eam>
still valuable to do it in ruby though, I think
OffTheRails has joined #ruby
<pontiki>
the interviewer was shocked and ran around to tell everyone
<pontiki>
i'm like "wut?"
<nobitanobi>
pontiki: :)
gaussblurinc1 has quit [Quit: Leaving.]
_djbkd has joined #ruby
johnmolina has quit []
<nobitanobi>
eam: so you would say: practice a little bit of C, so you can feel comfy answering 'low-level' questinos
alekst has joined #ruby
<pontiki>
(i did not get that job, because i ended up asking too many questions about their implementation)
<nobitanobi>
*questions
joonty has quit [Quit: Leaving]
<eam>
nobitanobi: can't hurt
gaussblurinc1 has joined #ruby
agjacome has quit [Quit: leaving]
<nobitanobi>
eam: +1
<nobitanobi>
back to it
<nobitanobi>
thanks guys!
thousandwich has joined #ruby
gerep has quit [Read error: Connection reset by peer]
sparrovv has joined #ruby
<eam>
one "just for fun" thing I wanted to do is to build a linux distro entirely on ruby
gerep has joined #ruby
<eam>
it should only be about a day's work to get the basics going
<jhass>
isn't shevy doing that?
<eam>
s he?
gaussblurinc1 has quit [Client Quit]
<eam>
is he?
djbkd has quit [Ping timeout: 246 seconds]
yetanotherdave has joined #ruby
<jhass>
he sometimes claims, sorta
<eam>
interesting
<nobitanobi>
eam: also one of my thoughts is... I am def trying to apply for Ruby gigs, so most likely 'C kind of questions' won't happen.
<eam>
I was going to make it a project for our interns
Pumukel has joined #ruby
<pontiki>
eam: using gem as the distro package manager?
<eam>
pontiki: more like, only one elf executable on the entire system: /usr/bin/ruby
<pontiki>
OOOOOOO
<pontiki>
plan 9 from rubyville
yfeldblum has quit [Ping timeout: 240 seconds]
amargherio has joined #ruby
<eam>
it wouldn't be too hard to write init and the busybox-level basics
<workmad3>
jhass: sorry, was creating a linked list without an explicit 'head' attribute ;)
<workmad3>
jhass: I'd tend to argue that a linked list is a recursive structure so any item within it could conceptually be the 'head' of a shorter linked list
<eam>
wouldn't shoot for, say, a C compiler or ld.so in ruby though
nerium has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
gkagan has quit [Ping timeout: 255 seconds]
<workmad3>
jhass: however, I'd also agree that a wrapper that keeps the head can make it more usable and also provide mechanisms for optimisation
<workmad3>
jhass: so yes, it's an implementation detail, not a semantic part of the linked list idea :)
<jhass>
I also prefer it as a place for defining operations on it
rdark has quit [Quit: leaving]
cocotton has joined #ruby
<jhass>
Node#each somehow feels silly to me
<workmad3>
jhass: I just created a LinkedList class
<workmad3>
jhass: LinkedList has @value and @next attributes, and operations are defined recursively
<workmad3>
I should probably have done my .append non-destructively too... but cba now :)
<Hanmac>
workmad3: doctorwho fan?
<workmad3>
Hanmac: new series on saturday!!!!
geggam has quit [Ping timeout: 264 seconds]
<workmad3>
Hanmac: it's like they planned it as a wedding anniversary gift for me :D :D :D
<pontiki>
w00tw00t!! new who!!
Fractional has joined #ruby
<pontiki>
dark doctor
wallerdev has quit [Ping timeout: 245 seconds]
gerep has quit [Read error: Connection reset by peer]
<Hanmac>
workmad3: i know ... i maybe could have seen it before because it seems it got leaked outside but i did not trust it
<shock_one>
Hi. How would I do "ssh -t john@server1 ssh bob@server2" with Net::SSH? Also, only server1 has an RSA key that allows to connect to the server2.
<jhass>
dopiee: you still seem confused about what contains what when. So you'll get nicer error messages like no method value for Array or no method each for Card
<shock_one>
In other words, I want to connect to server2 using server1 as a jump host.
AlSquire has quit [Quit: This computer has gone to sleep]
tylerker_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
omosoj has joined #ruby
Lewix has quit [Ping timeout: 272 seconds]
Pumukel has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
lw has quit [Quit: s]
weemsledeux has quit [Max SendQ exceeded]
weemsledeux has joined #ruby
weemsledeux has quit [Max SendQ exceeded]
lw has joined #ruby
weemsledeux has joined #ruby
weemsledeux has quit [Max SendQ exceeded]
FarlaTux has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
weemsledeux has joined #ruby
startupality has joined #ruby
blackmesa has joined #ruby
lw has quit [Client Quit]
mikecmpbll has joined #ruby
<dopiee>
cards[0].each{|suit, value| puts "#{suit} of #{value}"}
<dopiee>
give sme
reset has joined #ruby
<dopiee>
5 of
<dopiee>
Hearts of
Zenigor has quit [Remote host closed the connection]
troyready has quit [Quit: Leaving]
CodePulsar has joined #ruby
x1337807x has joined #ruby
jrhorn424 is now known as zz_jrhorn424
mlohstroh has joined #ruby
sparrovv has quit [Remote host closed the connection]
sparrovv has joined #ruby
<dopiee>
puts "#{cards[1][0]} of #{cards[1][1]}"
theRoUS has joined #ruby
<dopiee>
yay
theRoUS has quit [Changing host]
theRoUS has joined #ruby
Zenigor has joined #ruby
beemo has joined #ruby
Dusty_ has quit [Ping timeout: 255 seconds]
aspires has joined #ruby
gkagan has joined #ruby
jmurray has quit [Quit: jmurray]
sparrovv has quit [Ping timeout: 250 seconds]
icole has quit [Remote host closed the connection]
Zebroid has joined #ruby
shackleford has quit [Remote host closed the connection]
mlohstroh has quit [Quit: Leaving...]
mlohstroh has joined #ruby
icole has joined #ruby
<wasamasa>
this looks suspiciously like the code I evaluated with this channel bot another day
<wasamasa>
*the other
maximski has joined #ruby
mlohstroh has quit [Client Quit]
maximski has quit [Max SendQ exceeded]
thams has quit [Quit: thams]
Spami has joined #ruby
beemo has quit [Ping timeout: 250 seconds]
marr123 has quit []
mlohstroh has joined #ruby
maximski has joined #ruby
mlohstroh has left #ruby [#ruby]
maximski has quit [Max SendQ exceeded]
gkagan has quit [Ping timeout: 260 seconds]
mlohstroh has joined #ruby
maximski has joined #ruby
Spami has quit [Client Quit]
bluOxigen has quit [Ping timeout: 260 seconds]
thams has joined #ruby
jimms has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marr has joined #ruby
yfeldblum has joined #ruby
workmad3 has joined #ruby
Lewix has joined #ruby
brothmars has quit [Ping timeout: 260 seconds]
mikepack has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
mburns has quit [Disconnected by services]
speakingcode has joined #ruby
mburns has joined #ruby
gkagan has joined #ruby
carraroj has joined #ruby
sandelius has joined #ruby
hooper has joined #ruby
chrishough has joined #ruby
jimms has quit [Read error: Connection reset by peer]
thams has quit [Quit: thams]
dumdedum has quit [Quit: foo]
Sauvin has quit [Read error: Connection reset by peer]
thams has joined #ruby
krisquigley has joined #ruby
Fraction_ has joined #ruby
goodenough has joined #ruby
RichardLitt has joined #ruby
thams has quit [Client Quit]
patteh has quit [Remote host closed the connection]
<Fraction_>
Question regarding Ruby networking. Once I have established a TCP connection, how can I program so the client sends packets to the server too and not the only way around?
tlarevo has quit [Remote host closed the connection]
kephra has quit [Ping timeout: 272 seconds]
<wasamasa>
Fraction_: use nike.rb
<Fraction_>
and not the other way around*
<jhass>
Fraction_: you did simply try writing to the connection on the client?
tlarevo has joined #ruby
<jhass>
and reading on the server
patteh has joined #ruby
benlieb has joined #ruby
thams has joined #ruby
<ericwood>
just read from the socket
<ericwood>
unless I'm missing something?
jimms has joined #ruby
_djbkd has quit [Remote host closed the connection]
<benlieb>
This is embarrassing, but I can't figure out why this defines r as nil: r = true unless defined?(r)
<benlieb>
workmad3: so these statements behave differently: unless defined?(r); r = true end, r = true unless defined?(r)
davedev24_ has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
omosoj has quit [Ping timeout: 240 seconds]
<workmad3>
benlieb: yes
<jhass>
Fraction_: you have to do one of two things: if you want to continuously read and write on both sides you need to spawn threads for each operation on each side. If you want to avoid learning threads you need to define a protocol that dictates after which message which side reads and which side writes
aspires has quit []
<benlieb>
I guess this is basically a boundary condition
robustus has quit [Ping timeout: 250 seconds]
vinky_ is now known as vinky
<benlieb>
those structures probably have the same "effect" in 99% of cases
<benlieb>
or more
<workmad3>
benlieb: the second one can be rewritten as 'r = true unless false' btw
Duikb00t has quit [Ping timeout: 250 seconds]
<workmad3>
err, r = true unless true even
Pumukel has quit [Ping timeout: 245 seconds]
renderfu_ has joined #ruby
<benlieb>
but because there's assignment of the thing, because defined? is in question, and because the thing defined? is checking is the thing being assigned
<benlieb>
hm.
aspires has joined #ruby
<Fraction_>
jhass: ericwood: I just figured it out. Thanks a lot! I can not believe it was that simple. I thought you had to do it some other way around. Once again, thanks a lot! I really appreciate all the help over the last year! :)
<benlieb>
I'll try to put this in my back pocket for
<benlieb>
the futuer
<workmad3>
benlieb: it's basically an edge case where you refer to the local variable later on in the same statement as initially creating it
i_s has joined #ruby
<Fraction_>
jhass: So I should start a new thread for read and one for write for every client establishing a connection?
<workmad3>
>> a = b
<eval-in>
workmad3 => undefined local variable or method `b' for main:Object (NameError) ... (https://eval.in/181083)
<centrx>
>> a = b unless b = a
<eval-in>
centrx => undefined local variable or method `b' for main:Object (NameError) ... (https://eval.in/181084)
mikepack has joined #ruby
maroloccio has quit [Read error: Connection reset by peer]
<jhass>
Fraction_: there's no general yes and no for that question. It depends a lot on what you're doing
robustus has joined #ruby
patteh has quit [Quit: leaving]
Kricir has joined #ruby
renderful has quit [Ping timeout: 245 seconds]
<Fraction_>
jhass: Ok, thanks a lot!
patteh has joined #ruby
segfalt has joined #ruby
<benlieb>
I can see how this behavior can come in handy, but it feels dangerous to write code that takes advantage of this edge case.
<workmad3>
benlieb: yes, it's not something you should try to use IMO
ryanlee has joined #ruby
maroloccio has joined #ruby
<workmad3>
benlieb: but it's useful to be aware of it so you can spot when it's biting you in the ass :)
<workmad3>
benlieb: a few times recently, I've encountered people in #rubyonrails doing stuff like 'some_association = some_association.where(foo: "bar")' in a rails model
<workmad3>
benlieb: and getting confused as to why they get a NoMethod error on NilClass...
mikepack has quit [Ping timeout: 250 seconds]
tylerkern has joined #ruby
chishiki has joined #ruby
Darkchaos has quit [Ping timeout: 272 seconds]
Kricir has quit [Ping timeout: 240 seconds]
Darkchaos has joined #ruby
bedouin__ is now known as bedouin
<benlieb>
so let me put all this another way, to see if I've actually learned something
patteh has quit [Client Quit]
<benlieb>
in prose ;)
cy has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
the variable, it is nil if it is defined despite not being defined
sambao21 has quit [Quit: Computer has gone to sleep.]
patteh has joined #ruby
krisquigley has quit [Remote host closed the connection]
Cheezebox has joined #ruby
patteh is now known as Patteh
tylerkern has quit [Client Quit]
<benlieb>
If I want to set a default value for something that may not yet be defined, I have to put the check for defined before an = or check for nil if after...
Kricir has joined #ruby
<benlieb>
centrx: yes that seems to be the case, and it kind of bugs me
jottr has joined #ruby
<centrx>
benlieb, Why do you need to use defined? at all?
onso has joined #ruby
divi_ has joined #ruby
toastynerd has quit [Remote host closed the connection]
<benlieb>
centrx: well, up until about 20 minutes ago, I thought it was useful
Shidash has joined #ruby
<centrx>
"defined? expression tests whether or not expression refers to anything recognizable (literal object, local variable that has been initialized, method name visible from the current scope, etc.)."
<workmad3>
benlieb: end of the day, it's a local variable... if you can't pretty much instantly tell if it's defined at the point you're using it, you've got a method that is most likely too complicated and you should refactor it
<benlieb>
but as someone mentioned earlier, a hash would probably make these ambiguities go away and make my code more sturdy
thams has quit [Quit: thams]
<benlieb>
in this case, I'm actually inside of a rails partial
cap has quit []
RustyShackleford has quit [Ping timeout: 244 seconds]
<workmad3>
benlieb: ah, and you're checking if someone has set a particular value with locals ?
<benlieb>
you can pass a hash in like :locals => {:myvar => @myvar}, and then inside the partial myvar is defined
<benlieb>
so I want to check if it was defined and set it to some default if not
<workmad3>
benlieb: my advice - if the partial is called without an expected local or method available - blow up
saarinen has quit [Quit: saarinen]
andrewlio1 has quit [Quit: Leaving.]
<benlieb>
workmad3: but it's not expected, in fact I'm trying to make it not expected
<workmad3>
benlieb: and make liberal use of ruby making method calls and locals indistinguishable ;)
<benlieb>
by setting this default value
<workmad3>
benlieb: i.e. by providing a method in a helper that provides the default value that can be shadowed by a locals var if necessary ;)
amargherio has quit [Read error: Connection reset by peer]
nanoyak has quit [Quit: Computer has gone to sleep.]
onso has quit [Ping timeout: 250 seconds]
tylerkern has joined #ruby
saarinen has joined #ruby
toastynerd has joined #ruby
<benlieb>
workmad3: I see how that would get the job done but this is basically a pattern that exists in every partial, I could have a new method for every potential partial variable...
<centrx>
benlieb, Why doesn't .nil? work?
<benlieb>
centrx: it does
toastynerd has quit [Remote host closed the connection]
<benlieb>
Like I said earlier "If I want to set a default value for something that may not yet be defined, I have to put the check for defined before an = or check for nil if after..."
<workmad3>
benlieb: my normal strategy is to use decent_exposure (or similar hand-rolled methods) to define the interface a controller can use
<centrx>
benlieb, defined?(x) && x.nil?
<workmad3>
benlieb: and then my partials can make use of those to grab data that can be shadowed by locals
<benlieb>
centrx: it just reads wrong in my opinion.
<centrx>
benlieb, Use only instance variables in your partials and no locals?
<benlieb>
I don't want someone reading my code thinking "and here we're checking for nil"
momomomomo has joined #ruby
<workmad3>
centrx: ewww
tylerkern has quit [Client Quit]
<workmad3>
centrx: that's probably worse :P
<benlieb>
when I'm actually trying to write code for a situation where the var might not be defined
emmesswhy has quit [Quit: This computer has gone to sleep]
<benlieb>
I think my final decision will to use an opts hash
decoponio has quit [Quit: Leaving...]
<benlieb>
because the options pattern is essentially defaults with overrides
maroloccio has quit [Quit: WeeChat 0.4.3]
tylerkern has joined #ruby
skaflem has quit [Quit: Leaving]
geggam has quit [Remote host closed the connection]
<workmad3>
benlieb: you could also consider the cells approach to views... I know, it's a bit extreme going for a completely different approach because of one issue but it's still an option :) https://github.com/apotonick/cells
toastynerd has joined #ruby
emmesswhy has joined #ruby
geggam has joined #ruby
<centrx>
benlieb, but you see in your code if you define the variable somewhere else right?
<benlieb>
I do it sometimes but writing this is ugly, but apparently the best option (no pun intended) :locals => { :opts => {:myvar => @myvar} }
<centrx>
benlieb, Is this just messed up because of how partials work?
shredding has joined #ruby
Fraction_ has quit [Remote host closed the connection]
<workmad3>
centrx: it's messed up because partials can have random local variables defined on them from the point they're rendered, with no way to specify an interface
<workmad3>
centrx: so yeah, it's messed up because of how partials are allowed to work :)
<centrx>
Rails strikes again
TieSoul has quit [Ping timeout: 255 seconds]
<benlieb>
but I like the hash approach because most developers know that hash[:nonexistant_key] is nil
<workmad3>
benlieb: apart from when it isn't... :P
georgelappies has quit [Remote host closed the connection]
<benlieb>
workmad3 please tell me you're kidding
<benlieb>
not another edge case?
<workmad3>
benlieb: default proc
failshel_ is now known as failshell
<benlieb>
workmad3: wassat
jprovazn has joined #ruby
<workmad3>
benlieb: I give you the fibonacci hash: fib = Hash.new{|h,k| (k == 0) ? h[k] = 1 : (k == 1) ? h[k] = 1 : h[k] = h[k - 1] + h[k-2]}
<workmad3>
benlieb: fib[x] will give you the fibonacci number x
<workmad3>
(don't use -ve numbers :P )
mikepack has joined #ruby
tylerkern has quit [Read error: Connection reset by peer]
<workmad3>
benlieb: you can also provide a simple default value
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benlieb>
interesting
maestrojed has joined #ruby
<benlieb>
I quit.
<workmad3>
benlieb: it's just that the default value for Hash#default_value is nil
<benlieb>
I'm going back to wordpress.
<workmad3>
heh
<benlieb>
just kidding
<workmad3>
sorry :)
rocknrollmarc has joined #ruby
<benlieb>
never used it
sparrovv has joined #ruby
<benlieb>
lol
lw has joined #ruby
<benlieb>
so this is my solution. speak now or forever hold your peace: opts[:r] = true if opts[:r].nil?
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
benlieb: opts.fetch(:r, true)
<centrx>
benlieb, Yes, a hash makes a lot of sense if you are expecting some values to be present and some absent
<workmad3>
benlieb: ^^ that lets someone specify nil
fabrice31 has joined #ruby
aspiers has quit [Ping timeout: 246 seconds]
<workmad3>
benlieb: fetch also has the advantage that if the value doesn't exist and no default is provided, it'll error
<benlieb>
workmad3: fetch doesn't set the key though
<workmad3>
benlieb: but it also doesn't overwrite a nil or false that's been explicitly set
geggam has quit [Remote host closed the connection]
dawkirst has joined #ruby
<workmad3>
benlieb: but end of the day, it's whichever works for you :)
dnyy_ has joined #ruby
geggam has joined #ruby
<benlieb>
workmad3: what if nothing works aaaahhh
<benlieb>
jk
<benlieb>
ok, I hate to ask this, but I want to try something
Shidash has quit [Ping timeout: 246 seconds]
ghr has joined #ruby
<workmad3>
benlieb: I've done opt hashes both ways... it really depends on if an explict nil is an allowed value or if that just means 'default val please'
brothmars has joined #ruby
<benlieb>
is there a hash method that "imports" all of the hash keys into the local space so that {:myvar => :foo}.localize will make myvar available?
<jhass>
okay, you know that's a bad idea
<jhass>
let's just pretend you never asked
fabrice31 has quit [Ping timeout: 260 seconds]
<benlieb>
jhass: yeah, I know, but in partials it's basically already happening that way via rails
<workmad3>
benlieb: more likely, all you want is at the top of your partial - 'opts.reverse_merge!(defaults here)'
<benlieb>
workmad3: that's exactly what I was going to do
<jhass>
benlieb: templating engines sadly are by no means a prime example of clean, well structured code
<workmad3>
benlieb: after that, just make use of opts ;)
<benlieb>
defaults.merge(opts).localize
<workmad3>
benlieb: no... opts.reverse_merge!
jonahR has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
<benlieb>
and then all my vars are automagically available
<workmad3>
benlieb: which will merge defaults into opts, preserving opts if it's set there
<workmad3>
benlieb: and then just opts[:whatever]
ghr has quit [Ping timeout: 255 seconds]
rezzack has joined #ruby
omosoj has joined #ruby
<benlieb>
workmad3: I'll have to do it that way since there's no "localize" method for hash
DEA7TH has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<workmad3>
benlieb: which is a good thing :P
<benlieb>
but if there were, I would merge opts into defaults
<benlieb>
but yeah
JoshGlzBrk has joined #ruby
Pharaoh2 has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
philcrissman has joined #ruby
optiz0r has joined #ruby
thams has joined #ruby
<benlieb>
anyone know if there is a way to access the :locals hash from inside a partial instead of the local variables with the same name?
shock_one has quit [Quit: Computer has gone to sleep.]
Morkel_ has joined #ruby
sparrovv has quit [Remote host closed the connection]
<nobitanobi>
speaking of templating engines... Currently working with Liquid
sparrovv has joined #ruby
dopiee has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
philcrissman has quit [Ping timeout: 255 seconds]
mikepack has quit [Remote host closed the connection]
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
treehug88 has quit [Ping timeout: 260 seconds]
naypra has quit [Quit: Leaving]
saarinen has quit [Quit: saarinen]
yfeldblum has quit [Ping timeout: 240 seconds]
yekta has joined #ruby
omosoj has quit [Ping timeout: 245 seconds]
shock_one has joined #ruby
saarinen has joined #ruby
sparrovv has quit [Ping timeout: 250 seconds]
tylerker_ has joined #ruby
<optiz0r>
Can anyone give me some pointers on debugging rugged? I'm trying to use Rugged::Remote.lookup and get undefined method. Looking at the remote.rb file there's no implementation so I think it's all implemented in a C extension. strace shows me the rugged.so file is being loaded and that's about as far as I can get on my own.
tylerkern has quit [Ping timeout: 245 seconds]
<jhass>
optiz0r: you can still try loading that in pry and try ls Rugged::Remote to check what methods are available
<optiz0r>
jhass: ok, will just go lookup what pry is and how to use it :)
omosoj has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
carraroj has quit [Quit: Konversation terminated!]
dnyy_ is now known as dnyy
claymore has quit [Quit: Leaving]
r_s has quit [Ping timeout: 240 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
klmlfl has quit [Ping timeout: 260 seconds]
klmlfl has joined #ruby
Macaveli has joined #ruby
aspiers has joined #ruby
aspires has quit []
diegoviola has quit [Ping timeout: 245 seconds]
kireevco has quit [Quit: Leaving.]
relix has joined #ruby
aspires has joined #ruby
jimms has quit []
goodenough has quit [Remote host closed the connection]
Xiti` has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<optiz0r>
hmm, I see all the instance methods that should be available according to the documentation but none of the class methods, so it must be loading the C extension correctly
Xiti has quit [Ping timeout: 240 seconds]
Pharaoh2 has joined #ruby
<Hanmac>
optiz0r: how do you try to get the methods in pry?
craigbowen3 has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
<Hanmac>
optiz0r: hm why not Rugged::Remote.methods ?
<jhass>
Hanmac: optiz0r an open ls lists everything there is
<jhass>
Hanmac: ls is shorter to write :P
<optiz0r>
I tried ls first, then help ls, then the -m/-M variants, it just doesn't seem to be there. i'm thinking maybe I'm working from outdated documentation
<jhass>
is there a method called method_missing ?
<nobitanobi>
yes!
Zebroid has quit [Remote host closed the connection]
<havenwood>
no!
<jhass>
maybe!
<centrx>
no wai
<optiz0r>
no, nor is there one when ls -v
momomomomo_ has joined #ruby
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo_ is now known as momomomomo
<Hanmac>
or like a great comedian did say: "Nein, Doch! OHH!" ;P
ht__th has quit [Remote host closed the connection]
<nobitanobi>
lol, that "yes!" was not for this channel :D
<havenwood>
optiz0r: so... you're looking for something that isn't there? check the source?: show-source Rugged::Remote
yfeldblum has joined #ruby
TorpedoSkyline has joined #ruby
<optiz0r>
I checked the ruby source, the remote.rb file is completely empty save for the class definition
jottr has quit [Ping timeout: 240 seconds]
<havenwood>
i like the idea of a code reading club where you pick what to read then meet to discuss
<havenwood>
always good to look at the code
<optiz0r>
Just chasing down a different way to instanciate the Remote object without need of the class methods now
<hooper>
ship queue
nanoyak has joined #ruby
ctp has joined #ruby
kedric has joined #ruby
frankle has joined #ruby
toastynerd has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
x1337807x has joined #ruby
<Hanmac>
hah that smells after a C-ext gem that has rb files with empty classes ... that might confuse pry ...
aspires has joined #ruby
Pharaoh2 has quit [Quit: Leaving...]
elektronaut has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
Guest19340 is now known as lazyguru
starless has quit [Quit: Leaving]
drPoggs has quit [Ping timeout: 240 seconds]
aspires has quit []
drusepth has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 245 seconds]
maximski has quit []
Squarepy has quit [Quit: Leaving]
elektronaut has joined #ruby
drPoggs has joined #ruby
Affix has quit [Ping timeout: 240 seconds]
canton7 has quit [Ping timeout: 240 seconds]
<optiz0r>
Thanks for all the pointers folks, got me on the right track (and I learned about pry which is very helpful)
jottr has joined #ruby
GriffinH_ has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
<kedric>
I am using guard and listen with os x host and ubuntu guest using vagrant. I can telnet from ubuntu to os x and receive file change notifications but guard does not catch them. Any ideas?
<optiz0r>
Instead of trying to instanciate a Rugged::Remote object directly by .lookup and a name, I can get a collection of remotes from the parent object and iterate through to find the one I want. Less efficient but does the job :)
canton7 has joined #ruby
Affix has joined #ruby
_1_duvalin69 has joined #ruby
<_1_duvalin69>
hola
steamrllr has joined #ruby
tylerker_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has quit [Remote host closed the connection]
steamrllr has quit [Client Quit]
nateberkopec has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
robbyoconnor has quit [Ping timeout: 240 seconds]
beemo has joined #ruby
kireevco has joined #ruby
tylerkern has joined #ruby
kireevco has quit [Max SendQ exceeded]
aspires has quit []
kireevco has joined #ruby
anaeem1_ has joined #ruby
kireevco has quit [Max SendQ exceeded]
mikepack has joined #ruby
_1_duvalin69 has quit [Remote host closed the connection]
kireevco has joined #ruby
vifino has joined #ruby
<havenwood>
kedric: agent forwarding?
<benzrf>
hmmmmmm
nateberkopec has quit [Client Quit]
<benzrf>
has anybody here used braintree
workmad3 has quit [Ping timeout: 250 seconds]
<kedric>
havenwood: I am not sure that has anything to do with it since telnet is receiving the notifications. I can also do it on non forwarded ports and it works
mijicd has joined #ruby
n_blownapart has joined #ruby
kireevco1 has joined #ruby
<havenwood>
kedric: hem, i can't think of a likely culprit
kireevco2 has joined #ruby
maximski has joined #ruby
havenwood has quit [Remote host closed the connection]
beemo has quit [Ping timeout: 246 seconds]
TC` has joined #ruby
mercwithamouth has joined #ruby
kireevco has quit [Ping timeout: 240 seconds]
mikepack has quit [Ping timeout: 245 seconds]
<shevy>
jhass well, a distant goal, but right now I just build up individual components. most of my work goes into rbt and cookbooks
<TC`>
How can i pass arguments in rake, for ex 'rake run data.txt'
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zebroid has joined #ruby
joelroa has joined #ruby
ramfjord has joined #ruby
Lewix has quit [Remote host closed the connection]
djbkd has joined #ruby
Lewix has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
echevemaster has quit [Ping timeout: 240 seconds]
tylerkern has joined #ruby
Takle has quit [Remote host closed the connection]
virtualize has quit [Read error: Connection reset by peer]
momomomomo_ has joined #ruby
virtualize has joined #ruby
Takle has joined #ruby
Lewix has quit [Ping timeout: 244 seconds]
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo_ is now known as momomomomo
chrishough has quit [Ping timeout: 246 seconds]
bmurt has quit []
agjacome has quit [Remote host closed the connection]
chrishough has joined #ruby
alvaro_o has joined #ruby
alvaro_o has quit [Read error: Connection reset by peer]
alvaro_o has joined #ruby
armenb has left #ruby [#ruby]
aspiers has joined #ruby
xcv has quit [Remote host closed the connection]
mikepack has joined #ruby
cocotton has quit [Remote host closed the connection]
bearish has quit [Remote host closed the connection]
wallerdev has joined #ruby
cocotton has joined #ruby
cocotton_ has joined #ruby
<benzrf>
has anybody here dealt with web apps that deal with payment
bklane has joined #ruby
<nobitanobi>
benzrf: I did
jgrevich has joined #ruby
<benzrf>
how should i manage querying of the service as to subscription status
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nobitanobi>
Amazon Payments
adamski2600 has quit []
<benzrf>
should i cache the status and refresh it every month? just look it up every time i need to know?
<bklane>
I have an array with 2 hashes that are identical. When I change one value the other one gets changed as well. How do I just change one at a time? Gist: https://gist.github.com/2668b58cdc0102b2f93b.git
<benzrf>
some combo?
cocotton has quit [Remote host closed the connection]
<nobitanobi>
benzrf: As I recall when I use Amazon Payments, I used their IPN (instant payment notification). They notify upon change of statuses.
xcv has joined #ruby
xcv has quit [Remote host closed the connection]
<benzrf>
huh
<benzrf>
i feel like thats not very robustus
<benzrf>
what if they try to notify when the apps down
failshell has quit []
sparrovv has joined #ruby
<benzrf>
or if u have an error at the wrong minute
aspires has joined #ruby
yekta has quit [Quit: yekta]
<nobitanobi>
benzrf: right, that's the weakness of this approach. Paypal does that too btw.
<benzrf>
hmmm
<nobitanobi>
I am assuming they will have a retry approach
<nobitanobi>
if the server doesn't answer. But I am not sure
<jhass>
bklane: the hashes are not only identical, they are the same hash, you only add it twice to the array
<jhass>
bklane: if you really need that construct you need to copy the instances, for example Array.new(2) { hash.dup }
centrx has quit [Quit: Mead error: Connection reset by beer]
<benzrf>
er
<benzrf>
service
craigp has quit [Remote host closed the connection]
michaeldeol has joined #ruby
treehug88 has joined #ruby
lw has quit [Quit: s]
<bklane>
thank you jhass
<treehug88>
Hi everyone, I want to use the installed version of ruby in my environment but install extra ruby libraries in my home directory. I presume I can do this with RVM -- can someone explain how?
nanoyak has quit [Quit: Computer has gone to sleep.]
Zenigor has quit [Remote host closed the connection]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zenigor has joined #ruby
dc_ has quit [Remote host closed the connection]
Macaveli has quit [Ping timeout: 255 seconds]
yetanoth1rdave has joined #ruby
jprovazn has quit [Quit: Odcházím]
Eulipion has joined #ruby
<Eulipion>
anyone know how to get past libreadline errors using ruby-install on ubuntu14?
Zenigor has quit [Ping timeout: 240 seconds]
bootcoder has joined #ruby
bootcoder has left #ruby [#ruby]
yetanoth1rdave has quit [Read error: Connection reset by peer]
yetanoth1rdave has joined #ruby
yetanotherdave has quit [Ping timeout: 272 seconds]
<apeiros>
treehug88: rvm allows you to install other rubies, which will install their gems (by default) into your home dir. but it does not change where your system ruby installs its gems.
brandonshowers has joined #ruby
<treehug88>
someone else suggested gem with the -user-install option
tylerkern has joined #ruby
icole has quit [Remote host closed the connection]
paulfm has quit []
anaeem1_ has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
clov3r has quit []
Jackneill has quit [Remote host closed the connection]
craigbowen3 has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coreycondardo has quit [Quit: coreycondardo]
meinside has quit [Quit: Connection closed for inactivity]
doodlehaus has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
onso has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpruitt has quit [Client Quit]
krisquigley has quit [Remote host closed the connection]
sambao21 has joined #ruby
mikepack has quit [Remote host closed the connection]
yfeldblum has joined #ruby
error_mess has quit [Remote host closed the connection]
Wolland has joined #ruby
dte has joined #ruby
OffTheRails has quit [Quit: Leaving]
nanoyak has joined #ruby
yfeldblu_ has joined #ruby
krisquigley has joined #ruby
yfeldblum has quit [Remote host closed the connection]
krisquigley has quit [Remote host closed the connection]
ringarin has joined #ruby
onso has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
shredding has quit [Quit: shredding]
Wolland_ has quit [Ping timeout: 255 seconds]
Xiti` has quit [Quit: Leaving]
yfeldblu_ has quit [Remote host closed the connection]
LiquidInsect has quit [Ping timeout: 272 seconds]
shock_one has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
Kricir has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
gkagan has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
agjacome has joined #ruby
mark_locklear has quit [Ping timeout: 250 seconds]
fabrice31 has quit [Ping timeout: 245 seconds]
kireevco2 has quit [Quit: Leaving.]
yfeldblum has quit [Ping timeout: 240 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danijoo has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
kireevco has joined #ruby
danijoo has joined #ruby
cocotton has joined #ruby
barhum2013 has joined #ruby
philcrissman has joined #ruby
ldnunes has quit [Quit: Leaving]
cocotton_ has quit [Ping timeout: 245 seconds]
Afal has joined #ruby
<nobitanobi>
If we use File.read to read local resources, what shall I use to read remote ones?
Kricir has quit [Ping timeout: 240 seconds]
Afal has left #ruby [#ruby]
Eulipion has left #ruby [#ruby]
<apeiros>
nobitanobi: that's quite a bit vague
cocotton has quit [Ping timeout: 260 seconds]
IceDragon has quit [Ping timeout: 260 seconds]
<apeiros>
do you mean http? ftp? nfs? something else?
<nobitanobi>
apeiros: I have txt files stored in s3, and I need to read its contents and store them in a String. Using HTTP
emmesswhy has joined #ruby
<apeiros>
there's more than two dozen http libraries for ruby. stdlib comes with net/http and open-uri
<apeiros>
(the latter just being a "nice" wrapper for net/http)
philcrissman has quit [Ping timeout: 246 seconds]
<nobitanobi>
apeiros: thank you
<apeiros>
for the rest, check ruby-toolbox.com
<apeiros>
I think s3 even has a separate client lib
Zebroid has quit [Remote host closed the connection]
barhum2013 has quit [Quit: barhum2013]
Pumukel has quit [Ping timeout: 244 seconds]
dawkirst has joined #ruby
robbyoconnor has joined #ruby
IceDragon has joined #ruby
saarinen has quit [Quit: saarinen]
icole has joined #ruby
jsodini has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Client Quit]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rocknrollmarc has quit [Ping timeout: 240 seconds]
dte is now known as TupskinVonAlbert
treehug88 has quit []
livingstn has quit []
chrishough has quit [Quit: chrishough]
afhammad has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
mateu has quit [Quit: leaving]
barhum2013 has joined #ruby
iamjarvo has joined #ruby
klmlfl has joined #ruby
lw has joined #ruby
goodenough has joined #ruby
error_mess has joined #ruby
mikepack has joined #ruby
Morkel has quit [Quit: Morkel]
kireevco has quit [Quit: Leaving.]
codecop has quit [Remote host closed the connection]
mikepack_ has joined #ruby
W0rmDr1nk has quit [Ping timeout: 245 seconds]
jobewan has quit [Quit: Leaving]
krisquigley has quit [Remote host closed the connection]
yfeldblum has joined #ruby
toertore has quit [Ping timeout: 245 seconds]
gccostabr has quit [Quit: ZZZzzz…]
linojon has quit [Quit: linojon]
<nobitanobi>
apeiros: thanks. I appreciate
gkagan has joined #ruby
mikepack has quit [Ping timeout: 246 seconds]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
Xiti has joined #ruby
kireevco has joined #ruby
dblessing has quit [Quit: dblessing]
mikepack_ has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
britneywright has joined #ruby
toertore has joined #ruby
goodenough has quit [Remote host closed the connection]
macclearich has joined #ruby
oso96_2000 is now known as oso|away
gkagan has quit [Ping timeout: 272 seconds]
doodlehaus has quit [Remote host closed the connection]
jerius has quit [Ping timeout: 272 seconds]
kedric has quit [Quit: kedric]
chrishough has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
<jhass>
since that doesn't go through you code it's probably the return value of your method
mikepack has quit [Ping timeout: 260 seconds]
banister is now known as banisterfiend
<jhass>
I guess you changed the code behind the scenes and now it happens to return an array of hashes or whatever
<jhass>
make sure it returns [200, {}, []]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
you're mixing webrick and rack together again.
icebourg has quit []
<zenspider>
it's just extra complication you don't need.
WormDrink has joined #ruby
<riceandbeans>
AH it's working better now
<zenspider>
esp with a stack trace that is just call/call/call/call/call/call... it's ridiculous
<riceandbeans>
zenspider: you think I was better off with WEBrick?
TupskinVonAlbert has joined #ruby
<zenspider>
for something like this, yeah
AlexRussia has joined #ruby
<riceandbeans>
why?
gkagan has joined #ruby
<zenspider>
I think I just explained that, no?
<riceandbeans>
remind me
<jhass>
well, rack has the benefit that you're independent of the app server. You can deploy that on passenger, mount it into an existing app or whatever
<zenspider>
look up 4 lines
<riceandbeans>
I mean, in terms of load I don't think it'll ever have more than 3 simultaneous connections
afhammad has left #ruby [#ruby]
<riceandbeans>
because the stack trace is call/call/call/call?
marr has joined #ruby
Lewix has joined #ruby
kies has joined #ruby
pete___ has joined #ruby
pete___ is now known as ptierno
ptierno_ has quit [Quit: leaving]
ptierno has quit [Client Quit]
<riceandbeans>
would rack perform better?
<riceandbeans>
isn't WEBrick a rack server?
aspires has joined #ruby
pete___ has joined #ruby
<zenspider>
perform better?
pete___ has quit [Client Quit]
<jhass>
rack is an interface
pete___ has joined #ruby
<zenspider>
"I don't think it'll ever have more than 3 simultaneous connections" == "no performance problems"
gkagan has quit [Ping timeout: 260 seconds]
<jhass>
it just happens to be also a library to ease development of applications that support that inerface
pete___ is now known as ptierno
momomomomo has quit [Quit: momomomomo]
ptierno has quit [Client Quit]
<zenspider>
argh. no. I withdraw from this nonsense
<miah>
sometimes the best thing to do
ptierno has joined #ruby
klaut has quit [Remote host closed the connection]
jaffachief has joined #ruby
ptrrr has quit [Quit: ptrrr]
Hamburglr has joined #ruby
phutchins has joined #ruby
<crome>
zenspider: one does not simply walk away from an internet argument
<codebauss>
basically if i understand the code i'm looking at
<codebauss>
i should be 1 in the second p
cocotton has quit [Remote host closed the connection]
<jhass>
no
<jhass>
i+1 is a simple addition
<jhass>
i+=1 would be an increment
phutchins has quit [Ping timeout: 260 seconds]
St_Marx has quit [Quit: Ex-Chat]
<codebauss>
bahhh, my brain lol
<jhass>
but useless, since the times method writes a new value into it on the next iteration anyhow
divi_ has joined #ruby
greenride has joined #ruby
<jhass>
the code is fine as it is
<codebauss>
but does ruby allow for running command in format string like that?
<codebauss>
i've just never seen it done
<jhass>
sure
<jhass>
see, it's not in th format string
<riceandbeans>
so explain me this
SouL has quit [Ping timeout: 244 seconds]
<codebauss>
gotcha, because it is only capturing the prefix?
<riceandbeans>
with WEBrick, I didn't have to return anything, and I damn sure didn't have to return HTTP 200 and whatever, but rack, I do, why?
<jhass>
codebauss: % is actually a method call, String#%. You pass it an array literal which is composed of the prefix variable and the expression i+1
<jhass>
so two elements in the array
britneywright has joined #ruby
Hobogrammer_ has joined #ruby
<codebauss>
ok i follow
<codebauss>
i appreciate the info jhass
<waxjar>
riceandbeans: because they work differently..
<codebauss>
i will do my due diligence to fully comprehend
<jhass>
riceandbeans: I don't know webricks API, it probably has a default response. Rack is an interface and that interface is defined to must have this specific return value
<codebauss>
have a great one
codebauss has left #ruby [#ruby]
lw has quit [Quit: s]
day has quit [Ping timeout: 246 seconds]
thousandwich has quit [Read error: Connection reset by peer]
error_mess has joined #ruby
day has joined #ruby
threesixes has joined #ruby
divi_ has quit [Ping timeout: 245 seconds]
Kricir has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
Hobogrammer has quit [Ping timeout: 246 seconds]
davi__ has joined #ruby
greenride has quit [Remote host closed the connection]
phutchins has joined #ruby
malkomalko has joined #ruby
fold has quit [Ping timeout: 260 seconds]
greenride has joined #ruby
testcore has quit [Quit: [BX] Gary Coleman uses BitchX. Whatchoo talkin bout foo?]
<riceandbeans>
so webrick makes tho 200 response for me?
<jhass>
probably
avalarion has joined #ruby
freerobby has quit [Quit: Leaving.]
frankle has quit [Quit: Connection closed for inactivity]
Takle has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 245 seconds]
Takle has joined #ruby
nanoyak has joined #ruby
sdwrage_ has joined #ruby
sdwrage_ has quit [Client Quit]
sdwrage has joined #ruby
jaimef has quit [Quit: Emacs must have died]
dorei has joined #ruby
blackmesa has quit [Quit: WeeChat 1.0]
TupskinVonAlbert has quit [Remote host closed the connection]
speaking1ode has joined #ruby
DivineEn1ity has joined #ruby
freerobby has joined #ruby
speakingcode has quit [Ping timeout: 246 seconds]
DivineEntity has quit [Ping timeout: 246 seconds]
juz88 has joined #ruby
Takle has quit [Ping timeout: 250 seconds]
chipotle has quit [Quit: cya]
thams has quit [Quit: thams]
mikepack has joined #ruby
jonr22 has joined #ruby
davi__ has quit [Quit: Leaving]
thams has joined #ruby
toastynerd has joined #ruby
startupality has quit [Quit: startupality]
jottr_ has quit [Ping timeout: 245 seconds]
aaronrl has joined #ruby
akkad has joined #ruby
dawkirst has joined #ruby
mikepack has quit [Ping timeout: 255 seconds]
TupskinVonAlbert has joined #ruby
TupskinVonAlbert has quit [Remote host closed the connection]
TupskinVonAlbert has joined #ruby
startupality has joined #ruby
spider-mario has quit [Remote host closed the connection]
freerobby1 has joined #ruby
doodlehaus has joined #ruby
aspires has quit []
redlegion_ has joined #ruby
jxf_ has joined #ruby
aspires has joined #ruby
coldkey has joined #ruby
riceandbeans has quit [Quit: leaving]
toastynerd has quit [Remote host closed the connection]
nanoyak has quit [Read error: Connection reset by peer]
TupskinVonAlbert has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 255 seconds]
nanoyak has joined #ruby
everett has joined #ruby
freerobby has quit [Ping timeout: 246 seconds]
jxf has quit [Ping timeout: 246 seconds]
redlegion has quit [Ping timeout: 246 seconds]
excarna has quit [Ping timeout: 246 seconds]
lazyguru has quit [Ping timeout: 246 seconds]
coldkey21 has quit [Ping timeout: 246 seconds]
lazyguru has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
bzitzow has joined #ruby
barhum2013 has quit [Quit: barhum2013]
bradleyp_ has joined #ruby
avalarion has quit [Quit: No Ping reply in 180 seconds.]
thams has quit [Quit: thams]
akkad has quit [Remote host closed the connection]
ramfjord has joined #ruby
i_s has quit []
error_mess has quit [Remote host closed the connection]
fold has joined #ruby
narcan has joined #ruby
bradleyprice has quit [Ping timeout: 255 seconds]
gkagan has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]