apeiros changed the topic of #ruby to: Ruby 2.1.3; 2.0.0-p576; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
vyorkin has quit [Remote host closed the connection]
jaequery has joined #ruby
lmickh has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
agjacome has quit [Quit: Lost terminal]
Nilium has quit [Ping timeout: 246 seconds]
cndiv has quit [Ping timeout: 260 seconds]
agjacome has joined #ruby
benzrf|offline is now known as benzrf
<waxjar> Fire-Dragon-DoL: you could make a class SuperArray that inherits from Array and redefines the methods that add something to it
_2easy has quit [Ping timeout: 255 seconds]
<waxjar> there's one huge disadvantage though (that also goes for delegating), namely that the methods that return an Array still return a regular Array
harq has quit [Quit: Be back later ...]
<zenspider> Fire-Dragon-DoL: if you want to delegate everything but some set of things, you should be defining those things. (same with subclassing)
<zenspider> there's no good shortcut here. If you need to lock up 10 methods, you need to lock up 10 methods
<zenspider> waxjar: you can wrap those with a conversion
<Fire-Dragon-DoL> zenspider , waxjar thanks both, seems resonable, was just asking is someone faced same thing
Dude007__ has quit [Remote host closed the connection]
<Fire-Dragon-DoL> I think I'll do the opposite, delegate only the methods I'm using, I can always delegate another one when I start using it
<waxjar> zenspider: is that supported by delegator? or do you mean write your own proxy class?
<waxjar> that seems most reasonable Fire-Dragon-DoL
Dude007 has joined #ruby
<zenspider> waxjar: I was assuming the subclass case and just doing def x; convert super; end
Dude007 has quit [Remote host closed the connection]
<Fire-Dragon-DoL> waxjar: going to use active_support delegate method
Dude007 has joined #ruby
<zenspider> Fire-Dragon-DoL: then you have two problems
<zenspider> use stdlib delegate, list the methods you want to delegate
<waxjar> zenspider: i meant stuff like #map and all, you'd have to redefine *all* of them
<Fire-Dragon-DoL> zenspider: that's my problem unfortunately
<zenspider> what is?
<zenspider> adding active_support to the mix is MORE than your current problem
Nilium has joined #ruby
<zenspider> waxjar: thems the breaks
j_mcnally has joined #ruby
<zenspider> tho you could write a simple enough proxy method to do the conversion automatically if you got a plain array back.
<zenspider> err.. delegate
Channel6 has quit [Quit: Leaving]
<waxjar> yeah. I thought you meant delegator supported that. I was impressed :P
jottr_ has quit [Ping timeout: 260 seconds]
<Fire-Dragon-DoL> ok well I'll stick with damn delegate every method I use
<Fire-Dragon-DoL> currently is faster because I use only #each #size #inject
<Fire-Dragon-DoL> eventually I'll delegate other methods
<Fire-Dragon-DoL> too long to reimplement the others
Atttwww has joined #ruby
fourmyle has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thagomizer has quit [Quit: Leaving.]
i_s has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 250 seconds]
zerick has quit [Ping timeout: 240 seconds]
jtdowney has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robustus|Off has joined #ruby
robustus|Off is now known as robustus
<zenspider> too long?
<zenspider> Array isn't that big / complex. really.
boddah has quit [Quit: Leaving]
nonks has quit [Ping timeout: 244 seconds]
mary5030 has quit [Remote host closed the connection]
freerobby has joined #ruby
<Fire-Dragon-DoL> it has a lot of methods
thingstuff has joined #ruby
thisguy123 has quit [Ping timeout: 245 seconds]
fabrice31 has joined #ruby
Takle has joined #ruby
MatthewsFace has quit [Quit: Leaving]
<thingstuff> hi.I'm a beginner learning ruby and just came across something I don't quite understand and would like to read more about, however I don't know how to search for it. It's the fact that methods that return an instance variable seem to pass a reference when I expect it to only return a value.
<jhass> thingstuff: ruby is entirely pass by reference
marr has quit []
<thingstuff> I'm not sure if it's different but I'm talking about what methods return
fuhgeddaboudit has joined #ruby
<jhass> it's not different
<jhass> they receive references, they return references
<benzrf> thingstuff: i assume u know c?
<thingstuff> not really, I'm a beginner in general
<benzrf> thingstuff: well, in ruby, all variables are pointers
<benzrf> period
<benzrf> thingstuff: ok, well
<zenspider> thingstuff: everything in ruby is a reference with minor (implementation specific) exceptions
manzo has quit [Ping timeout: 245 seconds]
<benzrf> when you pass or assign a value
<benzrf> you pass a pointer to that object
<benzrf> not a cop
fabrice31 has quit [Ping timeout: 250 seconds]
<benzrf> *copy
<zenspider> benzrf: not really true. The "period" is wrong
<benzrf> there is no such thing as a "value" in ruby, just objects
<benzrf> zenspider: oh pooh
lolmaus has quit [Ping timeout: 240 seconds]
<zenspider> but, as I said, they're implementation specific exceptions
<thingstuff> in that case, though, I'm still a little confused because if it's really a reference, it should be the same class of object, but I'm finding that I can do certain methods but not others
<zenspider> fixnums for example are encoded in the value pointer directly
SilkFox has joined #ruby
<zenspider> thingstuff: explain that last part?
<zenspider> it most def is a reference. It most def is the same class of object.
<thingstuff> I can do << on arrays and strings, and sort! on arrays, but not +=
<thingstuff> I'll do a pastebin
charliesome has quit [Quit: zzz]
<jhass> thingstuff: a += b is a syntax rewrite to a = a+b
gattuso has joined #ruby
<jhass> it doesn't change the object, it assigns a new object to the variable
SilkFox_ has quit [Ping timeout: 260 seconds]
ziggles has joined #ruby
valeriansaliou has joined #ruby
<jhass> okay, we need to differentiate two cases here
<jhass> a = b and a.b = c
<ziggles> hey guys... i'm working on building a ruby gem that wraps an API with multiple versions. I was wondering if the common convention is to have the gem support only the most recent gem?
<ziggles> For example I'm looking around github and i see stuff like this: https://github.com/orchestrate-io/orchestrate-ruby/blob/master/lib/orchestrate/client.rb#L390
<ziggles> (the author has locked users to version 0 of the api)
nirvdrum has joined #ruby
<jhass> thingstuff: the former is syntax, it's not a method call, the later however is a method call, it's syntax sugar for calling a.b=(c), the = is part of the method name
brendenb has quit [Max SendQ exceeded]
brendenb has joined #ruby
<thingstuff> yes, I understand that. But just as I didn't define a blah<< method I didn't define a blah= method
kaspergrubbe has quit [Remote host closed the connection]
<thingstuff> that's the part that's confusing me
<jhass> a.b << c is a.b.<<(c)
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> it's calling #<< on the return value
<jhass> where as a.b = c is a.b=(c)
luckyruby has joined #ruby
<jhass> it's called on a
<jhass> and #b= not #=
zaid_h has quit [Quit: ZZZzzz…]
<benzrf> am i a hashtag
valeriansaliou has quit [Ping timeout: 255 seconds]
<jhass> would you like to be one?
<thingstuff> I think I understand
<thingstuff> if I have a string s and do s = "asdf", what's the "other" notation for that? it's not s.=("asdf") clearly
<jhass> thingstuff: these are mostly things you need to memorize for now, it'll feel natural after a while and starts to make sense
nirvdrum has quit [Ping timeout: 255 seconds]
<jhass> there's no other notation
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bricker`work has quit [Ping timeout: 272 seconds]
<thingstuff> which is where I guess I was confused and thought of = and << in the same way
<jhass> in a = b there's no method call, it's handled directly by the interpreter
<thingstuff> ok
BadQuanta has joined #ruby
DLSteve has quit [Quit: Leaving]
<thingstuff> I understand now, thanks
baordog has quit [Ping timeout: 245 seconds]
nichtdiebohne1 has joined #ruby
Cache_Money has joined #ruby
rshetty has joined #ruby
rpag has quit [Ping timeout: 250 seconds]
fuhgeddaboudit has quit [Ping timeout: 260 seconds]
<Fire-Dragon-DoL> ziggles: I think it's your choice. Either support new api versions with new gem versions (dropping old api versions), ensure you change major version number if that's the case, otherwise support multiple versions by doing something like module Yougem module V1 for example, however consider that this may become a burden
skolman_ has quit [Remote host closed the connection]
davasaurous has quit [Remote host closed the connection]
nichtdiebohne has quit [Ping timeout: 245 seconds]
skolman has joined #ruby
nonks has joined #ruby
jimbach_ has joined #ruby
Mattias has quit [Ping timeout: 240 seconds]
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
harq has joined #ruby
harq has quit [Client Quit]
oo_ has joined #ruby
<ziggles> Fire-Dragon-DoL: thanks you for responding
<ziggles> *thank you
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jimbach has quit [Ping timeout: 244 seconds]
skolman has quit [Ping timeout: 255 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
<ziggles> Fire-Dragon-DoL: yeah... seeing a lot of the bigger gems i know about (twitter gem for example) all just hard coding an api version. i think i will take that route
<ziggles> thanks again
nonks has quit [Ping timeout: 265 seconds]
<Fire-Dragon-DoL> ziggles: I had another idea right now, you can have in the gem module V1, module V2 and then the constant VCurrent = V2 (for example), in this way you can keep the older versions eventually
thisguy123 has joined #ruby
<Fire-Dragon-DoL> so people can use VCurrent.something, still I definitely think you should have just latest version
rshetty has quit [Remote host closed the connection]
<Fire-Dragon-DoL> people can always installl previous gem version, or even fork if they really need two api versions living at same time
<ziggles> Fire-Dragon-DoL: That is a good idea but i definitely don't like the idea of having to support older and older code in the future, you know?
<ziggles> yeah good point! just use the older gem
<thingstuff> jhass you're right about the memorizing part. I just thought about the same thing from the passing arguments perspective, and had to wrap my mind around how "def a(b); b = "ref"; end" would've made me thing ruby is pass by value and "def a(b); b << "ref"; end" would've made me think ruby was pass by reference
baordog has joined #ruby
<thingstuff> but I believe I get it now
<thingstuff> = doesn't change the object, it points the variable to a different object
<jhass> exactly
<thingstuff> all of this was just very counterintuitive to how I previously thought about things but I learned quite a lot.
robbyoconnor has joined #ruby
Mattias has joined #ruby
moted has quit [Ping timeout: 272 seconds]
Avahey has joined #ruby
lolmaus has joined #ruby
Hobogrammer has joined #ruby
axl_ has joined #ruby
nonks has joined #ruby
narph has quit [Quit: Connection closed for inactivity]
it0a has joined #ruby
Kricir has quit [Remote host closed the connection]
<benzrf> thingstuff: none of this is a relevant distinction when you use HASKELL!!
rkalfane has joined #ruby
Kricir has joined #ruby
<thingstuff> I'll keep that in mind
Channel6 has joined #ruby
sevenseacat has joined #ruby
ioc has quit [Quit: leaving]
<thingstuff> human interest question since it's not too busy here: does anyone here work with ruby for a living for non-rails related things? If so I'd be curious to know what
davasaurous has joined #ruby
luckyruby has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
emmesswhy has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
luckyruby has joined #ruby
siwica has quit [Ping timeout: 245 seconds]
axl_ has quit [Quit: axl_]
tkuchiki has joined #ruby
rpag has joined #ruby
rshetty has joined #ruby
luckyruby has quit [Ping timeout: 255 seconds]
jfran has quit [Quit: Going offline, see ya! (www.adiirc.com)]
rshetty has quit [Remote host closed the connection]
jtdowney has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
echooo has joined #ruby
jtdowney has quit [Client Quit]
jnollett_ has quit [Quit: Leaving...]
bklane has quit [Remote host closed the connection]
melik has quit [Quit: (null)]
nirvdrum has joined #ruby
aspires has quit []
momomomomo has quit [Quit: momomomomo]
mahyuddin has left #ruby [#ruby]
cndiv has joined #ruby
cndiv has quit [Client Quit]
yaymukund has quit [Ping timeout: 272 seconds]
tylersmith has joined #ruby
echooo has quit [Quit: echooo]
fuhgeddaboudit has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<ramfjord> thingstuff: I use a lot of ruby and very little rails
drkyro has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<ramfjord> mostly scripts to pass things around in the backend in a service oriented architecture
andrewhampton has joined #ruby
chipotle has joined #ruby
msmith_ has joined #ruby
<ramfjord> I would probably never decide to use rails on my own
<thingstuff> ramfjord cool
<thingstuff> why's that
shock_one has joined #ruby
havenwood has quit [Remote host closed the connection]
nirvdrum has quit [Ping timeout: 258 seconds]
<ramfjord> thingstuff: the only thing I really like about it is activesupport, and I can include that where I need it
<ramfjord> sinatra is very simple and light weight
<sevenseacat> rails rails rails
<ramfjord> ActiveRecord always seemed like a heavy handed ORM, and it's hard to do complex queries without using SQL anyway
Xiti has quit [Ping timeout: 272 seconds]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
Spami has joined #ruby
<ramfjord> I think a lot of people misuse restful routes for non-restful architectures because rails makes it so easy to define a lot of them with resource: blah
<ramfjord> then they only actually define the index route
<ramfjord> in my experience at least
Xiti has joined #ruby
<sevenseacat> dont blame rails for developers who use it poorly
Xiti has quit [Read error: Connection reset by peer]
<ramfjord> yeah, you could do that with anything
davasaurous has quit [Remote host closed the connection]
shock_one has quit [Ping timeout: 260 seconds]
jnollette has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
ziggles has quit []
Atttwww has quit [Ping timeout: 258 seconds]
pandaant has quit [Remote host closed the connection]
emmesswhy has quit [Quit: This computer has gone to sleep]
diegoviola has joined #ruby
Takle has quit [Ping timeout: 250 seconds]
Xiti has joined #ruby
phutchins has joined #ruby
j_mcnally has quit [Ping timeout: 240 seconds]
tylersmith has quit [Read error: Connection reset by peer]
skolman has joined #ruby
mercwithamouth has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
yaymukund has joined #ruby
jnollette has quit [Quit: Leaving...]
skolman has quit [Remote host closed the connection]
tokik has joined #ruby
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
skolman has joined #ruby
mary5030 has joined #ruby
msmith_ has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 245 seconds]
yaymukund has quit [Ping timeout: 260 seconds]
rubie has joined #ruby
<rubie> hi all: anyone know why i'm getting this error https://gist.github.com/gabrie30/72b191a1ab77c794f285
havenwood has joined #ruby
skolman has quit [Ping timeout: 245 seconds]
Spami has quit [Read error: Connection reset by peer]
msmith has joined #ruby
<mozzarella> rubie: because you end up doing nums[nums.length]
<mozzarella> and your array doesn't have this index… of course
<rubie> lengths method doesnt return an integer?
<sevenseacat> it does, but remember that indexes start from 0.
<sevenseacat> the array may have 5 elements, but the indexes will be 0-4.
maletor_ has joined #ruby
<rubie> oh yea and length doesn't include 0
patrick99e99 has quit [Ping timeout: 255 seconds]
weaksauce has quit [Remote host closed the connection]
thisguy123 has quit [Ping timeout: 260 seconds]
weaksauce has joined #ruby
<rubie> thanks got it
<rubie> length-1
gsd has joined #ruby
<diegoviola> hi
fuhgeddaboudit has joined #ruby
freerobby has quit [Quit: Leaving.]
Spami has joined #ruby
ferr has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
mxrguspxrt has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
chipotle has quit [Quit: cya]
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
yokel has quit [Ping timeout: 240 seconds]
tyll_ has joined #ruby
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
yokel has joined #ruby
andrewhampton has left #ruby [#ruby]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wolland_ has joined #ruby
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
lw has quit [Quit: s]
chipotle has joined #ruby
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
tyll has quit [Ping timeout: 260 seconds]
fourmyle has joined #ruby
Wolland has quit [Ping timeout: 255 seconds]
fourmyle has quit [Max SendQ exceeded]
fuhgeddaboudit has quit [Ping timeout: 244 seconds]
fourmyle has joined #ruby
davidhq has joined #ruby
fourmyle has quit [Max SendQ exceeded]
davidhq has quit [Client Quit]
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
fabrice31 has joined #ruby
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
fourmyle has joined #ruby
fourmyle has quit [Max SendQ exceeded]
yaymukund has joined #ruby
tkuchiki has quit [Quit: Leaving...]
hamakn has joined #ruby
Kricir has joined #ruby
phutchins has quit [Ping timeout: 260 seconds]
jaequery has joined #ruby
arup_r has joined #ruby
narcan has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
NoNMaDDeN has joined #ruby
AlexRussia has quit [Ping timeout: 258 seconds]
freerobby has joined #ruby
davidhq has joined #ruby
davidhq has quit [Client Quit]
bklane has joined #ruby
davidhq has joined #ruby
davidhq has quit [Client Quit]
reset has quit [Quit: Leaving...]
davasaurous has joined #ruby
autonomousdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has quit [Ping timeout: 272 seconds]
davidhq has joined #ruby
davidhq has quit [Client Quit]
Kricir has quit [Remote host closed the connection]
Kricir has joined #ruby
valeriansaliou has joined #ruby
jimbach_ has quit [Remote host closed the connection]
abuzze has joined #ruby
davasaurous has quit []
ramfjord has joined #ruby
Kricir has quit [Ping timeout: 255 seconds]
freerobby has quit [Quit: Leaving.]
valeriansaliou has quit [Ping timeout: 265 seconds]
<Fire-Dragon-DoL> anti-work trap
<Fire-Dragon-DoL> http://cursors.io/
bklane has quit [Remote host closed the connection]
bklane has joined #ruby
radic has joined #ruby
abuzze has quit [Ping timeout: 265 seconds]
sysTemz- has joined #ruby
sysTemz- has joined #ruby
sysTemz- has quit [Client Quit]
AlexRussia has joined #ruby
radic_ has quit [Ping timeout: 245 seconds]
axl_ has joined #ruby
beef-wellington has quit [Ping timeout: 260 seconds]
bklane has quit [Ping timeout: 258 seconds]
<Nilium> So Google decided to recognize me for my open sourcery ruby gems stuff because my brother nominated me for it.
Takle has joined #ruby
chrishough has joined #ruby
tkuchiki has joined #ruby
rshetty has joined #ruby
charliesome has joined #ruby
davidhq has joined #ruby
davidhq has quit [Client Quit]
axl_ has quit [Client Quit]
tkuchiki has quit [Remote host closed the connection]
jimbach has joined #ruby
tkuchiki has joined #ruby
bogeyd6 has joined #ruby
jhass is now known as jhass|off
diegoviola has quit [Quit: WeeChat 1.0.1]
ferr has joined #ruby
davidhq has joined #ruby
crome has quit [Ping timeout: 250 seconds]
Takle has quit [Ping timeout: 246 seconds]
crome has joined #ruby
bklane has joined #ruby
arup_r has quit [Ping timeout: 240 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larissa has quit [Quit: Leaving]
zzach has quit [Ping timeout: 255 seconds]
jaequery has joined #ruby
zzach has joined #ruby
krz has joined #ruby
crome has quit [Ping timeout: 265 seconds]
crome has joined #ruby
spicerack has joined #ruby
Mia has quit [Read error: Connection reset by peer]
muzik has joined #ruby
willywos has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
jaequery has quit [Client Quit]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jimbach has quit [Remote host closed the connection]
SilkFox has quit [Ping timeout: 260 seconds]
lw has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
<havenwood> Nilium: nice, handy to have a brother i guess!
<havenwood> Nilium: grats
freerobby has joined #ruby
thisguy123 has joined #ruby
charliesome_ has joined #ruby
charliesome__ has joined #ruby
maletor_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ndrei has joined #ruby
charliesome has quit [Ping timeout: 272 seconds]
charliesome_ has quit [Ping timeout: 250 seconds]
lw has quit [Quit: s]
charliesome__ has quit [Client Quit]
agjacome has quit [Quit: leaving]
charliesome has joined #ruby
cmxu has joined #ruby
emmesswhy has joined #ruby
jaequery has joined #ruby
NoNMaDDeN has quit [Quit: Leaving...]
braincrash has quit [Quit: bye bye]
chipotle has quit [Quit: cya]
emmesswhy has quit [Client Quit]
alvaro_o has quit [Quit: Ex-Chat]
arup_r has joined #ruby
mg^ has quit [Read error: Connection reset by peer]
braincrash has joined #ruby
mg^ has joined #ruby
oo_ has quit [Remote host closed the connection]
skolman_ has joined #ruby
shock_one has joined #ruby
SirFunk has quit [Ping timeout: 260 seconds]
oo_ has joined #ruby
SirFunk has joined #ruby
Rosa has joined #ruby
fumk has quit [Ping timeout: 255 seconds]
mg^^ has joined #ruby
zenspider has quit [Ping timeout: 240 seconds]
thingstuff has quit [Ping timeout: 246 seconds]
fumk has joined #ruby
skolman_ has quit [Read error: Connection reset by peer]
VBlizzard has joined #ruby
skolman__ has joined #ruby
Jarboe has quit [Ping timeout: 272 seconds]
mg^ has quit [Ping timeout: 240 seconds]
nonks has quit [Ping timeout: 255 seconds]
krz has quit [Ping timeout: 272 seconds]
mistergibson has quit [Ping timeout: 272 seconds]
oo_ has quit [Ping timeout: 265 seconds]
shock_one has quit [Ping timeout: 272 seconds]
zenspider has joined #ruby
charliesome_ has joined #ruby
joast has quit [Ping timeout: 240 seconds]
dopiee has quit [Ping timeout: 260 seconds]
bklane has quit []
Takle has joined #ruby
dopiee has joined #ruby
mistergibson has joined #ruby
krz has joined #ruby
charliesome has quit [Ping timeout: 258 seconds]
havenwood has quit []
lw has joined #ruby
charliesome_ has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 265 seconds]
Takle has quit [Ping timeout: 245 seconds]
NivenHuH has joined #ruby
tkuchiki has quit [Ping timeout: 255 seconds]
yaymukund has quit [Ping timeout: 246 seconds]
lw has quit [Client Quit]
charliesome has joined #ruby
lw has joined #ruby
lw has quit [Client Quit]
ramfjord has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
braincra- has joined #ruby
ramfjord has joined #ruby
ferr has quit [Ping timeout: 255 seconds]
<krz> whats the best way to form the a 24 hour (by hour) array depending on what x is. for example https://gist.github.com/da229d2f252fe407f6b7
<krz> form a*
<krz> should i iterate over Time?
lw has joined #ruby
ferr has joined #ruby
<krz> but then iterating over time, would not sound logical, unless i can iterate over hour
<sevenseacat> set up a sample array, and then rotate it
<krz> mmm
braincrash has quit [Ping timeout: 255 seconds]
n3b has quit [Ping timeout: 260 seconds]
n3b has joined #ruby
<krz> let me try that
xymbol has joined #ruby
<krz> sweet, thanks sevenseacat
<krz> glad you are in a good mood today
<krz> :P
tkuchiki has quit [Quit: Leaving...]
lw has quit [Quit: s]
Hobogrammer has quit [Read error: Connection reset by peer]
<krz> sevenseacat: no love?
<krz> :(
<sevenseacat> yw
gr33n7007h has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
<krz> :)
az7ar_away is now known as az7ar
chipotle has joined #ruby
Asher has joined #ruby
az7ar is now known as az7ar_away
helpa has quit [Remote host closed the connection]
nonks has joined #ruby
ramfjord has joined #ruby
mercwithamouth has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kuda has joined #ruby
ferr has quit [Ping timeout: 246 seconds]
davidhq has joined #ruby
mercwithamouth has quit [Ping timeout: 250 seconds]
davidhq has quit [Client Quit]
ferr has joined #ruby
davidhq has joined #ruby
x1337807x has joined #ruby
SilkFox has joined #ruby
byprdct has joined #ruby
Hobogrammer has joined #ruby
arescorpio has quit [Excess Flood]
byprdct has quit [Client Quit]
thisguy123 has quit [Ping timeout: 265 seconds]
patrick99e99 has joined #ruby
oo_ has joined #ruby
thisguy123 has joined #ruby
davidhq has quit [Client Quit]
SilkFox has quit [Ping timeout: 265 seconds]
arup_r has quit [Quit: Leaving.]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
patrick99e99 has quit [Ping timeout: 250 seconds]
acl_ has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anonymous1487591 has joined #ruby
Channel6 has quit [Quit: Leaving]
oo_ has quit [Ping timeout: 246 seconds]
anonymous1487591 has left #ruby [#ruby]
anonymous1487591 has joined #ruby
fabrice31 has joined #ruby
anonymous1487591 has left #ruby [#ruby]
agent_white has joined #ruby
rshetty has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
davidhq has joined #ruby
gr33n7007h has quit [Ping timeout: 260 seconds]
<agent_white> Evenin'
davidhq has quit [Client Quit]
davidhq has joined #ruby
davidhq has quit [Client Quit]
davidhq has joined #ruby
davidhq has quit [Client Quit]
fabrice31 has quit [Ping timeout: 240 seconds]
davidhq has joined #ruby
davidhq has quit [Client Quit]
rshetty has joined #ruby
mary5030 has quit [Remote host closed the connection]
davidhq has joined #ruby
davidhq has quit [Client Quit]
valeriansaliou has joined #ruby
davidhq has joined #ruby
yokel has quit [Ping timeout: 244 seconds]
abuzze has joined #ruby
msmith has quit [Remote host closed the connection]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thisguy123 has quit [Ping timeout: 250 seconds]
bluOxigen has joined #ruby
NivenHuH has quit [Quit: Textual IRC Client: www.textualapp.com]
starkhalo has quit [Ping timeout: 260 seconds]
davidhq has quit [Ping timeout: 245 seconds]
Eiam_ has joined #ruby
rshetty has quit [Remote host closed the connection]
Eiam has quit [Disconnected by services]
Eiam_ is now known as Eiam
valeriansaliou has quit [Ping timeout: 272 seconds]
shock_one has joined #ruby
nonks has quit [Ping timeout: 272 seconds]
yokel has joined #ruby
abuzze has quit [Ping timeout: 265 seconds]
bedouin is now known as hellschreiber
ARCADIVS has joined #ruby
rshetty has joined #ruby
oo_ has joined #ruby
havenwood has joined #ruby
robbyoconnor has joined #ruby
shock_one has quit [Ping timeout: 244 seconds]
j_mcnally has joined #ruby
Synthead has quit [Ping timeout: 255 seconds]
jaequery has joined #ruby
NoNMaDDeN has joined #ruby
maletor_ has joined #ruby
jaequery has quit [Client Quit]
Rosa has quit []
boombadaroomba has joined #ruby
<godd2> hola
<havenwood> godd2: heya
nonks has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
<godd2> wow, what a great audience
boombadaroomba has quit [Ping timeout: 240 seconds]
* havenwood dances an autumn jig
greenride has joined #ruby
arup_r has joined #ruby
Kricir has joined #ruby
jlast has joined #ruby
Kricir_ has joined #ruby
rshetty has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
Kricir__ has joined #ruby
Synthead has joined #ruby
Kricir___ has joined #ruby
ferr has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 272 seconds]
charliesome has quit [Quit: zzz]
Kricir has quit [Ping timeout: 260 seconds]
Kricir has joined #ruby
Kricir_ has quit [Ping timeout: 246 seconds]
* muzik thinks
TripTastic has joined #ruby
Kricir__ has quit [Ping timeout: 240 seconds]
Kricir___ has quit [Ping timeout: 246 seconds]
Kricir_ has joined #ruby
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
Kricir__ has joined #ruby
hobodave has joined #ruby
hobodave has quit [Client Quit]
Kricir has quit [Ping timeout: 260 seconds]
Kricir___ has joined #ruby
Kricir has joined #ruby
greenride has quit [Quit: Leaving.]
Krici____ has joined #ruby
Kricir_ has quit [Ping timeout: 246 seconds]
Krici____ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
Kricir__ has quit [Ping timeout: 260 seconds]
duncannz has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
Kricir___ has quit [Ping timeout: 240 seconds]
Kricir has quit [Ping timeout: 246 seconds]
jlast has quit [Remote host closed the connection]
SilkFox has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
charliesome has joined #ruby
ramfjord has joined #ruby
SilkFox has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
Atttwww has joined #ruby
mercwithamouth has joined #ruby
charliesome has quit [Quit: zzz]
jaequery has joined #ruby
mocchi has quit [Ping timeout: 240 seconds]
starkhalo has joined #ruby
mocchi has joined #ruby
thisguy123 has joined #ruby
rbrs has joined #ruby
charliesome has joined #ruby
Avahey has quit [Quit: Connection closed for inactivity]
Xiti` has joined #ruby
Xiti` has quit [Changing host]
Xiti` has joined #ruby
muzik has quit [Ping timeout: 260 seconds]
nonks has quit [Ping timeout: 272 seconds]
muzik has joined #ruby
Xiti` has quit [Client Quit]
Xiti` has joined #ruby
humd1ng3r has joined #ruby
Xiti has quit [Ping timeout: 260 seconds]
TheRinger has joined #ruby
gr33n7007h has joined #ruby
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubie has quit [Ping timeout: 246 seconds]
mary5030 has quit [Remote host closed the connection]
Kuda has quit [Quit: Byebye!]
oleo has quit [Quit: Verlassend]
codecop has joined #ruby
TripTastic is now known as JBreit
mistermocha has joined #ruby
Morkel has joined #ruby
Kricir has joined #ruby
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
chorkpop has joined #ruby
mistermocha has quit [Remote host closed the connection]
thisguy123 has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
arup_r has quit [Quit: Leaving.]
gr33n7007h has quit [Ping timeout: 265 seconds]
mistermocha has quit [Remote host closed the connection]
gaganjyot has joined #ruby
crazydiamond has quit [Remote host closed the connection]
godd2 has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
sigurding has joined #ruby
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
neoxquick has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
abuzze has joined #ruby
keen_ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
keen_______ has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 272 seconds]
gr33n7007h has joined #ruby
Morkel_ has joined #ruby
abuzze has quit [Ping timeout: 265 seconds]
linojon has quit [Quit: linojon]
chorkpop has quit [Quit: Leaving]
tagrudev has joined #ruby
Morkel has quit [Ping timeout: 272 seconds]
Morkel_ is now known as Morkel
fabrice31 has joined #ruby
Joufflu has joined #ruby
Kricir has quit [Remote host closed the connection]
pasties has quit [Ping timeout: 265 seconds]
Kricir has joined #ruby
gaganjyot has quit [Ping timeout: 245 seconds]
gauke has joined #ruby
SilkFox has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
fabrice31 has quit [Ping timeout: 245 seconds]
gauke has quit [Client Quit]
patric100e99 has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
pasties has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
rbrs has quit [Quit: Leaving]
SilkFox has quit [Ping timeout: 272 seconds]
xymbol has quit [Quit: Lingo: www.lingoirc.com]
NoNMaDDeN has quit [Remote host closed the connection]
patric100e99 has quit [Ping timeout: 255 seconds]
Hamled|Erp has left #ruby [#ruby]
maletor_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
emmesswhy has joined #ruby
lxsameer has joined #ruby
msmith has joined #ruby
valeriansaliou has joined #ruby
shock_one has joined #ruby
kantakt has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
tokik has quit [Read error: Connection reset by peer]
sjohnsen has joined #ruby
msmith has quit [Ping timeout: 258 seconds]
shock_one has quit [Ping timeout: 272 seconds]
kinda has joined #ruby
gr33n7007h has quit [Quit: Leaving]
ylluminarious has quit [Quit: Leaving...]
valeriansaliou has quit [Quit: Bye.]
valeriansaliou has joined #ruby
klaut has joined #ruby
valeriansaliou has quit [Client Quit]
valeriansaliou has joined #ruby
tokik has joined #ruby
Pixi_ has joined #ruby
benzrf is now known as benzrf|offline
Pixi_ has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
thisguy123 has joined #ruby
anonymous9381856 has joined #ruby
anonymous9381856 is now known as verkalets
<verkalets> Hey guys
verkalets has left #ruby [#ruby]
Xiti` has quit [Ping timeout: 258 seconds]
Spami has quit [Quit: Leaving]
verkalets has joined #ruby
NoNMaDDeN has joined #ruby
verkalets has left #ruby [#ruby]
verkalets has joined #ruby
<verkalets> Lagging
carraroj has joined #ruby
<verkalets> Mf
freerobby has quit [Quit: Leaving.]
thisguy123 has quit [Ping timeout: 240 seconds]
sinkensabe has joined #ruby
verkalets has left #ruby [#ruby]
thisguy123 has joined #ruby
Spami has joined #ruby
rippa has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
bal has joined #ruby
shock_one has joined #ruby
ylluminarious has joined #ruby
charliesome has quit [Quit: zzz]
nirvdrum has joined #ruby
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby
kinda has quit [Quit: Leaving]
ylluminarious has quit [Quit: Leaving...]
nirvdrum has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
Macaveli has joined #ruby
ht__th has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
Xeago has joined #ruby
johnhamelink has quit [Ping timeout: 272 seconds]
terrellt has quit [Ping timeout: 272 seconds]
terrellt has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
thisguy123 has quit [Ping timeout: 255 seconds]
timonv_ has joined #ruby
johnhamelink has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
mkaesz has joined #ruby
mistermocha has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
bMalum has joined #ruby
shock_one has quit [Quit: Be back later ...]
end_guy has quit [Ping timeout: 264 seconds]
i_s has joined #ruby
abuzze has joined #ruby
it0a has quit [Quit: WeeChat 1.0.1]
drakhu has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
sigurding has quit [Quit: sigurding]
sigurding has joined #ruby
mistermocha has quit [Ping timeout: 272 seconds]
agent_white has joined #ruby
bulters has joined #ruby
noop has joined #ruby
i_s has quit [Remote host closed the connection]
fabrice31 has joined #ruby
aganov has joined #ruby
andikr has joined #ruby
shock_one has joined #ruby
HelperW has joined #ruby
SilkFox has joined #ruby
skarn has quit [Ping timeout: 272 seconds]
Hien has joined #ruby
valeriansaliou has quit [Quit: Be back later ...]
tris has quit [Ping timeout: 272 seconds]
starkhalo has quit [Ping timeout: 250 seconds]
tris has joined #ruby
az7ar_away is now known as az7ar
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
az7ar is now known as az7ar_away
skarn has joined #ruby
SilkFox has quit [Ping timeout: 240 seconds]
end_guy has joined #ruby
rbrs has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
charliesome has quit [Quit: zzz]
Beoran has quit [Read error: Connection reset by peer]
acl_ has quit [Quit: ChatZilla 0.9.91-rdmsoft [XULRunner 32.0.3/20140923175406]]
charliesome has joined #ruby
charliesome has quit [Client Quit]
sigurding has quit [Quit: sigurding]
charliesome has joined #ruby
mengu has joined #ruby
charliesome has quit [Client Quit]
dumdedum_ has joined #ruby
wpp has joined #ruby
lkba has joined #ruby
lolmaus has joined #ruby
apeiros has joined #ruby
Xeago has quit [Remote host closed the connection]
Juanchito has joined #ruby
sigurding has joined #ruby
hanmac1 has joined #ruby
<hanmac1> hmmm my whole testcase idea is breaking because i cant test nicely what happen if my app is not inited yet ... i thought it might be working with test-unit but it seems that it doesnt
valeriansaliou has joined #ruby
ta has quit [Remote host closed the connection]
nonks has joined #ruby
alex88 has joined #ruby
sk87 has joined #ruby
valeriansaliou has quit [Ping timeout: 245 seconds]
monsieurp has joined #ruby
monsieurp has joined #ruby
Photism has quit [Quit: Leaving]
xymbol has joined #ruby
nonks has quit [Ping timeout: 255 seconds]
govg has quit [Ping timeout: 245 seconds]
IceDragon has quit [Quit: Space~~~]
ta has joined #ruby
bulters has quit [Ping timeout: 255 seconds]
muzik has quit [Quit: Leaving]
xymbol has quit [Quit: Be back later ...]
goshdarnyou has quit [Quit: Connection closed for inactivity]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
skolman__ has quit [Remote host closed the connection]
gauke has joined #ruby
skolman_ has joined #ruby
dangerousdave has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
renderful has joined #ruby
Dude007 has quit [Remote host closed the connection]
cajone has quit [Remote host closed the connection]
skolman_ has quit [Ping timeout: 272 seconds]
msmith has joined #ruby
bauruine_ has quit [Ping timeout: 265 seconds]
eikood has joined #ruby
relix has joined #ruby
poulet_a has joined #ruby
bulters has joined #ruby
renderful has quit [Ping timeout: 272 seconds]
eikood_ has joined #ruby
SilkFox has joined #ruby
eikood has quit [Client Quit]
FooMunki has joined #ruby
eikood_ has quit [Client Quit]
patric100e99 has joined #ruby
msmith has quit [Ping timeout: 245 seconds]
<shevy> test test test
eikood has joined #ruby
otakbeku has joined #ruby
ta has quit [Remote host closed the connection]
eikood_ has joined #ruby
SilkFox has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
coderhs has quit [Ping timeout: 240 seconds]
<alex88> pass pass pass
<sevenseacat> ...............F
<shevy> what is that stray F
<agent_white> My new feature spec d:
<agent_white> D: *
<shevy> hmm
<shevy> do we have a test library that uses smileys to indicate failure or success?
patric100e99 has quit [Ping timeout: 260 seconds]
vinleod has joined #ruby
rbrs has quit [Ping timeout: 250 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<agent_white> My terminal changes color based on the return value of the last command :D
eikood_ has quit [Client Quit]
eikood has quit [Quit: Leaving]
eikood has joined #ruby
nfk has joined #ruby
chthon has joined #ruby
ta has joined #ruby
matchaw has joined #ruby
jds has joined #ruby
<pontiki> you can write your own formatter
grzywacz has joined #ruby
olivier_bK has joined #ruby
mikecmpbll has joined #ruby
<hanmac1> shevy: passed test:
blueOxigen has joined #ruby
nonks has joined #ruby
<apeiros> hanmac1: hm, would actually be fun to replace . for passed with
bluOxigen has quit [Ping timeout: 272 seconds]
<hanmac1> hm ok yeah
ndrei has quit [Ping timeout: 240 seconds]
<hanmac1> but i find that "fear"face for asserts funny ;P
Joufflu has quit [Quit: Leaving]
marr has joined #ruby
<pontiki> i think i missed something in that
bluOxigen has joined #ruby
jheg has joined #ruby
<shevy> with every bullet so far!
blueOxigen has quit [Ping timeout: 240 seconds]
Akagi201 has joined #ruby
msmith has joined #ruby
<pontiki> ah yes, mosh eats some characters :(
rbrs has joined #ruby
<shevy> mosh the cat?
ta has quit [Ping timeout: 258 seconds]
<agent_white> I'm imagining a giant monster eating some heroes.
<pontiki> mosh the mobile shell
hackeron has quit [Ping timeout: 260 seconds]
hackeron has joined #ruby
akostrikov has joined #ruby
ephemerian has joined #ruby
bMalum has quit [Ping timeout: 260 seconds]
roolo has joined #ruby
Morkel has quit [Ping timeout: 240 seconds]
<shevy> agent_white I bet you watched too many monty python movies
<agent_white> shevy: Just cartoons :D
<agent_white> Adventure Time is too awesome not to watch.
_JamieD_ has quit [Ping timeout: 260 seconds]
sigurding has quit [Ping timeout: 245 seconds]
msmith has quit [Ping timeout: 265 seconds]
ta has joined #ruby
alex88 has quit [Quit: Leaving...]
qba73 has joined #ruby
ndrei has joined #ruby
kaspergrubbe has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
mityaz has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
mwlang has quit [Read error: Connection reset by peer]
mityaz has joined #ruby
yfeldblum has joined #ruby
<shevy> omg
<hanmac1> agent_white: Mathemathical! ;P
<shevy> don't let hanmac1 find out
<shevy> TOO LATE :(
<hanmac1> to late ,P
<agent_white> hanmac1: RHOMBUS!!!
yfeldblum has quit [Remote host closed the connection]
<agent_white> Hahaha. I have Finn and Jake tatooed on my leg.
<agent_white> tatt**
yfeldblum has joined #ruby
Takle has joined #ruby
<hanmac1> i really need to watch the latest episodes but i didnt had much time for that ...
<agent_white> I live in the country, so I can't get them :(
<agent_white> Last one I LOVED was Blade of Grass. Probably my favorite ending to an episode so far.
<agent_white> "YOU ARE CURSED FOREVER!!MUAHAHA" -- "Oh. OK. Whatevs."
ta has quit [Remote host closed the connection]
dangerousdave has joined #ruby
pagios_ has joined #ruby
<pagios_> hi
<pagios_> http://pastebin.com/5RSUS5HU <-- what am i doing wrong ? :(
mikecmpbll has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
narph has joined #ruby
<tobiasvl> pagios_: many things
mikecmpbll has joined #ruby
<tobiasvl> pagios_: you can't interpolate inside single quotes. so that last line needs to be
boombadaroomba has joined #ruby
<pontiki> why not just write a bash script?
<tobiasvl> print "#{TKBPS}"
<tobiasvl> and yeah I thought that code was bash at first :P
<pagios_> trying to stay in ruby
<pontiki> it mostly is
<pontiki> you aren't staying in ruby at all
<hanmac1> agent_white: hm i liked the Finn x FB shipping ... bad that they broke up ...
<pagios_> same file i mean
shredding has joined #ruby
<pontiki> 8 lines out of 13 are shell invocations
<shevy> ack
<shevy> 8 times the devil
<hanmac1> ping jhass|off:
<shevy> pagios_ all those operations can be written in pure ruby man
<pontiki> the ones that really kill it are doing basic arithmatic by shelling out
<shevy> print '#{TKBPS}' is non-sensical, you could just do print TKBPS
jhass|off is now known as jhass
<shevy> INTFACE = ARGV
<shevy> R1=`cat /sys/class/net/#{INTFACE}/statistics/rx_bytes`
<shevy> this seems like a problem - ARGV is an array
boombadaroomba has quit [Ping timeout: 240 seconds]
AFKGeek has joined #ruby
_JamieD_ has joined #ruby
_JamieD_ has quit [Client Quit]
<jhass> hanmac1: sup?
aspiers has quit [Ping timeout: 260 seconds]
FooMunki has quit [Ping timeout: 260 seconds]
<hanmac1> jhass: didnt you last say that its bad that i want to test in the specs what does happen if the app is not init-ed ?
blueOxigen has joined #ruby
<hanmac1> i tested rspec and test-unit again ... seems to be i cant let them run in separate child processes ...
rostam has quit [Read error: Connection reset by peer]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hanmac1> means i throw the "pre"App testing away and only test what should work when the app is started
tobiasvl has quit [Ping timeout: 260 seconds]
<jhass> :)
Juzzika has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
<jhass> I just think what you were testing there was an implementation detail, nothing you would care about staying that way
rostam has joined #ruby
lsmola has quit [Ping timeout: 272 seconds]
<jhass> from an interface perspective
rdark has joined #ruby
<hanmac1> yeah ... i planned that week only to add specs/testcases and samples, not new code until weekend
shortCircuit__ has joined #ruby
tvw has joined #ruby
rossgeesman has joined #ruby
elaptics`away is now known as elaptics
einarj has joined #ruby
LoBoGoL has quit [Ping timeout: 272 seconds]
WormDrink has joined #ruby
shock_one has quit [Quit: Be back later ...]
narcan has joined #ruby
joonty has joined #ruby
sheldonh has joined #ruby
charliesome has quit [Quit: zzz]
<sheldonh> why does Resolv::DNS#getresources(name, Resolv::DNS::Resource::IN::ANY) return an empty list, when Resolv::DNS#getresources(name, Resolv::DNS::Resource::IN::SRV) returns a list of size > 0 for that name?
bluOxigen has joined #ruby
ta has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Atttwww has quit [Ping timeout: 245 seconds]
Scotteh_ has quit [Read error: Connection reset by peer]
blueOxigen has quit [Ping timeout: 245 seconds]
otakbeku has quit [Ping timeout: 245 seconds]
ta has quit [Client Quit]
charliesome has joined #ruby
lsmola has joined #ruby
ta has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Takle has quit [Remote host closed the connection]
SilkFox has joined #ruby
ndrei has quit [Quit: Lost terminal]
LoBoGoL has joined #ruby
Takle has joined #ruby
rossgeesman has quit [Ping timeout: 245 seconds]
gauke_ has joined #ruby
akostrikov has quit [Remote host closed the connection]
thejoecarroll_ has quit [Quit: ZNC - http://znc.in]
<jhass> which name do you try?
lkba has quit [Ping timeout: 255 seconds]
tvl has joined #ruby
gauke has quit [Ping timeout: 255 seconds]
gauke_ is now known as gauke
thejoecarroll has joined #ruby
SilkFox has quit [Ping timeout: 265 seconds]
tvl is now known as tobiasvl
PierreRambaud has joined #ruby
<sheldonh> jhass: "redis-1" (which the configured resolvers know about, and offer SRV records for
<jhass> so nothing we can locally reproduce
<jhass> it works as expected for the first domain with a SRV record that came to my mind
<sheldonh> jhass: no. i've hunted for public SRV records to test with, but despaired
<jhass> xmpp ;)
<jhass> _xmpp-client._tcp.
<jhass> should yield plenty of examples
<sheldonh> cool, i'll try with _xmpp-server._tcp.google.com...
<sheldonh> jhass: same problem with name = "_xmpp-server._tcp.google.com." ... Resolv::DNS::Resource::IN::SRV gives an array with size > 0, while Resolv::DNS::Resource::IN::ANY gives an empty array
<jhass> and dig _xmpp-server._tcp.google.com ANY returns all records?
<jhass> because that one works too as expected here
<sheldonh> aha! it's interaction with my dns servers, then. thanks for the debugging help :)
<olivier_bK> how to check with Mechanize when the login is ok ?
<jhass> you're welcome
kyb3r_ has joined #ruby
ki0 has joined #ruby
<jhass> olivier_bK: depends on the site I guess, one could try to find a specific element on the result page or look at the redirect I guess
wpp has quit [Quit: ZZZzzz…]
chipotle has quit [Ping timeout: 272 seconds]
sevenseacat has quit [Remote host closed the connection]
coderhs has joined #ruby
<sheldonh> jhass: found this in the comments of the dns server (skydns): // fuck ANY queries
<jhass> \o/
<jhass> more <3 for unbound & powerdns :P
<sheldonh> jhass: regrettably, those don't really play in the same space as skydns :)
<jhass> mmh, sounds a bit like reinventing mdns/zeroconf?
lsmola has quit [Ping timeout: 260 seconds]
Timgauthier has joined #ruby
eikood has quit [Remote host closed the connection]
Spami has joined #ruby
Spami has quit [Client Quit]
papal has quit [Remote host closed the connection]
akostrikov has joined #ruby
akostrikov has quit [Remote host closed the connection]
<sheldonh> jhass: well i'd say dns-sd was reinventing zeroconf ;)
Spami has joined #ruby
<sheldonh> jhass: skydns (and consul and others) aren't primarily focused on automatic discovery. primarily, what they focus on making easier is automatic registration
<sheldonh> jhass: i'm using it in a docker cluster, where new containers are automatically registered into DNS. but having seen this, i'm going to switch back to consul
codezomb has quit [Quit: Textual IRC Client: www.textualapp.com]
siwica has joined #ruby
AlSquire has joined #ruby
<jhass> mmh, I guess I'd be intrigued to built something that just uses RFC2136
carraroj has joined #ruby
<sheldonh> jhass: that can be done. it's just hard to back it onto a distributed, replicated, consistent store
NoNMaDDeN has quit [Remote host closed the connection]
<olivier_bK> jhass, do you use Mechanize ?
<jhass> well, yeah, you'd need a single master (per domain)
<jhass> olivier_bK: no
<olivier_bK> :(
Soda has joined #ruby
<pontiki> what's the question, olivier_bK ?
Dude007 has joined #ruby
papal has joined #ruby
siwica1 has joined #ruby
siwica has quit [Ping timeout: 260 seconds]
mengu has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
narcan has joined #ruby
lsmola has joined #ruby
duncannz has quit [Remote host closed the connection]
hellangel7 has joined #ruby
AlexRussia has joined #ruby
coderhs has quit [Ping timeout: 260 seconds]
j_mcnally has joined #ruby
<shevy> that was his question!
<pontiki> oh!
<pontiki> i get it!
<shevy> :D
<shevy> olivier_bK have you released a gem yet?
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Squarepy has joined #ruby
NoNMaDDeN has joined #ruby
zarubin has joined #ruby
<pagios_> i have a bash script that echo's some strings, i want to capture that into ruby
<pagios_> using rx = system("bashscript" seems to store the exit code and not the output of the bash script
<olivier_bK> yes yes
Wiscontiy has joined #ruby
<olivier_bK> shevy, you want to know ?
<shevy> yeah
<olivier_bK> 10 $
tkuchiki_ has joined #ruby
<shevy> eh?
<olivier_bK> and i tell you :)
<shevy> it costs you so much?
<shevy> it must be a very useful gem
<shevy> pagios_ use `` instead of system(). system returns only true or false
kaspergrubbe has quit [Read error: No route to host]
<pagios_> shevy: that would be stored as a strong or a numb
kaspergrubbe has joined #ruby
<shevy> pagios_ and I doubt it gives you the exit code? http://www.ruby-doc.org/core-2.1.3/Kernel.html#method-i-system
<shevy> system([env,] command... [,options]) ? true, false or nil
<shevy> you can see -> true, false, nil, so it should yield 3 different results, but not the exit code or?
<shevy> pagios_ you can test it, and apply .class on the result ;)
<olivier_bK> how are you shevy
tkuchiki has quit [Ping timeout: 240 seconds]
<shevy> olivier_bK quite fine
<shevy> rewriting code is boring
<shevy> one day I'll reach the point where I will never have to rewrite anything again
terlar has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
zarubin has quit [Quit: Leaving.]
Timgauthier has quit [Read error: Connection reset by peer]
zarubin has joined #ruby
St_Marx has quit [Remote host closed the connection]
<pontiki> never
zarubin has quit [Client Quit]
Timgauthier has joined #ruby
jheg has quit [Quit: jheg]
Takle has quit [Remote host closed the connection]
St_Marx has joined #ruby
<jhass> it's called "death"
<pontiki> even then
<shevy> you folks are so pessimistic
<pontiki> you know how the old musicians dealt with death: they decomposed
<shevy> all it takes is to write perfect code
<pontiki> old programmers just refactor
Takle has joined #ruby
stef204 has joined #ruby
stef204 has quit [Client Quit]
coderhs has joined #ruby
ramfjord has joined #ruby
zarubin has joined #ruby
workmad3 has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
coderhs has quit [Ping timeout: 255 seconds]
SilkFox has joined #ruby
Timgauthier is now known as timgauthier_away
sepp2k has joined #ruby
patric100e99 has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SilkFox has quit [Ping timeout: 258 seconds]
a_ has joined #ruby
<agent_white> O
ramfjord has quit [Ping timeout: 272 seconds]
<agent_white> I'm looking forward to looking back at my code I write now.
patric100e99 has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
Wiscontiy has quit []
emmesswhy has quit [Quit: This computer has gone to sleep]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
jheg has joined #ruby
jheg has quit [Client Quit]
rodfersou has joined #ruby
Takle has joined #ruby
jheg has joined #ruby
zarubin has quit [Quit: Leaving.]
zarubin has joined #ruby
zarubin has quit [Client Quit]
timonv_ has quit [Remote host closed the connection]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Timgauthier has joined #ruby
timonv_ has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mistermocha has joined #ruby
yokel has quit [Ping timeout: 265 seconds]
kwd has left #ruby [#ruby]
jack_rabbit has quit [Ping timeout: 265 seconds]
workmad3 has quit [Quit: Lost terminal]
yokel has joined #ruby
mkaesz has quit [Ping timeout: 265 seconds]
mistermocha has quit [Ping timeout: 265 seconds]
wpp has joined #ruby
lxsameer has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
DLSteve has joined #ruby
Timgauthier is now known as timgauthier_away
Takle has joined #ruby
gaganjyot has joined #ruby
wpp has quit [Read error: Connection reset by peer]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
ylluminarious has joined #ruby
ndrei has quit [Client Quit]
ndrei has joined #ruby
ndrei has quit [Client Quit]
roolo has quit [Remote host closed the connection]
ndrei has joined #ruby
roolo has joined #ruby
<shevy> agent_white I hate that
<shevy> I usually think "man, does this code suck"
<shevy> it got better once I enforced a stricter structure
<agent_white> Hahah. I don't know any better for now, so I think I'll have some laughs later on
drawingthesun has joined #ruby
<shevy> simple things like - if I have a larger project, then I will also have a file stored there version/version.rb just to put the version number inside
drawingthesun has quit [Read error: Connection reset by peer]
<shevy> before that, I usually just directly put the version in the .gemspec file alone and that was it
User458764 has joined #ruby
ldnunes has joined #ruby
ylluminarious has quit [Ping timeout: 244 seconds]
<agent_white> Damn.
<agent_white> Luckily I have no projects close to needing release numbers :D
matcouto has joined #ruby
roolo has quit [Ping timeout: 240 seconds]
<shevy> I do that only for larger projects
<shevy> I found it much easier to release in small steps
<shevy> like - add one feature, push up
mxrguspxrt has joined #ruby
drawingthesun has joined #ruby
cmxu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zaid_h has joined #ruby
tokik has quit [Ping timeout: 272 seconds]
Akagi201 has quit []
hackeron has quit [Ping timeout: 246 seconds]
bulters has quit [Quit: leaving]
hackeron has joined #ruby
william3 has joined #ruby
tkuchiki has joined #ruby
tkuchiki_ has quit [Read error: Connection reset by peer]
Squarepy has quit [Quit: Leaving]
postmodern has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
nor has joined #ruby
nor is now known as moOoo
SilkFox has joined #ruby
I_Eat_Humans has left #ruby [#ruby]
<moOoo> hi
mkaesz has joined #ruby
<agent_white> herro
<moOoo> allot of ruby programmers here :D
<moOoo> daym
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<moOoo> awesome
SilkFox has quit [Ping timeout: 255 seconds]
DouweM has quit [Read error: Connection reset by peer]
jottr_ has joined #ruby
niklasb has joined #ruby
tkuchiki has quit [Ping timeout: 255 seconds]
xymbol has joined #ruby
nonks has quit [Ping timeout: 246 seconds]
NoNMaDDeN has quit [Remote host closed the connection]
a_ has quit [Ping timeout: 255 seconds]
reinaldob has joined #ruby
oo_ has quit [Remote host closed the connection]
carraroj has quit [Quit: Konversation terminated!]
aspiers has joined #ruby
phutchins has joined #ruby
Macaveli has joined #ruby
Guest97120 has joined #ruby
a_ has joined #ruby
yeticry has quit [Ping timeout: 265 seconds]
Macaveli has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
relix has joined #ruby
yeticry has joined #ruby
Takle has quit [Remote host closed the connection]
lxsameer has joined #ruby
carraroj has joined #ruby
end_guy has quit [Remote host closed the connection]
Akagi201 has joined #ruby
end_guy has joined #ruby
spastorino has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
decoponio has joined #ruby
St_Marx has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
mxrguspxrt has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
F__i__L has joined #ruby
timonv_ has quit [Remote host closed the connection]
zaid_h has quit [Quit: ZZZzzz…]
Takle has quit [Ping timeout: 260 seconds]
autonomousdev has joined #ruby
<shevy> moOoo hey
<shevy> some of them are perl hackers
<shevy> like eam
william3 has quit [Remote host closed the connection]
NoNMaDDeN has joined #ruby
roolo has joined #ruby
pandaant has joined #ruby
<shevy> moOoo are you writing ruby code?
St_Marx has joined #ruby
shazaum has joined #ruby
nonks has joined #ruby
davidhq has joined #ruby
dblessing has joined #ruby
timonv_ has joined #ruby
carraroj has quit [Ping timeout: 244 seconds]
St_Marx has quit [*.net *.split]
end_guy has quit [*.net *.split]
atmosx has quit [*.net *.split]
DrCode has quit [*.net *.split]
<sheldonh> anyone know of something like dns-clb-go for ruby (client-side load balancer for dns-based service discovery)? https://github.com/benschw/dns-clb-go
Deejay_ has joined #ruby
davidhq has quit [*.net *.split]
a_ has quit [*.net *.split]
kaspergrubbe has quit [*.net *.split]
WormDrink has quit [*.net *.split]
kantakt has quit [*.net *.split]
malcolmva has quit [*.net *.split]
nuck has quit [*.net *.split]
parus has quit [*.net *.split]
Hightower_ has quit [*.net *.split]
timmow has quit [*.net *.split]
kiki_lamb has quit [*.net *.split]
vieq has quit [*.net *.split]
Radar has quit [*.net *.split]
Brando753 has quit [*.net *.split]
Bish_ has quit [*.net *.split]
Kabaka has quit [*.net *.split]
vlad_starkov has quit [*.net *.split]
QKO has quit [*.net *.split]
Guest53847 has quit [*.net *.split]
QKO has joined #ruby
parus has joined #ruby
Radar has joined #ruby
a_ has joined #ruby
kantakt has joined #ruby
malcolmva has joined #ruby
WormDrink has joined #ruby
kaspergrubbe has joined #ruby
davidhq has joined #ruby
vlad_starkov has joined #ruby
timmow has joined #ruby
vieq has joined #ruby
nuck has joined #ruby
Radar is now known as Guest57742
RealMarc has joined #ruby
tadayoshi has joined #ruby
Hightower_ has joined #ruby
mengu has quit [Remote host closed the connection]
Bish has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kabaka has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
bogeyd6 has quit [Read error: Connection reset by peer]
nonks has quit [Ping timeout: 255 seconds]
mengu has joined #ruby
rbrs has quit [Remote host closed the connection]
Brando753 has joined #ruby
doev has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
kiki_lamb has joined #ruby
rossgeesman has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
Deejay_ has quit [Quit: Computer has gone to sleep.]
DouweM has joined #ruby
Timgauthier has joined #ruby
Takle has joined #ruby
mxrguspxrt has joined #ruby
gccostabr has left #ruby ["See you later!"]
Deejay_ has joined #ruby
User458764 has quit [Ping timeout: 250 seconds]
rossgeesman has quit [Ping timeout: 245 seconds]
shock_one has joined #ruby
User458764 has joined #ruby
shredding has quit [Quit: shredding]
patrick99e99 has joined #ruby
SilkFox has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
catphish has joined #ruby
xiq has quit [Ping timeout: 255 seconds]
<catphish> are there any alternatives to rack for http server API?
chthon has quit [Quit: Ex-Chat]
noop has quit [Ping timeout: 240 seconds]
patrick99e99 has quit [Ping timeout: 245 seconds]
yalue has joined #ruby
SilkFox has quit [Ping timeout: 260 seconds]
<catphish> i need an API where i can stream data to the client during a request
<sheldonh> catphish: rack supports that
tokik has joined #ruby
<sheldonh> catphish: that's why the body is an enumerable, not a string
<sheldonh> catphish: rach calls each on it
<catphish> sheldonh: no, i need to do it during the request, not after its complete
<sheldonh> catphish: so provide a body whose #each returns available bytes. what's the problem?
<catphish> i don't understand
max96at|off is now known as max96at
<catphish> the problem is that rack won't start to stream anything until the app has returned an array to it
AlSquirrel has joined #ruby
<sheldonh> catphish: yes
sk87 has joined #ruby
<sheldonh> catphish: so return [200, {...}, MyAwesomeStreamer.new]
iamjarvo has joined #ruby
<sheldonh> catphish: and implement MyAwesomeStreamer#each to return some data
Guest48968 has joined #ruby
<catphish> the only workaround i've found for this is to create a fiber during the request, then call the fiber from a streamer class, but that seems to create all kinds of nasty race conditions in some web servers
<Guest48968> hey, does anyone know how I can use: http://www.rubydoc.info/gems/net-sftp/2.0.5/Net/SFTP/Operations/Dir:glob for sorting by time?
<jhass> catphish: what are you streaming?
<catphish> sheldonh: as i said, i need to stream data while the request is running, not after completion
<catphish> sheldonh: specifically my problem is an HTTP proxy
<catphish> i need to stream the output of net/http to rack
<sheldonh> catphish: "the request is running" until each stops giving rack data
<catphish> jhass: i meant to tag you, it's an http proxy, net/http -> rack
AlSquire has quit [Ping timeout: 244 seconds]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
<sheldonh> catphish: if you want a pretty DSL that helps you get past not being able to imagine a request in progress after you return the response array, see https://github.com/intridea/rack-stream
<catphish> sheldonh: my problem is actually partially related to net/http, it can't stream output outside of the method that opened the connection
xiq has joined #ruby
<catphish> sheldonh: i understand the concept better than you think i do
<sheldonh> catphish: then i'm happy to leave it at your understanding what you want better than i do. happy hunting :)
Guest48968 has quit [Quit: WeeChat 0.4.1]
<catphish> jhass: that library uses Servolux::Piper, which creates a fork for every request
bluvaw has joined #ruby
<catphish> that's even nastier than my fiber hack :)
<bluvaw> where do I learn ruby?
<jhass> catphish: might give some ideas though
<catphish> so are there any alternatives to rack for http server API?
<jhass> Guest63337: I don't think glob provides that functionality, you need to sort them afterwards (yes, this gonna be slow over sftp)
<bluvaw> anyone?
<catphish> essentially, what i need to be able to do is provide both the headers, and stream the data in the same method, rack simply can't do that
<jhass> arg wrong guest, left already
<jhass> bluvaw: your first programming language?
<bluvaw> no
<bluvaw> I programmed in C before
tadayoshi has quit []
<bluvaw> and still am
<catphish> do you know OO programming?
<catphish> if so, you shouldnt have too much trouble :)
<sheldonh> catphish: you're wrong about rack. i'm not saying you have to use rack, but it doesn't help people understand what you want by telling them it can't do what it can
<bluvaw> not really, i don't know OOP
<lolmaus> Is it possible to store a method in a variable and then call it? Like in JS. I don't want to change it's context, just to make it shorter to type.
<jhass> lolmaus: not for that purpose and it's not a good approach anyway, it'll make your code harder to understand
yfeldblum has joined #ruby
<catphish> sheldonh: ok then, lets assume you're right, please explain to me how i can provide a response code and headers to rack, then stream data within the same code block
<jhass> lolmaus: if that's your own class you can provide aliases with alias_method though
<catphish> sheldonh: i provide https://github.com/zerowidth/rack-streaming-proxy as evidence that it is not possible
Takle_ has joined #ruby
Takle has quit [Read error: Connection reset by peer]
<catphish> but i'd (genuinely) like to know how you think it could work
<sheldonh> catphish: let me see if i can hack something up that proves my point. either way, learning lies just around the corner :)
<sheldonh> catphish: do you have a url handy for a large file? :)
eikood has joined #ruby
<catphish> no, though the size of the file is unimportantr
<catphish> *unimportant
<bluvaw> When I do: '3' + '3' it returns: "33"
<bluvaw> is that the concatenation operator?
jY has left #ruby ["Linkinus - http://linkinus.com"]
DrCode has joined #ruby
<tobiasvl> bluvaw: yes
St_Marx has joined #ruby
<bluvaw> tobiasvl: cool
<catphish> bluvaw: + is a method on a string that concatonates it with another string and returns the result
<sheldonh> catphish: file size helps make sure response.read_body yields more than once, though
yfeldblum has quit [Ping timeout: 260 seconds]
<bluvaw> alright, thanks
siwica1 has quit [Ping timeout: 245 seconds]
<catphish> bluvaw: conversely, + on an integer adds it to another integer and returns the result
krz has quit [Ping timeout: 272 seconds]
<catphish> just think of +, -, << etc as methods, they may have different meanings depending on the type of object they're called on
dumdedum_ has quit [Quit: foo]
tadayoshi has joined #ruby
<lolmaus> jhass: thx
eikood has quit [Client Quit]
zaid_h has joined #ruby
<catphish> sheldonh: i see, well found one: https://androidnetworktester.googlecode.com/files/10mb.txt
eikood has joined #ruby
<catphish> sheldonh: i'm glad you understand what i'm doing :)
NoNMaDDeN has quit [Remote host closed the connection]
<catphish> sheldonh: the problem is being able to call read_body outside of a net:http.start block
mbwe has quit [Quit: WeeChat 0.4.2]
<catphish> ie in the streamer instance
eikood has quit [Client Quit]
callumacrae has quit [Ping timeout: 255 seconds]
umdstu has joined #ruby
eikood has joined #ruby
end_guy has joined #ruby
<sheldonh> catphish: ah. you can't pass response out
<bluvaw> ''.methods.length prints out "162"
<catphish> actually iirc think it needs to be in a net::http.request{} block
<bluvaw> why
manzo has joined #ruby
<tobiasvl> bluvaw: to continue on what catphish said, '3' + '3' is syntactic sugar for '3'.+('3')
<catphish> sheldonh: correct, you can not
<catphish> sheldonh: one could probably just use a different http library, but i couldnt find one that did the necessary :(
<umdstu> i have an openstruct object with two fields, `fields` and `categories`. `categories` accesses fine, but if I try to access `fields` it says its nil. If I inspect the object, all data is present. what's goin on here? Only seems to happen for some records
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dangerousdave has joined #ruby
<shock_one> umdstu: check if the 'fields' method isnt' redefined. What's the output of 'show-method obj.fieds' inpry?
<shock_one> *in pry?
Deejay_ has quit [Quit: Computer has gone to sleep.]
<jhass> bluvaw: .methods returns an array of symbols that correspond to names of methods defined on the object you call methods on. The size of that array is 162, which means there are 162 methods available to call on a string
<bluvaw> but how is '' an array
callumacrae has joined #ruby
<jhass> it's not, ''.methods returns one
<jhass> >> ''.methods
<eval-in__> jhass => [:<=>, :==, :===, :eql?, :hash, :casecmp, :+, :*, :%, :[], :[]=, :insert, :length, :size, :bytesize, :empty?, :=~, :match, :succ, :succ!, :next, :next!, :upto, :index, :rindex, :replace, :clear, :chr, ... (https://eval.in/208313)
<bluvaw> >> ''.methods.length
<eval-in__> bluvaw => 164 (https://eval.in/208315)
mxrguspxrt has quit [Remote host closed the connection]
<jhass> bluvaw: make sure to use eval-in (>>) only for demo purposes, you should get a local ruby install for experiments ;)
<bluvaw> okay
<bluvaw> i have ruby
NoNMaDDeN has joined #ruby
<jhass> okay, then just type irb to get a read eval print loop
jottr_ has quit [Ping timeout: 255 seconds]
tadayoshi has quit [Read error: Connection reset by peer]
<bluvaw> im using irb rn
<bluvaw> just wanted to show you how it outputs 162 or a number around there
tadayoshi has joined #ruby
<jhass> yes, that's totally expected
<umdstu> shock_one: I just realized its a class derived from 'RecursiveOpenStruct', not 'OpenStruct'. not sure how that changes anything yet
_5kg has quit [Ping timeout: 258 seconds]
unclouded has quit [Ping timeout: 245 seconds]
<jhass> you can also write that code as: methods_on_string = ''.methods; number_of_methods = methods_on_string.length; does that make more sense to you?
<sheldonh> catphish: i see your problem: ERROR NoMethodError: undefined method `read_body' for #<Net::HTTP www.google.com:443 open=false> :(
chipotle has joined #ruby
aclearman037 has joined #ruby
Aaaal has joined #ruby
<bluvaw> jhass: yes
<bluvaw> but how can a string have methods
<shevy> bluvaw you query an Array for its amount of elements, hence why you receive 162
<sheldonh> catphish: i agree with you. you need a better http client or you need an http server library that supports the response writer model
<shevy> bluvaw you don't get a String, you "turned" it into an Array
<bluvaw> oh
mengu has quit [Remote host closed the connection]
nonks has joined #ruby
rkalfane has joined #ruby
xymbol has quit [Quit: Be back later ...]
<tobiasvl> bluvaw: and a string can have methods in ruby, because strings are objects
<apeiros> also numbers, true, false, nil
<jhass> bluvaw: in fact everything is an object in ruby and thus has methods
<apeiros> all objects in ruby @ bluvaw
atmosx has joined #ruby
<sheldonh> catphish: you might still look at the rack-stream example i sent you, though. it basically implements the on-finish hack described in Rack::Response
* apeiros suppresses urge to be pedantic
<tobiasvl> >> 2.even?
<eval-in__> tobiasvl => true (https://eval.in/208316)
shock_one has quit [Remote host closed the connection]
<apeiros> >> true.is_a?(Object)
<eval-in__> apeiros => true (https://eval.in/208317)
* jhass feeds apeiros a cookie
shock_one has joined #ruby
<bluvaw> i thought true was a boolean
<jhass> bluvaw: those aren't exclusive properties
<apeiros> true is a boolean, but booleans are objects in ruby
<catphish> sheldonh: i'll look at the rack-stream thing
* shevy feeds apeiros a horse
<bluvaw> k
unclouded has joined #ruby
<apeiros> (also ruby does not have an actual Boolean class)
_5kg has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<sheldonh> it has both! :)
<catphish> shevy: oh, rack-stream seems to use EM, i really didnt understand the implications if that with various web servers
<tobiasvl> bluvaw: the thing to understand is that, unlike in many other object oriented languaes, even literals and "primitive types" are objects in ruby
mengu has quit [Remote host closed the connection]
<catphish> sorry, sheldonh
<tobiasvl> bluvaw: even classes are objects…
shock_one has quit [Remote host closed the connection]
<agent_white> Hm. Is there a way to check what methods are added between a class and instantiating it? ie -- `Array.methods.count <=> Array.new.methods.count`
shock_one has joined #ruby
<agent_white> I want to see what all methods were added on by ".new"
<tobiasvl> agent_white: Array.new.methods.count - Array.methods.count
<agent_white> tobiasvl: That gives me the count, but not the actual methods added.
<tobiasvl> agent_white: remove .count then
<tobiasvl> Array.new.methods - Array.methods
<bluvaw> is gets.chomp good for input
<apeiros> agent_white: that question doesn't make sense
<jhass> agent_white: you might be interested in Array.instance_methods(false)
<apeiros> agent_white: instances of a class do not *add* methods over the class
<apeiros> the two object types are entirely different
<tobiasvl> bluvaw: yes sure
autonomousdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sheldonh> catphish: you don't have to use rack-stream; it just nicely demonstrates the use Rack::Response finish to have write calls that are synchronous with the rack response (unbuffered)
<apeiros> i.e., it makes as much sense as asking "how many methods does String add over Integer" (instances of two unrelated classes)
nonks has quit [Ping timeout: 272 seconds]
<agent_white> tobiasvl: Oh wow. For some reason earlier I thought my list was off!
<agent_white> apeiros: Hm
<catphish> sheldonh: i see, i'll look into that i guess
<sheldonh> catphish: in the end, it all comes down to an empty body [200, {...}, []] with a magic finish
<agent_white> apeiros: Even when they are empty? Like Array.methods and Array.new.methods ?
<apeiros> agent_white: "even when the string is empty and the number is zero?"
<catphish> sheldonh: can the finish replace the code and headers?
<apeiros> no. sense.
<sheldonh> catphish: no
<apeiros> >> [Array.class, [].class]
<eval-in__> apeiros => [Class, Array] (https://eval.in/208318)
<catphish> sheldonh: doesn't that leave me with exactly the same problem then?
rippa has joined #ruby
<sheldonh> catphish: it's all a bit gross, imo. better to find a better client or server. you came in looking for a better server, but it seems to me that the thing that's revolting here is net/http :)
<apeiros> agent_white: ^ the class "Array" and an instance of Array are instances of two entirely different and unrelated classes.
autonomousdev has joined #ruby
<apeiros> there's no inheritance chain connecting them
<apeiros> (or anything remotely similar)
<catphish> sheldonh: you're absolutely right, if i could find an http library that runs in a simple consecutive way, this would be easy!
narph has quit [Quit: Connection closed for inactivity]
<sheldonh> catphish: ruby people go crazy about blocks :)
<catphish> ie: http = HTTP.new; http.request(request); x = http.get_status; y = http.get_headers; z=http.read_body; http.close
<agent_white> apeiros: huh... so the only common methods they would share would be from Object?
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
<catphish> sheldonh: i know, i actually very un-ruby for a ruby developer :(
<catphish> people complain that my code is procedural
rkalfane has joined #ruby
<bluvaw> does "1 == 1" return 1?
<jhass> agent_white: since that's their common base class, yes
<sheldonh> catphish: blocks are wonderful, blocks are awesome, blocks should never be the only interface :)
<apeiros> agent_white: from their common ancestry. correct. (Object, Kernel, whatever stuff you mixed into Object)
<catphish> bluvaw: probably true
mxrguspxrt has joined #ruby
Aaaal has quit [Quit: Aaaal]
<agent_white> Hm.
pu22l3r has quit [Remote host closed the connection]
<catphish> sheldonh: i agree :)
benzrf|offline is now known as benzrf
<hanmac1> bluvaw: nope its true
<catphish> blocks are pretty, but not always useful :)
<agent_white> Yeah I was just thinking about it, and was curious how much 'additional stuff' I got by instantiating a class.
<bluvaw> oh
<apeiros> catphish: lies!
pu22l3r has joined #ruby
<catphish> apeiros: lol
workmad3 has joined #ruby
<apeiros> agent_white: yeah, and that line of thought means you have a misunderstanding of how a class and its instances relate to each other
<agent_white> apeiros: Indeed. I mean, I just imagined that it would add getter/setters and stuff.
ylluminarious has joined #ruby
<agent_white> Not like... 80 methods.
<shevy> it's a war object, ready to enter battle!
<tobiasvl> bluvaw: since you mentioned that you came from C: in ruby we have the boolean values "true" and "false", not 1 and 0. in addition, everything in ruby evaluates to true (it has "truthyness") except false and nil.
<agent_white> Where do they come from?
<shevy> the ruby mother
<catphish> sheldonh: how do i pass a block to finish?
<sheldonh> catphish: https://github.com/nahi/httpclient supports async requests
<agent_white> ;D
<olivier_bK> how to convert xml to HTML i use nokogiri
<shevy> or the ruby universe, called ObjectSpace
rbrs has joined #ruby
<catphish> sheldonh: you're right, messing with the http client is the saner option here
<agent_white> apeiros: I guess I don't understand, when I create an object from a class, where those additional methods pop up from.
<apeiros> agent_white: the point is, they are not *additional* methods
<sheldonh> catphish: (see "How to use" option 2)
<jhass> agent_white: Array is a Class is a Module. A module provides a container for instance methods (what you define with def foo). See Module#instance_methods
<apeiros> agent_white: instance of class array does NOT mean "class array + things"
<catphish> sheldonh: that's quite sexy, thanks
humd1ng3r has quit [Remote host closed the connection]
<olivier_bK> i find the solution lol
<apeiros> agent_white: and the methods always come from the defined instance methods of all classes in the ancestry
<bluvaw> why is sock_raw powerful
<sheldonh> catphish: oh dear, wait. i'm not seeing how to stream in the body
siwica has joined #ruby
<catphish> sheldonh: it says it gives you an IO
<apeiros> i.e. obj.class.instance_methods + obj.class.superclass.instance_methods + … (though, .superclass does not list included modules, .ancestors does)
pu22l3r has quit [Ping timeout: 260 seconds]
jottr_ has joined #ruby
<sheldonh> catphish: yeah, that's what got me excited. but #pop is defined as returning the body :(
<jhass> agent_white: simplifying a bit, method lookup works by traversing the modules in .ancestors, looking at their .instance_methods if the method exists
jimbach has joined #ruby
<catphish> sheldonh: oh i see :(
Timgauthier is now known as timgauthier_away
<apeiros> so a bit closer: obj.class.ancestors.inject(obj.singleton_class.instance_methods) { |a,c| a | c.instance_methods }
relix has joined #ruby
<catphish> wonder if net/http can simply be hacked to behave sanely
eikood has quit [Quit: Leaving]
<agent_white> Ohhh huh
<jhass> bluvaw: what's sock_raw ?
<umdstu> I have an error on a line that has `if fields`, followed by a line that has `fields.each`. The error is i NoMethodError on fields.each, but points to the line of the if statement. what would that mean?
<bluvaw> jhass raw socket
eikood has joined #ruby
<agent_white> Yeah I was literally just doing "Array.methods - Object.methods" then "Array.new.methods - Object.new.methods" to see what changed.
<agent_white> Never thought about ancestors.
<apeiros> Array.methods gives you the *class* methods of Array
<jhass> bluvaw: but where did you get it from? and what states it's powerful?
<sheldonh> catphish: it might be worth trying httpclient anyway. there's HttpClient::SocketWrap#readpartial, which looks promising. i just don't have time to trace whether that's exposed higher up
<apeiros> those are not the methods which instances of Array have
* lupine is sad that include MyModule, args_to_included_here doesn't work
shock_one has quit [Remote host closed the connection]
<apeiros> agent_white: i.e., Array.instance_methods != Array.methods
<lupine> oh well
<bluvaw> jhass: beej's guide
<catphish> sheldonh: thanks for looking for me!
<bluvaw> beej states it's powerful
<agent_white> apeiros: Oh I know that, that's why I was trying each out.
<agent_white> I'm not explaining my curiosity right... but you gave me the right answers :D
<sheldonh> catphish: sure. now i understand the problem, so it's been worth it for me! :)
Spami has quit [Quit: This computer has gone to sleep]
<agent_white> apeiros/jhass: Thank you! :D
xymbol has joined #ruby
Snowstormer has quit [Quit: ZNC - http://znc.in]
doev has quit [Quit: Verlassend]
zarubin has joined #ruby
<jhass> bluvaw: so it's not about ruby?
<catphish> sheldonh: this is an ongoing issue that's been bugging me for a while, i'm still somewhat of the opinion that the rack API is less than ideal for many streaming use cases
mxrguspxrt has quit [Remote host closed the connection]
a_ has quit [Ping timeout: 272 seconds]
<catphish> i often look for a better http client too, but never found a nice simple one
mxrguspxrt has joined #ruby
tadayoshi has quit []
<sheldonh> catphish: i guess. you can see rack anticipated streaming by taking a thing that yields #each, but... it still has to take a thing :)
zarubin has quit [Client Quit]
<sheldonh> catphish: this spreadsheet says httpclient does streaming download, btw: https://bit.ly/RubyHTTPClients
siwica has quit [Remote host closed the connection]
<catphish> sheldonh: cool
<bluvaw> jhass: it is
<bluvaw> well, the code in beej's guide isn't
<bluvaw> but ruby allows you to specify socket type
eikood has quit [Quit: Leaving]
<sheldonh> catphish: just take that with a pinch of salt, because it says the same of net/http ;)
<catphish> rack would be perfect if the first 2 things yielded were the response code and the headers
<catphish> sheldonh: lol
eikood has joined #ruby
<catphish> sheldonh: shame i can't simply write a finish block that replaces @response_code
<jhass> bluvaw: well I guess it's powerful because it gives you IP packets directly, allowing to bypass potential limitations in UDP or TCP for your application
xymbol has quit [Ping timeout: 240 seconds]
<bluvaw> cool
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> not that it's necessarily wise or easy to do so
mercwithamouth has quit [Ping timeout: 245 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anaeem1 has joined #ruby
<jhass> you should be knowing what you're doing with that option
<bluvaw> does ruby have +=
<jhass> yes
dangerousdave has joined #ruby
<bluvaw> cool
<jhass> a += b is a shortcut for writing a = a+b
<shevy> \o/
timgauthier_away is now known as Timgauthier
<tobiasvl> but not ++
<bluvaw> and does ruby have bitwise operations
<sheldonh> catphish: kinda makes sense, though. by the time you error out streaming content, you've long-since provided the client with the status code :(
<shevy> bluvaw yea
<shevy> >> puts 1011 | 1010
<eval-in__> shevy => 1011 ... (https://eval.in/208325)
<apeiros> bluvaw: no. but it has bitwise methods.
<apeiros> ruby has very very few actual operators. most things are implemented as methods.
<shevy> wait
<shevy> this example is better
<shevy> >> ~1011
<eval-in__> shevy => -1012 (https://eval.in/208326)
niklasb has quit [Ping timeout: 246 seconds]
<bluvaw> that was supposed to be 0100
<sheldonh> not very complimentary ;)
<jhass> >> (~0b1011).to_s(2)
<eval-in__> jhass => "-1100" (https://eval.in/208327)
SilkFox has joined #ruby
Takle_ has quit [Remote host closed the connection]
<apeiros> you need to fix the length
cina has joined #ruby
<apeiros> since rubys integers are technically unlimited
<apeiros> hm, no, not technically unlimited. but I think you know what I mean :)
<sheldonh> apeiros: big? ;)
klmlfl has joined #ruby
kobain has joined #ruby
Snowstormer has joined #ruby
shredding has joined #ruby
<bluvaw> apeiros: when I enter too big of a number it returns Infinity
anaeem1 has quit [Remote host closed the connection]
<shevy> lol
<bluvaw> it's not true infinity however
davidhq has joined #ruby
<shevy> oh cool
<shevy> there is true and false infinity?
<apeiros> bluvaw: infinity is not an integer
<apeiros> bluvaw: if you get infinity, you entered a too large float
<bluvaw> yeah yeah it's a method
<bluvaw> no lol, not a float
<bluvaw> simple int
willywos has joined #ruby
<apeiros> bluvaw: you're doing something wrong. there's no infinity for integers. care to show how you did that?
a_ has joined #ruby
eikood has quit [Quit: Leaving]
agent_white has quit [Quit: night]
<bluvaw> >> 3 ** 21894712894217489174892174891274218947
<eval-in__> bluvaw => /tmp/execpad-148c231f34de/source-148c231f34de:2: warning: in a**b, b may be too big ... (https://eval.in/208328)
<sheldonh> sounds like a display issue
SilkFox has quit [Ping timeout: 246 seconds]
niklasb has joined #ruby
<workmad3> bluvaw: that's not it showing infinity
<bluvaw> did you look at the link
<apeiros> workmad3: na, 2.1 returns infinity there
kantakt has quit []
niklasb has quit [Client Quit]
<workmad3> apeiros: ah, ok
<apeiros> bluvaw: yes, that's an unexpected conversion to float. granted.
<bluvaw> however it's not infinite
<shevy> lol
niklasb has joined #ruby
<bluvaw> it can't be infinite
<shevy> can there be infinite?
<bluvaw> no
<shevy> cool
<apeiros> bluvaw: exponentiation is done via floats
<bluvaw> why?
<apeiros> bluvaw: read the source?
<bluvaw> oh
<apeiros> I'm actually curious whether that changes with 2.2, as it adopts that gnu lib for large numbers. maybe more operations remain in int there.
<apeiros> bluvaw: (3 ** 21894712894217489174892174891274218947).class # => Float
<sheldonh> that's a very interesting decision, using floats for calculating exponents
Takle has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
<apeiros> yeah, as I said, it's unexpected. it might be only for calculating the resulting size or something.
shredding_ has joined #ruby
akitada___ has quit []
<apeiros> at least, I don't think the actual exponentiation happens as floats.
akitada has joined #ruby
klmlfl has quit [Remote host closed the connection]
otakbeku has joined #ruby
<sheldonh> catphish: if you find wonderful secret sauce out there, i'd love to hear about it at <sheldonh@starjuice.net>... i have a feeling this will become material to me before the year is out
<workmad3> bluvaw: typically, you'd get Infinity if you did something like 1.fdiv(0)
<benzrf> >> (3 ** 21894712894217489174892174891274218947).class
<eval-in__> benzrf => /tmp/execpad-4ec89c54ed0a/source-4ec89c54ed0a:2: warning: in a**b, b may be too big ... (https://eval.in/208329)
<benzrf> >> 3 ** 21894712894217489174892174891274218947
<eval-in__> benzrf => /tmp/execpad-674b4e5f2643/source-674b4e5f2643:2: warning: in a**b, b may be too big ... (https://eval.in/208330)
shredding has quit [Ping timeout: 255 seconds]
shredding_ is now known as shredding
<catphish> sheldonh: i'll let you know, FYI i currently work around this using fibers
<catphish> the rack app makes a fiber and net/http yields to it, then the rack streamer class calls the fiber
twohlix has joined #ruby
<catphish> but this causes some race conditions in various web server configs
lxsameer has quit [Quit: Leaving]
Takle has quit [Ping timeout: 272 seconds]
nirvdrum has joined #ruby
<benzrf> race conditions!
suffice has quit [Ping timeout: 255 seconds]
<bluvaw> how do I remove something from a string
<bluvaw> "hello world" how do I remove world
freerobby has joined #ruby
lw has joined #ruby
<tobiasvl> >> "hello world" - "world"
<eval-in__> tobiasvl => undefined method `-' for "hello world":String (NoMethodError) ... (https://eval.in/208331)
<tobiasvl> hmm no
<tobiasvl> lol
nirvdrum_ has joined #ruby
lw has quit [Read error: Connection reset by peer]
lw has joined #ruby
<hanmac1> >> s="hello world";s["world"]=""; s
<eval-in__> hanmac1 => "hello " (https://eval.in/208333)
<tobiasvl> bluvaw: you can use gsub, or you can split it on words
hellangel7 has quit [Remote host closed the connection]
Takle has joined #ruby
<jhass> >> "hello world".sub(" world", "")
<eval-in__> jhass => "hello" (https://eval.in/208334)
taptapdan has quit [Quit: taptapdan]
<bluvaw> that just replaces it with a blank
<bluvaw> well
<bluvaw> not a blank
zaid_h has quit [Quit: ZZZzzz…]
<apeiros> which is essentially removing it
<moOoo> >> "lol"
<eval-in__> moOoo => "lol" (https://eval.in/208335)
<jhass> there's no really better way, String#delete unfortunately works quite differently
nirvdrum has quit [Ping timeout: 244 seconds]
<bluvaw> i want to remove it entirely
<apeiros> it is removed entirely
<bluvaw> i don't want words lurking in my memory
<apeiros> ruby does not give you control over memory
<jhass> bluvaw: stop worrying about memory, ruby handles it for you
<bluvaw> sorry, i'm just a little used to C
<jhass> yes, try to give that part up
_JamieD_ has joined #ruby
<bluvaw> why?
<bluvaw> i love C and i will always love it, i just want to learn ruby too
<apeiros> because you want to learn ruby, not relearn C?
<apeiros> if you want to code C, for C's benefits, then you use C.
axl_ has joined #ruby
<apeiros> if you use ruby, use it for its benefits. don't try to emulate C in it.
relix has quit [Read error: Connection reset by peer]
<bluvaw> okay
<ryao> apeiros: Why?
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
relix has joined #ruby
<apeiros> ryao: because!
AFKGeek has quit [Quit: Leaving]
suffice has joined #ruby
relix has quit [Read error: Connection reset by peer]
roolo has quit [Quit: AAAAaaaaAAAAAAA]
<ryao> apeiros: If he wants to write C-style Ruby, that should be okay.
Takle has quit [Ping timeout: 255 seconds]
dangerousdave has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
relix has joined #ruby
oo_ has joined #ruby
mrnugget has joined #ruby
<ryao> jhass: there are ways of writing code that does not do what you think it does in any language.
<apeiros> ryao: it's pointless
<apeiros> stupid even. but sure, you can. you can do stupid things with almost everything.
twohlix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GPH|work has joined #ruby
eikood has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
<ryao> jhass: For whatitis worth, I guessed 60 myself.
<ryao> s/whatitis/what it is/
paulfm has joined #ruby
<jhass> well, sure. did you see what happens if you try to spec php? http://cloud.aeshna.de/u/mrzyx/screenshots/screenshot_20141021_151655.png
iamjarvo has joined #ruby
<moOoo> >> "lol"
<eval-in__> moOoo => "lol" (https://eval.in/208336)
<ryao> The post increment operator can be optimized to occur at any point during a statement.
it0a has joined #ruby
<jhass> moOoo: you did that already
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> jhass: with all the shortcomings of php, I think the one in that pic is none of php but the spec writers.
<moOoo> jhass: thanks for the notice
<ryao> It is not defined when post increment actually occurs when evaluating an expression.
sailias has joined #ruby
allcentury has joined #ruby
<apeiros> but it's wildly funny and ridiculous :)
<moOoo> >> "Thanks for noticing".split(" ")[2]
<eval-in__> moOoo => "noticing" (https://eval.in/208338)
<ryao> I know Java defined it to be the sensible way, but C did not.
<apeiros> moOoo: eval-in__ is not here for your personal experiments. please stop that.
hanmac1 has quit [Read error: Connection reset by peer]
<bluvaw> is it possible to load things from a file and put it into a hash?
roolo has joined #ruby
<jhass> bluvaw: yes
<ryao> No one really uses post increment in tyat way in production code though. It makes things less readable.
<bluvaw> is it good?
<ryao> s/tyat/that/
<jhass> bluvaw: too general to say yes or no, but probably
<apeiros> ryao: all bad things are used in production eventually. universal truth :-|
<ryao> apeiros: Windows. :P
unshadow has joined #ruby
<apeiros> ryao: see, point proven :-p
<bluvaw> basically, what I want to do is: servers = Hash.new servers { server1 => "127.0.0.1" }
<moOoo> apeiros: thanks for telling me
<bluvaw> this is psuedo code
Takle has joined #ruby
cmxu has joined #ruby
<moOoo> apeiros: i was not sure of this
<bluvaw> s/psuedo/pseudo
<jhass> bluvaw: sounds sane
cmxu has quit [Max SendQ exceeded]
zaid_h has joined #ruby
<bluvaw> why op
rossgeesman has joined #ruby
obscured has joined #ruby
<apeiros> bluvaw: not because of you
kaspergrubbe_ has joined #ruby
kaspergrubbe has quit [Read error: No route to host]
hanmac1 has joined #ruby
<unshadow> So, I get a multi-threaded programs that writes to a local mysql DB, I get allot of: "This connection is in use by: #<Thread:0x00000000fb3b28 sleep>" what is the best approche to this problem ?
umdstu has quit [Ping timeout: 246 seconds]
<moOoo> join the thread?
<moOoo> dafuq man
<jhass> unshadow: use the connection_pool gem
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ruby
n1x has joined #ruby
<catphish> unshadow: use a thread pool
<catphish> *connection pool
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Channel6 has joined #ruby
<bluvaw> does the eval bot have an english parser
charliesome has joined #ruby
oleo has joined #ruby
twohlix has joined #ruby
<catphish> english? i dont think such a parser exists :)
<bluvaw> xD
joonty has quit [Quit: Leaving]
shazaum has quit [Ping timeout: 255 seconds]
shazaum has joined #ruby
phantummm has joined #ruby
anaeem1 has joined #ruby
<jhass> I wonder what it would output anyway
jrhorn425 is now known as jrhorn424
xymbol has joined #ruby
shazaum has joined #ruby
shazaum has quit [Changing host]
qmfnp has joined #ruby
jerius has joined #ruby
<bluvaw> why do some tutorials declare $ before variables in ruby
<workmad3> bluvaw: $var is a global
<jhass> because they're stupid
<bluvaw> oh
<bluvaw> well, how would I read input until EOF?
shock_one has joined #ruby
<jhass> ARGF.read, STDIN.read or, oh well, actually $stdin.read
<shock_one> Whoa, a string of code passed to the eval method is a closure!
<zmyrgel> hi, I'm making my first rails app and I'm little stuck on translation part
<jhass> zmyrgel: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
<bluvaw> jhass
<bluvaw> i'm using gets.chomp
<zmyrgel> jhass: ok, will do
shazaum has quit [Quit: This computer has gone to sleep]
<jhass> bluvaw: that will read up to $/ which by default is set to "\n"
lw has quit [Quit: s]
<bluvaw> so it reads a whole line?
<jhass> yes
<bluvaw> lol
govg has quit [Ping timeout: 255 seconds]
linojon has joined #ruby
charliesome has quit [Quit: zzz]
<bluvaw> that's what i'm trying to do atm
mrnugget has quit [Quit: mrnugget]
unshadow has quit [Quit: leaving]
freerobby has quit [Quit: Leaving.]
tier has joined #ruby
<tobiasvl> you need to declare text before the loop, otherwise that will give a NameError
<bluvaw> how do i declare it with no value
<jhass> or use a do/while loop: begin; text = gets.chomp; ...; end while text != "exit";
<tobiasvl> text = nil
<tobiasvl> for example
<tobiasvl> what jhass suggested is probably better form
<jhass> I prefer using loop do; ...; break if text == "exit"; end; myself
<jhass> or exit instead of break if it should terminate the script
bluvaw has quit [Quit: leaving]
tier_ has joined #ruby
<sheldonh> yeah, "loop do" is great for avoiding repitition, e.g. foo = get_foo; while foo; blah; foo = get_foo; end
freerobby has joined #ruby
coderhs has joined #ruby
anaeem1 has quit [Remote host closed the connection]
weemsledeux has joined #ruby
weemsledeux has joined #ruby
<multi_io> >> 'foobarbaz'.gsub(/(?=^foo)bar(?=baz)/, 'xxx')
<eval-in__> multi_io => "foobarbaz" (https://eval.in/208340)
anaeem1_ has joined #ruby
<multi_io> why doesn't this work?
benzrf is now known as benzrf|offline
<multi_io> i.e. why doesn't it return 'fooxxxbaz'?
<multi_io> it this even possible?
<multi_io> i.e. replace a bar framed by foo and baz, using a single gsub
<gregf_> >>puts "foobarbaz".gsub(/bar/, "xxx")
<eval-in__> gregf_ => fooxxxbaz ... (https://eval.in/208341)
<moOoo> LOL
<multi_io> yeah, that matches all bars though
tier has quit [Ping timeout: 255 seconds]
moOoo has quit [Quit: leaving]
<gregf_> bluvav: loop { text = gets.chomp; break if text == "exit" } :/
devdazed has joined #ruby
<gregf_> ah, he's left. was wondering why the tab was'nt working :/
<jhass> multi_io: you used the wrong lookaround, you want ?<= in the first one (positive lookbehind)
<multi_io> jhass: ah!
anaeem1_ has quit [Remote host closed the connection]
havenwood has joined #ruby
Liendre has joined #ruby
<Liendre> hello
tier_ has quit [Remote host closed the connection]
fsapo has joined #ruby
<sheldonh> am i being a very crusty c hangover if i require stdlib gems, then a blank line, then require rubygems and dependents?
tier has joined #ruby
<multi_io> jhass: thanks
<jhass> sheldonh: maybe, require 'rubygems' is basically the first thing ruby does since 1.9. But other than that I wouldn't say so ;)
n1x has left #ruby ["leaving."]
<multi_io> my actual lookbehing expression contains a .*? thought, that doesn't seem to work
msmith has joined #ruby
<jhass> yeah no, they need to be fixed width
Channel6 has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
<jhass> so no +*?
sambao21 has joined #ruby
<multi_io> >> 'foo barbaz'.gsub(/(?<=^foo.*?)bar(?=baz)/, 'xxx')
<eval-in__> multi_io => /tmp/execpad-088c53ffb595/source-088c53ffb595:2: invalid pattern in look-behind: /(?<=^foo.*?)bar(?=baz)/ (https://eval.in/208346)
<jhass> yep
<multi_io> ok
terlar has quit [Ping timeout: 258 seconds]
axl_ has quit [Quit: axl_]
nonks has joined #ruby
<apeiros> you can cheat to an extent, e.g. (?<=.{2,3}) can be rewritten as (?<=..|...)
mistermocha has joined #ruby
patrick99e99 has joined #ruby
anaeem1 has joined #ruby
<sheldonh> jhass: oh? i can stop bothering with "require 'rubygems'"? that. is. awesome
<jhass> yes, isn't it
SilkFox has joined #ruby
az7ar_away is now known as az7ar
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<apeiros> sheldonh: if you use 2.0+, you can even stop bothering with `#encoding: utf-8`
terlar has joined #ruby
zaid_h has quit [Quit: ZZZzzz…]
Ankhers has joined #ruby
paulfm has quit []
charliesome has joined #ruby
aspiringflaneur has quit [Quit: If, after I depart this vale, you ever remember me and have thought to please my ghost, forgive some sinner and wink your eye at some homely girl.]
mistermocha has quit [Ping timeout: 260 seconds]
luriv has joined #ruby
<sheldonh> sounds like i should read some release notes :)
patrick99e99 has quit [Ping timeout: 272 seconds]
SilkFox has quit [Ping timeout: 260 seconds]
nonks has quit [Ping timeout: 272 seconds]
sk87 has joined #ruby
govg has joined #ruby
mxrguspxrt has quit []
jrhorn424 is now known as zz_jrhorn424
rossgeesman has quit [Remote host closed the connection]
zz_jrhorn424 is now known as jrhorn424
ikaros has joined #ruby
St_Marx has quit [Ping timeout: 246 seconds]
Spami has joined #ruby
<workmad3> sheldonh: leave it in if you're testing on 1.9 and 2.0 though ;)
abuzze has quit [Remote host closed the connection]
<workmad3> sheldonh: 1.9 defaults encoding to ascii, 2.0 defaults encoding to utf8
<sheldonh> workmad3: wow, ltns. hi, and thanks :)
mengu__ has joined #ruby
abuzze has joined #ruby
jimbach has quit [Remote host closed the connection]
joast has joined #ruby
paulfm has joined #ruby
mengu has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
<workmad3> sheldonh: heh :)
<Guest63337> 2
<workmad3> sheldonh: I guess you've just missed me... I'm here most days :P
<ddv> jep workmad
az7ar is now known as az7ar_away
Aaaal has joined #ruby
lw has joined #ruby
klmlfl has joined #ruby
tvw has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
reinaldob has quit [Remote host closed the connection]
Ankhers has quit [Remote host closed the connection]
jimbach has joined #ruby
Ankhers has joined #ruby
<sheldonh> workmad3: i've been away a while ;)
krz has joined #ruby
abuzze has quit [Remote host closed the connection]
lw has quit [Client Quit]
abuzze has joined #ruby
rossgeesman has joined #ruby
freerobby has joined #ruby
g0bl1n has joined #ruby
jrhorn424 is now known as zz_jrhorn424
shortCircuit__ has quit [Remote host closed the connection]
St_Marx has joined #ruby
xymbol has quit [Quit: Be back later ...]
yfeldblum has joined #ruby
abuzze has quit [Ping timeout: 258 seconds]
beef-wellington has joined #ruby
devdazed has quit [Ping timeout: 255 seconds]
cmoneylulz has joined #ruby
rossgeesman has quit [Ping timeout: 240 seconds]
g0bl1n has quit [Client Quit]
cmoneylulz has quit [Client Quit]
Takle has joined #ruby
julieeharshaw has quit [Remote host closed the connection]
jacobat has joined #ruby
govg has quit [Ping timeout: 272 seconds]
Morkel has joined #ruby
tagrudev has quit [Read error: Connection reset by peer]
mengu__ has quit [Remote host closed the connection]
julieeharshaw has joined #ruby
devdazed has joined #ruby
abuzze has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
AlSquirrel has quit [Quit: Quitte]
<karunamon> why do so many older Ruby programs (1.8ish) do a "require rubygems' as the first thing?
ad_boot has joined #ruby
anaeem1 has quit [Quit: Leaving...]
<jhass> karunamon because it wasn't implicitly done back hten
<karunamon> gems just weren't in the load path?
<jhass> there's still a require "rubygems", it's just already done for you
ad_boot has left #ruby [#ruby]
ta has quit [Ping timeout: 265 seconds]
Macaveli has quit [Ping timeout: 246 seconds]
<shevy> karunamon gems were an afterthought
<jhass> it loads the rubygems library, which among other things makes sure installed gems can be loaded
<shevy> karunamon in the 1.8 era it was still separate, since 1.9.x it is included
<karunamon> Ahh. Neat.
xymbol has joined #ruby
momomomomo has joined #ruby
jacobat has quit [Ping timeout: 240 seconds]
Jon30 has joined #ruby
Ankhers has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
shock_one has quit [Quit: Be back later ...]
<Jon30> is there anyway to force round to a certain amount of digits? for example.. 4.12.round(4) will return 4.12, is there a way to force it to 4 decimals, so it's 4.1200?
snath has quit [Ping timeout: 260 seconds]
jacobat has joined #ruby
<Liendre> hi
zz_jrhorn424 is now known as jrhorn424
<jhass> Jon30: you're confusing the value with its representation
sheldonh has quit [Quit: being a single parent sucks]
failshell has joined #ruby
<jhass> Jon30: a float has an infinite number of training 0
<jhass> Jon30: the question is how many you print out
jobewan has quit [Ping timeout: 255 seconds]
<jhass> *trailing
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Liendre> anybody knows how can I define a new instance method on the Array class called second, which returns the second item in an array (similar to the way .first and .last work in Ruby).?
tvw has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
<Liendre> begginer question
<jhass> Liendre: you could easily: class Array; def second; [1]; end; end;
<jhass> not that it's particularly wise to add methods to core classes at random
<Jon30> jhass: well, the user inputs 4.12.. what's the best way to force it to 4 decimals?
<hanmac1> Jon30:
<hanmac1> >> "%0.4f" % 4.12
<eval-in__> hanmac1 => "4.1200" (https://eval.in/208359)
xymbol has quit [Ping timeout: 272 seconds]
lw has joined #ruby
lw has quit [Client Quit]
<Liendre> thanks jhass
<hanmac1> jhass: you are wrong, you need: self[1]
mikecmpbll has quit [Quit: ciao.]
<jhass> Liendre: I miss a self in there, but you get the idea
<Jon30> hanmac1: that still gives 2 decimals?
<Jon30> oh nm
<Jon30> thanks
<Jon30> so sprintf right?
<Liendre> yeah, thanks to all. I had the idea, but I was missing the word self too
Pupeno has quit [Ping timeout: 265 seconds]
<hanmac1> yes but thats only the string representation
mikecmpbll has joined #ruby
djstorm has joined #ruby
Xeago has joined #ruby
<Jon30> hanmac1: sprintf(22.33.to_s, "%0.4f") returns 22.33 :[
timonv_ has quit [Remote host closed the connection]
<hanmac1> >> sprintf("%0.4f", 22.33)
<eval-in__> hanmac1 => "22.3300" (https://eval.in/208360)
<havenwood> >> sprintf "%0.4f", 22.33.to_s
<eval-in__> havenwood => "22.3300" (https://eval.in/208361)
tier has quit []
<Jon30> u'r a genius
<workmad3> also, no need to to_s it first
Pupeno has joined #ruby
<jhass> that to_s is just sad :(
<havenwood> but you can
<havenwood> shouldn't
Kricir has joined #ruby
<workmad3> havenwood: I shouldn't sit down with an entire cheesecake and a spoon... but I can
<havenwood> mmmmm
<workmad3> dammit, now I want cheesecake
BadQuanta has quit [Ping timeout: 272 seconds]
<havenwood> yup
axl_ has joined #ruby
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
az7ar_away is now known as az7ar
abuzze has quit [Remote host closed the connection]
abuzze has joined #ruby
jrhorn424 is now known as zz_jrhorn424
Kricir has quit [Ping timeout: 258 seconds]
zz_jrhorn424 is now known as jrhorn424
LadyRainicorn has joined #ruby
govg has joined #ruby
sk87 has joined #ruby
momomomomo has quit [Ping timeout: 260 seconds]
twohlix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
abuzze_ has joined #ruby
abuzze_ has quit [Remote host closed the connection]
Darryl has quit [Quit: Connection closed for inactivity]
abuzze_ has joined #ruby
Xeago has quit [Remote host closed the connection]
abuzze has quit [Read error: Connection reset by peer]
earfin has joined #ruby
drkyro has joined #ruby
ta has joined #ruby
godd2 has joined #ruby
gsd has joined #ruby
renderful has joined #ruby
rkalfane has quit [Ping timeout: 256 seconds]
timonv_ has joined #ruby
<havenwood> oh well, i'll settle for black coffee :P
ndrei has joined #ruby
tokik has quit [Ping timeout: 245 seconds]
IceDragon has joined #ruby
momomomomo has joined #ruby
DoctorO has joined #ruby
taptapdan has joined #ruby
rkalfane has joined #ruby
shazaum has joined #ruby
pagios_ has quit [Remote host closed the connection]
ursooperduper has joined #ruby
charles81___ is now known as charles81
Biohazard has joined #ruby
<gregf_> >> "%.4f" % 22.33
<eval-in__> gregf_ => "22.3300" (https://eval.in/208364)
fsapo has quit [Remote host closed the connection]
<jhass> you're late to the party ;P
<gregf_> btw, do you need a positive lookahead when you can use sub?
huddy has joined #ruby
hhutch has joined #ruby
St_Marx has quit [Ping timeout: 246 seconds]
<gregf_> gtg
Xeago has joined #ruby
jobewan has joined #ruby
nirvdrum_ has quit [Quit: Leaving]
wasamasa has quit [Ping timeout: 250 seconds]
<jhass> that question doesn't make much sense
ta has quit [Remote host closed the connection]
<havenwood> i'm guessing what it means is...
<havenwood> j/k, no guess
gyre007_ has joined #ruby
<jhass> guessing..
<jhass> .
<jhass> .
<jhass> failed
a_ has quit [Ping timeout: 255 seconds]
SilkFox has joined #ruby
arpit has joined #ruby
Aaaal has quit [Quit: Aaaal]
nettoweb_ has joined #ruby
az7ar is now known as az7ar_away
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr_ has quit [Quit: WeeChat 1.0.1]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr has joined #ruby
joonty has joined #ruby
jordila has joined #ruby
<jordila> dear #ruby community ... newbie here
* hanmac1 does appear for help
<apeiros> dear newbie, how may we be of help?
SilkFox has quit [Ping timeout: 244 seconds]
SilkFox has joined #ruby
<jordila> (on Debian Jessie with rvm installed) would '$ rvm rubygems current ' be the correct way for installing rubygems ? thanks for your attention
bal has quit [Quit: bal]
<workmad3> jordila: if you're using ruby 1.9+ (which you should be), rubygems is installed as part of ruby
<apeiros> jordila: which ruby version do you use?
LikeGecko has joined #ruby
<apeiros> (what workmad3 said)
<jordila> apeiros : 2.0
yokel has quit [Ping timeout: 255 seconds]
<apeiros> jordila: then you have a rubygems installed along with your ruby, as it's a part of it
<jordila> :-/
beef-wellington has quit [Ping timeout: 240 seconds]
<workmad3> jordila: that command is rvm specific and is for using different versions of rubygems (similar to how rvm lets you switch different versions of ruby)
Snowstormer has quit [Quit: ZNC - http://znc.in]
LikeGecko is now known as Snowstormer
<apeiros> jordila: just activate your ruby 2.0 with rvm (rvm use 2.0), and then use whatever command you want, e.g. `gem install bundler`
<havenwood> grep guess \#ruby/*freenode.txt | cut -d' ' -f2 | tr -d ":$" | sort | uniq -c | sort
hhutch has quit [Remote host closed the connection]
<jordila> Thanks apeiros & workmad3
hhutch has joined #ruby
<workmad3> jordila: so it's not something you're likely to need to worry about for a while :)
rkalfane has joined #ruby
<jordila> ;-)
<jordila> fine... i installed it time ago (for Jekyll purposes... )
mistermocha has joined #ruby
cina has quit [Read error: Connection reset by peer]
<jordila> ...just, as suggested 'gem install bundler'
beef-wellington has joined #ruby
<jordila> i love #ruby
Wolland has joined #ruby
<godd2> just the irc channel?
<jordila> #ruby community ...
xymbol has joined #ruby
yokel has joined #ruby
<jordila> as a whole
SilkFox has quit [Ping timeout: 240 seconds]
<jordila> mmmh... so, now i should be able to do something like ' gem install rhc '... let's see
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
pu22l3r_ has joined #ruby
Wolland_ has quit [Ping timeout: 265 seconds]
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jordila> Sorry again , Red Hat suggests to 'sudo gem install rhc ' ... but as per https://rvm.io/rubies/rubygems i shouldn't use 'sudo' for ? :-/
momomomomo has quit [Quit: momomomomo]
tonybird has joined #ruby
hamakn has quit [Remote host closed the connection]
stunder has joined #ruby
<jordila> (for example, right now i'm able to Jekyll - 'rake deploy' and bla without using 'sudo'... )
<jhass> jordila: don't use sudo with RVM
<jordila> ok jhass , crystal clear
<jordila> thanks
fsapo has joined #ruby
<jordila> let's try without...
beef-wellington has quit [Ping timeout: 245 seconds]
Pupeno has quit [Ping timeout: 272 seconds]
Pupeno has joined #ruby
lessless has joined #ruby
jacobat has quit [Read error: No route to host]
<lessless> hi folks! how to append an array to the set as individual variables?
<jhass> lessless: please try to rephrase that
<jhass> or show some pseudo code
s00pcan has quit [Ping timeout: 244 seconds]
<lessless> so that (x = Set.new) << [:x, :y] will be {:x, :y}, not the {[:x, :y]}
<apeiros> lessless: x + array.to_set
gaganjyot has quit [Ping timeout: 255 seconds]
beef-wellington has joined #ruby
<lessless> lol
yfeldblum has joined #ruby
<jhass> or we abuse the fact that << returns self: Set.new << :x << :y
jrhorn424 is now known as zz_jrhorn424
wasamasa- has joined #ruby
<apeiros> jhass: if he has an array, that's a bit annoying
<hanmac1> apeiros: does work without "to_set"
<apeiros> also x.union(array)
<jhass> I'm not quite sure he has yet
afhammad has joined #ruby
<hanmac1> "x | array" works too
gheegh has joined #ruby
<apeiros> but interesting, I see no mutating method for that
Xeago has quit [Remote host closed the connection]
fabrice31 has quit [Remote host closed the connection]
rossgeesman has joined #ruby
fabrice31 has joined #ruby
reinaldob has joined #ruby
ikaros has quit [Quit: Ex-Chat]
yfeldblum has quit [Ping timeout: 265 seconds]
lbwski has joined #ruby
<waxjar> Set#merge seems to do the trick
momomomomo has joined #ruby
timonv_ has quit [Remote host closed the connection]
wasamasa- is now known as wasamasa
wasamasa has quit [Changing host]
wasamasa has joined #ruby
zz_jrhorn424 is now known as jrhorn424
timonv_ has joined #ruby
moritzs has joined #ruby
jaequery has joined #ruby
timonv_ has quit [Remote host closed the connection]
almostworking has joined #ruby
rossgeesman has quit [Ping timeout: 250 seconds]
DoctorO has left #ruby ["Leaving"]
fabrice31 has quit [Ping timeout: 265 seconds]
DouweM has quit [Quit: Linkinus - http://linkinus.com]
hhutch has quit [Ping timeout: 240 seconds]
gsd has joined #ruby
JohnBat26 has joined #ruby
reinaldob has quit [Ping timeout: 244 seconds]
St_Marx has joined #ruby
almostworking has left #ruby [#ruby]
blackmesa has joined #ruby
Loplin has joined #ruby
Juzzika has quit []
s00pcan has joined #ruby
moritzs has quit [Client Quit]
hhutch has joined #ruby
Macaveli has joined #ruby
momomomomo has quit [Quit: momomomomo]
<lessless> def x(*strategies); @z.merge [strategies].flatten.to_set; end
<lessless> do not change @z
poulet_a has quit [Quit: Quitte]
klmlfl has quit [Read error: Connection reset by peer]
zhigang1992 has joined #ruby
<jhass> I'd just @z |= strategies
oo_ has quit [Remote host closed the connection]
<jhass> also make @z a better name
klmlfl has joined #ruby
<jhass> x too
mengu has joined #ruby
mengu has joined #ruby
oo_ has joined #ruby
arpit has left #ruby [#ruby]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 246 seconds]
<lessless> that's just for example :)
stef204 has joined #ruby
stef204 has joined #ruby
stef204 has quit [Changing host]
zaid_h has joined #ruby
<lessless> jhass: strategies can be a symbol or an array of symbols
shock_one has joined #ruby
lw has joined #ruby
sjohnsen has quit [Ping timeout: 260 seconds]
<jhass> then flatten
gaboesquivel has joined #ruby
tokik has joined #ruby
cajone has joined #ruby
rippa has quit [Read error: Connection reset by peer]
jxf has quit [Ping timeout: 258 seconds]
zhigang1992 has quit [Quit: leaving]
oo_ has quit [Ping timeout: 250 seconds]
gauke has quit [Quit: gauke]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
tvw has quit []
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
shock_one has quit [Ping timeout: 250 seconds]
HelperW has quit [Ping timeout: 250 seconds]
JaMz has joined #ruby
DLSteve has joined #ruby
Takle has quit [Remote host closed the connection]
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
reinaldob has joined #ruby
lolmaus has quit [Remote host closed the connection]
Ankhers has joined #ruby
lolmaus has joined #ruby
gaganjyot has joined #ruby
otakbeku has quit [Quit: leaving]
gaganjyot has quit [Client Quit]
hanmac1 has left #ruby [#ruby]
benzrf|offline is now known as benzrf
Takle has joined #ruby
a_ has joined #ruby
ivmx has joined #ruby
BTRE has quit [Ping timeout: 260 seconds]
nettoweb_ has joined #ruby
momomomomo has joined #ruby
sjohnsen has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
gaganjyot has joined #ruby
momomomomo has quit [Client Quit]
ta has joined #ruby
enebo has joined #ruby
eikood has quit [Quit: Leaving]
endless_walrus has joined #ruby
jimmyhoughjr has joined #ruby
spyderman4g63 has joined #ruby
pu22l3r__ has joined #ruby
pu22l3r_ has quit [Ping timeout: 245 seconds]
benzrf is now known as benzrf|offline
willywos has joined #ruby
twohlix has joined #ruby
zhigang2092 has joined #ruby
aganov has quit [Ping timeout: 250 seconds]
snath has joined #ruby
aspires has joined #ruby
<apeiros> jhass, lessless: don't flatten. do proper normalization. accepting single value or array is IMO bad design.
<apeiros> and ruby's splat makes it easy enough to provide something which seems to be single value, but is an array.
<apeiros> (and/or convert between the two)
gaganjyot has quit [Ping timeout: 245 seconds]
ndrei has quit [Ping timeout: 258 seconds]
thisguy123 has joined #ruby
ndrei has joined #ruby
lw has quit [Quit: s]
<lessless> apeiros: it's a kind of method overloading
<lessless> apeiros: what are possible consequences/drawbacks?
ivmx has left #ruby [#ruby]
<apeiros> lessless: method overloading IMO has no place in ruby
payne_ has joined #ruby
<apeiros> consequences? ugly brittle code
shock_one has joined #ruby
volty has joined #ruby
<apeiros> if your method is supposed to do different things based on input -> use different methods instead
<lessless> hmm... some examples will help
lw has joined #ruby
BTRE has joined #ruby
Photism has joined #ruby
<apeiros> def add_strategies(*strategies); @strategies |= strategies; end # simple
<apeiros> def add_strategies(*strategies); @strategies |= [strategies].flatten; end # ugly, in your case luckily not brittle.
<lessless> here are my use-cases
<apeiros> lessless: yeah, you already have *strategies. why do you think your user is not capable of passing along an array properly?
<apeiros> there is *zero* need for that [].flatten
xwq17 has joined #ruby
babykosh has joined #ruby
<lessless> omg! you are right! it's an already an array
<apeiros> correct
<lessless> :)
<apeiros> and if the input is an array, e.g. strats = [:x, :y]; strategies.append *strats # it's easy enough to splat
SilkFox has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
<lessless> actually it will be a dsl
<lessless> append_strategies :user, :manager
multi_io_ has joined #ruby
diegoviola has joined #ruby
moOoo has joined #ruby
zB0hs has joined #ruby
Dude007 has quit [Remote host closed the connection]
stunder has quit [Quit: Screw you guys I'm going home]
jheg has quit [Quit: jheg]
multi_io has quit [Ping timeout: 246 seconds]
SilkFox has quit [Ping timeout: 265 seconds]
emmesswhy has joined #ruby
momomomomo has joined #ruby
revoohc_ has joined #ruby
hhutch has quit [Ping timeout: 265 seconds]
shredding has quit [Quit: shredding]
icarus has joined #ruby
hamakn has joined #ruby
<olivier_bK> what is the best gem for automating interactions with a website ?
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
<roger_rabbit> olivier_bK: I like mechanize
thisguy123 has quit [Ping timeout: 256 seconds]
jaequery has joined #ruby
cndiv has joined #ruby
<olivier_bK> roger_rabbit, do think is possible to use it in http://youwatch.org/?op=my_files ?
Spami has quit [Quit: This computer has gone to sleep]
zhigang1992 has joined #ruby
andikr has quit [Remote host closed the connection]
zhigang2092 has quit [Ping timeout: 245 seconds]
az7ar_away is now known as az7ar
coderhs has quit [Ping timeout: 265 seconds]
ghostmoth has joined #ruby
troyready has joined #ruby
jordila has quit [Ping timeout: 244 seconds]
sinkensabe has quit [Remote host closed the connection]
revoohc_ is now known as revoohc
zaid_h has quit [Quit: ZZZzzz…]
momomomomo has quit [Quit: momomomomo]
thagomizer has joined #ruby
drawingthesun has quit [Ping timeout: 260 seconds]
Dude007 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
kaspergrubbe_ has quit [Remote host closed the connection]
joonty has quit [Quit: Leaving]
ephemerian has left #ruby [#ruby]
kaspergrubbe has joined #ruby
qba73 has quit []
rossgeesman has joined #ruby
neoxquick has joined #ruby
az7ar is now known as az7ar_away
kaspergrubbe has quit [Ping timeout: 250 seconds]
az7ar_away is now known as az7ar
rossgeesman has quit [Ping timeout: 246 seconds]
timonv_ has joined #ruby
axl__ has joined #ruby
mityaz_ has joined #ruby
mityaz_ has quit [Client Quit]
axl_ has quit [Ping timeout: 245 seconds]
axl__ is now known as axl_
renderful has quit [Remote host closed the connection]
<havenwood> hark, the days of ROM cometh!
last_staff has joined #ruby
siwica has joined #ruby
<siwica> Does anyone know a good geo gem for coordinate transformation other than RGeo?
momomomomo has joined #ruby
patric100e99 has joined #ruby
mityaz_ has joined #ruby
iamjarvo has joined #ruby
olivier_bK has quit [Ping timeout: 258 seconds]
shock_one has quit [Quit: Be back later ...]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 265 seconds]
nonks has joined #ruby
supersym has joined #ruby
bricker`work has joined #ruby
jaequery has joined #ruby
dangerousdave has joined #ruby
shock_one has joined #ruby
chrishough has joined #ruby
t_mmyv has joined #ruby
treehug88 has joined #ruby
Pupeno_ has joined #ruby
nonks has quit [Ping timeout: 255 seconds]
BTRE has quit [Ping timeout: 244 seconds]
skolman has joined #ruby
IrishGringo has joined #ruby
Pupeno has quit [Ping timeout: 265 seconds]
apeiros has quit [Remote host closed the connection]
BTRE has joined #ruby
mikecmpbll has quit [Ping timeout: 255 seconds]
ivmx has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ivmx has left #ruby [#ruby]
gauke has joined #ruby
Pupeno has joined #ruby
stunder has joined #ruby
babykosh has quit [Quit: babykosh]
JohnBat26 has joined #ruby
obscured has quit [Quit: leaving]
babykosh has joined #ruby
benzrf|offline is now known as benzrf
babykosh has quit [Client Quit]
Pupeno_ has quit [Ping timeout: 258 seconds]
Liendre has quit [Ping timeout: 246 seconds]
aspires has quit []
rippa has joined #ruby
Spami has joined #ruby
coderhs has joined #ruby
timonv_ has quit [Ping timeout: 265 seconds]
tfitts has quit [Ping timeout: 244 seconds]
volty has quit [Ping timeout: 245 seconds]
shock_one has quit [Remote host closed the connection]
aspires has joined #ruby
terlar has quit [Ping timeout: 265 seconds]
Tuxero has joined #ruby
jimbach has quit [Remote host closed the connection]
sigurding has joined #ruby
lw has quit [Quit: s]
zaid_h has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
az7ar is now known as az7ar_away
az7ar_away is now known as az7ar
arup_r has joined #ruby
az7ar is now known as az7ar_away
coderhs has joined #ruby
lmickh has joined #ruby
Aaaal has joined #ruby
zz_jrhorn424 is now known as jrhorn424
nobitanobi has joined #ruby
tfitts has joined #ruby
codezomb has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Pupeno has quit [Read error: Connection reset by peer]
diegoviola has quit [Quit: WeeChat 1.0.1]
mleone has joined #ruby
Pupeno has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hobodave has joined #ruby
roolo has quit [Remote host closed the connection]
sinkensabe has joined #ruby
aspiers has quit [Ping timeout: 244 seconds]
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
emmesswhy has quit [Quit: Leaving]
lagweezle has quit [Quit: leaving]
wpp has joined #ruby
Dude007 has quit [Remote host closed the connection]
siwica1 has joined #ruby
workmad3 has joined #ruby
siwica has quit [Ping timeout: 246 seconds]
mengu has quit [Remote host closed the connection]
catphish has quit [Quit: Leaving]
shock_one has joined #ruby
hellangel7 has joined #ruby
boombadaroomba has joined #ruby
momomomomo has quit [Quit: momomomomo]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
i_s has joined #ruby
SilkFox has joined #ruby
spyderman4g63 has joined #ruby
chrishough has quit [Ping timeout: 255 seconds]
codezomb has quit [Ping timeout: 265 seconds]
gauke has quit [Quit: gauke]
chipotle has quit [Quit: cya]
Timgauthier is now known as timgauthier_away
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkalfane has joined #ruby
chrishough has joined #ruby
fmcgeough has joined #ruby
kaspergrubbe has joined #ruby
Aaaal has quit [Quit: Aaaal]
blackmesa has quit [Ping timeout: 260 seconds]
User458764 has quit [Ping timeout: 272 seconds]
siwica has joined #ruby
yfeldblum has joined #ruby
Fire-Dragon-DoL has joined #ruby
Takle has quit [Remote host closed the connection]
SilkFox has quit [Ping timeout: 256 seconds]
Eiam has joined #ruby
blackmesa has joined #ruby
siwica1 has quit [Ping timeout: 245 seconds]
codezomb has joined #ruby
mercwithamouth has joined #ruby
shock_one has quit [Quit: Be back later ...]
OffTheRails has joined #ruby
lbwski has quit [Ping timeout: 250 seconds]
cout has quit [Quit: leaving]
fabrice31 has joined #ruby
afhammad has quit []
yfeldblum has quit [Ping timeout: 245 seconds]
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
shock_one has joined #ruby
apxm has joined #ruby
einarj has quit [Remote host closed the connection]
wallerdev has joined #ruby
Soda has quit [Ping timeout: 245 seconds]
siwica1 has joined #ruby
Soda has joined #ruby
DLSteve has quit [Quit: Leaving]
fabrice31 has quit [Ping timeout: 260 seconds]
siwica has quit [Ping timeout: 245 seconds]
apeiros has joined #ruby
klmlfl has quit [Remote host closed the connection]
DLSteve has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
gyre007_ has quit [Remote host closed the connection]
aspires has quit []
siwica has joined #ruby
freerobby has quit [Quit: Leaving.]
tesaf has joined #ruby
siwica1 has quit [Ping timeout: 245 seconds]
sevvie has joined #ruby
mengu has joined #ruby
ghostmoth has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
zerick has joined #ruby
kaspertidemann has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Hobogrammer has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
aspires has joined #ruby
jrhorn424 is now known as zz_jrhorn424
allcentury has joined #ruby
tylersmith has joined #ruby
benzrf is now known as benzrf|offline
zerick has quit [Ping timeout: 260 seconds]
zhigang1992 has quit [Ping timeout: 246 seconds]
jimmyhoughjr has joined #ruby
freerobby has joined #ruby
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
freerobby has quit [Client Quit]
zz_jrhorn424 is now known as jrhorn424
freerobby has joined #ruby
shock_one has quit [Quit: Lingo: www.lingoirc.com]
jottr_ has joined #ruby
matchaw has quit [Ping timeout: 265 seconds]
kaspergrubbe has quit [Remote host closed the connection]
Jarboe has joined #ruby
ki0 has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
tokik has quit [Ping timeout: 258 seconds]
Takle has joined #ruby
renderful has joined #ruby
jack_rabbit has joined #ruby
obs has joined #ruby
chipotle has joined #ruby
mrsolo has joined #ruby
LadyRainicorn has quit [Ping timeout: 272 seconds]
akemrir has joined #ruby
fsapo has quit [Remote host closed the connection]
Timgauthier has joined #ruby
freerobby has quit [Quit: Leaving.]
melik has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
siwica1 has joined #ruby
siwica has quit [Ping timeout: 245 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
failshell has quit []
Timgauthier has quit [Read error: Connection reset by peer]
kirun has joined #ruby
jdj_dk has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
Timgauthier has joined #ruby
<_br_> Is it possible to do begin/rescue/end in a Gemfile?
timonv_ has joined #ruby
jxf has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
nobitanobi has quit [Remote host closed the connection]
<_br_> hm maybe not :/
wldcordeiro_ has joined #ruby
djbkd has quit [Remote host closed the connection]
JaMz has quit [Remote host closed the connection]
<havenwood> _br_: sure you can, it's just Ruby
<_br_> havenwood: I tried, didn't work for me
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
sambao21 has joined #ruby
<havenwood> _br_: gist the Gemfile?
krz has quit [Quit: WeeChat 1.0.1]
<workmad3> _br_: what exactly went wrong?
<workmad3> _br_: and was it potentially because you did 'rescue' and expected it to catch all exceptions?
<_br_> ah, that might be it
jimmyhoughjr has joined #ruby
<_br_> let me try to specify the exception type
<_br_> silly me :)
<_br_> thanks guys :
<workmad3> _br_: a plain 'rescue' only catches StandardError and subclasses ;)
mkaesz has quit [Remote host closed the connection]
<workmad3> _br_: which excludes things like LoadError...
<_br_> yeah I realized that now as well :P
momomomomo has joined #ruby
<workmad3> :)
timonv_ has quit [Ping timeout: 255 seconds]
aspiers has joined #ruby
Timgauthier has quit [Read error: Connection reset by peer]
endless_walrus has quit [Quit: Textual IRC Client: www.textualapp.com]
mercwithamouth has joined #ruby
Timgauthier has joined #ruby
cina has joined #ruby
jimbach has joined #ruby
lbwski has joined #ruby
tylersmi_ has joined #ruby
FooMunki has joined #ruby
tylersmi_ is now known as tcrypt
tylersmith has quit [Read error: Connection reset by peer]
patric100e99 has quit [Quit: leaving]
djbkd has joined #ruby
iamjarvo has joined #ruby
blackmesa has joined #ruby
patric100e99 has joined #ruby
siwica has joined #ruby
NoNMaDDeN has quit [Remote host closed the connection]
failshell has joined #ruby
a_ has quit [Ping timeout: 244 seconds]
siwica1 has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 240 seconds]
Takle has quit [Remote host closed the connection]
fdelacruz has joined #ruby
oleo is now known as Guest32851
oleo__ has joined #ruby
Pupeno_ has joined #ruby
mary5030 has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
Guest32851 has quit [Ping timeout: 245 seconds]
Pupeno has quit [Ping timeout: 260 seconds]
benzrf|offline is now known as benzrf
yfeldblum has joined #ruby
klmlfl has joined #ruby
postmodern has joined #ruby
benzrf is now known as benzrf|offline
sigurding has quit [Quit: sigurding]
hellangel7 has quit [Remote host closed the connection]
einarj has joined #ruby
aspiers has quit [Ping timeout: 260 seconds]
FooMunki has quit [Quit: FooMunki]
SilkFox has joined #ruby
<_br_> Hm... trying to catch Gem::Ext::BuildError in Gemfile (dm-mysql-adapter is dying). Nothing helps, tried rescue Gem::Ext::BuildError, StandardError, SystemExit, ScriptError, SignalException nothing works
siwica1 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
twohlix_ has joined #ruby
<apeiros> _br_: if rescue Exception doesn't work, then you're rescuing in the wrong place ;-)
siwica has quit [Ping timeout: 265 seconds]
zaid_h has quit [Quit: ZZZzzz…]
<_br_> hm
sevvie has quit [Quit: leaving]
<_br_> well, he is trying to build a native extension
<jhass> the Gemfile is declarative, the gem method does not actually install anything
nobitanobi has joined #ruby
djbkd has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 256 seconds]
<_br_> puff, back to groups it is then
Photism has quit [Quit: Leaving]
<_br_> thanks
siwica has joined #ruby
klmlfl has quit [Remote host closed the connection]
siwica1 has quit [Ping timeout: 250 seconds]
Dude007 has joined #ruby
SilkFox has quit [Ping timeout: 265 seconds]
klmlfl has joined #ruby
pu22l3r__ has quit [Read error: Connection reset by peer]
niklasb has quit [Ping timeout: 272 seconds]
pu22l3r has joined #ruby
Guest97120 has quit [Remote host closed the connection]
djbkd has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
workmad3 has quit [Ping timeout: 245 seconds]
ptrrr has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
Dude007 has quit [Ping timeout: 246 seconds]
siwica1 has joined #ruby
gaganjyot has joined #ruby
OffTheRails has quit [Ping timeout: 260 seconds]
WormDrink has quit [Ping timeout: 250 seconds]
siwica has quit [Ping timeout: 250 seconds]
niKeITA has joined #ruby
Morkel_ has joined #ruby
gaganjyot has quit [Max SendQ exceeded]
Dude007 has joined #ruby
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
gaganjyot has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
momomomomo has quit [Ping timeout: 265 seconds]
chipotle has joined #ruby
gaganjyot has quit [Max SendQ exceeded]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaspergrubbe has quit [Remote host closed the connection]
reset has joined #ruby
freerobby has joined #ruby
sigurding_ has joined #ruby
rossgeesman has joined #ruby
rdark has quit [Quit: leaving]
zhigang1992 has joined #ruby
fdelacruz has quit [Quit: EPIC5-1.1.10[1781] - amnesiac : the most common elements in universe - hydrogen & stupidity]
altamic has joined #ruby
altamic has left #ruby [#ruby]
Timgauthier is now known as timgauthier_away
moOoo has quit [Remote host closed the connection]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
siwica has joined #ruby
siwica1 has quit [Ping timeout: 245 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zz_jrhorn424 is now known as jrhorn424
rossgeesman has quit [Ping timeout: 256 seconds]
nfk has quit [Quit: yawn]
jottr_ is now known as jottr
gaboesquivel has quit [Remote host closed the connection]
Liendre has joined #ruby
<Liendre> hi
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chrisja has joined #ruby
spider-mario has joined #ruby
aspires has quit []
sevvie has joined #ruby
yokel has quit [Ping timeout: 265 seconds]
Jet4Fire has joined #ruby
yokel has joined #ruby
payne_ has quit [Read error: Connection reset by peer]
geggam has joined #ruby
aspires has joined #ruby
Nahra has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
chrishough has joined #ruby
linojon has quit [Quit: linojon]
Naeblis has quit [Read error: Connection reset by peer]
<jhass> Liendre: hey, got a question?
<Liendre> not yet jhass ;) but thanks.
<Liendre> I am at codewars.com trying to learn to code ruby :)
skolman has quit [Remote host closed the connection]
skolman_ has joined #ruby
linojon has joined #ruby
momomomomo has joined #ruby
lbwski has quit [Ping timeout: 255 seconds]
Naeblis has joined #ruby
sepp2k has quit [Quit: Konversation terminated!]
arup_r has quit [Quit: Leaving.]
skolman_ has quit [Ping timeout: 260 seconds]
jottr_ has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
dangerousdave has joined #ruby
niKeITA is now known as niKeITA_away
WormDrink has joined #ruby
niKeITA_away is now known as niKeITA
sigurding_ has quit [Quit: sigurding_]
sambao21 has joined #ruby
nonks has joined #ruby
nobitanobi has quit [Remote host closed the connection]
zB0hs has quit [Quit: Textual IRC Client: www.textualapp.com]
nobitanobi has joined #ruby
chrishough has quit [Ping timeout: 246 seconds]
niKeITA has quit [Quit: Textual IRC Client: www.textualapp.com]
djbkd has joined #ruby
Takle has joined #ruby
nonks has quit [Ping timeout: 244 seconds]
gauke has joined #ruby
chrishough has joined #ruby
lkba has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
noop has joined #ruby
TPBallbag has joined #ruby
codecop_ has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
grzywacz has quit [Ping timeout: 258 seconds]
TPBallbag has quit [Remote host closed the connection]
sethen has joined #ruby
twohlix has quit [Quit: quiiiiit]
diegoviola has joined #ruby
yfeldblum has joined #ruby
rbrs has quit [Quit: Leaving]
ndrei has joined #ruby
sevvie has quit [Ping timeout: 258 seconds]
robbyoconnor has quit [Ping timeout: 245 seconds]
codecop has quit [Ping timeout: 255 seconds]
sinkensabe has joined #ruby
akemrir has quit [Quit: WeeChat 1.0.1]
rodfersou has quit [Read error: Connection reset by peer]
lest has joined #ruby
rodfersou has joined #ruby
marr has joined #ruby
momomomomo has quit [Quit: momomomomo]
robustus has joined #ruby
<_br_> Liendre: nice, happy hacking. Ruby warrior is also fun ^^
ki0 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
zz_jrhorn424 is now known as jrhorn424
fabrice31 has joined #ruby
<Liendre> yes, I tried rubywarrior. but it is too high level for me
<Liendre> I get only to level 7
<Liendre> I need moar learning
benzrf|offline is now known as benzrf
sepp2k has joined #ruby
william3 has joined #ruby
oleo__ has quit [Quit: Verlassend]
kantakt has joined #ruby
chrishou_ has joined #ruby
lest has quit [Quit: ZNC - http://znc.in]
oleo has joined #ruby
lest has joined #ruby
nobitanobi has quit [Remote host closed the connection]
chrishough has quit [Ping timeout: 244 seconds]
SilkFox has joined #ruby
nobitanobi has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
Techguy305 has joined #ruby
lest has quit [Client Quit]
<_br_> Liendre: keep going, you will manage :)
jottr_ is now known as jottr
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lest has joined #ruby
<Liendre> thnaks!! ^^
chrishou_ has quit [Ping timeout: 245 seconds]
agjacome has joined #ruby
JaMz has joined #ruby
crazydiamond has joined #ruby
JaMz has quit [Remote host closed the connection]
nobitanobi has quit [Ping timeout: 240 seconds]
dermot has joined #ruby
<dermot> how is developing rails on Mac OSX?
SilkFox has quit [Ping timeout: 260 seconds]
lest has left #ruby [#ruby]
<apeiros> dermot: just fine. why?
nobitanobi has joined #ruby
<dermot> considering getting one
yetanotherdave has joined #ruby
lest has joined #ruby
<deepy> You're very likely to get a similar experience to using a PC
lukevinc has joined #ruby
<dermot> i'd be going from linux -> osx
<dermot> are there any good window manager-ish applications for mac that allow you to tile windows
<dermot> and do stuff like that
Biohazard is now known as ShoweringFairy
Juzzika has joined #ruby
_lexjm has joined #ruby
Juzzika has left #ruby [#ruby]
chrishough has joined #ruby
carraroj has joined #ruby
benzrf is now known as benzrf|offline
momomomomo has joined #ruby
jheg has joined #ruby
nateberkopec has joined #ruby
william3 has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
mikecmpbll has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
JaMz has joined #ruby
mikecmpbll has joined #ruby
tcrypt has quit [Read error: Connection reset by peer]
jdj_dk has quit [Remote host closed the connection]
StephenA1 has joined #ruby
dopiee has quit [Remote host closed the connection]
lolmaus has joined #ruby
Xeago has joined #ruby
Tricon has quit [Quit: Lost terminal]
earfin has quit [Read error: Connection reset by peer]
chrishough has quit [Ping timeout: 244 seconds]
a_ has joined #ruby
pu22l3r has quit [Remote host closed the connection]
wpp has quit []
Tuxero has quit [Read error: Connection reset by peer]
geggam has quit [Ping timeout: 258 seconds]
twohlix_ is now known as twohlix
Alina-malina has quit [Read error: Connection reset by peer]
StephenA1 has quit [Quit: StephenA1]
zhigang1992 has quit [Ping timeout: 260 seconds]
Alina-malina has joined #ruby
nobitanobi has quit [Remote host closed the connection]
Scotteh has joined #ruby
lolmaus has quit [Remote host closed the connection]
mg^^ has left #ruby ["Leaving"]
kwd has joined #ruby
mg^^ has joined #ruby
lolmaus has joined #ruby
mattmcclure has joined #ruby
Timgauthier has joined #ruby
Xeago_ has joined #ruby
aspires has quit []
chrishough has joined #ruby
Deejay_ has joined #ruby
xymbol has quit [Quit: Be back later ...]
blackmesa has joined #ruby
Tuxero has joined #ruby
nonks has joined #ruby
Xeago has quit [Ping timeout: 265 seconds]
Tuxero has quit [Remote host closed the connection]
maletor has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
Tuxero has joined #ruby
<tzero> what's the difference between this channel and #ruby-lang ?
<Liendre> I have another question jhass
Tuxero has quit [Client Quit]
<shevy> tzero #ruby-lang is official
<shevy> this channel here has groupies
<tzero> ah
<shevy> and fleas
<Liendre> I´ll copy pasteç
tylersmith has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 272 seconds]
<godd2> tzero plus you gotta be registered to join ruby-lang
tylersmith has joined #ruby
jottr_ has joined #ruby
Tuxero has joined #ruby
<Liendre> Regular Ball Super Ball
<Liendre> Create a class Ball.
<Liendre> Ball objects should accept one argument for "ball type" when instantiated.
<Liendre> If no arguments are given, ball objects should instantiate with a "ball type" of "regular."
<Liendre> ----
timonv_ has joined #ruby
<Liendre> I am trying but I can't figure out
<tzero> of course there couldn't be just one ruby channel on freenode ಠ_ಠ
cina has quit [Quit: leaving]
<tzero> though I'm relieved that there are fewer than 5
<jhass> Liendre: post your try to gist.github.com
tylersmi_ has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
Gunni has quit [Ping timeout: 250 seconds]
tylersmi_ has quit [Read error: Connection reset by peer]
bricker`work has quit [Ping timeout: 255 seconds]
tyll_ has quit [Ping timeout: 272 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago_ has quit [Remote host closed the connection]
russt has joined #ruby
tyll has joined #ruby
<Liendre> the first time i use this git option ^^
kenneth has joined #ruby
timonv_ has quit [Ping timeout: 260 seconds]
<Liendre> jhass, there you go
rkalfane has joined #ruby
<Liendre> please dont laugh at me, i have been on this only a few weeks
<jhass> no worries
yfeldblum has quit [Remote host closed the connection]
<jhass> so, do you know what an instance is?
Gunni has joined #ruby
ki0 has quit [Remote host closed the connection]
<shevy> tzero I think historically #ruby was registered first but the one who did so went missing in action or something. as others did not get ops, but wanted to control a channel still, they created #ruby-lang - at least that is my interpretation
nonks has quit [Ping timeout: 256 seconds]
bricker`work has joined #ruby
yfeldblum has joined #ruby
<tzero> that's a trend with gems too, I've found :(
<jhass> Liendre: no is a valid answer ;)
<Liendre> I think I do
<Liendre> a litle bit
<jhass> Okay, how you make a new instance of Ball
russt has quit [Client Quit]
gaboesquivel has joined #ruby
havenwood has quit [Remote host closed the connection]
niklasb has joined #ruby
russt has joined #ruby
<Liendre> Ball.new
<Liendre> ?
<jhass> exactly
<Liendre> yay
<jhass> now what that assignment wants is to pass a parameter on that call
<jhass> Ball.new('super')
<Liendre> yes
havenwood has joined #ruby
<jhass> do you know which method we need to define to receive this parameter?
<Liendre> super when something is written as argument
<Liendre> mmmh
ndrei has quit [Ping timeout: 258 seconds]
niklasb has quit [Client Quit]
noop has quit [Ping timeout: 265 seconds]
linojon has quit [Quit: linojon]
shazaum has quit [Quit: Leaving]
charliesome has joined #ruby
<Liendre> I am not sure.. I am confused
treehug8_ has joined #ruby
ki0 has joined #ruby
cndiv has quit [Ping timeout: 260 seconds]
<jhass> it's initialize. new creates a new instance and then calls initialize on it, passing on all parameters
danijoo has quit [Read error: Connection reset by peer]
<jhass> so def initialize(ball_type)
<Liendre> aaahaaa
linojon has joined #ruby
<Liendre> that initialize thing has been a mistery for me for a long time
danijoo has joined #ruby
<Liendre> always there
<Liendre> okok
Dude007 has quit [Remote host closed the connection]
<jhass> the general OOP terminology for it is constructor
<jhass> so if you read that, same thing
Fohlen has joined #ruby
<Liendre> ok wait
niklasb has joined #ruby
bricker`work has quit [Read error: Connection reset by peer]
bricker`work has joined #ruby
<Liendre> (I really need to read that book of Sandi Metz, but I dont have the level yet I think)
Gunni has quit [Ping timeout: 265 seconds]
gaboesquivel has quit [Ping timeout: 260 seconds]
<Fohlen> anyone here can explain me the general approach of compiling a ruby project? I am trying to compile https://github.com/rauhryan/huboard and I got gem and rake installed, but I simply don't get the grasp how it's supposed to be working
treehug88 has quit [Ping timeout: 260 seconds]
xymbol has joined #ruby
<jhass> Fohlen: ruby is an interpreted language, you simply run it
<jhass> ruby foo.rb
nobitanobi has joined #ruby
niklasb_ has joined #ruby
<Fohlen> okay. What's the rake and gemfiles about than? How do I use them?
treehug8_ has quit [Client Quit]
boombadaroomba has quit [Remote host closed the connection]
<jhass> rake are for general tasks, those can build things or just run something
<jhass> the project you linked is sinatra application
<jhass> you should start by installing its dependencies
<jhass> make sure you have bundler installed: gem install bundler
<jhass> then run bundle install
<jhass> this will among other things install foreman
<max96at> (build usually as in css and javascript from less/sass/stylus or coffeescript) gemfiles are about dependency management
<Fohlen> okay, sweet thanks
<jhass> the project ships a Procfile which gives an indication on how to run it
<jhass> to try it out you can just run foreman start after you installed the dependencies
jdj_dk has joined #ruby
User458764 has joined #ruby
niklasb has quit [Ping timeout: 272 seconds]
Xeago has joined #ruby
DrCode has quit [Ping timeout: 246 seconds]
<jhass> Fohlen: also maybe of interest: https://github.com/rauhryan/huboard/wiki/Deploying
tier has joined #ruby
Gunni has joined #ruby
<jhass> it's worth looking into wikis on Github if you can't find any docs
jrhorn424 is now known as zz_jrhorn424
<jhass> Liendre: if ball_type = nil this condition will always be false
jdj_dk has quit [Ping timeout: 255 seconds]
cajone has left #ruby [#ruby]
<jhass> you assign nil to the variable, the result of an assignment is the right hand side of the assignment, in this case nil. nil in if statements is considered false, we call it falsey
Tricon has joined #ruby
FooMunki has joined #ruby
JBreit has left #ruby ["Leaving"]
momomomomo_ has joined #ruby
<Liendre> ouff wait ... I need to read your things like 30 times
momomomomo has quit [Ping timeout: 244 seconds]
momomomomo_ is now known as momomomomo
<jhass> no worries, I'm aware they have a certain density ;)
TPBallbag has joined #ruby
<shevy> it's because of his short nick
<shevy> j-h-a-s-s
<shevy> see? that is much better... it has proper spacing
<jhass> s-h-e-v-y
<shevy> Liendre ok but at least you understand how to use nil right?
<godd2> watch out, or you might lost molecular cohesion
<shevy> and the difference between = and ==
GPH|work has quit [Read error: Connection reset by peer]
<shevy> which can be a hard-to-spot error for new folks
<shevy> my favourite one is this: class Foo; def intialize
emmesswhy has joined #ruby
yfeldblum has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zz_jrhorn424 is now known as jrhorn424
<Liendre> yes shevy , I think so. yes yes classic error = and == thabks
robbyoconnor has quit [Client Quit]
DrCode has joined #ruby
<shevy> \o/
<jhass> Liendre: so, it's time to explain default arguments? ;)
beef-wellington has quit [Ping timeout: 265 seconds]
<Liendre> errr yes
ndrei has joined #ruby
<Liendre> :o
<jhass> okay, so currently ball_type is required
<Liendre> yes
<jhass> you have to pass it, you can't invoke it without that argument
<jhass> we don't want that
<jhass> instead we want it to be 'regular' if we don't pass it
TPBallbag has quit [Ping timeout: 256 seconds]
<Liendre> "regular" id it is empty
<Liendre> if*
Xeago_ has joined #ruby
aclearman037 has quit [Ping timeout: 256 seconds]
<jhass> we can tell ruby this by pretending to assign the value right inside the def: def initialize(ball_type="regular")
spyderman4g63 has quit [Read error: Connection reset by peer]
<Liendre> oooooooooohhhhhhhhhhhh
<jhass> let's try out with a simple method that just returns the argument:
spyderman4g63 has joined #ruby
<jhass> >> def foo(arg=:foo); arg; end; [foo, foo(:bar)]
<eval-in__> jhass => [:foo, :bar] (https://eval.in/208479)
agjacome has quit [Ping timeout: 258 seconds]
<jhass> first invocation: no argument passed, the default kicks in, second invocation: we pass the argument and override the default
agjacome has joined #ruby
m_3_ has quit [Quit: leaving]
aspires has joined #ruby
m_3 has joined #ruby
elaptics is now known as elaptics`away
niklasb_ is now known as niklasb
aclearman037 has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
GPH|work has joined #ruby
GPH|work has quit [Remote host closed the connection]
rodfersou has quit [Quit: leaving]
gregf has quit [Quit: WeeChat 1.0.1]
tadayoshi has joined #ruby
<Liendre> I am googling this :/ arg:=foo
<shevy> Liendre in other words: if you use the = there, you assign a default argument for a method, if you omit arguments when you invoke it. def foo(i = 'Hello world!'); puts i
<shevy> no no no
<shevy> you must train your eyes
<shevy> <jhass> >> def foo(arg=:foo)
<shevy> <Liendre> I am googling this :/ arg:=foo
<Liendre> okoko wait
<shevy> spot the difference Liendre
<Liendre> sorry
<Liendre> I mean
<shevy> that is the same as you did with the = vs ==
<shevy> in ruby you need sharp eyes
<Liendre> =:*
<shevy> ohh a smiley
<shevy> =:>
skolman has joined #ruby
beef-wellington has joined #ruby
<Liendre> nono
<jhass> Liendre: :fooo is just a symbol, if you don't know them yet don't worry, pretend I had written "foo"
<shevy> hahaha
<Liendre> aaahh
<Liendre> ok
<Liendre> code slang
<shevy> a smiley can be valid in ruby Liendre, yeah ^^^ if it is a symbol
SilkFox has joined #ruby
charliesome has quit [Quit: zzz]
naw_ has quit []
<Liendre> :xxx is symbol
aclearman037 has quit [Client Quit]
patric100e99 has quit [Ping timeout: 250 seconds]
<jhass> yes
<shevy> let's rewrite jhass' code
<Liendre> okok
<shevy> <jhass> >> def foo(arg = 'foo'); arg; end; [foo, foo('bar')]
hobodave has quit [Quit: Computer has gone to sleep.]
<Liendre> aah
<Liendre> aaaaaaahhh
<shevy> you see the end part, where he uses foo
<shevy> this actually calls the method foo()
<Liendre> first half understood
<shevy> first example - he passes no arguments, so the default arguments are used
<shevy> second example - he passes 'bar' as argument
<shevy> *default argument is used (there is only one of course)
<Liendre> but why [_____]
<shevy> I dunno
<shevy> his brain is wicked
jaequery has joined #ruby
<Liendre> [___, ____]
<shevy> but if it confuses you, let's do this
<jhass> that's just an array so I had to send just one query to the bot
<shevy> def foo(arg = 'foo'); arg; end; foo; foo('bar')
<jhass> and could see both results
<Liendre> ok wait
fmcgeough has quit [Quit: fmcgeough]
jottr_ is now known as jottr
GPH|work has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
SilkFox has quit [Ping timeout: 240 seconds]
gregf has joined #ruby
graydot has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
gauke has quit [Quit: gauke]
hobodave has joined #ruby
aclearman037 has joined #ruby
Naeblis has left #ruby ["Textual IRC Client: www.textualapp.com"]
<Liendre> :(
<jhass> ?
<Liendre> I am stuck and I have only a few minutes more
lukevinc has quit [Quit: ChatZilla 0.9.91 [Firefox 24.8.0/20000101000000]]
<momomomomo> what’s the question?
<momomomomo> is this for a test
<Liendre> class Ball
<Liendre> def initialize(ball_type = "regular")
<Liendre> ball_type
<Liendre> end
<Liendre> end
<momomomomo> !gist
<Liendre> I got this
<momomomomo> don’t paste code to the channel directly
<FooMunki> lol
<jhass> Liendre: I already saw the instance variable in one version of your gist
<momomomomo> use http://gist.github.com
<Liendre> +ok sorry momomomomo
<jhass> that was right, do that assignment again
benzrf|offline is now known as benzrf
Jet4Fire has quit [Ping timeout: 245 seconds]
boombadaroomba has joined #ruby
atmosx has quit [Remote host closed the connection]
jdj_dk has joined #ruby
atmosx has joined #ruby
eikood has joined #ruby
Deejay_ has quit [Quit: Computer has gone to sleep.]
ndrei has quit [Ping timeout: 245 seconds]
<Liendre> like this?
<jhass> yes
<Liendre> cool
<Liendre> but now what?
<jhass> now there's only one piece left
<Liendre> :O
<jhass> we need a method that returns which type our ball has
djbkd has quit [Remote host closed the connection]
eikood has quit [Client Quit]
<Liendre> another method
<Liendre> ok
eikood has joined #ruby
<momomomomo> are you doing their homework?
<Liendre> the method has to be called ball_type
<jhass> if you look at the example usage, which name should that method have?
<jhass> right
<momomomomo> I can’t tell who’s doing who’s homework
<Liendre> cooool
Xeago_ has quit [Remote host closed the connection]
<jhass> momomomomo: yes I'm spoonfeeding currently, but as slow as possible ;)
SCHAAP137 has joined #ruby
ht__th has quit [Ping timeout: 250 seconds]
<jhass> I think it's a kata or something
<Liendre> yes it is
<jhass> 1kyu or so
<Liendre> a kata
<Liendre> 8 kyu
<jhass> er, right, the low one
<momomomomo> Liendre: You realize that not working through the katas makes them meaningless
x1337807x has joined #ruby
BadQuanta has joined #ruby
<momomomomo> they’re literally just exercises for you to learn how to google
<momomomomo> and read and understand documentation
IceDragon has quit [Ping timeout: 272 seconds]
<momomomomo> sidestepping that defeats the purpose
<Liendre> yes momomomomo , i know thatm I am doing lots of them, but I have spent a lot of time in this one and I dont know where to look more resources online
<momomomomo> fair enough
<jhass> mmh, not all of the higher ones have a premade solution
<Liendre> anyway chatting with helpful people like here is making me learn a lot. Much more than just on my own.
ta has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
<jhass> I wouldn't spoonfeed you here if I had the impression you're not learning anything in the process ;)
Jet4Fire has joined #ruby
ta has joined #ruby
<jhass> Liendre: okay, so we need to look at variable types again
<Liendre> yes
Takle has quit [Remote host closed the connection]
<jhass> ball_type is called a local variable, it is available in the current method only
momomomomo has quit [Quit: momomomomo]
<Liendre> yes it is
<jhass> if the method ends, the local variable ceases to exist
<Liendre> yes yes
<jhass> @ball_type is called an instance variable
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Liendre> aha
<jhass> it lives inside an instance
<Liendre> ok
maestrojed has joined #ruby
<jhass> which makes it available to all methods of that instance
<Liendre> oh wait
IceDragon has joined #ruby
ht__th has joined #ruby
jrhorn424 is now known as zz_jrhorn424
chipotle has quit [Quit: cya]
lw has joined #ruby
max96at is now known as max96at|off
end_guy_ has joined #ruby
kaspertidemann has quit []
tercenya has joined #ruby
<Liendre> I am googling instance in ruby to be sure
<jhass> another term is object
<jhass> they essentially mean the same thing
<csmrfx> well, instance implies there is class
<Liendre> ok now is clear
<jhass> csmrfx: yeah, I don't think we should go into that detail yet ;)
<csmrfx> (or a prototype, in some languages)
<Liendre> all good
zz_jrhorn424 is now known as jrhorn424
<jhass> Liendre: updated the gist?
Takle has joined #ruby
<Liendre> eeh
jrhorn424 is now known as zz_jrhorn424
end_guy has quit [Ping timeout: 246 seconds]
<Liendre> now?
<jhass> yes
<Liendre> :|
<Liendre> :o
<jhass> so your current gist should pass the tests
<Liendre> omg
<jhass> but we can do a bit better
zhigang1992 has joined #ruby
_2easy has joined #ruby
_2easy has joined #ruby
<jhass> your ball type is a very common method
timonv_ has joined #ruby
<jhass> we call it an attribute
<Liendre> ABSOLUTELY
last_staff has quit [Quit: gots to runz]
<Liendre> pro
yfeldblum has joined #ruby
<jhass> it makes an instance variable available to the outside world
<jhass> so since they are so common
<jhass> ruby provides a shortcut to define them
twohlix has quit [Quit: justQU.IT]
<jhass> so you can replace the entire def with: attr_reader :ball_type
<jhass> which will define a method that looks just like the one you written
<Liendre> ooooohh that one
<jhass> but is only one line of code
<Liendre> attr_reader
<Liendre> another old unknown
doodlehaus has joined #ruby
tonybird has quit [Ping timeout: 272 seconds]
djbkd has joined #ruby
<Liendre> but attr_reader is for create a variable or to make an existing one available on the outside?
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
shock_one has joined #ruby
<Liendre> and I will need to keep using @ball_type = ball_type ??
<jhass> yes, you need to keep using that
<jhass> it's really just a shortcut to define the exact method you wrote
<jhass> it does nothing different
<Liendre> oooooooook
timonv_ has quit [Ping timeout: 245 seconds]
ptrrr has quit [Quit: ptrrr]
<Liendre> it is a shortcut
OffTheRails has joined #ruby
grzywacz has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
<jokke> hi
<Liendre> I am so glad of your help. Thanks a lot jhass (and shevy also) it is very kind on you. ^^ I will be your gratefull ruby slave
<jokke> anyone here who understands how treetop works? I'm trying to parse UPN expressions for the moment
<jhass> gotta achieve world domination somehow ;)
<Liendre> anyway I will re-read tomorrow the problem to check that i understood all good
<Liendre> thanks and good night
<jokke> and i'm failing with the recursive definition of the expression
sambao21 has joined #ruby
decoponio has quit [Quit: Leaving...]
<jokke> this won't parse 10 5 + 1 + for example
skolman has quit [Remote host closed the connection]
tvw has joined #ruby
skolman has joined #ruby
apeiros has quit []
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
emmesswhy has quit [Quit: This computer has gone to sleep]
Liendre has quit [Quit: Leaving]
jdj_dk has quit [Ping timeout: 260 seconds]
skolman has quit [Remote host closed the connection]
davidhq has joined #ruby
<benzrf> >not using monadic parser combinators
skolman has joined #ruby
<shock_one> Is it a polish notation, jokke?
<jokke> reverse polish notation yes
sambao21 has quit [Ping timeout: 258 seconds]
<shock_one> Is your parser right associative?
<jokke> umm yes i think so
cndiv has joined #ruby
<jokke> it doesn't allow left recursion
twohlix has joined #ruby
x1337807x has joined #ruby
apeiros has joined #ruby
xymbol has quit [Quit: Be back later ...]
Dude007 has joined #ruby
yokel has quit [Ping timeout: 246 seconds]
ta has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
relix has joined #ruby
yokel has joined #ruby
fabrice31 has joined #ruby
krisquigley has joined #ruby
<csmrfx> jokke: are you asking how treetop works, or how to write parsers?
<benzrf> use parsec to write parsers!!
russt has quit [Quit: russt]
krisquigley has quit [Client Quit]
<jokke> csmrfx: both
<jokke> benzrf: i've never coded haskell
Wolland has quit [Ping timeout: 265 seconds]
<wasamasa> do it, then write a monad tutorial
<shock_one> wasamasa, it five words or less.
<jokke> wasamasa: you! here?
<benzrf> monad tutorials are the WORST!!!!@
fabrice31 has quit [Ping timeout: 240 seconds]
<wasamasa> jokke: me! here!
geggam has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<benzrf> jokke: parsec!!!
<jokke> would've expected you in #haskell
<wasamasa> jokke: but yes, I'm speaking reasonably readable ruby now
yfeldblum has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<wasamasa> jokke: and know now why people are speaking in hushed tones about activerecord
<benzrf> data Op = Plus | Minus | Times | Div
<wasamasa> jokke: lolno, nearly every haskell tutorial melts my brain
<benzrf> type token = Either Float Op
<benzrf> er, type Token
<jokke> wasamasa: rly? i'm confusing you with someone else
nonks has joined #ruby
NoNMaDDeN has joined #ruby
<jokke> who's the haskell guy @ #archlinux?
<wasamasa> jokke: could be, I'm not from the purely functional fraction and rather promote lisp dialects
<benzrf> ops c = case c of '+' -> Plus; '-' -> Minus; '*' -> Times; '/' -> Div
<wasamasa> jokke: well, Earnestly does promote it despite knowing very little about it
<wasamasa> jokke: according his words of course
<jokke> haha
<jokke> benzrf: i actually like the treetop dsl
<jokke> and i like coding in ruby
<benzrf> rpn = (ops <$> oneOf "+-*/" <|> parseFloat) `sepBy` spaces
<benzrf> and you're done!
<benzrf> =3
<jokke> so i'd rather know what i'm doing wrong / not seing here
<benzrf> b-but i gotta shill
Wolland has joined #ruby
<jokke> benzrf: but it's ugly as hell
mityaz_ has quit [Quit: See ya!]
<benzrf> jokke: w-what?
ShoweringFairy is now known as SleepingFairy
chrishough has quit [Ping timeout: 265 seconds]
emmesswhy has joined #ruby
SleepingFairy has quit [Quit: WeeChat 1.1-dev]
<benzrf> oh wait that's wrong
<benzrf> it'd be
<benzrf> rpn = (Right . ops <$> oneOf "+-*/" <|> Left <$> parseFloat) `sepBy` spaces
ta has joined #ruby
NoNMaDDeN has quit [Ping timeout: 244 seconds]
bricker`work has quit [Ping timeout: 245 seconds]
reinaldob has quit [Remote host closed the connection]
blah is now known as nobody18188181
emmesswhy has quit [Client Quit]
ki0 has quit [Remote host closed the connection]
<shock_one> benzrf, I have a serious question. Why in your opinion Haskell isn't popular. I think you'll agree that it's beautiful, and has many interesting and powerful concepts.
naw_ has joined #ruby
ta_ has joined #ruby
chrishough has joined #ruby
ta has quit [Read error: Connection reset by peer]
DrShoggoth has joined #ruby
jerius has quit []
tadayoshi has quit []
bricker`work has joined #ruby
paulfm has quit []
<benzrf> shock_one: couple of reasons
<benzrf> shock_one: one is that relatively few people know it
<shock_one> I'd say it's a consequence.
<benzrf> if so, it's a cycle :)
<shock_one> What are the others?
<eam> no pointers
<csmrfx> haskell is not imperative?
lw has quit [Quit: s]
arpit has joined #ruby
SilkFox has joined #ruby
dangerousdave has quit [Quit: Textual IRC Client: www.textualapp.com]
<wasamasa> shock_one: what if I told you the majority of people actually using a language doesn't care about its beauty
<shock_one> csmrfx, could you elaborate? Does it mean that since it's less similar to the C family it requires more time to learn, or that imperative languages suit better to solve real world problems?
<wasamasa> shock_one: this argument can be applied to lots of other "How dare they not use the bestest <insert tool> like I do???" questions
<wasamasa> shock_one: even to printouts using comic sans
naw__ has joined #ruby
jdj_dk has joined #ruby
zaid_h has joined #ruby
skolman has quit [Remote host closed the connection]
emmesswhy has joined #ruby
skolman has joined #ruby
<shock_one> wasamasa, sure, but having a beautiful and a less beautiful language with all the other variables equal, it would be not wise to choose the latter, don't you agree? Therefore, it must me something else.
<csmrfx> shock_one: simply means that you need to well acquinted with secrets of computer science
mengu has quit [Remote host closed the connection]
<wasamasa> shock_one: I rather agree with results, not questionable reasoning
<csmrfx> or, at least the haskell paradigm
<wasamasa> shock_one: and based on those I'm very sure it's a massive phenomenon
<roger_rabbit> b. bu. but... but it's so FUNCTIONAL!!!
<csmrfx> as opposed to starting with bunch of statements or expressions and no real structure and still having a "program"
tier has quit [Remote host closed the connection]
<wasamasa> shock_one: here's a more elaborate essay on the topic (and another programming language): http://metamodular.com/Essays/wrong.html
<eam> beauty is subjective, and often at odds with pragmatic concerns such as efficiency, simplicity, compatibility and familiarity.
<wasamasa> ^
<wasamasa> "I mostly don't care how popular Lisp is. I am not using Lisp in order to score better in a popularity contest. I am using Lisp because it is the best programming language I know for the kind of programs I write."
tkuchiki has joined #ruby
SilkFox has quit [Ping timeout: 260 seconds]
naw_ has quit [Ping timeout: 265 seconds]
treehug88 has joined #ruby
olivier_bK has joined #ruby
<siwica> I am trying to run an external program "foo" from ruby. After executing foo it expects user input in STDIN and returns output in STDOUT. However, I can't manage to achieve this from ruby. These are my attempts so far:
<siwica> Open3.popen3('foo') { |stdin, stdout, stderr, wait_thr| stdin.write 'sample input'; p stdout.read }
masak has quit [Ping timeout: 240 seconds]
<shock_one> wasamasa, that's true, but I do care if I can find a job.
<siwica> Any help?
naw__ has quit [Client Quit]
<eam> siwica: what is the program?
<wasamasa> shock_one: and what if that job decides rails is the most practical choice for writing a web application in a team?
toretore has quit [Quit: This computer has gone to sleep]
<siwica> eam: cs2cs
naw_ has joined #ruby
klmlfl has quit [Ping timeout: 272 seconds]
naw_ has left #ruby [#ruby]
<wasamasa> shock_one: hint: the answer to this question answers why I'm in this channel :P
<siwica> eam: specifically, "cs2cs +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs +to +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -"
skolman has quit [Ping timeout: 255 seconds]
<eam> siwica: does cs2cs expect stdin to be closed before it writes to stdout?
<eam> is this on linux?
<shock_one> wasamasa, I'm also developing a rails application at work, bro. And we have hundreds of tests that would be unnecessary in a statically typed language.
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<siwica> eam: yes, it's on linux
<eam> siwica: ever use strace?
<eam> it's a great way to figure out where deadlocks like this are occuring
<wasamasa> wait, did I just got called "bro" by someone on #ruby dreaming of haskell?
<eam> why is the word "bro" so offensive to some
<siwica> eam: it only says the following in the man page: "If no files are specified, the input is assumed to be from stdin. For input data the two data values must be in the first two white space separated fields and when both input and output are ASCII all trailing portions of the input line are appended to the output line."
<wasamasa> eam: the combination is offensive
starkhalo has joined #ruby
codecop_ has quit [Remote host closed the connection]
<siwica> eam: no, what is that?
<eam> siwica: is this a fairly simple program? like, can you reduce the problem to just the single popen routine or close to it?
<eam> strace is a debugging tool that lets you see the syscalls your process is making
<eam> strace -o/tmp/potentially_kinda_big_file my_ruby.rb
<eam> then take a look at where it pauses
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
p8952 has quit [Quit: ZNC - http://znc.in]
lw has joined #ruby
skolman_ has joined #ruby
jgrevich has joined #ruby
chrishou_ has joined #ruby
<eam> you can also use -f to tell it to also trace the cs2cs subprocess
jxf has quit [Ping timeout: 255 seconds]
<siwica> eam: I inserted, "stdin.close" after "stdin.write 'blabla' and now it works
j_mcnally has joined #ruby
p8952 has joined #ruby
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam> siwica: bam
<siwica> eam: your first hint was correct :)
<eam> siwica: recommend playing with strace, it's very useful for debugging this kind of thing
<siwica> eam: ok, I will try this out, thanks!
<siwica> eam: Luckily the program ist fairly simple in my case, but it's good to know if sth more difficult occurs
blackmesa has quit [Quit: WeeChat 1.0.1]
TPBallbag has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
jheg has quit [Quit: jheg]
chrishough has quit [Ping timeout: 255 seconds]
tesaf has quit [Quit: Lost terminal]
Asher has quit [Quit: Leaving.]
Ankhers has quit [Ping timeout: 246 seconds]
aclearman037 has quit []
nobody18188181 has left #ruby [#ruby]
ta_ has quit [Read error: Connection reset by peer]
ta has joined #ruby
jcdesimp has joined #ruby
skolman_ has quit [Remote host closed the connection]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agjacome has quit [Quit: leaving]
skolman has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
GPH|work has quit [Ping timeout: 255 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
luriv has quit [Remote host closed the connection]
claw has joined #ruby
DrShoggoth has quit [Quit: Leaving]
kaspergrubbe has quit [Read error: Connection reset by peer]
Morkel has quit [Quit: Morkel]
mrsolo has joined #ruby
patrick99e99 has joined #ruby
kirun has quit [Quit: Client exiting]
zhigang1992 has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
ki0 has joined #ruby
chrishough has joined #ruby
failshell has quit []
Lewix has joined #ruby
jxf has joined #ruby
bbloom has quit [Quit: Textual IRC Client: www.textualapp.com]
<siwica> eam: I am trying strace out of curiosity
reinaldob has joined #ruby
chrishou_ has quit [Ping timeout: 272 seconds]
<siwica> eam: however, I can't get it working
<siwica> getting "strace: exec: Permission denied"
<siwica> although I am running it with sudo
shock_one has quit [Quit: Be back later ...]
kaspergrubbe has joined #ruby
skolman has quit [Remote host closed the connection]
chrishou_ has joined #ruby
bbloom has joined #ruby
eikood has quit [Quit: Leaving]
<eam> you don't need sudo
skolman_ has joined #ruby
<siwica> eam: that's what I thought, still getting the same error
cndiv has quit [Ping timeout: 240 seconds]
<eam> siwica: try: strace -eopen ruby -e'File.read "/etc/passwd"'
<olivier_bK> what is the best gem for automating interactions with a website ?
doodlehaus has quit [Ping timeout: 244 seconds]
chrishough has quit [Ping timeout: 245 seconds]
jdj_dk has quit [Ping timeout: 272 seconds]
JaMz has quit [Remote host closed the connection]
cndiv has joined #ruby
JaMz has joined #ruby
sdwrage has joined #ruby
benzrf is now known as benzrf|offline
eikood has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
OffTheRails has quit [Ping timeout: 272 seconds]
skolman_ has quit [Ping timeout: 255 seconds]
<siwica> eam: should I run this withoug the other parameters?
chrishou_ has quit [Ping timeout: 255 seconds]
jerius has joined #ruby
<eam> yeah just run exactly that
JaMz has quit [Ping timeout: 258 seconds]
<shevy> eam is helping people master ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
FooMunki has quit [Quit: FooMunki]
<shevy> the question is
<shevy> is eam helping people master perl?
<shevy> olivier_bK go read mechanize docs man
mistermocha has quit [Remote host closed the connection]
ta has quit [Read error: Connection reset by peer]
it0a has quit [Ping timeout: 240 seconds]
Pupeno_ has quit [Quit: Leaving...]
ta has joined #ruby
boombadaroomba has quit []
reinaldob has quit [Remote host closed the connection]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<siwica> eam: I did
<siwica> I got a bunch of output
<siwica> exited with 0
<siwica> however the error remains
St_Marx has joined #ruby
Avahey has joined #ruby
FooMunki has joined #ruby
jaequery has joined #ruby
<eam> the output is showing you the system calls your program is making to the kernel
<eam> eg File.read() -> open(); read(); read(); close()
chrishough has joined #ruby
<eam> you will see a bunch of stuff the ruby VM is doing as well
chrishough has quit [Client Quit]
chrishough has joined #ruby
<eam> if you run it on your program which was having trouble you should see the output pause in the middle of a read() call
kingman has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
klmlfl has joined #ruby
beef-wellington has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
<siwica> eam: ok, I see
<siwica> eam: just what would be the correct call if my program name is "foo.rb"?
<siwica> strace -eopen ruby -e 'foo.rb' ?
PeterBoy has joined #ruby
linojon has quit [Quit: linojon]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
autonomousdev has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest57742 is now known as Radar
charliesome has joined #ruby
eikood has quit [Quit: Leaving]
doodlehaus has joined #ruby
spyderman4g63 has quit [Ping timeout: 260 seconds]
<siwica> Probably I simple question: When making a call to an external program with Open3.popen3('foo') { |stdin, stdout, stderr, wait_thr| stdin.write 'sample input'; a = stdout.read }. How do I get access to the variable "a" outside the block?
jdj_dk has joined #ruby
doodlehaus has quit [Remote host closed the connection]
skolman has joined #ruby
<shevy> siwica no
allcentury has quit [Ping timeout: 260 seconds]
<shevy> if you wish to store it, initialize it outside like @a
<jokke> so no one could help me with my parsing problem?
<siwica> shevy: ok, but that seems a little ugly
<shevy> siwica well you could try with a perhaps
<shevy> I mean, you can not store the local variable outside the block - it has its own scope ok?
<siwica> shevy: yes
<shevy> unless you initialized it already
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phutchins has quit [Ping timeout: 260 seconds]
<shevy> the a = stdout.read part should only persist within the context of that block there
<siwica> but I just need a in a certain method and not in the entire class
<shevy> well try it without @
<shevy> btw you can remove @ variables too
CodeBunny has joined #ruby
SilkFox has joined #ruby
<shevy> remove_instance_variable(:@a)
Fire-Dragon-DoL has quit [Ping timeout: 272 seconds]
<shevy> but try with a before you use @a
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<CodeBunny> is anyone here a Rake wizkid
<siwica> ok, that sounds interesting
<CodeBunny> I am trying to run rspec and spec in the same rake file... and I fail
sailias has quit [Quit: Leaving.]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
gaboesquivel has joined #ruby
<shevy> rake is fail too
<CodeBunny> Yeh yeh
zzach has quit [Ping timeout: 245 seconds]
SilkFox has quit [Ping timeout: 272 seconds]
starkhalo has quit [Ping timeout: 272 seconds]
<eam> have you guys heard about this new cool tool called "make", it's like rake except it works everywhere
zzach has joined #ruby
<CodeBunny> But seriously....
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mleone has joined #ruby
mleone has quit [Client Quit]
<shevy> except you must indent with make
msmith has quit [Remote host closed the connection]
<eam> you say that like ruby isn't super whitespace sensitive either
User458764 has quit [Ping timeout: 246 seconds]
<shevy> ruby only complains but continues
tkuchiki has quit [Ping timeout: 255 seconds]
AndChat| has joined #ruby
mleone has joined #ruby
jobewan has quit [Quit: Leaving]
mleone has quit [Client Quit]
lkba has quit [Ping timeout: 255 seconds]
mleone has joined #ruby
ramfjord has quit [Ping timeout: 265 seconds]
volty has joined #ruby
freerobby has quit [Quit: Leaving.]
jimbach has quit [Remote host closed the connection]
Tuxero has quit [Quit: Tuxero]
narcan has joined #ruby
<CodeBunny> Are you kidding. Ruby could care less about witespace.
PeterBoy has quit [Quit: Bye Bye]
qmfnp has joined #ruby
<CodeBunny> ruby programmers on the other hand will nitpick your indenting for not better reason than to pick on you
geggam has quit [Ping timeout: 244 seconds]
<CodeBunny> not = no
freerobby has joined #ruby
timonv_ has joined #ruby
<shevy> well ruby tends to scream at wrongful indents these days if you run it with warning
<shevy> test.rb:34: warning: mismatched indentations at 'end' with 'def' at 32
jimbach has joined #ruby
<shevy> and I guess eam referred to some ... parser strangeness...
<shevy> I think it was ... [!and] or something like that
reinaldob has joined #ruby
<shevy> nope
<shevy> that was not it :(
<shevy> eam help me out
<volty> irb: "#{x#{i}}"
bricker`work has quit [Ping timeout: 272 seconds]
obs has quit [Quit: Saliendo]
<shevy> why do you torture ruby so much volty
jcdesimp has quit [Remote host closed the connection]
<shevy> has haskell spoiled you :>
mistermocha has joined #ruby
<volty> ahah, no, it just happened by error
<eam> >> [eval("5 \n- 6"), eval("5 -\n 6")]
<eval-in__> eam => [-6, -1] (https://eval.in/208516)
<eam> CodeBunny: ^^
<CodeBunny> eam: ?
starkhalo has joined #ruby
<eam> "ruby could care less about whitespace" => disproven
TPBallbag has quit [Remote host closed the connection]
zhigang1992 has joined #ruby
timonv_ has quit [Ping timeout: 265 seconds]
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdj_dk has quit [Ping timeout: 244 seconds]
<shevy> hey
<shevy> >> 5-6
<eval-in__> shevy => -1 (https://eval.in/208517)
PeterBoy has joined #ruby
<eam> >> def f(x); x; end; f(not true)
<eval-in__> eam => /tmp/execpad-bd8f92ed4c82/source-bd8f92ed4c82:2: syntax error, unexpected keyword_true, expecting '(' ... (https://eval.in/208518)
<eam> >> def f(x); x; end; f (not true)
<eval-in__> eam => false (https://eval.in/208519)
<volty> >> eval "5 - \t\s\n6"
<eval-in__> volty => -1 (https://eval.in/208520)
<volty> all whitespace
<shevy> actually I think eval works correctly there
<shevy> you could not do this either:
<eam> volty: now move the whitespace to the left of the minus
<shevy> p 5
<shevy> - 6
<eam> shevy: exactly
jimbach_ has joined #ruby
<eam> that's called whitespace significance
<shevy> so that is why you added - on the same line as 5 in the second eval
<eam> right
<shevy> >> eval "5 \t - 6"
<eval-in__> shevy => -1 (https://eval.in/208522)
<shevy> \o/
<volty> >> [eval("7\t - 6"), (eval "7\n - 6")]
<eval-in__> volty => [1, -6] (https://eval.in/208523)
<volty> yap, no consistency
<volty> or yes?
iceden has quit [Read error: Connection reset by peer]
<shevy> well try normal ruby code like the second eval example
jimbach has quit [Ping timeout: 246 seconds]
kotk_ has joined #ruby
<volty> yes, eam, it's consistent
<eam> it's just that a newline (whitespace) means something different than other kinds of whitespace
<volty> same interpretation in normal code
<eam> volty: no one is claiming it's inconsistent
ramfjord has joined #ruby
<eam> it is merely significant
<volty> (i was telling that to me) @eam
<eam> ah
kotk has quit [Ping timeout: 260 seconds]
<eam> if I'm using the inline rescue like foo() rescue true, how do I indicate that I want to rescue Exception?
nettoweb_ has joined #ruby
omosoj has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
djstorm has quit [Ping timeout: 250 seconds]
<Sou|cutter> I don't think you can....
<omosoj> hey guys, you all know about conway's game of life, right?
<shevy> no
<eam> Sou|cutter: well, that kinda sucks
<Sou|cutter> omosoj: code retreat coming up?
snath has quit [Ping timeout: 265 seconds]
<shevy> down with inline style eam !
mrsolo has joined #ruby
<omosoj> naw, just preparing for technical interviews and was told that this is a common one
treehug88 has quit []
emmesswhy has quit [Quit: This computer has gone to sleep]
<eam> not using inline style is a real cramp when writing one-line programs
iamjarvo has joined #ruby
<Sou|cutter> omosoj: It's a fun exercise. I've never used it in an interview personally
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
<wasamasa> omosoj: indeed, I have two guys at work who had to do this
hobodave has quit [Quit: Computer has gone to sleep.]
<eam> conway's game of middleware connectors
<wasamasa> omosoj: I didn't need to because I've qualified earlier
<Sou|cutter> omosoj: http://globalday.coderetreat.org/ <-- find one near you
<omosoj> i have an idea how i'd build parts of it, but no idea how i'd make the visualization and whole thing
<omosoj> thanks, Sou|cutter
mary5030 has quit [Remote host closed the connection]
<wasamasa> omosoj: you have multiple options
<wasamasa> omosoj: like, printing it out every time/writing to file
<wasamasa> omosoj: writing a curses application
<Sou|cutter> omosoj: honestly if you came into an interview and recited an answer it's a lot less interesting than seeing how you work through the problem
<wasamasa> omosoj: writing something with an ui toolkit
freerobby has quit [Quit: Leaving.]
<wasamasa> omosoj: writing something with a web ui
<wasamasa> omosoj: it doesn't really matter which one you go for
mary5030 has joined #ruby
<eam> wasamasa: no mention of native graphics?
<eam> today's world is a weird place
<omosoj> i was able to work through a class for each block that would behave the right way, but ugh would i be expected to build the graphic part?
<wasamasa> no
<wasamasa> besides, wiring it up should be the easiest part
<omosoj> cool
lmickh has quit [Remote host closed the connection]
<omosoj> eam, native graphics?
lessless has quit [Remote host closed the connection]
Asher has joined #ruby
_lexjm has quit [Quit: Textual IRC Client: www.textualapp.com]
<wasamasa> I assume he means something going towards opengl
<eam> for life?!?
Scotteh_ has joined #ruby
<eam> shoot
<eam> the problem kinda lends itself to a regular old framebuffer
fabrice31 has quit [Ping timeout: 245 seconds]
Scotteh has quit [Ping timeout: 246 seconds]
<eam> you don't even need a separate datastructure
aspiers has joined #ruby
Dude007 has quit [Read error: Connection reset by peer]
Dude007 has joined #ruby
<omosoj> cool, if i just need to create the class and not the graphics then i'm in okay shape. :)
Fohlen has left #ruby [#ruby]
zaid_h has quit [Quit: ZZZzzz…]
<wasamasa> omosoj: well, you better at least visualize them via printing to console
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<omosoj> but it would be cool to make a 15x15 thing in the terminal that does the patterns--is that possible?
<omosoj> (in ruby)
<eam> omosoj: you'll have a two dimensional array, yes?
<eam> you're asking if you can print that out? :)
<omosoj> hm. i can print out a frame, but not multiple frames in the same place
livingstn has quit []
<wasamasa> which is why curses exists
TPBallbag has joined #ruby
<eam> or just print out frames in sequence and let them scroll
<wasamasa> makes the whole thing a ton less straight forward though
Loplin1 has joined #ruby
Loplin has quit [Quit: Leaving.]
<omosoj> hm. k.
doodlehaus has joined #ruby
klmlfl has quit [Remote host closed the connection]
TPBallbag has quit [Remote host closed the connection]
<siwica> whats the best way to convert "a b c" to [a, b, c] with arbitrary whitespace separating the letters?
klmlfl has joined #ruby
iceden has joined #ruby
bricker`work has joined #ruby
wldcordeiro_ has quit [Quit: Leaving]
<eam> >> "a\t b\n c".split
<eval-in__> eam => ["a", "b", "c"] (https://eval.in/208525)
Mia has quit [Read error: Connection reset by peer]
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
<siwica> awesome!
olivier_bK has quit [Ping timeout: 260 seconds]
DLSteve has joined #ruby
<omosoj> what are the \t and \n for?
Loplin1 has quit [Ping timeout: 258 seconds]
<siwica> omosoj: TAB and newline
<siwica> showing it works for arbitrary whitespace
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
AlexRussia has quit [Ping timeout: 272 seconds]
jdj_dk has joined #ruby
qmfnp has joined #ruby
jimbach_ has quit [Remote host closed the connection]
kotk has joined #ruby
j_mcnally has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<shevy> hah!
<shevy> that's where ruby beats perl
DmitryM has joined #ruby
kotk_ has quit [Ping timeout: 265 seconds]
emmesswhy has joined #ruby
<DmitryM> hello everyone, is it possible to configure gem to use a custom compiler when building gem extensions?
AlexRussia has joined #ruby
Wolland has quit []
emmesswhy has quit [Client Quit]
jack_rabbit has quit [Quit: Leaving]
devdazed has quit [Quit: Computer has gone to sleep.]
lw has quit [Quit: s]
<shevy> RbConfig::MAKEFILE_CONFIG
<shevy> RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
<shevy> DmitryM this could work perhaps
Spami has joined #ruby
chipotle has joined #ruby
Scotteh__ has joined #ruby
moritzs has joined #ruby
phantummm has quit [Quit: phantummm]
zaid_h has joined #ruby
<omosoj> exit
<omosoj> oops :)
omosoj has quit [Quit: leaving]
Scotteh_ has quit [Ping timeout: 246 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seitensei has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
seitensei has joined #ruby
diegovio1 has joined #ruby
diegoviola has quit [Ping timeout: 265 seconds]
SilkFox has joined #ruby
mistermocha has quit [Remote host closed the connection]
mark06 has joined #ruby
<shevy> SOMEBODY RESCUE HIM!!!
grzywacz has quit [Ping timeout: 255 seconds]
enebo has quit [Quit: enebo]
moritzs has quit [Quit: Verlassend]
renderful has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
rockdon_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SilkFox has quit [Ping timeout: 272 seconds]
Photism has joined #ruby
tylersmith has joined #ruby
klaut has quit [Remote host closed the connection]
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bauruine has quit [Quit: ZNC - http://znc.in]
gattuso has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
weemsledeux has joined #ruby
bauruine has joined #ruby
chipotle_ has joined #ruby
TPBallbag has joined #ruby
zaid_h has quit [Quit: ZZZzzz…]
chipotle has quit [Ping timeout: 246 seconds]
thumpba has joined #ruby
shosti has joined #ruby
starkhalo has quit [Ping timeout: 240 seconds]
diegovio1 is now known as diegoviola
emmesswhy has joined #ruby
TPBallbag has quit [Ping timeout: 244 seconds]
arpit has quit [Quit: arpit]
stunder has quit [Quit: Screw you guys I'm going home]
tonybird has joined #ruby
zhigang1992 has quit [Ping timeout: 260 seconds]
jdj_dk has quit [Ping timeout: 244 seconds]
JaMz has joined #ruby
it0a has joined #ruby
<volty> i'd rather try multiplying bred & butter :)
oo_ has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
emmesswhy has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
jottr has quit [Ping timeout: 265 seconds]
Timgauthier is now known as timgauthier_away
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
babykosh has joined #ruby
babykosh has quit [Client Quit]
autonomousdev has joined #ruby
aspires has quit []
maxmachine has joined #ruby
roqo has joined #ruby
aspires has joined #ruby
autonomousdev has quit [Client Quit]
niklasb has quit [Ping timeout: 272 seconds]
maxmachine has left #ruby [#ruby]
mrsolo has quit [Quit: Leaving]
j_mcnally has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcdesimp has joined #ruby
j_mcnally has quit [Read error: Connection reset by peer]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jcdesimp has quit [Read error: Connection reset by peer]
jcdesimp has joined #ruby
nonks has quit [Ping timeout: 272 seconds]
mferrier has joined #ruby
<a_> hey guys
<a_> does ruby just suck at distributed microservices
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<a_> straight answer for a straight question please :)
aspires has quit []
<a_> (being an awesome language, i'm sure nobody even thinks to be touchy with questions like that as people would in ##php / #java)
Synthbread has joined #ruby
banister is now known as banisterfiend
kantakt has quit []
JaMz has quit []
klmlfl has quit []
klmlfl has joined #ruby
<mferrier> a_: it's the best language for distributed microservices, don't let anyone tell you different
<a_> mferrier: are you serious (seriously)
<mferrier> as serious as your question was :)
<volty> what are distributed microservices ?
<a_> mferrier: my question was pretty serious
okjake has joined #ruby
okjake has left #ruby [#ruby]
okjake has joined #ruby
<mferrier> really? you're asking if a general purpose language "sucks" at a very particular niche use and expect a serious answer?
okjake has left #ruby [#ruby]
<volty> I could try to implement on-fly if you tell me what it is about :)
<a_> mferrier: haven't you heard, general purpose languages tend to be associated to ecosystems nowadays
<mferrier> and is ruby associated to a distributed microservice framework?
jxf has quit [Ping timeout: 260 seconds]
<volty> and who sets up the «tendency»?
klmlfl has quit [Remote host closed the connection]
<a_> mferrier: none that are complete *afaik*.
<havenwood> a_: Can you be more specific with what you're wanting to do?
<a_> mferrier: which is arguably sucky.
<a_> And I'm not hating on Ruby, just the current state of its ecosystem relating to a particular need
Dude007 has quit [Remote host closed the connection]
<havenwood> need to do what?
<a_> I ask the question out of love, which is why I don't just go straight to Scala w/ Akka :)
<a_> havenwood: i need a general purpose distributed service framework
mark06 has left #ruby ["http://pidgin.renatosilva.me - Pidgin++"]
Dude007 has joined #ruby
arpit has joined #ruby
<a_> havenwood: Akka is available for Java/Scala, for instance.
jxf has joined #ruby
<mferrier> a_: why don't you write one
<a_> And I believe clojure has its counterparts
jdj_dk has joined #ruby
<volty> break eggs with ruby? that's simple: eggs.each { |egg| distribute(egg, breakers.random) }
<a_> mferrier: because I am aware of some very smart people who have spent years doing so, and I do not have the time/scope
<volty> can't think of something more micro than that
<havenwood> a_: Are you familiar with the Celluloid ecosystem?
<volty> answer to havenwood
<a_> havenwood: thank you for not being one of these clowns :) Yes. Unfortunately, DCell isn't ready for use, yet
<havenwood> a_: true
<shevy> when I do something like this:
<volty> if you like to disguise abstract theories and the sex of angles there's #haskell
<shevy> heredoc_variable = <<-EOF
<shevy> is it possible to interpolate inside that via #{} ?
<a_> havenwood: and I know of no other real alternatives. There's so much hype about micro-soa, it's kind of ridiculous Ruby has virtually *nothing* to offer
arpit has quit [Client Quit]
<havenwood> a_: No DRb love?
<shevy> micro-soap?
axl__ has joined #ruby
<a_> havenwood: author of celluloid has none. I'm going to look into it right now - but I bet his word will be on the money
<a_> havenwood: I haven't really looked into it (am right now) - my only foreknowledge of it is that the celluloid author doesn't regard it as sufficient
axl__ has left #ruby [#ruby]
<volty> shevy: yes
jxf has quit [Ping timeout: 265 seconds]
<shevy> hmm
<shevy> it's so long
<havenwood> a_: I know there are some DRb users here in the channel. It being in the stdlib is handy. I think DCell is interesting but I agree it's not fully baked.
<shevy> I guess I'll put it into its own file :P
doodlehaus has quit [Remote host closed the connection]
<a_> havenwood: I've only seriously started looking at celluloid recently. Was really upset to realise that it wasn't quite ready, seemed perfect.
cat_pants has joined #ruby
mistermocha has joined #ruby
<cat_pants> Hi folks, what's this operator called? "=>"
<havenwood> cat_pants: hash rocket
<cat_pants> Thanks! Also curious about this one as well: "->"
<havenwood> cat_pants: stabby lambda
nateberkopec has quit [Quit: Leaving...]
<cat_pants> Thank you :) I'll go read the docs for those
<a_> havenwood: I'm looking to implement micro-soa for a large & well-known organization/website. It has to be Ruby (otherwise I'd fall back to Scala for Akka). Will be sad to miss the opportunity of going fully micro-soa
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
agjacome has joined #ruby
<tmoore> I mean, generally the reason people want to go micro SOA in the first place is because they can't meet their performance needs with a monolithic architecture, right?
emmesswhy has quit [Quit: This computer has gone to sleep]
<a_> tmoore: more economical/efficient, as you can scale with more granularity
<tmoore> you're never going to get the most efficiency possible from Ruby
<a_> tmoore: I'm not looking for performance here, though
<a_> tmoore: for instance, I'd like to compose a system of very small services. For the sake of that.
_|d0m|_ has quit [Ping timeout: 245 seconds]
<tmoore> at its simplest, you don't need a special framework... just a REST API
PeterBoy has quit [Quit: Bye Bye]
rockdon_ has joined #ruby
tvw has quit []
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brainspoil has joined #ruby
cndiv has quit [Ping timeout: 272 seconds]
mary5030 has quit [Remote host closed the connection]
<a_> tmoore: I was thinking about stuff like using queues for asynchrony, but I guess it's not *really* needed
<tmoore> there are lots of ways to use queues in Ruby