baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.0, 2.4.3, 2.3.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
pastorinni has quit [Remote host closed the connection]
pastorinni has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
hairui has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
pastorinni has quit [Remote host closed the connection]
workmad3 has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ta_ has joined #ruby
kaspergrubbe has joined #ruby
hairui has quit [Ping timeout: 240 seconds]
clemens3 has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
pastorinni has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
<zenspider> rubycoder38: I'd start by removing all class methods. There are very few legit singletons in the world
ramfjord has joined #ruby
morenoh149 has joined #ruby
<rubycoder38> ok
<rubycoder38> I see
kaspergrubbe has quit [Ping timeout: 260 seconds]
<rubycoder38> zenspider: the specification that I got expect WalletCentral.output to be a thing though
<rubycoder38> same with WalletCentral.transfer
<zenspider> bad design imho
<zenspider> "Central" is a lie ... or will be at some point.
ramfjord has quit [Ping timeout: 248 seconds]
<rubycoder38> hrm
<zenspider> you have plenty of code that can be cleaned up with simple local variables
<zenspider> look at output. what's the same?
morenoh149 has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
<rubycoder38> ah yes, that if else annoys me
<zenspider> what would you do instead?
d10n-work has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
pastorinni has quit [Remote host closed the connection]
<rubycoder38> I'm not sure
EG^ has joined #ruby
<zenspider> why not?
<rubycoder38> good question, maybe I need to think more?
<zenspider> this isn't rocket science. apply yourself.
EG^ has quit [Client Quit]
bronson has quit [Ping timeout: 248 seconds]
must^ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
ramfjord has joined #ruby
Azure has joined #ruby
<rubycoder38> zenspider: you are saying I only need 1 query there?
<rubycoder38> wait
mrush has joined #ruby
hairui has joined #ruby
despai has quit [Quit: ...]
Azure has quit [Remote host closed the connection]
Azure has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
deadnull has quit [Quit: deadnull]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hairui has quit [Ping timeout: 268 seconds]
ramfjord has joined #ruby
rwb has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
jnollette has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
konsolebox has quit [Ping timeout: 276 seconds]
must^ has quit [Ping timeout: 260 seconds]
goatish has quit [Quit: Hibernating]
mtkd has quit []
jnollette has joined #ruby
rexb0t has joined #ruby
cliq has quit [Ping timeout: 248 seconds]
pastorinni has joined #ruby
pastorinni has quit [Client Quit]
rexb0t has quit [Client Quit]
<rubycoder38> what the hell!
schneide_ has joined #ruby
bmurt has joined #ruby
BowBoy has joined #ruby
rwb has joined #ruby
<rubycoder38> my test successfully passes with only the first query
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubycoder38> turns out my test was incomplete
goatish has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
schneide_ has quit [Ping timeout: 256 seconds]
RougeR has quit [Ping timeout: 260 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit []
ta_ has joined #ruby
morenoh149 has joined #ruby
snath has joined #ruby
<rubycoder38> zenspider: using a ternary like this works also but I don't like it: https://gist.github.com/anonymous/28aa8e4836322e2278366c868f7c504a
morenoh149 has quit [Ping timeout: 256 seconds]
rwb has quit [Ping timeout: 240 seconds]
hairui has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hoylemd has quit [Ping timeout: 256 seconds]
<rubycoder38> ok I'll try something else
apparition has joined #ruby
hairui has quit [Ping timeout: 256 seconds]
xelkarin has quit [Quit: WeeChat 1.9.1]
bronson has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.0.1]
marr has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
Puffball has quit [Remote host closed the connection]
<rubycoder38> zenspider: I'm curious what your ideas was...
AJA4350 has quit [Ping timeout: 248 seconds]
ta_ has quit [Ping timeout: 240 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
AJA4350 has joined #ruby
ta_ has joined #ruby
hairui has joined #ruby
orbyt_ has joined #ruby
jnollette has quit [Remote host closed the connection]
jnollette has joined #ruby
hairui has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
lunarkitty7 has joined #ruby
darkhanb has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
tefa2 has joined #ruby
goatish has quit [Quit: Hibernating]
lunarkitty7 has quit [Quit: WeeChat 1.9.1]
lunarkitty7 has joined #ruby
morenoh149 has joined #ruby
arescorpio has joined #ruby
bigblind has quit [Ping timeout: 264 seconds]
tefa has quit [Ping timeout: 276 seconds]
rwb has joined #ruby
morenoh149 has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
kaspergrubbe has joined #ruby
gizmore has joined #ruby
rwb has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
kaspergrubbe has quit [Ping timeout: 240 seconds]
gizmore|2 has quit [Ping timeout: 268 seconds]
<rubycoder38> this is the best I can think of:
<rubycoder38> wallets = DB[:wallets]
<rubycoder38> name.nil? ? wallets : wallets.where(name: name) .select_hash_groups(:name, [:currency, :amount]).to_json
<rubycoder38> but for some reason when name.nil? is true it doesn't call the .select_hash_groups
<rubycoder38> I only get #<Sequel::SQLite::Dataset:0x000055f24ea079b8>
jnollette has quit [Ping timeout: 255 seconds]
ta_ has quit [Ping timeout: 276 seconds]
hairui has joined #ruby
jnollette has joined #ruby
bronson has joined #ruby
govg has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
hairui has quit [Ping timeout: 256 seconds]
MrJoshua has joined #ruby
dviola has quit [Ping timeout: 268 seconds]
SynSynack has joined #ruby
MrJoshua has quit [Client Quit]
MrJoshua has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
bmurt has joined #ruby
char_var[buffer] has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
faces has quit [Ping timeout: 268 seconds]
jnollette has quit [Ping timeout: 255 seconds]
jnollette has joined #ruby
nckpz has quit [Ping timeout: 255 seconds]
orbyt_ has joined #ruby
Guest32242 has joined #ruby
matchaw has quit [Quit: Leaving]
morenoh149 has joined #ruby
hairui has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
morenoh149 has quit [Ping timeout: 264 seconds]
hairui has quit [Ping timeout: 248 seconds]
apparition has quit [Quit: Bye]
ta_ has joined #ruby
bigblind has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
BowBoy has quit [Quit: Leaving]
morenoh149 has joined #ruby
<rubycoder38> when I have a class, let's say CurrencyConversion and I create an initialize method and return something from initialize, why do I get the #<CurrencyConversion:0x000056285dbda638>
<rubycoder38> why do I get #<CurrencyConversion:0x000056285dbda638>
<rubycoder38> rather than the value I returned?
bronson has quit [Ping timeout: 248 seconds]
jnollette has quit [Ping timeout: 255 seconds]
agent_white has quit [Quit: brb]
hairui has joined #ruby
morenoh149 has quit [Ping timeout: 240 seconds]
govg has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
jnollette has joined #ruby
hairui has quit [Ping timeout: 256 seconds]
ledestin has joined #ruby
<mattwc> rubycoder38: an initialize method should return an instance of the model you created
<rubycoder38> right, so if I want to return a value to a method, I use a regular method instead?
<rubycoder38> like Currency#convert or whatever
<mattwc> yeah either an instance or class method
<rubycoder38> right, thanks
<rubycoder38> I was going to ask something related to that
arescorpio has quit [Quit: Leaving.]
<rubycoder38> when is it best to use an instance or class method?
<rubycoder38> zenspider said something about that that made me a bit confused
drewmcmillan has joined #ruby
<rubycoder38> 21:19 < zenspider> rubycoder38: I'd start by removing all class methods. There are very few legit singletons in the world
<mattwc> so an instance method is something where the method depends on information about a specific instance of the object
<mattwc> so if you had a Car class, `color` would most likely be an instance method since its the color of a specific car
<rubycoder38> right
<rubycoder38> makes sense, thanks
agent_white has joined #ruby
jaequery has joined #ruby
m27frogy has joined #ruby
ta_ has quit [Ping timeout: 268 seconds]
elcontrastador has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has quit [Quit: AJA4350]
ta_ has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
jaequery has joined #ruby
<rubycoder38> so do you guys happen to know how I can refactor this mess? https://gist.github.com/anonymous/dc7f532787705126fc4a19dd43017235
<rubycoder38> especially the if/else in #output
vutral|kali has quit [Ping timeout: 260 seconds]
<rubycoder38> I hate it
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubycoder38> I can't think of anything
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
<mattwc> something like this? https://www.irccloud.com/pastebin/dTH99wYE/
<ruby[bot]> mattwc: we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/6f4f600e1d7542cf73a0f236fdc1bd21
<ruby[bot]> mattwc: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
hairui has joined #ruby
vutral|kali has quit [Ping timeout: 248 seconds]
<rubycoder38> that works indeed, thanks
hairui has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
orbyt_ has joined #ruby
kaspergrubbe has joined #ruby
<rubycoder38> that's really neat
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubycoder38> I wonder if I can do the same for the other queries in #transfer
AxelAlex has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
bigblind has quit [Ping timeout: 276 seconds]
<mattwc> i mean transfer could probably be simplified just by defaulting target_currency to currency right?
<mattwc> since it'd just do a 1 to 1 conversion if they're the same
kaspergrubbe has quit [Ping timeout: 265 seconds]
<rubycoder38> I think so, yes
<rubycoder38> and removing the if/else you mean?
<mattwc> yup
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
trautwein has joined #ruby
sanscoeur has quit [Remote host closed the connection]
bronson has joined #ruby
<vutral|kali> how do i get the results from a regular expression match
<mattwc> vutral|kali: match returns an array of matches https://ruby-doc.org/core-2.2.0/Regexp.html#method-i-match
ta_ has quit [Ping timeout: 260 seconds]
darkhanb has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
ta_ has joined #ruby
<rubycoder38> mattwc: I tried to do that but it didn't work, I don't think I can do target_currency = currency, currency is the default currency (USD), target_currency can be BRL, etc, I have to be able to increase the amount to the user after converting with the target_currency and subtract my currency in USD
<rubycoder38> I'm a bit confused at this point, tbh
darkhanb_ has joined #ruby
<rubycoder38> that's why I added the if/else check
<mattwc> rubycoder38: only do that if target_currency is nil
darkhanb has quit [Ping timeout: 240 seconds]
hairui has joined #ruby
nowhereman_ has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hairui has quit [Ping timeout: 248 seconds]
kaspergrubbe has joined #ruby
<rubycoder38> woah, it's working
<rubycoder38> mattwc: thanks a lot
<mattwc> woohoo
nowhere_man has quit [Ping timeout: 240 seconds]
tefa2 has left #ruby [#ruby]
<mattwc> what the purpose of recipient currencies?
jenrzzz has joined #ruby
kaspergrubbe has quit [Client Quit]
<mattwc> so you couldn't transfer from BRL to USD then?
<mattwc> (or at least not do so with proper currency conversion)
<mattwc> looks like even USD to USD transfers might end up weird too
jeffreylevesque has quit [Ping timeout: 260 seconds]
<rubycoder38> it was ok before, now I can't do USD to USD
<rubycoder38> USD to BRL is working
<mattwc> yeah USD to BRL will work, basically your currency convert method needs to know the source and destination currency
<mattwc> the when "USD" case doesn't really make sense since price will always end up as $1
guns has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewmcmillan has joined #ruby
<rubycoder38> oh, right
<rubycoder38> so like if Currency#convert target_currency=nil and source_currency then price = price, don't do anything in that case?
jaequery has joined #ruby
<mattwc> If I was designing the function, I'd force Currency#convert to take source and destination currency and not allow either to be nil
jaequery has quit [Client Quit]
<rubycoder38> I'm not sure why I created recipient_currencies, I think it was to see if it contained the sender_currency
<rubycoder38> but it can be deleted now
<rubycoder38> it was for the if/else it had before
hairui has joined #ruby
<rubycoder38> mattwc: sounds like a good idea, I'll try that
<rubycoder38> I don't know why I always end up overcomplicating things... sigh
ta_ has quit [Ping timeout: 240 seconds]
<rubycoder38> I might need a lobotomy
* vutral|kali ectomizes rubycoder38
<rubycoder38> :P
ta_ has joined #ruby
hairui has quit [Ping timeout: 248 seconds]
bigblind has joined #ruby
<rubycoder38> something I miss from python is adb, I like going back and forth with n/next in the repl
<rubycoder38> I never thought I'd say that
<mattwc> have you taken a look at pry and pry-nav?
<rubycoder38> s/adb/pdb/
<rubycoder38> I'll have a look at pry-nav, I've used pry before
<rubycoder38> ty
<mattwc> it adds next / continue / step to pry
<rubycoder38> nice
<mattwc> and then some unit tests on things like Currency#convert would probably be useful
hairui has joined #ruby
<rubycoder38> yes, I'll add that
<rubycoder38> when I started the project I was told I should write only plain ruby code but it turned out to be a pain without a way to have data persistency, so I used sequel
<rubycoder38> I might have to write a rake task to import the CSV also
<rubycoder38> sequel is nice
guns has quit [Quit: guns]
hairui has quit [Ping timeout: 248 seconds]
jaequery has joined #ruby
hairui has joined #ruby
bronson has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
bow__ has joined #ruby
bow__ has quit [Quit: Leaving]
comet23 has joined #ruby
comet23 has left #ruby [#ruby]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubycoder38> mattwc: this does the trick for converting currency: https://gist.github.com/anonymous/1df87950fba4082be0978b2b971cdad4
<rubycoder38> but there might be a better way to do it
<rubycoder38> I can convert from USD to BRL and vice versa, and USD to USD works fine also
<mattwc> yeah, without some sort of api, you're basically going to need to store a mapping of all the exchange rates
<rubycoder38> yep
<rubycoder38> thanks a lot for your help
<mattwc> happy to help
<rubycoder38> 3 runs, 6 assertions, 0 failures, 0 errors, 0 skips
<rubycoder38> my tests are still passing
<mattwc> woohoo
<rubycoder38> ha! my currency conversion code is broken
<rubycoder38> err
<rubycoder38> my tests
nnutter has joined #ruby
<rubycoder38> 2 runs, 0 assertions, 0 failures, 2 errors, 0 skips
<rubycoder38> I'll have to fix that
<rubycoder38> I just started using minitest today, it's great
nnutter has quit [Remote host closed the connection]
konsolebox has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baweaver is now known as baweaver_away
<rubycoder38> 2 runs, 2 assertions, 0 failures, 0 errors, 0 skips
sanscoeur has joined #ruby
<rubycoder38> fixed
jaequery has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
hairui has quit [Quit: Lost terminal]
jaequery has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
KeyJoo has joined #ruby
ta_ has joined #ruby
workmad3 has joined #ruby
aguestuser has quit [Remote host closed the connection]
aguestuser has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
dviola has quit [Quit: WeeChat 2.0.1]
KeyJoo has quit [Remote host closed the connection]
IceBurg has joined #ruby
IceBurg has left #ruby [#ruby]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShekharReddy has joined #ruby
gary has joined #ruby
LocaMocha has joined #ruby
gary is now known as Guest34861
bronson has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
apparition has joined #ruby
troys has quit [Quit: Bye]
ta_ has quit [Ping timeout: 240 seconds]
baweaver_away is now known as baweaver
ta_ has joined #ruby
mtkd has joined #ruby
apparition has quit [Quit: Bye]
sanscoeur has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
AX31_A13X has joined #ruby
bronson has joined #ruby
AxelAlex has quit [Ping timeout: 256 seconds]
elcontrastador has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 240 seconds]
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Mia has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 260 seconds]
kapil___ has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
bigblind has quit [Ping timeout: 248 seconds]
Axy has quit [Ping timeout: 240 seconds]
biberu has joined #ruby
apparition has joined #ruby
biberu has quit [Client Quit]
biberu has joined #ruby
armyriad has joined #ruby
jnollette has quit [Ping timeout: 255 seconds]
_whitelogger has joined #ruby
_whitelogger has joined #ruby
workmad3 has joined #ruby
devil_tux has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
nowhere_man has joined #ruby
alex`` has joined #ruby
nowhereman_ has quit [Ping timeout: 256 seconds]
za1b1tsu has joined #ruby
bronson has joined #ruby
elcontrastador has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
reber has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
Guest34861 has quit [Ping timeout: 256 seconds]
marr has joined #ruby
dionysus69 has joined #ruby
desperek has joined #ruby
conta has joined #ruby
gary has joined #ruby
gary is now known as Guest20060
Guest20060 has quit [Ping timeout: 265 seconds]
lunarkitty7 has quit [Ping timeout: 260 seconds]
gary_ has joined #ruby
gary_ is now known as Guest38794
clemens3 has joined #ruby
bigblind has joined #ruby
bigblind has quit [Read error: Connection reset by peer]
Guest38794 has quit [Ping timeout: 256 seconds]
nadir has quit [Quit: Connection closed for inactivity]
alex`` has quit [Quit: WeeChat 2.0.1]
bigblind has joined #ruby
bronson has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
bigblind has quit [Quit: Ping timeout (120 seconds)]
bigblind has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
bigblind has quit [Quit: Ping timeout (120 seconds)]
bigblind has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
Dbugger has joined #ruby
bigblind has quit [Client Quit]
bigblind has joined #ruby
bigblind has quit [Read error: Connection reset by peer]
despai has joined #ruby
gary has joined #ruby
gary is now known as Guest16877
bronson has joined #ruby
amatas has joined #ruby
Guest16877 has quit [Ping timeout: 256 seconds]
bronson has quit [Ping timeout: 248 seconds]
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
snickers has joined #ruby
ianfleeton has joined #ruby
despai has quit [Quit: ...]
workmad3 has joined #ruby
despai has joined #ruby
despai has quit [Client Quit]
za1b1tsu has joined #ruby
ianfleeton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 255 seconds]
ianfleeton has joined #ruby
ianfleeton has quit [Client Quit]
elementaru has joined #ruby
jnyw has quit [Quit: WeeChat 2.0.1]
gary_ has joined #ruby
gary_ is now known as Guest12257
sameerynho has joined #ruby
Guest12257 has quit [Ping timeout: 264 seconds]
conta has quit [Remote host closed the connection]
banisterfiend has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dbugger has quit [Quit: Leaving]
jeffreylevesque has joined #ruby
conta has joined #ruby
alex`` has joined #ruby
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
jeffreylevesque has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
thinkpad has quit [Quit: lawl]
kapil___ has quit [Quit: Connection closed for inactivity]
thinkpad has joined #ruby
thinkpad has quit [Client Quit]
gary has joined #ruby
gary is now known as Guest51299
flak has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
rippa has quit [Read error: Connection reset by peer]
snickers has quit [Read error: Connection reset by peer]
xMopx has quit [Excess Flood]
xMopx has joined #ruby
Guest51299 has quit [Ping timeout: 240 seconds]
RougeR has quit [Ping timeout: 248 seconds]
thinkpad has joined #ruby
macobo has joined #ruby
sameerynho has quit [Ping timeout: 276 seconds]
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mtkd has quit [Ping timeout: 240 seconds]
macobo has quit [Client Quit]
macobo has joined #ruby
macobo has quit [Client Quit]
Mia has quit [Read error: No route to host]
mtkd has joined #ruby
Xiti` has joined #ruby
gary_ has joined #ruby
gary_ is now known as Guest86097
jidar_ has joined #ruby
FifthWall_ has joined #ruby
jidar has quit [Read error: Connection reset by peer]
nicoulaj has quit [Quit: Ping timeout (120 seconds)]
phage has quit [Ping timeout: 256 seconds]
LBRapid has quit [Ping timeout: 256 seconds]
dminuoso has quit [Ping timeout: 256 seconds]
FifthWall has quit [Ping timeout: 256 seconds]
vqrs has quit [Ping timeout: 256 seconds]
linetrace has quit [Read error: Connection reset by peer]
raatiniemi has quit [Quit: No Ping reply in 180 seconds.]
NightMonkey has quit [Ping timeout: 256 seconds]
mrBen2k2k2k_ has quit [Remote host closed the connection]
mrBen2k2k2k has quit [Remote host closed the connection]
FifthWall_ is now known as FifthWall
jidar_ is now known as jidar
vqrs has joined #ruby
raatiniemi has joined #ruby
dminuoso has joined #ruby
LBRapid has joined #ruby
phage has joined #ruby
phage has joined #ruby
phage has quit [Changing host]
NightMonkey has joined #ruby
LBRapid is now known as Guest89206
nicoulaj has joined #ruby
Guest86097 has quit [Ping timeout: 240 seconds]
Gabemo has quit [Ping timeout: 240 seconds]
Xiti has quit [Ping timeout: 256 seconds]
`derpy has quit [Ping timeout: 256 seconds]
helpa has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 240 seconds]
linetrace has joined #ruby
marahin has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
marahin has joined #ruby
baweaver has joined #ruby
marahin is now known as Guest62818
SirFunk has quit [Ping timeout: 256 seconds]
baweaver is now known as Guest75431
Gabemo has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 276 seconds]
SirFunk has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
conta has quit [Remote host closed the connection]
gary has joined #ruby
`derpy has joined #ruby
gary is now known as Guest48586
dinfuehr has joined #ruby
izaac has joined #ruby
PaulePan1er has joined #ruby
DEac-_ has joined #ruby
lagweezl1_away has joined #ruby
drewmcmillan has joined #ruby
cout_ has joined #ruby
mkroman_ has joined #ruby
drewmcmillan has quit [Client Quit]
Guest48586 has quit [Ping timeout: 255 seconds]
sriehl_ has joined #ruby
apparition has joined #ruby
Cu5tosLim3n has joined #ruby
Junaos_ has joined #ruby
canton7_ has joined #ruby
soahccc_ has joined #ruby
Derperpe- has joined #ruby
vutral|kali has quit [*.net *.split]
lagweezle_away has quit [*.net *.split]
Junaos has quit [*.net *.split]
cout has quit [*.net *.split]
canton7 has quit [*.net *.split]
soahccc has quit [*.net *.split]
varesa| has quit [*.net *.split]
izaac_ has quit [*.net *.split]
mkroman has quit [*.net *.split]
Cu5tosLimen has quit [*.net *.split]
DEac- has quit [*.net *.split]
Derperperd has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
nettie has quit [*.net *.split]
PaulePanter has quit [*.net *.split]
redondos has quit [*.net *.split]
sriehl has quit [*.net *.split]
canton7_ is now known as canton7
mkroman_ is now known as mkroman
varesa_ has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
funnel has quit [Ping timeout: 240 seconds]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
mendel has quit [Quit: Connection closed for inactivity]
dinfuehr has joined #ruby
dviola has joined #ruby
funnel has joined #ruby
za1b1tsu has quit [Quit: Leaving]
coffeejunk has joined #ruby
drewmcmillan has joined #ruby
hfp_work has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
workmad3 has quit [Ping timeout: 265 seconds]
gary_ has joined #ruby
gary_ is now known as Guest86654
Guest86654 has quit [Ping timeout: 276 seconds]
shinnya has quit [Ping timeout: 248 seconds]
konsolebox has quit [Ping timeout: 265 seconds]
al2o3-cr has joined #ruby
konsolebox has joined #ruby
ramfjord has joined #ruby
vutral|kali has quit [Read error: Connection reset by peer]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
ramfjord has quit [Ping timeout: 240 seconds]
soahccc_ is now known as soahccc
Guest32242 has quit [Read error: Connection reset by peer]
leitz has joined #ruby
konsolebox has quit [Ping timeout: 260 seconds]
<leitz> Is anyone else compiling Ruby dev from source?
<gizmore> all those who use rbenv and alike maybe? not sure but i remember rvbenv took a while to compile and install ruby for me
<gizmore> and i compile it with gentoo from time to time :)
<leitz> I'm hitting an autoconf version issue running CentOS 6.
apeiros has joined #ruby
<leitz> The source from 8 Feb (US) worked, today's doesn't.
<gizmore> so autoconf is outdated now?
bigblind has joined #ruby
jeffreylevesque has joined #ruby
cadillac_ has joined #ruby
gary has joined #ruby
gary is now known as Guest81374
konsolebox has joined #ruby
<Yxhuvud> centos 6? isn't that pretty damned old?
Guest81374 has quit [Ping timeout: 248 seconds]
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
<leitz> Yxhuvud, yes, but not EOL. And a lot better that anything with systemd.
ineb has joined #ruby
howdoi has joined #ruby
despai has joined #ruby
redondos has joined #ruby
jnollette has quit [Ping timeout: 255 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
<leitz> Ah. so there's a funny. I had installed a new version of Autoconf a while back. Last week I cleaned it out since I wasn't using it. Or so I thought...
<leitz> Hrmph.
cliq has joined #ruby
raynold has joined #ruby
jnollette has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
<leitz> Of course, the version of autoconf it wants is about 7 years old.
gary_ has joined #ruby
gary_ is now known as Guest41829
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goatish has joined #ruby
mengu has joined #ruby
pheeo has joined #ruby
<mengu> hi
<mengu> is anyone using parslet?
Guest41829 has quit [Ping timeout: 265 seconds]
goatish has quit [Quit: bye]
nettie has joined #ruby
shinnya has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
al2o3-cr has joined #ruby
chouhoulis has joined #ruby
despai has quit [Ping timeout: 240 seconds]
mitt3ns has joined #ruby
mrBen2k2k2k__ has joined #ruby
agent_white has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
gary has joined #ruby
gary is now known as Guest80207
dviola has quit [Read error: Connection reset by peer]
dviola has joined #ruby
Guest80207 has quit [Ping timeout: 260 seconds]
dviola has quit [Changing host]
dviola has joined #ruby
drewmcmillan has joined #ruby
nowhere_man has quit [Quit: Konversation terminated!]
za1b1tsu has joined #ruby
nowhere_man has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
apeiros has quit []
<rubycoder38> is there a nicer way to write this? https://gist.github.com/anonymous/e174e0b9fed1dc2023823578238bf4f2
nowhereman_ has joined #ruby
gary_ has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
gary_ is now known as Guest43018
roshanavand has joined #ruby
Guest43018 has quit [Ping timeout: 265 seconds]
RougeR has quit [Ping timeout: 256 seconds]
RougeR has joined #ruby
despai has joined #ruby
<elomatreb> rubycoder38: I'd move the assignment outside of the if, but otherwise I don't think there's a (simple) way to improve that without obscuring the behavior needlessly
mitt3ns has quit [Quit: bai]
<hanmac> hm i don't think that the ones TO USD is correct
<gizmore> one should only have one table of CUR2EUR or CUR2USD.... and then you have todo 2 convert calls easily?
andydna has joined #ruby
gary__ has joined #ruby
<andydna> why can't i interrupt this: ruby -e "[1,2,3].cycle.count"
<rubycoder38> elomatreb: assignment outside of the if? how else can I assign the new value when converting to the price?
<rubycoder38> I'm not sure what you mean
<elomatreb> If blocks are expressions, you can do `price = if ... else ...`
<andydna> ruby -e "[1,2,3].cycle.count" just hangs and eats CPU, ought to be able to ctrl-C or ctrl-D it to death
DLSteve has joined #ruby
<elomatreb> andydna: You can kill -9 it if Ctrl+C doesn't work
gary__ has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
jnollette has quit [Ping timeout: 255 seconds]
<andydna> yeah, that works. but why? why doesn't count trap/handle an INT?
devil_tux has quit [Ping timeout: 248 seconds]
jnollette has joined #ruby
govg has quit [Ping timeout: 256 seconds]
<gizmore> andydna: somehwhere a catchall?
<elomatreb> Probably something very internal to the VM, don't know, sorry.
alex`` has quit [Ping timeout: 252 seconds]
<andydna> no need to apologize. thanks for responding
roshanavand has quit [Ping timeout: 265 seconds]
vutral|kali has quit [Ping timeout: 268 seconds]
bigblind has quit [Ping timeout: 268 seconds]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
elcontrastador has quit [Ping timeout: 240 seconds]
sameerynho has joined #ruby
marr has quit [Ping timeout: 248 seconds]
gary has joined #ruby
gary is now known as Guest87046
cliq has quit [Ping timeout: 260 seconds]
Guest87046 has quit [Ping timeout: 256 seconds]
PaulePan1er is now known as PaulePanter
gary_ has joined #ruby
gary_ is now known as Guest62697
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
RougeR has quit [Ping timeout: 240 seconds]
Guest62697 has quit [Ping timeout: 260 seconds]
mtkd has quit []
nadir has joined #ruby
konsolebox has quit [Ping timeout: 265 seconds]
apparition has joined #ruby
konsolebox has joined #ruby
AX31_A13X has quit [Remote host closed the connection]
AX31_A13X has joined #ruby
alex`` has joined #ruby
mtkd has joined #ruby
snath has quit [Ping timeout: 248 seconds]
al2o3-cr has quit [Quit: WeeChat 2.0.1]
mengu has quit [Remote host closed the connection]
remix2000 has joined #ruby
gr33n7007h has joined #ruby
za1b1tsu has quit [Quit: Leaving]
mtkd has quit []
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
andydna has quit [Remote host closed the connection]
mtkd has joined #ruby
gary__ has joined #ruby
m27frogy has quit [Quit: ZNC - http://znc.in]
gary__ has quit [Ping timeout: 248 seconds]
mtkd has quit []
troulouliou_dev has joined #ruby
tomlukeywood has joined #ruby
tomlukeywood has quit [Client Quit]
zsoc has left #ruby ["Leaving"]
hfp_work has joined #ruby
gary has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gary is now known as Guest88528
tomlukeywood has joined #ruby
bmurt has joined #ruby
Guest88528 has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
roshanavand has joined #ruby
X-Jester has joined #ruby
<X-Jester> is it considered bad practice to use something like modules/include mixins to neatly organize your class/instance methods? for example, to keep the base class definition simpler, is it bad practice to put those methods in other files as modules and include them in your class definition?
gary_ has joined #ruby
tomlukeywood has quit [Remote host closed the connection]
gary_ is now known as Guest76349
chickenoncow has joined #ruby
Guest76349 has quit [Ping timeout: 240 seconds]
mtkd has quit []
bigblind has joined #ruby
drewmcmillan has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
bmurt has quit [Client Quit]
jerryskye has quit [Quit: The Lounge - https://thelounge.github.io]
jerryskye has joined #ruby
mtkd has joined #ruby
bmurt has joined #ruby
rubycoder38 is now known as caoraivoso
snath has joined #ruby
jerryskye has quit [Quit: The Lounge - https://thelounge.github.io]
OyoKooN has joined #ruby
jerryskye has joined #ruby
n0m4d1c has joined #ruby
jerryskye has quit [Client Quit]
roshanavand has quit [Ping timeout: 265 seconds]
jerryskye has joined #ruby
mtkd has quit []
orbyt_ has joined #ruby
marr has joined #ruby
yokel has joined #ruby
gary has joined #ruby
gary is now known as Guest75105
sameerynho has quit [Ping timeout: 276 seconds]
roshanavand has joined #ruby
Guest75105 has quit [Ping timeout: 256 seconds]
pheeo has quit [Ping timeout: 260 seconds]
plexigras has quit [Ping timeout: 240 seconds]
bow__ has joined #ruby
yokel has quit [Quit: Reconnecting]
plexigras has joined #ruby
X-Jester has left #ruby [#ruby]
bow__ has quit [Client Quit]
Mike11 has joined #ruby
<ineb> modules are usually meant to be usable for multiple classes
bow__ has joined #ruby
m27frogy has joined #ruby
<ineb> if you make a module only to include it once just to make your one class look smaller then you probably designed your class wrong
<ineb> and should opt for multiple classes to neatly organize your code
bigblind has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yokel has joined #ruby
OyoKooN has quit [Quit: Textual IRC Client: www.textualapp.com]
OyoKooN has joined #ruby
OyoKooN has quit [Quit: Textual IRC Client: www.textualapp.com]
OyoKooN has joined #ruby
chouhoulis has quit [Remote host closed the connection]
plexigras has quit [Ping timeout: 255 seconds]
mtkd has quit []
gary_ has joined #ruby
gary_ is now known as Guest36961
railswebdev has quit [Quit: Textual IRC Client: www.textualapp.com]
plexigras has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
Guest36961 has quit [Ping timeout: 256 seconds]
<caoraivoso> I'm trying to make my Currency class more flexible: https://gist.github.com/anonymous/6beffaa863c19c8465a80dcd4388f86f
apparition has quit [Quit: Bye]
<caoraivoso> I think there will be problems if I try to exchange BRL to EUR for example
OyoKooN has quit [Quit: Textual IRC Client: www.textualapp.com]
<caoraivoso> but I don't want to add a list of all combinations to the case
<caoraivoso> any ideas how to solve this problem?
herbmillerjr has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
tomlukeywood has joined #ruby
bigblind has joined #ruby
mtkd has joined #ruby
bmurt has joined #ruby
apeiros_ has joined #ruby
bmurt has quit [Client Quit]
bmurt has joined #ruby
gary has joined #ruby
gary is now known as Guest78682
<caoraivoso> maybe I can use the money gem
LocaMocha is now known as Sauvin
<gizmore> maybe you should
<caoraivoso> btw, I'm rubycoder37, this is my new nick, it means angry dog in portuguese
<apeiros_> so we shouldn't help you, lest we get bitten? :D
<caoraivoso> no, I don't bite
<apeiros_> oh you're one of the tiny angry dogs which just bark but don't bite?
apeiros_ is now known as apeiros
<caoraivoso> "dog that barks doesn't bite", never heard of this phrase?
<gr33n7007h> caoraivoso: what does lua mean in portugese :P
<caoraivoso> moon
<gr33n7007h> :)
Guest78682 has quit [Ping timeout: 256 seconds]
<caoraivoso> apeiros: not sure about that
chouhoulis has joined #ruby
despai has quit [Quit: ...]
<gr33n7007h> tiny dogs are little ankle biters
<caoraivoso> ok I'll go back to my other nick, because it's nicer
caoraivoso is now known as rubycoder38
<rubycoder38> hrm
<gr33n7007h> as with line 13
<apeiros> oh hi hanmac o/
<apeiros> long time since I last saw you
<hanmac> i am there i am just silent, i am mostly reading bugs.ruby-lang.org and laugh at rejected requests
<hanmac> like one of my favs: "Create new method String#symbol? and deprecate Symbol class" ;P
<rubycoder38> hanmac: do you have any better idea of how I can write this code?
<rubycoder38> I'm not sure what I'm doing wrong
<rubycoder38> I'll have to take a closer look
bow__ has quit [Remote host closed the connection]
<hanmac> @rubycoder38: the case when looks okay for the given amount of data, just " price = (amount / price)" where "price = amount" always returns 1.0 because of "price = amount / amount"
jamesaxl has joined #ruby
jordanm has joined #ruby
<rubycoder38> oh
<rubycoder38> I'd like to replace this code entirely because it's not flexible
chouhoulis has quit [Remote host closed the connection]
<apeiros> rubycoder38: are you rubycoder37's sibling?
<rubycoder38> apeiros: no, I turned 38 on January 24th
<rubycoder38> I need to figure out a way to change my nick permanently
<apeiros> could call yourself rubycoder1980
huyderman has quit [Read error: Connection reset by peer]
mtkd has quit []
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubycoder38> that makes me feel older for some reason
<rubycoder38> but yes, it's a good idea
mtkd has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
gary has joined #ruby
za1b1tsu has joined #ruby
gary is now known as Guest73421
houhoulis has joined #ruby
nowhere_man has joined #ruby
Guest73421 has quit [Ping timeout: 240 seconds]
nowhereman_ has quit [Ping timeout: 276 seconds]
tvw has joined #ruby
<rubycoder38> I don't like being older, this means you can't drink all the coffee you want without worrying about having a stroke
<gr33n7007h> drink beer instead
<gr33n7007h> it thins your blood
<rubycoder38> I didn't know beer did that
<rubycoder38> interesting
Ltem has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
<rubycoder38> hanmac: this seems to work better: https://gist.github.com/anonymous/745c9aac18999d6b2e3cfa9004ef3072
bigblind has quit [Ping timeout: 268 seconds]
shinnya has joined #ruby
minimalism has quit [Quit: minimalism]
<havenwood> Update your RubyGems to patch vulnerabilities: gem update --system
mtkd has quit []
chickenoncow has quit [Remote host closed the connection]
chickenoncow has joined #ruby
mtkd has joined #ruby
gary_ has joined #ruby
gary_ is now known as Guest90467
<rubycoder38> when will ruby ship with bundler?
<apeiros> manana
Guest90467 has quit [Ping timeout: 240 seconds]
cliq has joined #ruby
<rubycoder38> arigato
<Yxhuvud> slowly, they are adding the functionality to rubygems if I understood it correctly, but I havn't heard anything for along time
troulouliou_dev has quit [Quit: Leaving]
Mike11 has quit [Quit: Leaving.]
gary__ has joined #ruby
Mike11 has joined #ruby
Dimik has joined #ruby
c0ncealed has quit [Remote host closed the connection]
mtkd has quit []
c0ncealed has joined #ruby
cdg has joined #ruby
gary__ has quit [Ping timeout: 240 seconds]
gary__ has joined #ruby
<hanmac> ruby 2.5 already has dependency for bundler inside (it is done via git-submodule)
mtkd has joined #ruby
<rubycoder38> I like how matz says "in return" here: https://youtu.be/1l3U1X3z0CE?t=4m1s
apeiros has quit [Remote host closed the connection]
gary__ has quit [Ping timeout: 265 seconds]
gary has joined #ruby
gary is now known as Guest74984
Quintasan has quit [Remote host closed the connection]
AJA4350 has quit [Ping timeout: 240 seconds]
Guest74984 has quit [Ping timeout: 248 seconds]
gary_ has joined #ruby
gary_ is now known as Guest45275
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
Guest45275 has quit [Ping timeout: 256 seconds]
gizmore has quit [Ping timeout: 264 seconds]
gizmore has joined #ruby
AJA4350 has joined #ruby
gary__ has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
alex`` has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
tomlukeywood has quit [Remote host closed the connection]
gary__ has quit [Ping timeout: 264 seconds]
gary__ has joined #ruby
m27frogy has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
m27frogy has joined #ruby
gary__ has quit [Ping timeout: 256 seconds]
gary__ has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
dionysus69 has quit [Quit: dionysus69]
gary__ has quit [Ping timeout: 248 seconds]
gary__ has joined #ruby
<rubycoder38> how can he claim WalletCentral.transfer when transfer is an instance method?
<rubycoder38> and not a class method
<Guest75431> Comments are not required to be accurate
Guest75431 is now known as baweaver
jcalla has joined #ruby
baweaver has quit [Changing host]
baweaver has joined #ruby
<rubycoder38> yes, but it's still misleading/confusing
<baweaver> Welcome to programming
<baweaver> Comments can be very misleading or wholly inaccurate
<baweaver> question is: you going to open a PR to fix that?
<rubycoder38> developers should be less careless
<rubycoder38> no
<rubycoder38> but I get angry when people are careless like this, that's why my second nickname is caoraivoso
AX31_A13X has quit [Remote host closed the connection]
gary__ has quit [Ping timeout: 268 seconds]
armando_ has quit [Quit: ZNC 1.7.x-nightly-20171128-66897057 - https://znc.in]
houhoulis has quit [Remote host closed the connection]
houhoulis has joined #ruby
jeffreylevesque has quit [Ping timeout: 276 seconds]
gary has joined #ruby
gary is now known as Guest57454
Guest57454 has quit [Ping timeout: 256 seconds]
gary_ has joined #ruby
bigblind has joined #ruby
gary_ is now known as Guest51309
gizmore has quit [Ping timeout: 260 seconds]
gizmore has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has quit [Ping timeout: 240 seconds]
Guest51309 has quit [Ping timeout: 248 seconds]
armando has joined #ruby
mrBen2k2k2k has joined #ruby
gary__ has joined #ruby
jamesaxl has quit [Quit: WeeChat 2.0.1]
darkhanb_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has joined #ruby
gary__ has quit [Ping timeout: 240 seconds]
gary__ has joined #ruby
kith has joined #ruby
kapil___ has joined #ruby
dviola has quit [Ping timeout: 240 seconds]
<gr33n7007h> reboot
gr33n7007h has quit [Quit: WeeChat 2.0.1]
Mike11 has quit [Quit: Leaving.]
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
lunarkitty7 has joined #ruby
<baweaver> rubycoder38: *complains about something being wrong* going to do anything about it? *continues to complain* well ok then
biberu has quit []
bigblind has quit [Ping timeout: 260 seconds]
gary__ has quit [Ping timeout: 240 seconds]
gary__ has joined #ruby
neo95 has joined #ruby
mtkd has quit []
gary__ has quit [Ping timeout: 260 seconds]
bigblind has joined #ruby
shinnya has quit [Ping timeout: 276 seconds]
darkhanb has joined #ruby
prutheus has joined #ruby
nowhereman_ has joined #ruby
<prutheus> Hello. I want to merge two arrays like this: [[1,2], [3,4]] with [[3,4], [5,6]] should get [[1,2,3,4], [3,4,5,6]]
<prutheus> how is this possible?
nowhere_man has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
hndk has joined #ruby
<al2o3-cr> prutheus: a1.flatten.zip(a2.flatten).transpose
<prutheus> what the hell :D
<prutheus> i know what flatten does and zip
<prutheus> but what does transpose?
<al2o3-cr> &ri Array#transpose prutheus
<apeiros> prutheus: a1.zip(a2) { |a,b| a+b }
<prutheus> ahh yeah, cool, thanks
<balo> how about [a.flatten, b.flatten] ?
<apeiros> oh wait, your example is rather ambiguous
<apeiros> [[1,2], [3,4]] with [[:a,:b], [:c,:d]] should get [[1,2,:a,:b], [3,4,:c,:d]] or [[1,2,3,4], [:a, :b, :c, :d]]?
gary has joined #ruby
_aeris_ has quit [Remote host closed the connection]
<apeiros> (both fit your example, hence ambiguous)
gary is now known as Guest8851
<al2o3-cr> balo: good answer, was just giving some sending some love =)
agent_white has joined #ruby
Guest8851 has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
gary_ has joined #ruby
jeffreylevesque has joined #ruby
gary_ is now known as Guest15776
jcalla has quit [Quit: Leaving]
Guest15776 has quit [Ping timeout: 240 seconds]
tvw has quit [Ping timeout: 255 seconds]
gary__ has joined #ruby
<prutheus> next question: a one liner for doing following: I have a number (e.g. 2) and want to generate an array from it like this: ['1', '2']
yorickpeterse has joined #ruby
<yorickpeterse> apeiros: ping
<yorickpeterse> oh hm now that I think of it, #ruby-offtopic is probably better :P
<go|dfish> prutheus: (1..n).to_a
<prutheus> nice thanks. man, what am i doing this evening ... my brain is off i think
<apeiros> yorickpeterse: pong & indeed :D
jnyw has joined #ruby
Ltem has quit [Quit: good night]
RougeR has joined #ruby
amatas has quit [Ping timeout: 265 seconds]
raynold has joined #ruby
xfbs has joined #ruby
jeffreylevesque has quit [Ping timeout: 268 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
mniip has quit [Ping timeout: 256 seconds]
roshanavand has quit [Ping timeout: 276 seconds]
houhoulis has quit []
mooe has joined #ruby
al2o3-cr has joined #ruby
prutheus has quit [Quit: Page closed]
devil_tux has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vutral|kali has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby
jerikl has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
shinnya has joined #ruby
neo95 has quit [Quit: Leaving]
neo95 has joined #ruby
drewmcmillan has joined #ruby
mrush has quit [Ping timeout: 240 seconds]
mtkd has quit []
orbyt_ has joined #ruby
CBebop has joined #ruby
dviola has joined #ruby
rubycoder38 has quit [Quit: leaving]
houhoulis has joined #ruby
friday has left #ruby ["Textual IRC Client: www.textualapp.com"]
neo95 has quit [Remote host closed the connection]