ChanServ changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ https://irclog.whitequark.org/ruby/
zacts has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<matthewd> imcodingideas: What happens when you run that?
Nick_ZWG has left #ruby ["Textual IRC Client: www.textualapp.com"]
the_rhizo2 has quit [Ping timeout: 244 seconds]
<imcodingideas> @mattewd 26:in `<main>': undefined method `food_group'
karapetyan has joined #ruby
dr0lan has quit [Quit: WeeChat 1.0.1]
Torrone has joined #ruby
<BrianJ> jgnagy: thanks for the response. I don't want to update the same resource. I want to add a different score for each one of the 5 reportchecks
pwnd_nsfw has joined #ruby
symm- has joined #ruby
hutch34 has joined #ruby
crissae_ has quit [Read error: Connection reset by peer]
crissae_ has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
the_rhizo2 has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
Torrone has quit [Quit: This computer has gone to sleep]
swills has joined #ruby
the_rhizo2 has quit [Ping timeout: 276 seconds]
nankyokusei has joined #ruby
mikeliss has joined #ruby
mikeliss has quit [Client Quit]
nankyokusei has quit [Ping timeout: 265 seconds]
bruce_lee has quit [Remote host closed the connection]
hahuang61 has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dysp has quit [Ping timeout: 264 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
jeanlinux has joined #ruby
RedNifre has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
zacts has quit [Ping timeout: 265 seconds]
RedNifre_ has quit [Ping timeout: 264 seconds]
jeanlinux has quit [Ping timeout: 265 seconds]
aries_liuxueyang has quit [Ping timeout: 240 seconds]
symm- has quit [Quit: Leaving...]
aries_liuxueyang has joined #ruby
vdamewood has joined #ruby
symm- has joined #ruby
marr has quit [Ping timeout: 260 seconds]
Kyhz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
karapetyan has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 276 seconds]
<soulisson> When an exception occurs, the environment raises an exception object. Is that correct?
TheWhip has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
LoneHermit has quit [Remote host closed the connection]
karapetyan has joined #ruby
Asher has quit [Ping timeout: 265 seconds]
beilabs has joined #ruby
millerti has joined #ruby
moredhel has left #ruby ["WeeChat 0.3.8"]
LurkAshFlake has quit [Ping timeout: 250 seconds]
hays has joined #ruby
bihi has quit [Quit: Bye!]
hays has quit [Remote host closed the connection]
Asher has joined #ruby
the_rhizo2 has joined #ruby
hays has joined #ruby
bambanx has joined #ruby
<bambanx> hello
hays_ has joined #ruby
bihi has joined #ruby
hays_ has quit [Remote host closed the connection]
hays_ has joined #ruby
hays has quit [Ping timeout: 250 seconds]
qguv has quit [Read error: Connection reset by peer]
ElFerna83 has joined #ruby
qguv has joined #ruby
ElFerna83 has quit [Client Quit]
LoneHerm_ has joined #ruby
jgt has quit [Ping timeout: 240 seconds]
imcodingideas has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
LuckyABA has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eam has quit [Ping timeout: 244 seconds]
hays_ is now known as hays
leea has joined #ruby
brainfreeze has joined #ruby
QORRiE has quit [Quit: Leaving]
brainfreeze has left #ruby ["Leaving"]
brainfreeze has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gnufied has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 276 seconds]
karapetyan has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
Guest48269 is now known as saneax_AFK
millerti has joined #ruby
davedev24 has joined #ruby
stuartrexking has quit [Quit: leaving]
jeanlinux has joined #ruby
qguv has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
davedev24 has quit []
alfiemax has quit [Ping timeout: 240 seconds]
l4v2 has quit [Quit: l4v2]
blackmesa has joined #ruby
duncannz has joined #ruby
qguv has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhollinger has joined #ruby
jenrzzz has joined #ruby
qguv has quit [Ping timeout: 244 seconds]
cjbrambo has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cjbrambo has left #ruby ["Textual IRC Client: www.textualapp.com"]
blackmesa has quit [Ping timeout: 260 seconds]
Rickmasta has joined #ruby
scottbarr has joined #ruby
alfiemax has joined #ruby
<soulisson> Is there a way in Ruby to define the local port when doing TCPSocket?
<soulisson> TCPSocket.open to be more precise
Silthias has quit [Ping timeout: 252 seconds]
MrBusiness has joined #ruby
soulisson has quit [Quit: Quitte]
dhollinger has quit [Quit: WeeChat 1.4]
<havenwood> soul - ah, never mind they left
<havenwood> bambanx: hi
postmodern has joined #ruby
TheWhip has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 244 seconds]
<sqljunkey> http://pastebin.com/miFxUitu this code doesn't work for some reason, I'm trying to use the simple accessors
<ruby[bot]> sqljunkey: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/4337ced3fd58c54c0f0a4d82f183e798
<ruby[bot]> sqljunkey: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<sqljunkey> but it says I don't have permission
<leea> to post on gist?
A_Drone has joined #ruby
<havenwood> sqljunkey: Does the user you're running this with have permission to read?: ticker_list.txt
nankyokusei has joined #ruby
TheWhip has joined #ruby
scottbarr has quit [Ping timeout: 250 seconds]
<havenwood> sqljunkey: (You can omit the "r" since it's the default mode.)
JesseH has quit [Remote host closed the connection]
soulisson has joined #ruby
<soulisson> Sory disconnection issue, any one regarding my question?
<havenwood> soulisson: new(remote_host, remote_port, local_host=nil, local_port=nil)
<sqljunkey> yes. I have permission
<havenwood> sqljunkey: What's the error you're getting? Gist it?
r_rios has quit [Ping timeout: 258 seconds]
<soulisson> havenwood, thank you very much
<havenwood> soulisson: you're welcome!
<sqljunkey> NoMethodError: undefined method `ticker_names' for nil:NilClass
<sqljunkey> from stock_summary.rb:64
<sqljunkey> I do not know how to use gist yet
<sqljunkey> heh
<sqljunkey> shame on me
nankyokusei has quit [Ping timeout: 258 seconds]
Qommand0r has quit [Quit: Exiting...]
Dreamer3 has quit [Quit: Leaving...]
<sqljunkey> I jst placed a sample but yeah it's giving me an error where I call t.ticker_names.foreach do |tick|
millerti has joined #ruby
hahuang61 has joined #ruby
<soulisson> havenwood, I'm using this line sock = TCPSocket.new("192.168.1.253", 445, local_port=5556), the connection is established, but it uses a random local port
qguv has joined #ruby
<havenwood> soulisson: Local host is the third argument and local port is the fourth.
<soulisson> havenwood, but in this case I named the argument, so it shouldn't be an issue, no?
<sqljunkey> I did make the ticker_names accessible.... with attrb_accessor :ticker_names
<havenwood> soulisson: Naming arguments doesn't work that way. Regular arguments are indicated by position. There are keyword arguments now but these aren't those.
<havenwood> soulisson: TCPSocket.new("192.168.1.253", 445, nil, 5556)
<soulisson> havenwood, oh sorry, I thought those were keyword arguments like in python, sorry
beilabs has quit [Read error: Connection reset by peer]
Silthias has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
<havenwood> soulisson: no worries! keyword arguments look like: local_port: 5556
Qommand0r has joined #ruby
beilabs has joined #ruby
<soulisson> that's what happens when you assume things
<soulisson> havenwood, thanks
<sqljunkey> havenwood: any ideas : )
<havenwood> sqljunkey: The code you Gisted would result in: NoMethodError: undefined method `foreach' for []:Array
<havenwood> sqljunkey: Can you Gist the real code?
l4v2 has joined #ruby
nando293921 has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
soulisson has quit [Ping timeout: 240 seconds]
<sqljunkey> hah
<sqljunkey> yeah i figured it. each instead of foreach yarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
blackgoat has quit [Ping timeout: 244 seconds]
JesseH has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
blackmesa has joined #ruby
l4v2 has quit [Quit: l4v2]
blackmesa has quit [Ping timeout: 265 seconds]
l4v2 has joined #ruby
ramfjord_ has quit [Ping timeout: 252 seconds]
scottbarr has joined #ruby
tdy has quit [Quit: WeeChat 1.5]
<aidalgol> Has Test::Unit been deprecated in favour of minitest?
Rodya_ has joined #ruby
SCHAAP137 has quit [Quit: Exiting...]
tdy has joined #ruby
bad_ip has joined #ruby
tdy has quit [Client Quit]
<bambanx> havenwood, hey man how are you?
Pumukel has joined #ruby
dhollinger has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elifoster has quit [Ping timeout: 276 seconds]
Pumukel has quit [Ping timeout: 258 seconds]
dhollinger has quit [Client Quit]
dhollinger has joined #ruby
dunpeal has quit [Ping timeout: 240 seconds]
<havenwood> aidalgol: Nope, but Minitest is more widely used.
jenrzzz has quit [Ping timeout: 240 seconds]
<havenwood> bambanx: weekend'n
Rodya_ has quit [Remote host closed the connection]
<bambanx> that's mean? drinks , womans and alcohol? havenwood
<bambanx> :D
<havenwood> bambanx: Nope, Freyja's Day - I'm riding off on my chariot pulled by cats.
azor has joined #ruby
<bambanx> nice
beilabs has quit [Remote host closed the connection]
<bambanx> mine are feeding now
<bambanx> winter is comming
enterprisey has joined #ruby
aryaching has quit [Ping timeout: 244 seconds]
Rodya_ has joined #ruby
<bambanx> havenwood, do you live on north pole?
kobain has quit [Ping timeout: 260 seconds]
leea has joined #ruby
Psi-Jack has quit [Quit: Where'd my terminal go?]
dhollinger has quit [Quit: WeeChat 1.5]
Psi-Jack has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
gix has quit [Ping timeout: 265 seconds]
Rodya_ has quit [Quit: Leaving...]
gix has joined #ruby
Neoo has joined #ruby
Neobenedict has quit [Ping timeout: 258 seconds]
ec0 has quit [Ping timeout: 250 seconds]
A_Drone has quit [Remote host closed the connection]
qguv has quit [Quit: bye]
TheWhip has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
qguv has joined #ruby
arescorpio has quit [Quit: Leaving.]
blackmesa has joined #ruby
dhollinger has joined #ruby
nadir has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
moparisthebest has quit [Quit: ZNC - 1.6.0 - http://znc.in]
nando293921 has quit [Ping timeout: 265 seconds]
nadir has joined #ruby
elifoster has joined #ruby
pawnbox has joined #ruby
enterprisey has quit [Remote host closed the connection]
arquebus has joined #ruby
l4v2 has quit [Quit: l4v2]
bad_ip has quit [Ping timeout: 276 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
arquebus has quit [Quit: Page closed]
pawnbox has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
SteenJobs has joined #ruby
bjh13 has joined #ruby
johnny56_ has joined #ruby
moparisthebest has joined #ruby
Mission-Critical has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
nankyokusei has joined #ruby
jarred has joined #ruby
MissionCritical has joined #ruby
A_Drone has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
hk238 has joined #ruby
hahuang61 has joined #ruby
moparisthebest has quit [Ping timeout: 265 seconds]
jackjackdripper has joined #ruby
beilabs has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
Cohedrin has joined #ruby
pawnbox has joined #ruby
nofxx has quit [Ping timeout: 276 seconds]
A_Drone has quit [Remote host closed the connection]
nofxx has joined #ruby
tmtwd has joined #ruby
djbkd has joined #ruby
qguv has quit [Ping timeout: 258 seconds]
LoneHerm_ has quit [Remote host closed the connection]
beilabs has quit [Remote host closed the connection]
beilabs has joined #ruby
A_Drone has joined #ruby
qguv has joined #ruby
ec0 has joined #ruby
ramfjord has joined #ruby
MrBusiness2 has joined #ruby
MrBusiness has quit [Ping timeout: 250 seconds]
moparisthebest has joined #ruby
pawnbox has quit [Remote host closed the connection]
blackmesa has joined #ruby
pawnbox has joined #ruby
scottbarr has quit [Ping timeout: 244 seconds]
davedev24 has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
davedev24 has quit [Client Quit]
p0p0pr37_ has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 258 seconds]
A_Drone has quit [Remote host closed the connection]
p0p0pr37 has quit [Ping timeout: 244 seconds]
p0p0pr37_ is now known as p0p0pr37
MrBusiness2 has quit [Ping timeout: 250 seconds]
djbkd has quit [Quit: My people need me...]
tomchapi_ has joined #ruby
tomchapi_ has quit [Client Quit]
A_Drone has joined #ruby
MrBusiness2 has joined #ruby
the_rhizo2 has quit [Ping timeout: 265 seconds]
qguv has quit [Quit: bye]
beilabs has quit [Remote host closed the connection]
cd-rum has joined #ruby
qguv has joined #ruby
fgo has joined #ruby
ixti has quit [Ping timeout: 252 seconds]
scottbarr has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
cd-rum_ has joined #ruby
cd-rum has quit [Ping timeout: 244 seconds]
sameerynho has joined #ruby
dunpeal has joined #ruby
djbkd has joined #ruby
MrBusiness2 has joined #ruby
govg has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
banisterfiend has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
MrBusiness2 has quit [Ping timeout: 250 seconds]
MrBusiness2 has joined #ruby
tmtwd has quit [Ping timeout: 250 seconds]
yitsushi has quit [Quit: ZNC - http://znc.in]
dionysus69 has joined #ruby
tristanp has quit [Ping timeout: 276 seconds]
A_Drone has quit [Remote host closed the connection]
MrBusiness2 has quit [Ping timeout: 250 seconds]
MrBusiness2 has joined #ruby
djbkd has quit [Remote host closed the connection]
Vingador has joined #ruby
LoneHerm_ has joined #ruby
tdy has joined #ruby
A_Drone has joined #ruby
tdy has quit [Client Quit]
tdy has joined #ruby
beilabs has joined #ruby
joonty has joined #ruby
LoneHerm_ has quit [Ping timeout: 258 seconds]
LoneHer__ has joined #ruby
ramfjord has joined #ruby
MrBusiness3 has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
MrBusiness2 has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
MrBusiness3 has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
kavanagh has joined #ruby
mcqr has quit [Quit: WeeChat 1.4]
MrBusiness3 has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
MrBusiness2 has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
joonty has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
Silthias1 has joined #ruby
Vingador has quit [Remote host closed the connection]
gizmore has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
joonty has quit [Client Quit]
MrBusiness3 has joined #ruby
Silthias has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
bocaneri has joined #ruby
beilabs has quit [Remote host closed the connection]
MrBusiness2 has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 265 seconds]
Log1x has quit [Read error: Connection reset by peer]
bjh13 has quit [Remote host closed the connection]
kavanagh has quit [Quit: That's all folks!]
hahuang61 has joined #ruby
kavanagh has joined #ruby
Neobenedict has joined #ruby
Neobenedict has quit [Changing host]
Neobenedict has joined #ruby
Neoo has quit [Ping timeout: 276 seconds]
alfiemax has joined #ruby
MrBusiness2 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 250 seconds]
TheWhip has joined #ruby
TheWhip has quit [Remote host closed the connection]
bjh13 has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
TheWhip has joined #ruby
ec0 has quit [Ping timeout: 250 seconds]
MrBusiness3 has joined #ruby
MissionCritical has quit [Ping timeout: 276 seconds]
the_rhizo2 has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
jschmid has joined #ruby
MrBusiness2 has joined #ruby
joonty has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
Mission-Critical has joined #ruby
nikivi has joined #ruby
Log1x has joined #ruby
jschmid has quit [Remote host closed the connection]
the_rhizo2 has quit [Ping timeout: 276 seconds]
minotep has joined #ruby
A_Drone has quit [Remote host closed the connection]
beilabs has joined #ruby
TheWhip has quit [Remote host closed the connection]
joonty has quit [Quit: This computer has gone to sleep]
A_Drone has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
TheWhip has joined #ruby
MrBusiness3 has joined #ruby
unforgiven512 has quit [Ping timeout: 264 seconds]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
MrBusiness2 has quit [Ping timeout: 250 seconds]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
unforgiven512 has quit [Max SendQ exceeded]
joonty has joined #ruby
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
blackmesa has joined #ruby
Mission-Critical is now known as MissionCritical
jgnagy has quit [Remote host closed the connection]
unforgiven512 has joined #ruby
unforgiven512 has quit [Max SendQ exceeded]
unforgiven512 has joined #ruby
<djellemah> jhass: nicer than queue poisoning http://ruby-doc.org/core-2.3.0/Queue.html#method-i-close
bambanx has quit [Read error: Connection reset by peer]
<jhass> oh it's already there
<jhass> I never noticed
<djellemah> ;-)
pokalyis has quit [Read error: Connection reset by peer]
pokalyis has joined #ruby
<jhass> thank you
conta has joined #ruby
MrBusiness2 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Ping timeout: 250 seconds]
MrBusiness3 has quit [Ping timeout: 250 seconds]
alfiemax has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
harfangk has joined #ruby
elifoster has quit [Quit: sleep]
MrBusiness3 has joined #ruby
jarred has quit [Quit: Connection closed for inactivity]
joonty has quit [Quit: This computer has gone to sleep]
scottbarr has quit [Ping timeout: 240 seconds]
heysin has quit [Ping timeout: 258 seconds]
kiba_ has quit [Ping timeout: 250 seconds]
MrBusiness2 has quit [Ping timeout: 250 seconds]
kiba_ has joined #ruby
A_Drone has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
jeanlinu_ has joined #ruby
jeanlinux has quit [Ping timeout: 244 seconds]
tdy has quit [Quit: WeeChat 1.5]
pokalyis has quit [Read error: Connection reset by peer]
kedibasi has quit [Quit: kedibasi has no reason]
pokalyis has joined #ruby
blackgoat has joined #ruby
blackgoat has quit [Client Quit]
sumobob has joined #ruby
MrBusiness2 has joined #ruby
kus has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
MrBusiness3 has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
tdy has joined #ruby
dionysus69 has joined #ruby
the_rhizo2 has joined #ruby
icalo has joined #ruby
icalo is now known as ignazioc
SteenJobs has quit [Quit: SteenJobs]
lxsameer_ has joined #ruby
<ignazioc> Hi everyone. I never used IRC before and I’m looking for a different type of ruby community. Something like a forum or a facebook group. Does someone has a link or a suggestion?
the_rhizo2 has quit [Ping timeout: 260 seconds]
sameerynho has quit [Ping timeout: 240 seconds]
fgo has quit [Ping timeout: 265 seconds]
firstdayonthejob has joined #ruby
minotep has quit [Ping timeout: 244 seconds]
TheWhip has quit [Remote host closed the connection]
MrBusiness3 has quit [Ping timeout: 250 seconds]
cyphase has quit [Ping timeout: 252 seconds]
TheWhip has joined #ruby
ramfjord has joined #ruby
cyphase has joined #ruby
Bish has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
LoneHer__ has quit [Remote host closed the connection]
<jhass> metaruby.com, but why don't you give us a chance? ;)
karapetyan has joined #ruby
Z3N1T has quit [Read error: Connection reset by peer]
fgo has joined #ruby
<jhass> ignazioc: ^
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Z3N1T has joined #ruby
<ignazioc> jhass: I think it’s hard to follow multiple conversation or perform a search on a single chat.
tomphp has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
<ignazioc> btw I’m not a real gury with ruby but I like it and I wrote a client for quizlet.com https://github.com/ignazioc/QuizletNerdClient it’s still very very bad but I would like to receive some comments.
craysiii has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> that's why we don't scold you for asking something that came up before ;)
MrBusiness3 has joined #ruby
<jhass> you could make it a gem
yardenbar has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> ?styleguides ignazioc
<ruby[bot]> ignazioc: here are three popular styleguides, you should read and follow at least one: https://github.com/styleguide/ruby https://github.com/bbatsov/ruby-style-guide https://github.com/thoughtbot/guides/tree/master/style/ruby
<jhass> there's a tool called rubocop that automatically checks for the second one
<jhass> most importantly we name methods in snake_case, drop get_ prefixes, drop is_ prefixes and only append a ?, drop set_ prefixes and append a =
<ignazioc> nice suggestion. The second one is the longest one :D
<jhass> https://github.com/ignazioc/QuizletNerdClient/blob/master/quizlet.rb#L95-L100 I'd flip the branches here to get rid of the !
<jhass> (and also have the positive case first)
<jhass> relying on nil being falsey also isn't unseen, so unless response.error in this case, or PreferenceManager.client_id && PreferenceManager.app_secret further down
<jhass> https://github.com/ignazioc/QuizletNerdClient/blob/master/quizlet.rb#L172-L177 I'm not sure I follow why you spawn a thread here just to immediately join it
<ignazioc> I spawn a thread to listen on port 8080
<nofxx> [1,2,3,4] -> [[1,2], [1,3]...[4,3]] .... one array for each possible pair.... there's a meth in array for this no?
<ignazioc> doh :) that file shouldn’t be on git :D
<nofxx> I do want [1,2] and [2,1] .. not dups..
<jhass> yes but why don't you just listen on it in the main thread if all you do in the main thread is then block on it?
<ignazioc> :
<ignazioc> :| probably you’re right
<matthewd> nofxx: permutation
Silthias1 has quit [Quit: Leaving.]
<nofxx> matthewd, thanks, I always confuse with tranpose and never find it
<jhass> ignazioc: https://github.com/ignazioc/QuizletNerdClient/blob/master/app.rb#L49-L51 can be just File.write("settings.yml", token_hash.to_yaml)
<ignazioc> rubocop output: ‘5 files inspected, 316 offenses detected’ :D :D
* nofxx just remember simple math is always the answer...if not, gives a good keyword ... /note to self
spider-mario has joined #ruby
<jhass> ignazioc: yeah... :P
<matthewd> ignazioc: It can probably auto-fix a bunch of those for you if you like.. though it may be more informative to go through them by hand
<ignazioc> no no I will try to apply a true ruby style
<foxxx0> is there something fundamentally wrong with my approach to a form helper? https://paste.foxxx0.de/m-y7AqlX/
<jhass> ignazioc: I'd probably extract the API URL building into a method, so you just api_call :post, :sets, set, params: { ... } or so
blackmesa has quit [Ping timeout: 265 seconds]
<jhass> PreferenceManager I would make either a module or a singleton (tendency to the latter), or doing something like SETTINGS = PreferenceManager.new
<ignazioc> thanks jhass: you’re giving really nice suggestions.
nankyokusei has joined #ruby
<foxxx0> jhass is the best :)
<jhass> rescue the specific parse error exception
<jhass> and do a if settings.has_key? :app_secret to guard against it returning nil
<jhass> eh nvm ^
<jhass> if settings just
<ignazioc> the only reason why I added a “begin / rescue” is because the file can not exist
<jhass> then use File.exist? to check for that
TheWhip has quit [Remote host closed the connection]
<jhass> alright, rubocop should do the rest, I've seen worse before, nice job
<matthewd> foxxx0: to_hash raises an eyebrow for me
<ignazioc> :) thanks a lot. I will do some cleanup
nankyokusei has quit [Ping timeout: 244 seconds]
<matthewd> foxxx0: Mostly I guess I'd worry about how these combine to construct a more complex / multi-element field
<matthewd> foxxx0: The complexity of classes-and-objects, but by seemingly not having them do their own rendering, it feels like it could become a (rather verbose) straight-jacket
hahuang61 has joined #ruby
<foxxx0> matthewd: i'm just trying to let the models propagate their own field set so i can use a generic haml form template to render it
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 276 seconds]
<foxxx0> i'm still pretty new to ruby though so maybe i'm just trying to approach the task at hand completely wrong
<foxxx0> that's why i'm asking for feedback, which is always greatly appreciated
snapcase has quit [Remote host closed the connection]
<matthewd> Every time I've tried to objectify form definitions, it's ended up biting me later
Dimik has quit [Ping timeout: 276 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
yqt has joined #ruby
zarubin has quit [Read error: Connection reset by peer]
zarubin has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
Jet4Fire has joined #ruby
<foxxx0> why is that?
<Jet4Fire> Hello!
<jhass> hi
the_rhizo2 has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
the_rhizo2 has quit [Ping timeout: 244 seconds]
kavanagh has quit [Ping timeout: 244 seconds]
saneax_AFK is now known as saneax
cd-rum_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saneax is now known as Guest83574
Trynemjoel has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
bjh13 has quit [Remote host closed the connection]
dikaio has quit [Quit: Textual IRC Client: www.textualapp.com]
MrBusiness3 has joined #ruby
fgo has joined #ruby
pmyjavec has joined #ruby
biberu has joined #ruby
TheWhip has joined #ruby
LoneHermit has joined #ruby
tomphp has joined #ruby
LoneHermit has quit [Ping timeout: 276 seconds]
MrBusiness3 has quit [Ping timeout: 250 seconds]
jack298_ has joined #ruby
A_Drone has joined #ruby
blackmesa has joined #ruby
A_Drone has quit [Client Quit]
dionysus69 has joined #ruby
toretore has joined #ruby
c355e3b has joined #ruby
beilabs has quit [Ping timeout: 264 seconds]
beilabs has joined #ruby
vdamewood has quit [Ping timeout: 265 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sumobob has quit [Ping timeout: 260 seconds]
pokalyis has joined #ruby
jgt has joined #ruby
rsampaio_ has quit [Ping timeout: 250 seconds]
hahuang61 has joined #ruby
queitsch has joined #ruby
beilabs has quit [Remote host closed the connection]
minotep has joined #ruby
phredus has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 250 seconds]
Ishido has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
beilabs has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
rippa has joined #ruby
zarubin has quit [Ping timeout: 276 seconds]
zarubin has joined #ruby
the_rhizo2 has joined #ruby
dminuoso has joined #ruby
pandaant has joined #ruby
beilabs has quit [Remote host closed the connection]
last_staff has joined #ruby
pmyjavec has quit [Ping timeout: 244 seconds]
biomass_ has joined #ruby
kus has quit [Ping timeout: 240 seconds]
zeroDi has joined #ruby
the_rhizo2 has quit [Ping timeout: 260 seconds]
SCHAAP137 has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fgo has quit [Ping timeout: 265 seconds]
queitsch has quit [Ping timeout: 252 seconds]
pokalyis has joined #ruby
craigp_ has quit [Ping timeout: 260 seconds]
yuki_is_bored has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
last_staff has quit [Quit: last_staff]
pokalyis has quit [Client Quit]
ptierno has joined #ruby
snapcase has joined #ruby
pokalyis has joined #ruby
ignazioc has quit [Quit: ignazioc]
ptierno has left #ruby [#ruby]
symm- has joined #ruby
LoneHermit has joined #ruby
<foxxx0> how do i write to a class property by using send/public_send or something similar, i want to use a variable to specify the class property name
<Mon_Ouie> define_singleton_method(name) do … end
<foxxx0> example: i have a class Domain that has a property 'user_opts', that can be written to using: my_domain = Domain.new; my_domain.user_opts = 'foo';
<Mon_Ouie> and instance_variable_(get|set) (assuming that's what you mean by a property)
<Mon_Ouie> Oh, just attr_accessor(name)
<foxxx0> yeah i have that in my class
<matthewd> foxxx0: property = :user_opts; my_domain.send("#{property}=", 'foo')
<foxxx0> aaaah
<foxxx0> thanks matthewd
<foxxx0> woo, it's working
OrbitalKitten has joined #ruby
LoneHermit has quit [Ping timeout: 240 seconds]
<jhass> foxxx0: use public_send instead of send though ;)
<foxxx0> had that first but without the =
<foxxx0> public_sends prevents attempting to call private methods?
nikivi has quit [Quit: zzz]
<foxxx0> public_send*
<jhass> yes
aef has joined #ruby
<jhass> I also use it to show the intent of dynamically calling a method versus hacking a library by calling a private method
<foxxx0> so that is "okay-ish"?
pmyjavec has joined #ruby
nikivi has joined #ruby
nikivi has quit [Client Quit]
<jhass> each_key
miqlas-H has joined #ruby
<jhass> public_send for the first one too
<foxxx0> mh
<foxxx0> somehow my user_select_options methods is private?
<foxxx0> private method `user_select_options' called for #<Sinatra::Application:0x0003be71d03440>
<jhass> and actually just options_helpers.each do |opt, attribute|
<matthewd> Why pass class_name as a string?
pmyjavec has quit [Client Quit]
<matthewd> clazz is not unheard of, but klass is the more common spelling
<jhass> @users.each_value.map
yqt has quit [Ping timeout: 258 seconds]
nikivi has joined #ruby
<matthewd> Don't bother checking @users.empty?
<jhass> actually I'd get rid of opt_contents
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> object.public_send("#{opt}=", public_send(attr))
omphe has joined #ruby
<foxxx0> oh
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
tomphp has joined #ruby
Bish has joined #ruby
<matthewd> At a higher level, if you're getting started in the language, I'd recommend Rails over re-carving these particular wheels
pokalyis has joined #ruby
<matthewd> That certainly won't be a universal opinion.. but it feels like it'd get you past a certain level of "trying to write [other language] in ruby"
tomphp has quit [Client Quit]
<matthewd> (I'm also obviously somewhat biased)
<foxxx0> i find that doing stuff yourself and asking for feedback from some advanced people in that particular language if you're doing it the $language-way is actually way better
<foxxx0> it's not that i just want to build stuff, i want to learn the language and i'm not afraid to get my hands dirty :p
<matthewd> I guess I'm saying I'd favour starting with a higher level thing, then progressively tearing it down to its parts
<foxxx0> jhass: what exactly do you mean by @users.each_value.map? instead of the @users.each_value do |u|?
<jhass> yes and then instead of .push'ing manually
nikivi has quit [Quit: irc]
<matthewd> Whichever way works for you is obviously the best choice.. I just feel like this direction takes longer to stamp out the last of the feeling of 'otherness'. Or something.
<foxxx0> jhass: how do i pass a block to .map?
nankyokusei has joined #ruby
craigp_ has joined #ruby
<foxxx0> matthewd: sounds reasonable, but, don't get me wrong, i'm not a fan of "magical generators" and i feel like rails is pretty bloated, that's precisely why i like sinatra
beilabs has joined #ruby
pmyjavec has joined #ruby
<jhass> foxxx0: just do it?
duncannz has quit [Remote host closed the connection]
<jhass> >> {1 => 2, 3 => 4}.each_value.map {|value| value ** 2 }
<ruby[bot]> jhass: # => [4, 16] (https://eval.in/621952)
<foxxx0> yep, i was just being stupid again...
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
<foxxx0> alright, so now I only have to figure out why user_select_options is a private method and how to properly use it
nofxx has quit [Ping timeout: 244 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<foxxx0> throwing my helper methods in a module and including that everywhere i needed is supposed to fix the issue, let's see
<foxxx0> yup \o/
<foxxx0> perfect, tanks jhass and matthewd once again :)
<foxxx0> thanks*
Torrone has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
craigp_ has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
the_rhizo2 has joined #ruby
yqt has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
the_rhizo2 has quit [Ping timeout: 244 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
alfiemax has joined #ruby
sergey_makagon has joined #ruby
tomphp has joined #ruby
scottbarr has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hipertracker has joined #ruby
pokalyis has joined #ruby
alfiemax has quit [Ping timeout: 250 seconds]
last_staff has joined #ruby
scottbarr has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Client Quit]
TheWhip has quit []
stamina has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
last_staff has joined #ruby
Torrone has quit [Quit: This computer has gone to sleep]
Vingador has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
stamina has quit [Client Quit]
hipertracker has quit [Quit: hipertracker]
stamina has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nanoz has joined #ruby
kigster has joined #ruby
pokalyis has joined #ruby
alfiemax has joined #ruby
aidalgol has quit [Quit: zZzZzZzZz]
spider-mario has quit [Remote host closed the connection]
miqlas-H has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby
hanmac has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
OrbitalKitten has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
Derperperd has quit [Quit: Derperperd]
AlexRussia has joined #ruby
Neoo has joined #ruby
hahuang61 has joined #ruby
Vingador has quit [Ping timeout: 244 seconds]
Neobenedict has quit [Ping timeout: 276 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
ledestin has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
the_rhizo2 has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kigster has quit [Quit: Textual IRC Client: www.textualapp.com]
pokalyis has joined #ruby
the_rhizo2 has quit [Ping timeout: 250 seconds]
the_rhizo2 has joined #ruby
<foxxx0> what do i with models that have numerous properties/instance-variables, rubocop is rightfully complaining about initialize method having too many lines and ABC size too high
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
firstdayonthejob has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 258 seconds]
Hyuk has joined #ruby
pokalyis has joined #ruby
<jhass> tbh most of us set the defaults higher for these
Hyuk has quit [Client Quit]
AlexRussia has quit [Ping timeout: 276 seconds]
LoneHermit has joined #ruby
beilabs_ has joined #ruby
<foxxx0> generally i like the idea
<foxxx0> would be great if one could override that cop for a single method by using a comment
<foxxx0> from within the file
beilabs has quit [Remote host closed the connection]
<jhass> you can
beilabs has joined #ruby
<foxxx0> oh nice
<foxxx0> thanks
Dysp has joined #ruby
the_rhizo2 has quit [Ping timeout: 258 seconds]
beilabs__ has joined #ruby
LoneHermit has quit [Ping timeout: 265 seconds]
beilabs_ has quit [Ping timeout: 252 seconds]
<foxxx0> # rubocop:disable Matrics/AbcSize, Metrics/MethodLength
<foxxx0> so that is accepted for initialize methods in classes with a higher number of instance variables?
iLogic has quit [Ping timeout: 252 seconds]
<foxxx0> (the first should spell Metrics)
<jhass> as said most of us even bump the numbers for these generally
beilabs has quit [Ping timeout: 250 seconds]
<foxxx0> i've been trying to keep the defaults
<foxxx0> makes you rethink your methods and structure and has helped me a couple of times to find a better approach
iLogic has joined #ruby
iLogic has quit [Changing host]
iLogic has joined #ruby
sdothum has joined #ruby
<Dysp> Hi there. Maybe this is too much to ask, but I am just seriously stuck here and I don't know why. I've struggled with it for days now.
Hyuk has joined #ruby
the_rhizo2 has joined #ruby
nankyokusei has joined #ruby
AlexRussia has joined #ruby
blackmesa has joined #ruby
omphe has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
azor has quit [Quit: Connection closed for inactivity]
bluOxigen has joined #ruby
jaiks1 has quit [Ping timeout: 264 seconds]
rawb has quit [Read error: Connection reset by peer]
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Didac has quit [Ping timeout: 258 seconds]
the_rhizo2 has quit [Ping timeout: 276 seconds]
kus has joined #ruby
kus has quit [Max SendQ exceeded]
OrbitalKitten has joined #ruby
nankyokusei has quit [Remote host closed the connection]
Torrone has joined #ruby
OrbitalKitten has quit [Client Quit]
jack298__ has joined #ruby
PlasmaStar has quit [Remote host closed the connection]
ponga has joined #ruby
symm- has quit [Quit: Leaving...]
yardenbar has quit [Ping timeout: 258 seconds]
scottbarr has joined #ruby
lxsameer_ has quit [Quit: WeeChat 1.5]
symm- has joined #ruby
jack298_ has quit [Ping timeout: 258 seconds]
Didac has joined #ruby
scottbarr has quit [Ping timeout: 258 seconds]
ignazioc has joined #ruby
dunpeal has quit [Read error: Connection reset by peer]
zeroDi has quit [Quit: WeeChat 1.5]
Neoo is now known as Neobenedict
Neobenedict has quit [Changing host]
Neobenedict has joined #ruby
dunpeal has joined #ruby
jhack has joined #ruby
jhack has quit [Client Quit]
gix- has joined #ruby
gix has quit [Disconnected by services]
scottbarr has joined #ruby
LoneHermit has joined #ruby
qguv has quit [Quit: bye]
Spami has joined #ruby
LoneHermit has quit [Ping timeout: 244 seconds]
gizmore has quit [Ping timeout: 240 seconds]
gizmore has joined #ruby
unforgiven512 has quit [Ping timeout: 250 seconds]
unforgiven512 has joined #ruby
millerti has joined #ruby
pawnbox has joined #ruby
tk__ has joined #ruby
blackmesa has joined #ruby
pmyjavec has joined #ruby
karapetyan has joined #ruby
omphe has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
bdq is now known as bqd
DaniG2k has joined #ruby
<DaniG2k> hello all
<DaniG2k> I just found an odd ruby behavior
c0mrad3 has quit [Quit: Connection closed for inactivity]
<DaniG2k> I am unable to set the diagonal elements of a Matrix (array of arrays)
Guest83574 is now known as saneax_AFK
<DaniG2k> say you have [[0]*5]*5
karapetyan has quit [Ping timeout: 244 seconds]
<DaniG2k> (which will construct a Matrix)
<DaniG2k> then if you do (0..4).each {|n| matrix[n][n] = n}
hahuang61 has joined #ruby
<DaniG2k> it actually sets the numbers in every row and column
<DaniG2k> truly bizarre
ignazioc has quit [Quit: ignazioc]
scottbarr has quit [Ping timeout: 265 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
symm- has quit [Quit: Leaving...]
<foxxx0> how do i get an array with the :address values of an array like that: [{ id: 1, address: 'foo' }, { id: 2, address: 'bar' }]
symm- has joined #ruby
DaniG2k has quit [Quit: leaving]
<foxxx0> got it: hash_array.map { |x| x[:address] }
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
Torrone has quit [Quit: This computer has gone to sleep]
ramfjord has joined #ruby
l4v2 has joined #ruby
anisha has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
yqt has quit [Ping timeout: 240 seconds]
TRUMP-PENCE has quit [Remote host closed the connection]
the_rhizo2 has joined #ruby
TRUMP-PENCE has joined #ruby
TRUMP-PENCE has quit [Max SendQ exceeded]
yuki_is_bored has quit [Quit: Lost terminal]
ramfjord has joined #ruby
TRUMP-PENCE has joined #ruby
TRUMP-PENCE has quit [Max SendQ exceeded]
yardenbar has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
TRUMP-PENCE has joined #ruby
TRUMP-PENCE has quit [Max SendQ exceeded]
Dysp has quit [Quit: Page closed]
MrBusiness3 has joined #ruby
TRUMP-PENCE has joined #ruby
TRUMP-PENCE has quit [Max SendQ exceeded]
p0p0pr37_ has joined #ruby
TRUMP-PENCE has joined #ruby
TRUMP-PENCE has quit [Max SendQ exceeded]
MrBusiness2 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
p0p0pr37 has quit [Ping timeout: 265 seconds]
p0p0pr37_ is now known as p0p0pr37
dionysus69 has joined #ruby
l4v2 has quit [Quit: l4v2]
tjohnson has joined #ruby
Bish has quit [Ping timeout: 240 seconds]
TRUMP-PENCE has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
jgt1 has joined #ruby
MrBusiness3 has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
beilabs__ has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 240 seconds]
MrBusiness2 has quit [Ping timeout: 250 seconds]
Torrone has joined #ruby
the_rhizo2 has quit [Ping timeout: 244 seconds]
binaryplease1 has joined #ruby
Torrone has quit [Client Quit]
binaryplease has quit [Ping timeout: 252 seconds]
symm- has quit [Ping timeout: 265 seconds]
beilabs has joined #ruby
djbkd has joined #ruby
binaryplease1 is now known as binaryplease
blackmesa has joined #ruby
beilabs has quit [Ping timeout: 260 seconds]
symm- has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
omphe has quit [Quit: Textual IRC Client: www.textualapp.com]
Xiti has quit [Quit: Xiti]
gfvcastro has joined #ruby
gfvcastro has quit [Client Quit]
gfvcastro has joined #ruby
pawnbox has quit [Remote host closed the connection]
yuki_is_bored has joined #ruby
pawnbox has joined #ruby
pandaant has quit [Quit: Lost terminal]
nankyokusei has joined #ruby
zacts has joined #ruby
pawnbox has quit [Remote host closed the connection]
the_rhizo2 has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
govg has quit [Quit: leaving]
l4v2 has joined #ruby
karapetyan has joined #ruby
the_rhizo2 has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
giraffe has joined #ruby
nadir has joined #ruby
dionysus69 has quit [Remote host closed the connection]
rellis has quit [Quit: Leaving.]
Yacker has joined #ruby
Yacker has quit [Client Quit]
phredus has joined #ruby
djbkd has quit []
aryaching has quit []
Meow_J has joined #ruby
MrBusiness2 has joined #ruby
nando293921 has joined #ruby
jack298__ has quit [Ping timeout: 258 seconds]
airdisa has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ma489 has joined #ruby
symm- has quit [Quit: Leaving...]
MrBusiness2 has quit [Ping timeout: 250 seconds]
govg has joined #ruby
anisha has joined #ruby
harfangk_ has joined #ruby
gfvcastro has quit [Quit: Textual IRC Client: www.textualapp.com]
enterprisey has joined #ruby
harfangk has quit [Ping timeout: 260 seconds]
bqd is now known as qpq
dunpeal has quit [Quit: Lost terminal]
blackmesa has joined #ruby
beilabs has joined #ruby
VladGh has joined #ruby
ma489 has quit [Ping timeout: 264 seconds]
anisha has quit [Quit: This computer has gone to sleep]
ma489 has joined #ruby
MrBusiness2 has joined #ruby
VladGh has quit [Remote host closed the connection]
ma489 has left #ruby [#ruby]
craigp_ has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
VladGh has joined #ruby
hosttor has joined #ruby
pawnbox has joined #ruby
GinoMan2440 has quit [Ping timeout: 250 seconds]
hahuang61 has joined #ruby
last_staff has quit [Remote host closed the connection]
last_staff has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
gfvcastro has joined #ruby
l4v2 has quit [Quit: l4v2]
Dimik has joined #ruby
enterprisey has quit [Remote host closed the connection]
finisherr has joined #ruby
zacts has quit [Ping timeout: 258 seconds]
nando293921 has quit [Ping timeout: 265 seconds]
CodingWolf has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
habitullence has quit [Quit: habitullence]
l4v2 has joined #ruby
shellie_ has quit [Remote host closed the connection]
habitullence has joined #ruby
MrBusiness2 has joined #ruby
unforgiven512 has quit [Ping timeout: 250 seconds]
l4v2 has quit [Quit: l4v2]
ramfjord has joined #ruby
gfvcastro has quit [Read error: Connection reset by peer]
tk__ has quit [Quit: ばいばい]
nikivi has joined #ruby
DaniG2k has joined #ruby
<DaniG2k> hello all
<DaniG2k> I'm trying to set the values of the diagonals of a matrix using Ruby
<DaniG2k> with something like the following:
<DaniG2k> matrix = Array.new(5, Array.new(n, 5))
<DaniG2k> oops I mean
ramfjord has quit [Ping timeout: 244 seconds]
<DaniG2k> matrix = Array.new(5, Array.new(5, 0))
<DaniG2k> that should initialize a 5x5 matrix with zeros
<DaniG2k> and then I do
<DaniG2k> (0..4).each {|i| matrix[i][i] = i}
<DaniG2k> in theory that should set the numbers of the diagonals
<DaniG2k> oddly, it sets all columns in all rows
<DaniG2k> is that a bug in Ruby or am I doing something incorrectly?
bluOxigen has quit [Ping timeout: 276 seconds]
bluOxigen has joined #ruby
ddffg has quit [Ping timeout: 276 seconds]
pmyjavec has joined #ruby
zacts has joined #ruby
axsuul has joined #ruby
banisterfiend has quit [Ping timeout: 265 seconds]
minotep has quit [Quit: minotep]
<zacts> ruby is very cool
<zacts> I <3 ruby
<zacts> :-)
sepp2k1 has joined #ruby
<apeiros> DaniG2k: Array.new does not copy the object in your second arg
<apeiros> so you have the exactly same array as every element in your new array
SCHAAP137 has quit [Quit: Leaving]
<apeiros> use the block-form for that. the block is executed once for every element it should create in the initial array, therefore it'll be distinct arrays.
sepp2k has quit [Ping timeout: 276 seconds]
<DaniG2k> block-form?
<DaniG2k> how do I do that?
<apeiros> Array.new(n) { …create nth element… }
<DaniG2k> ah gotcha
CodingWolf has quit [Read error: Connection reset by peer]
nanoz has quit [Read error: Connection reset by peer]
nanoz has joined #ruby
nanoz has quit [Changing host]
nanoz has joined #ruby
davedev24 has joined #ruby
<DaniG2k> apeiros: perfect
<DaniG2k> thanks
firstdayonthejob has joined #ruby
blackmesa has joined #ruby
d5sx43 has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
d5sx43 has quit [Client Quit]
SCHAAP137 has joined #ruby
anisha has joined #ruby
<apeiros> yw
mikecmpbll has joined #ruby
rileyy has joined #ruby
jaequery has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
edwardly has quit [Ping timeout: 244 seconds]
l4v2 has joined #ruby
mikecmpbll has quit [Client Quit]
sergey_makagon has joined #ruby
nanoz] has joined #ruby
jaequery has quit [Ping timeout: 265 seconds]
anisha has quit [Ping timeout: 258 seconds]
sergey_makagon has quit [Client Quit]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
nanoz] has quit [Read error: Connection reset by peer]
nanoz has quit [Ping timeout: 276 seconds]
rileyy has quit [Ping timeout: 258 seconds]
anisha has joined #ruby
nankyokusei has joined #ruby
l4v2 has quit [Quit: l4v2]
davedev2_ has joined #ruby
DaniG2k has quit [Quit: leaving]
davedev24 has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 250 seconds]
Jet4Fire has quit [Quit: Lost terminal]
<foxxx0> jhass: just figured out: you can use 'localhost.localdomain' for the Rack::Session::Cookie domain setting and then access the app through http://localhost.localdomain:9494/ and cookies will work, even with curl
<foxxx0> jhass: so there is no need for an explicit domain name in /etc/hosts + matching domain cookie setting
<jhass> interesting
kobain has joined #ruby
<foxxx0> just assumed you would like a followup on that
sumobob has joined #ruby
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
da3mon has joined #ruby
lupine has quit [Remote host closed the connection]
ignazioc has joined #ruby
yuki_is_bored has quit [Quit: Lost terminal]
SteenJobs has joined #ruby
lupine has joined #ruby
pmyjavec has joined #ruby
ofc has joined #ruby
the_rhizo2 has joined #ruby
harfangk_ has quit [Quit: Textual IRC Client: www.textualapp.com]
pmyjavec has quit [Client Quit]
fmcgeough has joined #ruby
Axy has quit [Ping timeout: 244 seconds]
<ofc> /msg NickServ VERIFY REGISTER ofc hvujejkxsgrs
Meow_J has quit [Quit: Connection closed for inactivity]
houhoulis has joined #ruby
ignazioc has quit [Quit: ignazioc]
ignazioc has joined #ruby
craigp_ has quit [Ping timeout: 265 seconds]
zacts has quit [Quit: WeeChat 1.4]
anisha_ has joined #ruby
beilabs_ has joined #ruby
anisha has quit [Ping timeout: 258 seconds]
c0mrad3 has joined #ruby
shellie_ has joined #ruby
Hobogrammer has quit [Ping timeout: 240 seconds]
beilabs has quit [Ping timeout: 264 seconds]
tmtwd has joined #ruby
blackmesa has joined #ruby
Cohedrin has joined #ruby
ignazioc has quit [Quit: ignazioc]
Cohedrin has quit [Client Quit]
last_staff has quit [Quit: last_staff]
last_staff has joined #ruby
govg has quit [Quit: leaving]
govg has joined #ruby
ofc has quit [Quit: Page closed]
hahuang61 has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
diegoviola has joined #ruby
karapetyan has joined #ruby
l4v2 has joined #ruby
beilabs_ has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 250 seconds]
cabyrd has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
the_rhizo2 has quit [Ping timeout: 276 seconds]
nando293921 has joined #ruby
pmyjavec has joined #ruby
tdw has joined #ruby
pmyjavec has quit [Client Quit]
davedev2_ has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
pmyjavec has joined #ruby
Cohedrin has joined #ruby
bkxd has joined #ruby
tdw has quit [Ping timeout: 250 seconds]
anisha__ has joined #ruby
cabyrd has quit [Quit: leaving]
wald0 has joined #ruby
habitullence_ has joined #ruby
anisha_ has quit [Ping timeout: 276 seconds]
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 244 seconds]
habitullence has quit [Ping timeout: 258 seconds]
habitullence_ is now known as habitullence
sumobob has quit [Ping timeout: 244 seconds]
Bish has joined #ruby
Pumukel has joined #ruby
AlexRussia has quit [Ping timeout: 258 seconds]
cbyrda has joined #ruby
anisha has joined #ruby
Madplatypus has joined #ruby
AzureStigma has joined #ruby
anisha__ has quit [Ping timeout: 264 seconds]
spudowiar has joined #ruby
loechel has joined #ruby
kavanagh has joined #ruby
anisha_ has joined #ruby
ddffg has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
Derperperd has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
anisha__ has joined #ruby
cbyrda has quit [Quit: leaving]
anisha_ has quit [Ping timeout: 244 seconds]
Rickmasta has quit [Remote host closed the connection]
anisha_ has joined #ruby
anisha__ has quit [Ping timeout: 250 seconds]
craigp_ has joined #ruby
anisha__ has joined #ruby
l4v2 has quit [Quit: l4v2]
anisha_ has quit [Ping timeout: 265 seconds]
Dimik has quit [Ping timeout: 265 seconds]
karapetyan has quit [Remote host closed the connection]
hosttor has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
spudowiar has quit [Quit: brrrb]
spudowiar has joined #ruby
crystal77 has joined #ruby
nisstyre has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
AzureStigma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
spudowiar has quit [Quit: Leaving.]
Pumukel has quit [Remote host closed the connection]
spudowiar has joined #ruby
johnny56_ has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
weaksauce has joined #ruby
Burgestrand has joined #ruby
AzureStigma has joined #ruby
dhamidi has joined #ruby
thoraxe has quit [Ping timeout: 276 seconds]
jrafanie has joined #ruby
pawnbox has quit [Remote host closed the connection]
vuoto has joined #ruby
nankyokusei has joined #ruby
rails536 has joined #ruby
ellistaa has joined #ruby
<ellistaa> can someone comment on my flow for deleting a user?
l4v2 has joined #ruby
thoraxe has joined #ruby
AzureStigma has quit [Quit: Textual IRC Client: www.textualapp.com]
miqlas-H has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
elifoster has joined #ruby
dhollinger has joined #ruby
OTORelic4 has quit [Ping timeout: 258 seconds]
stamina has quit [Ping timeout: 240 seconds]
zeroDi has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Remote host closed the connection]
jarred has joined #ruby
ramfjord has joined #ruby
SCHAAP137 has joined #ruby
rails536 has quit [Ping timeout: 264 seconds]
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 264 seconds]
houhoulis has quit [Remote host closed the connection]
jrafanie has joined #ruby
blackmesa has joined #ruby
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
da3mon has quit [Quit: Zzzz...]
conta has quit [Ping timeout: 264 seconds]
LoneHerm_ has joined #ruby
ignazioc has joined #ruby
roamingdog has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHerm_ has quit [Ping timeout: 252 seconds]
Burgestrand has joined #ruby
da3mon has joined #ruby
Rodya_ has joined #ruby
da3mon has quit [Client Quit]
sneakerhax has quit [Remote host closed the connection]
sneakerhax has joined #ruby
stamina has joined #ruby
soulisson has joined #ruby
<soulisson> Hi, I'm using recv on a udp socket, I receeive an ICMP port unreachable port response, however the sockets keeps trying to receive, is there something I can do?
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soulisson> I expect an exceptio to be raised but this is not the case, is there an option I'm missing or something
Derperperd has quit [Quit: Derperperd]
sumobob has joined #ruby
Burgestrand has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
crystal77 has quit [Quit: Textual IRC Client: www.textualapp.com]
KnownSyntax_ has joined #ruby
KnownSyntax_ has quit [Changing host]
KnownSyntax_ has joined #ruby
Pumukel has joined #ruby
hahuang61 has joined #ruby
<soulisson> any one?
<ellistaa> i dont know what a udp socket is or an ICMP port :\
KnownSyntax has quit [Ping timeout: 265 seconds]
sumobob has quit [Ping timeout: 250 seconds]
tdw has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
nikivi has quit [Quit: irc]
sumobob has joined #ruby
da3mon has joined #ruby
nikivi has joined #ruby
vuoto_ has joined #ruby
blackwell has quit [Ping timeout: 244 seconds]
vuoto_ has quit [Remote host closed the connection]
vuoto_ has joined #ruby
vuoto_ has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
nikivi has quit [Quit: irc]
blackwell has joined #ruby
sumobob has quit [Ping timeout: 264 seconds]
blackwell has quit [Client Quit]
miqlas-H has quit [Ping timeout: 250 seconds]
lel has quit [Read error: Connection reset by peer]
nikivi has joined #ruby
nikivi has quit [Client Quit]
ignazioc has quit [Quit: ignazioc]
da3mon has quit [Quit: cya...]
AzureStigma has joined #ruby
blackwell has joined #ruby
sumobob has joined #ruby
axsuul has joined #ruby
spudowiar has quit [Quit: cya'll later]
tdy has quit [Quit: WeeChat 1.5]
Pumukel_ has joined #ruby
tdy has joined #ruby
lel has joined #ruby
<soulisson> Is there a path where the gems are installed?
Pumukel__ has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Spami has quit [Quit: This computer has gone to sleep]
ellistaa has quit [Quit: ellistaa]
Spami has joined #ruby
Spami has quit [Client Quit]
<havenwood> soulisson: gem env gemdir
Pumukel has joined #ruby
<soulisson> havenwood, when I do require looks in this path?
Pumukel_ has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Remote host closed the connection]
<havenwood> soulisson: that'd be: gem env gempath
Pumukel_ has joined #ruby
<havenwood> soulisson: see: gem help env
Pumukel__ has quit [Ping timeout: 260 seconds]
ponga has quit [Quit: Connection closed for inactivity]
<soulisson> thanks
vuoto has quit [Remote host closed the connection]
AlexRussia has joined #ruby
dreamyspell has joined #ruby
Pumukel__ has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
craysiii has joined #ruby
Pumukel_ has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
diegoviola is now known as dviola
<soulisson> Sorry to bother you again in gem env gempath, one of the folders is /var/lib/gems/2.3.0 but the librairies are in the /var/lib/gems/2.3.0/gems/xxx/lib folder, does the require takes the first folder and knows where to go from there?
<matthewd> Yes. (Approximately.)
Pumukel__ has quit [Ping timeout: 260 seconds]
<soulisson> matthewd, thanks
<soulisson> Ruby is so rich, sometimes is a little bit hard for dumb people like me to get everything ::)
hahuang61 has joined #ruby
Pumukel_ has joined #ruby
workmad3 has joined #ruby
fmcgeough has quit [Read error: Connection reset by peer]
fmcgeough has joined #ruby
Pumukel__ has joined #ruby
Derperperd has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
<sqljunkey> I have two arrays of same size, (5 elements in each) one is filled with strings that say "ICE" and the other has five strings that say "CREAM" is there an easy way I can combine the two arrays together so they will create an array that says "ICECREAM" ?
hahuang61 has quit [Ping timeout: 250 seconds]
<sqljunkey> arr3 = arr2.append(arr1)
<sqljunkey> maybe
Pumukel has joined #ruby
bkxd has joined #ruby
<havenwood> >> Array.new(5, 'ice').zip(Array.new(5, 'cream')).map(&:join)
<ruby[bot]> havenwood: # => ["icecream", "icecream", "icecream", "icecream", "icecream"] (https://eval.in/622057)
Pumuke___ has joined #ruby
Pumukel_ has quit [Ping timeout: 264 seconds]
lightstalker has quit [Remote host closed the connection]
lightstalker has joined #ruby
loechel has quit [Quit: ChatZilla 0.9.92 [Firefox 48.0/20160726073904]]
Pumukel__ has quit [Ping timeout: 264 seconds]
Axy has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 276 seconds]
bluOxigen has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
Pumukel has joined #ruby
zarubin_ has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
Mia has quit [Ping timeout: 258 seconds]
Pumuke___ has quit [Ping timeout: 264 seconds]
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has joined #ruby
zarubin has quit [Ping timeout: 252 seconds]
<sqljunkey> ok thx
cdg has joined #ruby
loechel has joined #ruby
lightstalker has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
Pumukel_ has joined #ruby
lightstalker has joined #ruby
Pumukel_ has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
Pumukel_ has joined #ruby
loechel has quit [Ping timeout: 264 seconds]
iLogic has quit [Remote host closed the connection]
loechel has joined #ruby
sumobob has quit [Ping timeout: 276 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel__ has joined #ruby
AzureStigma is now known as AzureStigma|Away
AzureStigma|Away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel_ has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
loechel has quit [Ping timeout: 264 seconds]
nertzy has joined #ruby
nankyokusei has joined #ruby
SteppenII has joined #ruby
loechel has joined #ruby
Pumukel__ has quit [Ping timeout: 264 seconds]
Pumukel_ has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
yfeldblu_ has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 264 seconds]
yfeldblu_ has joined #ruby
loechel has quit [Ping timeout: 264 seconds]
AlexRussia has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
Pumukel_ has quit [Ping timeout: 264 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
loechel has joined #ruby
<kiba_> hello
<kiba_> rake takes some seconds to turn
<kiba_> err
<kiba_> run
<kiba_> how can I speed up the process?
Pumukel has quit [Ping timeout: 264 seconds]
Pumukel_ has joined #ruby
nertzy has joined #ruby
Pumukel has joined #ruby
<matthewd> kiba_: Put less in your rakefile?
<kiba_> that's not really an answer
loechel has quit [Ping timeout: 264 seconds]
<kiba_> for what it's worth, my Rakefile is really simple. It doesn't depend on any gem other than itself and json
the_rhizo2 has joined #ruby
loechel has joined #ruby
<matthewd> kiba_: I don't think you've given enough information for a more insightful answer. Do you?
Pumukel_ has quit [Ping timeout: 264 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
<kiba_> OK, it's variable in response. I just tested it out by repeating the command.
<kiba_> maybe I just need to get a SSD
miqlas-H has joined #ruby
<apeiros> "the code is slow, what should I do" - write faster code.
karapetyan has quit [Remote host closed the connection]
<apeiros> alternatively as matthewd already told you: provide sensible information.
<apeiros> you can run your code with a profiler (ruby -rprofile) to profile your code.
loechel has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
arquebus has joined #ruby
ellistaa has joined #ruby
karapetyan has joined #ruby
loechel has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
nertzy has quit [Ping timeout: 265 seconds]
al2o3-cr has joined #ruby
lel has quit [Read error: Connection reset by peer]
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
loechel has quit [Ping timeout: 264 seconds]
lel has joined #ruby
karapetyan has quit [Remote host closed the connection]
tvw has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
pokalyis has joined #ruby
<arquebus> hello, Im trying to make a class object with class methods that call instance methods, basically I need the method call at the bottom of the code to work, can anyone help? http://codepad.org/lxqGpWzI
karapetyan has joined #ruby
riskish has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
<matthewd> arquebus: Don't use class variables
Pumukel has joined #ruby
<matthewd> arquebus: If you want a class method to return an instance, it should be calling new
<arquebus> matthewd: ok, I left out the new part
<foxxx0> Temperature.new(c: 50).in_celsius
<foxxx0> you need to create an instance of your class if you want to use it like that
<arquebus> but I cant change the code, I need that exact code to work to pass rspec tests
blackmesa has quit [Ping timeout: 264 seconds]
<foxxx0> that would mean the rspec tests are poorly designed
jeanlinu_ has quit [Ping timeout: 276 seconds]
<arquebus> foxxx0: I am doing an exercise where I have to create factory functions using class methods, of course it would be easier to just make class instance objects but I cant do that
<foxxx0> that sounds terrible
<foxxx0> but try Temperature.new(c: 50).in_celsius
nertzy has joined #ruby
<arquebus> foxxx0: well class methods are used a lot as factory functions, I just cant find any ruby books that explain how to do it
<matthewd> "call new". End of book. ¯\_(ツ)_/¯
<apeiros> all classes in ruby are factories. after all, you call a class method (new) to create a new instance.
<foxxx0> from what i understand factories are used to create temporary instances of your models/classes, not to call/use any methods on them
l4v2 has quit [Quit: l4v2]
<apeiros> and any class method you write can call new itself too.
<arquebus> foxxx0: I would like to, but I cant, I have to use that exact code to make the tests pass, there must be some way to set up a class so these class methods will work like that
Pumukel has quit [Ping timeout: 264 seconds]
<foxxx0> so do you need to make 'puts Temperature.from_celsius(50).in_celsius' work or do you need to build a factory that represents the given temperature class and is able to use the .in_celsius class method?
Pumukel has joined #ruby
<arquebus> apeiros: when I say factories, I mean the design pattern that is similar to singleton. Im not sure if the tests are still using a previously created Temperature class of this is being instantiated on its own
<apeiros> arquebus: and I concur with matthewd - the class variables there are clearly wrong. it means *all* your Temperature instances share *the same* temperature. it makes the class utterly pointless.
<apeiros> arquebus: yes, I understood that re factories. maybe you read up on that pattern again? :-p
gfvcastro has joined #ruby
<arquebus> apeiros: that is kind of the point, you have these class objects that get instantiated just to run a method, they are doing high level stuff that is *the same* no matter what instance objects exist
gizmore has quit [Remote host closed the connection]
<foxxx0> no, it is plain stupid
<apeiros> arquebus: I think you misunderstood the factory pattern.
<arquebus> apeiros: I admit that, I am only vaguely familiar with factory patterns as a standalone object that is only created once to produce something over and over
Pumukel has quit [Ping timeout: 264 seconds]
JeanCarloMachado has joined #ruby
<apeiros> a factory method facilitates creating an instance. either by resolving the class, or by transforming the input to fit the constructor. your case is - as the example IMO plainly shows - the latter.
stamina has quit [Ping timeout: 240 seconds]
<arquebus> apeiros: thats great, thats exactly what I need to do, how should I alter my program to do that?
<apeiros> in your example, `puts Temperature.from_celsius(50).in_celsius`, the `Temperature.from_celsius(50)` call is obviously supposed to return a Temperature instance.
<matthewd> arquebus: call. new.
<foxxx0> ^
<apeiros> so what you do is you write your `from_celsius` class method accordingly. and as plenty of people already told you by now - that method can use `new`.
SCHAAP137 has quit [Remote host closed the connection]
l4v2 has joined #ruby
nertzy has quit [Ping timeout: 244 seconds]
<arquebus> apeiros: ok, but as I said I cant alter that calling method, that is part of the test, so I am going to have to call new from inside the from_celsius method
Rodya_ has joined #ruby
<apeiros> you mean you can't alter `puts Temperature.from_celsius(50).in_celsius`, yes?
spudowiar has joined #ruby
<arquebus> apeiros: yes, I cant alter that at all
<apeiros> then maybe read again what I wrote.
<apeiros> because neither I, nor anybody else said you should alter that.
<arquebus> ok, I will read over what you said, thanks for the help on this
<matthewd> > I am going to have to call new from inside the from_celsius method
<matthewd> Yes. Do that.
<arquebus> matthewd: great, this helps me a lot
the_rhizo3 has joined #ruby
roamingdog has quit [Remote host closed the connection]
<foxxx0> arquebus: can you tell us where you got those exercises/assignments from? i'm just curious to know what i should avoid
Pumukel has joined #ruby
the_rhizo2 has quit [Ping timeout: 240 seconds]
<arquebus> foxxx0: its study prep for a bootcamp, I dont want to reveal which one
<foxxx0> okay then
<matthewd> foxxx0: Seems pretty ordinary to me
<apeiros> well, if it truly uses class variables in that code, then it's pretty bad.
roamingd_ has joined #ruby
<foxxx0> entirely my point
<foxxx0> i'm not questioning the task itself, rather than the environment and provided source code
<arquebus> apeiros: the class variables were my idea, I couldnt figure out how to make a class object work alone without class variables
<matthewd> AIUI, only the last line was supplied
rippa has quit [Read error: Connection reset by peer]
soulisson_ has joined #ruby
<foxxx0> oh really?
<foxxx0> i thought he couldnt change the class?
<apeiros> matthewd: I assumed they provided a skeleton class
Pumukel has quit [Ping timeout: 264 seconds]
<foxxx0> maybe i'm just confused or totally misunderstood the problem ¯\_(ツ)_/¯
SCHAAP137 has joined #ruby
<arquebus> no, I wrote all of the class, there is no class provided, I only have to create a class object that can pass all the rspec tests they provide
Pumukel has joined #ruby
<foxxx0> then you neither need instance variables nor initialize in your class, IMHO
safetypin has quit [Quit: Textual IRC Client: www.textualapp.com]
<arquebus> foxxx0: wow, then what would I put in the class?
dminuoso has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Ping timeout: 250 seconds]
soulisson has quit [Ping timeout: 264 seconds]
SteenJobs has quit [Quit: SteenJobs]
Pumukel has quit [Ping timeout: 264 seconds]
ellistaa has quit [Quit: ellistaa]
leea has joined #ruby
<arquebus> foxxx0: I have another test that gives the class object a hash parameter when created so I have to have an initialize method, and I need instance methods to hold that input so I can run it through the cels/fahr conversion methods
ellistaa has joined #ruby
mtkd has quit [Ping timeout: 250 seconds]
mtkd has joined #ruby
<foxxx0> maybe i'm just wrong, didn't see the method chaining so Temperature.from_celsion should return an object that responds to #in_celsions, i'm not sure if that's possible using class methods only, i suppose not
<foxxx0> and if you need initialize anyway just cleanup the class and make sure to call new in #from_celsius
<foxxx0> but skip that whole class variable stuff
dgncn has quit [Ping timeout: 250 seconds]
<apeiros> 23:46 apeiros: in your example, `puts Temperature.from_celsius(50).in_celsius`, the `Temperature.from_celsius(50)` call is obviously supposed to return a Temperature instance.
<apeiros> foxxx0: ^
cd-rum has joined #ruby
SteppenII has quit [Remote host closed the connection]
<apeiros> and yes, it is very much possible. as explained plenty of times in this very thread :)
SteenJobs has joined #ruby
<apeiros> (and a proper Temperature class would convert the input temperature to kelvin anyway :-p)
s2013 has joined #ruby
<arquebus> apeiros: foxxx0: as you can see the from_celsius method takes a numeric parameter, so I just have to pass that parameter into the Temperature.new(arg_name) class intance creation inside the method
Pumukel has joined #ruby
<arquebus> and then create another if statement in the intialize method to recieve that parameter
<apeiros> close
elifoster has quit [Quit: out]
<apeiros> your initialize can deal with it just fine already. all you have to do is call new properly. and that isn't .new(arg_name)
Puck6633 has quit [Quit: Leaving]
<arquebus> apeiros: how else can I do it, the celsius_from method takes a numeric parameter, what other way can I pass it to .new?
ddffg has quit [Ping timeout: 250 seconds]
<apeiros> arquebus: do you always call all methods within your method body with all the arguments precisely as passed to the current method?
Pumukel has quit [Ping timeout: 260 seconds]
<apeiros> forget for a second the Temperature.from_celsius method. how do you create a Temperature with celsius?
<arquebus> apeiros: I guess not, Im still trying to figure out why I wouldnt take the direct route and pass it directly though
dgncn has joined #ruby
Pumukel has joined #ruby
<apeiros> pass what where directly?
m00p has joined #ruby
<arquebus> apeiros: like you said, pass the parameter from the current method to the methods within the method body, precisely as passed to the current method
workmad3 has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<apeiros> ok. I don't follow. but maybe you could answer my other question (how do you create a Temperature with/in celsius?)
Rodya_ has joined #ruby
<sqljunkey> how can I re-assign the elements of an array to a different string? arr1.at(3) = "New String"
nofxx has joined #ruby
<baweaver> use the index
<soulisson_> In Ruby when the main thread exits, the other threads terminates.
<soulisson_> ?
<baweaver> arr[3] = new value
<apeiros> soulisson_: yes
<soulisson_> apeiros, thanks
anisha_ has joined #ruby
<soulisson_> apeiros, other than join, is there a way to not exit the process until all threads are complete?
kobain has quit [Ping timeout: 260 seconds]
<arquebus> apeiros: Im just doing: Temperature.new(param_name) inside the celsius_from method which is called on a class object, the celsius_from method takes a single numeric parameter which I pass straight into the Temperature.new() initialize method
m00p has left #ruby ["Leaving"]
Pumukel has quit [Ping timeout: 260 seconds]
<apeiros> soulisson_: any other method which waits for the threads to complete. e.g. Thread#value
<soulisson_> apeiros, thanks
<foxxx0> apeiros: ^ would that be okay?
anisha__ has quit [Ping timeout: 258 seconds]
<soulisson_> I'm playing with PacketFu, any one if it's ok to have multiple Capture instance?
<apeiros> arquebus: that's not really what I asked. *with your current code* (which takes a hash in initialize), how do you create a celsius temperature (*without* the from_celsius method)
jgt1 has quit [Ping timeout: 258 seconds]
<soulisson_> *know if ..
swills has quit [Quit: Leaving]
zeroDi has quit [Quit: WeeChat 1.5]
Pumukel has joined #ruby
<apeiros> foxxx0: yes, along those lines. though you don't really need named args if you only take a single param (in initialize)
der-landgraf has quit [Ping timeout: 276 seconds]
<foxxx0> apeiros: but i really like the params.fetch stuff for assigning default values if the key was not present in the params hash
<arquebus> apeiros: as I said, I just have to create another if statement to deal with an another optional parameter, this time a numeric parameter instead of a hash, then set that to both @fahr and @cels instance variables like I did with the hash
LoneHerm_ has joined #ruby
<apeiros> foxxx0: def initialize(temp=273.15) - you can have default values with positional args just fine.
<apeiros> arquebus: seems to me you don't really understand your own code.
<foxxx0> apeiros: but he already mentioned that initialize is going to be called with a hash argument later
<apeiros> with the code you pasted, it'd be Temperature.new(c: 123) (where 123 is whichever temperature in celsius)
<apeiros> no additional if needed. you already have one there.
<foxxx0> arquebus: anywho, that's what I came up with, feel free to use it for ideas: https://paste.foxxx0.de/m-Mbds/
<arquebus> apeiros: I have another rspec test that calls this method: Temperature.new(:c => 50).in_celsius).to eq(50) thats why Im dealing with a hash
<apeiros> arquebus: yes, and you see that `Temperature.new(:c => 50)` part?
Pumukel has quit [Ping timeout: 260 seconds]
<apeiros> as said, your current new can already deal with celsius input just fine. you *already* have the necessary if/else in it.
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nikivi has joined #ruby
<arquebus> foxxx0: awesome!! thanks! I will look this over, this may be what I need
<apeiros> and you already have an example of how your from_celsius method should invoke Temperature.new.
anisha_ has quit [Ping timeout: 250 seconds]
<foxxx0> arquebus: well it doesn't take :c => 50 or :f => 82 arguments in initialize and neither does it have fahrenheit/celsius instance variables
LoneHerm_ has quit [Ping timeout: 244 seconds]
<foxxx0> but you could easily expand the initialize method to be able to use c: and f: params
<arquebus> foxxx0: I really appreciate that, this is my last exercize on my study prep, no I can finally finish
<foxxx0> something like @temp = params[:c] + 273.15 if params.key?(:c) added after line 7
justagirl has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
duncannz has joined #ruby
hahuang61 has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
<arquebus> apeiros: I still dont see how the existing initialize method would take a numeric argument instead of a simbol for a hash
<apeiros> the expected implementation is IMO stupid. beats the purpose of the class methods.
justagirl has left #ruby [#ruby]
<apeiros> arquebus: that is not, and was never, what I was saying. seriously.
<apeiros> (also "instead of a symbol for a hash" makes no sense)
blackmesa has joined #ruby
<apeiros> arquebus: in your rspec test you just pasted above, `Temperature.new(:c => 50)` creates a temperature in celsius, right?
<arquebus> apeiros: oh, oh, I see what you mean, you mean put this inside the method: Temperature.new(c: 123)
<foxxx0> :c => 50 is a hash
<arquebus> ok that makes sense now
<apeiros> congrats.
<arquebus> apeiros: great idea, thanks
AlexRussia has joined #ruby
<foxxx0> >> :c => 50
<ruby[bot]> foxxx0: # => /tmp/execpad-426f97402a81/source-426f97402a81:2: syntax error, unexpected =>, expecting keyword_end ...check link for more (https://eval.in/622061)
<foxxx0> >> puts :c => 50
<ruby[bot]> foxxx0: # => {:c=>50} ...check link for more (https://eval.in/622062)
hahuang61 has quit [Ping timeout: 250 seconds]
<apeiros> in my gist, temperature_proper.rb is how it IMO should have been done. temperature_expected.rb is how they (sadly) seem to expect it to be done. as said, IMO bad design.
anisha_ has joined #ruby
<foxxx0> apeiros: not quite, the key for celsius on initialize is c:, not celsius:
<foxxx0> apeiros: but yes, in general
<apeiros> foxxx0: oh, right
<apeiros> even worse
<foxxx0> :D
bkxd has joined #ruby
roamingd_ has quit [Remote host closed the connection]
<apeiros> wtf? I can't edit gists in the same session?
<foxxx0> the assignment doesn't make much sense to me tbh
unreal has quit [Read error: Connection reset by peer]
<foxxx0> apeiros: well, it's anonymous
<foxxx0> apeiros: guess they are just readonly once uploaded
<foxxx0> otherwise they would need to keep sessions for every anonymous user
unreal has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
<apeiros> no. they could let the browser keep the session.
<arquebus> thanks all you guys, I learned a lot, I checked a lot of ruby books and found nothing so I would never have figured this out, thanks all, bye
arquebus has quit [Quit: Page closed]
beawesomeinstead has quit [Ping timeout: 252 seconds]
biberu has quit [Read error: Connection reset by peer]
<foxxx0> well that was a weird dude
bkxd has quit [Ping timeout: 244 seconds]
<apeiros> eh, just new to the whole stuff I guess
<apeiros> we sometimes forget how weird all those things were when we started.
<foxxx0> he seemed quite confused and couldn't even state his task at hand without causing further confusion
nadir has quit [Ping timeout: 250 seconds]
<foxxx0> at least that what i felt
<apeiros> yes. he had trouble understanding multiple aspects. but that's not uncommon when you're new.
<matthewd> foxxx0: FWIW, we disagree on the source of the confusion
<foxxx0> maybe i was the source? :>
roamingdog has joined #ruby
beawesomeinstead has joined #ruby
<matthewd> That.. wasn't not my implication ;)
<foxxx0> double negation, i see
nadir has joined #ruby
<matthewd> Just at the start.. I felt like there was discussion on the reasonableness of the problem, which ended up confusing him about which advice to apply where, vs which parts were more... general observations
<foxxx0> just to be clear: i'm mainly here to learn so just stop me whenever you feel the need to if i'm causing further confusion
AlexRussia has quit [Ping timeout: 258 seconds]
tvw has quit [Remote host closed the connection]
<apeiros> hm, two sided sword. you also learn by trying to help. so stopping you from causing further confusion can also stop you from learning.
der-landgraf has joined #ruby
banisterfiend has joined #ruby
frozengeek has joined #ruby
<foxxx0> stopping me from interfering doesn't mean i stop reading and following the conversation ;)
<apeiros> sure. but it stops you from trying to help :)
<foxxx0> not necessarily
anisha_ has quit [Ping timeout: 240 seconds]
<foxxx0> i already had given up on that guy at one point but once it was finally clear what he was supposed to to / what the assignment was, i started fiddling on my own
<foxxx0> maybe we could have reached that clarification a bit sooner if i hadn't caused further confusion :S
nankyokusei has joined #ruby
<foxxx0> anyway, what i'm trying to say: i
<foxxx0> i'm always open for feedback
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 258 seconds]
kobain has joined #ruby
kobain has quit [Excess Flood]
symm- has joined #ruby
kobain has joined #ruby
<apeiros> oh dear… I made a grave mistake. - and + are wrong in some places.
* apeiros blushes
<foxxx0> just write some specs to test your code? :P
nikivi has quit [Quit: irc]
<apeiros> if, then I'd write unit tests, not specs :-p
GodFather has quit [Ping timeout: 244 seconds]
<apeiros> I'd rather play a bit with crystal and porting chronos over to it.
<apeiros> but the current implementation has a nice feature - you can set the unit in which the inspect is shown :D
<apeiros> `Temperature.inspect_unit = :celsius; Temperature.celsius(50)` # => <50.0 °C>
MissionCritical has quit [Ping timeout: 265 seconds]
anisha has joined #ruby
s2013 has joined #ruby
toretore has quit [Ping timeout: 252 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
LoneHerm_ has joined #ruby
lel has quit [Ping timeout: 240 seconds]
Azure|dc has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
last_staff has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
anisha has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Remote host closed the connection]
jgt1 has joined #ruby
Mission-Critical has joined #ruby
gfvcastro has quit [Ping timeout: 240 seconds]
lel has joined #ruby
jgnagy has joined #ruby
sneakerhax has quit [Ping timeout: 276 seconds]
rsampaio_ has joined #ruby
Mission-Critical has quit [Ping timeout: 265 seconds]
Ishido has quit [Remote host closed the connection]
elifoster has joined #ruby
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
roamingdog has quit []
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
MissionCritical has joined #ruby
pokalyis has joined #ruby
<soulisson_> Are Ruby lists thread safe?
<matthewd> soulisson_: Assuming you mean arrays... on MRI: yes, for some values of thread safe. In general / on other interpreters: no.
<soulisson_> Main Ruby Interpreter?
bkxd has quit [Ping timeout: 258 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
nando293921 has quit [Ping timeout: 276 seconds]
nebben has joined #ruby
KaliLinuxGR has quit [Read error: Connection reset by peer]
<yorickpeterse> soulisson_: No.
<yorickpeterse> Array, Hash, Set, etc, are not thread-safe
KaliLinuxGR has joined #ruby
<yorickpeterse> Queue is pretty much the only collection data structure that is
<soulisson_> ok
<yorickpeterse> While the GIL will prevent two Ruby threads from running in parallel, the structures _themselves_ are not thread-safe
<apeiros> given that Queue is now Thread::Queue - stuff within the Thread namespace is thread safe. anything which doesn't explicitly state to be thread safe is usually not.
aries_liuxueyang has quit [Ping timeout: 240 seconds]
anuxivm has joined #ruby
ellistaa has quit [Quit: ellistaa]
dhamidi has quit [Ping timeout: 258 seconds]
soulisson__ has joined #ruby
aries_liuxueyang has joined #ruby
soulisson_ has quit [Ping timeout: 252 seconds]
yfeldblu_ has quit [Ping timeout: 250 seconds]
<soulisson__> Does Ruby have multiprocessing like Python?
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
<matthewd> soulisson__: I don't know of a library that does that.. though the relevant parts are there, so it's entirely possible someone has put them together
<apeiros> parallelism isn't a language property. it's a runtime property.
<apeiros> mri has concurrency but no parallelism (due to the GIL)